Skip to content

refactor: waitFinalized#263

Merged
andrevmatos merged 7 commits into
mainfrom
refactor/finalized
May 25, 2026
Merged

refactor: waitFinalized#263
andrevmatos merged 7 commits into
mainfrom
refactor/finalized

Conversation

@andrevmatos
Copy link
Copy Markdown
Collaborator

@andrevmatos andrevmatos commented May 24, 2026

  • Expand getBlockTimestamp to getBlockInfo, returning { number, timestamp }, accepting finality tags
    • getBlockTimestamp becomes simple concrete implementation in Chain (for backwards compatibility), offloads to getBlockInfo
  • Overhaul Chain.waitFinalized
    • Move to its own file
    • Races getLogs with polling finalized getBlockInfo, to fail faster when tx/log gets reorged
      • Before, it had to wait for next similar event to be finalized, which could take a long time
      • Now, it rejects as soon as a new finalized block AFTER OG block got finalized, and after some threshold (default=10) blocks came on top of the OG block, but tx disappeared from getTransaction

…olling

- Add BlockInfo type ({ number, timestamp }) to chain.ts
- Add abstract getBlockInfo(block) returning Promise<BlockInfo>
- Deprecate getBlockTimestamp as concrete wrapper over getBlockInfo
- Rewrite waitFinalized with block-height poller racing getLogs watch:
  - New reorgSafetyBlocks option (default: 10)
  - New pollIntervalMs option (default: 5000)
  - Widen finality to accept number | 'finalized' | 'latest'
  - Re-fetch tx on deadline to handle reorgs to later blocks
  - Only abort when tx disappears (getTransaction throws)
- Update all chain implementations: EVM, Solana, Aptos, Canton, Sui, TON
- Update test mock in commits.test.ts
- Add waitFinalized.test.ts with 9 unit tests
@andrevmatos andrevmatos self-assigned this May 24, 2026
@andrevmatos andrevmatos requested review from a team, PabloMansanet and aelmanaa as code owners May 24, 2026 21:04
@vercel
Copy link
Copy Markdown

vercel Bot commented May 24, 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 25, 2026 11:17am

Request Review

@github-actions
Copy link
Copy Markdown

👋 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 24, 2026

Coverage Report

ℹ tests 836
ℹ suites 239
ℹ pass 834
ℹ fail 0
ℹ cancelled 0
ℹ skipped 2
ℹ todo 0
ℹ duration_ms 158978.442528

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

✔ src/commands/e2e-helpers.test.ts (122.291286ms)
Verbose mode enabled
▶ getCtx
  ▶ output — always stdout
    ✔ output.write goes to stdout (1.443398ms)
    ✔ output.table goes to stdout (0.829761ms)
  ✔ output — always stdout (3.288729ms)
  ▶ logger — always stderr
    ✔ logger.info goes to stderr (0.595684ms)
    ✔ logger.warn goes to stderr (0.29414ms)
    ✔ logger.error goes to stderr (0.360905ms)
  ✔ logger — always stderr (1.498571ms)
  ▶ verbose mode
    ✔ logger.debug is a no-op when verbose is false (0.453688ms)
    ✔ logger.debug goes to stderr when verbose is true (1.380228ms)
  ✔ verbose mode (2.10298ms)
  ▶ destroy signal
    ✔ returns a working destroy function (13.146218ms)
    ✔ calling destroy twice does not throw (0.451704ms)
  ✔ destroy signal (13.803307ms)
✔ getCtx (21.577029ms)
▶ lane-latency command
  ✔ should output JSON format correctly (7.542291ms)
  ✔ should resolve chain IDs to chain selectors (0.714495ms)
  ✔ should use custom API URL when provided (0.705188ms)
  ✔ should output log format correctly (0.754972ms)
  ✔ should handle chain IDs as input (3.821322ms)
  ✔ should handle chain selectors as input (0.707913ms)
  ✔ should throw CCIPApiClientNotAvailableError when --no-api flag is set (1.300181ms)
  ✔ should work normally when --no-api flag is false (0.82409ms)
  ✔ should forward blockConfirmations to API URL (0.760712ms)
  ✔ should not include numOfBlocks when blockConfirmations is not provided (0.576318ms)
  ▶ CCIP_API environment variable integration
    ✔ should respect CCIP_API=false environment variable (0.570506ms)
  ✔ CCIP_API environment variable integration (1.492771ms)
