getTransactionByHash view

Column Type Required

transactionHash

String

Yes

blockHash

String

No

chainId

String

No

to

String

No

blockNumber

String

No

hash

String

No

value

String

No

from

String

No

transactionIndex

String

No

r

String

No

gas

String

No

input

String

No

gasPrice

String

No

nonce

String

No

v

String

No

s

String

No

type

String

No

Examples

SELECT * FROM getTransactionByHash WHERE transactionHash = '0x311be6a9b58748717ac0f70eb801d29973661aaf1365960d159e4ec4f4aa2d7f'

Microsoft Excel

This example shows you how to bind a worksheet cell value (a transaction hash returned by querying getBlockByHash) to a SQL query (SELECT * FROM getTransactionByHash WHERE transactionHash = ?)

  1. In the Excel Data tab, choose Get Data > From Other Source > Blank Query (or New Query > From Other Source > Blank Query for older versions of Excel).

  2. In the Power Query Editor formula bar, enter:

    = Odbc.Query("dsn=Ethereum", "SELECT transactions FROM getBlockByHash WHERE hash = '0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35' AND transactionDetailsFlag = false")

    replace Ethereum with the name of your Easysoft ODBC-Ethereum Driver data source.

  3. Press the tick button.

  4. In the Query Settings > Properties > Name field, enter:

    getBlockByHash
  5. Select the transactions column.

  6. Choose Transform > Parse > JSON.

  7. Right-click List and choose Drill Down.

  8. Choose Close and Load.

  9. Select all the transaction hashes in the worksheet, and then, in the named reference box, above cell A1, enter getBlockByHash.

  10. Copy a transaction hash value, it doesn’t matter which one.

  11. In the Excel Data tab, choose Get Data > From Other Source > Blank Query (or New Query > From Other Source > Blank Query for older versions of Excel).

  12. Choose Home > Manage Parameters > New Parameter.

  13. Name the parameter transactionHash. Set the Type to Text.

  14. In the Current Value box, paste the transaction hash you copied in step 10. Choose OK.

  15. Choose Close and Load.

  16. In a new worksheet, in the Data tab, choose Get Data > From Other Source > Blank Query (or New Query > From Other Source > Blank Query for older versions of Excel)

  17. In the Power Query Editor formula bar, enter:

    = Odbc.Query("dsn=Ethereum", "SELECT * FROM getTransactionByHash WHERE transactionHash = '" & transactionHash & "'")

    Replace Ethereum with the name of your Easysoft ODBC-Ethereum Driver data source.

  18. Press the tick button.

  19. On the transactionHash page, choose Home > Advanced Editor.

  20. In the Advanced Editor, enter:

    let
        Source = Excel.CurrentWorkbook(){[Name="getBlockByHash"]}[Content],
        CellValue = Source{1}[getBlockByHash]
    in
        CellValue

    In this example, the parameter value for the query in step 17 is the first value in the getBlockByHash named range. To use a different cell, alter the number in Source{1}[getBlockByHash]. For example to use the value in the second cell:

        CellValue = Source{2}[getBlockByHash]
  21. Choose Close and Load.