Class: AssetBridger<DepositParams, WithdrawParams>
assetBridger/assetBridger.AssetBridger
Base for bridging assets from l1 to l2 and back
Type parameters
Name |
---|
DepositParams |
WithdrawParams |
Hierarchy
AssetBridger
Methods
checkL1Network
Protected
checkL1Network(sop
): Promise
<void
>
Check the signer/provider matches the l1Network, throws if not
Parameters
Name | Type |
---|---|
sop | SignerOrProvider |
Returns
Promise
<void
>
Defined in
src/lib/assetBridger/assetBridger.ts:48
checkL2Network
Protected
checkL2Network(sop
): Promise
<void
>
Check the signer/provider matches the l2Network, throws if not
Parameters
Name | Type |
---|---|
sop | SignerOrProvider |
Returns
Promise
<void
>
Defined in
src/lib/assetBridger/assetBridger.ts:56
deposit
Abstract
deposit(params
): Promise
<L1ContractTransaction
<L1TransactionReceipt
>>
Transfer assets from L1 to L2
Parameters
Name | Type |
---|---|
params | DepositParams |
Returns
Promise
<L1ContractTransaction
<L1TransactionReceipt
>>
Defined in
src/lib/assetBridger/assetBridger.ts:64
withdraw
Abstract
withdraw(params
): Promise
<L2ContractTransaction
>
Transfer assets from L2 to L1
Parameters
Name | Type |
---|---|
params | WithdrawParams |
Returns
Promise
<L2ContractTransaction
>