✔ lane-latency command (21.485798ms)
▶ e2e command lane EVM v1.5
  ✔ should show lane config Sepolia -> Fuji (v1.5) in JSON (6155.735375ms)
  ✔ should show lane config Sepolia -> Fuji (v1.5) in pretty format (4686.289546ms)
✔ e2e command lane EVM v1.5 (10844.079432ms)
▶ e2e command lane EVM v2.0
  ✔ should show lane config Sepolia -> Fuji (v2.0) in JSON (4364.539437ms)
✔ e2e command lane EVM v2.0 (4364.770027ms)
▶ e2e command lane EVM <-> Aptos (v1.6)
  ✔ should show lane config Sepolia -> Aptos (v1.6) (4069.835728ms)
  ✔ should show lane config Aptos -> Sepolia (v1.6) (4120.692682ms)
✔ e2e command lane EVM <-> Aptos (v1.6) (8190.864236ms)
▶ e2e command lane EVM <-> Solana (v1.6)
  ✔ should show lane config Sepolia -> Solana (v1.6) (4746.133276ms)
  ✔ should show lane config Solana -> Sepolia (v1.6) (4360.855846ms)
✔ e2e command lane EVM <-> Solana (v1.6) (9107.322846ms)
▶ e2e command lane EVM <-> TON (v1.6)
  ✔ should show lane config TON -> Sepolia (v1.6) (39346.222647ms)
  ✔ should show lane config Sepolia -> TON (v1.6) (30231.048182ms)
✔ e2e command lane EVM <-> TON (v1.6) (69577.616083ms)
▶ selectRequest non-interactive behavior
  ✔ returns the single request without prompting (1.056675ms)
  ✔ returns the request matching logIndex (0.215142ms)
  ✔ throws CCIPInteractiveRequiredError for multiple requests without logIndex (1.693465ms)
✔ selectRequest non-interactive behavior (4.281152ms)
▶ CCIPInteractiveRequiredError
  ✔ has correct code and is not transient (0.318525ms)
  ✔ uses default recovery when none provided (0.308828ms)
  ✔ preserves context fields (0.244698ms)
✔ CCIPInteractiveRequiredError (1.109775ms)
▶ preprocessArgv TTY auto-detection
  ✔ --interactive flag is defined in globalOpts (2.822996ms)
✔ preprocessArgv TTY auto-detection (2.973408ms)
▶ search messages command
  ✔ should throw CCIPApiClientNotAvailableError when --no-api flag is set (3.033059ms)
  ✔ should output JSON format correctly (16.834757ms)
  ✔ should pass sender filter to API (3.712156ms)
  ✔ should pass receiver filter to API (4.990861ms)
  ✔ should resolve source chain to selector (2.864794ms)
  ✔ should resolve dest chain to selector (2.20441ms)
  ✔ should pass manual-exec-only filter to API (2.870455ms)
  ✔ should treat limit 0 as unlimited (4.678404ms)
  ✔ should respect limit parameter (5.696047ms)
  ✔ should warn when no results found (0.965623ms)
  ✔ should use custom API URL when provided (2.281284ms)
  ✔ should warn on negative limit and fall back to default (1.649312ms)
  ✔ should output log format (1.487511ms)
✔ search messages command (55.405747ms)
▶ e2e command show EVM
  ▶ pretty format (default)
    ✔ should show complete CCIP transaction details EVM to EVM (8999.987333ms)
  ✔ pretty format (default) (9001.009164ms)
  ▶ json format
    ✔ should output a single valid JSON envelope with all expected fields (7824.892297ms)
  ✔ json format (7825.156882ms)
  ▶ log format
    ✔ should output in log format with object assignments (7822.082545ms)
  ✔ log format (7822.387356ms)
  ▶ verbose flag
    ✔ should work with verbose flag enabled (8689.733452ms)
  ✔ verbose flag (8689.94629ms)
  ▶ error handling
    ✔ should handle invalid transaction hash gracefully (6340.898243ms)
    ✔ should require transaction hash argument (1656.736ms)
  ✔ error handling (7997.937239ms)
  ✔ should show complete CCIP transaction details EVM to Aptos (10135.501075ms)
  ✔ should show complete CCIP transaction details EVM to Solana (5993.297433ms)
