Skip to main content

zks_estimateFee RPC Method

Returns the fee for the transaction.

Updated on
Nov 2, 2023

zks_estimateFee RPC Method

Parameters

from
string
REQUIRED
The address from which the transaction is sent
to
string
REQUIRED
The address to which the transaction is addressed
data
string
The data associated with the transaction

Returns

gas_limit
The maximum amount of gas that the transaction is allowed to consume
gas_per_pubdata_limit
The amount of gas that is consumed per public data byte
max_fee_per_gas
The maximum fee (measured in wei) that can be paid per gas unit
max_priority_fee_per_gas
The maximum priority fee (measured in wei) that can be paid per gas unit
Request
1
curl https://docs-demo.zksync-mainnet.quiknode.pro/ \
2
-X POST \
3
-H "Content-Type: application/json" \
4
--data '{"method":"zks_estimateFee","params":[{ "from": "0x1111111111111111111111111111111111111111", "to":"0x2222222222222222222222222222222222222222", "data": "0xffffffff" } ],"id":1,"jsonrpc":"2.0"}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free