Module: assetBridger/assetBridger
AssetBridger
Base for bridging assets from l1 to l2 and back
Extended By
Type parameters
Parameter |
---|
DepositParams |
WithdrawParams |
Properties
Property | Type | Description |
---|---|---|
readonly l1Network | L1Network | L2Network | Parent chain for the given Arbitrum chain, can be an L1 or an L2 |
nativeToken ? | string | In case of a chain that uses ETH as its native/gas token, this is either undefined or the zero addressIn 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 |
Accessors
nativeTokenIsEth
protected get nativeTokenIsEth(): boolean
Source
arbitrum-sdk/src/lib/assetBridger/assetBridger.ts:75
Methods
checkL1Network()
protected checkL1Network(sop): Promise< void >
Check the signer/provider matches the l1Network, throws if not
Parameters
Parameter | Type | Description |
---|---|---|
sop | SignerOrProvider |
Returns
Promise
\< void
>
Source
arbitrum-sdk/src/lib/assetBridger/assetBridger.ts:59
checkL2Network()
protected checkL2Network(sop): Promise< void >
Check the signer/provider matches the l2Network, throws if not
Parameters
Parameter | Type | Description |
---|---|---|
sop | SignerOrProvider |
Returns
Promise
\< void
>
Source
arbitrum-sdk/src/lib/assetBridger/assetBridger.ts:67
deposit()
abstract deposit(params): Promise< L1ContractTransaction< L1TransactionReceipt > >
Transfer assets from L1 to L2
Parameters
Parameter | Type | Description |
---|---|---|
params | DepositParams |
Returns
Promise
\< L1ContractTransaction
\< L1TransactionReceipt
> >
Source
arbitrum-sdk/src/lib/assetBridger/assetBridger.ts:83
withdraw()
abstract withdraw(params): Promise< L2ContractTransaction >
Transfer assets from L2 to L1
Parameters
Parameter | Type | Description |
---|---|---|
params | WithdrawParams |
Returns
Promise
\< L2ContractTransaction
>