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

Prerequisites
Complete these steps before starting the tutorial

1. Web Browser Setup

Configure your browser with the required extensions and networks

Using Chainlist (Recommended)

  • Visit Chainlist
  • Search for your desired blockchains
  • Click "Add to MetaMask" for each blockchain
Open Chainlist

Manual Configuration

  • Open MetaMask Settings
  • Select Networks
  • Add Network manually
View Guide

2. Native Gas Tokens

Acquire tokens for transaction fees

Blockchain Setup
Choose the source and destination blockchains for your cross-chain token

Select Your Blockchains

Choose the source and destination blockchains for your cross-chain token

Contract Setup
Import and compile the required smart contracts

Import Required Contracts

Import and compile the token contracts in Remix IDE

  1. Open the pre-configured token contract in Remix:
  2. Wait a few seconds for Remix to automatically compile all contracts.

Tutorial

Source Blockchain Setup

Deploy Token Contract
Configure and deploy your token using Remix IDE
Ensure MetaMask is connected to loading...
If you have an existing token that meets the CCT requirements:
  • Skip the "Deploy Token" section
  • Enter your existing token address in the address field below
  • Continue with "Claim and Accept Admin Role"

The tutorial will use your provided token address for subsequent steps.

  1. Configure Remix
    • Open the "Deploy & Run Transactions" tab
    • Set Environment to "Injected Provider - MetaMask"
    • Select BurnMintERC677 contract
  2. Set Parameters

    Configure your token by setting these required parameters in Remix:

    • The name and symbol help identify your token in wallets and applications.
    • Using 18 decimals is standard for most ERC20 tokens (1 token = 1000000000000000000 wei or 1018).
    • If maxSupply is set to 0, it allows unlimited minting. For a limited supply, you must scale the amount according to the number of decimals. For example, if you want a max supply of 1,000 tokens with 18 decimals, the maxSupply would be1000 * 1018 = 1000000000000000000000 (that's 1 followed by 21 zeros).
    namestring

    The full name of your token that users will see

    "My Cross Chain Token"
    symbolstring

    A short ticker symbol for your token (usually 3-4 letters)

    "MCCT"
    decimalsuint8

    Number of decimal places your token will support (18 is standard)

    18
    maxSupplyuint256

    The maximum amount of tokens that can ever exist (0 means unlimited)

    0
  3. Deploy Contract
    • Click "Deploy" and confirm in MetaMask
    • Copy your token address from "Deployed Contracts"
  4. Verify Contract (Optional)
    Contract verification makes your token contract's source code public on the blockchain explorer. This:
    • Builds trust by allowing anyone to audit your code
    • Enables direct interaction through the blockchain explorer
    • Helps other developers understand and integrate with your contract
    1. Access the Blockchain Explorer
      Blockchain explorer information will be available once you select a network.
    2. Verify Using Remix IDE
      Remix IDE Guide

      Official guide for verifying contracts using the Remix IDE verification plugin

      View Guide
      Chainlink Tutorial

      Step-by-step tutorial for contract verification on blockchain explorers

      View Tutorial
    3. Confirm Verification
      1. Return to your contract on the blockchain explorer
      2. Look for a green checkmark ✓ or "Verified" status
      3. You should now see your contract's source code in the "Code" tab
      Contract verification link will be available once you select a network.
Claim and Accept Admin Role
Configure your EOA as CCIP administrator of your token
Ensure MetaMask is connected to loading...
  1. Register as Admin
    The Cross-Chain Token (CCT) standard supports multiple methods for registering as a token administrator. We use registerAdminViaOwner() in this tutorial because our deployed BurnMintERC677 token implements the owner() function. For other token implementations, you might use different registration methods. See the self-service registration documentation for all available options.
    1. In the "Deploy & Run Transactions" tab, select the RegistryModuleOwnerCustom contract
    2. Click "At Address" with:
      Contract: RegistryModuleOwnerCustom[Select source blockchain first]
    3. The RegistryModuleOwnerCustom will be displayed in the "Deployed Contracts" section
    4. Click on the RegistryModuleOwnerCustom contract address to open the contract details
    5. Call registerAdminViaOwner:
      registerAdminViaOwner
      Register yourself as the CCIP administrator for your token
      ⚠️ You must be the token owner to call this function
      Parameters:
      tokenaddress

      The token contract you want to administer

      Your deployed token address
    6. Confirm the transaction in MetaMask
  2. Accept Admin Role
    1. In the "Deploy & Run Transactions" tab, select TokenAdminRegistry contract
    2. Click "At Address" with:
      Contract: TokenAdminRegistry[Select source blockchain first]
    3. The TokenAdminRegistry will be displayed in the "Deployed Contracts" section
    4. Click on the TokenAdminRegistry contract address to open the contract details
    5. Call acceptAdminRole:
      acceptAdminRole
      Accept your role as CCIP administrator for your token
      ⚠️ Must be called after registerAdminViaOwner is confirmed
      Parameters:
      tokenaddress

      The token contract to accept administrator role for

      Your deployed token address
    6. Confirm the transaction in MetaMask
Deploy Token Pool
Choose your pool type and deploy using Remix IDE
Ensure MetaMask is connected to loading...
  1. Choose Pool Type
    Each pool type serves different use cases and has specific requirements. Learn more about pool types and their characteristics in the token pools documentation.
    Select the appropriate pool type based on your token's characteristics and requirements
  2. Configure Remix
    • Open the "Deploy & Run Transactions" tab
    • Set Environment to "Injected Provider - MetaMask"
    • Select BurnMintTokenPool contract
  3. Set Parameters

    Configure your pool by setting these required parameters in Remix:

    tokenaddress

    Address of the token to be minted/burned

    localTokenDecimalsuint8

    Number of decimals for your token

    18
    allowlistaddress[]

    Addresses allowed to transfer tokens (empty array for no restrictions)

    []
    rmnProxyaddress

    Address of the RMN contract

    [Select source blockchain first]
    routeraddress

    Address of the CCIP Router contract

    [Select source blockchain first]
  4. Deploy Contract
    • Click "Deploy" and confirm in MetaMask
    • Copy your pool address from "Deployed Contracts"
  5. Verify Contract (Optional)
    Contract verification makes your pool contract's source code public on the blockchain explorer. This:
    • Builds trust by allowing anyone to audit your code
    • Enables direct interaction through the blockchain explorer
    • Helps other developers understand and integrate with your contract
    1. Access the Blockchain Explorer
      Blockchain explorer information will be available once you select a network.
    2. Verify Using Remix IDE
      Remix IDE Guide

      Official guide for verifying contracts using the Remix IDE verification plugin

      View Guide
      Chainlink Tutorial

      Step-by-step tutorial for contract verification on blockchain explorers

      View Tutorial
    3. Confirm Verification
      1. Return to your contract on the blockchain explorer
      2. Look for a green checkmark ✓ or "Verified" status
      3. You should now see your contract's source code in the "Code" tab
      Contract verification link will be available once you select a network.
Configure Token Registry
Register your token pool in the CCIP registry
Ensure MetaMask is connected to loading...
  1. Configure Registry
    1. In the "Deploy & Run Transactions" tab, select the TokenAdminRegistry contract in the Contracts drop-down list.
    2. 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]
    3. Select the TokenAdminRegistry contract to expand its details
    4. Call setPool:
      setPool
      Enable your token for CCIP by registering its token pool
      ⚠️ You must be the token admin to call this function
      Parameters:
      localTokenaddress

      The token to enable for CCIP

      pooladdress

      The token pool that will handle cross-chain transfers

    5. Confirm the transaction in MetaMask

