Skip to content

BPS fees in tokenPoolConfig + "estimate all fees" preflight check#166

Open
PabloMansanet wants to merge 7 commits intomainfrom
token-transfer-fee
Open

BPS fees in tokenPoolConfig + "estimate all fees" preflight check#166
PabloMansanet wants to merge 7 commits intomainfrom
token-transfer-fee

Conversation

@PabloMansanet
Copy link
Collaborator

@PabloMansanet PabloMansanet commented Mar 5, 2026

No description provided.

@PabloMansanet PabloMansanet requested a review from a team as a code owner March 5, 2026 13:25
@vercel
Copy link

vercel bot commented Mar 5, 2026

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

Project Deployment Actions Updated (UTC)
ccip-tools-ts Ready Ready Preview, Comment Mar 12, 2026 0:41am

Request Review

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

👋 PabloMansanet, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

Coverage Report

ℹ tests 760
ℹ suites 220
ℹ pass 758
ℹ fail 0
ℹ cancelled 0
ℹ skipped 2
ℹ todo 0
ℹ duration_ms 70257.114782

> @chainlink/ccip-cli@1.2.0 test
> node --test

▶ lane-latency command
  ✔ should output JSON format correctly (5.190418ms)
  ✔ should resolve chain IDs to chain selectors (0.815987ms)
  ✔ should use custom API URL when provided (1.003044ms)
  ✔ should output log format correctly (0.837056ms)
  ✔ should handle chain IDs as input (0.679042ms)
  ✔ should handle chain selectors as input (1.375206ms)
  ✔ should throw CCIPApiClientNotAvailableError when --no-api flag is set (1.238672ms)
  ✔ should work normally when --no-api flag is false (0.86612ms)
  ✔ should forward blockConfirmations to API URL (0.986173ms)
  ✔ should not include numOfBlocks when blockConfirmations is not provided (1.14043ms)
  ▶ CCIP_API environment variable integration
    ✔ should respect CCIP_API=false environment variable (0.589256ms)
  ✔ CCIP_API environment variable integration (1.087922ms)
✔ lane-latency command (17.301288ms)
▶ e2e command show EVM
  ▶ pretty format (default)
    ✔ should show complete CCIP transaction details EVM to EVM (10003.542381ms)
  ✔ pretty format (default) (10004.736189ms)
  ▶ json format
    ✔ should output valid JSON with all expected fields (8358.836549ms)
  ✔ json format (8359.112734ms)
  ▶ log format
    ✔ should output in log format with object assignments (7125.237993ms)
  ✔ log format (7125.467239ms)
  ▶ verbose flag
    ✔ should work with verbose flag enabled (14548.970387ms)
  ✔ verbose flag (14549.236623ms)
  ▶ error handling
    ✔ should handle invalid transaction hash gracefully (19294.269756ms)
    ✔ should require transaction hash argument (1608.854849ms)
  ✔ error handling (20903.434261ms)
  ✔ should show complete CCIP transaction details EVM to Aptos (6432.137357ms)
  ✔ should show complete CCIP transaction details EVM to Solana (5746.627374ms)
✔ e2e command show EVM (73125.100039ms)
▶ e2e command show Solana
  ✔ should show complete CCIP transaction details Solana to EVM (6320.905326ms)
✔ e2e command show Solana (6321.167474ms)
▶ e2e command show Aptos
  ✔ should show complete CCIP transaction details Aptos to EVM (11210.235233ms)
✔ e2e command show Aptos (11210.409206ms)
﹣ e2e command show TON (0.057017ms) # SKIP
▶ formatCCIPError
  ✔ should return null for non-CCIPError instances (1.528722ms)
  ✔ should format CCIPError with code and message (0.614252ms)
  ✔ should include help section with recovery hint (0.21012ms)
  ✔ should include note section for transient errors (0.604373ms)
  ✔ should include retry timing for transient errors with retryAfterMs (0.34467ms)
  ✔ should not include note section for permanent errors (0.224427ms)
  ✔ should format error with structured output (0.563767ms)
  ✔ should include stack trace when verbose is true (0.667912ms)
  ✔ should not include stack trace when verbose is false (2.360708ms)
