Skip to content

feat: canton cct sdk for registry pools - #360

Open
stackman27 wants to merge 19 commits into
cct-sdkfrom
sish/canton-sdk
Open

stackman27 wants to merge 19 commits into
cct-sdkfrom
sish/canton-sdk

Conversation

@stackman27

Copy link
Copy Markdown

No description provided.

@vercel

vercel Bot commented Aug 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ccip-tools-ts Ready Ready Preview Sep 22, 2026 7:21pm UTC

Request Review

# Conflicts:
#	ccip-sdk/src/canton/index.ts
#	ccip-sdk/src/canton/types.ts
@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown

CI Test Report

7 of 3059 tests did not pass (pass 3046, fail 7, cancelled 0, skipped 6) in 4m 53s

Failed suites: ccip-sdk/src/evm/dest-liquidity.integration.test.ts, ccip-sdk/src/evm/fork.test.ts, ccip-sdk/src/evm/integration.test.ts

Failed tests
test at ccip-sdk/src/evm/dest-liquidity.integration.test.ts:153:7
✖ LBTC dest on ethereum (LombardTokenPoolV2) => attestation-required pre-send, not a block (90.806724ms)
  AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
  + actual - expected
  
  + 'LombardTokenPool'
  - 'LombardTokenPoolV2'
                     ^
  
      at TestContext.<anonymous> (file:///home/runner/work/ccip-tools-ts/ccip-tools-ts/ccip-sdk/src/evm/dest-liquidity.integration.test.ts:159:16)
      at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
      at async Test.run (node:internal/test_runner/test:1404:7)
      at async Suite.processPendingSubtests (node:internal/test_runner/test:969:7) {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: 'LombardTokenPool',
    expected: 'LombardTokenPoolV2',
    operator: 'strictEqual',
    diff: 'simple'
  }

test at ccip-sdk/src/evm/dest-liquidity.integration.test.ts:153:7
✖ LBTC dest on monad (LombardTokenPoolV2) => attestation-required pre-send, not a block (87.986286ms)
  AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
  + actual - expected
  
  + 'LombardTokenPool'
  - 'LombardTokenPoolV2'
                     ^
  
      at TestContext.<anonymous> (file:///home/runner/work/ccip-tools-ts/ccip-tools-ts/ccip-sdk/src/evm/dest-liquidity.integration.test.ts:159:16)
      at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
      at async Test.run (node:internal/test_runner/test:1404:7)
      at async Suite.processPendingSubtests (node:internal/test_runner/test:969:7) {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: 'LombardTokenPool',
    expected: 'LombardTokenPoolV2',
    operator: 'strictEqual',
    diff: 'simple'
  }

test at ccip-sdk/src/evm/fork.test.ts:227:5
✖ should send via v1.5 lane (Sepolia -> Fuji) and emit CCIPSendRequested (9530.957336ms)
  AssertionError [ERR_ASSERTION]: should be CCIPSendRequested
  + actual - expected
  
  + '0x371bc2ff0a006f4ef863b1d27a065d4e9f938b6d883eb154572b4aea593b32cc'
  - '0xd0c3c799bf9e2639de44391e7f524d229b2b55f5b1ea94b2bf7da42f7243dddd'
  
      at TestContext.<anonymous> (file:///home/runner/work/ccip-tools-ts/ccip-tools-ts/ccip-sdk/src/evm/fork.test.ts:249:16)
      at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
      at async Test.run (node:internal/test_runner/test:1404:7)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1889:7)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1889:7)
      at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: '0x371bc2ff0a006f4ef863b1d27a065d4e9f938b6d883eb154572b4aea593b32cc',
    expected: '0xd0c3c799bf9e2639de44391e7f524d229b2b55f5b1ea94b2bf7da42f7243dddd',
    operator: 'strictEqual',
    diff: 'simple'
  }

