BlockchainTransactionData

BlockchainTransactionData[txid]

gives information about the blockchain transaction with ID txid on the blockchain specified by $BlockchainBase.

BlockchainTransactionData[txid,prop]

gives the specified property of the transaction.

Details and Options

  • BlockchainTransactionData has the option BlockchainBase, with default setting $BlockchainBase.
  • Available properties for "Bitcoin" and "Ethereum" include:
  • "TransactionID"transaction ID
    "BlockHash"hash of the block containing the transaction
    "BlockNumber"height of the block containing the transaction
    "Confirmations"blocks confirming this block
    "Time"time stamp for the transaction
    "Amount"amount of the currency transferred in the transaction
    "Fee"fee paid for this transaction
    "ByteCount"transaction size in bytes
  • Additional properties for "Ethereum" include:
  • "Status"indicates whether the transaction executed successfully
    "StateRoot"32 bytes of post-transaction state root (pre-Byzantium)
    "TransactionIndex"index of the transaction within the block
    "Sender"sender address of the transaction
    "Receiver"receiver address of the transaction
    "ContractAddress"address of the contract created in the transaction
    "GasUsed"amount of gas used by this transaction
    "GasPrice"price of gas in this transaction in wei
    "TransactionCount"number of the transactions sent by the sender address
    "InputData"the data sent along with the transaction
  • "StateRoot" property appears only for transactions made before Byzantium hard fork (block 4370000) and "Status" property appears only for transactions after that.
  • Additional properties for Ethereum transactions when an event has been emitted include:
  • "EventList"list of events emitted by transaction
  • Additional properties for Ethereum transactions when a token has been transferred include:
  • "TokenTransferList"list of token transfers that took place within the transaction
  • Additional properties for Ethereum transactions when the receiver contract triggered additional transactions include:
  • "InternalTransactionList"list of internal transactions triggered by transaction
  • The value "EventList" is a list of associations with the following elements:
  • "Address"address of the contract that triggered the event
    "Topics"event's parameters indexed in the transaction receipt log
    "Data"event's parameters encoded in the transaction receipt log
  • The value "TokenTransferList" is a list of associations with the following elements:
  • "Name"name of the token (e.g. "Tronix")
    "Symbol"symbol for the token (e.g. "CK")
    "Sender"sender address of the token
    "Receiver"receiver address of the token
    "Amount"amount of tokens sent (only for "ERC20")
    "TokenID"ID of token sent (only for "ERC721")
  • The value "InternalTransactionList" is a list of associations with the following elements:
  • "CallType"internal transaction type of execution
    "Sender"sender address of the internal transaction
    "Receiver"receiver address of the internal transaction
    "Amount"amount of the currency transferred internally
    "GasLimit"maximum amount of gas allowed to use by the internal call
    "GasUsed"amount of gas used by this transaction
    "Input"internal transaction input data
    "Output"internal transaction output data
  • Additional properties for "Bitcoin" include:
  • "LockTime"earliest time or block when the transaction may be added
    "Version"transaction version number
    "Inputs"transaction input data
    "Outputs"transaction output data
  • The value of "Inputs" is a list of associations with typical elements including:
  • "TransactionID"hash of a previous transaction
    "Addresses"public hashes for source addresses
    "SequenceNumber"sequence number of this transaction
    "Index"index within the previous transaction output
    "ScriptByteArray"script for the transaction as a byte array
    "ScriptString"script as a string
    "SourceConfirmations"number of confirmations of the transaction generating this input
  • The value of "Outputs" is a list of associations with elements including:
  • "Amount"transferred amount
    "ScriptByteArray"script for the transaction as a byte array
    "Addresses"public hashes for destination addresses
    "ScriptString"script as a string
    "DestinationTransaction"hash of the transaction that spent this output

Examples

open all close all

Basic Examples  (2)

Get information about a transaction from the "Bitcoin" blockchain:

In[1]:=
Click for copyable input
Out[1]=

Get information about a transaction from the "Ethereum" blockchain:

In[1]:=
Click for copyable input
Out[1]=

Applications  (1)

Neat Examples  (1)

Introduced in 2018
(11.3)
|
Updated in 2019
(12.0)