Skip to main content

Parameters

chainId
string
default:"2741"
required
Unique identifier for a blockchain network.
id
number
default:1
required
Request identifier used to match responses.
jsonrpc
string
default:"2.0"
required
JSON-RPC version.
method
string
default:"zks_estimateFee"
required
JSON-RPC method name.
params
object
required
Positional parameters for zks_estimateFee:
  • params[]: Type: object.

Returns

result
object
The JSON-RPC result.
curl --request POST \
  --url https://api.uniblock.dev/uni/v1/json-rpc?chainId=2741 \
  --header 'content-type: application/json' \
  --data '{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "zks_estimateFee",
    "params": [
      {
        "from": "0x1111111111111111111111111111111111111111",
        "to": "0x2222222222222222222222222222222222222222",
        "data": "0xffffffff"
      }
    ]
  }'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "gas_limit": "0x156c00",
    "gas_per_pubdata_limit": "0x143b",
    "max_fee_per_gas": "0xee6b280",
    "max_priority_fee_per_gas": "0x0"
  }
}