test at ccip-sdk/src/evm/integration.test.ts:433:5
✖ should return fee tokens for a v1.5 OnRamp (419.805228ms)
  AssertionError [ERR_ASSERTION]: no EVM2EVMOnRamp 1.5.x lane remains on the base/op-sepolia routers; update LEGACY_V1_5_CANDIDATES (query each router getOnRamp + typeAndVersion)
      at findLegacyV1_5Lane (file:///home/runner/work/ccip-tools-ts/ccip-tools-ts/ccip-sdk/src/evm/integration.test.ts:163:12)
      at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
      at async TestContext.<anonymous> (file:///home/runner/work/ccip-tools-ts/ccip-tools-ts/ccip-sdk/src/evm/integration.test.ts:434:20)
      at async Test.run (node:internal/test_runner/test:1404:7)
      at async Suite.processPendingSubtests (node:internal/test_runner/test:969:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail',
    diff: 'simple'
  }

test at ccip-sdk/src/evm/integration.test.ts:538:5
✖ should return positive fees for v1.5, v1.6 and v2.0 lanes on both chains (119.808634ms)
  AssertionError [ERR_ASSERTION]: no EVM2EVMOnRamp 1.5.x lane remains on the base/op-sepolia routers; update LEGACY_V1_5_CANDIDATES (query each router getOnRamp + typeAndVersion)
      at findLegacyV1_5Lane (file:///home/runner/work/ccip-tools-ts/ccip-tools-ts/ccip-sdk/src/evm/integration.test.ts:163:12)
      at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
      at async TestContext.<anonymous> (file:///home/runner/work/ccip-tools-ts/ccip-tools-ts/ccip-sdk/src/evm/integration.test.ts:553:22)
      at async Test.run (node:internal/test_runner/test:1404:7)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1889:7)
      at async Suite.processPendingSubtests (node:internal/test_runner/test:969:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail',
    diff: 'simple'
  }

test at ccip-sdk/src/evm/integration.test.ts:701:5
✖ should return FINALITY_FAST=undefined and no rate limits for v1.6 lane (41.054458ms)
  AssertionError [ERR_ASSERTION]: v1.6 lane should not include FINALITY_FAST (FTF does not exist pre-v2.0)
  
  1 !== undefined
  
      at TestContext.<anonymous> (file:///home/runner/work/ccip-tools-ts/ccip-tools-ts/ccip-sdk/src/evm/integration.test.ts:709:14)
      at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
      at async Test.run (node:internal/test_runner/test:1404:7)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1889:7)
      at async Suite.processPendingSubtests (node:internal/test_runner/test:969:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: 1,
    expected: undefined,
    operator: 'strictEqual',
    diff: 'simple'
  }

test at ccip-sdk/src/evm/integration.test.ts:1021:5
✖ should return ccipFee only for pre-v2.0 lanes with token transfer (132.045603ms)
  AssertionError [ERR_ASSERTION]: no EVM2EVMOnRamp 1.5.x lane remains on the base/op-sepolia routers; update LEGACY_V1_5_CANDIDATES (query each router getOnRamp + typeAndVersion)
      at findLegacyV1_5Lane (file:///home/runner/work/ccip-tools-ts/ccip-tools-ts/ccip-sdk/src/evm/integration.test.ts:163:12)
      at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
      at async TestContext.<anonymous> (file:///home/runner/work/ccip-tools-ts/ccip-tools-ts/ccip-sdk/src/evm/integration.test.ts:1030:22)
      at async Test.run (node:internal/test_runner/test:1404:7)
      at async Suite.processPendingSubtests (node:internal/test_runner/test:969:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail',
    diff: 'simple'
  }
---------------------------------------|---------|----------|---------|---------|-------------------

Summary

ℹ tests 3059
ℹ suites 802
ℹ pass 3046
ℹ fail 7
ℹ cancelled 0
ℹ skipped 6
ℹ todo 0
ℹ duration_ms 293362.840366
Coverage report
File                                   | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
---------------------------------------|---------|----------|---------|---------|-------------------
All files                              |   85.25 |    83.07 |   77.64 |   85.25 |                   
 ccip-cli/src                          |   90.42 |    59.25 |      75 |   90.42 |                   
  index.ts                             |   90.42 |    59.25 |      75 |   90.42 | ...73-174,180-185 
 ccip-cli/src/commands                 |   52.65 |    75.07 |    62.9 |   52.65 |                   
  index.ts                             |     100 |      100 |     100 |     100 |                   
  lane-latency.ts                      |   70.76 |    83.33 |   33.33 |   70.76 | ...,76-83,119-128 
  lane.ts                              |   86.98 |    68.42 |     100 |   86.98 | ...41-144,148-150 
  manual-exec.ts                       |   20.34 |      100 |       0 |   20.34 | ...39-149,151-347 
  parse.ts                             |    55.2 |      100 |       0 |    55.2 | 47-51,58-65,67-96 
  search.ts                            |   81.25 |      100 |       0 |   81.25 | 24-29             
  send.ts                              |   14.13 |      100 |       0 |   14.13 | ...09-237,239-552 
  show.ts                              |   75.68 |    63.75 |     100 |   75.68 | ...15-318,399-401 
  supported-tokens.ts                  |   17.93 |      100 |       0 |   17.93 | ...80-353,355-368 
  token.ts                             |   22.72 |      100 |       0 |   22.72 | ...3,60-67,69-132 
  types.ts                             |     100 |      100 |     100 |     100 |                   
  utils.ts                             |   87.89 |    78.86 |   96.66 |   87.89 | ...11-721,729-737 
 ccip-cli/src/commands/search          |   53.89 |    76.19 |    12.5 |   53.89 |                   
  messages.ts                          |   53.89 |    76.19 |    12.5 |   53.89 | ...36-258,260-295 
 ccip-cli/src/providers                |   53.41 |    86.31 |   21.73 |   53.41 |                   
  aptos.ts                             |   51.47 |      100 |       0 |   51.47 | ...,95-96,105-136 
  evm.ts                               |    36.3 |      100 |       0 |    36.3 | ...69-104,116-168 
  index.ts                             |   81.37 |    85.55 |    90.9 |   81.37 | ...20,290,344-392 
  solana.ts                            |   47.82 |      100 |       0 |   47.82 | ...03-104,113-138 
  sui.ts                               |    49.5 |      100 |       0 |    49.5 | ...57-258,267-301 
  ton.ts                               |   15.03 |      100 |       0 |   15.03 | 24-153            
 ccip-cli/src/providers/canton         |    85.4 |    77.89 |      68 |    85.4 |                   
  auth.ts                              |   82.41 |    73.01 |   53.33 |   82.41 | ...17-333,464-469 
  config.ts                            |   80.41 |    81.81 |     100 |   80.41 | 36-43,48-58       
  index.ts                             |     100 |      100 |     100 |     100 |                   
  wallet.ts                            |   92.93 |      100 |   85.71 |   92.93 | 172-184           
 ccip-sdk/src                          |   95.55 |     88.6 |   93.15 |   95.55 |                   
  chain.ts                             |   96.54 |    84.28 |   84.37 |   96.54 | ...2440,2473-2474 
  commits.ts                           |    90.9 |    81.25 |     100 |    90.9 | ...06,115-118,120 
  execution.ts                         |   93.13 |    88.23 |     100 |   93.13 | ...53-159,192-199 
  explorer.ts                          |     100 |      100 |     100 |     100 |                   
  extra-args.ts                        |     100 |    89.74 |     100 |     100 | 225,260,297,312   
  fetch.ts                             |   98.33 |    93.88 |   97.87 |   98.33 | ...-942,1188-1190 
  gas.ts                               |   85.14 |    86.04 |      75 |   85.14 | ...82-293,402-451 
  http-status.ts                       |     100 |      100 |     100 |     100 |                   
  index.ts                             |     100 |      100 |     100 |     100 |                   
  messages.ts                          |    79.2 |    47.16 |      40 |    79.2 | ...99-310,314-327 
  networks.ts                          |     100 |      100 |     100 |     100 |                   
  offchain.ts                          |   84.64 |    76.92 |     100 |   84.64 | ...18-227,236-237 
  requests.ts                          |    95.4 |    90.58 |     100 |    95.4 | ...54-655,680-685 
  supported-chains.ts                  |     100 |      100 |     100 |     100 |                   
  types.ts                             |     100 |      100 |     100 |     100 |                   
  utils.ts                             |   99.28 |    96.27 |     100 |   99.28 | ...12,217-218,220 
 ccip-sdk/src/api                      |   93.22 |    83.44 |   94.73 |   93.22 |                   
  index.ts                             |   93.22 |    83.44 |   94.73 |   93.22 | ...92-895,898-901 
 ccip-sdk/src/aptos                    |   78.99 |    78.74 |   76.19 |   78.99 |                   
  exec.ts                              |   29.31 |      100 |       0 |   29.31 | 18-58             
  hasher.ts                            |   75.89 |       80 |   66.66 |   75.89 | 17-36,50-56       
  index.ts                             |   69.45 |    80.31 |   67.44 |   69.45 | ...1094,1098-1109 
  logs.ts                              |   96.65 |     78.2 |    92.3 |   96.65 | ...1244-1254,1731 
  send.ts                              |    25.6 |      100 |       0 |    25.6 | ...2,63-80,93-125 
  token.ts                             |   23.75 |       75 |     100 |   23.75 | 35-156            
  types.ts                             |   65.97 |      100 |       0 |   65.97 | 26-33,65-89       
 ccip-sdk/src/canton                   |   50.41 |    75.36 |      40 |   50.41 |                   
  amount.ts                            |   92.59 |       70 |     100 |   92.59 | 22-23             
  ccv-addresses.ts                     |     100 |    91.07 |     100 |     100 | 13,30,64,67       
  defaults.ts                          |   99.28 |    90.24 |     100 |   99.28 | 93                
  events.ts                            |    54.4 |    67.03 |    42.1 |    54.4 | ...52-564,570-579 
  index.ts                             |   35.44 |    58.82 |   13.51 |   35.44 | ...2588,2591-2593 
  networks.ts                          |     100 |      100 |     100 |     100 |                   
  submit-commands.ts                   |   87.58 |       60 |     100 |   87.58 | ...95,123-127,134 
  types.ts                             |     100 |      100 |     100 |     100 |                   
  update-id.ts                         |   98.11 |    88.88 |     100 |   98.11 | 52                
 ccip-sdk/src/canton/authentication    |   93.05 |    79.31 |    92.3 |   93.05 |                   
  authorization-code.ts                |   89.83 |    84.31 |    90.9 |   89.83 | ...58-376,432-443 
  client-credentials.ts                |   91.28 |       75 |     100 |   91.28 | ...92-196,198-202 
  index.ts                             |    96.8 |       75 |     100 |    96.8 | 168-173           
  metadata.ts                          |   81.89 |    44.44 |      50 |   81.89 | ...55,73-78,93-94 
  static.ts                            |     100 |      100 |     100 |     100 |                   
  token-source.ts                      |   98.88 |    77.77 |     100 |   98.88 | 165-166           
  types.ts                             |     100 |      100 |     100 |     100 |                   
 ccip-sdk/src/canton/client            |    57.4 |    60.86 |   22.85 |    57.4 |                   
  client.ts                            |   55.62 |    59.09 |   22.85 |   55.62 | ...37-756,771-791 
  index.ts                             |     100 |      100 |     100 |     100 |                   
 ...dk/src/canton/explicit-disclosures |   73.79 |    69.35 |      54 |   73.79 |                   
  acs.ts                               |   87.36 |     69.1 |      90 |   87.36 | ...20,568,606-607 
  eds.ts                               |   53.61 |      100 |       0 |   53.61 | ...25-432,436-441 
 ccip-sdk/src/canton/token-metadata    |   61.37 |      100 |       0 |   61.37 |                   
  client.ts                            |   61.37 |      100 |       0 |   61.37 | 111-178,185-189   
 ...dk/src/canton/transfer-instruction |    52.4 |      100 |       0 |    52.4 |                   
  client.ts                            |    52.4 |      100 |       0 |    52.4 | 104-197,204-208   
 ccip-sdk/src/cct                      |     100 |      100 |     100 |     100 |                   
  errors.ts                            |     100 |      100 |     100 |     100 |                   
  operation.ts                         |     100 |      100 |     100 |     100 |                   
  query.ts                             |     100 |      100 |     100 |     100 |                   
  token-manager.ts                     |     100 |      100 |     100 |     100 |                   
 ccip-sdk/src/cct/canton               |   66.13 |    67.92 |   51.61 |   66.13 |                   
  encoding.ts                          |   84.21 |       75 |   66.66 |   84.21 | 49-57             
  gateway.test.helpers.ts              |   20.79 |       50 |       0 |   20.79 | ...90-133,143-226 
  index.ts                             |    89.5 |      100 |   54.54 |    89.5 | ...07-110,114-117 
  operation.ts                         |    90.1 |     61.9 |   85.71 |    90.1 | ...46-150,181-192 
  query.ts                             |     100 |      100 |     100 |     100 |                   
  validate.ts                          |   65.51 |    61.11 |     100 |   65.51 | ...75,77-82,84-85 
 ...rc/cct/canton/token-admin-registry |   78.04 |       50 |   66.66 |   78.04 |                   
  shared.ts                            |   78.04 |       50 |   66.66 |   78.04 | ...94-108,116-121 
 ...on/token-admin-registry/operations |   95.89 |    77.77 |     100 |   95.89 |                   
  get-token-admin-registry.ts          |   95.65 |    77.14 |     100 |   95.65 | 65-70,120,183     
  index.ts                             |     100 |      100 |     100 |     100 |                   
 ccip-sdk/src/cct/canton/token-pool    |   68.57 |    95.23 |   33.33 |   68.57 |                   
  shared.ts                            |   68.57 |    95.23 |   33.33 |   68.57 | ...58-463,469-480 
 ...c/cct/canton/token-pool/operations |   83.59 |    65.83 |    90.9 |   83.59 |                   
  apply-chain-updates.ts               |   49.49 |      100 |      25 |   49.49 | ...46-181,184-197 
  deploy-token-pool.ts                 |   84.57 |    65.62 |     100 |   84.57 | ...19-224,278-307 
  get-rate-limiter-state.ts            |   96.47 |    76.92 |     100 |   96.47 | 70-75             
  get-token-pool-state.ts              |   95.06 |    59.32 |     100 |   95.06 | ...32,157,180,292 
  index.ts                             |     100 |      100 |     100 |     100 |                   
 ccip-sdk/src/cct/evm                  |   95.37 |     95.8 |   50.89 |   95.37 |                   
  index.ts                             |   94.54 |      100 |   36.78 |   94.54 | ...2512,2544-2547 
  operation.ts                         |     100 |      100 |     100 |     100 |                   
  query.ts                             |     100 |      100 |     100 |     100 |                   
  submit.ts                            |     100 |    79.16 |     100 |     100 | 28,52,68-69,87    
  validate.ts                          |   98.11 |    98.07 |     100 |   98.11 | 95-99             
 .../cct/evm/artifacts/bytecode/V2_0_0 |     100 |      100 |     100 |     100 |                   
  burn-from-mint-token-pool.ts         |     100 |      100 |     100 |     100 |                   
  burn-mint-token-pool.ts              |     100 |      100 |     100 |     100 |                   
  burn-with-from-mint-token-pool.ts    |     100 |      100 |     100 |     100 |                   
  cross-chain-token.ts                 |     100 |      100 |     100 |     100 |                   
  erc20-lockbox.ts                     |     100 |      100 |     100 |     100 |                   
  lock-release-token-pool.ts           |     100 |      100 |     100 |     100 |                   
 ccip-sdk/src/cct/evm/lockbox          |     100 |      100 |     100 |     100 |                   
  contracts.ts                         |     100 |      100 |     100 |     100 |                   
 ...sdk/src/cct/evm/lockbox/operations |     100 |      100 |     100 |     100 |                   
  authorize-callers.ts                 |     100 |      100 |     100 |     100 |                   
  deploy-lockbox.ts                    |     100 |      100 |     100 |     100 |                   
 ccip-sdk/src/cct/evm/token            |   99.36 |    76.66 |     100 |   99.36 |                   
  contracts.ts                         |   99.36 |    76.66 |     100 |   99.36 | 223-224           
 ...k/src/cct/evm/token-admin-registry |     100 |      100 |     100 |     100 |                   
  contracts.ts                         |     100 |      100 |     100 |     100 |                   
 ...vm/token-admin-registry/operations |     100 |      100 |     100 |     100 |                   
  accept-admin.ts                      |     100 |      100 |     100 |     100 |                   
  get-supported-tokens.ts              |     100 |      100 |     100 |     100 |                   
  get-token-admin-registry.ts          |     100 |      100 |     100 |     100 |                   
  register-admin.ts                    |     100 |      100 |     100 |     100 |                   
  set-pool.ts                          |     100 |      100 |     100 |     100 |                   
  transfer-admin.ts                    |     100 |      100 |     100 |     100 |                   
 ccip-sdk/src/cct/evm/token-pool       |     100 |    99.06 |     100 |     100 |                   
  contracts.ts                         |     100 |    98.59 |     100 |     100 | 513               
  rate-limit.ts                        |     100 |      100 |     100 |     100 |                   
  remote-pool.ts                       |     100 |      100 |     100 |     100 |                   
 .../src/cct/evm/token-pool/operations |   99.67 |    96.28 |     100 |   99.67 |                   
  accept-pool-ownership.ts             |     100 |      100 |     100 |     100 |                   
  add-remote-pool.ts                   |     100 |      100 |     100 |     100 |                   
  apply-allowlist-updates.ts           |     100 |    96.29 |     100 |     100 | 229               
  apply-chain-updates.ts               |     100 |      100 |     100 |     100 |                   
  ...en-transfer-fee-config-updates.ts |   98.17 |     93.1 |     100 |   98.17 | 160-163           
  deploy-token-pool.ts                 |     100 |    85.71 |     100 |     100 | 83-86             
  get-allowed-finality-config.ts       |     100 |      100 |     100 |     100 |                   
  get-dynamic-config.ts                |     100 |      100 |     100 |     100 |                   
  get-fee.ts                           |     100 |     90.9 |     100 |     100 | 56                
  get-rebalancer.ts                    |     100 |      100 |     100 |     100 |                   
  get-token-pool-remotes.ts            |     100 |      100 |     100 |     100 |                   
  get-token-pool-state.ts              |   98.61 |       95 |     100 |   98.61 | 282-285           
  get-token-transfer-fee-config.ts     |   94.79 |    57.14 |     100 |   94.79 | 63,66-69          
  provide-liquidity.ts                 |     100 |      100 |     100 |     100 |                   
  remove-remote-pool.ts                |     100 |      100 |     100 |     100 |                   
  set-allowed-finality-config.ts       |     100 |      100 |     100 |     100 |                   
  set-chain-rate-limiter-configs.ts    |     100 |    97.05 |     100 |     100 | 112               
  set-dynamic-config.ts                |     100 |      100 |     100 |     100 |                   
  set-rate-limit-admin.ts              |     100 |      100 |     100 |     100 |                   
  set-rebalancer.ts                    |     100 |      100 |     100 |     100 |                   
  set-remote-pool.ts                   |     100 |      100 |     100 |     100 |                   
  transfer-liquidity.ts                |     100 |      100 |     100 |     100 |                   
  transfer-pool-ownership.ts           |     100 |      100 |     100 |     100 |                   
  withdraw-fee-tokens.ts               |     100 |      100 |     100 |     100 |                   
  withdraw-liquidity.ts                |     100 |      100 |     100 |     100 |                   
 ccip-sdk/src/cct/evm/token/operations |     100 |      100 |     100 |     100 |                   
  accept-token-ownership.ts            |     100 |      100 |     100 |     100 |                   
  approve-token.ts                     |     100 |      100 |     100 |     100 |                   
  deploy-token.ts                      |     100 |      100 |     100 |     100 |                   
  get-burners.ts                       |     100 |      100 |     100 |     100 |                   
  get-minters.ts                       |     100 |      100 |     100 |     100 |                   
  grant-burn-role.ts                   |     100 |      100 |     100 |     100 |                   
  grant-mint-and-burn-roles.ts         |     100 |      100 |     100 |     100 |                   
  grant-mint-role.ts                   |     100 |      100 |     100 |     100 |                   
  is-burner.ts                         |     100 |      100 |     100 |     100 |                   
  is-minter.ts                         |     100 |      100 |     100 |     100 |                   
  mint.ts                              |     100 |      100 |     100 |     100 |                   
  revoke-burn-role.ts                  |     100 |      100 |     100 |     100 |                   
  revoke-mint-role.ts                  |     100 |      100 |     100 |     100 |                   
  transfer-token-ownership.ts          |     100 |      100 |     100 |     100 |                   
 ccip-sdk/src/cct/solana               |   99.74 |    97.08 |   98.03 |   99.74 |                   
  index.ts                             |   99.67 |      100 |   97.22 |   99.67 | 258-259,2428-2433 
  operation.ts                         |     100 |      100 |     100 |     100 |                   
  query.ts                             |     100 |      100 |     100 |     100 |                   
  serialize.ts                         |     100 |     92.3 |     100 |     100 | 27                
  submit.ts                            |     100 |    81.81 |     100 |     100 | 31,48,53,72       
  validate.ts                          |     100 |     98.4 |     100 |     100 | 288,395           
 ccip-sdk/src/cct/solana/programs      |     100 |      100 |     100 |     100 |                   
  alt.ts                               |     100 |      100 |     100 |     100 |                   
  fee-quoter.ts                        |     100 |      100 |     100 |     100 |                   
  router.ts                            |     100 |      100 |     100 |     100 |                   
  token-pool.ts                        |     100 |      100 |     100 |     100 |                   
  token.ts                             |     100 |      100 |     100 |     100 |                   
 ccip-sdk/src/cct/solana/token         |     100 |      100 |     100 |     100 |                   
  constants.ts                         |     100 |      100 |     100 |     100 |                   
 ...rc/cct/solana/token-admin-registry |     100 |      100 |     100 |     100 |                   
  constants.ts                         |     100 |      100 |     100 |     100 |                   
 ...na/token-admin-registry/operations |   99.61 |    98.75 |     100 |   99.61 |                   
  accept-admin.ts                      |     100 |      100 |     100 |     100 |                   
  append-to-lookup-table.ts            |     100 |      100 |     100 |     100 |                   
  create-lookup-table.ts               |     100 |      100 |     100 |     100 |                   
  get-supported-tokens.ts              |     100 |      100 |     100 |     100 |                   
  get-token-admin-registry.ts          |     100 |      100 |     100 |     100 |                   
  index.ts                             |     100 |      100 |     100 |     100 |                   
  ...override-pending-administrator.ts |     100 |      100 |     100 |     100 |                   
  register-admin.ts                    |   97.95 |    94.44 |     100 |   97.95 | 212-216           
  set-pool.ts                          |     100 |      100 |     100 |     100 |                   
  transfer-admin.ts                    |     100 |      100 |     100 |     100 |                   
 ...c/cct/solana/token-pool/operations |   99.63 |    98.49 |     100 |   99.63 |                   
  accept-ownership.ts                  |     100 |      100 |     100 |     100 |                   
  append-remote-pool-addresses.ts      |     100 |      100 |     100 |     100 |                   
  apply-chain-updates.ts               |     100 |    98.43 |     100 |     100 | 149               
  configure-allowlist.ts               |     100 |      100 |     100 |     100 |                   
  create-token-multisig.ts             |    95.9 |     92.5 |     100 |    95.9 | ...01-102,104-109 
  delete-chain-remote-config.ts        |     100 |      100 |     100 |     100 |                   
  deploy-token-pool.ts                 |     100 |      100 |     100 |     100 |                   
  edit-chain-remote-config.ts          |     100 |      100 |     100 |     100 |                   
  get-token-pool-remotes.ts            |     100 |      100 |     100 |     100 |                   
  get-token-pool-state.ts              |     100 |      100 |     100 |     100 |                   
  index.ts                             |     100 |      100 |     100 |     100 |                   
  init-chain-remote-config.ts          |     100 |      100 |     100 |     100 |                   
  provide-liquidity.ts                 |     100 |      100 |     100 |     100 |                   
  remove-from-allowlist.ts             |     100 |      100 |     100 |     100 |                   
  set-can-accept-liquidity.ts          |     100 |      100 |     100 |     100 |                   
  set-chain-rate-limit.ts              |   99.11 |    96.15 |     100 |   99.11 | 64-65             
  set-rate-limit-admin.ts              |     100 |      100 |     100 |     100 |                   
  set-rebalancer.ts                    |     100 |      100 |     100 |     100 |                   
  transfer-ownership.ts                |     100 |      100 |     100 |     100 |                   
  withdraw-liquidity.ts                |     100 |      100 |     100 |     100 |                   
 ...dk/src/cct/solana/token/operations |     100 |    98.39 |     100 |     100 |                   
  approve-token.ts                     |     100 |      100 |     100 |     100 |                   
  create-token-account.ts              |     100 |      100 |     100 |     100 |                   
  deploy-token.ts                      |     100 |      100 |     100 |     100 |                   
  get-token-info.ts                    |     100 |       70 |     100 |     100 | 69,80-81          
  index.ts                             |     100 |      100 |     100 |     100 |                   
  mint-tokens.ts                       |     100 |      100 |     100 |     100 |                   
  set-token-authority.ts               |     100 |      100 |     100 |     100 |                   
  update-metadata-authority.ts         |     100 |      100 |     100 |     100 |                   
 ccip-sdk/src/errors                   |    90.5 |    77.39 |   59.85 |    90.5 |                   
  CCIPError.ts                         |     100 |      100 |     100 |     100 |                   
  codes.ts                             |     100 |      100 |     100 |     100 |                   
  index.ts                             |     100 |      100 |     100 |     100 |                   
  pure.ts                              |     100 |       75 |     100 |     100 | 32                
  recovery.ts                          |     100 |      100 |     100 |     100 |                   
  specialized.ts                       |   88.34 |    74.24 |   57.69 |   88.34 | ...3664,3687-3696 
  utils.ts                             |   94.44 |    81.48 |     100 |   94.44 | 15,17,22,24       
 ccip-sdk/src/evm                      |   92.79 |    82.11 |   93.16 |   92.79 |                   
  const.ts                             |   98.66 |    92.85 |     100 |   98.66 | 122-123           
  errors.ts                            |   91.98 |    81.57 |     100 |   91.98 | ...85,239-242,247 
  extra-args.ts                        |    94.5 |    61.01 |     100 |    94.5 | ...11-212,328-340 
  fork.test.data.ts                    |     100 |      100 |     100 |     100 |                   
  gas.ts                               |   98.19 |    63.15 |     100 |   98.19 | 90-91,93          
  hasher.ts                            |     100 |     92.3 |     100 |     100 | 135               
  index.ts                             |   88.17 |       80 |    90.9 |   88.17 | ...2725,2880-2911 
  logs.ts                              |   99.16 |    92.02 |      90 |   99.16 | 69-70,75-76       
  messageCodec.ts                      |     100 |      100 |     100 |     100 |                   
  messages.ts                          |     100 |      100 |     100 |     100 |                   
  offchain.ts                          |    87.5 |    71.42 |     100 |    87.5 | 13-14             
  simulate.ts                          |     100 |    94.82 |     100 |     100 | 109-111,425       
  types.ts                             |     100 |      100 |     100 |     100 |                   
 ccip-sdk/src/evm/viem                 |   79.76 |    90.62 |   69.23 |   79.76 |                   
  client-adapter.ts                    |     100 |       90 |     100 |     100 | 48,74             
  index.ts                             |     100 |      100 |     100 |     100 |                   
  wallet-adapter.ts                    |   63.09 |     90.9 |   55.55 |   63.09 | ...91-124,131-157 
 ccip-sdk/src/hasher                   |   94.29 |    78.94 |     100 |   94.29 |                   
  common.ts                            |     100 |      100 |     100 |     100 |                   
  hasher.ts                            |     100 |    66.66 |     100 |     100 | 19                
  index.ts                             |     100 |      100 |     100 |     100 |                   
  merklemulti.ts                       |   93.43 |       78 |     100 |   93.43 | ...06-307,315-316 
 ccip-sdk/src/shared                   |   85.32 |    84.33 |   82.35 |   85.32 |                   
  bcs-codecs.ts                        |   79.07 |    60.86 |   66.66 |   79.07 | ...42-252,260-269 
  codec.ts                             |    94.3 |    93.22 |     100 |    94.3 | 139-140,178-186   
  constants.ts                         |     100 |      100 |     100 |     100 |                   
 ccip-sdk/src/solana                   |   82.89 |       76 |    87.8 |   82.89 |                   
  cleanup.ts                           |   26.95 |    66.66 |   33.33 |   26.95 | ...59-101,114-227 
  exec.ts                              |   69.11 |    62.96 |   66.66 |   69.11 | ...69-473,513-514 
  extra-args.ts                        |   59.49 |    76.47 |      60 |   59.49 | 86-122,132-190    
  fork.test.data.ts                    |     100 |      100 |     100 |     100 |                   
  gas.ts                               |   92.06 |    68.57 |     100 |   92.06 | ...,81-90,170-171 
  hasher.ts                            |   96.49 |    81.81 |     100 |   96.49 | 64-67             
  index.ts                             |   87.23 |    77.01 |   90.74 |   87.23 | ...2129,2133-2166 
  logs.ts                              |   90.11 |     80.7 |     100 |   90.11 | ...50-151,163-164 
  offchain.ts                          |     100 |      100 |     100 |     100 |                   
  patchBorsh.ts                        |   78.31 |       50 |     100 |   78.31 | ...47,65-66,72-78 
  send.ts                              |    95.7 |    53.48 |     100 |    95.7 | ...03,346-347,421 
  signatures-cache.ts                  |   79.78 |    71.15 |    87.5 |   79.78 | ...51-260,274-275 
  token-admin-registry.ts              |     100 |    96.29 |     100 |     100 | 27                
  types.ts                             |     100 |      100 |     100 |     100 |                   
  utils.ts                             |   82.28 |    76.92 |   85.71 |   82.28 | ...91,661,733-744 
  v1.ts                                |   94.17 |    83.72 |     100 |   94.17 | ...02-105,186-189 
 ccip-sdk/src/sui                      |   73.26 |     70.7 |   81.14 |   73.26 |                   
  discovery.ts                         |   47.37 |    48.27 |      60 |   47.37 | ...34-782,785-819 
  events.ts                            |   90.35 |    72.98 |     100 |   90.35 | ...22-625,685-698 
  exec.ts                              |   30.71 |      100 |       0 |   30.71 | 37-89,101-153     
  hasher.ts                            |   98.19 |    66.66 |     100 |   98.19 | 35,51             
  index.ts                             |   76.12 |    70.39 |   79.68 |   76.12 | ...2314,2330-2331 
  logs.ts                              |   97.89 |    74.02 |     100 |   97.89 | ...62-165,186-187 
  objects.ts                           |    54.6 |    83.33 |   83.33 |    54.6 | ...57-313,324-467 
  types.ts                             |     100 |      100 |     100 |     100 |                   
 ccip-sdk/src/sui/manuallyExec         |   53.36 |       75 |      50 |   53.36 |                   
  encoder.ts                           |    83.9 |    66.66 |     100 |    83.9 | 51-58,73-77,82    
  index.ts                             |   33.82 |      100 |       0 |   33.82 | 47-136            
 ccip-sdk/src/ton                      |   86.42 |    81.36 |   88.54 |   86.42 |                   
  exec.ts                              |     100 |      100 |     100 |     100 |                   
  extra-args.ts                        |   98.66 |    72.72 |     100 |   98.66 | 156-157,222       
  hasher.ts                            |   78.07 |    77.77 |      75 |   78.07 | 100-108,156-187   
  index.ts                             |    85.5 |    80.68 |   79.68 |    85.5 | ...2205,2212-2213 
  logs.ts                              |    94.2 |    84.43 |     100 |    94.2 | ...17-624,680-683 
  send.ts                              |   95.52 |    66.66 |     100 |   95.52 | 37-44,188         
  ton-cache.ts                         |     100 |    96.55 |     100 |     100 | 102               
  types.ts                             |   91.24 |    81.25 |     100 |   91.24 | ...61-63,71-74,92 
  utils.ts                             |   63.71 |    78.57 |    90.9 |   63.71 | ...37-395,397-400 
 scripts                               |   88.49 |    65.82 |     100 |   88.49 |                   
  test-endpoints.ts                    |   97.35 |    77.77 |     100 |   97.35 | 143-145,187-188   
  useResource.ts                       |   83.57 |    62.29 |     100 |   83.57 | ...81-286,301-302 
---------------------------------------|---------|----------|---------|---------|-------------------

@stackman27
stackman27 marked this pull request as ready for review September 16, 2026 01:04
@stackman27
stackman27 requested a review from a team as a code owner September 16, 2026 01:04
@stackman27 stackman27 changed the title canton sdk (feat): canton cct sdk Sep 16, 2026
@stackman27 stackman27 changed the title (feat): canton cct sdk feat: canton cct sdk for registry pools Sep 16, 2026

@RodrigoAD RodrigoAD left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments. The cct/canton is quite big, I couldn't go through all.

As a general comment, let's please reduce the verbosity of the comments.

@@ -0,0 +1,191 @@
/**

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should move these scripts somewhere else. If it's only for local testing, let's remove them. If they are useful for testing, we can convert them in integration tests. If useful for users, we can turn them into documentation

@stackman27 stackman27 Sep 16, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping these as user-facing examples/docs rather than removing or converting to integration tests, I think this is genuinely useful reference material for integrating via the Wallet Gateway, not just local scratch scripts

Comment thread ccip-sdk/CCT_CANTON_INTEGRATION.md Outdated
@@ -0,0 +1,51 @@
# CCT Canton SDK — integration guide

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considering we can't keep the previous scripts, I don't think these docs make too much sense

* method. Returns a function with the standard `fetch` signature so it can be
* passed straight to `CantonChain.fromUrl({ fetch })` / `createCantonClient`.
*/
export function createGatewayLedgerFetch(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only used by the new scripts. do we really need it?

If we do, let's please refactor it, it has many weird implementation decisions (jsonRpcId counter, the hardcoded /livez response...)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kept it (examples still need it), refactored both issues: jsonRpcId is now per-instance instead of module-global, and /livez genuinely round-trips through the gateway instead of faking a 200

*
* LocalNet/DevNet have no stable deployments — pass explicit overrides there.
*/
export const CANTON_NETWORKS: Readonly<Record<string, CantonNetworkConfig>> = {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should avoid hardcoded addresses or URLs. I see it's only used in a test, but why would we test against testnet or mainnet? I think we should remove this

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not test-only, and not a live-network test either: getCantonNetworkConfig('canton:TestNet') is just an in-memory lookup on the CANTON_NETWORKS table, and resolvePoolFactoryDeps uses it in
real production code to default deployTokenPool's deps on known networks.

Removing it would force every caller to pass tokenAdminRegistry/feeQuoter/rmnRemote explicitly, even on TestNet/MainNet. I'd rather keep it

* to return every active contract of the template.
* @returns All matching active contracts (may be empty).
*/
async findActiveContractsByTemplate(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is almost a duplicate of findActiveContractByTemplate. Let's reuse it here

Comment thread ccip-sdk/src/canton/index.ts Outdated
* @param caller - Acting party (`actAs`).
* @returns The raw `exerciseResult` value, or `null` if no matching exercised event.
*/
async submitReadChoice(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No callers of this one. We can remove it?

Comment thread ccip-sdk/src/canton/index.ts Outdated
* @param match - Predicate over the decoded `createArgument` record.
* @returns The first matching active contract, or `null` if none match.
*/
async findActiveContractByTemplate(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't used either

Comment thread ccip-sdk/src/canton/index.ts Outdated
* 3. Execute the signed transaction (`/v2/interactive-submission/executeAndWaitForTransaction`).
*/
private async submitCommands(
async submitCommands(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making this public allows users to send arbitrary txs, allowing them to bypass validations for the execute/send commands, and making the SDK surface way bigger and confusing. Let's make it private again. We can extract the logic somewhere else if needs to be reused

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extracted it into a standalone submitCantonCommands() function so CantonChain no longer exposes it at all, while operation.ts (which needed cross-module access) can still call the same logic

Comment thread ccip-sdk/src/cct/canton/index.ts Outdated

/** Atomically deploys and initializes a `BurnMintTokenPool`/`LockReleaseTokenPool` (registry-pools family). */
async deployTokenPool(opts: ExecuteDeployTokenPoolParams): Promise<ExecuteDeployTokenPoolResult> {
return this.#deployTokenPool.execute(this.chain, opts) as Promise<ExecuteDeployTokenPoolResult>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't do these types of casting. It's false that the response has a poolCid field declared. It happens more time in this class

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed, DeployTokenPool/ApplyChainUpdates now override execute() to actually extract poolCid (and rateLimiterCids/tokenConfigCid/poolInstanceAddress) from the transaction response, throwing if the ledger didn't produce what's expected

if (!contract?.contractId || !contract.createdEventBlob) return null
return edsContractToSdk(contract)
} catch {
return null

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's return the error here instead

*/
export function normalizeRemoteAddress(s: string): string {
const bare = s.startsWith('0x') ? s.slice(2) : s
return bare.length === 40 ? bare.padStart(64, '0') : bare

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't guarantee 32 B if we pass any different than 20 B (40 char)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed, now always pads to 32 bytes and throws on non-hex or >32B input instead of passing through

},
},
],
commandId: `cct-deploy-${p.poolType}-pool-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
commandId: `cct-deploy-${p.poolType}-pool-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
commandId: `cct-deploy-${p.poolType}-pool-${randomUUID()}`,

I see many places with this logic. If there's some concurrency, this could cause some collision. I'd recommend using randomUUID for it. You do it already in tests

): Promise<CantonActiveContract | null> {
return contract && instanceAddress === RL_INSTANCE_ADDRESS ? contract : null
},
} as unknown as CantonChain

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't do this. Why doesn't as CantonChain work? Let's fix that instead

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed, mocks now build a real instance via Object.assign(Object.create(CantonChain.prototype), {...}), no cast anywhere (as CantonChain can't work since the class has private fields)

This branch was successfully deployed

1 active deployment
Preview c26f6f2c Deployed Sep 22, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants