Use a chain-matching client
Transaction hashes are chain-scoped. A client for another chain produces no matching row.
Receipt fields are populated when the provider returns a receipt; they can be absent for a pending transaction.
Returns transaction fields and available receipt metadata for a transaction hash. The client must point to the chain where the transaction exists.
Needs RPC · RPC required
Exact signatures with descriptions, requirements, inputs, returns, and examples.
get_transaction(CLIENT, BYTES32) # RPC required Accepts a transaction hash as an exact BYTES32 value.
| Name | Type |
|---|---|
hash | BYTES32 Transaction hash. |
block_hash | BYTES32 Containing block hash; NULL when pending. |
block_number | BLOCK_NUMBER Containing block height; NULL when pending. |
transaction_index | INTEGER Position within the block. |
from | ADDRESS Sender address. |
Transaction and receipt metadata. Returns transaction fields plus receipt context when available. Transaction hashes are chain-scoped; using the wrong client returns no matching row.
Transaction hashes are chain-scoped. A client for another chain produces no matching row.
Receipt fields are populated when the provider returns a receipt; they can be absent for a pending transaction.
Pair get_transaction with get_transaction_logs when both transaction metadata and emitted events are required.
Persist the returned block_number and block_hash when later queries must use the same block.
get_transaction(CLIENT, VARCHAR) # RPC required Accepts a 0x-prefixed VARCHAR and requires exactly 64 hexadecimal digits.
| Name | Type | Use |
|---|---|---|
client | CLIENT Attached live CLIENT for the chain where the transaction exists. | required positional |
tx_hash | VARCHAR Chain-scoped transaction hash as BYTES32 or a 0x-prefixed 64-digit hexadecimal VARCHAR. | required positional |
| Name | Type |
|---|---|
hash | BYTES32 Transaction hash. |
block_hash | BYTES32 Containing block hash; NULL when pending. |
block_number | BLOCK_NUMBER Containing block height; NULL when pending. |
transaction_index | INTEGER Position within the block. |
from | ADDRESS Sender address. |
Transaction and receipt metadata. Returns transaction fields plus receipt context when available. Transaction hashes are chain-scoped; using the wrong client returns no matching row.