✔ e2e command show EVM (57467.261215ms)
▶ e2e command show Solana
  ✔ should show complete CCIP transaction details Solana to EVM (8960.723554ms)
✔ e2e command show Solana (8960.978981ms)
▶ e2e command show Aptos
  ✔ should show complete CCIP transaction details Aptos to EVM (9963.933922ms)
✔ e2e command show Aptos (9964.127614ms)
﹣ e2e command show TON (0.057467ms) # SKIP
▶ formatCCIPError
  ✔ should return null for non-CCIPError instances (1.109975ms)
  ✔ should format CCIPError with code and message (0.528007ms)
  ✔ should include help section with recovery hint (0.161642ms)
  ✔ should include note section for transient errors (0.222305ms)
  ✔ should include retry timing for transient errors with retryAfterMs (0.314197ms)
  ✔ should not include note section for permanent errors (0.254065ms)
  ✔ should format error with structured output (0.273791ms)
  ✔ should include stack trace when verbose is true (0.286897ms)
  ✔ should not include stack trace when verbose is false (0.205083ms)
✔ formatCCIPError (4.93271ms)
▶ yieldResolved
  ✔ throws if a promise rejects while the generator is paused after a yield (12.175199ms)
✔ yieldResolved (12.357269ms)
▶ canton/signer
  ▶ Ed25519TransactionSigner constructor
    ✔ constructs with a valid 64-char hex seed (3.361793ms)
    ✔ constructs with a 0x-prefixed seed (0.366675ms)
    ✔ throws when seed is too short (0.486109ms)
    ✔ throws when seed is too long (0.228798ms)
    ✔ throws when seed contains non-hex characters (0.195746ms)
    ✔ computes the correct Canton fingerprint (0.700689ms)
    ✔ produces different fingerprints for different seeds (0.694658ms)
  ✔ Ed25519TransactionSigner constructor (7.176824ms)
  ▶ Ed25519TransactionSigner.sign()
    ✔ returns a PartySignatures structure (0.891717ms)
    ✔ includes the correct party ID (0.445864ms)
    ✔ produces a signature with correct properties (0.5079ms)
    ✔ produces a valid Ed25519 signature (64 bytes) (0.468176ms)
    ✔ produces a cryptographically valid signature (1.032621ms)
    ✔ produces different signatures for different hashes (0.403925ms)
    ✔ produces different signatures for different signers (same hash) (0.591436ms)
    ✔ handles empty hash (edge case) (0.373699ms)
  ✔ Ed25519TransactionSigner.sign() (5.086538ms)
  ▶ Ed25519TransactionSigner.getFingerprint()
    ✔ returns the fingerprint computed during construction (0.334826ms)
    ✔ returns a 68-character hex string (0.282398ms)
  ✔ Ed25519TransactionSigner.getFingerprint() (0.72168ms)
  ▶ Integration: multiple signers with same party
    ✔ allows multiple signers for the same party with different keys (0.684479ms)
  ✔ Integration: multiple signers with same party (0.769188ms)
✔ canton/signer (14.425182ms)
▶ fetchChainsFromRpcs
  ✔ lets duplicate tx-hash race endpoints query before aborting losers (13.85685ms)
  ✔ chainGetter: returns chain from first winning endpoint and destroys late arrivals (51.435148ms)
  ✔ chainGetter: resolves a pending request once the endpoint connects (Branch 2) (20.706423ms)
  ✔ chainGetter: rejects with CCIPRpcNotFoundError when all endpoints fail to connect (1.436154ms)
  ✔ chainGetter: rejects immediately with CCIPRpcNotFoundError once family is already exhausted (0.788283ms)
  ✔ txHash: rejects with CCIPTransactionNotFoundError when tx not on any chain (1.11833ms)
  ✔ txHash: Branch-4 (txOnlyRacer) is destroyed via catch when it loses the tx race (10.492281ms)
  ✔ txHash: chain connecting after txFoundIn is set is immediately destroyed without calling getTransaction (23.819616ms)
  ✔ txHash: Branch-2 chain given to a pending chainGetter is NOT destroyed when it cannot find the tx (13.517811ms)
  ✔ txFoundIn shared across families: SVM txOnlyRacer is destroyed after EVM wins (35.547162ms)
