Skip to content

Fix/watch#252

Merged
andrevmatos merged 2 commits into
mainfrom
fix/watch
May 7, 2026
Merged

Fix/watch#252
andrevmatos merged 2 commits into
mainfrom
fix/watch

Conversation

@andrevmatos
Copy link
Copy Markdown
Collaborator

No description provided.

@andrevmatos andrevmatos self-assigned this May 7, 2026
@andrevmatos andrevmatos requested review from a team, PabloMansanet and aelmanaa as code owners May 7, 2026 17:26
@vercel
Copy link
Copy Markdown

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

Request Review

with `latestLogBlockNumber` same as `startBlock`, we ended up off'ing by
one when entered the watch loop once the initial getLogs scan completed
with empty results; now, we decrement it, to ensure watch mode gets a
range starting with our startBlock
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

Coverage Report

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

> @chainlink/[email protected] test
> node --test

Verbose mode enabled
▶ getCtx
  ▶ output — always stdout
    ✔ output.write goes to stdout (2.05686ms)
    ✔ output.table goes to stdout (0.838294ms)
  ✔ output — always stdout (4.314012ms)
  ▶ logger — always stderr
    ✔ logger.info goes to stderr (0.568351ms)
    ✔ logger.warn goes to stderr (1.11408ms)
    ✔ logger.error goes to stderr (0.38058ms)
  ✔ logger — always stderr (2.327927ms)
  ▶ verbose mode
    ✔ logger.debug is a no-op when verbose is false (0.452314ms)
    ✔ logger.debug goes to stderr when verbose is true (1.303244ms)
  ✔ verbose mode (1.927869ms)
  ▶ destroy signal
    ✔ returns a working destroy function (11.184663ms)
    ✔ calling destroy twice does not throw (3.231032ms)
  ✔ destroy signal (14.607674ms)
✔ getCtx (24.328279ms)
▶ lane-latency command
  ✔ should output JSON format correctly (5.658053ms)
  ✔ should resolve chain IDs to chain selectors (0.687122ms)
  ✔ should use custom API URL when provided (0.708753ms)
  ✔ should output log format correctly (0.771681ms)
  ✔ should handle chain IDs as input (0.693545ms)
  ✔ should handle chain selectors as input (0.810163ms)
  ✔ should throw CCIPApiClientNotAvailableError when --no-api flag is set (1.378294ms)
  ✔ should work normally when --no-api flag is false (0.66978ms)
  ✔ should forward blockConfirmations to API URL (0.732027ms)
  ✔ should not include numOfBlocks when blockConfirmations is not provided (0.628042ms)
  ▶ CCIP_API environment variable integration
    ✔ should respect CCIP_API=false environment variable (0.606252ms)
  ✔ CCIP_API environment variable integration (1.019022ms)
✔ lane-latency command (15.862745ms)
▶ selectRequest non-interactive behavior
  ✔ returns the single request without prompting (1.553861ms)
  ✔ returns the request matching logIndex (0.271958ms)
  ✔ throws CCIPInteractiveRequiredError for multiple requests without logIndex (2.412124ms)
✔ selectRequest non-interactive behavior (6.183454ms)
▶ CCIPInteractiveRequiredError
  ✔ has correct code and is not transient (0.345735ms)
  ✔ uses default recovery when none provided (0.340766ms)
  ✔ preserves context fields (0.227865ms)
✔ CCIPInteractiveRequiredError (1.198468ms)
▶ preprocessArgv TTY auto-detection
  ✔ --interactive flag is defined in globalOpts (0.223066ms)
✔ preprocessArgv TTY auto-detection (0.38042ms)
▶ search messages command
  ✔ should throw CCIPApiClientNotAvailableError when --no-api flag is set (2.758857ms)
  ✔ should output JSON format correctly (14.254594ms)
  ✔ should pass sender filter to API (2.912914ms)
  ✔ should pass receiver filter to API (3.231278ms)
  ✔ should resolve source chain to selector (3.96643ms)
  ✔ should resolve dest chain to selector (3.299496ms)
  ✔ should pass manual-exec-only filter to API (3.543862ms)
  ✔ should treat limit 0 as unlimited (4.579594ms)
  ✔ should respect limit parameter (4.6475ms)
  ✔ should warn when no results found (1.408568ms)
  ✔ should use custom API URL when provided (2.892837ms)
  ✔ should warn on negative limit and fall back to default (2.6313ms)
  ✔ should output log format (2.63751ms)
✔ search messages command (54.729605ms)
▶ e2e command show EVM
  ▶ pretty format (default)
    ✔ should show complete CCIP transaction details EVM to EVM (11301.735905ms)
  ✔ pretty format (default) (11302.833274ms)
  ▶ json format
    ✔ should output a single valid JSON envelope with all expected fields (9264.865244ms)
  ✔ json format (9265.149676ms)
  ▶ log format
    ✔ should output in log format with object assignments (8786.159739ms)
  ✔ log format (8786.446143ms)
  ▶ verbose flag
    ✔ should work with verbose flag enabled (10122.769516ms)
  ✔ verbose flag (10122.984859ms)
  ▶ error handling
    ✔ should handle invalid transaction hash gracefully (6752.505767ms)
    ✔ should require transaction hash argument (1656.196919ms)
  ✔ error handling (8409.007426ms)
  ✔ should show complete CCIP transaction details EVM to Aptos (9013.999181ms)
  ✔ should show complete CCIP transaction details EVM to Solana (5858.858999ms)
