⚠️ WORK IN PROGRESS: This list is non-comprehensive and being updated. If there is an API that requires additional support, please start by creating a GitHub Issue.
The status
options are:
SUPPORTED
- Basic support is completePARTIALLY
- Partial support and a description including more specific detailsNOT IMPLEMENTED
- Currently not supported/implemented
Namespace | API | Status |
Description |
---|---|---|---|
CONFIG |
config_getShowCalls |
SUPPORTED |
Gets the current value of show_calls that's originally set with --show-calls option |
CONFIG |
config_getCurrentTimestamp |
SUPPORTED |
Gets the value of current_timestamp for the node |
CONFIG |
config_setResolveHashes |
SUPPORTED |
Updates resolve-hashes to call OpenChain for human-readable ABI names in call traces |
CONFIG |
config_setShowCalls |
SUPPORTED |
Updates show_calls to print more detailed call traces |
CONFIG |
config_setShowStorageLogs |
SUPPORTED |
Updates show_storage_logs to print storage log reads/writes |
CONFIG |
config_setShowVmDetails |
SUPPORTED |
Updates show_vm_details to print more detailed results from vm execution |
CONFIG |
config_setShowGasDetails |
SUPPORTED |
Updates show_gas_details to print more details about gas estimation and usage |
DEBUG |
debug_traceCall |
SUPPORTED |
Performs a call and returns structured traces of the execution |
DEBUG |
debug_traceBlockByHash |
SUPPORTED |
Returns structured traces for operations within the block of the specified block hash |
DEBUG |
debug_traceBlockByNumber |
SUPPORTED |
Returns structured traces for operations within the block of the specified block number |
DEBUG |
debug_traceTransaction |
SUPPORTED |
Returns a structured trace of the execution of the specified transaction |
ETH |
eth_accounts |
SUPPORTED |
Returns a list of addresses owned by client |
ETH |
eth_chainId |
SUPPORTED |
Returns the currently configured chain id (default is 260 ) |
ETH |
eth_coinbase |
NOT IMPLEMENTED |
Returns the client coinbase address |
ETH |
eth_estimateGas |
SUPPORTED |
Generates and returns an estimate of how much gas is necessary for the transaction to complete |
ETH |
eth_feeHistory |
SUPPORTED |
Returns a collection of historical block gas data (hardcoded with gas price of 250_000_000 ) |
ETH |
eth_gasPrice |
SUPPORTED |
Returns the current price per gas in wei (hardcoded to 250_000_000 ) |
ETH |
eth_getBalance |
SUPPORTED |
Returns the balance of the account of given address |
ETH |
eth_getBlockByHash |
SUPPORTED |
Returns information about a block by block hash |
ETH |
eth_getBlockByNumber |
SUPPORTED |
Returns information about a block by block number |
ETH |
eth_getBlockTransactionCountByHash |
SUPPORTED |
Number of transactions in a block from a block matching the given block hash |
ETH |
eth_getBlockTransactionCountByNumber |
SUPPORTED |
Number of transactions in a block from a block matching the given block number |
ETH |
eth_getCompilers |
NOT IMPLEMENTED |
Returns a list of available compilers |
ETH |
eth_getTransactionByHash |
SUPPORTED |
Returns the information about a transaction requested by transaction hash |
ETH |
eth_getTransactionCount |
SUPPORTED |
Returns the number of transactions sent from an address |
ETH |
eth_blockNumber |
SUPPORTED |
Returns the number of the most recent block |
ETH |
eth_call |
SUPPORTED |
Executes a new message call immediately without creating a transaction on the block chain |
ETH |
eth_sendRawTransaction |
SUPPORTED |
Creates new message call transaction or a contract creation for signed transactions |
ETH |
eth_getCode |
SUPPORTED |
Returns code at a given address |
ETH |
eth_getFilterChanges |
SUPPORTED |
Polling method for a filter, which returns an array of logs, block hashes, or transaction hashes, depending on the filter type, which occurred since last poll |
ETH |
eth_getFilterLogs |
SUPPORTED |
Returns an array of all logs matching filter with given id |
ETH |
eth_getLogs |
SUPPORTED |
Returns an array of all logs matching a given filter object |
ETH |
eth_getProof |
NOT IMPLEMENTED |
Returns the details for the account at the specified address and block number, the account's Merkle proof, and the storage values for the specified storage keys with their Merkle-proofs |
ETH |
eth_getStorageAt |
SUPPORTED |
Returns the value from a storage position at a given address |
ETH |
eth_getTransactionByBlockHashAndIndex |
SUPPORTED |
Returns information about a transaction by block hash and transaction index position |
ETH |
eth_getTransactionByBlockNumberAndIndex |
SUPPORTED |
Returns information about a transaction by block number and transaction index position |
ETH |
eth_getTransactionReceipt |
SUPPORTED |
Returns the receipt of a transaction by transaction hash |
ETH |
eth_getUncleByBlockHashAndIndex |
NOT IMPLEMENTED |
Returns information about a uncle of a block by hash and uncle index position |
ETH |
eth_getUncleByBlockNumberAndIndex |
NOT IMPLEMENTED |
Returns information about a uncle of a block by hash and uncle index position |
ETH |
eth_getUncleCountByBlockHash |
NOT IMPLEMENTED |
Returns the number of uncles in a block from a block matching the given block hash |
ETH |
eth_getUncleCountByBlockNumber |
NOT IMPLEMENTED |
Returns the number of uncles in a block from a block matching the given block hash |
ETH |
eth_getWork |
NOT IMPLEMENTED |
Returns: An Array with the following elements 1: DATA, 32 Bytes - current block header pow-hash 2: DATA, 32 Bytes - the seed hash used for the DAG. 3: DATA, 32 Bytes - the boundary condition ("target"), 2^256 / difficulty |
ETH |
eth_hashrate |
NOT IMPLEMENTED |
Returns the number of hashes per second that the node is mining with |
ETH |
eth_maxPriorityFeePerGas |
NOT IMPLEMENTED |
Returns a maxPriorityFeePerGas value suitable for quick transaction inclusion |
ETH |
eth_mining |
NOT IMPLEMENTED |
Returns true if client is actively mining new blocks |
ETH |
eth_newBlockFilter |
SUPPORTED |
Creates a filter in the node, to notify when a new block arrives |
ETH |
eth_newFilter |
SUPPORTED |
Creates a filter object, based on filter options, to notify when the state changes (logs) |
ETH |
eth_newPendingTransactionFilter |
SUPPORTED |
Creates a filter in the node, to notify when new pending transactions arrive |
ETH ` |
eth_protocolVersion |
SUPPORTED |
Returns the current ethereum protocol version |
ETH |
eth_sendTransaction |
NOT IMPLEMENTED |
Creates new message call transaction or a contract creation, if the data field contains code |
ETH |
eth_sign |
NOT IMPLEMENTED |
The sign method calculates an Ethereum specific signature with: sign(keccak256("\x19Ethereum Signed Message:\n" + message.length + message))) |
ETH |
eth_signTransaction |
NOT IMPLEMENTED |
Signs a transaction that can be submitted to the network at a later time using eth_sendRawTransaction |
ETH |
eth_signTypedData |
NOT IMPLEMENTED |
Identical to eth_signTypedData_v4 |
ETH |
eth_signTypedData_v4 |
NOT IMPLEMENTED |
Returns Promise<string>: Signature . As in eth_sign , it is a hex encoded 129 byte array starting with 0x . |
ETH |
eth_submitHashrate |
NOT IMPLEMENTED |
Used for submitting mining hashrate |
ETH |
eth_submitWork |
NOT IMPLEMENTED |
Used for submitting a proof-of-work solution |
ETH |
eth_subscribe |
NOT IMPLEMENTED |
Starts a subscription to a particular event |
ETH |
eth_syncing |
SUPPORTED |
Returns an object containing data about the sync status or false when not syncing |
ETH |
eth_uninstallFilter |
SUPPORTED |
Uninstalls a filter with given id |
ETH |
eth_unsubscribe |
NOT IMPLEMENTED |
Cancel a subscription to a particular event |
EVM |
evm_addAccount |
NOT IMPLEMENTED |
Adds any arbitrary account |
EVM |
evm_increaseTime |
SUPPORTED |
Jump forward in time by the given amount of time, in seconds |
EVM |
evm_mine |
SUPPORTED |
Force a single block to be mined |
EVM |
evm_removeAccount |
NOT IMPLEMENTED |
Removes an account |
EVM |
evm_revert |
SUPPORTED |
Revert the state of the blockchain to a previous snapshot |
EVM |
evm_setAccountBalance |
NOT IMPLEMENTED |
Sets the given account's balance to the specified WEI value |
EVM |
evm_setAccountCode |
NOT IMPLEMENTED |
Sets the given account's code to the specified data |
EVM |
evm_setAccountNonce |
NOT IMPLEMENTED |
Sets the given account's nonce to the specified value |
EVM |
evm_setAccountStorageAt |
NOT IMPLEMENTED |
Sets the given account's storage slot to the specified data |
EVM |
evm_setAutomine |
NOT IMPLEMENTED |
Enables or disables the automatic mining of new blocks with each new transaction submitted to the network |
EVM |
evm_setBlockGasLimit |
NOT IMPLEMENTED |
Sets the Block Gas Limit of the network |
EVM |
evm_setIntervalMining |
NOT IMPLEMENTED |
Enables (with a numeric argument greater than 0) or disables (with a numeric argument equal to 0), the automatic mining of blocks at a regular interval of milliseconds, each of which will include all pending transactions |
EVM |
evm_setNextBlockTimestamp |
SUPPORTED |
Works like evm_increaseTime , but takes the exact timestamp that you want in the next block, and increases the time accordingly |
EVM |
evm_setTime |
SUPPORTED |
Sets the internal clock time to the given timestamp |
EVM |
evm_snapshot |
SUPPORTED |
Snapshot the state of the blockchain at the current block |
HARDHAT |
hardhat_addCompilationResult |
NOT IMPLEMENTED |
Add information about compiled contracts |
HARDHAT |
hardhat_dropTransaction |
NOT IMPLEMENTED |
Remove a transaction from the mempool |
HARDHAT |
hardhat_impersonateAccount |
SUPPORTED |
Impersonate an account |
HARDHAT |
hardhat_getAutomine |
NOT IMPLEMENTED |
Returns true if automatic mining is enabled, and false otherwise |
HARDHAT |
hardhat_metadata |
NOT IMPLEMENTED |
Returns the metadata of the current network |
HARDHAT |
hardhat_mine |
Mine any number of blocks at once, in constant time | |
HARDHAT |
hardhat_reset |
NOT IMPLEMENTED |
Resets the state of the network |
HARDHAT |
hardhat_setBalance |
SUPPORTED |
Modifies the balance of an account |
HARDHAT |
hardhat_setCode |
NOT IMPLEMENTED |
Sets the bytecode of a given account |
HARDHAT |
hardhat_setCoinbase |
NOT IMPLEMENTED |
Sets the coinbase address |
HARDHAT |
hardhat_setLoggingEnabled |
NOT IMPLEMENTED |
Enables or disables logging in Hardhat Network |
HARDHAT |
hardhat_setMinGasPrice |
NOT IMPLEMENTED |
Sets the minimum gas price |
HARDHAT |
hardhat_setNextBlockBaseFeePerGas |
NOT IMPLEMENTED |
Sets the base fee per gas for the next block |
HARDHAT |
hardhat_setPrevRandao |
NOT IMPLEMENTED |
Sets the PREVRANDAO value of the next block |
HARDHAT |
hardhat_setNonce |
SUPPORTED |
Sets the nonce of a given account |
HARDHAT |
hardhat_setStorageAt |
NOT IMPLEMENTED |
Sets the storage value at a given key for a given account |
HARDHAT |
hardhat_stopImpersonatingAccount |
SUPPORTED |
Stop impersonating an account after having previously used hardhat_impersonateAccount |
NETWORK |
net_version |
SUPPORTED |
Returns the current network id (default is 260 ) |
NETWORK |
net_peerCount |
SUPPORTED |
Returns the number of peers currently connected to the client (hard-coded to 0 ) |
NETWORK |
net_listening |
SUPPORTED |
Returns true if the client is actively listening for network connections (hard-coded to false ) |
ZKS |
zks_estimateFee |
SUPPORTED |
Gets the Fee estimation data for a given Request |
ZKS |
zks_estimateGasL1ToL2 |
NOT IMPLEMENTED |
Estimate of the gas required for a L1 to L2 transaction |
ZKS |
zks_getAllAccountBalances |
NOT IMPLEMENTED |
Returns all balances for confirmed tokens given by an account address |
ZKS |
zks_getBlockDetails |
NOT IMPLEMENTED |
Returns additional zkSync-specific information about the L2 block |
ZKS |
zks_getBridgeContracts |
NOT IMPLEMENTED |
Returns L1/L2 addresses of default bridges |
ZKS |
zks_getBytecodeByHash |
NOT IMPLEMENTED |
Returns bytecode of a transaction given by its hash |
ZKS |
zks_getConfirmedTokens |
NOT IMPLEMENTED |
Returns [address, symbol, name, and decimal] information of all tokens within a range of ids given by parameters from and limit |
ZKS |
zks_getL1BatchBlockRange |
NOT IMPLEMENTED |
Returns the range of blocks contained within a batch given by batch number |
ZKS |
zks_getL1BatchDetails |
NOT IMPLEMENTED |
Returns data pertaining to a given batch |
ZKS |
zks_getL2ToL1LogProof |
NOT IMPLEMENTED |
Given a transaction hash, and an index of the L2 to L1 log produced within the transaction, it returns the proof for the corresponding L2 to L1 log |
ZKS |
zks_getL2ToL1MsgProof |
NOT IMPLEMENTED |
Given a block, a sender, a message, and an optional message log index in the block containing the L1->L2 message, it returns the proof for the message sent via the L1Messenger system contract |
ZKS |
zks_getMainContract |
NOT IMPLEMENTED |
Returns the address of the zkSync Era contract |
ZKS |
zks_getRawBlockTransactions |
NOT IMPLEMENTED |
Returns data of transactions in a block |
ZKS |
zks_getTestnetPaymaster |
NOT IMPLEMENTED |
Returns the address of the testnet paymaster |
ZKS |
zks_getTokenPrice |
SUPPORTED |
Gets the USD price of a token ( ETH is hard-coded to 1_500 , while some others are 1 ) |
ZKS |
zks_getTransactionDetails |
NOT IMPLEMENTED |
Returns data from a specific transaction given by the transaction hash |
ZKS |
zks_L1BatchNumber |
NOT IMPLEMENTED |
Returns the latest L1 batch number |
ZKS |
zks_L1ChainId |
NOT IMPLEMENTED |
Returns the chain id of the underlying L1 |
Gets the current value of show_calls
that's originally set with --show-calls
option
- NONE
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{"jsonrpc": "2.0","id": "1","method": "config_getShowCalls","params": []}'
Gets the value of current_timestamp
for the node
- NONE
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{"jsonrpc": "2.0","id": "1","method": "config_getCurrentTimestamp","params": []}'
Updates show_calls
to print more detailed call traces
value: String ('None', 'User', 'System', 'All')
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{"jsonrpc": "2.0","id": "1","method": "config_setShowCalls","params": ["all"]}'
Updates show_storage_logs
to print storage log reads/writes
value: String ('None', 'Read', 'Write', 'All')
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{"jsonrpc": "2.0","id": "1","method": "config_setShowStorageLogs","params": ["all"]}'
Updates show_vm_details
to print more detailed results from vm execution
value: String ('None', 'All')
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{"jsonrpc": "2.0","id": "1","method": "config_setShowVmDetails","params": ["all"]}'
Updates show_gas_details
to print more details about gas estimation and usage
value: String ('None', 'All')
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{"jsonrpc": "2.0","id": "1","method": "config_setShowGasDetails","params": ["all"]}'
Updates resolve-hashes
to call OpenChain for human-readable ABI names in call traces
value: boolean
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{"jsonrpc": "2.0","id": "1","method": "config_setResolveHashes","params": [true]}'
The debug_traceCall
is similar to eth_call
but returns call traces for each call.
Currently calls can only be traced on the latest block. This is the default and hence the block argument can be omitted.
The third argument mirrors the TraceConfig
of go-ethereum, but with the restriction that the only supported tracer is CallTracer
. Memory, Stack and Storage traces are not supported.
-
transaction: Transaction
-
block: BlockNumber
-
tracer: TracerConfig
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "2",
"method": "debug_traceCall",
"params": [{
"to": "0x36615Cf349d7F6344891B1e7CA7C72883F5dc049",
"data": "0x0000",
"from": "0xa61464658AfeAf65CccaaFD3a512b69A83B77618",
"gas": "0x0000",
"gasPrice": "0x0000",
"value": "0x0000",
"nonce": "0x0000"
}, "latest"]
}'
Returns call traces for the transaction with given hash.
Currently only transactions executed on the dev node itself (ie, not from upstream when using fork mode) can be traced.
The third argument mirrors the TraceConfig
of go-ethereum, but with the restriction that the only supported tracer is CallTracer
. Memory, Stack and Storage traces are not supported.
-
tx_hash: H256
-
options: TracerConfig
(optional)
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "2",
"method": "debug_traceTransaction",
"params": [
"0xd3a94ff697a573cb174ecce05126e952ecea6dee051526a3e389747ff86b0d99",
{ "tracer": "callTracer", "tracerConfig": { "onlyTopCall": true } }
]
}'
Returns call traces for each transaction within a given block.
Currently only transactions from blocks mined on the dev node itself (ie, not from upstream when using fork mode) can be traced.
The third argument mirrors the TraceConfig
of go-ethereum, but with the restriction that the only supported tracer is CallTracer
. Memory, Stack and Storage traces are not supported.
-
blockHash: H256
-
options: TracerConfig
(optional)
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "2",
"method": "debug_traceBlockByHash",
"params": [
"0xd3a94ff697a573cb174ecce05126e952ecea6dee051526a3e389747ff86b0d99",
{ "tracer": "callTracer", "tracerConfig": { "onlyTopCall": true } }
]
}'
Returns call traces for each transaction within a given block.
Currently only transactions from blocks mined on the dev node itself (ie, not from upstream when using fork mode) can be traced.
The third argument mirrors the TraceConfig
of go-ethereum, but with the restriction that the only supported tracer is CallTracer
. Memory, Stack and Storage traces are not supported.
-
blockNumber: BlockNumber
-
options: TracerConfig
(optional)
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "2",
"method": "debug_traceBlockByNumber",
"params": [
"latest",
{ "tracer": "callTracer", "tracerConfig": { "onlyTopCall": true } }
]
}'
Returns the current network id
- NONE
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{"jsonrpc": "2.0","id": "1","method": "net_version","params": []}'
Returns the number of connected peers
- NONE
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{"jsonrpc": "2.0","id": "1","method": "net_peerCount","params": []}'
Returns true
if the node is listening for connections
- NONE
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{"jsonrpc": "2.0","id": "1","method": "net_listening","params": []}'
Returns a list of addresses owned by client
- NONE
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{"jsonrpc": "2.0","id": "1","method": "eth_accounts","params": []}'
Returns the current chain id
- NONE
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{"jsonrpc": "2.0","id": "1","method": "eth_chainId","params": []}'
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete
transaction: Transaction
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "2",
"method": "eth_estimateGas",
"params": [{
"to": "0x36615Cf349d7F6344891B1e7CA7C72883F5dc049",
"data": "0x0000",
"from": "0xa61464658AfeAf65CccaaFD3a512b69A83B77618",
"gas": "0x0000",
"gasPrice": "0x0000",
"value": "0x0000",
"nonce": "0x0000"
}, "latest"]
}'
Returns the fee history for a given range of blocks
block_count: U64
newest_block: BlockNumber
reward_percentiles: Vec<f32>
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{"jsonrpc": "2.0","id": "1","method": "eth_feeHistory","params": ["0x1", "latest", [25, 50 , 75]]}'
Returns the current price per gas in wei
- NONE
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{"jsonrpc": "2.0","id": "1","method": "eth_gasPrice","params": []}'
Returns the balance of the account of given address
-
address: Address
-
block: BlockNumber
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "1",
"method": "eth_getBalance",
"params": ["0x0000000000000000000000000000000000000000", "latest"]
}'
Returns information about a block by block hash
-
hash: H256
-
full: boolean
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "1",
"method": "eth_getBlockByHash",
"params": ["0x0000000000000000000000000000000000000000000000000000000000000008", false]
}'
Returns information about a block by block number
-
block: BlockNumber
-
full: boolean
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "1",
"method": "eth_getBlockByNumber",
"params": ["latest", true]
}'
Number of transactions in a block from a block matching the given block hash
block_hash: H256
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "1",
"method": "eth_getBlockTransactionCountByHash",
"params": ["0x0000000000000000000000000000000000000000000000000000000000000008"]
}'
Number of transactions in a block from a block matching the given block number
block_number: BlockNumber
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "1",
"method": "eth_getBlockTransactionCountByNumber",
"params": ["latest"]
}'
Polling method for a filter, which returns an array of logs, block hashes, or transaction hashes, depending on the filter type, which occurred since last poll
id: U256
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "1",
"method": "eth_getFilterChanges",
"params": ["0x1"]
}'
Creates a filter in the node, to notify when a new block arrives
- NONE_
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "1",
"method": "eth_newBlockFilter"
}'
Creates a filter object, based on filter options, to notify when the state changes (logs)
filter: Filter
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "1",
"method": "eth_newFilter",
"params": [{
"fromBlock": "0xa",
"toBlock": "0xff",
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"topics": []
}]
}'
Creates a filter in the node, to notify when new pending transactions arrive
- NONE_
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "1",
"method": "eth_newPendingTransactionFilter"
}'
Uninstalls a filter with given id
id: U256
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "1",
"method": "eth_uninstallFilter",
"params": ["0x1"]
}'
Returns an array of all logs matching filter with given id
id: U256
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "1",
"method": "eth_getFilterLogs",
"params": ["0x1"]
}'
Returns an array of all logs matching a filter
filter: Filter
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "1",
"method": "eth_getLogs",
"params": [{
"fromBlock": "0xa",
"toBlock": "0xff",
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"topics": []
}]
}'
Returns code at a given address
-
address: Address
-
block: BlockNumber
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "1",
"method": "eth_getCode",
"params": ["0x0000000000000000000000000000000000000000", "latest"]
}'
Returns the information about a transaction requested by transaction hash
hash: Hash
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "1",
"method": "eth_getTransactionByHash",
"params": ["0x0000000000000000000000000000000000000000000000000000000000000000"]
}'
Returns the number of transactions sent from an address
-
address: Address
-
block: BlockNumber
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "1",
"method": "eth_getTransactionCount",
"params": ["0x0000000000000000000000000000000000000000", "latest"]
}'
Returns the transaction receipt for a given transaction hash
hash: H256
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "1",
"method": "eth_getTransactionReceipt",
"params": ["0x0000000000000000000000000000000000000000"]
}'
Returns the number of most recent block
- NONE
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{"jsonrpc": "2.0","id": "1","method": "eth_blockNumber","params": []}'
Executes a new message call immediately without creating a transaction on the block chain
-
transaction: Transaction
-
block: BlockNumber
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "2",
"method": "eth_call",
"params": [{
"to": "0x36615Cf349d7F6344891B1e7CA7C72883F5dc049",
"data": "0x0000",
"from": "0xa61464658AfeAf65CccaaFD3a512b69A83B77618",
"gas": "0x0000",
"gasPrice": "0x0000",
"value": "0x0000",
"nonce": "0x0000"
}, "latest"]
}'
Creates new message call transaction or a contract creation for signed transactions
transaction: Transaction
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{"jsonrpc": "2.0","id": "1","method": "eth_sendRawTransaction","params": ["0x0000"]
}'
Returns syncing status of the node. This will always return false
.
- NONE
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{"jsonrpc": "2.0","id": "1","method": "eth_syncing","params": []
}'
Returns the value from a storage position at a given address.
address: H160
position: U256
blockNumber: BlockIdVariant
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "1",
"method": "eth_getStorageAt",
"params": ["0x123456789abcdef123456789abcdef1234567890", "0x0", "latest"]
}'
Returns information about a transaction by block hash and transaction index position
block_hash: H256
index: U64
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "1",
"method": "eth_getTransactionByBlockHashAndIndex",
"params": ["0x0000000000000000000000000000000000000000000000000000000000000008", "0x1"]
}'
Returns information about a transaction by block number and transaction index position
block_number: BlockNumber
index: U64
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "1",
"method": "eth_getTransactionByBlockNumberAndIndex",
"params": ["latest", "0x1"]
}'
Returns the current ethereum protocol version.
- NONE
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "1",
"method": "eth_protocolVersion"
}'
Sets the balance of the given address to the given balance.
address: Address
- TheAddress
whose balance will be editedbalance: U256
- The balance to set for the given address, in wei
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "1",
"method": "hardhat_setBalance",
"params": [
"0x36615Cf349d7F6344891B1e7CA7C72883F5dc049",
"0x1337"
]
}'
Modifies an account's nonce by overwriting it. The new nonce must be greater than the existing nonce.
address: Address
- TheAddress
whose nonce is to be changednonce: U256
- The new nonce
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "1",
"method": "hardhat_setNonce",
"params": [
"0x36615Cf349d7F6344891B1e7CA7C72883F5dc049",
"0x1337"
]
}'
Sometimes you may want to advance the latest block number of the network by a large number of blocks. One way to do this would be to call the evm_mine RPC method multiple times, but this is too slow if you want to mine thousands of blocks. The hardhat_mine method can mine any number of blocks at once, in constant time. (It exhibits the same performance no matter how many blocks are mined.)
num_blocks: U64
- The number of blocks to mine. (Optional: defaults to 1)interval: U646
- The interval between the timestamps of each block, in seconds. (Optional: defaults to 1)
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "2",
"method": "hardhat_mine",
"params": [
"0xaa",
"0x100"
]
}'
Begin impersonating account- subsequent transactions sent to the node will be committed as if they were initiated by the supplied address.
address: Address
- The address to begin impersonating
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "2",
"method": "hardhat_impersonateAccount",
"params": [
"0x364d6D0333432C3Ac016Ca832fb8594A8cE43Ca6"
]
}'
Stop impersonating account, should be used after calling hardhat_impersonateAccount
.
Since we only impersonate one account at a time, the address
argument is ignored and the current
impersonated account (if any) is cleared.
address: Address
- (Optional) Argument accepted for compatibility and will be ignored
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "2",
"method": "hardhat_stopImpersonatingAccount",
"params": [
"0x364d6D0333432C3Ac016Ca832fb8594A8cE43Ca6"
]
}'
Mines an empty block
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{"jsonrpc": "2.0","id": "1","method": "evm_mine","params": []
}'
Increase the current timestamp for the node
time_delta_seconds: U64
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{"jsonrpc": "2.0","id": "1","method": "evm_increaseTime","params": [10]}'
Sets the timestamp of the next block but doesn't mine one..
timestamp: U64
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{"jsonrpc": "2.0","id": "1","method": "evm_setNextBlockTimestamp","params": [1672527600]}'
Set the current timestamp for the node. Warning: This will allow you to move backwards in time, which may cause new blocks to appear to be mined before old blocks. This will result in an invalid state.
time: U64
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{"jsonrpc": "2.0","id": "1","method": "evm_setTime","params": [1672527600]}'
Snapshot the state of the blockchain at the current block.
- NONE
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{"jsonrpc": "2.0","id": "1","method": "evm_snapshot"}'
Revert the state of the blockchain to a previous snapshot
snapshot_id: U64
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{"jsonrpc": "2.0","id": "1","method": "evm_revert","params": ["0x1"]}'
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete
transaction: Transaction
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "2",
"method": "zks_estimateFee",
"params": [{
"to": "0x36615Cf349d7F6344891B1e7CA7C72883F5dc049",
"data": "0x0000",
"from": "0xa61464658AfeAf65CccaaFD3a512b69A83B77618",
"gas": "0x0000",
"gasPrice": "0x0000",
"value": "0x0000",
"nonce": "0x0000"
}]
}'
Returns the token price given an Address
address: Address
SUPPORTED
curl --request POST \
--url http://localhost:8011/ \
--header 'content-type: application/json' \
--data '{"jsonrpc": "2.0","id": "1","method": "zks_getTokenPrice","params": ["0x0000000000000000000000000000000000000000"]}'