assetBridger
Classes
abstract
AssetBridger<DepositParams, WithdrawParams>
Base for bridging assets from l1 to l2 and back
Extended by
Type parameters
Type parameter |
---|
DepositParams |
WithdrawParams |
Methods
checkL1Network()
protected checkL1Network(sop: SignerOrProvider): Promise<void>
Check the signer/provider matches the l1Network, throws if not
Parameters
Parameter | Type | Description |
---|---|---|
sop | SignerOrProvider |
Returns
Promise
<void
>
Source
assetBridger/assetBridger.ts:48
checkL2Network()
protected checkL2Network(sop: SignerOrProvider): Promise<void>
Check the signer/provider matches the l2Network, throws if not
Parameters
Parameter | Type | Description |
---|---|---|
sop | SignerOrProvider |
Returns
Promise
<void
>
Source
assetBridger/assetBridger.ts:56
deposit()
abstract deposit(params: DepositParams): Promise<L1ContractTransaction<L1TransactionReceipt>>
Transfer assets from L1 to L2
Parameters
Parameter | Type | Description |
---|---|---|
params | DepositParams |
Returns
Promise
<L1ContractTransaction
<L1TransactionReceipt
>>
Source
assetBridger/assetBridger.ts:64
withdraw()
abstract withdraw(params: WithdrawParams): Promise<L2ContractTransaction>
Transfer assets from L2 to L1
Parameters
Parameter | Type | Description |
---|---|---|
params | WithdrawParams |
Returns
Promise
<L2ContractTransaction
>