Parameters
chainId
string
default:"300"
required
Unique identifier for a blockchain network.
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.
Positional parameters for zks_estimateFee:
Returns
The JSON-RPC result.
Maximum amount of gas the transaction is allowed to use (hex).
Amount of gas consumed per public data byte (hex).
Maximum fee in wei that can be paid per gas unit (hex).
Maximum priority fee in wei that can be paid per gas unit (hex).
curl --request POST \
--url https://api.uniblock.dev/uni/v1/json-rpc?chainId=300 \
--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"
}
}