Tenderly Node
Detailed JSON RPC reference

Detailed JSON RPC reference

This page shows detailed overview of supported Ethereum JSON RPC calls. Find a brief list of supported calls.

eth_getBlockByHash

Returns information about a block by hash.

Brief version

Params

  1. Block hashThe hash of the block STRING 32 byte hex value
  2. Hydrated transactions BOOLEAN hydrated

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0x5a10754ae6c673ebabb1a78166232c6b88633d50fafe1499392dd6e4c61c344e",
    false
  ]
}

Result

Block information Block object OBJECT

  • parentHash STRING Parent block hash
  • sha3Uncles STRING Ommers hash
  • miner STRING Coinbase
  • stateRoot STRING State root
  • transactionsRoot STRING Transactions root
  • receiptsRoot STRING Receipts root
  • logsBloom STRING Bloom filter
  • difficulty (optional) STRING Difficulty
  • number STRING Number
  • gasLimit STRING Gas limit
  • gasUsed STRING Gas used
  • timestamp STRING Timestamp
  • extraData STRING Extra data
  • mixHash STRING Mix hash
  • nonce STRING Nonce
  • totalDifficulty (optional) STRING Total difficult
  • baseFeePerGas (optional) STRING Base fee per gas
  • size STRING Block size
  • transactions ANYOF of
    • Transaction hashes ARRAY of STRING 32 byte hex value
    • Full transactions ARRAY of
      • Signed 1559 Transaction OBJECT
        • type STRING type
        • nonce STRING nonce
        • to (optional) STRING to address
        • gas STRING gas limit
        • value STRING value
        • input STRING input data
        • maxPriorityFeePerGas STRING max priority fee per gas: Maximum fee per gas the sender is willing to pay to miners in wei
        • maxFeePerGas STRING max fee per gas: The maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei
        • accessList accessList: EIP-2930 access list ARRAY of Access list entry OBJECT
          • address (optional) STRING hex encoded address
          • storageKeys (optional) ARRAY of STRING 32 byte hex value
        • chainId STRING chainId: Chain ID that this transaction is valid on.
        • yParity STRING yParity: The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature.
        • r STRING r
        • s STRING s
      • Signed 2930 Transaction OBJECT
        • type STRING type
        • nonce STRING nonce
        • to (optional) STRING to address
        • gas STRING gas limit
        • value STRING value
        • input STRING input data
        • gasPrice STRING gas price: The gas price willing to be paid by the sender in wei
        • accessList accessList: EIP-2930 access list ARRAY of Access list entry OBJECT
          • address (optional) STRING hex encoded address
          • storageKeys (optional) ARRAY of STRING 32 byte hex value
        • chainId STRING chainId: Chain ID that this transaction is valid on.
        • yParity STRING yParity: The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature.
        • r STRING r
        • s STRING s
      • Signed Legacy Transaction OBJECT
        • type STRING type
        • nonce STRING nonce
        • to (optional) STRING to address
        • gas STRING gas limit
        • value STRING value
        • input STRING input data
        • gasPrice STRING gas price: The gas price willing to be paid by the sender in wei
        • chainId (optional) STRING chainId: Chain ID that this transaction is valid on.
        • v STRING v
        • r STRING r
        • s STRING s
  • uncles Uncles ARRAY of STRING 32 byte hex value

eth_getBlockByNumber

Returns information about a block by number.

Brief version

Params

1. Block

  • STRING Block number
  • ENUM of Block tag earliest|finalized|safe|latest|pending

2. Hydrated transactions BOOLEAN hydrated

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": ["latest", false]
}

Result

