Skip to content

show: fix api codepath with receipt txHash with >1 execs#249

Merged
andrevmatos merged 1 commit intomainfrom
fix/show_2execTxs
May 6, 2026
Merged

show: fix api codepath with receipt txHash with >1 execs#249
andrevmatos merged 1 commit intomainfrom
fix/show_2execTxs

Conversation

@andrevmatos
Copy link
Copy Markdown
Collaborator

when receipt has multiple execs (e.g. batched execs) and we're showing from API (i.e. messageId provided as entrypoint), filter only execs for current request

when receipt has multiple execs (e.g. batched execs) and we're `show`ing
from API (i.e. messageId provided as entrypoint), filter only execs for
current request
@andrevmatos andrevmatos self-assigned this May 6, 2026
@andrevmatos andrevmatos requested review from a team, PabloMansanet and aelmanaa as code owners May 6, 2026 18:15
@vercel
Copy link
Copy Markdown

vercel Bot commented May 6, 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 May 6, 2026 6:19pm

Request Review

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

👋 andrevmatos, 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
Copy Markdown

github-actions Bot commented May 6, 2026

Coverage Report

ℹ tests 821
ℹ suites 237
ℹ pass 819
ℹ fail 0
ℹ cancelled 0
ℹ skipped 2
ℹ todo 0
ℹ duration_ms 178935.349833

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

Verbose mode enabled
▶ getCtx
  ▶ output — always stdout
    ✔ output.write goes to stdout (1.629142ms)
    ✔ output.table goes to stdout (1.868845ms)
  ✔ output — always stdout (4.882991ms)
  ▶ logger — always stderr
    ✔ logger.info goes to stderr (0.692968ms)
    ✔ logger.warn goes to stderr (0.377861ms)
    ✔ logger.error goes to stderr (0.505383ms)
  ✔ logger — always stderr (1.782083ms)
  ▶ verbose mode
    ✔ logger.debug is a no-op when verbose is false (1.106373ms)
    ✔ logger.debug goes to stderr when verbose is true (1.349069ms)
  ✔ verbose mode (2.780853ms)
  ▶ destroy signal
    ✔ returns a working destroy function (13.434747ms)
    ✔ calling destroy twice does not throw (0.596692ms)
  ✔ destroy signal (14.229828ms)
✔ getCtx (24.466221ms)
▶ lane-latency command
  ✔ should output JSON format correctly (6.595168ms)
  ✔ should resolve chain IDs to chain selectors (3.03655ms)
  ✔ should use custom API URL when provided (1.940653ms)
  ✔ should output log format correctly (1.038931ms)
  ✔ should handle chain IDs as input (1.161416ms)
  ✔ should handle chain selectors as input (0.706237ms)
  ✔ should throw CCIPApiClientNotAvailableError when --no-api flag is set (1.236219ms)
  ✔ should work normally when --no-api flag is false (0.593867ms)
  ✔ should forward blockConfirmations to API URL (0.596722ms)
  ✔ should not include numOfBlocks when blockConfirmations is not provided (0.533236ms)
  ▶ CCIP_API environment variable integration
    ✔ should respect CCIP_API=false environment variable (1.515881ms)
  ✔ CCIP_API environment variable integration (1.940082ms)
✔ lane-latency command (21.592326ms)
▶ selectRequest non-interactive behavior
  ✔ returns the single request without prompting (1.258752ms)
  ✔ returns the request matching logIndex (0.23814ms)
  ✔ throws CCIPInteractiveRequiredError for multiple requests without logIndex (2.41484ms)
✔ selectRequest non-interactive behavior (5.567435ms)
▶ CCIPInteractiveRequiredError
  ✔ has correct code and is not transient (0.306574ms)
  ✔ uses default recovery when none provided (0.326484ms)
  ✔ preserves context fields (0.199682ms)
✔ CCIPInteractiveRequiredError (1.046041ms)
▶ preprocessArgv TTY auto-detection
  ✔ --interactive flag is defined in globalOpts (1.328548ms)
✔ preprocessArgv TTY auto-detection (1.453317ms)
▶ search messages command
  ✔ should throw CCIPApiClientNotAvailableError when --no-api flag is set (2.227417ms)
  ✔ should output JSON format correctly (12.740867ms)
  ✔ should pass sender filter to API (2.555112ms)
  ✔ should pass receiver filter to API (3.560491ms)
  ✔ should resolve source chain to selector (3.90975ms)
  ✔ should resolve dest chain to selector (2.4873ms)
  ✔ should pass manual-exec-only filter to API (3.416414ms)
  ✔ should treat limit 0 as unlimited (7.392664ms)
  ✔ should respect limit parameter (7.910597ms)
  ✔ should warn when no results found (2.013754ms)
  ✔ should use custom API URL when provided (2.895797ms)
  ✔ should warn on negative limit and fall back to default (1.628111ms)
  ✔ should output log format (1.740942ms)
