zksync-cli bridge

Facilitate bridge operations between L1 and L2 using zksync-cli.
zksync-cli bridge [sub-command] [options]

Description

This command facilitates bridge operations between Ethereum (L1) and ZKsync Era (L2), including token deposits, withdrawals, and finalizing withdrawals.

deposit

Transfer ETH or ERC20 tokens from L1 to L2.

zksync-cli bridge deposit [options]
--amountrequired
string

The amount in base decimal format. Example: "0.1" -> 0.1 ETH

--recipientrequired
0x address

The address of the receiver.

--token
0x address

The address of the ETH or ERC20 token.

--private-key, --pkrequired
string

The private key to generate the transaction.

--chainrequired
chain id

The id of the chain to create the transaction on.

--rpc
string

Override the defined L2 RPC URL for the Chain specified.

--l1-rpc
string

Override the defined L1 RPC URL for the Chain specified.

withdraw

Transfer ETH or ERC20 tokens from L2 to L1.

zksync-cli bridge deposit [options]
--amountrequired
string

The amount in base decimal format. Example: "0.1" -> 0.1 ETH

--recipientrequired
0x address

The address of the receiver.

--token
0x address

The address of the ETH or ERC20 token.

--private-key, --pkrequired
string

The private key to generate the transaction.

--chainrequired
chain id

The id of the chain to create the transaction on.

--rpc
string

Override the defined RPC URL for the Chain specified.

--l1-rpc
string

Override the defined RPC URL for the Chain's L1.

withdraw-finalize

Finalize the withdrawal of funds. This step is necessary to complete the withdrawal process initiated on L2.

zksync-cli bridge withdraw-finalize [options]
--hashrequired
transaction hash

The address of the L2 withdrawal transaction to finalize.

--private-key, --pkrequired
string

The private key to generate the transaction.

--chainrequired
chain id

The id of the chain to create the transaction on.

--rpc
URL

Override the defined RPC URL for the Chain specified.

--l1-rpc
URL

Override the defined RPC URL for the Chain's L1.


Made with ❤️ by the ZKsync Community