Block information Block object OBJECT

  • parentHash STRING Parent block hash
  • sha3Uncles STRING Ommers hash
  • miner STRING Coinbase
  • stateRoot STRING State root
  • transactionsRoot STRING Transactions root
  • receiptsRoot STRING Receipts root
  • logsBloom STRING Bloom filter
  • difficulty (optional) STRING Difficulty
  • number STRING Number
  • gasLimit STRING Gas limit
  • gasUsed STRING Gas used
  • timestamp STRING Timestamp
  • extraData STRING Extra data
  • mixHash STRING Mix hash
  • nonce STRING Nonce
  • totalDifficulty (optional) STRING Total difficult
  • baseFeePerGas (optional) STRING Base fee per gas
  • size STRING Block size
  • transactions ANYOF of
    • Transaction hashes ARRAY of STRING 32 byte hex value
    • Full transactions ARRAY of
      • Signed 1559 Transaction OBJECT
        • type STRING type
        • nonce STRING nonce
        • to (optional) STRING to address
        • gas STRING gas limit
        • value STRING value
        • input STRING input data
        • maxPriorityFeePerGas STRING max priority fee per gas: Maximum fee per gas the sender is willing to pay to miners in wei
        • maxFeePerGas STRING max fee per gas: The maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei
        • accessList accessList: EIP-2930 access list ARRAY of Access list entry OBJECT
          • address (optional) STRING hex encoded address
          • storageKeys (optional) ARRAY of STRING 32 byte hex value
        • chainId STRING chainId: Chain ID that this transaction is valid on.
        • yParity STRING yParity: The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature.
        • r STRING r
        • s STRING s
      • Signed 2930 Transaction OBJECT
        • type STRING type
        • nonce STRING nonce
        • to (optional) STRING to address
        • gas STRING gas limit
        • value STRING value
        • input STRING input data
        • gasPrice STRING gas price: The gas price willing to be paid by the sender in wei
        • accessList accessList: EIP-2930 access list ARRAY of Access list entry OBJECT
          • address (optional) STRING hex encoded address
          • storageKeys (optional) ARRAY of STRING 32 byte hex value
        • chainId STRING chainId: Chain ID that this transaction is valid on.
        • yParity STRING yParity: The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature.
        • r STRING r
        • s STRING s
      • Signed Legacy Transaction OBJECT
        • type STRING type
        • nonce STRING nonce
        • to (optional) STRING to address
        • gas STRING gas limit
        • value STRING value
        • input STRING input data
        • gasPrice STRING gas price: The gas price willing to be paid by the sender in wei
        • chainId (optional) STRING chainId: Chain ID that this transaction is valid on.
        • v STRING v
        • r STRING r
        • s STRING s
  • uncles Uncles ARRAY of STRING 32 byte hex value

eth_getBlockTransactionCountByHash

Returns the number of transactions in a block from a block matching the given block hash.

Brief version

Params

  1. Block hash (optional) STRING 32 byte hex value

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0x5a10754ae6c673ebabb1a78166232c6b88633d50fafe1499392dd6e4c61c344e"
  ]
}

Result

Transaction count STRING hex encoded unsigned integer

eth_getBlockTransactionCountByNumber

Returns the number of transactions in a block matching the given block number.

Brief version

Params

  1. Block (optional)
  • STRING Block number
  • ENUM of Block tag earliest|finalized|safe|latest|pending

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": ["latest"]
}

Result

Transaction count STRING hex encoded unsigned integer

eth_getUncleCountByBlockHash

Returns the number of uncles in a block from a block matching the given block hash.

Brief version

Params

  1. Block hash (optional) STRING 32 byte hex value

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0x5a10754ae6c673ebabb1a78166232c6b88633d50fafe1499392dd6e4c61c344e"
  ]
}

Result

Uncle count STRING hex encoded unsigned integer

eth_getUncleCountByBlockNumber

Returns the number of transactions in a block matching the given block number.

Brief version

Params

  1. Block (optional)
  • STRING Block number
  • ENUM of Block tag earliest|finalized|safe|latest|pending

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": ["latest"]
}

Result

Uncle count STRING hex encoded unsigned integer

eth_chainId

Returns the chain ID of the current network.

Brief version

Params