✔ search messages command (56.349942ms)
▶ e2e command show EVM
  ▶ pretty format (default)
    ✔ should show complete CCIP transaction details EVM to EVM (11752.145861ms)
  ✔ pretty format (default) (11754.956669ms)
  ▶ json format
    ✔ should output a single valid JSON envelope with all expected fields (9256.012952ms)
  ✔ json format (9256.294837ms)
  ▶ log format
    ✔ should output in log format with object assignments (9251.341268ms)
  ✔ log format (9251.616744ms)
  ▶ verbose flag
    ✔ should work with verbose flag enabled (10577.72716ms)
  ✔ verbose flag (10577.940151ms)
  ▶ error handling
    ✔ should handle invalid transaction hash gracefully (9656.293517ms)
    ✔ should require transaction hash argument (1686.094353ms)
  ✔ error handling (11342.678057ms)
  ✔ should show complete CCIP transaction details EVM to Aptos (14349.202889ms)
  ✔ should show complete CCIP transaction details EVM to Solana (6417.35999ms)
✔ e2e command show EVM (72951.459941ms)
▶ e2e command show Solana
  ✔ should show complete CCIP transaction details Solana to EVM (9854.719261ms)
✔ e2e command show Solana (9854.987326ms)
▶ e2e command show Aptos
  ✔ should show complete CCIP transaction details Aptos to EVM (8821.072909ms)
✔ e2e command show Aptos (8821.249617ms)
﹣ e2e command show TON (0.060081ms) # SKIP
▶ formatCCIPError
  ✔ should return null for non-CCIPError instances (1.609313ms)
  ✔ should format CCIPError with code and message (0.645977ms)
  ✔ should include help section with recovery hint (0.42339ms)
  ✔ should include note section for transient errors (0.372653ms)
  ✔ should include retry timing for transient errors with retryAfterMs (0.539946ms)
  ✔ should not include note section for permanent errors (0.275907ms)
  ✔ should format error with structured output (0.295497ms)
  ✔ should include stack trace when verbose is true (0.488708ms)
  ✔ should not include stack trace when verbose is false (1.082557ms)
✔ formatCCIPError (7.822544ms)
▶ yieldResolved
  ✔ throws if a promise rejects while the generator is paused after a yield (12.615007ms)
✔ yieldResolved (12.842451ms)
▶ fetchChainsFromRpcs
  ✔ lets duplicate tx-hash race endpoints query before aborting losers (18.880177ms)
  ✔ chainGetter: returns chain from first winning endpoint and destroys late arrivals (51.298908ms)
  ✔ chainGetter: resolves a pending request once the endpoint connects (Branch 2) (21.462189ms)
  ✔ chainGetter: rejects with CCIPRpcNotFoundError when all endpoints fail to connect (1.331713ms)
  ✔ chainGetter: rejects immediately with CCIPRpcNotFoundError once family is already exhausted (0.708971ms)
  ✔ txHash: rejects with CCIPTransactionNotFoundError when tx not on any chain (0.955795ms)
  ✔ txHash: Branch-4 (txOnlyRacer) is destroyed via catch when it loses the tx race (10.069029ms)
  ✔ txHash: chain connecting after txFoundIn is set is immediately destroyed without calling getTransaction (24.495044ms)
  ✔ txHash: Branch-2 chain given to a pending chainGetter is NOT destroyed when it cannot find the tx (12.80224ms)
  ✔ txFoundIn shared across families: SVM txOnlyRacer is destroyed after EVM wins (34.098529ms)
