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 BurnMintERC677 contract
- Set Parameters
Configure your token by setting these required parameters in Remix:
name
string
The full name of your token that users will see
"My Cross Chain Token"
symbol
string
A short ticker symbol for your token (usually 3-4 letters)
"MCCT"
decimals
uint8
Number of decimal places your token will support (18 is standard)
18
maxSupply
uint256
The maximum amount of tokens that can ever exist (0 means unlimited)
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
registerAdminViaOwner
:registerAdminViaOwner
Register yourself as the CCIP administrator for your token⚠️ You must be the token owner to call this functionParameters:token
address
The 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
:acceptAdminRole
Accept your role as CCIP administrator for your token⚠️ Must be called after registerAdminViaOwner is confirmedParameters:token
address
The 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:
token
address
Address of the token to be minted/burned
localTokenDecimals
uint8
Number of decimals for your token
18
allowlist
address[]
Addresses allowed to transfer tokens (empty array for no restrictions)
[]
rmnProxy
address
Address of the RMN contract
[Select source blockchain first]
router
address
Address 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
:setPool
Enable your token for CCIP by registering its token pool⚠️ You must be the token admin to call this functionParameters:localToken
address
The token to enable for CCIP
pool
address
The 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 BurnMintERC677 contract
- Set Parameters
Configure your token by setting these required parameters in Remix:
name
string
The full name of your token that users will see
"My Cross Chain Token"
symbol
string
A short ticker symbol for your token (usually 3-4 letters)
"MCCT"
decimals
uint8
Number of decimal places your token will support (18 is standard)
18
maxSupply
uint256
The maximum amount of tokens that can ever exist (0 means unlimited)
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
registerAdminViaOwner
:registerAdminViaOwner
Register yourself as the CCIP administrator for your token⚠️ You must be the token owner to call this functionParameters:token
address
The 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
:acceptAdminRole
Accept your role as CCIP administrator for your token⚠️ Must be called after registerAdminViaOwner is confirmedParameters:token
address
The 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:
token
address
Address of the token to be minted/burned
localTokenDecimals
uint8
Number of decimals for your token
18
allowlist
address[]
Addresses allowed to transfer tokens (empty array for no restrictions)
[]
rmnProxy
address
Address of the RMN contract
[Select destination blockchain first]
router
address
Address 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
:setPool
Enable your token for CCIP by registering its token pool⚠️ You must be the token admin to call this functionParameters:localToken
address
The token to enable for CCIP
pool
address
The 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 BurnMintERC677 at
- Click to open the contract details
- Call
grantMintAndBurnRoles
:grantMintAndBurnRoles
Grant mint and burn privileges to your token pool for cross-chain transfers⚠️ You must be the token contract owner to call this functionParameters:burnAndMinter
address
Address to grant mint and burn roles to (your token pool)
- Confirm the transaction in MetaMask
- In the list of deployed contracts, select the BurnMintERC677 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
- Click the contract to view its functions
- Verify Remote Token
- Call
getRemoteToken
:getRemoteToken
Retrieves the ABI-encoded address of your token on the remote chainParameters:remoteChainSelector
uint64
Chain 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
:getRemotePools
Returns all registered token pools on the remote chainParameters:remoteChainSelector
uint64
Chain 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
:getCurrentInboundRateLimiterState
Verifies your inbound transfer rate limitsParameters:remoteChainSelector
uint64
Chain selector for undefined
Returns:TokenBucketCurrent state of the inbound rate limiterExpected Result:Tokens0
Last UpdatedCurrent block timestamp
Statusfalse
Capacity0
Rate0
- Call
getCurrentOutboundRateLimiterState
:getCurrentOutboundRateLimiterState
Verifies your outbound transfer rate limitsParameters:remoteChainSelector
uint64
Chain selector for undefined
Returns:TokenBucketCurrent state of the outbound rate limiterExpected Result:Tokens0
Last UpdatedCurrent block timestamp
Statusfalse
Capacity0
Rate0
- Call
Destination Chain Configuration
- Grant Burn and Mint Privileges
- In the list of deployed contracts, select the BurnMintERC677 at
- Click to open the contract details
- Call
grantMintAndBurnRoles
:grantMintAndBurnRoles
Grant mint and burn privileges to your token pool for cross-chain transfers⚠️ You must be the token contract owner to call this functionParameters:burnAndMinter
address
Address to grant mint and burn roles to (your token pool)
- Confirm the transaction in MetaMask
- In the list of deployed contracts, select the BurnMintERC677 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
- Click the contract to view its functions
- Verify Remote Token
- Call
getRemoteToken
:getRemoteToken
Retrieves the ABI-encoded address of your token on the remote chainParameters:remoteChainSelector
uint64
Chain 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
:getRemotePools
Returns all registered token pools on the remote chainParameters:remoteChainSelector
uint64
Chain 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
:getCurrentInboundRateLimiterState
Verifies your inbound transfer rate limitsParameters:remoteChainSelector
uint64
Chain selector for undefined
Returns:TokenBucketCurrent state of the inbound rate limiterExpected Result:Tokens0
Last UpdatedCurrent block timestamp
Statusfalse
Capacity0
Rate0
- Call
getCurrentOutboundRateLimiterState
:getCurrentOutboundRateLimiterState
Verifies your outbound transfer rate limitsParameters:remoteChainSelector
uint64
Chain selector for undefined
Returns:TokenBucketCurrent state of the outbound rate limiterExpected Result:Tokens0
Last UpdatedCurrent block timestamp
Statusfalse
Capacity0
Rate0
- Call