none

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_chainId",
  "params": []
}

Result

Chain ID STRING hex encoded unsigned integer

eth_syncing

Returns an object with data about the sync status or false.

Brief version

Params

none

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_syncing",
  "params": []
}

Result

Syncing status ONEOF

  • Syncing progress OBJECT
    • startingBlock (optional) STRING Starting block
    • currentBlock (optional) STRING Current block
    • highestBlock (optional) STRING Highest block
  • BOOLEAN Not syncing

eth_accounts

Returns a list of addresses owned by client.

Brief version

Params

none

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_accounts",
  "params": []
}

Result

Accounts ARRAY of STRING hex encoded address

eth_blockNumber

Returns the number of most recent block.

Brief version

Params

none

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_blockNumber",
  "params": []
}

Result

Block number STRING hex encoded unsigned integer

eth_call

Executes a new message call immediately without creating a transaction on the block chain.

Brief version

Params

  1. Transaction Transaction object generic to all types OBJECT
    • type (optional) STRING type
    • nonce (optional) STRING nonce
    • to (optional) STRING to address
    • from (optional) STRING from address
    • gas (optional) STRING gas limit
    • value (optional) STRING value
    • input (optional) STRING input data
    • gasPrice (optional) STRING gas price: The gas price willing to be paid by the sender in wei
    • maxPriorityFeePerGas (optional) STRING max priority fee per gas: Maximum fee per gas the sender is willing to pay to miners in wei
    • maxFeePerGas (optional) STRING max fee per gas: The maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei
    • accessList (optional) accessList: EIP-2930 access list ARRAY of Access list entry OBJECT
    • address (optional) STRING hex encoded address
    • storageKeys (optional) ARRAY of STRING 32 byte hex value
    • chainId (optional) STRING chainId: Chain ID that this transaction is valid on.
  2. Block (optional)
    • STRING Block number
    • ENUM of Block tag earliest|finalized|safe|latest|pending
  3. State Overrides (optional) MAP: mapping from an account (address) to override specification
    • key STRING: the account this override applies to
    • value OBJECT: the override specification
      • nonce (optional) STRING: hex encoded 8 byte nonce override for the account
      • code (optional) STRING: data of the code override for the account
      • balance (optional) STRING: hex encoded 32 byte balance override for the account in wei
      • stateDiff (optional) MAP: mapping of storage key to storage value override
        • key STRING: the storage key
        • value STRING: the value override for the given storage key
  4. Block Overrides (optional) OBJECT: The set of header fields to override in a block.
    • number (optional) STRING: hex, overrides the block number
    • difficulty (optional) STRING: hex, overrides the block difficulty
    • time (optional) STRING: hex, overrides block timestamp
    • gasLimit (optional) STRING: hex, overrides block timestamp
    • coinbase (optional) STRING: hex, overrides block miner
    • random (optional) STRING: hex, overrides the blocks extra data which feeds into the RANDOM opcode
    • baseFee (optional) STRING: hex, overrides block base fee

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "from": "0xDC6bDc37B2714eE601734cf55A05625C9e512461",
      "to": "0xff39a3e734fe363e631441f6d24c7539240c2628",
      "value": "0x0",
      "data": "0x2e7700f0"
    },
    "latest"
  ]
}

Result

Return data STRING hex encoded bytes

eth_estimateGas

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Brief version

