Notes
- L1 to L2 via DiamondProxy. For L2 to L1 withdrawals, use the L2 withdraw mechanism on zkSync Era
requestL2Transactionis a general-purpose L1-to-L2 transaction request — handles ETH deposits, contract calls, and even contract deployments (via_factoryDeps)msg.valuemust cover:_l2Value + l2TransactionBaseCost(gasPrice, _l2GasLimit, _l2GasPerPubdataByteLimit)- Use
l2TransactionBaseCost()to estimate the gas cost component before submitting _l2GasPerPubdataByteLimit: 800 is the standard value (required for pubdata pricing)_factoryDeps: used when deploying contracts via L1. Empty array for standard ETH transfers- zkEVM architecture — L2 to L1 withdrawals finalize with ZK proofs (typically 1-24 hours)
- L1 to L2 deposits finalize after the batch containing the transaction is committed (~minutes)
- For ERC-20 bridging, use the zkSync ERC20 Bridge contracts (separate from the DiamondProxy)
- Canonical bridge, secured by zkSync’s ZK proving system (Matter Labs)
Its names in a program
On Ethereum,ZksyncBridge is a namespace: its contracts need no import.
Deployments
ABI
ZkSyncDiamondProxyABI
import ZkSyncDiamondProxyABI from "./protocols/zksync-bridge/ZkSyncDiamondProxyABI.json"; Speaks for: diamondProxy.
requestL2Transaction(address _contractL2, uint256 _l2Value, bytes _calldata, uint256 _l2GasLimit, uint256 _l2GasPerPubdataByteLimit, bytes[] _factoryDeps, address _refundRecipient) payable returns (bytes32 canonicalTxHash)l2TransactionBaseCost(uint256 _gasPrice, uint256 _l2GasLimit, uint256 _l2GasPerPubdataByteLimit) view returns (uint256)
Next steps
- Protocols: the other protocols, by what they do.
- Protocols and tokens: calling a contract by its namespace, or through its ABI.
- Glossary: the words these pages use, in plain terms.
