Coinbase Wallet SDK
eth_getTransactionByBlockNumberAndIndex
Get a transaction by block number and transaction index position
Defined in the Ethereum JSON-RPC Specification
Returns information about a transaction by block number and transaction index position.
Parameters
Integer block number, or the string “latest”, “earliest” or “pending”.
Integer of the transaction index position as a hexadecimal string.
Returns
A transaction object, or null when no transaction was found.
Error Handling
Code | Message | Description |
---|---|---|
-32602 | Invalid parameters | Invalid block parameter or transaction index |
4100 | Requested method not supported | The method is not supported by the wallet |
Transaction indices start at 0x0 for the first transaction in a block. If the index exceeds the number of transactions, null is returned.