eth_gettransactionbyhash - Worldchain

Example code for the eth_getTransactionByHash JSON-RPC method. Complete guide on how to use eth_getTransactionByHash JSON-RPC in GetBlock Web3 documentation.

Returns the information about a transaction requested by transaction hash on the World Chain network.

Parameters

Parameter
Type
Description

transactionHash

string

Hash of the transaction (32 bytes)

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_getTransactionByHash",
    "params": ["0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"],
    "id": "getblock.io"
}'

Response

{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": {
        "hash": "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b",
        "blockNumber": "0x1A5C3B2",
        "from": "0x...",
        "to": "0x...",
        "value": "0x..."
    }
}

Response Parameters

Field
Type
Description

hash

string

Transaction hash

blockNumber

string

Block number containing the transaction

from

string

Sender address

to

string

Recipient address

value

string

Value transferred in wei

Use Case

The eth_getTransactionByHash method on World Chain is typically used for:

  • Transaction lookup

  • Payment verification

  • Transaction details retrieval

  • Debugging

Error Handling

Status Code
Error Message
Cause

403

Forbidden

Missing or invalid ACCESS-TOKEN

Web3 Integration

Last updated

Was this helpful?