Python SDK

L1<->L2 Transactions

Methods to facilitate transactions between L1 and L2 networks

This section explores the methods which allow the account classes to send transactions from L1 to L2.

If you want to get some background on how L1->L2 interaction works on ZKsync Era, go through the introduction.

Full examples of actions below are available on the getting started page.

Deposit

Wallet object provides a deposit 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: Deposit ETH and ERC20 token

Request execute

Wallet and L1Signer objects provide an option to request execution of L2 transaction from L1. For more information, please refer to the method specification request_execute.

Base cost

Wallet object provides an option to calculate base cost for L2 transaction. For more information, please refer to the method specification getBaseCost.

Claim failed deposit

Wallet object provides a claim fail deposit workflow. For more information, please refer to the method specification claimFailedDeposit.

Finalize withdraw

Wallet object provides a finalize withdraw workflow. For more information, please refer to the method specification finalizeWithdrawal.

Withdrawal

Wallet object provides 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 and ERC20 token


Made with ❤️ by the ZKsync Community