CLV Documentations
Portal
Portal
  • Welcome to Clover
  • Useful Links
  • CLV Token
  • Quick Start
    • Clover Networks
    • Sakura Networks
    • Using Local Node
    • Using Testnet
      • Create an account
      • Faucet
      • Run a Testnet Node
      • Connect to Testnet
  • Development Guide
    • Introduction
      • Prerequisites
      • Setup environment
    • Using MetaMask
    • Using Remix
    • Using Web3.js
      • Query Balance
      • Send Transaction
    • Counter Tutorial
      • Setup dapp project
      • Setup truffle
      • The Counter Contract
      • Deploy Contract
      • Counter Webapp
  • Clover Wallets & Dapps
    • Clover Extension Wallet
      • Getting Started
      • Switch Networks
      • Add Tokens
      • Send Tokens
      • Cross-Chain Transfer
      • View Seed Phrase
      • Import Account
      • dApp Integration
      • Substrate dApp Integration
      • Solana-dApp-Integration
      • dApp Interaction Protocol
      • Wallet Integration QA
    • Clover Mobile Wallet
    • Clover Web Wallet
      • dApp Integration
    • Clover Assets Explorer
    • Clover Cross-Chain Explorer
  • Maintain
    • Running a validator on Clover Network
    • Running a RPC node
    • Staking on Clover
      • Staking via Apps
      • Staking via Clover Wallet
  • Technical Documentation
    • Web3 compatibility
      • eth_protocolVersion
      • eth_syncing
      • eth_hashrate
      • eth_coinbase
      • eth_mining
      • eth_chainId
      • eth_gasPrice
      • eth_accounts
      • eth_blockNumber
      • eth_getBalance
      • eth_getStorageAt
      • eth_getBlock
      • eth_getTransactionCount
      • eth_getBlockTransactionCount
      • eth_getBlockUncleCount
      • eth_getCode
      • eth_sendTransaction
      • eth_sendSignedTransaction
      • eth_call
      • eth_estimateGas
      • eth_getTransaction
      • eth_getTransactionByBlockHashAndIndex
      • eth_getTransactionByBlockNumberAndIndex
      • eth_getTransactionReceipt
      • eth_getUncle
      • eth_getLogs
      • eth_getWork
      • eth_submitWork
      • eth_submitHashrate
      • eth_subscribe
      • eth_unsubscribe
      • net_version
      • net_peerCount
      • net_listening
      • web3_clientVersion
      • web3_sha3
    • Clover Test Cases
    • Clover EVM
    • Clover Accounts Binding
    • Query Balance
    • Transaction Finality
  • Clover Eco Incentive Program
    • Introduction
    • Clover Developer Incentive Program
    • Virtual Ethereum address binding
    • Clover User Incentive Program
  • Parachain Auction
    • About Polkadot Parachain Auction
Powered by GitBook
On this page
  1. Technical Documentation
  2. Web3 compatibility

eth_getTransactionByBlockHashAndIndex

Returns a transaction based on a block hash and the transaction’s index position.

web3.eth.getTransactionByBlockHashAndIndex(BlockHash, indexNumber [, callback])

Parameters

  1. A block hash .

  2. The transaction’s index position.

  3. Optional callback, returns an error object as first parameter and the result as second.

Returns

A transaction object its hash transactionHash:

  • hash : Hash of the transaction.

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

  • blockHash: Hash of the block where this transaction was in. null if pending.

  • blockNumber: Block number where this transaction was in. null if pending.

  • transactionIndex: Integer of the transactions index position in the block. null if pending.

  • from: Address of the sender.

  • to: Address of the receiver. null if it’s a contract creation transaction.

  • value: Value transferred in wei.

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

  • gas: Gas provided by the sender.

  • input : The data sent along with the transaction.

Example

web3.eth.getTransactionByBlockHashAndIndex("0xfb8d7ee8fb5f4fbebf41a55caa5e988a480a0ce277813cd1ec4443c54f601ddd",0).then(console.log)
> {
    "blockHash":"0xfb8d7ee8fb5f4fbebf41a55caa5e988a480a0ce277813cd1ec4443c54f601ddd",
    "blockNumber":"0x8",
    "chainId":"0x539",
    "creates":null,
    "from":"0xe6206c7f064c7d77c6d8e3ed8601c9aa435419ce",
    "gas":"0x5208",
    "gasPrice":"0x3b9aca00",
    "hash":"0x7893da51d25cad2c10ab946e5b770a21a99b9c9ccff8f595f8222dd9f2e2013b",
    "input":"0x",
    "nonce":"0x0",
    "publicKey":"0x8c9a51a90433508cec6ce29b993284a0e8d0835b38d3ced62216800db588a6d55fa2c114fab798977763ffe94a03b1a591c48d972d4daa6ba7810c80528644f4",
    "r":"0x8f59b2e2a2a07e82067fea3903402a30e7a78176e50827678075271decd19179",
    "raw":"0xf86e80843b9aca00825208942193517101eb10ef22f2fa67ef452f66c51839d3896c6b935b8bbd40000080820a96a08f59b2e2a2a07e82067fea3903402a30e7a78176e50827678075271decd19179a01d0c193a99e5ecce21a40ff18e20e0bf4e1751e5308b3e09acc42d0a53b4b3d7",
    "s":"0x1d0c193a99e5ecce21a40ff18e20e0bf4e1751e5308b3e09acc42d0a53b4b3d7",
    "standardV":"0x1","to":"0x2193517101eb10ef22f2fa67ef452f66c51839d3",
    "transactionIndex":"0x0",
    "v":"0xa96",
    "value":"0x6c6b935b8bbd400000"
    }
Previouseth_getTransactionNexteth_getTransactionByBlockNumberAndIndex

Last updated 4 years ago