Deploy Fee Token Contract

Deploy an ERC20 to work as the Fee Token for incentives.

To add incentives for relayers, we need an ERC20 token on the source chain (Fuji C-Chain). We'll deploy a simple ERC20 token that will be used to pay relayers for delivering our cross-chain messages.

Logo

Deploy ERC20 Token

Deploy an ERC20 token contract for testing.

This will deploy an ERC20 token contract to your connected network (Chain ID: 0). You can use this token for testing token transfers and other ERC20 interactions, where a total supply of 1,000,000 tokens will be minted to your wallet - view the contract source code

To deploy more custom ERC20 tokens, you can use the OpenZeppelin ERC20 Contract Wizard

Save the Token Address

After deploying the token through the interface above, save the token address to use it in the next steps:

export FEE_TOKEN_ADDRESS=<your-deployed-token-address>

Replace <your-deployed-token-address> with the address shown in the interface after deployment.

Verify Your Token Balance

You can check that you received the initial supply:

cast call --rpc-url fuji-c \
  $FEE_TOKEN_ADDRESS \
  "balanceOf(address)(uint256)" \
  $FUNDED_ADDRESS

The balance should show 1,000,000 * 10^18 tokens (1,000,000 tokens with 18 decimals).

These tokens will be used in the next sections to incentivize relayers to deliver your cross-chain messages.

Is this guide helpful?

On this page