logoAcademy

Create the Sender Contract

Deploy roundtrip sender contract

Go ahead and deploy the sender contract on the C-Chain.

Adapt the Sender Contract

Perform the changes on senderOnCChain.sol described in the previous section.

Don't forget to replace the destinationBlockchainID with the Blockchain ID (HEX) from your Avalanche L1!

Deploy the Sender Contract

forge create --rpc-url local-c --private-key $PK contracts/interchain-messaging/send-roundtrip/senderOnCChain.sol:SenderOnCChain
[⠊] Compiling...
[⠢] Compiling 1 files with Solc 0.8.18
[⠆] Solc 0.8.18 finished in 165.79ms
Compiler run successful!
Deployer: 0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC
Deployed to: 0xA4cD3b0Eb6E5Ab5d8CE4065BcCD70040ADAB1F00
Transaction hash: 0x4f41cf829fbc525b64d9773c41dc9fabb3b93dfd03bf6c1568dcc4a4c6bdeb1a

Update the Sender Address

Overwrite the SENDER_ADDRESS environment variable with the new address:

export SENDER_ADDRESS=0xA4cD3b0Eb6E5Ab5d8CE4065BcCD70040ADAB1F00

On this page