Params

  1. Transaction Transaction object generic to all types OBJECT
    • type (optional) STRING type
    • nonce (optional) STRING nonce
    • to (optional) STRING to address
    • from (optional) STRING from address
    • gas (optional) STRING gas limit
    • value (optional) STRING value
    • input (optional) STRING input data
    • gasPrice (optional) STRING gas price: The gas price willing to be paid by the sender in wei
    • maxPriorityFeePerGas (optional) STRING max priority fee per gas: Maximum fee per gas the sender is willing to pay to miners in wei
    • maxFeePerGas (optional) STRING max fee per gas: The maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei
    • accessList (optional) accessList: EIP-2930 access list ARRAY of Access list entry OBJECT
    • address (optional) STRING hex encoded address
    • storageKeys (optional) ARRAY of STRING 32 byte hex value
    • chainId (optional) STRING chainId: Chain ID that this transaction is valid on.
  2. Block (optional)
    • STRING Block number
    • ENUM of Block tag earliest|finalized|safe|latest|pending
  3. State Overrides (optional) MAP: mapping from an account (address) to override specification
    • key STRING: the account this override applies to
    • value OBJECT: the override specification
      • nonce (optional) STRING: hex encoded 8 byte nonce override for the account
      • code (optional) STRING: data of the code override for the account
      • balance (optional) STRING: hex encoded 32 byte balance override for the account in wei
      • stateDiff (optional) MAP: mapping of storage key to storage value override
        • key STRING: the storage key
        • value STRING: the value override for the given storage key
  4. Block Overrides (optional) OBJECT: The set of header fields to override in a block.
    • number (optional) STRING: hex, overrides the block number
    • difficulty (optional) STRING: hex, overrides the block difficulty
    • time (optional) STRING: hex, overrides block timestamp
    • gasLimit (optional) STRING: hex, overrides block timestamp
    • coinbase (optional) STRING: hex, overrides block miner
    • random (optional) STRING: hex, overrides the blocks extra data which feeds into the RANDOM opcode
    • baseFee (optional) STRING: hex, overrides block base fee

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xDC6bDc37B2714eE601734cf55A05625C9e512461",
      "to": "0xff39a3e734fe363e631441f6d24c7539240c2628",
      "value": "0x0",
      "data": "0x2e7700f0"
    },
    "latest"
  ]
}

Result

Gas used STRING hex encoded unsigned integer

eth_createAccessList

Generates an access list for a transaction.

Brief version

Params

  1. Transaction Transaction object generic to all types OBJECT
  • type (optional) STRING type
  • nonce (optional) STRING nonce
  • to (optional) STRING to address
  • from (optional) STRING from address
  • gas (optional) STRING gas limit
  • value (optional) STRING value
  • input (optional) STRING input data
  • gasPrice (optional) STRING gas price: The gas price willing to be paid by the sender in wei
  • maxPriorityFeePerGas (optional) STRING max priority fee per gas: Maximum fee per gas the sender is willing to pay to miners in wei
  • maxFeePerGas (optional) STRING max fee per gas: The maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei
  • accessList (optional) accessList: EIP-2930 access list ARRAY of Access list entry OBJECT
    • address (optional) STRING hex encoded address
    • storageKeys (optional) ARRAY of STRING 32 byte hex value
  • chainId (optional) STRING chainId: Chain ID that this transaction is valid on.
  1. Block (optional)
  • STRING Block number
  • ENUM of Block tag earliest|finalized|safe|latest|pending

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_createAccessList",
  "params": [
    {
      "from": "0xDC6bDc37B2714eE601734cf55A05625C9e512461",
      "to": "0xff39a3e734fe363e631441f6d24c7539240c2628",
      "value": "0x0",
      "data": "0x2e7700f0"
    },
    "latest"
  ]
}

Result

Gas used Access list result OBJECT

  • accessList (optional) accessList ARRAY of Access list entry OBJECT
    • address (optional) STRING hex encoded address
    • storageKeys (optional) ARRAY of STRING 32 byte hex value
  • error (optional) STRING error
  • gasUsed (optional) STRING Gas used

eth_gasPrice

Returns the current price per gas in wei.

Brief version

Params

none

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_gasPrice",
  "params": []
}

Result

Gas price STRING Gas price

eth_maxPriorityFeePerGas

Returns the current maxPriorityFeePerGas per gas in wei.

Brief version

Params

none

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_maxPriorityFeePerGas",
  "params": []
}

Result

