v1

latestOpenAPI 3.0.02026-07-26541677.9 KB
ZKSync API

zks_estimateGasL1ToL2

Estimates the gas required for an L1 to L2 transaction

post/zks_estimateGasL1ToL2

Request body

jsonrpcstring required

JSON-RPC version

methodstring required

The method to call

idinteger required

Request identifier

Response

Returns the estimated gas amount

jsonrpcstring
idinteger
resultstring

The estimated gas amount in hexadecimal format

Example response

{
  "jsonrpc": "2.0",
  "id": 2,
  "result": "0x25f64db"
}