LogoLogo
  • Introduction
  • Radius testnet access
  • Quickstart
    • Command line
    • Go
    • JavaScript
    • Postman
    • Python
    • Rust
    • TypeScript
  • How to
    • Create a Private Key
    • Get testnet ETH tokens
    • Deploy a smart contract
  • Concepts
    • Ethereum transaction types
  • Tutorials
  • Radius SDKs
  • API Reference
    • eth_blockNumber
    • eth_call
    • eth_chainId
    • eth_createAccessList
    • eth_estimateGas
    • eth_feeHistory
    • eth_gasPrice
    • eth_getBalance
    • eth_getBlock
    • eth_getBlockByHash
    • eth_getBlockByNumber
    • eth_getBlockTransactionCountByHash
    • eth_getBlockTransactionCountByNumber
    • eth_getCode
    • eth_getLogs
    • eth_getStorageAt
    • eth_getTransactionByBlockHashAndIndex
    • eth_getTransactionByBlockNumberAndIndex
    • eth_getTransactionByHash
    • eth_getTransactionCount
    • eth_getTransactionReceipt
    • eth_sendRawTransaction
    • eth_sendTransaction
    • net_version
    • web3_clientVersion
    • web3_sha3
    • web3_getTransactionCount
  • Release Notes
  • Whitepaper
  • Radius Discord
Powered by GitBook
On this page
  • Parameters
  • Returns
  • Example

Was this helpful?

Edit on GitHub
  1. API Reference

eth_getTransactionByHash

Previouseth_getTransactionByBlockNumberAndIndexNexteth_getTransactionCount

Last updated 4 months ago

Was this helpful?

Returns information about a transaction for a given hash.

Parameters

transaction hash: [Required] A string representing the hash (32 bytes) of a transaction.

Returns

A transaction object, or null when no transaction was found. The transaction object will consist of the following keys and their values:

  • accessList: A list of addresses and storage keys accessed by the transaction. See .

  • blockHash: 32 bytes. A hash of the block including this transaction. null when it's pending.

  • blockNumber: The number of the block including this transaction. null when it's pending.

  • chainID: chain ID specifying the network. Returned only for .

  • from: 20 bytes. The address of the sender.

  • gas: Gas provided by the sender.

  • gasPrice: Gas price provided by the sender (in wei).

  • hash: 32 bytes. The hash of the transaction.

  • input: The data sent along with the transaction.

  • maxPriorityFeePerGas: Maximum fee (in wei) the sender is willing to pay per gas above the base fee. See .

  • maxFeePerGas: [optional] Maximum total fee (base fee + priority fee, in wei) the sender is willing to pay per gas. See .

  • nonce: The number of transactions made by the sender prior to this one.

  • r: 32 bytes. The ECDSA signature r.

  • s: 32 bytes. The ECDSA signature s.

  • to: 20 bytes. The address of the receiver. null when it's a contract creation transaction.

  • transactionIndex: The transaction's index position in the block, in hexadecimal. null when it's pending.

  • type: The .

  • v: The ECDSA recovery ID.

  • value: The value transferred (in wei).

  • yParity: Parity (0x0 for even, 0x1 for odd) of the y-value of a signature.

Example

Request

curl https://rpc.testnet.tryradi.us/<YOUR-RPC-ENDPOINT> \
  -X POST \
  -H "Content-Type: application/json" \
  -d '
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0x981ae62ff26ae150f69ec3073e551c84cf5209c49c481b3df494ec68931f7960"
  ],
  "id": 1
}
'

Response

{
  "jsonrpc": "2.0",
  "result": {
    "hash": "0x981ae62ff26ae150f69ec3073e551c84cf5209c49c481b3df494ec68931f7960",
    "blockHash": "0x00000000000000000000000000000000000000000000000000000194afcc18bd",
    "blockNumber": "0x194afcc18bd",
    "transactionIndex": "0x0",
    "type": "0x0",
    "gasPrice": "0x0",
    "from": "0xa446c7bf569b10dcd4899d1505427a1229a431be",
    "to": "0x0000000000000000000000000000000000000000",
    "gas": "0x493e0",
    "value": "0x0",
    "nonce": "0x0",
    "input": "0x6080604052348015600e575f5ffd5b506101298061001c5f395ff3fe6080604052348015600e575f5ffd5b50600436106030575f3560e01c806360fe47b11460345780636d4ce63c14604c575b5f5ffd5b604a60048036038101906046919060a9565b6066565b005b6052606f565b604051605d919060dc565b60405180910390f35b805f8190555050565b5f5f54905090565b5f5ffd5b5f819050919050565b608b81607b565b81146094575f5ffd5b50565b5f8135905060a3816084565b92915050565b5f6020828403121560bb5760ba6077565b5b5f60c6848285016097565b91505092915050565b60d681607b565b82525050565b5f60208201905060ed5f83018460cf565b9291505056fea2646970667358221220c9d450006b906ff115167c8c7bba9154cc401a7b54810387f4dd053155e2b19664736f6c634300081c0033",
    "r": "0x92b2aa5f92eb91535430e4e6063d8b5b85e09f108cb176f6734761e56f461e7c",
    "s": "0x150910a8aa56e4670c2f116b6f189d1dac3d055ce2075c9fbb3d0d7c6e09bb33",
    "v": "0x255a45"
  },
  "id": 1
}

Request

cast tx 0x981ae62ff26ae150f69ec3073e551c84cf5209c49c481b3df494ec68931f7960 \
  --rpc-url https://rpc.testnet.tryradi.us/<YOUR-RPC-ENDPOINT>

Response

blockHash            0x00000000000000000000000000000000000000000000000000000194afcc18bd
blockNumber          1738116176061
from                 0xa446c7Bf569b10DCd4899D1505427A1229A431Be
transactionIndex     0
effectiveGasPrice    0

gas                  300000
gasPrice             0
hash                 0x981ae62ff26ae150f69ec3073e551c84cf5209c49c481b3df494ec68931f7960
input                0x6080604052348015600e575f5ffd5b506101298061001c5f395ff3fe6080604052348015600e575f5ffd5b50600436106030575f3560e01c806360fe47b11460345780636d4ce63c14604c575b5f5ffd5b604a60048036038101906046919060a9565b6066565b005b6052606f565b604051605d919060dc565b60405180910390f35b805f8190555050565b5f5f54905090565b5f5ffd5b5f819050919050565b608b81607b565b81146094575f5ffd5b50565b5f8135905060a3816084565b92915050565b5f6020828403121560bb5760ba6077565b5b5f60c6848285016097565b91505092915050565b60d681607b565b82525050565b5f60208201905060ed5f83018460cf565b9291505056fea2646970667358221220c9d450006b906ff115167c8c7bba9154cc401a7b54810387f4dd053155e2b19664736f6c634300081c0033
nonce                0
r                    0x92b2aa5f92eb91535430e4e6063d8b5b85e09f108cb176f6734761e56f461e7c
s                    0x150910a8aa56e4670c2f116b6f189d1dac3d055ce2075c9fbb3d0d7c6e09bb33
to                   0x0000000000000000000000000000000000000000
type                 0
v                    0
value                0
transaction type
secp256k1
access list transactions
EIP-1559 transactions
EIP-1559 transactions
EIP-1559 transactions