zks_* namespace

These calls expose Elastic Network specific data such as L1→L2 fees, bridge contract addresses, and batch details.

Unless marked ✗, they behave the same as on a public ZKsync endpoint.

curl -X POST http://localhost:8011 \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"zks_L1ChainId","params":[]}'

Method index

Fees & gas

Method✓ / ✗Purpose
zks_estimateFeeFee estimate for an L2 tx
zks_estimateGasL1ToL2Gas estimate for L1→L2 call
zks_getFeeParamsCurrent fee params

Blocks & batches

Method✓ / ✗Purpose
zks_getBlockDetailsExtra zkSync block info
zks_getRawBlockTransactionsRaw txs in a block
zks_getL1BatchBlockRangeBlock range in batch
zks_getL1BatchDetailsBatch details
zks_L1BatchNumberLatest L1 batch number

Proofs

Method✓ / ✗Purpose
zks_getL2ToL1LogProofProof for L2→L1 log
zks_getL2ToL1MsgProofProof for L1 Messenger msg
zks_getProofStorage Merkle proof

Accounts & tokens

Method✓ / ✗Purpose
zks_getAllAccountBalancesAll token balances
zks_getConfirmedTokensToken list slice
zks_getBaseTokenL1AddressBase‑token L1 addr

Bridges & contracts

Method✓ / ✗Purpose
zks_getBridgeContractsDefault bridge addrs
zks_getBridgehubContractBridgehub addr
zks_getMainContractzkSync Era main contract
zks_getTimestampAsserterTimestamp asserter
zks_getL2Multicall3Multicall3 addr

Misc & system

Method✓ / ✗Purpose
zks_L1ChainIdUnderlying L1 chain‑id
zks_getBatchFeeInputCurrent batch fee input
zks_getL1GasPriceCurrent L1 gas price
zks_sendRawTransactionWithDetailedOutputTx with trace output

Method reference

Full schemas live in the official zkSync JSON-RPC docs ↗︎.

zks_estimateFee

curl -s -X POST http://localhost:8011 \
  -H 'content-type: application/json' \
  -d '{
        "jsonrpc":"2.0","id":1,"method":"zks_estimateFee",
        "params":[{
          "from":"0x…","to":"0x…","data":"0x…"
        }]
      }'

zks_estimateGasL1ToL2

curl -s -X POST http://localhost:8011 \
  -H 'content-type: application/json' \
  -d '{
        "jsonrpc":"2.0","id":1,"method":"zks_estimateGasL1ToL2",
        "params":[{
          "from":"0x…","to":"0x…","gasPerPubdata":"0x0"
        }]
      }'

zks_getAllAccountBalances

curl -s -X POST http://localhost:8011 \
  -H 'content-type: application/json' \
  -d '{
        "jsonrpc":"2.0","id":1,"method":"zks_getAllAccountBalances",
        "params":["0x…account…"]
      }'

zks_getBridgeContracts

curl -s -X POST http://localhost:8011 \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"zks_getBridgeContracts","params":[]}'

zks_getBridgehubContract

curl -s -X POST http://localhost:8011 \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"zks_getBridgehubContract","params":[]}'

zks_getBlockDetails

curl -s -X POST http://localhost:8011 \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"zks_getBlockDetails","params":["0x1a"]}'

zks_getBytecodeByHash

curl -s -X POST http://localhost:8011 \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"zks_getBytecodeByHash","params":["0x…hash…"]}'

zks_getConfirmedTokens

curl -s -X POST http://localhost:8011 \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"zks_getConfirmedTokens","params":[0, 50]}'

zks_getBaseTokenL1Address

curl -s -X POST http://localhost:8011 \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"zks_getBaseTokenL1Address","params":[]}'

zks_getL2ToL1LogProof

curl -s -X POST http://localhost:8011 \
  -H 'content-type: application/json' \
  -d '{
        "jsonrpc":"2.0","id":1,"method":"zks_getL2ToL1LogProof",
        "params":["0x…txHash…", 0]
      }'

zks_getRawBlockTransactions

curl -s -X POST http://localhost:8011 \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"zks_getRawBlockTransactions","params":["0x1a"]}'

zks_getTransactionDetails

curl -s -X POST http://localhost:8011 \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"zks_getTransactionDetails","params":["0x…txHash…"]}'

zks_L1ChainId

curl -s -X POST http://localhost:8011 \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"zks_L1ChainId","params":[]}'

Unimplemented stubs

The following methods are not yet implemented and will return Method not found:

  • zks_getBatchFeeInput
  • zks_getFeeParams
  • zks_getL1BatchBlockRange
  • zks_getL1BatchDetails
  • zks_getL1GasPrice
  • zks_getL2ToL1MsgProof
  • zks_getMainContract
  • zks_getProof
  • zks_getProtocolVersion
  • zks_getTestnetPaymaster
  • zks_sendRawTransactionWithDetailedOutput
  • zks_getTimestampAsserter
  • zks_getL2Multicall3

See also

  • eth_* — Ethereum compatible base methods
  • debug_* — Execution traces & state inspection
  • anvil_* — Node testing helpers