✔ fetchChainsFromRpcs (177.827643ms)
ℹ tests 70
ℹ suites 23
ℹ pass 70
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 94032.399112
---------------------------------------|---------|----------|---------|---------|-------------------
File                                   | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
---------------------------------------|---------|----------|---------|---------|-------------------
All files                              |   73.08 |    76.74 |   58.79 |   73.08 |                   
 ccip-cli/src                          |   89.59 |    61.53 |      75 |   89.59 |                   
  index.ts                             |   89.59 |    61.53 |      75 |   89.59 | ...58-159,165-170 
 ccip-cli/src/commands                 |   51.21 |    72.58 |   58.18 |   51.21 |                   
  index.ts                             |     100 |      100 |     100 |     100 |                   
  lane-latency.ts                      |   72.56 |     90.9 |   33.33 |   72.56 | ...,63-70,105-111 
  manual-exec.ts                       |   23.02 |      100 |       0 |   23.02 | ...28-138,140-302 
  parse.ts                             |   57.14 |      100 |       0 |   57.14 | 46-50,57-64,66-91 
  search.ts                            |   81.25 |      100 |       0 |   81.25 | 24-29             
  send.ts                              |   14.93 |      100 |       0 |   14.93 | ...89-220,222-462 
  show.ts                              |   76.71 |    61.97 |     100 |   76.71 | ...86-289,317-318 
  supported-tokens.ts                  |   16.95 |      100 |       0 |   16.95 | ...59-333,335-348 
  token.ts                             |   22.72 |      100 |       0 |   22.72 | ...3,60-67,69-132 
  types.ts                             |     100 |      100 |     100 |     100 |                   
  utils.ts                             |   87.72 |    74.68 |   96.42 |   87.72 | ...02-612,620-628 
 ccip-cli/src/commands/search          |   49.19 |    82.85 |    12.5 |   49.19 |                   
  messages.ts                          |   49.19 |    82.85 |    12.5 |   49.19 | ...89-211,213-248 
 ccip-cli/src/providers                |   50.05 |    84.84 |   19.23 |   50.05 |                   
  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                             |   80.23 |     83.6 |   83.33 |   80.23 | ...40-142,209-253 
  solana.ts                            |   47.44 |      100 |       0 |   47.44 | ...02-103,112-137 
  sui.ts                               |   64.28 |      100 |       0 |   64.28 | 10-14             
  ton.ts                               |   15.03 |      100 |       0 |   15.03 | 24-153            
 ccip-sdk/src                          |   95.25 |    81.39 |   93.33 |   95.25 |                   
  chain.ts                             |   94.21 |    77.27 |   72.72 |   94.21 | ...1758,1791-1792 
  commits.ts                           |     100 |    95.23 |     100 |     100 | 54                
  execution.ts                         |   92.19 |     92.3 |     100 |   92.19 | 130-137,149-156   
  explorer.ts                          |     100 |      100 |     100 |     100 |                   
  extra-args.ts                        |     100 |    89.47 |     100 |     100 | 213,248,285,300   
  gas.ts                               |   89.17 |    38.46 |     100 |   89.17 | ...70-174,189-190 
  http-status.ts                       |     100 |      100 |     100 |     100 |                   
  index.ts                             |     100 |      100 |     100 |     100 |                   
  messages.ts                          |   88.53 |    45.09 |     100 |   88.53 | ...30-231,255-256 
  offchain.ts                          |   94.14 |    79.54 |     100 |   94.14 | ...23-225,234-235 
  requests.ts                          |   94.63 |    82.25 |     100 |   94.63 | ...92-293,359-361 
  supported-chains.ts                  |     100 |      100 |     100 |     100 |                   
  types.ts                             |     100 |      100 |     100 |     100 |                   
  utils.ts                             |   96.47 |    89.96 |     100 |   96.47 | ...87-888,895-903 
 ccip-sdk/src/api                      |   93.75 |       85 |   94.11 |   93.75 |                   
  index.ts                             |   93.75 |       85 |   94.11 |   93.75 | ...55-758,761-764 
 ccip-sdk/src/aptos                    |   56.57 |    67.64 |   56.66 |   56.57 |                   
  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                             |   55.84 |    73.61 |   58.13 |   55.84 | ...39-865,869-880 
  logs.ts                              |   88.67 |    55.76 |   85.71 |   88.67 | ...92,197,199-210 
  send.ts                              |    25.2 |      100 |       0 |    25.2 | ...1,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/canton                   |   36.89 |    63.63 |    6.45 |   36.89 |                   
  events.ts                            |   35.67 |      100 |       0 |   35.67 | ...71-383,389-398 
  index.ts                             |    33.7 |    55.55 |    8.16 |    33.7 | ...1492,1503-1507 
  types.ts                             |   83.33 |      100 |       0 |   83.33 | 18-25,104-114     
 ccip-sdk/src/canton/client            |   29.85 |      100 |       0 |   29.85 |                   
  client.ts                            |   25.99 |      100 |       0 |   25.99 | ...22-430,445-454 
  index.ts                             |     100 |      100 |     100 |     100 |                   
 ...dk/src/canton/explicit-disclosures |   75.85 |    62.06 |   48.27 |   75.85 |                   
  acs.ts                               |   79.69 |     61.4 |   77.77 |   79.69 | ...43-465,511-522 
  eds.ts                               |   69.56 |      100 |       0 |   69.56 | ...91-303,314-321 
 ccip-sdk/src/canton/token-metadata    |   62.64 |      100 |       0 |   62.64 |                   
  client.ts                            |   62.64 |      100 |       0 |   62.64 | 104-163,170-174   
 ...dk/src/canton/transfer-instruction |   52.15 |      100 |       0 |   52.15 |                   
  client.ts                            |   52.15 |      100 |       0 |   52.15 | 92-175,182-186    
 ccip-sdk/src/errors                   |   87.51 |    76.03 |    48.8 |   87.51 |                   
  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.76 |    71.16 |   46.21 |   84.76 | ...3374,3395-3404 
  utils.ts                             |   94.44 |    81.48 |     100 |   94.44 | 15,17,22,24       
 ccip-sdk/src/evm                      |      87 |    76.43 |   90.36 |      87 |                   
  const.ts                             |     100 |      100 |     100 |     100 |                   
  errors.ts                            |   93.16 |    82.41 |     100 |   93.16 | ...61,170-172,219 
  extra-args.ts                        |   94.47 |    61.01 |     100 |   94.47 | ...11-212,328-340 
  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                             |   80.12 |     76.5 |   89.06 |   80.12 | ...2121,2147-2155 
  logs.ts                              |   71.17 |    81.81 |      50 |   71.17 | 46-47,81-110      
  messages.ts                          |     100 |      100 |     100 |     100 |                   
  offchain.ts                          |   81.25 |    33.33 |     100 |   81.25 | 11,13-14          
  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                   |   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                   |   74.63 |    69.88 |   80.21 |   74.63 |                   
  cleanup.ts                           |   26.95 |    66.66 |   33.33 |   26.95 | ...59-101,114-227 
  exec.ts                              |   69.05 |    62.96 |   66.66 |   69.05 | ...68-472,512-513 
  fork.test.data.ts                    |     100 |      100 |     100 |     100 |                   
  gas.ts                               |   92.06 |    72.22 |     100 |   92.06 | ...,81-90,170-171 
  hasher.ts                            |   96.58 |    81.81 |     100 |   96.58 | 67-70             
  index.ts                             |   76.36 |    74.47 |   81.48 |   76.36 | ...1674,1678-1711 
  logs.ts                              |   69.35 |    58.62 |     100 |   69.35 | 51-52,54-55,61-94 
  offchain.ts                          |     100 |      100 |     100 |     100 |                   
  patchBorsh.ts                        |   78.31 |       50 |     100 |   78.31 | ...47,65-66,72-78 
  send.ts                              |   77.55 |    33.33 |      80 |   77.55 | ...51-359,402-441 
  types.ts                             |     100 |      100 |     100 |     100 |                   
  utils.ts                             |   72.91 |    65.62 |   72.72 |   72.91 | ...42-444,476-491 
 ccip-sdk/src/sui                      |   34.92 |    86.66 |   19.29 |   34.92 |                   
  discovery.ts                         |   14.86 |      100 |       0 |   14.86 | ...49-185,188-222 
  events.ts                            |   30.94 |       50 |      25 |   30.94 | ...18-283,305-306 
  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.04 |    93.18 |   17.94 |   40.04 | ...26-827,831-832 
  objects.ts                           |   18.93 |      100 |       0 |   18.93 | ...33-184,195-338 
 ccip-sdk/src/sui/manuallyExec         |   53.91 |       75 |      50 |   53.91 |                   
  encoder.ts                           |   83.72 |    66.66 |     100 |   83.72 | 50-57,72-76,81    
  index.ts                             |   34.35 |      100 |       0 |   34.35 | 46-131            
 ccip-sdk/src/ton                      |   77.11 |    79.47 |    73.8 |   77.11 |                   
  exec.ts                              |     100 |      100 |     100 |     100 |                   
  extra-args.ts                        |   98.66 |    72.72 |     100 |   98.66 | 156-157,222       
  hasher.ts                            |   77.95 |    77.77 |      75 |   77.95 | 99-107,155-186    
  index.ts                             |   71.33 |    76.85 |   56.52 |   71.33 | ...1233,1240-1241 
  logs.ts                              |     100 |    95.55 |     100 |     100 | 66-71             
  send.ts                              |   95.93 |       70 |     100 |   95.93 | 37-44             
  types.ts                             |   91.17 |    81.25 |     100 |   91.17 | ...60-62,70-73,91 
  utils.ts                             |   63.02 |    77.35 |    90.9 |   63.02 | ...36-394,396-399 
---------------------------------------|---------|----------|---------|---------|-------------------

@andrevmatos andrevmatos merged commit 02e42a9 into main May 6, 2026
13 checks passed
@andrevmatos andrevmatos deleted the fix/show_2execTxs branch May 6, 2026 19:59
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