Max priority fee per gas STRING Max priority fee per gas

eth_feeHistory

Transaction fee history

Brief version

Params

  1. blockCountRequested range of blocks. Clients will return less than the requested range if not all blocks are available. STRING hex encoded unsigned integer
  2. newestBlockHighest block of the requested range.
  • STRING Block number
  • ENUM of Block tag earliest|finalized|safe|latest|pending
  1. rewardPercentilesA monotonically increasing list of percentile values. For each block in the requested range, the transactions will be sorted in ascending order by effective tip per gas and the coresponding effective tip for the percentile will be determined, accounting for gas consumed. ARRAY of NUMBERNaN

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [2, "latest", []]
}

Result

feeHistoryResult Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.feeHistoryResults OBJECT

  • oldestBlock STRING oldestBlock: Lowest number block of returned range.
  • baseFeePerGas baseFeePerGasArray: 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. ARRAY of STRING hex encoded unsigned integer
  • reward (optional) rewardArray: A two-dimensional array of effective priority fees per gas at the requested block percentiles. ARRAY of ARRAY of STRING rewardPercentile

eth_newFilter

Creates a filter object, based on filter options, to notify when the state changes (logs).

Brief version

Params

  1. Filter (optional) filter OBJECT
  • fromBlock (optional) STRING from block

  • toBlock (optional) STRING to block

  • address (optional) ONEOF of Address(es)

    • STRING Address
    • ARRAY of STRING hex encoded address
  • topics (optional) Topics ARRAY of - NULL

    - `STRING` Single Topic Match
    
    - `ARRAY` of `STRING` 32 hex encoded bytes

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": 7878500,
      "toBlock": 7878700,
      "topics": [
        "0x5445f318f4f5fcfb66592e68e0cc5822aa15664039bd5f0ffde24c5a8142b1ac",
        "0x000000000000000000000000dc6bdc37b2714ee601734cf55a05625c9e512461",
        "0x0000000000000000000000000000000000000000000000000000000000000000"
      ]
    }
  ]
}

Result

Filter Identifier STRING hex encoded unsigned integer

eth_newBlockFilter

Creates a filter in the node, to notify when a new block arrives.

Brief version

Params

none

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_newBlockFilter",
  "params": []
}

Result

Filter Identifier STRING hex encoded unsigned integer

eth_newPendingTransactionFilter

Creates a filter in the node, to notify when a new pending transaction arrives.

Brief version

Params

none

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_newPendingTransactionFilter",
  "params": []
}

Result

Filter Identifier STRING hex encoded unsigned integer

eth_getFilterChanges

Polling method for a filter, which returns an array of logs which occurred since last poll.

Brief version

Params

  1. Filter Identifier (optional) STRING hex encoded unsigned integer

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x433e8e72506124c82ccbb4095b73544422b46a5cc6b2557c386bddf1b0d1f736"
  ]
}

Result

Log objects ONEOF

  • ARRAY of STRING 32 byte hex value
  • ARRAY of STRING 32 byte hex value
  • ARRAY of log OBJECT
    • removed (optional) BOOLEAN removed
    • logIndex (optional) STRING log index
    • transactionIndex (optional) STRING transaction index
    • transactionHash STRING transaction hash
    • blockHash (optional) STRING block hash
    • blockNumber (optional) STRING block number
    • address (optional) STRING address
    • data (optional) STRING data
    • topics (optional) topics ARRAY of STRING 32 hex encoded bytes

eth_getFilterLogs

Returns an array of all logs matching filter with given id.

Brief version

Params

  1. Filter Identifier (optional) STRING hex encoded unsigned integer

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x433e8e72506124c82ccbb4095b73544422b46a5cc6b2557c386bddf1b0d1f736"
  ]
}

Result

