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 is open-source. View and contribute to its source code on GitHub.
Learn how to add the Agglayer module to your modular contract and enable cross-chain transfers.
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
When completed, you will see your module under the installed modules section.
- Publisher:
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
Modular Contract Roles
Non-admin roles are disabled by default on modular contracts and must be enabled through the contract.
- User:
Navigate back to the modules section and mint tokens to your wallet or a recipient's wallet using the mintable module.
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
Modular Contract Approvals
This step enables the contract to have approval to transfer user's tokens to the bridge.
- Spender:
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.
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
- Destination Network: