thirdweb

BurnMintERC677

A basic ERC677 compatible token contract with burn and minting roles.

Cross-Chain Tokens (CCT) Standard

The Cross-Chain Token (CCT) standard offers a streamlined and decentralized approach to enabling token transfers across blockchains using Chainlink's Cross-Chain Interoperability Protocol (CCIP). With the introduction of CCTs, token developers now have the power to deploy, configure, and manage their own token pools in CCIP via a simple interface. Learn more at the Official Chainlink Documentation

Requirements for Cross-Chain Tokens

Before enabling an ERC20-compatible token in CCIP, it's important to understand the requirements it must fulfill to integrate with CCIP.

Recommended Permissionless Token Administrator address registration methods

A token can utilize either of these supported function signatures to register permissionlessly:

  • owner(): This function returns the token contract owner's address.

  • getCCIPAdmin(): This function returns the token administrator's address and is recommended for new tokens, as it allows for abstraction of the CCIP Token Administrator role from other common roles, like owner().

Requirements for CCIP token transfers

The token's smart contract must meet minimum requirements to integrate with CCIP.

Burn & Mint Requirements
  • The token smart contract must have the following functions:
    • mint(address account, uint256 amount): This function is used to mint the amount of tokens to a given account on the destination blockchain.
    • burn(uint256 amount): This function is used to burn the amount of tokens on the source blockchain.
    • decimals(): Returns the token's number of decimals.
    • balanceOf(address account): Returns the current token balance of the specified account.
    • burnFrom(address account, uint256 amount): This function burns a specified number of tokens from the provided account on the source blockchain. Note: This is an optional function. We generally recommend using the burn function, but if you use a tokenPool that calls burnFrom, your token contract will need to implement this function.
  • On the source and destination blockchains, the token contract must support granting mint and burn permissions. The token developers or another role (such as the token administrator) will grant these permissions to the token pool.
Lock & Mint Requirements
  • The token smart contract must have the following functions:
    • decimals(): Returns the token's number of decimals.
    • balanceOf(address account): Returns the current token balance of the specified account.
  • On the destination blockchain, The token contract must support granting mint and burn permissions. The token developers or another role (such as the token administrator) will grant these permissions to the token pool.

The BurnMintERC677 token is CCT compatible!

Self-Service Registration Flow

Whether you're working with an Externally Owned Account (EOA) or a Smart Account (such as one using a multisig scheme), the overall logic remains the same.

  1. Make sure you've deployed the BurnMintERC677 token on each blockchain
  2. Make sure you've deployed the BurnMintTokenPool smart contract on each blockchain
  3. Grant Mint and Burn roles to the previously deployed BurnMintTokenPool by calling the grantMintAndBurnRoles(address(burnMintTokenPool)) function of the BurnMintERC677 token on each blockchain
  4. Claim Admin role by calling the registerAdminViaOwner(address(myToken)) function of the RegistryModuleOwnerCustom smart contract on each blockchain
  5. Accept Admin role by calling the acceptAdminRole(address(myToken)) function of the TokenAdminRegistry smart contract on each blockchain
  6. Link token to pool by calling the setPool(address(myToken), address(burnMintTokenPool)) function of the TokenAdminRegistry smart contract on each blockchain
  7. On a local chain, for each remote chain, configure the pool by calling the applyChainUpdates function of the BurnMintTokenPool smart contract and provide:
  • remote chain CCIP chainSelector,
  • true ifthe chain should be enabled, false otherwise. We will put true here.
  • remote pool contract address,
  • remote token contract address,
  • outbound Rate Limiter config:
    • isEnabled - true/false
    • capacity
    • rate
  • inbound Rate Limiter config:
    • isEnabled - true/false
    • capacity
    • rate

Accept Ownership

(acceptOwnership)

nonpayable

Published by

Publisher avatar
View all contracts

Details

  • Publish Date

    Oct 28, 2024

  • Audit Report

    View Audit Report

  • Licenses

    MIT, Unlicense


  • Learn more about Publish