Log objects ONEOF

  • ARRAY of STRING 32 byte hex value
  • ARRAY of STRING 32 byte hex value
  • ARRAY of log OBJECT
    • removed (optional) BOOLEAN removed
    • logIndex (optional) STRING log index
    • transactionIndex (optional) STRING transaction index
    • transactionHash STRING transaction hash
    • blockHash (optional) STRING block hash
    • blockNumber (optional) STRING block number
    • address (optional) STRING address
    • data (optional) STRING data
    • topics (optional) topics ARRAY of STRING 32 hex encoded bytes

eth_getLogs

Returns an array of all logs matching filter with given id.

Brief version

Params

  1. Filter (optional) filter OBJECT
  • fromBlock (optional) STRING from block

  • toBlock (optional) STRING to block

  • address (optional) ONEOF of Address(es)

    • STRING Address
    • ARRAY of STRING hex encoded address
  • topics (optional) Topics ARRAY of - NULL

    - `STRING` Single Topic Match
    
    - `ARRAY` of `STRING` 32 hex encoded bytes

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": 7878500,
      "toBlock": 7878700,
      "topics": [
        "0x5445f318f4f5fcfb66592e68e0cc5822aa15664039bd5f0ffde24c5a8142b1ac",
        "0x000000000000000000000000dc6bdc37b2714ee601734cf55a05625c9e512461",
        "0x0000000000000000000000000000000000000000000000000000000000000000"
      ]
    }
  ]
}

Result

Log objects ONEOF

  • ARRAY of STRING 32 byte hex value
  • ARRAY of STRING 32 byte hex value
  • ARRAY of log OBJECT
    • removed (optional) BOOLEAN removed
    • logIndex (optional) STRING log index
    • transactionIndex (optional) STRING transaction index
    • transactionHash STRING transaction hash
    • blockHash (optional) STRING block hash
    • blockNumber (optional) STRING block number
    • address (optional) STRING address
    • data (optional) STRING data
    • topics (optional) topics ARRAY of STRING 32 hex encoded bytes

eth_mining

Returns whether the client is actively mining new blocks.

Brief version

Params

none

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_mining",
  "params": []
}

Result

Mining status BOOLEAN miningStatus

eth_hashrate

Returns the number of hashes per second that the node is mining with.

Brief version

Params

none

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_hashrate",
  "params": []
}

Result

Mining status STRING Hashrate

eth_getBalance

Returns the balance of the account of given address.

Brief version

Params

  1. Address STRING hex encoded address
  2. Block (optional)
  • STRING Block number
  • ENUM of Block tag earliest|finalized|safe|latest|pending

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": ["0x05c476a8b9a1a69c47ca81944fbb13a1ac55d62b", "latest"]
}

Result

Balance STRING hex encoded unsigned integer

eth_getStorageAt

Returns the value from a storage position at a given address.

Brief version

Params

  1. Address STRING hex encoded address
  2. Storage slot STRING hex encoded unsigned integer
  3. Block (optional)
  • STRING Block number
  • ENUM of Block tag earliest|finalized|safe|latest|pending

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0x05c476a8b9a1a69c47ca81944fbb13a1ac55d62b",
    "0x0000000000000000000000000000000000000000000000000000000000000001",
    "latest"
  ]
}

Result

Value STRING hex encoded bytes

eth_getTransactionCount

Returns the number of transactions sent from an address.

Brief version

Params

  1. Address STRING hex encoded address
  2. Block (optional)
  • STRING Block number
  • ENUM of Block tag earliest|finalized|safe|latest|pending

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": ["0x05c476a8b9a1a69c47ca81944fbb13a1ac55d62b", "latest"]
}

Result

Transaction count STRING hex encoded unsigned integer

eth_getCode

Returns code at a given address.

Brief version

Params

  1. Address STRING hex encoded address
  2. Block (optional)
  • STRING Block number
  • ENUM of Block tag earliest|finalized|safe|latest|pending

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": ["0x05c476a8b9a1a69c47ca81944fbb13a1ac55d62b", "latest"]
}

Result

Bytecode STRING hex encoded bytes

