post https://opt-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: [
"0x2642e960d3150244e298d52b5b0f024782253e6d0b2c9a01dd4858f7b4665a3f"
]
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 https://opt-mainnet.unifra.io/v1/your-api-key \
-X POST \
-H "Content-Type: application/json" \
-d'{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0x2642e960d3150244e298d52b5b0f024782253e6d0b2c9a01dd4858f7b4665a3f"],"id":0}'
URL: https://opt-mainnet.unifra.io/v1/your-api-key
RequestType: POST
Body:
{
"jsonrpc":"2.0",
"method":"eth_getTransactionByHash",
"params":["0x2642e960d3150244e298d52b5b0f024782253e6d0b2c9a01dd4858f7b4665a3f"],
"id":0
}
Result
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"blockHash": "0x02b853cf50bc1c335b70790f93d5a390a35a166bea9c895e685cc866e4961cae",
"blockNumber": "0x1b4",
"from": "0x3b179dcfc5faa677044c27dce958e4bc0ad696a6",
"gas": "0x11cbbdc",
"gasPrice": "0x0",
"hash": "0x2642e960d3150244e298d52b5b0f024782253e6d0b2c9a01dd4858f7b4665a3f",
"input": "0xd294f093",
"nonce": "0xa2",
"to": "0x4a16a42407aa491564643e1dfc1fd50af29794ef",
"transactionIndex": "0x0",
"value": "0x0",
"v": "0x38",
"r": "0x6fca94073a0cf3381978662d46cf890602d3e9ccf6a31e4b69e8ecbd995e2bee",
"s": "0xe804161a2b56a37ca1f6f4c4b8bce926587afa0d9b1acc5165e6556c959d583",
"queueOrigin": "sequencer",
"txType": "",
"l1TxOrigin": null,
"l1BlockNumber": "0xc1a65c",
"l1Timestamp": "0x60d34b60",
"index": "0x1b3",
"queueIndex": null,
"rawTransaction": "0xf86681a28084011cbbdc944a16a42407aa491564643e1dfc1fd50af29794ef8084d294f09338a06fca94073a0cf3381978662d46cf890602d3e9ccf6a31e4b69e8ecbd995e2beea00e804161a2b56a37ca1f6f4c4b8bce926587afa0d9b1acc5165e6556c959d583"
}
}