This is a practical guide to getting your ERC20 token deployed on L2 and bridging it using the Standard Bridge implementation.
For an L1/L2 token pair to work on the Standard Bridge the L2 token contract has to implement
IL2StandardERC20
.
If there is no need for custom logic on Mantle, it’s easiest to use the standard token, available as the
L2StandardERC20
contract as part of the @mantleio/contracts
package.
Install the necessary packages.
yarn
Run the script:
yarn local
The script uses our token factory contract OVM_L2StandardTokenFactory
available as a predeploy at 0x4200000000000000000000000000000000000012
to deploy a standard token on L2.
When the L2StandardERC20
implementation does not satisfy your requirements, we can consider allowing a custom implementation.
See this tutorial on getting a custom token implemented and deployed
For testing your token, see tutorial on depositing and withdrawing between L1 and L2.