Incentivize an AWM relayer
Add incentives to the basic send-receive contracts.
Add Incentives to our Sender Contract
Now that we have an ERC20 token deployed and some of those tokens in our account to incentivize our relayer, let's include the incentive in our Sender contract.
In the following contract, make sure to update destinationBlockchainID
with your current deployment
Notice, our contract implementing Fees now needs to include the functionality we described in the fee flow section:
- Import
IERC20
and create the fee contract interface instance - 📜The Cross-Avalanche L1 dApp transfers the ERC20 fee amount to the control of the Cross-Chain dApp contract.
- 📜Cross-Avalanche L1 dApp needs to implement the approval for the Interchain Messaging contract of these ERC20 tokens.
- Include the
TeleporterFeeInfo
struct in the message.