zks_getBridgeContracts | zkSync Era

The zks_getBridgeContracts API method fetches the addresses of the default bridges between Layer 1 (Ethereum) and Layer 2 (zkSync). These bridges are pivotal for transferring ERC-20 tokens across layers, playing an essential role in the zkSync ecosystem by enabling efficient, secure, and low-cost asset transfers. This method is especially useful for developers and applications requiring integration with the default bridging mechanisms provided by zkSync.

👍

Get you own node endpoint today

Start for free and get your app to production levels immediately. No credit card required.

You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • none

Response

The response includes the addresses of the default bridge contracts for ERC-20 tokens between Layer 1 and Layer 2:

  • l1Erc20DefaultBridge — the default ERC-20 bridge contract address on Layer 1 (Ethereum). This contract is used for initiating transfers from Ethereum to zkSync.
  • l2Erc20DefaultBridge — the default ERC-20 bridge contract address on Layer 2 (zkSync).

Use Case

A wallet application integrating cross-layer transfer functionalities can use the zks_getBridgeContracts method to dynamically fetch the current default bridge contracts, ensuring that transactions are routed through the appropriate channels.

Try the zks_getBridgeContracts RPC yourself

Language
Click Try It! to start a request and see the response here!