[Transaction] eth_getTransactionByBlockHashAndIndex
Returns information about a transaction by block hash and transaction index position.
Please check the Caution-Transaction before using this API.
JSONRPC: eth_getTransactionByBlockHashAndIndex
Request
- application/json
Body
Array [
]
params
undefined[]
Hash of a block.
Integer of the transaction index position.
Responses
- 200
Returns information about a transaction by block hash and transaction index position.
- application/json
- Schema
- Example (from schema)
Schema
- LegacyTransaction
- AccessListTransaction
- DynamicFeeTransaction
Array [
]
Array [
]
error
object
A Number that indicates the error type that occurred. This MUST be an integer.
code | message | description |
---|---|---|
-32700 | Parse error | invalid JSON was received by the server. An error occurred on the server while parsing the JSON text. |
-32602 | Invalid params | Invalid method parameter(s). |
A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.
A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.).
result
object
oneOf
Hash of the block where this transaction was in. null when it is pending.
Block number where this transaction was in. null when it is pending.
Address of the sender.
Gas provided by the sender.
Gas price provided by the sender in peb.
Hash of the transaction.
The data sent along with the transaction.
The number of transactions made by the sender prior to this one.
Address of the receiver. null when it is a contract creation transaction.
Integer of values sent with this transaction.
Integer of the transaction index position in the block. null when it is pending.
An integer representing the type of the transaction.
ECDSA recovery id.
ECDSA signature r.
ECDSA signature s.
Hash of the block where this transaction was in. null when it is pending.
Block number where this transaction was in. null when it is pending.
Address of the sender.
Gas provided by the sender.
Gas price provided by the sender in peb.
Hash of the transaction.
The data sent along with the transaction.
The number of transactions made by the sender prior to this one.
Address of the receiver. null when it is a contract creation transaction.
Integer of values sent with this transaction.
Integer of the transaction index position in the block. null when it is pending.
An integer representing the type of the transaction.
accessList
object[]
required
An array of accessList.
Address of the contract.
An array of storage keys.
Chain id set on the requested node.
ECDSA recovery id.
ECDSA signature r.
ECDSA signature s.
Hash of the block where this transaction was in. null when it is pending.
Block number where this transaction was in. null when it is pending.
Address of the sender.
Gas provided by the sender.
Gas price provided by the sender in peb.
A maximum amount to pay for the transaction to execute.
Gas tip cap for dynamic fee transaction in peb.
Hash of the transaction.
The data sent along with the transaction.
The number of transactions made by the sender prior to this one.
Address of the receiver. null when it is a contract creation transaction.
Integer of values sent with this transaction.
Integer of the transaction index position in the block. null when it is pending.
An integer representing the type of the transaction.
accessList
object[]
required
An array of accessList.
Address of the contract.
An array of storage keys.
Chain id set on the requested node.
ECDSA recovery id.
ECDSA signature r.
ECDSA signature s.
{
"jsonrpc": "2.0",
"id": 0,
"error": {
"code": -32700,
"message": "Parse error",
"data": "string"
},
"result": {
"blockHash": "string",
"blockNumber": "string",
"from": "string",
"gas": "string",
"gasPrice": "string",
"hash": "string",
"input": "string",
"nonce": "string",
"to": "string",
"value": "string",
"transactionIndex": "string",
"type": "string",
"v": "string",
"r": "string",
"s": "string"
}
}