curl --request POST \
--url https://nd-995-911-243.p2pify.com/afb8312f3710a5bc469f4c87cad3a2e4 \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 2,
"method": "zks_estimateFee",
"params": [
{
"from": "0x7AeD074cA56F5050D5A2E512eCc5bf7103937d76",
"to": "0x6B7f71BB1f5B74fB0Ff82cf4EA20A5F90d43E509",
"data": "0x"
}
]
}'
{
"jsonrpc": "2.0",
"id": 2,
"result": {}
}
curl --request POST \
--url https://nd-995-911-243.p2pify.com/afb8312f3710a5bc469f4c87cad3a2e4 \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 2,
"method": "zks_estimateFee",
"params": [
{
"from": "0x7AeD074cA56F5050D5A2E512eCc5bf7103937d76",
"to": "0x6B7f71BB1f5B74fB0Ff82cf4EA20A5F90d43E509",
"data": "0x"
}
]
}'
{
"jsonrpc": "2.0",
"id": 2,
"result": {}
}
from
— the string of the address initiating the transaction.to
— the string of the address to which the transaction is directed. Can be a wallet address or a smart contract on zkSync.data
— (optional) additional data sent with the transaction, typically used for smart contract interactions. It’s a string of the hash of the method signature and encoded parameters, aligning with the Ethereum Contract ABI.gasLimit
— the maximum gas limit that can be used for the transaction’s execution.gasPerPubdataLimit
— the gas cost per byte of public data in the transaction, a unique aspect of zkSync’s scaling solution.maxFeePerGas
— the maximum fee (in Wei) the sender will pay for each gas unit.maxPriorityFeePerGas
— the maximum priority fee per gas.zks_estimateFee
applications can provide accurate fee estimates for various operations, ensuring users are fully informed of upfront costs. This facilitates a more efficient allocation of resources and enhances user trust through transparency.Successful response
The response is of type object
.
Was this page helpful?