Deploy & Register Cross-Chain Tokens with Remix IDE
Overview
This tutorial guides you through the process of enabling two tokens for cross-chain transfers. Upon completion, the system will allow users to transfer tokens seamlessly between selected blockchains.
Expected Outcomes
- Two Tokens: Deploy and configure one token on each blockchain
- Registration: Register the tokens in CCIP on both blockchains
- Two Token Pools: Deploy and set up the necessary token pools to enable cross-chain transfers
Tutorial Structure
This interactive tutorial provides a structured learning experience:
Progress Tracking
- Visual Dashboard: A navigation panel tracks progress
- Clear Checkpoints: Automatic marking of completed steps
- Address Management: System tracking of deployed contracts
- Guided Flow: Logically sequenced steps
Success Guidelines
✓ Complete steps sequentially - each step builds on previous work
✓ Maintain a record of contract addresses for reference
✓ Mark your progress using the provided checkboxes
✓ Input contract addresses as prompted
Tools Needed
Web Browser
Any modern web browser
Remix IDE
Remix IDE - Browser-based Ethereum IDE for smart contract development and deployment
MetaMask
MetaMask - Blockchain wallet for connecting to blockchains and signing transactions
Before You Begin
1. Web Browser Setup
Configure your browser with the required extensions and networks
2. Native Gas Tokens
Acquire tokens for transaction fees
Select Your Blockchains
Choose the source and destination blockchains for your cross-chain token
Import Required Contracts
Import and compile the token contracts in Remix IDE
- Open the pre-configured token contract in Remix:
- Wait a few seconds for Remix to automatically compile all contracts.
Tutorial
Source Blockchain Setup
- Configure Remix
- Open the "Deploy & Run Transactions" tab
- Set Environment to "Injected Provider - MetaMask"
- Select BurnMintERC20 contract
- Set Parameters
Configure your token by setting these required parameters in Remix:
namestringThe full name of your token that users will see
"My Cross Chain Token"symbolstringA short ticker symbol for your token (usually 3-4 letters)
"MCCT"decimalsuint8Number of decimal places your token will support (18 is standard)
18maxSupplyuint256The maximum amount of tokens that can ever exist (0 means unlimited)
0preMintuint256The amount of tokens to be minted to the owner at the time of deployment
0 - Deploy Contract
- Click "Deploy" and confirm in MetaMask
- Copy your token address from "Deployed Contracts"
- Verify Contract (Optional)
- Access the Blockchain ExplorerBlockchain explorer information will be available once you select a network.
- Verify Using Remix IDERemix IDE Guide
Official guide for verifying contracts using the Remix IDE verification plugin
View Guide ↗Chainlink TutorialStep-by-step tutorial for contract verification on blockchain explorers
View Tutorial ↗ - Confirm Verification
- Return to your contract on the blockchain explorer
- Look for a green checkmark ✓ or "Verified" status
- You should now see your contract's source code in the "Code" tab
Contract verification link will be available once you select a network.
- Access the Blockchain Explorer
- Register as Admin
- In the "Deploy & Run Transactions" tab, select the RegistryModuleOwnerCustom contract
- Click "At Address" with:Contract: RegistryModuleOwnerCustom
[Select source blockchain first] - The RegistryModuleOwnerCustom will be displayed in the "Deployed Contracts" section
- Click on the RegistryModuleOwnerCustom contract address to open the contract details
- Call
registerAdminViaGetCCIPAdmin:registerAdminViaGetCCIPAdminRegister yourself as the CCIP administrator for your token⚠️ You must be the CCIP token administrator (i.e., the default CCIP admin) to call this functionParameters:tokenaddressThe token contract you want to administer
Your deployed token address - Confirm the transaction in MetaMask
- Accept Admin Role
- In the "Deploy & Run Transactions" tab, select TokenAdminRegistry contract
- Click "At Address" with:Contract: TokenAdminRegistry
[Select source blockchain first] - The TokenAdminRegistry will be displayed in the "Deployed Contracts" section
- Click on the TokenAdminRegistry contract address to open the contract details
- Call
acceptAdminRole:acceptAdminRoleAccept your role as CCIP administrator for your token⚠️ Must be called after registerAdminViaGetCCIPAdmin is confirmedParameters:tokenaddressThe token contract to accept administrator role for
Your deployed token address - Confirm the transaction in MetaMask
- Choose Pool TypeSelect the appropriate pool type based on your token's characteristics and requirements
- Configure Remix
- Open the "Deploy & Run Transactions" tab
- Set Environment to "Injected Provider - MetaMask"
- Select BurnMintTokenPool contract
- Set Parameters
Configure your pool by setting these required parameters in Remix:
tokenaddressAddress of the token to be minted/burned
localTokenDecimalsuint8Number of decimals for your token
18allowlistaddress[]Addresses allowed to transfer tokens (empty array for no restrictions)
[]rmnProxyaddressAddress of the RMN contract
[Select source blockchain first]routeraddressAddress of the CCIP Router contract
[Select source blockchain first] - Deploy Contract
- Click "Deploy" and confirm in MetaMask
- Copy your pool address from "Deployed Contracts"
- Verify Contract (Optional)
- Access the Blockchain ExplorerBlockchain explorer information will be available once you select a network.
- Verify Using Remix IDERemix IDE Guide
Official guide for verifying contracts using the Remix IDE verification plugin
View Guide ↗Chainlink TutorialStep-by-step tutorial for contract verification on blockchain explorers
View Tutorial ↗ - Confirm Verification
- Return to your contract on the blockchain explorer
- Look for a green checkmark ✓ or "Verified" status
- You should now see your contract's source code in the "Code" tab
Contract verification link will be available once you select a network.
- Access the Blockchain Explorer
- Configure Registry
- In the "Deploy & Run Transactions" tab, select the TokenAdminRegistry contract in the Contracts drop-down list.
- Next to the At Address button, fill in the following contract address, and then click the At Address button.Contract: TokenAdminRegistry
[Select source blockchain first] - Select the TokenAdminRegistry contract to expand its details
- Call
setPool:setPoolEnable your token for CCIP by registering its token pool⚠️ You must be the token admin to call this functionParameters:localTokenaddressThe token to enable for CCIP
pooladdressThe token pool that will handle cross-chain transfers
- Confirm the transaction in MetaMask
Destination Blockchain Setup
- Configure Remix
- Open the "Deploy & Run Transactions" tab
- Set Environment to "Injected Provider - MetaMask"
- Select BurnMintERC20 contract
- Set Parameters
Configure your token by setting these required parameters in Remix:
namestringThe full name of your token that users will see
"My Cross Chain Token"symbolstringA short ticker symbol for your token (usually 3-4 letters)
"MCCT"decimalsuint8Number of decimal places your token will support (18 is standard)
18maxSupplyuint256The maximum amount of tokens that can ever exist (0 means unlimited)
0preMintuint256The amount of tokens to be minted to the owner at the time of deployment
0 - Deploy Contract
- Click "Deploy" and confirm in MetaMask
- Copy your token address from "Deployed Contracts"
- Verify Contract (Optional)
- Access the Blockchain ExplorerBlockchain explorer information will be available once you select a network.
- Verify Using Remix IDERemix IDE Guide
Official guide for verifying contracts using the Remix IDE verification plugin
View Guide ↗Chainlink TutorialStep-by-step tutorial for contract verification on blockchain explorers
View Tutorial ↗ - Confirm Verification
- Return to your contract on the blockchain explorer
- Look for a green checkmark ✓ or "Verified" status
- You should now see your contract's source code in the "Code" tab
Contract verification link will be available once you select a network.
- Access the Blockchain Explorer
- Register as Admin
- In the "Deploy & Run Transactions" tab, select the RegistryModuleOwnerCustom contract
- Click "At Address" with:Contract: RegistryModuleOwnerCustom
[Select destination blockchain first] - The RegistryModuleOwnerCustom will be displayed in the "Deployed Contracts" section
- Click on the RegistryModuleOwnerCustom contract address to open the contract details
- Call
registerAdminViaGetCCIPAdmin:registerAdminViaGetCCIPAdminRegister yourself as the CCIP administrator for your token⚠️ You must be the CCIP token administrator (i.e., the default CCIP admin) to call this functionParameters:tokenaddressThe token contract you want to administer
Your deployed token address - Confirm the transaction in MetaMask
- Accept Admin Role
- In the "Deploy & Run Transactions" tab, select TokenAdminRegistry contract
- Click "At Address" with:Contract: TokenAdminRegistry
[Select destination blockchain first] - The TokenAdminRegistry will be displayed in the "Deployed Contracts" section
- Click on the TokenAdminRegistry contract address to open the contract details
- Call
acceptAdminRole:acceptAdminRoleAccept your role as CCIP administrator for your token⚠️ Must be called after registerAdminViaGetCCIPAdmin is confirmedParameters:tokenaddressThe token contract to accept administrator role for
Your deployed token address - Confirm the transaction in MetaMask
- Choose Pool TypeSelect the appropriate pool type based on your token's characteristics and requirements
- Configure Remix
- Open the "Deploy & Run Transactions" tab
- Set Environment to "Injected Provider - MetaMask"
- Select BurnMintTokenPool contract
- Set Parameters
Configure your pool by setting these required parameters in Remix:
tokenaddressAddress of the token to be minted/burned
localTokenDecimalsuint8Number of decimals for your token
18allowlistaddress[]Addresses allowed to transfer tokens (empty array for no restrictions)
[]rmnProxyaddressAddress of the RMN contract
[Select destination blockchain first]routeraddressAddress of the CCIP Router contract
[Select destination blockchain first] - Deploy Contract
- Click "Deploy" and confirm in MetaMask
- Copy your pool address from "Deployed Contracts"
- Verify Contract (Optional)
- Access the Blockchain ExplorerBlockchain explorer information will be available once you select a network.
- Verify Using Remix IDERemix IDE Guide
Official guide for verifying contracts using the Remix IDE verification plugin
View Guide ↗Chainlink TutorialStep-by-step tutorial for contract verification on blockchain explorers
View Tutorial ↗ - Confirm Verification
- Return to your contract on the blockchain explorer
- Look for a green checkmark ✓ or "Verified" status
- You should now see your contract's source code in the "Code" tab
Contract verification link will be available once you select a network.
- Access the Blockchain Explorer
- Configure Registry
- In the "Deploy & Run Transactions" tab, select the TokenAdminRegistry contract in the Contracts drop-down list.
- Next to the At Address button, fill in the following contract address, and then click the At Address button.Contract: TokenAdminRegistry
[Select destination blockchain first] - Select the TokenAdminRegistry contract to expand its details
- Call
setPool:setPoolEnable your token for CCIP by registering its token pool⚠️ You must be the token admin to call this functionParameters:localTokenaddressThe token to enable for CCIP
pooladdressThe token pool that will handle cross-chain transfers
- Confirm the transaction in MetaMask
Configure Cross-Chain Communication
Source Chain Configuration
- Grant Burn and Mint Privileges
- In the list of deployed contracts, select the BurnMintERC20 at
- Click to open the contract details
- Call
grantMintAndBurnRoles:grantMintAndBurnRolesGrant mint and burn privileges to your token pool for cross-chain transfers⚠️ You must be the token contract owner to call this functionParameters:burnAndMinteraddressAddress to grant mint and burn roles to (your token pool)
- Confirm the transaction in MetaMask
- In the list of deployed contracts, select the BurnMintERC20 at
- Configure Pool⚠️ Please select valid blockchains first⚠️ Please deploy your token pool before proceeding⚡️
Current Chain Prerequisites
- Select valid blockchains for the transfer
- Deploy your token pool on the current chain
- Verify Configuration
- Open the "Deploy & Run Transactions" tab in Remix
- Select your token pool contract:LockReleaseTokenPool at
- Click the contract to view its functions
- Verify Remote Token
- Call
getRemoteToken:getRemoteTokenRetrieves the ABI-encoded address of your token on the remote chainParameters:remoteChainSelectoruint64Chain selector for undefined
Returns:bytesABI-encoded address of the token on the remote chainExpected Result:Waiting for remote token address...
- Call
- Verify Remote Pools
- Call
getRemotePools:getRemotePoolsReturns all registered token pools on the remote chainParameters:remoteChainSelectoruint64Chain selector for undefined
Returns:bytes[]Array of ABI-encoded addresses of all registered pools on the remote chainExpected Result:Waiting for remote pool address...
- Call
- Verify Rate Limiters
- Call
getCurrentInboundRateLimiterState:getCurrentInboundRateLimiterStateVerifies your inbound transfer rate limitsParameters:remoteChainSelectoruint64Chain selector for undefined
Returns:TokenBucketCurrent state of the inbound rate limiterExpected Result:Tokens0Last UpdatedCurrent block timestampStatusfalseCapacity0Rate0 - Call
getCurrentOutboundRateLimiterState:getCurrentOutboundRateLimiterStateVerifies your outbound transfer rate limitsParameters:remoteChainSelectoruint64Chain selector for undefined
Returns:TokenBucketCurrent state of the outbound rate limiterExpected Result:Tokens0Last UpdatedCurrent block timestampStatusfalseCapacity0Rate0
- Call
Destination Chain Configuration
- Grant Burn and Mint Privileges
- In the list of deployed contracts, select the BurnMintERC20 at
- Click to open the contract details
- Call
grantMintAndBurnRoles:grantMintAndBurnRolesGrant mint and burn privileges to your token pool for cross-chain transfers⚠️ You must be the token contract owner to call this functionParameters:burnAndMinteraddressAddress to grant mint and burn roles to (your token pool)
- Confirm the transaction in MetaMask
- In the list of deployed contracts, select the BurnMintERC20 at
- Configure Pool⚠️ Please select valid blockchains first⚠️ Please deploy your token pool before proceeding⚡️
Current Chain Prerequisites
- Select valid blockchains for the transfer
- Deploy your token pool on the current chain
- Verify Configuration
- Open the "Deploy & Run Transactions" tab in Remix
- Select your token pool contract:LockReleaseTokenPool at
- Click the contract to view its functions
- Verify Remote Token
- Call
getRemoteToken:getRemoteTokenRetrieves the ABI-encoded address of your token on the remote chainParameters:remoteChainSelectoruint64Chain selector for undefined
Returns:bytesABI-encoded address of the token on the remote chainExpected Result:Waiting for remote token address...
- Call
- Verify Remote Pools
- Call
getRemotePools:getRemotePoolsReturns all registered token pools on the remote chainParameters:remoteChainSelectoruint64Chain selector for undefined
Returns:bytes[]Array of ABI-encoded addresses of all registered pools on the remote chainExpected Result:Waiting for remote pool address...
- Call
- Verify Rate Limiters
- Call
getCurrentInboundRateLimiterState:getCurrentInboundRateLimiterStateVerifies your inbound transfer rate limitsParameters:remoteChainSelectoruint64Chain selector for undefined
Returns:TokenBucketCurrent state of the inbound rate limiterExpected Result:Tokens0Last UpdatedCurrent block timestampStatusfalseCapacity0Rate0 - Call
getCurrentOutboundRateLimiterState:getCurrentOutboundRateLimiterStateVerifies your outbound transfer rate limitsParameters:remoteChainSelectoruint64Chain selector for undefined
Returns:TokenBucketCurrent state of the outbound rate limiterExpected Result:Tokens0Last UpdatedCurrent block timestampStatusfalseCapacity0Rate0
- Call