Destination Blockchain Setup

Deploy Token Contract
Configure and deploy your token using Remix IDE
Ensure MetaMask is connected to loading...
If you have an existing token that meets the CCT requirements:
  • Skip the "Deploy Token" section
  • Enter your existing token address in the address field below
  • Continue with "Claim and Accept Admin Role"

The tutorial will use your provided token address for subsequent steps.

  1. Configure Remix
    • Open the "Deploy & Run Transactions" tab
    • Set Environment to "Injected Provider - MetaMask"
    • Select BurnMintERC677 contract
  2. Set Parameters

    Configure your token by setting these required parameters in Remix:

    • The name and symbol help identify your token in wallets and applications.
    • Using 18 decimals is standard for most ERC20 tokens (1 token = 1000000000000000000 wei or 1018).
    • If maxSupply is set to 0, it allows unlimited minting. For a limited supply, you must scale the amount according to the number of decimals. For example, if you want a max supply of 1,000 tokens with 18 decimals, the maxSupply would be1000 * 1018 = 1000000000000000000000 (that's 1 followed by 21 zeros).
    namestring

    The full name of your token that users will see

    "My Cross Chain Token"
    symbolstring

    A short ticker symbol for your token (usually 3-4 letters)

    "MCCT"
    decimalsuint8

    Number of decimal places your token will support (18 is standard)

    18
    maxSupplyuint256

    The maximum amount of tokens that can ever exist (0 means unlimited)

    0
  3. Deploy Contract
    • Click "Deploy" and confirm in MetaMask
    • Copy your token address from "Deployed Contracts"
  4. Verify Contract (Optional)
    Contract verification makes your token contract's source code public on the blockchain explorer. This:
    • Builds trust by allowing anyone to audit your code
    • Enables direct interaction through the blockchain explorer
    • Helps other developers understand and integrate with your contract
    1. Access the Blockchain Explorer
      Blockchain explorer information will be available once you select a network.
    2. Verify Using Remix IDE
      Remix IDE Guide

      Official guide for verifying contracts using the Remix IDE verification plugin

      View Guide
      Chainlink Tutorial

      Step-by-step tutorial for contract verification on blockchain explorers

      View Tutorial
    3. Confirm Verification
      1. Return to your contract on the blockchain explorer
      2. Look for a green checkmark ✓ or "Verified" status
      3. You should now see your contract's source code in the "Code" tab
      Contract verification link will be available once you select a network.
Claim and Accept Admin Role
Configure your EOA as CCIP administrator of your token
Ensure MetaMask is connected to loading...
  1. Register as Admin
    The Cross-Chain Token (CCT) standard supports multiple methods for registering as a token administrator. We use registerAdminViaOwner() in this tutorial because our deployed BurnMintERC677 token implements the owner() function. For other token implementations, you might use different registration methods. See the self-service registration documentation for all available options.
    1. In the "Deploy & Run Transactions" tab, select the RegistryModuleOwnerCustom contract
    2. Click "At Address" with:
      Contract: RegistryModuleOwnerCustom[Select destination blockchain first]
    3. The RegistryModuleOwnerCustom will be displayed in the "Deployed Contracts" section
    4. Click on the RegistryModuleOwnerCustom contract address to open the contract details
    5. Call registerAdminViaOwner:
      registerAdminViaOwner
      Register yourself as the CCIP administrator for your token
      ⚠️ You must be the token owner to call this function
      Parameters:
      tokenaddress

      The token contract you want to administer

      Your deployed token address
    6. Confirm the transaction in MetaMask
  2. Accept Admin Role
    1. In the "Deploy & Run Transactions" tab, select TokenAdminRegistry contract
    2. Click "At Address" with:
      Contract: TokenAdminRegistry[Select destination blockchain first]
    3. The TokenAdminRegistry will be displayed in the "Deployed Contracts" section
    4. Click on the TokenAdminRegistry contract address to open the contract details
    5. Call acceptAdminRole:
      acceptAdminRole
      Accept your role as CCIP administrator for your token
      ⚠️ Must be called after registerAdminViaOwner is confirmed
      Parameters:
      tokenaddress

      The token contract to accept administrator role for

      Your deployed token address
    6. Confirm the transaction in MetaMask
Deploy Token Pool
Choose your pool type and deploy using Remix IDE
Ensure MetaMask is connected to loading...
  1. Choose Pool Type
    Each pool type serves different use cases and has specific requirements. Learn more about pool types and their characteristics in the token pools documentation.
    Select the appropriate pool type based on your token's characteristics and requirements
  2. Configure Remix
    • Open the "Deploy & Run Transactions" tab
    • Set Environment to "Injected Provider - MetaMask"
    • Select BurnMintTokenPool contract
  3. Set Parameters

    Configure your pool by setting these required parameters in Remix:

    tokenaddress

    Address of the token to be minted/burned

    localTokenDecimalsuint8

    Number of decimals for your token

    18
    allowlistaddress[]

    Addresses allowed to transfer tokens (empty array for no restrictions)

    []
    rmnProxyaddress

    Address of the RMN contract

    [Select destination blockchain first]
    routeraddress

    Address of the CCIP Router contract

    [Select destination blockchain first]
  4. Deploy Contract
    • Click "Deploy" and confirm in MetaMask
    • Copy your pool address from "Deployed Contracts"
  5. Verify Contract (Optional)
    Contract verification makes your pool contract's source code public on the blockchain explorer. This:
    • Builds trust by allowing anyone to audit your code
    • Enables direct interaction through the blockchain explorer
    • Helps other developers understand and integrate with your contract
    1. Access the Blockchain Explorer
      Blockchain explorer information will be available once you select a network.
    2. Verify Using Remix IDE
      Remix IDE Guide

      Official guide for verifying contracts using the Remix IDE verification plugin

      View Guide
      Chainlink Tutorial

      Step-by-step tutorial for contract verification on blockchain explorers

      View Tutorial
    3. Confirm Verification
      1. Return to your contract on the blockchain explorer
      2. Look for a green checkmark ✓ or "Verified" status
      3. You should now see your contract's source code in the "Code" tab
      Contract verification link will be available once you select a network.
Configure Token Registry
Register your token pool in the CCIP registry
Ensure MetaMask is connected to loading...
  1. Configure Registry
    1. In the "Deploy & Run Transactions" tab, select the TokenAdminRegistry contract in the Contracts drop-down list.
    2. 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]
    3. Select the TokenAdminRegistry contract to expand its details
    4. Call setPool:
      setPool
      Enable your token for CCIP by registering its token pool
      ⚠️ You must be the token admin to call this function
      Parameters:
      localTokenaddress

      The token to enable for CCIP

      pooladdress

      The token pool that will handle cross-chain transfers

    5. Confirm the transaction in MetaMask

