Send your first interchain message
This tutorial demonstrates how to send an interchain message to a pre-deployed TestRecipient
contract.
Sending a message is a simple matter of calling Mailbox.dispatch
. Make sure you have an account with funds on the origin chain.
origin:
destination:
body:
- Hyperlane CLI
- Cast
- Explorer
Install the CLI:Send the message:
npm install -g @hyperlane-xyz/cli
hyperlane send message --origin alfajores --destination arbitrumsepolia --body "Hello, world"
Install Send the message:
cast
:curl -L https://foundry.paradigm.xyz | bash
cast send 0xEf9F292fcEBC3848bF4bB92a96a04F9ECBb78E59 "dispatch(uint32,bytes32,bytes)" 421614 0x0000000000000000000000006489d13AcAd3B8dce4c5B31f375DE4f9451E7b38 $(cast --from-utf8 "Hello, world") --rpc-url https://alfajores-forno.celo-testnet.org --value 0.01ether
- Navigate to the explorer.celo.org
dispatch
interface - Click on the
Connect to Web3
button to connect your Wallet. Make sure you are onalfajores
. - Fill in value:
0.01
, destination:421614
, recipient:0x0000000000000000000000006489d13AcAd3B8dce4c5B31f375DE4f9451E7b38
, and message the hex representation of "Hello, world". For example if you havecast
installed,cast --from-utf8 "Hello, world"
returns0x48656c6c6f2c20776f726c64
. - Click the
Write
button to submit the transaction!
tip
You can watch the progress of your message on explorer.hyperlane.xyz by searching for the transaction hash of your Mailbox.dispatch
call.
Check the result
The TestRecipient
has the following handle implementation:
- Solidity
function handle(
uint32 _origin,
bytes32 _sender,
bytes calldata _data
) external payable virtual override {
emit ReceivedMessage(_origin, _sender, msg.value, string(_data));
lastSender = _sender;
lastData = _data;
}
Check the logs to see your message delivery!
Testnet TestRecipient
Addresses
Chain | Domain | Address | Explorer |
---|---|---|---|
Alfajores | 44787 | 0x6489d13AcAd3B8dce4c5B31f375DE4f9451E7b38 | explorer.celo.org |
Arbitrum Sepolia | 421614 | 0x6c13643B3927C57DB92c790E4E3E7Ee81e13f78C | sepolia.arbiscan.io |
Arcadia Testnet | 1098411886 | 0xfBeaF07855181f8476B235Cf746A7DF3F9e386Fb | explorer.khalani.network |
Base Sepolia | 84532 | 0x783c4a0bB6663359281aD4a637D5af68F83ae213 | sepolia.basescan.org |
Berachain bArtio | 80084 | 0xe0B988062A0C6492177d64823Ab95a9c256c2a5F | bartio.beratrail.io |
BSC Testnet | 97 | 0xfbcD1c00a3d809f36cC1A15918694B17B32c0b6c | testnet.bscscan.com |
Camp Network Testnet V2 | 325000 | 0x7483faD0Bc297667664A43A064bA7c9911659f57 | camp-network-testnet.blockscout.com |
Citrea Testnet | 5115 | 0xA2cf52064c921C11adCd83588CbEa08cc3bfF5d8 | explorer.testnet.citrea.xyz |
Eco Testnet | 471923 | 0x783c4a0bB6663359281aD4a637D5af68F83ae213 | eco-testnet.explorer.caldera.xyz |
Form Testnet | 132902 | 0x7483faD0Bc297667664A43A064bA7c9911659f57 | explorer.form.network |
Fuji | 43113 | 0x44a7e1d76fD8AfA244AdE7278336E3D5C658D398 | testnet.snowtrace.io |
Holesky | 17000 | 0x86fb9F1c124fB20ff130C41a79a432F770f67AFD | holesky.etherscan.io |
Hyperliquid EVM Testnet | 998 | 0xB057Fb841027a8554521DcCdeC3c3474CaC99AB5 | explorer.hyperlend.finance |
Odyssey Testnet | 911867 | 0x5e65279Fb7293a058776e37587398fcc3E9184b1 | odyssey-explorer.ithaca.xyz |
Optimism Sepolia | 11155420 | 0x783c4a0bB6663359281aD4a637D5af68F83ae213 | sepolia-optimistic.etherscan.io |
Plume Testnet | 161221135 | 0xe0B988062A0C6492177d64823Ab95a9c256c2a5F | plume-testnet.explorer.caldera.xyz |
Polygon Amoy | 80002 | 0x04438ef7622f5412f82915F59caD4f704C61eA48 | amoy.polygonscan.com |
Scroll Sepolia | 534351 | 0xa3AB7E6cE24E6293bD5320A53329Ef2f4DE73fCA | sepolia.scrollscan.dev |
Sepolia | 11155111 | 0xeDc1A3EDf87187085A3ABb7A9a65E1e7aE370C07 | sepolia.etherscan.io |
Soneium Minato Testnet | 1946 | 0x7483faD0Bc297667664A43A064bA7c9911659f57 | explorer-testnet.soneium.org |
Sonic Testnet | 64165 | 0x01812D60958798695391dacF092BAc4a715B1718 | testnet.soniclabs.com |
SUAVE Toliman Testnet | 33626250 | 0x7483faD0Bc297667664A43A064bA7c9911659f57 | explorer.toliman.suave.flashbots.net |
Superposition Testnet | 98985 | 0xAb9B273366D794B7F80B4378bc8Aaca75C6178E2 | testnet-explorer.superposition.so |
Tangle Testnet | 3799 | 0xE73cdFFcE97AD56723dbA6145a3cC0Dd3aeF112f | testnet-explorer.tangle.tools |
Unichain Testnet | 1301 | 0x01812D60958798695391dacF092BAc4a715B1718 | unichain-sepolia.blockscout.com |
Testnet Mailbox
Addresses
Chain | Domain | Address | Explorer |
---|---|---|---|
Alfajores | 44787 | 0xEf9F292fcEBC3848bF4bB92a96a04F9ECBb78E59 | explorer.celo.org |
Arbitrum Sepolia | 421614 | 0x598facE78a4302f11E3de0bee1894Da0b2Cb71F8 | sepolia.arbiscan.io |
Arcadia Testnet | 1098411886 | 0xDDcFEcF17586D08A5740B7D91735fcCE3dfe3eeD | explorer.khalani.network |
Base Sepolia | 84532 | 0x6966b0E55883d49BFB24539356a2f8A673E02039 | sepolia.basescan.org |
Berachain bArtio | 80084 | 0xDDcFEcF17586D08A5740B7D91735fcCE3dfe3eeD | bartio.beratrail.io |
BSC Testnet | 97 | 0xF9F6F5646F478d5ab4e20B0F910C92F1CCC9Cc6D | testnet.bscscan.com |
Camp Network Testnet V2 | 325000 | 0xDDcFEcF17586D08A5740B7D91735fcCE3dfe3eeD | camp-network-testnet.blockscout.com |
Citrea Testnet | 5115 | 0xB08d78F439e55D02C398519eef61606A5926245F | explorer.testnet.citrea.xyz |
Eco Testnet | 471923 | 0x6966b0E55883d49BFB24539356a2f8A673E02039 | eco-testnet.explorer.caldera.xyz |
Form Testnet | 132902 | 0xDDcFEcF17586D08A5740B7D91735fcCE3dfe3eeD | explorer.form.network |
Fuji | 43113 | 0x5b6CFf85442B851A8e6eaBd2A4E4507B5135B3B0 | testnet.snowtrace.io |
Holesky | 17000 | 0x46f7C5D896bbeC89bE1B19e4485e59b4Be49e9Cc | holesky.etherscan.io |
Hyperliquid EVM Testnet | 998 | 0x589C201a07c26b4725A4A829d772f24423da480B | explorer.hyperlend.finance |
Odyssey Testnet | 911867 | 0xDDcFEcF17586D08A5740B7D91735fcCE3dfe3eeD | odyssey-explorer.ithaca.xyz |
Optimism Sepolia | 11155420 | 0x6966b0E55883d49BFB24539356a2f8A673E02039 | sepolia-optimistic.etherscan.io |
Plume Testnet | 161221135 | 0x33dB966328Ea213b0f76eF96CA368AB37779F065 | plume-testnet.explorer.caldera.xyz |
Polygon Amoy | 80002 | 0x54148470292C24345fb828B003461a9444414517 | amoy.polygonscan.com |
Scroll Sepolia | 534351 | 0x3C5154a193D6e2955650f9305c8d80c18C814A68 | sepolia.scrollscan.dev |
Sepolia | 11155111 | 0xfFAEF09B3cd11D9b20d1a19bECca54EEC2884766 | sepolia.etherscan.io |
Soneium Minato Testnet | 1946 | 0xDDcFEcF17586D08A5740B7D91735fcCE3dfe3eeD | explorer-testnet.soneium.org |
Sonic Testnet | 64165 | 0xDDcFEcF17586D08A5740B7D91735fcCE3dfe3eeD | testnet.soniclabs.com |
SUAVE Toliman Testnet | 33626250 | 0xDDcFEcF17586D08A5740B7D91735fcCE3dfe3eeD | explorer.toliman.suave.flashbots.net |
Superposition Testnet | 98985 | 0x6966b0E55883d49BFB24539356a2f8A673E02039 | testnet-explorer.superposition.so |
Tangle Testnet | 3799 | 0x87100b0E64B3baBD43F3FCB26A6edc4395e2D9df | testnet-explorer.tangle.tools |
Unichain Testnet | 1301 | 0xDDcFEcF17586D08A5740B7D91735fcCE3dfe3eeD | unichain-sepolia.blockscout.com |