Docs - SliceLedger
  • What is Slice Ledger?
  • SliceLedger Key Features
  • SliceLedger Wallet
    • SliceLedger Crypto Wallet
      • Slice Web Extension
    • SliceLedger Explorer
    • SliceLedger DEX
    • SliceLedger NFT Market
  • Sliceledger Chain Network
    • Sliceledger Chain Mainnet
    • Sliceledger Chain Testnet
    • CLI Commands
    • Audit
    • Slice Faucet
  • Integrating Metamask
    • Add SliceLedger Chain Network to Metamask
    • Config Custom Token
    • How to Reset Metamask Wallet
  • Slice Ledger Protocols
    • SLICE Game
    • SLICE Reward
    • SLICE Privacy
  • SliceLedger Exclusive Products
    • Bharat NFT Marketplace
    • Bharat Token
    • Slice Crypto Wallet
    • Slice Wallet Extension
    • Bouquet NFT Collection
  • Enterprise Blockchain
    • Diamond Industry
  • SLICE Token
    • Technical
    • Utility
    • Coin Distribution
  • Developer Guide
    • Token Standards
      • SLICE-20 Tokens
      • SLICE-721 Tokens
    • Verify Smart Contract
  • Masternode
    • Masternode Requirements
    • Masternode Setup Guide
    • Run a Full SliceLedger Node
    • Apply For SliceLedger Masternode
    • Resign as Masternode
  • API
    • accounts
    • blockNumber
    • call
    • chainId
    • estimateGas
    • gasPrice
    • getBalance
    • getBlockByHash
    • getBlockByNumber
    • getBlockTransactionCountByHash
    • getBlockTransactionCountByNumber
    • getCode
    • getLogs
    • getStorageAt
    • getTransactionByBlockHashAndIndex
    • getTransactionByBlockNumberAndIndex
    • getTransactionByHash
    • getTransactionCount
    • getTransactionReceipt
    • getUncleByBlockHashAndIndex
    • getUncleByBlockNumberAndIndex
    • getUncleCountByBlockHash
    • getUncleCountByBlockNumber
    • getWork
    • hashrate
    • mining
    • protocolVersion
    • sendRawTransaction
    • submitWork
    • syncing
    • net_listening
    • net_peerCount
    • net_version
    • web3_clientVersion
    • parity_nextNonce
    • Filter methods
    • newFilter
    • newBlockFilter
    • getFilterChanges
    • uninstallFilter
  • Deploying on SliceLedger Chain
    • Using Remix
    • Using Truffle
    • Using Hardhat
Powered by GitBook
On this page
  • REQUEST
  • HEADER
  • RESPONSE
  1. API

getTransactionByBlockNumberAndIndex

Returns information about a transaction by block number and transaction index position.

PreviousgetTransactionByBlockHashAndIndexNextgetTransactionByHash

Last updated 2 years ago

REQUEST

POST https://mainnet-slice-rpc.com

HEADER

Content-Type: application/json

REQUEST PARAMS

  • BLOCK PARAMETER [required] - an integer block number, or the string "latest", "earliest" or "pending", see the

  • TRANSACTION INDEX POSITION [required] - a hex of the integer representing the position in the block

EXAAMPLE

## JSON-RPC over HTTPS POST
curl https://mainnet-slice-rpc.com \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params": ["0x5BAD55","0x0"],"id":1}'

## JSON-RPC over WSS
wscat -c ws://mainnet-slice-rpc.com
>{"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params": ["0x5BAD55","0x0"],"id":1}

RESPONSE

RESULT FIELDS

  • TRANSACTION - A transaction object, or null when no transaction was found

    • hash: 32 Bytes - hash of the transaction.

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

    • blockHash: 32 Bytes - hash of the block where this transaction was in. null when its pending.

    • blockNumber: block number where this transaction was in. null when its pending.

    • transactionIndex: integer of the transactions index position in the block. null when its pending.

    • from: 20 Bytes - address of the sender.

    • to: 20 Bytes - address of the receiver. null when its 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 send along with the transaction.

BODY

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "blockHash": "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "blockNumber": "0x5bad55",
    "from": "0xfbb1b73c4f0bda4f67dca266ce6ef42f520fbb98",
    "gas": "0x249f0",
    "gasPrice": "0x174876e800",
    "hash": "0x8784d99762bccd03b2086eabccee0d77f14d05463281e121a62abfebcf0d2d5f",
    "input": "0x6ea056a9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bd8d7fa6f8cc00",
    "nonce": "0x5e4724",
    "r": "0xd1556332df97e3bd911068651cfad6f975a30381f4ff3a55df7ab3512c78b9ec",
    "s": "0x66b51cbb10cd1b2a09aaff137d9f6d4255bf73cb7702b666ebd5af502ffa4410",
    "to": "0x4b9c25ca0224aef6a7522cabdbc3b2e125b7ca50",
    "transactionIndex": "0x0",
    "v": "0x25",
    "value": "0x0"
  }
}
default block parameter