zks_getBridgeContracts
Returns the L1 and L2 address of the default bridges.
Parameters
None.
Response
The default bridges used in the ZKsync network:
1Erc20DefaultBridge
- The address of the default bridge contract responsible for handling ERC-20 token transfers from the L1 network to the L2 networkl2Erc20DefaultBridge
- The address of the default bridge contract responsible for handling ERC-20 token transfers from the L2 network to the L1 network
Example
Replace YOUR-API-KEY
with an API key from your Infura dashboard.
Request
- cURL
- WSS
curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "id": 1, "method": "zks_getBridgeContracts", "params": []}'
wscat -c wss://zksync-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "id": 1, "method": "zks_getBridgeContracts", "params": []}'
Response
- JSON
{
"jsonrpc": "2.0",
"result": {
"l1Erc20DefaultBridge": "0x57891966931eb4bb6fb81430e6ce0a03aabde063",
"l2Erc20DefaultBridge": "0x11f943b2c77b743ab90f4a0ae7d5a4e7fca3e102"
},
"id": 1
}