eth_sendTransaction

Tenderly doesn't store private keys, so this method is not supported

eth_sendRawTransaction

Submits a raw transaction.

Brief version

Params

  1. Transaction STRING hex encoded bytes

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
  ]
}

Result

Transaction hash STRING 32 byte hex value

eth_getTransactionByHash

Returns the information about a transaction requested by transaction hash.

Brief version

Params

  1. Transaction hash STRING 32 byte hex value

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xd9724b68ad04ac3919678e3158f5d474d3c129cfb4cb7fafcde9b4c756fce188"
  ]
}

Result

Transaction information Transaction information OBJECT

  • blockHash STRING block hash
  • blockNumber STRING block number
  • from STRING from address
  • hash STRING transaction hash
  • transactionIndex STRING transaction index

eth_getTransactionByBlockHashAndIndex

Returns information about a transaction by block hash and transaction index position.

Brief version

Params

  1. Block hash STRING 32 byte hex value
  2. Transaction index STRING hex encoded unsigned integer

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0x5a10754ae6c673ebabb1a78166232c6b88633d50fafe1499392dd6e4c61c344e",
    "0x1"
  ]
}

Result

Transaction information Transaction information OBJECT

  • blockHash STRING block hash
  • blockNumber STRING block number
  • from STRING from address
  • hash STRING transaction hash
  • transactionIndex STRING transaction index

eth_getTransactionByBlockNumberAndIndex

Returns information about a transaction by block number and transaction index position.

Brief version

Params

  1. Block
  • STRING Block number
  • ENUM of Block tag earliest|finalized|safe|latest|pending
  1. Transaction index STRING hex encoded unsigned integer

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": ["latest", "0x1"]
}

Result

Transaction information Transaction information OBJECT

  • blockHash STRING block hash
  • blockNumber STRING block number
  • from STRING from address
  • hash STRING transaction hash
  • transactionIndex STRING transaction index

eth_getTransactionReceipt

Returns the receipt of a transaction by transaction hash.

Brief version

Params

  1. Transaction hash (optional) STRING 32 byte hex value

Example

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0xd9724b68ad04ac3919678e3158f5d474d3c129cfb4cb7fafcde9b4c756fce188"
  ]
}

Result

Receipt Information Receipt info OBJECT

  • transactionHash STRING transaction hash
  • transactionIndex STRING transaction index
  • blockHash STRING block hash
  • blockNumber STRING block number
  • from STRING from
  • to (optional) STRING to: Address of the receiver or null in a contract creation transaction.
  • cumulativeGasUsed STRING cumulative gas used: The sum of gas used by this transaction and all preceding transactions in the same block.
  • gasUsed STRING gas used: The amount of gas used for this specific transaction alone.
  • contractAddress (optional) ONEOF of contract address: The contract address created, if the transaction was a contract creation, otherwise null.
    • STRING hex encoded address
    • NULL
  • logs logs ARRAY of log OBJECT
    • removed (optional) BOOLEAN removed
    • logIndex (optional) STRING log index
    • transactionIndex (optional) STRING transaction index
    • transactionHash STRING transaction hash
    • blockHash (optional) STRING block hash
    • blockNumber (optional) STRING block number
    • address (optional) STRING address
    • data (optional) STRING data
    • topics (optional) topics ARRAY of STRING 32 hex encoded bytes
  • logsBloom STRING logs bloom
  • root (optional) STRING state root: The post-transaction state root. Only specified for transactions included before the Byzantium upgrade.
  • status (optional) STRING status: Either 1 (success) or 0 (failure). Only specified for transactions included after the Byzantium upgrade.
  • effectiveGasPrice STRING effective gas price: The actual value per gas deducted from the senders account. Before EIP-1559, this is equal to the transaction's gas price. After, it is equal to baseFeePerGas + min(maxFeePerGas - baseFeePerGas, maxPriorityFeePerGas).

eth_subscribe

Subscribes user to a Ethereum event notification stream.