✔ fetchChainsFromRpcs (175.28107ms)
ℹ tests 98
ℹ suites 33
ℹ pass 98
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 102431.867969
---------------------------------------|---------|----------|---------|---------|-------------------
File                                   | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
---------------------------------------|---------|----------|---------|---------|-------------------
All files                              |   73.23 |    77.17 |   58.58 |   73.23 |                   
 ccip-cli/src                          |      90 |    61.53 |      75 |      90 |                   
  index.ts                             |      90 |    61.53 |      75 |      90 | ...65-166,172-177 
 ccip-cli/src/commands                 |   53.49 |    72.26 |   61.01 |   53.49 |                   
  index.ts                             |     100 |      100 |     100 |     100 |                   
  lane-latency.ts                      |   72.56 |     90.9 |   33.33 |   72.56 | ...,63-70,105-111 
  lane.ts                              |   85.25 |       70 |     100 |   85.25 | ...34-137,141-143 
  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                              |   77.11 |    61.11 |     100 |   77.11 | ...88-291,319-320 
  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                             |   88.06 |    74.84 |   96.42 |   88.06 | ...14-624,632-640 
 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                |   57.27 |       85 |   35.29 |   57.27 |                   
  aptos.ts                             |   51.47 |      100 |       0 |   51.47 | ...,95-96,105-136 
  canton.ts                            |   85.33 |     90.9 |    87.5 |   85.33 | 179-191,206-225   
  evm.ts                               |    36.3 |      100 |       0 |    36.3 | ...69-104,116-168 
  index.ts                             |   79.23 |    82.81 |   83.33 |   79.23 | ...43-145,212-260 
  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                          |   96.28 |    82.66 |   94.89 |   96.28 |                   
  chain.ts                             |   96.51 |     78.7 |   82.14 |   96.51 | ...1956,1989-1990 
  commits.ts                           |     100 |    95.23 |     100 |     100 | 57                
  execution.ts                         |   92.45 |    92.59 |     100 |   92.45 | 137-144,156-163   
  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 
  networks.ts                          |     100 |      100 |     100 |     100 |                   
  offchain.ts                          |   94.16 |       80 |     100 |   94.16 | ...24-226,235-236 
  requests.ts                          |   96.26 |    87.09 |     100 |   96.26 | ...89-690,715-717 
  supported-chains.ts                  |     100 |      100 |     100 |     100 |                   
  types.ts                             |     100 |      100 |     100 |     100 |                   
  utils.ts                             |   96.23 |    89.02 |     100 |   96.23 | ...07-808,815-823 
 ccip-sdk/src/api                      |   93.74 |       85 |   94.11 |   93.74 |                   
  index.ts                             |   93.74 |       85 |   94.11 |   93.74 | ...53-756,759-762 
 ccip-sdk/src/aptos                    |   58.81 |    65.94 |   58.62 |   58.81 |                   
  exec.ts                              |   29.31 |      100 |       0 |   29.31 | 18-58             
  hasher.ts                            |   76.52 |       80 |   66.66 |   76.52 | 20-39,53-59       
  index.ts                             |   59.87 |    72.97 |   60.97 |   59.87 | ...95-921,925-936 
  logs.ts                              |   88.71 |    51.92 |   85.71 |   88.71 | ...92,197,199-210 
  send.ts                              |    25.8 |      100 |       0 |    25.8 | ...2,63-80,93-124 
  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                   |   34.31 |    63.63 |    4.87 |   34.31 |                   
  events.ts                            |   35.67 |      100 |       0 |   35.67 | ...71-383,389-398 
  index.ts                             |    29.5 |    55.55 |    5.79 |    29.5 | ...1873,1884-1888 
  types.ts                             |   88.05 |      100 |       0 |   88.05 | 55-62,149-159     
 ccip-sdk/src/canton/client            |   32.49 |      100 |       0 |   32.49 |                   
  client.ts                            |   29.03 |      100 |       0 |   29.03 | ...90-609,624-644 
  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.78 |    76.01 |    49.6 |   87.78 |                   
  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                       |   84.95 |    71.16 |   46.61 |   84.95 | ...3345,3366-3375 
  utils.ts                             |   94.44 |    81.48 |     100 |   94.44 | 15,17,22,24       
 ccip-sdk/src/evm                      |   87.55 |    76.62 |   90.36 |   87.55 |                   
  const.ts                             |     100 |      100 |     100 |     100 |                   
  errors.ts                            |   91.17 |    80.76 |     100 |   91.17 | ...65,174-176,223 
  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 | 135               
  index.ts                             |   82.49 |    77.31 |   90.47 |   82.49 | ...2237,2263-2271 
  logs.ts                              |   61.22 |       80 |   33.33 |   61.22 | ...,66-67,107-146 
  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                   |   90.29 |    76.92 |     100 |   90.29 |                   
  bcs-codecs.ts                        |   90.15 |       75 |     100 |   90.15 | 75-87             
  constants.ts                         |     100 |      100 |     100 |     100 |                   
 ccip-sdk/src/solana                   |      75 |    70.04 |      80 |      75 |                   
  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 
  fork.test.data.ts                    |     100 |      100 |     100 |     100 |                   
  gas.ts                               |   92.06 |    72.22 |     100 |   92.06 | ...,81-90,170-171 
  hasher.ts                            |   96.61 |    81.81 |     100 |   96.61 | 68-71             
  index.ts                             |   77.11 |    74.36 |   81.13 |   77.11 | ...1743,1747-1780 
  logs.ts                              |   69.35 |    63.33 |     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.6 |    33.33 |      80 |    77.6 | ...52-360,403-442 
  types.ts                             |     100 |      100 |     100 |     100 |                   
  utils.ts                             |   72.76 |    64.51 |   72.72 |   72.76 | ...43-445,477-492 
 ccip-sdk/src/sui                      |   34.55 |    86.66 |      20 |   34.55 |                   
  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.81 |      100 |       0 |   31.81 | 32-75,87-132      
  hasher.ts                            |   98.16 |    66.66 |     100 |   98.16 | 33,49             
  index.ts                             |   39.23 |    93.18 |   18.91 |   39.23 | ...09-810,814-815 
  objects.ts                           |   18.93 |      100 |       0 |   18.93 | ...33-184,195-338 
 ccip-sdk/src/sui/manuallyExec         |   54.12 |       75 |      50 |   54.12 |                   
  encoder.ts                           |    83.9 |    66.66 |     100 |    83.9 | 51-58,73-77,82    
  index.ts                             |   34.35 |      100 |       0 |   34.35 | 46-131            
 ccip-sdk/src/ton                      |    79.9 |     78.2 |   79.26 |    79.9 |                   
  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                             |   77.33 |    73.64 |    65.9 |   77.33 | ...1328,1335-1336 
  logs.ts                              |     100 |    95.55 |     100 |     100 | 66-71             
  send.ts                              |   95.93 |       70 |     100 |   95.93 | 37-44             
  types.ts                             |   91.24 |    81.25 |     100 |   91.24 | ...61-63,71-74,92 
  utils.ts                             |    63.1 |    78.18 |    90.9 |    63.1 | ...37-395,397-400 
---------------------------------------|---------|----------|---------|---------|-------------------

- Chain.waitFinalized now returns Promise<BlockInfo> instead of Promise<true>
- Use Parameters<Chain['getBlockInfo']>[0] for finality type
- Update all test assertions to check BlockInfo shape instead of true
- Add test for standalone waitFinalized returning BlockInfo with values
- Fix formatting in test mock
@andrevmatos andrevmatos force-pushed the refactor/finalized branch from 261ca73 to af27262 Compare May 25, 2026 10:42
@andrevmatos andrevmatos merged commit 07f27c8 into main May 25, 2026
13 checks passed
@andrevmatos andrevmatos deleted the refactor/finalized branch May 25, 2026 12:49
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