description |
---|
Adding new ERC20 tokens to Boba |
To add a new ERC20 token to Boba, please:
-
Deploy an suitable L2 ERC20 contract, which allows only the
L2StandardBridge
to mint and burn tokens. The standard template isL2StandardERC20.sol
(see./packages/contracts/contracts/standards/L2StandardERC20.sol
) -
Then, pass the address to the bridge, as in this example:
// ./integration-tests/test/bridged-tokens.spec.ts
await env.messenger.waitForMessageReceipt(
await env.messenger.depositERC20(
L1__ERC20.address, // token's L1 address
L2__ERC20.address, // token's L2 address
1000 //amount in wei
)
)