L1<->L2 Transactions
This section explores the methods which allow the account to send transactions among both L1 to L2 networks. For background on how L1<->L2 interaction works on ZKsync, go through the introduction.
Deposit
WalletL1
and Wallet
objects provide a deposit workflow. For more information, please refer to the method
specification Deposit
.
For a comprehensive example demonstrating the deposit workflow, refer to the following:
- Deposit ETH
- Deposit ERC20 tokens
Request execute
WalletL1
and Wallet
objects provide an option to request execution of L2 transaction from L1.
For more information, please refer to the method specification RequestExecute
.
Base cost
WalletL1
and Wallet
objects provide an option to calculate base cost for L2 transaction.
For more information, please refer to the method specification BaseCost
.
Claim failed deposit
WalletL1
and Wallet
objects provide a claim fail deposit workflow. For more information,
please refer to the method specification ClaimFailedDeposit
.
Finalize withdraw
WalletL1
and Wallet
objects provide a finalize withdraw workflow. For more information,
please refer to the method specification FinalizeWithdraw
.
Withdrawal
WalletL2
and Wallet
objects provide a withdrawal workflow. For more information,
please refer to the method specification Deposit
.
For a complete example of how to execute the deposit workflow, take a look at the following:
- Withdraw ETH
- Withdraw ERC20 token