Skip to main content

zkevm_estimateCounters RPC Method

Estimates the transaction ZK Counters.

Updated on
Jun 10, 2024

zkevm_estimateCounters RPC Method

Parameters

transaction
object
The transaction call object:
from
string
The address from which the transaction is sent
to
string
REQUIRED
The address to which the transaction is addressed
gas
integer
The integer of gas provided for the transaction execution
gasPrice
integer
The integer of gasPrice used for each paid gas encoded as hexadecimal
value
integer
The integer of value sent with this transaction encoded as hexadecimal
data
string
The hash of the method signature and encoded parameters. For more information, see the Contract ABI description in the Solidity documentation.

Returns

result
object
The result object which contains the following fields:
countersUsed
object
The countersUsed object which contains the following fields:
gasUsed
string
The amount of gas that will be used
usedKeccakHashes
string
The number of Keccak hash operations used
usedPoseidonHashes
string
The number of Poseidon hash operations used
usedPoseidonPaddings
string
The number of Poseidon padding operations used
usedMemAligns
string
The number of memory alignment operations used
usedArithmetics
string
The number of arithmetic operations used
usedBinaries
string
The number of binary operations used
usedSteps
string
The number of computational steps used
usedSHA256Hashes
string
The number of SHA-256 hash operations used
countersLimit
object
The countersLimit object which contains the following fields:
maxGasUsed
string
The maximum gas limit
maxKeccakHashes
string
The maximum number of Keccak hash operations allowed
maxPoseidonHashes
string
The maximum number of Poseidon hash operations allowed
maxPoseidonPaddings
string
The maximum number of Poseidon padding operations allowed
maxMemAligns
string
The maximum number of memory alignment operations allowed
maxArithmetics
string
The maximum number of arithmetic operations allowed
maxBinaries
string
The maximum number of binary operations allowed
maxSteps
string
The maximum number of computational steps allowed
maxSHA256Hashes
string
The maximum number of SHA-256 hash operations allowed
Request
1
curl --location 'https://docs-demo.zkevm-mainnet.quiknode.pro/' \
2
--header 'Content-Type: application/json' \
3
--data '{
4
"method": "zkevm_estimateCounters",
5
"params": [
6
{
7
"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
8
"to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601",
9
"gas": "0x5208"
10
}
11
],
12
"id": 1,
13
"jsonrpc": "2.0"
14
}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free