CLV Documentations
CLV DOC
CLV DOC
  • Intro to CLV
    • About CLV 🍀
    • Clover Finance Rebrands to CLV
    • What is CLV Chain?
    • What is CLV Wallet?
    • What is $CLV Token?
    • 📣 CLV Official Channels
    • 🏘 CLV Community Channels
  • Use CLV Chain
    • 📚 Beginner’s Guide
      • Setup CLV Wallet
      • Setup Metamask Wallet
      • How to Get $CLV
      • Bridge Other Assets to CLV P-Chain (Parachain)
    • 🌐 Network Details
    • 🏦 Economics
      • Tokenomics
      • Inflation Design
    • 🗳️Governance
    • 🙋🏻 CLV Chain FAQ
    • CLV P-Chain EVM Explorer
    • $CLV Cross-Chain Explorer
    • $CLV Cross-Chain Transfer
  • CLV Validator & Staking
    • What are Nominator & Validator?
    • Stake as a Nominator
    • Running a Validator or RPC Node
    • Staking FAQ
  • Use CLV Wallet
    • 💰 Download CLV Wallet
      • Browser Extension (Google Chrome & Brave)
      • Apple iOS (Mobile)
      • Android (Mobile)
      • Web Wallet (Universal)
    • 📱 CLV Mobile Wallet
    • 🖥 CLV Extension Wallet
    • 🕸️ CLV Web Wallet
  • CLV Chain Developer Guide
    • Getting Started
    • Using Local Node
      • Using MetaMask
      • Using Remix
      • Using Web3.js
    • Using Testnet
      • Create an account
      • Faucet
      • Run a Testnet Node
      • Connect to Testnet
    • dApp Example
      • Setup dApp project
      • Setup truffle
      • The Counter Contract
      • Deploy Contract
      • Counter Webapp
    • Test Cases
    • Technical Documentations
      • CLV EVM
      • Developers Incentive
      • CLV Accounts Binding
      • Virtual Ethereum Address Binding
      • Query Balance
      • Transaction Finality
      • 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
      • CLV P-Chain Integration
  • CLV Wallet Developer Guide
    • EVM dApp Integration
    • Substrate dApp Integration
    • Solana dApp Integration
    • Kadena dApp Integration
    • Aptos dApp Integration
    • Web Wallet dApp Integration
    • dApp Interaction Protocol
    • Wallet Integration QA
  • CLV Ecosystem
    • 🏞️ Ecosystem Partners
      • CLV Chain
      • CLV Wallet
    • 🌱 Incentive Programs
      • CLV Ecosystem Grant
      • CLV Wallet Integration Grant
      • CLV Bug Bounty Program
    • Whitelist Assets on Clover P-Chain
    • Bridge assets into CLV P-Chain
  • Assets
    • 🔤 Glossary
      • Blockchain (in General)
      • Polkadot
      • Wallet
    • 🎟️ CLV - Polkadot Parachain Auction 2021
      • Parachain Auction Rule Announcement
      • Parachain Winning Reward Announcement
    • 🛍️ Brand Pack
    • 📄 Whitepaper
Powered by GitBook
On this page
  1. CLV Chain Developer Guide
  2. Technical Documentations
  3. Web3 Compatibility

eth_getTransactionByBlockNumberAndIndex

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

web3.eth.getTransactionByBlockNumberAndIndex(BlockNumber, indexNumber [, callback])

Parameters

  1. A block number .

  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.getTransactionByBlockNumberAndIndex("0x8",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_getTransactionByBlockHashAndIndexNexteth_getTransactionReceipt

Last updated 3 years ago