Interaction Flow With Fees
Go trhough the complete deployment flow and send an incentivized message.
Now we have all the Smart Contract 📜 set we can start sending incentivized cross-chain messages. Now let complete the flow
- Deploy sender contract on C-Chain
- Deploy receiver contract on
myblockchain
- Approve the sender contract to spend ERC20 funds from the message sender address
- Send the message
Deploy Sender Contract
To deploy the sender contract run:
Deploy Receiver Contract
Now, deploy the receiver contract.
Approve ERC20 Token Expense
👩 The Message Sender (User) requires to approve the Cross-Avalanche L1 dApp as a spender on the ERC20 contract to be used as fee. To do that lets use the function "approve" on our deployed FEE contract.
Verify message was received on Avalanche L1
Success! The message was received on the destination chain while incentivizing the Relayer.