Constellation Network
IntroductionFundamentalsFor DevelopersNode Validators
  • Index
  • Guide
    • Introduction
    • Provider Activation
    • Sending RPC Requests
    • Signing Data
    • Supported Connectors
    • Using External Libraries
  • API Reference
    • Overview
    • Wallet provider API
      • Overview
      • errorTypes
      • version
      • getProvider()
  • Chain Provider API
    • Overview
    • activated
    • chain
    • version
    • on()
    • removeListener()
    • async activate()
    • async onAsync()
    • async removeListenerAsync()
    • async request()
  • Constellation RPC API
    • Overview
    • dag_accounts
    • dag_chainId
    • dag_getBalance
    • dag_getMetagraphBalance
    • dag_getMetagraphPendingTransaction
    • dag_getMetagraphTransaction
    • dag_getPendingTransaction
    • dag_getPublicKey
    • dag_getTransaction
    • dag_requestAccounts
    • dag_sendMetagraphTransaction
    • dag_sendMetagraphDataTransaction
    • dag_signMetagraphDataTransaction
    • dag_sendTransaction
    • dag_signData
    • dag_signMessage
    • wallet_watchAsset
    • dag_delegatedStake
    • dag_withdrawDelegatedStake
    • dag_allowSpend
    • dag_tokenLock
  • Ethereum RPC API
    • Overview
    • eth_accounts
    • eth_blockNumber
    • eth_call
    • eth_chainId
    • eth_estimateGas
    • eth_gasPrice
    • eth_getBalance
    • eth_getBlockByHash
    • eth_getBlockByNumber
    • eth_getBlockTransactionCountByHash
    • eth_getBlockTransactionCountByNumber
    • eth_getCode
    • eth_getFilterChanges
    • eth_getFilterLogs
    • eth_getLogs
    • eth_getStorageAt
    • eth_getTransactionByBlockHashAndIndex
    • eth_getTransactionByBlockNumberAndIndex
    • eth_getTransactionByHash
    • eth_getTransactionCount
    • eth_getTransactionReceipt
    • eth_getUncleByBlockHashAndIndex
    • eth_getUncleByBlockNumberAndIndex
    • eth_getUncleCountByBlockHash
    • eth_getUncleCountByBlockNumber
    • eth_newBlockFilter
    • eth_newFilter
    • eth_protocolVersion
    • eth_requestAccounts
    • eth_sendTransaction
    • eth_signTypedData
    • eth_signTypedData_v4
    • eth_uninstallFilter
    • net_version
    • personal_sign
    • web3_sha3
  • Resources
    • Stargazer Github
    • Stargazer Connector Github
    • Stargazer Demos Github
    • Stargazer Chrome
    • Stargazer Android
    • Stargazer IOS
    • EIP-1193
Powered by GitBook

Main

  • Website
  • Get DAG
  • Explore Projects
  • Partners

Socials

  • Telegram
  • Discord
  • X (Twitter)

Tools

  • Wallet
  • DAG Explorer
  • Coingecko

© 2025 CONSTELLATION NETWORK

On this page

Was this helpful?

Export as PDF
  1. Ethereum RPC API

eth_getTransactionByHash

Previouseth_getTransactionByBlockNumberAndIndexNexteth_getTransactionCount

Last updated 2 months ago

Was this helpful?

Returns information about a transaction by hash.

Parameters

Name
Type
Description

TransactionHash

HexString<Hash>

Hash of the selected transaction.

Return Type

Transaction | null - Transaction object or null if not found.

Transaction

type Transaction = {
  hash: HexString<Hash>; // Hash of the transaction.
  from: Address; // Address of the sender.
  to: Address | null; // Address of the receiver or null for contract creations.
  value: HexString<Number>; // Value sent in WEI.

  blockHash: HexString<Hash> | null; // Block hash of transaction or null if transaction is pending.
  blockNumber: HexString<Number> | null; // Block number of transaction or null if transaction is pending.
  nonce: HexString<Number>; // Number of transactions made by the sender before.

  gas: HexString<Number>; // Gas units provider by the sender.
  gasPrice: HexString<Number>; // Gas price provider by the sender in WEI.
  maxFeePerGas?: HexString<Number>; // Maximum fee in WEI per gas unit. EIP-1559.
  maxPriorityFeePerGas?: HexString<Number>; // Maximum fee in WEI per gas unit above the base fee. EIP-1559.

  input: HexString; // Data sent with the transaction.

  r: HexString; // ECDSA signature r.
  s: HexString; // ECDSA signature s.
  v: HexString; // ECDSA recovery ID.

  transactionIndex: HexString<Number> | null; // Transaction index in block or null if transaction is pending.
  type: HexString<Number>; // Transaction type
};
await provider.request({
  method: "eth_getTransactionByHash",
  params: [
    "0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0",
  ],
});

/* {
  blockHash:
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
  blockNumber: "0x5bad55",
  from: "0xfbb1b73c4f0bda4f67dca266ce6ef42f520fbb98",
  gas: "0x249f0",
  gasPrice: "0x174876e800",
  hash: "0x8784d99762bccd03b2086eabccee0d77f14d05463281e121a62abfebcf0d2d5f",
  input:
    "0x6ea056a900000000000...",
  nonce: "0x5e4724",
  r: "0xd1556332df97e3bd911068651cfad6f975a30381f4ff3a55df7ab3512c78b9ec",
  s: "0x66b51cbb10cd1b2a09aaff137d9f6d4255bf73cb7702b666ebd5af502ffa4410",
  to: "0x4b9c25ca0224aef6a7522cabdbc3b2e125b7ca50",
  transactionIndex: "0x0",
  type: "0x0",
  v: "0x25",
  value: "0x0",
} */

Example

​
​
​