eth_getTransactionByHash - Scroll

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

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 --location --request POST 'https://scroll-testnet.unifra.io/v1/your-api-key' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0xcfbb1d0539edf78d869e35099f28e105f08ac270117e64d589c88f00180cef85"],"id":0}'

Result

{
    "jsonrpc": "2.0",
    "id": 0,
    "result": {
        "blockHash": "0xdecf7d1109c108ec3c01cd71e9bff4bd5b8790b86654f95e495012eb66524e25",
        "blockNumber": "0x2f",
        "from": "0x000070300830ffc8501cf42402015bad12699d71",
        "gas": "0x32728",
        "gasPrice": "0x4a167ca6e",
        "hash": "0xcfbb1d0539edf78d869e35099f28e105f08ac270117e64d589c88f00180cef85",
        "input": "0x9e353c700000000000000000000000007136311d65fe0e65eae4f389a4d86f9bd731d97c000000000000000000000000704da9bc96a89b98f7a3890aba3deebb8b69b04300000000000000000000000000000000000000000000000006f05b59d3b200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006361084e000000000000000000000000000000000000000000000000000000000000000900000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000a4232e87480000000000000000000000003ba3b56f992bb8fdb946b8f5e33310f86560359b0000000000000000000000003ba3b56f992bb8fdb946b8f5e33310f86560359b00000000000000000000000000000000000000000000000006f05b59d3b200000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "nonce": "0x9",
        "to": "0xcb4567f103a6ba4cc348547a5094be0d93e88835",
        "transactionIndex": "0x0",
        "value": "0x0",
        "type": "0x1",
        "accessList": [],
        "chainId": "0x518935",
        "v": "0x1",
        "r": "0x193da2e7b703b5fd6840b7f8fbdc8d4793d10c60ba47db5ca8e686e8ad99534b",
        "s": "0x6221f1f71ad9ca7724f3ca35f38ecb6cdc2ab9d358c53544715d09de5f00c606"
    }
}
Path Params
string
required
Body Params
string
Defaults to { "method": "debug_traceCall", "params": [ { "from": "0xe84118e2b5c74f9610377e86c840ac70f8ca925d", "to": "0xd9880690bd717189cc3fbe7b9020f27fae7ac76f", "value": "0xb1a2bc2ec50000", "gas": "0x226dc", "gasUsed": "0x20b84", "data": "0x5ae401dc00000000000000000000000000000000000000000000000000000000643925d800000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000e404e45aaf000000000000000000000000a1ea0b2354f5a344110af2b6ad68e75545009a03000000000000000000000000a0d71b9877f44c744546d649147e3f1e70a9376000000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000e84118e2b5c74f9610377e86c840ac70f8ca925d00000000000000000000000000000000000000000000000000b1a2bc2ec500000000000000000000000000000000000000000000000008b76dd55b0c2f4f5113000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" }, "0x13d5d0", { "tracer": "callTracer", "tracerConfig": { "onlyTopCall": false, "withLog": true } } ], "id": 1, "jsonrpc": "2.0" }
Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json