Messaging
Send your first interchain message in under 5 minutes
This tutorial demonstrates how to:
$RECIPIENT
: The address of theTestRecipient
contract on the destination chain, left padded to abytes32
. In our case:0x00000000000000000000000036FdA966CfffF8a9Cdc814f546db0e6378bFef35
Using Metamask
Using Cast
- 2.Under the
Contract
tab, find theWrite as Proxy
button. - 3.Click on the
Connect to Web3
button to connect your Wallet (i.e. Metamask). Make sure that you are on the correct network. - 4.Expand the
dispatch
box. - 5.For destination domain, enter
$DESTINATION_DOMAIN
. You could use137
to send to mainnet Polygon, or see other Domain identifiers. - 6.For the recipient address, enter
$RECIPIENT
. Remember to make sure to zero-pad this to abytes32
if you are using your own address. Alternatively, you can use0x00000000000000000000000036FdA966CfffF8a9Cdc814f546db0e6378bFef35
(our test recipient address). - 7.For the message body, enter whatever you like! A string-to-hex converter website can help you write your message if you want to send a human-readable message. In the example below, we sent the "Hello World" string as
0x48656c6c6f20576f726c64
- 8.Submit the transaction via your wallet/Metamask

How to send an interchain message using Etherscan + Metamask
You can call
Mailbox.dispatch()
directly using cast
. Make sure that you have a valid RPC URL for the origin chain and a private key with which you can pay for gas.cast send $MAILBOX_ADDRESS "dispatch(uint32,bytes32,bytes)" $DESTINATION_DOMAIN $RECIPIENT $(cast --from-utf8 "your message") --rpc-url $RPC_URL
--private-key $PRIVATE_KEY
For your transfer to be executed on the destination chain, you must Manually pay for interchain gas, using
100000
for the gas amountLast modified 24d ago