getL2TokenAddress
Returns the L2 token address equivalent for a L1 token address as they are not equal.
Usage
example.ts
import { client } from './config'
const address = await client.getL2TokenAddress({
token: '0x5C221E77624690fff6dd741493D735a17716c26B'
})
Returns
Address
Returns the L2 token address equivalent for a L1 token address.
Parameters
token
- Type:
Address
The address of the token on L1.
const address = await client.getL2TokenAddress({
token: '0x5C221E77624690fff6dd741493D735a17716c26B'
})
bridgeAddress (optional)
- Type:
Address
The address of custom bridge, which will be used to get l2 token address.
const address = await client.getL2TokenAddress({
token: '0x5C221E77624690fff6dd741493D735a17716c26B',
bridgeAddress: '0xf8c919286126ccf2e8abc362a15158a461429c82'
})