POST
/
afb8312f3710a5bc469f4c87cad3a2e4
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_getMainContract",
  "params": []
}'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "contractAddress": "<string>"
  }
}

The zks_getMainContract API method is designed to return the address of the main zkSync Era smart contract the L1. This contract address is fundamental for developers and applications interfacing with the zkSync network.

Get your own node endpoint today

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

Sign up with your GitHub, X, Google, or Microsoft account for immediate access.

Parameters

  • none

Response

  • result — the address of the zkSync Era main contract on the L1 blockchain.

Use case

This method returns the main contract address where zkSync holds funds on the L1 network (Ethereum). It could be used as interface to make a bridge between L1 and L2.

Body

application/json
jsonrpc
string
default:2.0
required
Example:

"2.0"

id
integer
default:1
required
Example:

1

method
string
default:zks_getMainContract
required
Example:

"zks_getMainContract"

params
any[]
required

Response

200 - application/json
Successful response
jsonrpc
string
default:2.0
required
Example:

"2.0"

id
integer
default:1
required
result
object
required