post https://base-mainnet.unifra.io/v1/
Returns the information about a transaction requested by transaction hash. In the response object, blockHash
, blockNumber
, and transactionIndex
are null
when the transaction is pending.
Parameters
DATA, 32 Bytes - hash of a transaction
params: ["0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"];
Returns
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 it's 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 it's 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 id
- r: DATA, 32 Bytes - ECDSA signature r
- s: DATA, 32 Bytes - ECDSA signature s
Example
Request
curl --request POST \
--url https://base-testnet.unifra.io/v1/{your-api-key} \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"jsonrpc": "2.0",
"method": "eth_getTransactionByHash",
"params": [
"0xb1cdcc54555ab3468ee3a8b25cb8eed22db82d9c01211d1683c1e977c8de54bd"
],
"id": 1
}
'
URL: https://eth-mainnet.unifra.io/v1/your-api-key
RequestType: POST
Body:
{
"jsonrpc":"2.0",
"method":"eth_getTransactionByHash",
"params":["0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"],
"id":0
}
Result
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x4d4740c1f839535ae6116c5511b6fee41a83398a074fa06ec45ff4db5d7676aa",
"blockNumber": "0x5c97b4",
"from": "0xeb6304c9904dc04ef66d367b2ebc41525d1f231b",
"gas": "0x23627",
"gasPrice": "0x6b49d23c",
"hash": "0xb1cdcc54555ab3468ee3a8b25cb8eed22db82d9c01211d1683c1e977c8de54bd",
"input": "0x6c459a28000000000000000000000000145c041566b21bec558b2a37f1a5ff261ab559980000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000006492f0d400000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000084704316e5000000000000000000000000000000000000000000000000000000000000278908b8b695e01a6025516a9963a63f4ae86ae2bf79ce20a4b82fe2d5e77f0fa146000000000000000000000000000000000000000000000000000000000000000308b8b695e01a6025516a9963a63f4ae86ae2bf79ce20a4b82fe2d5e77f0fa14600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008259df0469b89af634a46784819031d36fd4d3e11f3b3a586bb7b48d736c0252ba7083b9c759cfaf7c7f16476753045b5cbaa822f14d3b0f4423453b365b1fc5561beefe9231b53b23e19d077e1b1c622b063611a0a2d59a95ffaa44ae6c4df32b36443df59b8e739f431e494e40abd29243fd18facdb789f04ed151cdeef2ad157f1b000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x1dbfc",
"to": "0x53fd4c4fbbd53f6bc58cae6704b92db1f360a648",
"transactionIndex": "0x3",
"value": "0x0",
"type": "0x0",
"chainId": "0x14a33",
"v": "0x29489",
"r": "0xd572de42c56a0be65f253b9af61097682975747d08f3448a786ee7edd40e823e",
"s": "0x5dc3192997677189bc4b110e9aaa188c82a6758a7b3a0b3c26043981a9da1a80"
}
}