curl --request POST \
--url https://nd-995-911-243.p2pify.com/afb8312f3710a5bc469f4c87cad3a2e4 \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "zks_getBridgeContracts",
"params": []
}
'{
"jsonrpc": "2.0",
"id": 1,
"result": {
"bridgeContractAddresses": {}
}
}curl --request POST \
--url https://nd-995-911-243.p2pify.com/afb8312f3710a5bc469f4c87cad3a2e4 \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "zks_getBridgeContracts",
"params": []
}
'{
"jsonrpc": "2.0",
"id": 1,
"result": {
"bridgeContractAddresses": {}
}
}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.
nonel1Erc20DefaultBridge — 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).zks_getBridgeContracts method to dynamically fetch the current default bridge contracts, ensuring that transactions are routed through the appropriate channels.Was this page helpful?