Configure Cross-Chain Communication

Source Chain Configuration

Grant Burn and Mint Privileges
Grant required privileges to your token pool
Ensure MetaMask is connected to loading...
  1. Grant Burn and Mint Privileges
    Skip this section if you deployed a LockReleaseTokenPool
    1. In the list of deployed contracts, select the BurnMintERC677 at
    2. Click to open the contract details
    3. 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 function
      Parameters:
      burnAndMinteraddress

      Address to grant mint and burn roles to (your token pool)

    4. Confirm the transaction in MetaMask
Configure Pool
Set up cross-chain communication parameters
Ensure MetaMask is connected to loading...
  1. 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
Confirm your cross-chain setup is correct
Ensure MetaMask is connected to loading...
  1. Verify Configuration
    1. Open the "Deploy & Run Transactions" tab in Remix
    2. Select your token pool contract:
      LockReleaseTokenPool
    3. Click the contract to view its functions
  2. Verify Remote Token
    1. Call getRemoteToken:
      getRemoteToken
      Retrieves the ABI-encoded address of your token on the remote chain
      Parameters:
      remoteChainSelectoruint64

      Chain selector for undefined

      Returns:
      bytes
      ABI-encoded address of the token on the remote chain
      Expected Result:
      Waiting for remote token address...
  3. Verify Remote Pools
    1. Call getRemotePools:
      getRemotePools
      Returns all registered token pools on the remote chain
      Parameters:
      remoteChainSelectoruint64

      Chain selector for undefined

      Returns:
      bytes[]
      Array of ABI-encoded addresses of all registered pools on the remote chain
      Expected Result:
      Waiting for remote pool address...
  4. Verify Rate Limiters
    1. Call getCurrentInboundRateLimiterState:
      getCurrentInboundRateLimiterState
      Verifies your inbound transfer rate limits
      Parameters:
      remoteChainSelectoruint64

      Chain selector for undefined

      Returns:
      TokenBucket
      Current state of the inbound rate limiter
      Expected Result:
      Tokens0
      Last UpdatedCurrent block timestamp
      Statusfalse
      Capacity0
      Rate0
      The tokens field starts at 0 and the lastUpdated field will show the current block timestamp.
    2. Call getCurrentOutboundRateLimiterState:
      getCurrentOutboundRateLimiterState
      Verifies your outbound transfer rate limits
      Parameters:
      remoteChainSelectoruint64

      Chain selector for undefined

      Returns:
      TokenBucket
      Current state of the outbound rate limiter
      Expected Result:
      Tokens0
      Last UpdatedCurrent block timestamp
      Statusfalse
      Capacity0
      Rate0
      The tokens field starts at 0 and the lastUpdated field will show the current block timestamp.

