eth_getTransactionByHash
Returns information about a transaction for a given hash.
REQUEST
POST https://<network>.chainrpc.io/v3/YOUR-API-KEYHEADERS
Content-Type: application/jsonREQUEST PARAMS
TRANSACTION HASH[required] - a string representing the hash (32 bytes) of a transaction
EXAMPLE
## JSON-RPC over HTTPS POST
## Replace YOUR-API-KEY with an API key from your chainRPC Dashboard
## You can also replace mainnet with a different supported network
curl https://rpc.chainrpc.io/v3/YOUR-API-KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}'
## JSON-RPC over WSS
## Replace YOUR-API-KEY with an API key from your chainRPC Dashboard
## You can also replace mainnet with a different supported network
wscat -c wss://eth.chainrpc.io/v3/YOUR-API-KEY
>{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}RESPONSE
RESULT FIELDS
TRANSACTION- A transaction object, or null when no transaction was foundaccessList: [optional] list of addresses and storage keys the transaction plans to access. See access list transactions.blockHash: 32 Bytes - hash of the block including this transaction.nullwhen it's pending.blockNumber: number of the block including this transaction.nullwhen it's pending.chainID: [optional] chain ID specifying the network. Returned only for EIP-1559 transactions.from: 20 Bytes - address of the sender.gas: gas provided by the sender.gasPrice: gas price provided by the sender in Wei.hash: 32 Bytes - hash of the transaction.input: the data sent along with the transaction.maxPriorityFeePerGas: [optional] maximum fee, in Wei, the sender is willing to pay per gas above the base fee. See EIP-1559 transactions.maxFeePerGas: [optional] maximum total fee (base fee + priority fee), in Wei, the sender is willing to pay per gas. See EIP-1559 transactions.nonce: the number of transactions made by the sender prior to this one.r: 32 Bytes - ECDSA signaturer.s: 32 Bytes - ECDSA signatures.to: 20 Bytes - address of the receiver.nullwhen it's a contract creation transaction.transactionIndex: the transaction's index position in the block, in hexadecimal.nullwhen it's pending.type: the transaction type.v: ECDSA recovery ID.value: value transferred in Wei.
BODY
Last updated