ZKSync API
zks_estimateFee
Overview
Ethereum API
- POSTeth_chainId
- POSTeth_call
- POSTeth_estimateGas
- POSTeth_gasPrice
- POSTeth_newFilter
- POSTeth_newBlockFilter
- POSTeth_uninstallFilter
- POSTeth_newPendingTransactionFilter
- POSTeth_getLogs
- POSTeth_getFilterLogs
- POSTeth_getFilterChanges
- POSTeth_getBalance
- POSTweb3_clientVersion
- POSTeth_getBlockByNumber
- POSTeth_getBlockByHash
- POSTeth_getBlockTransactionCountByNumber
- POSTeth_getBlockReceipts
- POSTeth_getBlockTransactionCountByHash
- POSTeth_getCode
- POSTeth_getStorageAt
- POSTeth_getTransactionCount
- POSTeth_sendRawTransaction
- POSTeth_accounts
- POSTeth_feeHistory
ZKSync API
- POSTzks_estimateFee
- POSTzks_estimateGasL1ToL2
- POSTzks_getBridgehubContract
- POSTzks_getMainContract
- POSTzks_getTestnetPaymaster
- POSTzks_getL1BatchBlockRange
- POSTzks_getL1BatchDetails
- POSTzks_L1BatchNumber
- POSTzks_L1ChainId
- POSTzks_getConfirmedTokens
- POSTzks_getAllAccountBalances
- POSTzks_getTransactionDetails
- POSTzks_getBlockDetails
- POSTzks_getBridgeContracts
- POSTzks_getBaseTokenL1Address
- POSTzks_getL2ToL1MsgProof
- POSTzks_getL2ToL1LogProof
- POSTzks_getRawBlockTransactions
- POSTzks_getBytecodeByHash
- POSTzks_getL1GasPrice
- POSTzks_getFeeParams
- POSTzks_getProtocolVersion
- POSTzks_getProof
- POSTzks_sendRawTransactionWithDetailedOutput
Debug API
PubSub API
ZKSync API
zks_estimateFee
Estimates the fee for a given call request
POST
/
zks_estimateFee
curl --request POST \
--url https://api.mainnet.abs.xyz/zks_estimateFee \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 2,
"method": "zks_estimateFee",
"params": [
{
"from": "0x1111111111111111111111111111111111111111",
"to": "0x2222222222222222222222222222222222222222",
"data": "0xffffffff"
}
]
}'
{
"jsonrpc": "2.0",
"result": {
"gas_limit": "0x1ea9a9",
"max_fee_per_gas": "0x17d7840",
"max_priority_fee_per_gas": "0x0",
"gas_per_pubdata_limit": "0x5340"
},
"id": 2
}
Body
application/json
JSON-RPC version
The method to call
Call parameters
Request identifier
Response
200 - application/json
Returns the estimated fee details
Example:
"2.0"
Example:
2
The maximum amount of gas that can be used
Example:
"0x1ea9a9"
The maximum fee per unit of gas that the sender is willing to pay
Example:
"0x17d7840"
The maximum priority fee per unit of gas to incentivize miners
Example:
"0x0"
The gas limit per unit of public data
Example:
"0x5340"
Was this page helpful?
curl --request POST \
--url https://api.mainnet.abs.xyz/zks_estimateFee \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 2,
"method": "zks_estimateFee",
"params": [
{
"from": "0x1111111111111111111111111111111111111111",
"to": "0x2222222222222222222222222222222222222222",
"data": "0xffffffff"
}
]
}'
{
"jsonrpc": "2.0",
"result": {
"gas_limit": "0x1ea9a9",
"max_fee_per_gas": "0x17d7840",
"max_priority_fee_per_gas": "0x0",
"gas_per_pubdata_limit": "0x5340"
},
"id": 2
}