|
| 1 | +--- |
| 2 | +section: ccip |
| 3 | +date: Last Modified |
| 4 | +title: "Checking CCIP Message Status" |
| 5 | +metadata: |
| 6 | + description: "Learn to check the status of Chainlink CCIP messages offchain using CCIP Tools. Provide CCIP source transaction hash to verify transaction progress." |
| 7 | +whatsnext: { "Get Supported Tokens": "/ccip/tutorials/evm/offchain/ccip-tools/get-supported-tokens" } |
| 8 | +--- |
| 9 | + |
| 10 | +import { CodeSample, ClickToZoom, CopyText, Aside } from "@components" |
| 11 | +import CcipCommon from "@features/ccip/CcipCommon.astro" |
| 12 | + |
| 13 | +In this tutorial, you will learn how to verify the status of a Chainlink CCIP transaction offchain using [CCIP Tools](https://github.com/smartcontractkit/ccip-tools-ts). Starting with a CCIP source transaction hash, you'll execute the [`show`](https://github.com/smartcontractkit/ccip-tools-ts/blob/main/README.md#show-default-command) command of the `ccip-tools` to query the current status of a cross-chain message. |
| 14 | + |
| 15 | +## Before you begin |
| 16 | + |
| 17 | +1. Initiate a CCIP transaction and note the CCIP source transaction hash (i.e., the transaction hash on the source blockchain). You can obtain the CCIP source transaction hash by running any of the previous CCIP tutorials. |
| 18 | +1. Complete the prerequisite steps of the [Transfer Tokens between EOAs](/ccip/tutorials/evm/offchain/ccip-tools/transfer-tokens-from-eoa#before-you-begin) tutorial. |
| 19 | + |
| 20 | +## Tutorial |
| 21 | + |
| 22 | +This tutorial shows you on how to check the status of a Chainlink CCIP transaction using the [`show`](https://github.com/smartcontractkit/ccip-tools-ts/blob/main/README.md#show-default-command) command of the `ccip-tools`. By supplying the command with the source transaction hash, you can verify the current status of your cross-chain message. |
| 23 | + |
| 24 | +**Execute the script in your command line:** |
| 25 | + |
| 26 | +```bash |
| 27 | +./dist/ccip-tools-ts show <sourceTransactionHash> --page 500 |
| 28 | +``` |
| 29 | + |
| 30 | +**The script requires the following parameters:** |
| 31 | + |
| 32 | +- `sourceTransactionHash`: Transaction hash of the request (source) message. For example, the transaction hash on the _Avalanche Fuji_ network in the [Transfer Tokens between EOAs](/ccip/tutorials/evm/offchain/transfer-tokens-from-eoa#before-you-begin) tutorial. |
| 33 | + |
| 34 | +<Aside type="note" title="Note"> |
| 35 | + The `--page` option is used to limit the number of blocks to search for the message. The default value is `10000` |
| 36 | + which could result in an error due to RPC limitations. Setting it to `500` is a good practice to avoid such issues. |
| 37 | +</Aside> |
| 38 | + |
| 39 | +**Example Usage:** |
| 40 | + |
| 41 | +If you initiated a transaction from _Avalanche Fuji_ to _Ethereum Sepolia_ and received the source transaction hash, you can check the status of your CCIP message with the following command: |
| 42 | + |
| 43 | +```text |
| 44 | +$ ./src/index.ts show 0x980dacf245f9c6919678219e97d6ad20e0c1964795ec3801e688315f1f18defd --page 500 |
| 45 | +
|
| 46 | +Lane: |
| 47 | +┌────────────────┬──────────────────────────────────────────────┬────────────────────────────┐ |
| 48 | +│ (index) │ source │ dest │ |
| 49 | +├────────────────┼──────────────────────────────────────────────┼────────────────────────────┤ |
| 50 | +│ name │ 'avalanche-testnet-fuji' │ 'ethereum-testnet-sepolia' │ |
| 51 | +│ chainId │ 43113 │ 11155111 │ |
| 52 | +│ chainSelector │ 14767482510784806043n │ 16015286601757825753n │ |
| 53 | +│ onRamp/version │ '0x75b9a75Ee1fFef6BE7c4F842a041De7c6153CF4E' │ '1.5.0' │ |
| 54 | +└────────────────┴──────────────────────────────────────────────┴────────────────────────────┘ |
| 55 | +Request (source): |
| 56 | +┌─────────────────┬──────────────────────────────────────────────────────────────────────┐ |
| 57 | +│ (index) │ Values │ |
| 58 | +├─────────────────┼──────────────────────────────────────────────────────────────────────┤ |
| 59 | +│ messageId │ '0x1ce5213bf9880b18be7f44d5ab1065e603ec3a83eb1bebf76af366ed3c0de0b3' │ |
| 60 | +│ origin │ '0x8C244f0B2164E6A3BED74ab429B0ebd661Bb14CA' │ |
| 61 | +│ sender │ '0x8C244f0B2164E6A3BED74ab429B0ebd661Bb14CA' │ |
| 62 | +│ receiver │ '0x27d7A69C878F9c8f51f4e53703abCE9bAcd2D9bf' │ |
| 63 | +│ sequenceNumber │ 3835 │ |
| 64 | +│ nonce │ 4 │ |
| 65 | +│ gasLimit │ 200000 │ |
| 66 | +│ transactionHash │ '0x980dacf245f9c6919678219e97d6ad20e0c1964795ec3801e688315f1f18defd' │ |
| 67 | +│ logIndex │ 6 │ |
| 68 | +│ blockNumber │ 40954056 │ |
| 69 | +│ timestamp │ '2025-05-26 16:34:14 (2h8m33s ago)' │ |
| 70 | +│ finalized │ true │ |
| 71 | +│ fee │ '0.040903083926519498 LINK' │ |
| 72 | +│ tokens │ '0.001 CCIP-BnM' │ |
| 73 | +│ data │ '0x' │ |
| 74 | +└─────────────────┴──────────────────────────────────────────────────────────────────────┘ |
| 75 | +Commit (dest): |
| 76 | +┌─────────────────┬──────────────────────────────────────────────────────────────────────┐ |
| 77 | +│ (index) │ Values │ |
| 78 | +├─────────────────┼──────────────────────────────────────────────────────────────────────┤ |
| 79 | +│ merkleRoot │ '0x1ce5213bf9880b18be7f44d5ab1065e603ec3a83eb1bebf76af366ed3c0de0b3' │ |
| 80 | +│ min │ 3835 │ |
| 81 | +│ max │ 3835 │ |
| 82 | +│ origin │ '0x9e587c646d4f4e46B71a02179Fa8951CFB34A382' │ |
| 83 | +│ contract │ '0x139E06b6dBB1a0C41A1686C091795879c943765A' │ |
| 84 | +│ transactionHash │ '0xbda1e294e59910e2929e6aec08e52426a9125c1ac20509b9d5b9441789b746b0' │ |
| 85 | +│ blockNumber │ 8411619 │ |
| 86 | +│ timestamp │ '2025-05-26 16:35:00 (46s after request)' │ |
| 87 | +└─────────────────┴──────────────────────────────────────────────────────────────────────┘ |
| 88 | +Receipts (dest): |
| 89 | +┌─────────────────┬──────────────────────────────────────────────────────────────────────┐ |
| 90 | +│ (index) │ Values │ |
| 91 | +├─────────────────┼──────────────────────────────────────────────────────────────────────┤ |
| 92 | +│ state │ '✅ success' │ |
| 93 | +│ returnData │ '0x' │ |
| 94 | +│ origin │ '0xdA743Ce0Eb7cC541093F030A3126bF9e3d427E93' │ |
| 95 | +│ offRamp │ '0x1DEBa99dC8e2A77832461BD386d83D9FCb133137' │ |
| 96 | +│ transactionHash │ '0xe68ae80ed0b77d6e22f066a08c169c873dd22112ef5f27287bbe85e737c6ec60' │ |
| 97 | +│ logIndex │ 114 │ |
| 98 | +│ blockNumber │ 8411627 │ |
| 99 | +│ timestamp │ '2025-05-26 16:36:36 (2m22s after request)' │ |
| 100 | +└─────────────────┴──────────────────────────────────────────────────────────────────────┘ |
| 101 | +``` |
0 commit comments