Skip to content

Conversation

@PabloMansanet
Copy link
Contributor

@PabloMansanet PabloMansanet commented Jan 7, 2026

Tracking ticket here.

This PR is stacked on top of the getMessageById one. I tested it manually against a locally hosted instance of the latest API.

Thoughts on ordering: The ticket specifies TO-BE: Use the API to return the messageID(s) sorted by log index for a given transaction hash. However, log data isn't accessible through the API, so it's not possible to enforce this specific order without enrichment by the layers above.

This method then returns all messageIDs associated with a hash, but in the API's ordering.

Also, I made the assumption that pagination for this response is impossible (how could we have 100+ message IDs for a single hash?) and throw an error in case it happens, but feel free to challenge this if there are edge cases I don't know about in non-EVMs or similar.

@PabloMansanet PabloMansanet requested a review from a team as a code owner January 7, 2026 11:42
@vercel
Copy link

vercel bot commented Jan 7, 2026

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

Project Deployment Review Updated (UTC)
ccip-tools-ts Error Error Jan 7, 2026 0:06am

@github-actions
Copy link

github-actions bot commented Jan 7, 2026

Coverage Report

ℹ tests 674
ℹ suites 205
ℹ pass 674
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 176183.43902
-------------------------------|---------|----------|---------|---------|---------------------------
File                           | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s         
-------------------------------|---------|----------|---------|---------|---------------------------
All files                      |   67.11 |    80.12 |   56.41 |   67.11 |                           
 ccip-cli/src                  |   86.45 |    83.33 |      50 |   86.45 |                           
  index.ts                     |   86.45 |    83.33 |      50 |   86.45 | 72-76,82-83,88-93         
 ccip-cli/src/commands         |   52.24 |    79.89 |      50 |   52.24 |                           
  get-message-id.ts            |   59.77 |     87.5 |   33.33 |   59.77 | 18-27,34-41,69-85         
  get-message.ts               |   32.72 |      100 |       0 |   32.72 | ...1,38-45,49-101,108-110 
  index.ts                     |     100 |      100 |     100 |     100 |                           
  lane-latency.ts              |   67.74 |     87.5 |   33.33 |   67.74 | 23-37,44-51,85-91         
  manual-exec.ts               |      21 |      100 |       0 |      21 | 42-106,113-123,125-236    
  parse.ts                     |   41.79 |      100 |       0 |   41.79 | 22-26,33-40,42-67         
  send.ts                      |   11.62 |      100 |       0 |   11.62 | 34-136,143-150,152-344    
  show.ts                      |   89.61 |    63.82 |      60 |   89.61 | ...23-129,135-137,146-147 
  supported-tokens.ts          |   23.48 |      100 |       0 |   23.48 | ...83-175,177-232,234-247 
  types.ts                     |     100 |      100 |     100 |     100 |                           
  utils.ts                     |   86.59 |    84.03 |    91.3 |   86.59 | ...99-517,524-532,542-548 
 ccip-cli/src/providers        |   53.94 |       75 |   17.39 |   53.94 |                           
  aptos.ts                     |   53.65 |      100 |       0 |   53.65 | ...70,78-85,91-92,101-123 
  evm.ts                       |   46.03 |      100 |       0 |   46.03 | 20,31-63                  
  index.ts                     |   82.95 |    72.09 |      80 |   82.95 | 49-50,188-223             
  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                  |   93.29 |    88.68 |   92.98 |   93.29 |                           
  chain.ts                     |    92.7 |       84 |   71.42 |    92.7 | ...30,249-287,575,633-642 
  commits.ts                   |     100 |       90 |     100 |     100 | 35,52                     
  execution.ts                 |   84.61 |      100 |      75 |   84.61 | 122-143                   
  explorer.ts                  |     100 |      100 |     100 |     100 |                           
  extra-args.ts                |     100 |    78.57 |     100 |     100 | 71,90,103                 
  gas.ts                       |   96.42 |    92.85 |     100 |   96.42 | 81-85                     
  http-status.ts               |     100 |      100 |     100 |     100 |                           
  index.ts                     |     100 |      100 |     100 |     100 |                           
  offchain.ts                  |     100 |      100 |     100 |     100 |                           
  requests.ts                  |   78.97 |    77.61 |   85.71 |   78.97 | ...02-303,307-308,331-352 
  supported-chains.ts          |     100 |      100 |     100 |     100 |                           
  types.ts                     |     100 |      100 |     100 |     100 |                           
  utils.ts                     |   95.11 |    90.81 |     100 |   95.11 | ...51,515-516,532,597-605 
 ccip-sdk/src/api              |   99.25 |    90.27 |     100 |   99.25 |                           
  index.ts                     |   99.25 |    90.27 |     100 |   99.25 | 248-249,411-412           
 ccip-sdk/src/aptos            |   57.83 |    68.75 |      60 |   57.83 |                           
  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.82 |    71.95 |   62.22 |   58.82 | ...02-737,741-834,838-849 
  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                     |   69.72 |      100 |       0 |   69.72 | 25-32,77-101              
  utils.ts                     |     100 |      100 |     100 |     100 |                           
 ccip-sdk/src/errors           |   81.22 |    77.66 |   50.43 |   81.22 |                           
  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               |   73.67 |     73.5 |    47.7 |   73.67 | ...51,1659-1668,1676-1685 
  utils.ts                     |   94.52 |    77.77 |     100 |   94.52 | 16,18,23,25               
 ccip-sdk/src/evm              |   65.04 |    78.82 |   62.85 |   65.04 |                           
  const.ts                     |     100 |      100 |     100 |     100 |                           
  errors.ts                    |   82.48 |    78.46 |     100 |   82.48 | ...55-157,188-195,198-216 
  hasher.ts                    |     100 |     87.5 |     100 |     100 | 122                       
  index.ts                     |   58.74 |    84.61 |   58.49 |   58.74 | ...05,1309-1382,1386-1435 
  logs.ts                      |   33.99 |    46.66 |      25 |   33.99 | ...13-214,229-258,274-302 
  messages.ts                  |     100 |      100 |     100 |     100 |                           
  offchain.ts                  |    80.4 |    53.33 |      75 |    80.4 | ...45-147,151-165,191-196 
 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/solana           |   51.42 |    64.25 |   55.81 |   51.42 |                           
  cleanup.ts                   |   12.22 |      100 |       0 |   12.22 | 29-229                    
  exec.ts                      |    9.27 |      100 |       0 |    9.27 | ...66-341,343-382,384-496 
  hasher.ts                    |   96.58 |    81.81 |     100 |   96.58 | 67-70                     
  index.ts                     |   70.24 |    68.55 |   64.15 |   70.24 | ...11,1415-1439,1443-1464 
  logs.ts                      |   74.19 |    27.27 |     100 |   74.19 | ...,50-51,53-54,56-88,119 
  offchain.ts                  |   78.87 |     64.7 |      50 |   78.87 | ...,96-97,110-111,126-142 
  patchBorsh.ts                |   65.06 |    57.14 |      75 |   65.06 | 30-49,65-66,72-78         
  send.ts                      |   14.84 |      100 |       0 |   14.84 | ...63-252,265-331,333-384 
  types.ts                     |   74.46 |      100 |       0 |   74.46 | 36-47                     
  utils.ts                     |   54.14 |    77.77 |      60 |   54.14 | ...71-284,326-389,395-410 
 ccip-sdk/src/sui              |   31.15 |    76.47 |   11.11 |   31.15 |                           
  discovery.ts                 |   16.56 |      100 |       0 |   16.56 | 18-34,44-157              
  events.ts                    |   30.21 |      100 |       0 |   30.21 | ...83-154,199-288,296-321 
  hasher.ts                    |   98.16 |    66.66 |     100 |   98.16 | 33,49                     
  index.ts                     |   33.68 |       80 |     7.5 |   33.68 | ...36-737,741-742,746-747 
  objects.ts                   |   12.77 |      100 |       0 |   12.77 | ...05-146,157-207,218-360 
 ccip-sdk/src/sui/manuallyExec |   39.46 |      100 |       0 |   39.46 |                           
  encoder.ts                   |   47.67 |      100 |       0 |   47.67 | 42-86                     
  index.ts                     |    34.3 |      100 |       0 |    34.3 | 48-137                    
 ccip-sdk/src/ton              |   88.11 |    87.35 |   73.52 |   88.11 |                           
  exec.ts                      |     100 |      100 |     100 |     100 |                           
  hasher.ts                    |   77.95 |    77.77 |      75 |   77.95 | 99-107,155-186            
  index.ts                     |   93.81 |    88.23 |   67.39 |   93.81 | ...56,1060-1061,1065-1066 
  logs.ts                      |     100 |    98.52 |     100 |     100 | 56                        
  types.ts                     |   78.41 |    69.23 |   66.66 |   78.41 | ...-76,94,121-134,136-139 
  utils.ts                     |   75.98 |    75.43 |     100 |   75.98 | ...55-261,273-327,329-332 
-------------------------------|---------|----------|---------|---------|---------------------------

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