✔ e2e command show EVM (62761.989287ms)
▶ e2e command show Solana
  ✔ should show complete CCIP transaction details Solana to EVM (9912.664148ms)
✔ e2e command show Solana (9912.967464ms)
▶ e2e command show Aptos
  ✔ should show complete CCIP transaction details Aptos to EVM (9275.616606ms)
✔ e2e command show Aptos (9275.793806ms)
﹣ e2e command show TON (0.057768ms) # SKIP
▶ formatCCIPError
  ✔ should return null for non-CCIPError instances (1.196402ms)
  ✔ should format CCIPError with code and message (0.420995ms)
  ✔ should include help section with recovery hint (0.183883ms)
  ✔ should include note section for transient errors (0.299579ms)
  ✔ should include retry timing for transient errors with retryAfterMs (0.290131ms)
  ✔ should not include note section for permanent errors (0.170027ms)
  ✔ should format error with structured output (0.277337ms)
  ✔ should include stack trace when verbose is true (0.355303ms)
  ✔ should not include stack trace when verbose is false (0.211084ms)
✔ formatCCIPError (4.918816ms)
▶ yieldResolved
  ✔ throws if a promise rejects while the generator is paused after a yield (11.577209ms)
✔ yieldResolved (11.776971ms)
▶ fetchChainsFromRpcs
  ✔ lets duplicate tx-hash race endpoints query before aborting losers (13.848196ms)
  ✔ chainGetter: returns chain from first winning endpoint and destroys late arrivals (51.852046ms)
  ✔ chainGetter: resolves a pending request once the endpoint connects (Branch 2) (21.98086ms)
  ✔ chainGetter: rejects with CCIPRpcNotFoundError when all endpoints fail to connect (1.770773ms)
  ✔ chainGetter: rejects immediately with CCIPRpcNotFoundError once family is already exhausted (0.75589ms)
  ✔ txHash: rejects with CCIPTransactionNotFoundError when tx not on any chain (1.060639ms)
  ✔ txHash: Branch-4 (txOnlyRacer) is destroyed via catch when it loses the tx race (10.194378ms)
  ✔ txHash: chain connecting after txFoundIn is set is immediately destroyed without calling getTransaction (24.96053ms)
  ✔ txHash: Branch-2 chain given to a pending chainGetter is NOT destroyed when it cannot find the tx (12.985716ms)
  ✔ txFoundIn shared across families: SVM txOnlyRacer is destroyed after EVM wins (33.548409ms)
✔ fetchChainsFromRpcs (174.998064ms)
ℹ tests 70
ℹ suites 23
ℹ pass 70
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 84420.523341
---------------------------------------|---------|----------|---------|---------|-------------------
File                                   | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
---------------------------------------|---------|----------|---------|---------|-------------------
All files                              |   72.18 |    76.87 |   57.05 |   72.18 |                   
 ccip-cli/src                          |   89.71 |    61.53 |      75 |   89.71 |                   
  index.ts                             |   89.71 |    61.53 |      75 |   89.71 | ...60-161,167-172 
 ccip-cli/src/commands                 |   51.25 |    73.09 |   58.18 |   51.25 |                   
  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.17 |      100 |       0 |   23.17 | ...28-138,140-300 
  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 |    75.47 |   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.23 |     81.1 |   93.33 |   95.23 |                   
  chain.ts                             |   94.16 |    75.82 |   72.72 |   94.16 | ...1776,1809-1810 
  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.44 |    89.84 |     100 |   96.44 | ...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.4 |   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.23 |   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                   |   33.34 |    63.63 |    4.81 |   33.34 |                   
  events.ts                            |   35.67 |      100 |       0 |   35.67 | ...71-383,389-398 
  index.ts                             |    29.4 |    55.55 |    5.71 |    29.4 | ...1801,1812-1816 
  types.ts                             |   84.42 |      100 |       0 |   84.42 | 18-25,112-122     
 ccip-sdk/src/canton/client            |   26.65 |      100 |       0 |   26.65 |                   
  client.ts                            |   23.12 |      100 |       0 |   23.12 | ...65-484,499-519 
  index.ts                             |     100 |      100 |     100 |     100 |                   
 ...dk/src/canton/explicit-disclosures |   69.45 |    70.83 |   35.29 |   69.45 |                   
  acs.ts                               |   82.87 |    70.21 |      80 |   82.87 | ...54-360,390-412 
  eds.ts                               |    54.7 |      100 |       0 |    54.7 | ...76-383,387-392 
 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                      |   86.56 |    76.27 |   89.28 |   86.56 |                   
  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                              |    60.9 |    79.31 |   33.33 |    60.9 | ...2,62-63,98-132 
  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.53 |    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.66 |   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 |    78.18 |    90.9 |   63.02 | ...36-394,396-399 
---------------------------------------|---------|----------|---------|---------|-------------------

@andrevmatos andrevmatos merged commit e65b28e into main May 7, 2026
13 checks passed
@andrevmatos andrevmatos deleted the fix/watch branch May 7, 2026 17:51
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.

4 participants