Agglayer Module Contract

We created a module which leverages Agglayer, an interoperability protocol. This module may be added to any ERC-20 modular contract to construct a cross-chain interoperable smart contract for trustless and secure transfers across any chain. Learn more about Agglayer.

Agglayer Module Contract

Agglayer Module Contract is open-source. View and contribute to its source code on GitHub.

Get Started

Learn how to add the Agglayer module to your modular contract and enable cross-chain transfers.

Prerequisites

  • Add Agglayer module

    On your deployed contract dashboard, navigate to the Modules section to add the Agglayer module. Paste the following parameters then select Install.

    • Publisher: 0xdd99b75f095d0c4d5112aCe938e4e6ed962fb024
    • Module Name: AgglayerCrossChain
    • Module Version: Latest
    • Router: 0x2311BFA86Ae27FC10E1ad3f805A2F9d22Fc8a6a1
    Agglayer Module

    When completed, you will see your module under the installed modules section.

  • Grant minter role

    Next, navigate to the Explorer tab and locate grantRoles under the Write functions to grant your wallet the minter role then select Execute.

    • User: your-wallet-address
    • Roles: 1
    • Native Token Value: 0
    Grant Minter Role
  • Mint tokens

    Navigate back to the modules section and mint tokens to your wallet or a recipient's wallet using the mintable module.

    Mint Tokens
  • Approve transfers on contract

    Navigate back to Explorer and find the Approve write function. Paste in the following parameters and select Execute.

    • Spender: your-contract-address
    • Amount: your-desired-amount
    Approve Function
  • Approve transfers on module

    Navigate back to the modules view and disable Restrict Transfers on the TransferableERC20 module to allow any token holders to transfer tokens. Select Update to confirm.

    Restrict Transfer
  • Bridge tokens

    Navigate back to Explorer and locate the bridgeTokens function. Select Execute to confirm the transaction.

    • Destination Network: chain-to-send
    • Call Address: your-wallet-address
    • Amount: amount-of-tokens