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
  • HEADERS
  • RESPONSE
  1. API

getTransactionByHash

Returns information about a transaction for a given hash.

HEADERS

Content-Type: application/json

REQUEST PARAMS

  • TRANSACTION HASH [required] - a string representing the hash (32 bytes) of a transaction

EXAMPLE

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

## JSON-RPC over WSS
wscat -c ws://mainnet-slice-rpc.com
>{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"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": "0x398137383b3d25c92898c656696e41950e47316b",
    "gas": "0x1d45e",
    "gasPrice": "0xfa56ea00",
    "hash": "0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0",
    "input": "0xf7d8c88300000000000000000000000000000000000000000000000000000000000cee6100000000000000000000000000000000000000000000000000000000000ac3e1",
    "nonce": "0x18",
    "r": "0x2a378831cf81d99a3f06a18ae1b6ca366817ab4d88a70053c41d7a8f0368e031",
    "s": "0x450d831a05b6e418724436c05c155e0a1b7b921015d0fbc2f667aed709ac4fb5",
    "to": "0x06012c8cf97bead5deae237070f9587f8e7a266d",
    "transactionIndex": "0x11",
    "v": "0x25",
    "value": "0x1c6bf526340000"
  }
}

BODY

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "blockHash": "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "blockNumber": "0x5bad55",
    "from": "0x398137383b3d25c92898c656696e41950e47316b",
    "gas": "0x1d45e",
    "gasPrice": "0xfa56ea00",
    "hash": "0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0",
    "input": "0xf7d8c88300000000000000000000000000000000000000000000000000000000000cee6100000000000000000000000000000000000000000000000000000000000ac3e1",
    "nonce": "0x18",
    "r": "0x2a378831cf81d99a3f06a18ae1b6ca366817ab4d88a70053c41d7a8f0368e031",
    "s": "0x450d831a05b6e418724436c05c155e0a1b7b921015d0fbc2f667aed709ac4fb5",
    "to": "0x06012c8cf97bead5deae237070f9587f8e7a266d",
    "transactionIndex": "0x11",
    "v": "0x25",
    "value": "0x1c6bf526340000"
  }
}
PreviousgetTransactionByBlockNumberAndIndexNextgetTransactionCount

Last updated 2 years ago