Brief version

Params

  1. Event type STRING
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": ["newHeads"]
}

Supported events are listed in the following table.

Event typeDescription
newHeadsFires a notification each time a new header is appended to the chain, including chain reorganisations.
logsReturns logs that are included in new imported blocks and match the given filter criteria.
newPendingTransactionReturns the hash for transactions that are added to the pending state.
syncingIndicates when the node starts or stops synchronising.
  1. Filter JSON object

This parameter have effect only if subscription type is set to logs. User can filter logs that match given address and one of several topics listed in the filter.

Example

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "logs",
    {
      "address": "0x8320fe7702b96808f7bbc0d4a888ed1468216cfd",
      "topics": ["0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902"]
    }
  ]
}

Result

Subscription ID Hex value

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x4a8a4c0517381924f9838102c5a4dcb7"
}

Notifications

eth_subscribe should only be used over a websocket connections. After the subscription is established, the same websocket connection will be used to send notifications.

Notifications are JSON objects. The objects have different form for different event types. Examples for each event type follows.

New head notification.

{
  "jsonrpc": "2.0",
  "method": "eth_subscription",
  "params": {
    "result": {
      "difficulty": "0x15d9223a23aa",
      "extraData": "0xd983010305844765746887676f312e342e328777696e646f7773",
      "gasLimit": "0x47e7c4",
      "gasUsed": "0x38658",
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "miner": "0xf8b483dba2c3b7176a3da549ad41a48bb3121069",
      "nonce": "0x084149998194cc5f",
      "number": "0x1348c9",
      "parentHash": "0x7736fab79e05dc611604d22470dadad26f56fe494421b5b333de816ce1f25701",
      "receiptRoot": "0x2fab35823ad00c7bb388595cb46652fe7886e00660a01e867824d3dceb1c8d36",
      "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
      "stateRoot": "0xb3346685172db67de536d8765c43c31009d0eb3bd9c501c9be3229203f15f378",
      "timestamp": "0x56ffeff8",
      "transactionsRoot": "0x0167ffa60e3ebc0b080cdb95f7c0087dd6c0e61413140e39d94d3468d7c9689f"
    },
    "subscription": "0x9ce59a13059e417087c02d3236a0b1cc"
  }
}

Logs notification.

{
  "jsonrpc": "2.0",
  "method": "eth_subscription",
  "params": {
    "subscription": "0x4a8a4c0517381924f9838102c5a4dcb7",
    "result": {
      "address": "0x8320fe7702b96808f7bbc0d4a888ed1468216cfd",
      "blockHash": "0x61cdb2a09ab99abf791d474f20c2ea89bf8de2923a2d42bb49944c8c993cbf04",
      "blockNumber": "0x29e87",
      "data": "0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003",
      "logIndex": "0x0",
      "topics": ["0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902"],
      "transactionHash": "0xe044554a0a55067caafd07f8020ab9f2af60bdfe337e395ecd84b4877a3d1ab4",
      "transactionIndex": "0x0"
    }
  }
}

New pending transaction notification.

{
  "jsonrpc": "2.0",
  "method": "eth_subscription",
  "params": {
    "subscription": "0xc3b33aa549fb9a60e95d21862596617c",
    "result": "0xd6fdc5cc41a9959e922f30cb772a9aef46f4daea279307bc5f7024edc4ccd7fa"
  }
}

Sync notification.

{
  "subscription": "0xe2ffeb2703bcf602d42922385829ce96",
  "result": {
    "syncing": false
  }
}

eth_unsubscribe

Unsubscribes user from a previously subscribed Ethereum event notification stream.

Brief version

Params

  1. Subscription ID STRING that represents hex value
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": ["0x9cef478923ff08bf67fde6c64013158d"]
}

Result

Boolean Flag that represents if unsubscribe call is successful

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}

Note: eth_unsubscribe have to be issued on the websocket connection previously used to establish the subscription.