✔ formatCCIPError (9.763958ms)
ℹ tests 30
ℹ suites 12
ℹ pass 30
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 90877.155281
-------------------------------|---------|----------|---------|---------|---------------------------
File                           | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s         
-------------------------------|---------|----------|---------|---------|---------------------------
All files                      |   72.91 |    77.84 |   58.91 |   72.91 |                           
 ccip-cli/src                  |   89.18 |       80 |      50 |   89.18 |                           
  index.ts                     |   89.18 |       80 |      50 |   89.18 | 50-52,63-64,87-91,97-98   
 ccip-cli/src/commands         |   52.84 |     72.3 |   53.84 |   52.84 |                           
  index.ts                     |     100 |      100 |     100 |     100 |                           
  lane-latency.ts              |   72.56 |     90.9 |   33.33 |   72.56 | 41-56,63-70,105-111       
  manual-exec.ts               |   26.43 |      100 |       0 |   26.43 | 61-114,121-131,133-259    
  parse.ts                     |   57.14 |      100 |       0 |   57.14 | 46-50,57-64,66-91         
  send.ts                      |    16.7 |      100 |       0 |    16.7 | ...70-177,187-216,218-407 
  show.ts                      |   88.76 |     62.5 |      60 |   88.76 | ...78-180,189-190,230-231 
  supported-tokens.ts          |   20.64 |      100 |       0 |   20.64 | ...99-209,211-266,268-281 
  token.ts                     |   22.72 |      100 |       0 |   22.72 | 24-53,60-67,69-132        
  types.ts                     |     100 |      100 |     100 |     100 |                           
  utils.ts                     |   85.29 |    73.38 |    92.3 |   85.29 | ...85-595,603-611,621-627 
 ccip-cli/src/providers        |    51.9 |    75.51 |      16 |    51.9 |                           
  aptos.ts                     |   53.65 |      100 |       0 |   53.65 | ...70,78-85,91-92,101-123 
  evm.ts                       |    39.7 |      100 |       0 |    39.7 | 23,40-50,56-85,97-136     
  index.ts                     |   81.65 |    72.72 |      80 |   81.65 | 50-51,190-229             
  solana.ts                    |   50.42 |      100 |       0 |   50.42 | ...-71,79-85,89-90,99-117 
  sui.ts                       |   64.28 |      100 |       0 |   64.28 | 10-14                     
  ton.ts                       |   14.58 |      100 |       0 |   14.58 | 22-144                    
 ccip-sdk/src                  |   94.46 |    82.24 |    93.5 |   94.46 |                           
  chain.ts                     |   93.31 |    80.28 |      75 |   93.31 | ...92,1536-1537,1635-1636 
  commits.ts                   |     100 |    94.73 |     100 |     100 | 52                        
  execution.ts                 |   92.19 |     92.3 |     100 |   92.19 | 130-137,149-156           
  explorer.ts                  |     100 |      100 |     100 |     100 |                           
  extra-args.ts                |     100 |    86.66 |     100 |     100 | 179,214                   
  gas.ts                       |   89.69 |       40 |     100 |   89.69 | 107-118,146-150           
  http-status.ts               |     100 |      100 |     100 |     100 |                           
  index.ts                     |     100 |      100 |     100 |     100 |                           
  messages.ts                  |   88.48 |    45.09 |     100 |   88.48 | ...19-220,229-230,254-255 
  offchain.ts                  |   92.97 |    83.78 |     100 |   92.97 | ...37,157,172-174,176-182 
  requests.ts                  |   90.87 |    81.65 |     100 |   90.87 | ...64-368,433-434,438-439 
  supported-chains.ts          |     100 |      100 |     100 |     100 |                           
  types.ts                     |     100 |      100 |     100 |     100 |                           
  utils.ts                     |   96.42 |     90.7 |     100 |   96.42 | ...76,740-741,757,822-830 
 ccip-sdk/src/api              |   93.52 |    84.12 |   94.11 |   93.52 |                           
  index.ts                     |   93.52 |    84.12 |   94.11 |   93.52 | ...40-745,756-759,762-765 
 ccip-sdk/src/aptos            |   56.49 |    69.69 |   56.66 |   56.49 |                           
  exec.ts                      |   29.31 |      100 |       0 |   29.31 | 18-58                     
  hasher.ts                    |   76.31 |       80 |   66.66 |   76.31 | 19-38,52-58               
  index.ts                     |      58 |    75.34 |   59.52 |      58 | ...83-721,725-827,831-842 
  logs.ts                      |   78.52 |    57.44 |      75 |   78.52 | ...90-196,200-233,264-268 
  send.ts                      |    25.2 |      100 |       0 |    25.2 | 10-51,62-79,92-123        
  token.ts                     |   23.75 |       75 |     100 |   23.75 | 35-156                    
  types.ts                     |   65.62 |      100 |       0 |   65.62 | 25-32,64-88               
 ccip-sdk/src/errors           |   87.34 |    77.25 |   47.96 |   87.34 |                           
  CCIPError.ts                 |     100 |      100 |     100 |     100 |                           
  codes.ts                     |     100 |      100 |     100 |     100 |                           
  index.ts                     |     100 |      100 |     100 |     100 |                           
  recovery.ts                  |     100 |      100 |     100 |     100 |                           
  specialized.ts               |    84.6 |    72.61 |   45.29 |    84.6 | ...05,3326-3335,3356-3365 
  utils.ts                     |   94.44 |    81.48 |     100 |   94.44 | 15,17,22,24               
 ccip-sdk/src/evm              |   85.71 |    76.11 |   89.74 |   85.71 |                           
  const.ts                     |     100 |      100 |     100 |     100 |                           
  errors.ts                    |   86.42 |    79.22 |     100 |   86.42 | ...12-113,159-161,202-220 
  extra-args.ts                |   94.44 |    62.29 |     100 |   94.44 | ...82-183,208-209,326-338 
  fork.test.data.ts            |     100 |      100 |     100 |     100 |                           
  gas.ts                       |   97.97 |    53.33 |     100 |   97.97 | 72-73,75                  
  hasher.ts                    |     100 |     92.3 |     100 |     100 | 134                       
  index.ts                     |   85.36 |    77.04 |   92.98 |   85.36 | ...19,1884-1900,1926-1933 
  logs.ts                      |   34.32 |    68.42 |      25 |   34.32 | ...13-214,229-258,275-302 
  messages.ts                  |     100 |      100 |     100 |     100 |                           
  offchain.ts                  |   56.25 |      100 |       0 |   56.25 | 10-16                     
  types.ts                     |     100 |      100 |     100 |     100 |                           
 ccip-sdk/src/evm/viem         |   77.72 |       92 |   69.23 |   77.72 |                           
  client-adapter.ts            |     100 |     92.3 |     100 |     100 | 48                        
  index.ts                     |     100 |      100 |     100 |     100 |                           
  wallet-adapter.ts            |   63.09 |     90.9 |   55.55 |   63.09 | ...6,53-73,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 | ...59-260,306-307,315-316 
 ccip-sdk/src/shared           |   88.05 |    69.23 |     100 |   88.05 |                           
  bcs-codecs.ts                |   87.87 |    66.66 |     100 |   87.87 | 75-87,104-106             
  constants.ts                 |     100 |      100 |     100 |     100 |                           
 ccip-sdk/src/solana           |   52.94 |    69.36 |   54.76 |   52.94 |                           
  cleanup.ts                   |   12.22 |      100 |       0 |   12.22 | 29-229                    
  exec.ts                      |    9.43 |      100 |       0 |    9.43 | ...68-343,345-384,386-498 
  hasher.ts                    |   96.58 |    81.81 |     100 |   96.58 | 67-70                     
  index.ts                     |   73.05 |    74.28 |    64.7 |   73.05 | ...15,1519-1543,1547-1568 
  logs.ts                      |   74.19 |    27.27 |     100 |   74.19 | ...,50-51,53-54,56-88,119 
  offchain.ts                  |   62.22 |      100 |       0 |   62.22 | 29-45                     
  patchBorsh.ts                |   65.06 |    57.14 |      75 |   65.06 | 30-49,65-66,72-78         
  send.ts                      |   13.93 |      100 |       0 |   13.93 | ...57-246,259-325,327-366 
  types.ts                     |   74.46 |      100 |       0 |   74.46 | 36-47                     
  utils.ts                     |   54.27 |    77.77 |   54.54 |   54.27 | ...40-353,395-458,464-479 
 ccip-sdk/src/sui              |   32.73 |       90 |   17.24 |   32.73 |                           
  discovery.ts                 |   15.13 |      100 |       0 |   15.13 | 20-36,49-185,188-218      
  events.ts                    |   19.85 |      100 |       0 |   19.85 | ...18-275,280-398,407-428 
  exec.ts                      |   31.29 |      100 |       0 |   31.29 | 31-74,86-131              
  hasher.ts                    |   98.16 |    66.66 |     100 |   98.16 | 33,49                     
  index.ts                     |   40.74 |    93.61 |   17.94 |   40.74 | ...98-799,803-804,808-809 
  objects.ts                   |   18.93 |      100 |       0 |   18.93 | ...04-119,133-184,195-338 
 ccip-sdk/src/sui/manuallyExec |   39.63 |      100 |       0 |   39.63 |                           
  encoder.ts                   |   47.67 |      100 |       0 |   47.67 | 42-86                     
  index.ts                     |   34.35 |      100 |       0 |   34.35 | 46-131                    
 ccip-sdk/src/ton              |   74.33 |    82.62 |   65.75 |   74.33 |                           
  exec.ts                      |     100 |      100 |     100 |     100 |                           
  hasher.ts                    |   77.95 |    77.77 |      75 |   77.95 | 99-107,155-186            
  index.ts                     |   70.33 |    76.98 |   54.34 |   70.33 | ...37,1244-1245,1252-1253 
  logs.ts                      |     100 |    98.43 |     100 |     100 | 56                        
  send.ts                      |   96.39 |    73.91 |     100 |   96.39 | 38-45                     
  types.ts                     |   77.94 |    69.23 |   66.66 |   77.94 | ...-73,91,118-131,133-136 
  utils.ts                     |   60.88 |    83.33 |    87.5 |   60.88 | ...55-261,269-327,329-332 
-------------------------------|---------|----------|---------|---------|---------------------------

@PabloMansanet PabloMansanet changed the title Add getTokenPoolFee method to chain + implement for EVM BPS fees in tokenPoolConfig + "estimate all fees" preflight check Mar 12, 2026
@PabloMansanet PabloMansanet marked this pull request as ready for review March 12, 2026 12:44
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.

1 participant