erc20Bridger
Classes
AdminErc20Bridger
Admin functionality for the token bridge
Extends
Constructors
new AdminErc20Bridger()
new AdminErc20Bridger(l2Network: L2Network): AdminErc20Bridger
Bridger for moving ERC20 tokens back and forth between L1 to L2
Parameters
Parameter | Type |
---|---|
l2Network | L2Network |
Returns
Inherited from
Source
assetBridger/erc20Bridger.ts:187
Properties
Property | Modifier | Type | Description | Inherited from |
---|---|---|---|---|
l1Network | readonly | L1Network | L2Network | Parent chain for the given Arbitrum chain, can be an L1 or an L2 | Erc20Bridger .l1Network |
nativeToken? | readonly | string | In case of a chain that uses ETH as its native/gas token, this is either In case of a chain that uses an ERC-20 token from the parent chain as its native/gas token, this is the address of said token on the parent chain | Erc20Bridger .nativeToken |
Accessors
nativeTokenIsEth
get protected nativeTokenIsEth(): boolean
Whether the chain uses ETH as its native/gas token
Returns
boolean
Source
assetBridger/assetBridger.ts:75
Methods
approveGasToken()
approveGasToken(params: ApproveParamsOrTxRequest): Promise<ContractTransaction>
Approves the custom gas token to be spent by the relevant gateway on the parent chain
Parameters
Parameter | Type | Description |
---|---|---|
params | ApproveParamsOrTxRequest |
Returns
Promise
<ContractTransaction
>
Inherited from
Erc20Bridger
. approveGasToken
Source
assetBridger/erc20Bridger.ts:256
approveToken()
approveToken(params: ApproveParamsOrTxRequest): Promise<ContractTransaction>
Approve tokens for deposit to the bridge. The tokens will be approved for the relevant gateway.
Parameters
Parameter | Type | Description |
---|---|---|
params | ApproveParamsOrTxRequest |
Returns
Promise
<ContractTransaction
>
Inherited from
Source
assetBridger/erc20Bridger.ts:317