Node API - BNB
API AuthenticationClick to view API Authentication details
Authorization
request header or URL
property. Calls are made to one of the Bnb Node API endpoints found in your app's dashboard. For example:
https://bsc--mainnet--rpc-archive.datahub.figment.io
- Fetch with Header
- Fetch with Parameter
- CURL with Header
- CURL with Parameter
fetch("https://bsc--mainnet--rpc-archive.datahub.figment.io", {
method: 'POST', // can also be 'GET', 'PUT' or any appropriate method
headers: {
"Authorization" : "<api_key>",
"Content-Type": "application/json" // if method is 'POST'
},
body: JSON.stringify({
// JSON Payload
})
})
fetch("https://bsc--mainnet--rpc-archive.datahub.figment.io/apikey/{{apikey}}", {
method: 'POST', // can also be 'GET', 'PUT' or any appropriate method
headers: {
"Content-Type": "application/json" // if method is 'POST'
},
body: JSON.stringify({
// JSON Payload
})
})
curl -X POST 'https://bsc--mainnet--rpc-archive.datahub.figment.io' \
--header 'Content-Type: application/json' \
--header 'Authorization: <api_key>' \
--data '{
// JSON Payload
}'
curl -X POST 'https://bsc--mainnet--rpc-archive.datahub.figment.io/apikey/{{apikey}}' \
--header 'Content-Type: application/json' \
--data '{
// JSON Payload
}'
Available Methods
eth_getBlockByHash
Returns information about a block by hash.
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x2",
"extraData": "0xd98301010b846765746889676f312e31362e3135856c696e757800005d43d2fdbc0af952320f7f2b7a6a33dfbe08a67169564e26dc9592214940e0fb303c9b9659241076cd002114010335b48bfba02aa84802256b7dec3ab72096c9b8aaa65900",
"gasLimit": "0x511c1d5",
"gasUsed": "0xe60d14",
"hash": "0x16dbccb2e0de2a4abd8c4a927c4fcd63f6030391873c287c6a1ad832cef03676",
"logsBloom": "0x9eef97b8f0ac3fbf111f11cb8de15133f0078d94a79265cef5df1d33eb11c15a3591d7f889f2fe1f4bd17730021b0ded99a1df44355a93525f6f12e7de242a906f4a8c5c1468753449bf5768e317423faf3fe7fe5ae7ad06bb97f906c241d32e5016fb35be2e768f874b64c55114c853c841f169c8d8478488634cba926286989c332a0b76a9e6d442cd8641b9dd288c18bcd41d7d1fb8eee7eb6c686ff659b3c7725d513ceed340b5546df19acfdb7d66b611505183cd44288be18c8367f6ede206c6d7360eef8fd9b2e4aa1122575739cefa7e034a3c9cfa2546ca59b8eb6188f93e5fa780555eb70f16d0c5f67742e1b8ccbb6ede6648b33bf9f7037f922d",
"miner": "0x2b3a6c089311b478bf629c29d790a7a6db3fc1b9",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x0000000000000000",
"number": "0x128ddc7",
"parentHash": "0xfe37ae25709ef6485a70da49440d4b82baba889e05304f2255321a4addd4a876",
"receiptsRoot": "0xa4e7f51f442d6a7d340bb3b8dceff82d843df39f32141a797635a923a012d0c4",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x7a3a",
"stateRoot": "0xe21cb62aec70b5c96c7b49333b931eadef0e792db885dceddb88ea64a8831a57",
"timestamp": "0x62cc043b",
"totalDifficulty": "0x24e3978",
"transactions": [
{
"blockHash": "0x16dbccb2e0de2a4abd8c4a927c4fcd63f6030391873c287c6a1ad832cef03676",
"blockNumber": "0x128ddc7",
"from": "0x862622e04507222e09b234227af38f37a7198977",
"gas": "0x8d07",
"gasPrice": "0x342770c00",
"hash": "0xa876f8f6f75aebaed910c4e88564215350cd0a4a4a1d4d4ab1848a7265827f25",
"input": "0xa9059cbb000000000000000000000000e67dc4ca819beaa0e5b5c0b8245967d4fa237ccb00000000000000000000000000000000000000000000000002b3800c7b150000",
"nonce": "0x0",
"to": "0x55d398326f99059ff775485246999027b3197955",
"transactionIndex": "0x0",
"value": "0x0",
"type": "0x0",
"chainId": "0x38",
"v": "0x94",
"r": "0xbf6be0498ddf3cb70d2c568b0bc4ea892de0dcc795d3dca0e44e4ad14838f1dd",
"s": "0x624f69793983f27f5e87f6955dad76802e054fbc82b94e1ba1ad939003ad1226"
}
],
"transactionsRoot": "0x97809878199f37bc5bb1ba1484be833dc46f66bac79b94c02b15039f18d456ed",
"uncles": []
}
}
SpecificationView Specification
Parameters
DATA
, 32 Bytes - Hash of a block.Boolean
- Iftrue
it returns the full transaction objects, iffalse
only the hashes of the transactions.
Response
Object
- A block object, or null
when no block was found:
number
:QUANTITY
- the block number.null
when its pending block.hash
:DATA
, 32 Bytes - hash of the block.null
when its pending block.parentHash
:DATA
, 32 Bytes - hash of the parent block.nonce
:DATA
, 8 Bytes - hash of the generated proof-of-work.null
when its pending block.sha3Uncles
:DATA
, 32 Bytes - SHA3 of the uncles data in the block.logsBloom
:DATA
, 256 Bytes - the bloom filter for the logs of the block.null
when its pending block.transactionsRoot
:DATA
, 32 Bytes - the root of the transaction trie of the block.stateRoot
:DATA
, 32 Bytes - the root of the final state trie of the block.receiptsRoot
:DATA
, 32 Bytes - the root of the receipts trie of the block.miner
:DATA
, 20 Bytes - the address of the beneficiary to whom the mining rewards were given.difficulty
:QUANTITY
- integer of the difficulty for this block.totalDifficulty
:QUANTITY
- integer of the total difficulty of the chain until this block.extraData
:DATA
- the "extra data" field of this block.size
:QUANTITY
- integer the size of this block in bytes.gasLimit
:QUANTITY
- the maximum gas allowed in this block.gasUsed
:QUANTITY
- the total used gas by all transactions in this block.timestamp
:QUANTITY
- the unix timestamp for when the block was collated.transactions
:Array
- Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter.uncles
:Array
- Array of uncle hashes.
eth_getBlockByNumber
Returns information about a block by block number.
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x2",
"extraData": "0xd98301010b846765746889676f312e31362e3135856c696e757800005d43d2fdbc0af952320f7f2b7a6a33dfbe08a67169564e26dc9592214940e0fb303c9b9659241076cd002114010335b48bfba02aa84802256b7dec3ab72096c9b8aaa65900",
"gasLimit": "0x511c1d5",
"gasUsed": "0xe60d14",
"hash": "0x16dbccb2e0de2a4abd8c4a927c4fcd63f6030391873c287c6a1ad832cef03676",
"logsBloom": "0x9eef97b8f0ac3fbf111f11cb8de15133f0078d94a79265cef5df1d33eb11c15a3591d7f889f2fe1f4bd17730021b0ded99a1df44355a93525f6f12e7de242a906f4a8c5c1468753449bf5768e317423faf3fe7fe5ae7ad06bb97f906c241d32e5016fb35be2e768f874b64c55114c853c841f169c8d8478488634cba926286989c332a0b76a9e6d442cd8641b9dd288c18bcd41d7d1fb8eee7eb6c686ff659b3c7725d513ceed340b5546df19acfdb7d66b611505183cd44288be18c8367f6ede206c6d7360eef8fd9b2e4aa1122575739cefa7e034a3c9cfa2546ca59b8eb6188f93e5fa780555eb70f16d0c5f67742e1b8ccbb6ede6648b33bf9f7037f922d",
"miner": "0x2b3a6c089311b478bf629c29d790a7a6db3fc1b9",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x0000000000000000",
"number": "0x128ddc7",
"parentHash": "0xfe37ae25709ef6485a70da49440d4b82baba889e05304f2255321a4addd4a876",
"receiptsRoot": "0xa4e7f51f442d6a7d340bb3b8dceff82d843df39f32141a797635a923a012d0c4",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x7a3a",
"stateRoot": "0xe21cb62aec70b5c96c7b49333b931eadef0e792db885dceddb88ea64a8831a57",
"timestamp": "0x62cc043b",
"totalDifficulty": "0x24e3978",
"transactions": [
{
"blockHash": "0x16dbccb2e0de2a4abd8c4a927c4fcd63f6030391873c287c6a1ad832cef03676",
"blockNumber": "0x128ddc7",
"from": "0x862622e04507222e09b234227af38f37a7198977",
"gas": "0x8d07",
"gasPrice": "0x342770c00",
"hash": "0xa876f8f6f75aebaed910c4e88564215350cd0a4a4a1d4d4ab1848a7265827f25",
"input": "0xa9059cbb000000000000000000000000e67dc4ca819beaa0e5b5c0b8245967d4fa237ccb00000000000000000000000000000000000000000000000002b3800c7b150000",
"nonce": "0x0",
"to": "0x55d398326f99059ff775485246999027b3197955",
"transactionIndex": "0x0",
"value": "0x0",
"type": "0x0",
"chainId": "0x38",
"v": "0x94",
"r": "0xbf6be0498ddf3cb70d2c568b0bc4ea892de0dcc795d3dca0e44e4ad14838f1dd",
"s": "0x624f69793983f27f5e87f6955dad76802e054fbc82b94e1ba1ad939003ad1226"
}
],
"transactionsRoot": "0x97809878199f37bc5bb1ba1484be833dc46f66bac79b94c02b15039f18d456ed",
"uncles": []
}
}
SpecificationView Specification
Parameters
QUANTITY|TAG
- integer of a block number, or the string"earliest"
,"latest"
or"pending"
, as in the default block parameterBoolean
- Iftrue
it returns the full transaction objects, iffalse
only the hashes of the transactions.
Response
Object
- A block object, or null
when no block was found:
number
:QUANTITY
- the block number.null
when its pending block.hash
:DATA
, 32 Bytes - hash of the block.null
when its pending block.parentHash
:DATA
, 32 Bytes - hash of the parent block.nonce
:DATA
, 8 Bytes - hash of the generated proof-of-work.null
when its pending block.sha3Uncles
:DATA
, 32 Bytes - SHA3 of the uncles data in the block.logsBloom
:DATA
, 256 Bytes - the bloom filter for the logs of the block.null
when its pending block.transactionsRoot
:DATA
, 32 Bytes - the root of the transaction trie of the block.stateRoot
:DATA
, 32 Bytes - the root of the final state trie of the block.receiptsRoot
:DATA
, 32 Bytes - the root of the receipts trie of the block.miner
:DATA
, 20 Bytes - the address of the beneficiary to whom the mining rewards were given.difficulty
:QUANTITY
- integer of the difficulty for this block.totalDifficulty
:QUANTITY
- integer of the total difficulty of the chain until this block.extraData
:DATA
- the "extra data" field of this block.size
:QUANTITY
- integer the size of this block in bytes.gasLimit
:QUANTITY
- the maximum gas allowed in this block.gasUsed
:QUANTITY
- the total used gas by all transactions in this block.timestamp
:QUANTITY
- the unix timestamp for when the block was collated.transactions
:Array
- Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter.uncles
:Array
- Array of uncle hashes.
eth_getBlockTransactionCountByHash
Returns the number of transactions in a block from a block matching the given block hash.
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x7c"
}
SpecificationView Specification
Parameters
DATA
, 32 Bytes - hash of a block
Response
QUANTITY
- integer of the number of transactions in this block.
eth_getBlockTransactionCountByNumber
Returns the number of transactions in a block matching the given block number.
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x7c"
}
SpecificationView Specification
Parameters
QUANTITY|TAG
- integer of a block number, or the string"earliest"
,"latest"
or"pending"
, as in the default block parameter.
Response
QUANTITY
- integer of the number of transactions in this block.
eth_getUncleCountByBlockHash
Returns the number of uncles in a block from a block matching the given block hash.
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
SpecificationView Specification
Parameters
DATA
, 32 Bytes - hash of a block
Response
QUANTITY
- integer of the number of uncles in this block.
eth_getUncleCountByBlockNumber
Returns the number of uncles in a block from a block matching the given block number.
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
SpecificationView Specification
Parameters
QUANTITY|TAG
- integer of a block number, or the string "latest", "earliest" or "pending", see the default block parameter
Response
QUANTITY
- integer of the number of uncles in this block.
eth_getUncleByBlockHashAndIndex
Returns information about a uncle of a block by hash and uncle index position.
{
"jsonrpc": "2.0",
"id": 1,
"result": null
}
SpecificationView Specification
Parameters
DATA
, 32 Bytes - The hash of a block.QUANTITY
- The uncle's index position.
Response
Object
- A block object, or null
when no block was found:
number
:QUANTITY
- the block number.null
when its pending block.hash
:DATA
, 32 Bytes - hash of the block.null
when its pending block.parentHash
:DATA
, 32 Bytes - hash of the parent block.nonce
:DATA
, 8 Bytes - hash of the generated proof-of-work.null
when its pending block.sha3Uncles
:DATA
, 32 Bytes - SHA3 of the uncles data in the block.logsBloom
:DATA
, 256 Bytes - the bloom filter for the logs of the block.null
when its pending block.transactionsRoot
:DATA
, 32 Bytes - the root of the transaction trie of the block.stateRoot
:DATA
, 32 Bytes - the root of the final state trie of the block.receiptsRoot
:DATA
, 32 Bytes - the root of the receipts trie of the block.miner
:DATA
, 20 Bytes - the address of the beneficiary to whom the mining rewards were given.difficulty
:QUANTITY
- integer of the difficulty for this block.totalDifficulty
:QUANTITY
- integer of the total difficulty of the chain until this block.extraData
:DATA
- the "extra data" field of this block.size
:QUANTITY
- integer the size of this block in bytes.gasLimit
:QUANTITY
- the maximum gas allowed in this block.gasUsed
:QUANTITY
- the total used gas by all transactions in this block.timestamp
:QUANTITY
- the unix timestamp for when the block was collated.transactions
:Array
- Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter.uncles
:Array
- Array of uncle hashes.Returns information about a block by hash. Note: An uncle doesn't contain individual transactions.
eth_getUncleByBlockNumberAndIndex
Returns information about a uncle of a block by number and uncle index position.
{
"jsonrpc": "2.0",
"id": 1,
"result": null
}
SpecificationView Specification
Parameters
QUANTITY|TAG
- a block number, or the string"earliest"
,"latest"
or"pending"
, as in the default block parameterQUANTITY
- the uncle's index position.
Response
Object
- A block object, or null
when no block was found:
number
:QUANTITY
- the block number.null
when its pending block.hash
:DATA
, 32 Bytes - hash of the block.null
when its pending block.parentHash
:DATA
, 32 Bytes - hash of the parent block.nonce
:DATA
, 8 Bytes - hash of the generated proof-of-work.null
when its pending block.sha3Uncles
:DATA
, 32 Bytes - SHA3 of the uncles data in the block.logsBloom
:DATA
, 256 Bytes - the bloom filter for the logs of the block.null
when its pending block.transactionsRoot
:DATA
, 32 Bytes - the root of the transaction trie of the block.stateRoot
:DATA
, 32 Bytes - the root of the final state trie of the block.receiptsRoot
:DATA
, 32 Bytes - the root of the receipts trie of the block.miner
:DATA
, 20 Bytes - the address of the beneficiary to whom the mining rewards were given.difficulty
:QUANTITY
- integer of the difficulty for this block.totalDifficulty
:QUANTITY
- integer of the total difficulty of the chain until this block.extraData
:DATA
- the "extra data" field of this block.size
:QUANTITY
- integer the size of this block in bytes.gasLimit
:QUANTITY
- the maximum gas allowed in this block.gasUsed
:QUANTITY
- the total used gas by all transactions in this block.timestamp
:QUANTITY
- the unix timestamp for when the block was collated.transactions
:Array
- Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter.uncles
:Array
- Array of uncle hashes.Returns information about a block by hash. Note: An uncle doesn't contain individual transactions.
eth_protocolVersion
Returns the current Ethereum protocol version.
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x42"
}
SpecificationView Specification
Parameters
None
Response
String
- The current Ethereum protocol version
eth_chainId
Returns the chain ID of the current network.
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x38"
}
SpecificationView Specification
Parameters
none
Response
quantity
- EIP155 Chain ID.
eth_syncing
Returns an object with data about the sync status or false
.
{
"jsonrpc": "2.0",
"id": 1,
"result": false
}
SpecificationView Specification
Parameters
None
Response
Object|Boolean
, An object with sync status data or FALSE
, when not syncing:
startingBlock
:QUANTITY
- The block at which the import started (will only be reset, after the sync reached his head)currentBlock
:QUANTITY
- The current block, same as eth_blockNumberhighestBlock
:QUANTITY
- The estimated highest block
eth_blockNumber
Returns the number of most recent block.
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x128ddc7"
}
SpecificationView Specification
Parameters
None
Response
QUANTITY
- integer of the current block number the client is on.
eth_call
Executes a new message call immediately without creating a transaction on the block chain.
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x"
}
SpecificationView Specification
Parameters
Object
- The transaction call object
from
:DATA
, 20 Bytes - (optional) The address the transaction is sent from.to
:DATA
, 20 Bytes - The address the transaction is directed to.gas
:QUANTITY
- (optional) Integer of the gas provided for the transaction execution. eth_call consumes zero gas, but this parameter may be needed by some executions.gasPrice
:QUANTITY
- (optional) Integer of the gasPrice used for each paid gasvalue
:QUANTITY
- (optional) Integer of the value sent with this transactiondata
:DATA
- (optional) Hash of the method signature and encoded parameters. For details see Ethereum Contract ABI in the Solidity documentation
QUANTITY|TAG
- integer block number, or the string"latest"
,"earliest"
or"pending"
, see the default block parameter
Response
DATA
- the return value of executed contract.
eth_estimateGas
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. The transaction will not be added to the blockchain. Note that the estimate may be significantly more than the amount of gas actually used by the transaction, for a variety of reasons including EVM mechanics and node performance.
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x5208"
}
SpecificationView Specification
Parameters
See eth_call parameters, expect that all properties are optional. If no gas limit is specified geth uses the block gas limit from the pending block as an upper bound. As a result the returned estimate might not be enough to executed the call/transaction when the amount of gas is higher than the pending block gas limit.
Response
QUANTITY
- the amount of gas used.
eth_gasPrice
Returns the current price per gas in wei.
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x12a05f200"
}
SpecificationView Specification
Parameters
None
Response
QUANTITY
- integer of the current gas price in wei.
eth_feeHistory
Returns the transaction fee history.
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"oldestBlock": "0x128df58",
"reward": [
[
"0x12a05f200",
"0x147d35700"
],
[
"0x12a05f200",
"0x13f2ed0c0"
],
[
"0x12a05f200",
"0x147d35700"
],
[
"0x12a05f200",
"0x147d35700"
]
],
"baseFeePerGas": [
"0x0",
"0x0",
"0x0",
"0x0",
"0x0"
],
"gasUsedRatio": [
0.2358512559448131,
0.20697919214901064,
0.17704759818125512,
0.2458938736832053
]
}
}
SpecificationView Specification
Parameters
BLOCKCOUNT
- Number of blocks in the requested range. 1 ~ 1024 blocks can be requested in a single query. Less than requested may be returned if not all blocks are available.
NEWESTBLOCK
- Highest number of blocks in the requested range.
REWARDPERCENTILES
- (optional) Percentage values between 0 and 100, sampled in ascending order.
Response
OLDESTBLOCK
- Smallest number block of the returned range.
BASEFEEPERGAS
- An array of block base fees per gas. This includes the next block after the newest of the returned range, because this value can be derived from the newest block. Zeroes are returned for pre-EIP-1559 blocks.
GASUSEDRATIO
- An array of gas usage. Which is calculated as the ratio of gasUsed and gasLimit.
REWARD
- (Optional) An array of effective priority fee per gas data points from a single block. All zeroes are returned if the block is empty.
eth_newFilter
Creates a filter object, based on filter options, to notify when the state changes (logs).
""
SpecificationView Specification
To check if the state has changed, call eth_getFilterChanges. A note on specifying topic filters: Topics are order-dependent. A transaction with a log with topics [A, B] will be matched by the following topic filters:
[]
"anything"[A]
"A in first position (and anything after)"[null, B]
"anything in first position AND B in second position (and anything after)"[A, B]
"A in first position AND B in second position (and anything after)"[[A, B], [A, B]]
"(A OR B) in first position AND (A OR B) in second position (and anything after)"-
Parameters
Object
- The filter options:
fromBlock
:QUANTITY|TAG
- (optional, default:"latest"
) Integer block number, or"latest"
for the last mined block or"pending"
,"earliest"
for not yet mined transactions.toBlock
:QUANTITY|TAG
- (optional, default:"latest"
) Integer block number, or"latest"
for the last mined block or"pending"
,"earliest"
for not yet mined transactions.address
:DATA|Array
, 20 Bytes - (optional) Contract address or a list of addresses from which logs should originate.topics
:Array of DATA
, - (optional) Array of 32 BytesDATA
topics. Topics are order-dependent. Each topic can also be an array of DATA with "or" options.
Response
QUANTITY
- A filter id.
eth_newBlockFilter
Creates a filter in the node, to notify when a new block arrives.
""
SpecificationView Specification
To check if the state has changed, call eth_getFilterChanges.
Parameters
None
Response
QUANTITY
- A filter id.
eth_newPendingTransactionFilter
Creates a filter in the node, to notify when new pending transactions arrive.
""
SpecificationView Specification
To check if the state has changed, call eth_getFilterChanges.
Parameters
None
Response
QUANTITY
- A filter id.
eth_uninstallFilter
Uninstalls a filter with given id. Should always be called when watch is no longer needed. Additionally Filters timeout when they aren't requested with eth_getFilterChanges for a period of time.
""
SpecificationView Specification
Parameters
QUANTITY
- The filter id.
Response
Boolean
- true
if the filter was successfully uninstalled, otherwise false
.
eth_getFilterChanges
Polling method for a filter, which returns an array of logs which occurred since last poll.
""
SpecificationView Specification
Parameters
QUANTITY
- the filter id.
Response
Array
- Array of log objects, or an empty array if nothing has changed since last poll.
- For filters created with
eth_newBlockFilter
the return are block hashes (DATA
, 32 Bytes), e.g.["0x3454645634534..."]
. - For filters created with
eth_newPendingTransactionFilter
the return are transaction hashes (DATA
, 32 Bytes), e.g.["0x6345343454645..."]
. - For filters created with
eth_newFilter
logs are objects with following params:removed
:TAG
-true
when the log was removed, due to a chain reorganization.false
if its a valid log.logIndex
:QUANTITY
- integer of the log index position in the block.null
when its pending log.transactionIndex
:QUANTITY
- integer of the transactions index position log was created from.null
when its pending log.transactionHash
:DATA
, 32 Bytes - hash of the transactions this log was created from.null
when its pending log.blockHash
:DATA
, 32 Bytes - hash of the block where this log was in.null
when its pending.null
when its pending log.blockNumber
:QUANTITY
- the block number where this log was in.null
when its pending.null
when its pending log.address
:DATA
, 20 Bytes - address from which this log originated.data
:DATA
- contains one or more 32 Bytes non-indexed arguments of the log.topics
:Array of DATA
- Array of 0 to 4 32 BytesDATA
of indexed log arguments. (In solidity: The first topic is the hash of the signature of the event (e.g.Deposit(address,bytes32,uint256)
), except you declared the event with theanonymous
specifier.)
eth_getFilterLogs
Returns an array of all logs matching filter with given id.
""
SpecificationView Specification
Parameters
QUANTITY
- The filter id.`
Response
Array
- Array of log objects, or an empty array if nothing has changed since last poll.
- For filters created with
eth_newBlockFilter
the return are block hashes (DATA
, 32 Bytes), e.g.["0x3454645634534..."]
. - For filters created with
eth_newPendingTransactionFilter
the return are transaction hashes (DATA
, 32 Bytes), e.g.["0x6345343454645..."]
. - For filters created with
eth_newFilter
logs are objects with following params:removed
:TAG
-true
when the log was removed, due to a chain reorganization.false
if its a valid log.logIndex
:QUANTITY
- integer of the log index position in the block.null
when its pending log.transactionIndex
:QUANTITY
- integer of the transactions index position log was created from.null
when its pending log.transactionHash
:DATA
, 32 Bytes - hash of the transactions this log was created from.null
when its pending log.blockHash
:DATA
, 32 Bytes - hash of the block where this log was in.null
when its pending.null
when its pending log.blockNumber
:QUANTITY
- the block number where this log was in.null
when its pending.null
when its pending log.address
:DATA
, 20 Bytes - address from which this log originated.data
:DATA
- contains one or more 32 Bytes non-indexed arguments of the log.topics
:Array of DATA
- Array of 0 to 4 32 BytesDATA
of indexed log arguments. (In solidity: The first topic is the hash of the signature of the event (e.g.Deposit(address,bytes32,uint256)
), except you declared the event with theanonymous
specifier.)
eth_getLogs
Returns an array of all logs matching a given filter object.
{
"jsonrpc": "2.0",
"id": 1,
"result": []
}
SpecificationView Specification
Parameters
Object
- The filter options:
fromBlock
:QUANTITY|TAG
- (optional, default:"latest"
) Integer block number, or"latest"
for the last mined block or"pending"
,"earliest"
for not yet mined transactions.toBlock
:QUANTITY|TAG
- (optional, default:"latest"
) Integer block number, or"latest"
for the last mined block or"pending"
,"earliest"
for not yet mined transactions.address
:DATA|Array
, 20 Bytes - (optional) Contract address or a list of addresses from which logs should originate.topics
:Array of DATA
, - (optional) Array of 32 BytesDATA
topics. Topics are order-dependent. Each topic can also be an array of DATA with "or" options.blockhash
:DATA
, 32 Bytes - (optional, future) With the addition of EIP-234,blockHash
will be a new filter option which restricts the logs returned to the single block with the 32-byte hashblockHash
. UsingblockHash
is equivalent tofromBlock
=toBlock
= the block number with hashblockHash
. IfblockHash
is present in in the filter criteria, then neitherfromBlock
nortoBlock
are allowed.
Response
Array
- Array of log objects, or an empty array if nothing has changed since last poll.
- For filters created with
eth_newBlockFilter
the return are block hashes (DATA
, 32 Bytes), e.g.["0x3454645634534..."]
. - For filters created with
eth_newPendingTransactionFilter
the return are transaction hashes (DATA
, 32 Bytes), e.g.["0x6345343454645..."]
. - For filters created with
eth_newFilter
logs are objects with following params:removed
:TAG
-true
when the log was removed, due to a chain reorganization.false
if its a valid log.logIndex
:QUANTITY
- integer of the log index position in the block.null
when its pending log.transactionIndex
:QUANTITY
- integer of the transactions index position log was created from.null
when its pending log.transactionHash
:DATA
, 32 Bytes - hash of the transactions this log was created from.null
when its pending log.blockHash
:DATA
, 32 Bytes - hash of the block where this log was in.null
when its pending.null
when its pending log.blockNumber
:QUANTITY
- the block number where this log was in.null
when its pending.null
when its pending log.address
:DATA
, 20 Bytes - address from which this log originated.data
:DATA
- contains one or more 32 Bytes non-indexed arguments of the log.topics
:Array of DATA
- Array of 0 to 4 32 BytesDATA
of indexed log arguments. (In solidity: The first topic is the hash of the signature of the event (e.g.Deposit(address,bytes32,uint256)
), except you declared the event with theanonymous
specifier.)
eth_getBalance
Returns the balance of the account of given address.
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xc6a2938d1ba00"
}
SpecificationView Specification
Parameters
DATA
, 20 Bytes - address to check for balance.QUANTITY|TAG
- integer block number, or the string"latest"
,"earliest"
or"pending"
, see the default block parameter
Response
QUANTITY
- integer of the current balance in wei.
eth_getStorageAt
Returns the value from a storage position at a given address.
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
SpecificationView Specification
Parameters
DATA
, 20 Bytes - address of the storage.QUANTITY
- integer of the position in the storage.QUANTITY|TAG
- integer block number, or the string"latest"
,"earliest"
or"pending"
Response
DATA
- the value at this storage position.
eth_getTransactionCount
Returns the number of transactions sent from an address.
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
SpecificationView Specification
Parameters
DATA
, 20 Bytes - address.QUANTITY|TAG
- integer block number, or the string"latest"
,"earliest"
or"pending"
Response
QUANTITY
- integer of the number of transactions send from this address.
eth_getCode
Returns code at a given address.
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x"
}
SpecificationView Specification
Parameters
DATA
, 20 Bytes - addressQUANTITY|TAG
- integer block number, or the string"latest"
,"earliest"
or"pending"
Response
DATA
- the code from the given address.
eth_sendTransaction
Creates new message call transaction or a contract creation, if the data field contains code.
{
"id": 1,
"jsonrpc": "2.0",
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
SpecificationView Specification
Parameters
Object
- The transaction object
from
:DATA
, 20 Bytes - The address the transaction is sent from.to
:DATA
, 20 Bytes - (optional when creating new contract) The address the transaction is directed to.gas
:QUANTITY
- (optional, default: 90000) Integer of the gas provided for the transaction execution. It will return unused gas.gasPrice
:QUANTITY
- (optional, default: To-Be-Determined) Integer of the gasPrice used for each paid gas.value
:QUANTITY
- (optional) Integer of the value sent with this transaction.data
:DATA
- The compiled code of a contract OR the hash of the invoked method signature and encoded parameters.nonce
:QUANTITY
- (optional) Integer of a nonce. This allows to overwrite your own pending transactions that use the same nonce.
Response
DATA
, 32 Bytes - the transaction hash, or the zero hash if the transaction is not yet available.
Use eth_getTransactionReceipt to get the contract address, after the transaction was mined, when you created a contract.
eth_sendRawTransaction
Creates new message call transaction or a contract creation for signed transactions.
{
"id": 1,
"jsonrpc": "2.0",
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
SpecificationView Specification
Parameters
DATA
, The signed transaction data.
Response
DATA
, 32 Bytes - the transaction hash, or the zero hash if the transaction is not yet available.
Use eth_getTransactionReceipt to get the contract address, after the transaction was mined, when you created a contract.
eth_getTransactionByHash
Returns the information about a transaction requested by transaction hash.
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x16dbccb2e0de2a4abd8c4a927c4fcd63f6030391873c287c6a1ad832cef03676",
"blockNumber": "0x128ddc7",
"from": "0x24e555a72337f0abada9b44682e96f389a840d22",
"gas": "0x15f90",
"gasPrice": "0x12a05f200",
"hash": "0x554c8bce10e1945b894e30d275009349763d23a35e231871e76c174e47edb4b3",
"input": "0xa9059cbb000000000000000000000000f89d7b9c864f589bbf53a82105107622b35eaa40000000000000000000000000000000000000000000000038e0b6b80c13990000",
"nonce": "0x0",
"to": "0x55d398326f99059ff775485246999027b3197955",
"transactionIndex": "0x75",
"value": "0x0",
"type": "0x0",
"v": "0x94",
"r": "0xbd891330d8b7f99a6e29dd1ec5377736d916bde752db52c0e697a3a7e06ac705",
"s": "0x18528deac748ece1cc43d0e2e2d7657ca99465019b88786afa9d0ee3f38cc38b"
}
}
SpecificationView Specification
Parameters
DATA
, 32 Bytes - hash of a transaction
Response
Object
- A transaction object, or null
when no transaction was found:
blockHash
:DATA
, 32 Bytes - hash of the block where this transaction was in.null
when its pending.blockNumber
:QUANTITY
- block number where this transaction was in.null
when its pending.from
:DATA
, 20 Bytes - address of the sender.gas
:QUANTITY
- gas provided by the sender.gasPrice
:QUANTITY
- gas price provided by the sender in Wei.hash
:DATA
, 32 Bytes - hash of the transaction.input
:DATA
- the data send along with the transaction.nonce
:QUANTITY
- the number of transactions made by the sender prior to this one.to
:DATA
, 20 Bytes - address of the receiver.null
when its a contract creation transaction.transactionIndex
:QUANTITY
- integer of the transactions index position in the block.null
when its pending.value
:QUANTITY
- value transferred in Wei.v
:QUANTITY
- ECDSA recovery idr
:QUANTITY
- ECDSA signature rs
:QUANTITY
- ECDSA signature s
eth_getTransactionByBlockHashAndIndex
Returns information about a transaction by block hash and transaction index position.
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x16dbccb2e0de2a4abd8c4a927c4fcd63f6030391873c287c6a1ad832cef03676",
"blockNumber": "0x128ddc7",
"from": "0x862622e04507222e09b234227af38f37a7198977",
"gas": "0x8d07",
"gasPrice": "0x342770c00",
"hash": "0xa876f8f6f75aebaed910c4e88564215350cd0a4a4a1d4d4ab1848a7265827f25",
"input": "0xa9059cbb000000000000000000000000e67dc4ca819beaa0e5b5c0b8245967d4fa237ccb00000000000000000000000000000000000000000000000002b3800c7b150000",
"nonce": "0x0",
"to": "0x55d398326f99059ff775485246999027b3197955",
"transactionIndex": "0x0",
"value": "0x0",
"type": "0x0",
"v": "0x94",
"r": "0xbf6be0498ddf3cb70d2c568b0bc4ea892de0dcc795d3dca0e44e4ad14838f1dd",
"s": "0x624f69793983f27f5e87f6955dad76802e054fbc82b94e1ba1ad939003ad1226"
}
}
SpecificationView Specification
Parameters
DATA
, 32 Bytes - hash of a block.QUANTITY
- integer of the transaction index position.
Response
Object
- A transaction object, or null
when no transaction was found:
blockHash
:DATA
, 32 Bytes - hash of the block where this transaction was in.null
when its pending.blockNumber
:QUANTITY
- block number where this transaction was in.null
when its pending.from
:DATA
, 20 Bytes - address of the sender.gas
:QUANTITY
- gas provided by the sender.gasPrice
:QUANTITY
- gas price provided by the sender in Wei.hash
:DATA
, 32 Bytes - hash of the transaction.input
:DATA
- the data send along with the transaction.nonce
:QUANTITY
- the number of transactions made by the sender prior to this one.to
:DATA
, 20 Bytes - address of the receiver.null
when its a contract creation transaction.transactionIndex
:QUANTITY
- integer of the transactions index position in the block.null
when its pending.value
:QUANTITY
- value transferred in Wei.v
:QUANTITY
- ECDSA recovery idr
:QUANTITY
- ECDSA signature rs
:QUANTITY
- ECDSA signature s
eth_getTransactionByBlockNumberAndIndex
Returns information about a transaction by block number and transaction index position.
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x16dbccb2e0de2a4abd8c4a927c4fcd63f6030391873c287c6a1ad832cef03676",
"blockNumber": "0x128ddc7",
"from": "0x862622e04507222e09b234227af38f37a7198977",
"gas": "0x8d07",
"gasPrice": "0x342770c00",
"hash": "0xa876f8f6f75aebaed910c4e88564215350cd0a4a4a1d4d4ab1848a7265827f25",
"input": "0xa9059cbb000000000000000000000000e67dc4ca819beaa0e5b5c0b8245967d4fa237ccb00000000000000000000000000000000000000000000000002b3800c7b150000",
"nonce": "0x0",
"to": "0x55d398326f99059ff775485246999027b3197955",
"transactionIndex": "0x0",
"value": "0x0",
"type": "0x0",
"v": "0x94",
"r": "0xbf6be0498ddf3cb70d2c568b0bc4ea892de0dcc795d3dca0e44e4ad14838f1dd",
"s": "0x624f69793983f27f5e87f6955dad76802e054fbc82b94e1ba1ad939003ad1226"
}
}
SpecificationView Specification
Parameters
QUANTITY|TAG
- a block number, or the string"earliest"
,"latest"
or"pending"
, as in the default block parameterQUANTITY
- the transaction index position.
Response
Object
- A transaction object, or null
when no transaction was found:
blockHash
:DATA
, 32 Bytes - hash of the block where this transaction was in.null
when its pending.blockNumber
:QUANTITY
- block number where this transaction was in.null
when its pending.from
:DATA
, 20 Bytes - address of the sender.gas
:QUANTITY
- gas provided by the sender.gasPrice
:QUANTITY
- gas price provided by the sender in Wei.hash
:DATA
, 32 Bytes - hash of the transaction.input
:DATA
- the data send along with the transaction.nonce
:QUANTITY
- the number of transactions made by the sender prior to this one.to
:DATA
, 20 Bytes - address of the receiver.null
when its a contract creation transaction.transactionIndex
:QUANTITY
- integer of the transactions index position in the block.null
when its pending.value
:QUANTITY
- value transferred in Wei.v
:QUANTITY
- ECDSA recovery idr
:QUANTITY
- ECDSA signature rs
:QUANTITY
- ECDSA signature s
eth_getTransactionReceipt
Returns the receipt of a transaction by transaction hash.
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x16dbccb2e0de2a4abd8c4a927c4fcd63f6030391873c287c6a1ad832cef03676",
"blockNumber": "0x128ddc7",
"contractAddress": null,
"cumulativeGasUsed": "0xd2df46",
"effectiveGasPrice": "0x12a05f200",
"from": "0x24e555a72337f0abada9b44682e96f389a840d22",
"gasUsed": "0x527b",
"logs": [
{
"address": "0x55d398326f99059ff775485246999027b3197955",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x00000000000000000000000024e555a72337f0abada9b44682e96f389a840d22",
"0x000000000000000000000000f89d7b9c864f589bbf53a82105107622b35eaa40"
],
"data": "0x000000000000000000000000000000000000000000000038e0b6b80c13990000",
"blockNumber": "0x128ddc7",
"transactionHash": "0x554c8bce10e1945b894e30d275009349763d23a35e231871e76c174e47edb4b3",
"transactionIndex": "0x75",
"blockHash": "0x16dbccb2e0de2a4abd8c4a927c4fcd63f6030391873c287c6a1ad832cef03676",
"logIndex": "0x185",
"removed": false
}
],
"logsBloom": "0x00000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000008000000020000000000000000000000000000000000000000000000080000000000000000000000000000000000000010000000000000000000000000008002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000200000000208000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0x55d398326f99059ff775485246999027b3197955",
"transactionHash": "0x554c8bce10e1945b894e30d275009349763d23a35e231871e76c174e47edb4b3",
"transactionIndex": "0x75",
"type": "0x0"
}
}
SpecificationView Specification
Note That the receipt is not available for pending transactions.
Parameters
DATA
, 32 Bytes - hash of a transaction
Response
Object
- A transaction receipt object, or null
when no receipt was found:
transactionHash
:DATA
, 32 Bytes - hash of the transaction.transactionIndex
:QUANTITY
- integer of the transactions index position in the block.blockHash
:DATA
, 32 Bytes - hash of the block where this transaction was in.blockNumber
:QUANTITY
- block number where this transaction was in.from
:DATA
, 20 Bytes - address of the sender.to
:DATA
, 20 Bytes - address of the receiver. null when its a contract creation transaction.cumulativeGasUsed
:QUANTITY
- The total amount of gas used when this transaction was executed in the block.gasUsed
:QUANTITY
- The amount of gas used by this specific transaction alone.contractAddress
:DATA
, 20 Bytes - The contract address created, if the transaction was a contract creation, otherwisenull
.logs
:Array
- Array of log objects, which this transaction generated.logsBloom
:DATA
, 256 Bytes - Bloom filter for light clients to quickly retrieve related logs. It also returns either :root
:DATA
32 bytes of post-transaction stateroot (pre Byzantium)status
:QUANTITY
either1
(success) or0
(failure)
web3_clientVersion
Returns the current client version.
{
"jsonrpc": "2.0",
"id": 1,
"result": "erigon/2022.06.6/linux-amd64/go1.18.2"
}
SpecificationView Specification
Parameters
None
Response
String
- The current client version
web3_sha3
Returns Keccak-256 (not the standardized SHA3-256) of the given data.
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad"
}
SpecificationView Specification
Parameters
DATA
- the data to convert into a SHA3 hash
Response
DATA
- The SHA3 result of the given string.
net_version
Returns the current network id.
{
"jsonrpc": "2.0",
"id": 1,
"result": "56"
}
SpecificationView Specification
Parameters
None
Response
String
- The current network id.
The full list of current network IDs is available at chainlist.org. Sopme common ones are:
1
: Ethereum Mainnet
2
: Morden testnet (now deprecated)
3
: Ropsten testnet
4
: Rinkeby testnet
5
: Goerli testnet
net_listening
Returns true
if client is actively listening for network connections.
{
"jsonrpc": "2.0",
"id": 1,
"result": true
}
SpecificationView Specification
Parameters
None
Response
Boolean
- true
when listening, otherwise false
.
net_peerCount
Returns number of peers currently connected to the client.
{
"jsonrpc": "2.0",
"id": 74,
"result": "0x61"
}
SpecificationView Specification
Parameters
None
Response
QUANTITY
- integer of the number of connected peers.
debug_traceBlockByHash
The debug_traceBlockByHash
method will return a full stack trace of all invoked opcodes of all transaction that were included in this block.
{
"jsonrpc": "2.0",
"id": 0,
"result": [
{
"type": "CALL",
"from": "0x41772edd47d9ddf9ef848cdb34fe76143908c7ad",
"to": "0xe9e7cea3dedca5984780bafc599bd69add087d56",
"value": "0x0",
"gas": "0x9b0e",
"gasUsed": "0x3887",
"input": "0xa9059cbb000000000000000000000000f8a3f64d240b021c0b92d5788b2f52ddb4f095e90000000000000000000000000000000000000000000000045e8cb8f6807c0000",
"output": "0x0000000000000000000000000000000000000000000000000000000000000001",
"time": "1.102377ms"
}
]
}
SpecificationView Specification
Parameters
hash
- Hash of the block to be traced.
Response
array
- Block traces, which have the following object shape (all return types are in hex values):
Response
- Trace Object, which has the following fields:
calls
- Array of transactions in the block with the following fields -from
- Addressgas
- Quantitygasused
- Quantityinput
- Dataoutput
- Datato
- Addresstype
- Datavalue
- Quantity
debug_traceBlockByNumber
The debug_traceBlockByNumber
method will return a full stack trace of all invoked opcodes of all transaction that were included in this block.
{
"jsonrpc": "2.0",
"id": 0,
"result": [
{
"type": "CALL",
"from": "0x862622e04507222e09b234227af38f37a7198977",
"to": "0x55d398326f99059ff775485246999027b3197955",
"value": "0x0",
"gas": "0x3887",
"gasUsed": "0x3887",
"input": "0xa9059cbb000000000000000000000000e67dc4ca819beaa0e5b5c0b8245967d4fa237ccb00000000000000000000000000000000000000000000000002b3800c7b150000",
"output": "0x0000000000000000000000000000000000000000000000000000000000000001",
"time": "2.440128ms"
}
]
}
SpecificationView Specification
Parameters
quantity
- Number of the block to be traced or the string 'latest', 'earliest' or 'pending'.
Response
array
- Block traces, which have the following object shape (all return types are in hex values):
Response
- Trace Object, which has the following fields:
calls
- Array of transactions in the block with the following fields -from
- Addressgas
- Quantitygasused
- Quantityinput
- Dataoutput
- Datato
- Addresstype
- Datavalue
- Quantity
debug_traceCall
The debug_traceCall
method will return a full stack trace of all invoked opcodes of all transaction that were included in this block.
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"type": "CALL",
"from": "0xeeb64cf9a6e36177b616721ffd87788532810e90",
"to": "0xe542f20c52a1e1932ad2589ab778196d17247842",
"value": "0x0",
"gas": "0x48914",
"gasUsed": "0x0",
"input": "0x",
"output": "0x",
"time": "1.163µs"
}
}
SpecificationView Specification
Parameters
from
- (optional) wallet address the transaction is sent from.
to
- wallet address the transaction is sent to.
gas
- (optional) gas provided for the transaction
gasprice
- (optional) gasPrice
value
- (optional) Integer of the value sent with the transaction in hexadecimal.
data
- (optional) hash of the method signature and encoded parameters
quantity
- Number of the block or the string 'latest', 'earliest' or 'pending'.
Response
array
- Block traces, which have the following object shape (all return types are in hex values):
Response
- Trace Object, which has the following fields:
failed
- Addressgas
- Quantityreturnvalue
- Datastructlogs
- Arrayentries
- Arraystoragesbydepth
- Array
debug_traceTransaction
The debug_traceTransaction
method will return a full stack trace of all invoked opcodes of all transaction that were included in this block.
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"structLogs": [
{
"pc": 0,
"op": "PUSH1",
"gas": 68356,
"gasCost": 3,
"depth": 1,
"stack": [],
"memory": []
}
],
"gas": 21115,
"failed": false,
"returnValue": "0000000000000000000000000000000000000000000000000000000000000001"
}
}
SpecificationView Specification
Parameters
hash
- The hash of the transaction
Response
array
- Block traces, which have the following object shape (all return types are in hex values):
Response
- Trace Object, which has the following fields:
failed
- Addressgas
- Quantityreturnvalue
- Datastructlogs
- Arrayentries
- Arraystoragesbydepth
- Array
trace_block
Returns traces created at given block.
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"action": {
"from": "0x862622e04507222e09b234227af38f37a7198977",
"callType": "call",
"gas": "0x3887",
"input": "0xa9059cbb000000000000000000000000e67dc4ca819beaa0e5b5c0b8245967d4fa237ccb00000000000000000000000000000000000000000000000002b3800c7b150000",
"to": "0x55d398326f99059ff775485246999027b3197955",
"value": "0x0"
},
"blockHash": "0x16dbccb2e0de2a4abd8c4a927c4fcd63f6030391873c287c6a1ad832cef03676",
"blockNumber": 19455431,
"result": {
"gasUsed": "0x3887",
"output": "0x0000000000000000000000000000000000000000000000000000000000000001"
},
"subtraces": 0,
"traceAddress": [],
"transactionHash": "0xa876f8f6f75aebaed910c4e88564215350cd0a4a4a1d4d4ab1848a7265827f25",
"transactionPosition": 0,
"type": "call"
}
]
}
SpecificationView Specification
Parameters
Quantity or Tag
- Integer of a block number, or the string 'earliest', 'latest' or 'pending'.
Response
Array
- Block traces.
trace_call
Executes the given call and returns a number of possible traces for it.
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"output": "0x",
"stateDiff": null,
"trace": [
{
"action": {
"from": "0xb5d4eba9463382115fd21dff4e8e0eb0772b7be4",
"callType": "call",
"gas": "0x2fa9e78",
"input": "0x",
"to": "0xcbd6832ebc203e49e2b771897067fce3c58575ac",
"value": "0x0"
},
"result": {
"gasUsed": "0x0",
"output": "0x"
},
"subtraces": 0,
"traceAddress": [],
"type": "call"
}
],
"vmTrace": null
}
}
SpecificationView Specification
Parameters
Object
- Transaction object where from field is optional and nonce field is ommited.Array
- Type of trace, one or more of: "vmTrace", "trace", "stateDiff".Quantity
orTag
- (optional) Integer of a block number, or the string'earliest'
,'latest'
or'pending'
.
Response
Array
- Block traces.
trace_callMany
Performs multiple call traces on top of the same block. i.e. transaction n
will be executed on top of a pending block with all n-1
transactions applied (traced) first. Allows to trace dependent transactions.
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"output": "0x",
"stateDiff": null,
"trace": [
{
"action": {
"from": "0xb5d4eba9463382115fd21dff4e8e0eb0772b7be4",
"callType": "call",
"gas": "0x2fa9e78",
"input": "0x",
"to": "0xcbd6832ebc203e49e2b771897067fce3c58575ac",
"value": "0x186a0"
},
"result": {
"gasUsed": "0x0",
"output": "0x"
},
"subtraces": 0,
"traceAddress": [],
"type": "call"
}
],
"vmTrace": null
}
]
}
SpecificationView Specification
Parameters
Array
- List of trace calls with the type of trace, one or more of:"vmTrace"
,"trace"
,"stateDiff"
.Quantity
orTag
- (optional) Integer of a block number, or the string'earliest'
,'latest'
or'pending'
.
Response
Array
- Array of the given transactions’ traces
trace_replayTransaction
Replays a transaction, returning the traces.
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"output": "0x0000000000000000000000000000000000000000000000000000000000000001",
"stateDiff": null,
"trace": [
{
"action": {
"from": "0x24e555a72337f0abada9b44682e96f389a840d22",
"callType": "call",
"gas": "0x10b04",
"input": "0xa9059cbb000000000000000000000000f89d7b9c864f589bbf53a82105107622b35eaa40000000000000000000000000000000000000000000000038e0b6b80c13990000",
"to": "0x55d398326f99059ff775485246999027b3197955",
"value": "0x0"
},
"result": {
"gasUsed": "0x3887",
"output": "0x0000000000000000000000000000000000000000000000000000000000000001"
},
"subtraces": 0,
"traceAddress": [],
"type": "call"
}
],
"vmTrace": null
}
}
SpecificationView Specification
Parameters
Hash
- Transaction hashArray
- Type of trace, one or more of:"vmTrace"
,"trace"
,"stateDiff"
Response
Object
- Block traces
trace_transaction
Returns all traces of given transaction.
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"action": {
"from": "0x24e555a72337f0abada9b44682e96f389a840d22",
"callType": "call",
"gas": "0x10b04",
"input": "0xa9059cbb000000000000000000000000f89d7b9c864f589bbf53a82105107622b35eaa40000000000000000000000000000000000000000000000038e0b6b80c13990000",
"to": "0x55d398326f99059ff775485246999027b3197955",
"value": "0x0"
},
"blockHash": "0x16dbccb2e0de2a4abd8c4a927c4fcd63f6030391873c287c6a1ad832cef03676",
"blockNumber": 19455431,
"result": {
"gasUsed": "0x3887",
"output": "0x0000000000000000000000000000000000000000000000000000000000000001"
},
"subtraces": 0,
"traceAddress": [],
"transactionHash": "0x554c8bce10e1945b894e30d275009349763d23a35e231871e76c174e47edb4b3",
"transactionPosition": 117,
"type": "call"
}
]
}
SpecificationView Specification
Parameters
Hash
- Transaction hash
Response
Array
- Traces of given transaction
trace_filter
Return all traces of the given filter
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"action": {
"from": "0x24e555a72337f0abada9b44682e96f389a840d22",
"callType": "call",
"gas": "0x10b04",
"input": "0xa9059cbb000000000000000000000000f89d7b9c864f589bbf53a82105107622b35eaa40000000000000000000000000000000000000000000000038e0b6b80c13990000",
"to": "0x55d398326f99059ff775485246999027b3197955",
"value": "0x0"
},
"blockHash": "0x16dbccb2e0de2a4abd8c4a927c4fcd63f6030391873c287c6a1ad832cef03676",
"blockNumber": 19455431,
"result": {
"gasUsed": "0x3887",
"output": "0x0000000000000000000000000000000000000000000000000000000000000001"
},
"subtraces": 0,
"traceAddress": [],
"transactionHash": "0x554c8bce10e1945b894e30d275009349763d23a35e231871e76c174e47edb4b3",
"transactionPosition": 117,
"type": "call"
}
]
}
SpecificationView Specification
Parameters
Object
- The filter objectfromBlock
:Quantity
orTag
- (optional) From this block.toBlock
:Quantity
orTag
- (optional) To this block.fromAddress
:Array
- (optional) Sent from these addresses.toAddress
:Address
- (optional) Sent to these addresses.after
:Quantity
- (optional) The offset trace numbercount
:Quantity
- (optional) Integer number of traces to display in a batch.
Response
Array
- Traces matching given filter
trace_replayBlockTransactions
Replays all transactions in a block returning the requested traces for each transaction.
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"output": "0x0000000000000000000000000000000000000000000000000000000000000001",
"stateDiff": null,
"trace": [
{
"action": {
"from": "0x862622e04507222e09b234227af38f37a7198977",
"callType": "call",
"gas": "0x3887",
"input": "0xa9059cbb000000000000000000000000e67dc4ca819beaa0e5b5c0b8245967d4fa237ccb00000000000000000000000000000000000000000000000002b3800c7b150000",
"to": "0x55d398326f99059ff775485246999027b3197955",
"value": "0x0"
},
"result": {
"gasUsed": "0x3887",
"output": "0x0000000000000000000000000000000000000000000000000000000000000001"
},
"subtraces": 0,
"traceAddress": [],
"type": "call"
}
],
"vmTrace": null,
"transactionHash": "0xa876f8f6f75aebaed910c4e88564215350cd0a4a4a1d4d4ab1848a7265827f25"
}
]
}
SpecificationView Specification
Parameters
Quantity
orTag
- Integer of a block number, or the string'earliest'
,'latest'
or'pending'
.Array
- Type of trace, one or more of:"vmTrace"
,"trace"
,"stateDiff"
.
Response
Array
- Block transactions traces.
txpool_content
Returns tx pool content.
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFee": {
"0x0695Ca4dbbca26aAAd2C7c7fee13F926b3934651": {
"3": {
"blockHash": null,
"blockNumber": null,
"from": "0x0695ca4dbbca26aaad2c7c7fee13f926b3934651",
"gas": "0xd6d8",
"gasPrice": "0x4c4b40",
"hash": "0x0774dd1536de14dde990f7672e69959922e289c43bb05ce5f4e32eba6dfb153d",
"input": "0xa9059cbb0000000000000000000000005fb4c344decb62a77692ed0d10d3f2c70304cdeb000000000000000000000000000000000000000000000001219125a0888aa000",
"nonce": "0x3",
"to": "0x55d398326f99059ff775485246999027b3197955",
"transactionIndex": null,
"value": "0x0",
"type": "0x0",
"v": "0x94",
"r": "0x3a668e8b0c6318ed274a59f2bf774889d8086f98fca56fb50d2b6afa62708e1f",
"s": "0x39bfb75b4c4dc996cf23c97551087c0ae3e03bc31e087065adceee9bd837a652"
}
}
}
}
}
SpecificationView Specification
Parameters
None
Response
blockHash
- block hash where this transaction was in, null
here.
blockNumber
- Block number where this transaction was added encoded as a hexadecimal, null
here.
from
- Sender's address
gas
- Gas used in the transaction.
gasPrice
- Total amount in wei the sender wants to pay for the transaction.
hash
- Transaction hash.
input
- Encoded transaction input data.
nonce
- Number of transactions by the sender
r
- ECDSA signature r.
s
- ECDSA signature s.
to
- Receiver's address. null
if it's a contract creation transaction.
transactionIndex
- Integer of the transactions index position in the block encoded as a hexadecimal.
type
- A number between 0 and 0x7f, for a total of 128 possible transaction types.
v
- ECDSA recovery id encoded as a hexadecimal.
value
- Value transferred in Wei encoded as a hexadecimal.
txpool_status
Returns a tx pool status.
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFee": "0xa4",
"pending": "0x2521",
"queued": "0x752d"
}
}
SpecificationView Specification
Parameters
None
Response
pending
- Total number of pending transactions in the txpool (in hex format).queued
- Total number of queued transactions in the txpool (in hex format).