Destination Chain Configuration

Grant Burn and Mint Privileges
Grant required privileges to your token pool
Ensure MetaMask is connected to loading...
  1. Grant Burn and Mint Privileges
    Skip this section if you deployed a LockReleaseTokenPool
    1. In the list of deployed contracts, select the BurnMintERC677 at
    2. Click to open the contract details
    3. 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 function
      Parameters:
      burnAndMinteraddress

      Address to grant mint and burn roles to (your token pool)

    4. Confirm the transaction in MetaMask
Configure Pool
Set up cross-chain communication parameters
Ensure MetaMask is connected to loading...
  1. 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
Confirm your cross-chain setup is correct
Ensure MetaMask is connected to loading...
  1. Verify Configuration
    1. Open the "Deploy & Run Transactions" tab in Remix
    2. Select your token pool contract:
      LockReleaseTokenPool
    3. Click the contract to view its functions
  2. Verify Remote Token
    1. Call getRemoteToken:
      getRemoteToken
      Retrieves the ABI-encoded address of your token on the remote chain
      Parameters:
      remoteChainSelectoruint64

      Chain selector for undefined

      Returns:
      bytes
      ABI-encoded address of the token on the remote chain
      Expected Result:
      Waiting for remote token address...
  3. Verify Remote Pools
    1. Call getRemotePools:
      getRemotePools
      Returns all registered token pools on the remote chain
      Parameters:
      remoteChainSelectoruint64

      Chain selector for undefined

      Returns:
      bytes[]
      Array of ABI-encoded addresses of all registered pools on the remote chain
      Expected Result:
      Waiting for remote pool address...
  4. Verify Rate Limiters
    1. Call getCurrentInboundRateLimiterState:
      getCurrentInboundRateLimiterState
      Verifies your inbound transfer rate limits
      Parameters:
      remoteChainSelectoruint64

      Chain selector for undefined

      Returns:
      TokenBucket
      Current state of the inbound rate limiter
      Expected Result:
      Tokens0
      Last UpdatedCurrent block timestamp
      Statusfalse
      Capacity0
      Rate0
      The tokens field starts at 0 and the lastUpdated field will show the current block timestamp.
    2. Call getCurrentOutboundRateLimiterState:
      getCurrentOutboundRateLimiterState
      Verifies your outbound transfer rate limits
      Parameters:
      remoteChainSelectoruint64

      Chain selector for undefined

      Returns:
      TokenBucket
      Current state of the outbound rate limiter
      Expected Result:
      Tokens0
      Last UpdatedCurrent block timestamp
      Statusfalse
      Capacity0
      Rate0
      The tokens field starts at 0 and the lastUpdated field will show the current block timestamp.

Get the latest Chainlink content straight to your inbox.