BlockchainTransactionData(for Ethereum)

$BlockchainBase = "Ethereum"

BlockchainTransactionData[txid]

gives information about the blockchain transaction with ID txid on the Ethereum blockchain.

BlockchainTransactionData[txid,prop]

gives the specified property of the transaction.

Details

  • Properties include:
  • "TransactionID"transaction ID
    "BlockHash"hash of the block containing the transaction
    "BlockNumber"height of the block containing the transaction
    "Confirmations"blocks confirming the block containing the transaction
    "Timestamp"timestamp for the transaction
    "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
    "Amount"total number of ether exchanged in this 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
    "Fee"fee paid for this transaction
    "TransactionCount"number of the transactions sent by the sender address
    "ByteCount"transaction size in bytes
    "InputData"the data sent along with the transaction
    "TransactionDigest"hash of the transaction data used to sign it
    "DigitalSignature"digital signature of the transaction
    "SenderPublicKey"public key of the sender derived from the digital signature
    "EventList"list of events emitted by transaction
    "TokenTransferList"list of token transfers that took place within the transaction
    "InternalTransactionList"list of internal transactions triggered by transaction
  • "StateRoot" property appears only for transactions made before Byzantium hard fork (block 4370000) and "Status" property appears only for transactions after that.
  • 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 be used by the internal call
    "GasUsed"amount of gas used by this transaction
    "Input"internal transaction input data
    "Output"internal transaction output data
  • BlockchainTransactionData can access the Ethereum mainnet (default) and testnet (Sepolia). To specify these networks, use the BlockchainBase option.

Examples

open allclose all

Basic Examples  (4)

Get information about a transaction from the Ethereum blockchain:

Get data from multiple Ethereum transactions by providing a list of transaction IDs:

Get the amount included in a transaction:

Get multiple properties from an Ethereum transaction:

Scope  (24)

Amount  (1)

Get the total amount of wei exchanged in an Ethereum transaction:

BlockHash  (1)

Get the hash of the block containing an Ethereum transaction:

BlockNumber  (1)

Get the height of the block containing an Ethereum transaction:

ByteCount  (1)

Get the size in bytes of an Ethereum transaction:

Confirmations  (1)

Get the confirmations of the block containing an Ethereum transaction:

ContractAddress  (1)

Get the address of the contract created in an Ethereum transaction:

DigitalSignature  (1)

Get the digital signature of an Ethereum transaction:

EventList  (1)

Get the list of events emitted by an Ethereum transaction:

Fee  (1)

Get the fee included in an Ethereum transaction:

GasPrice  (1)

Get the price of gas in an Ethereum transaction:

GasUsed  (1)

Get the amount of gas used in an Ethereum transaction:

InputData  (1)

Get the data sent along with an Ethereum transaction:

InternalTransactionList  (1)

Get the list of internal transactions triggered by an Ethereum transaction:

Receiver  (1)

Get the address of the receiver of an Ethereum transaction:

Sender  (1)

Get the address of the sender of an Ethereum transaction:

SenderPublicKey  (1)

Get the public key of an Ethereum transaction's sender:

StateRoot  (1)

Get the state root data of a pre-Byzantium Ethereum transaction:

Status  (1)

Get the status of an Ethereum transaction:

Timestamp  (1)

Get the timestamp of an Ethereum transaction:

TokenTransferList  (1)

Get the list of token transfers that took place within an Ethereum transaction:

TransactionCount  (1)

Get the number of transactions sent by an Ethereum transaction's sender address:

TransactionDigest  (1)

Get the digest of an Ethereum transaction's sender address:

TransactionID  (1)

Get the transaction ID that matches the provided one:

TransactionIndex  (1)

Get the index of an Ethereum transaction within a block:

Options  (2)

BlockchainBase  (2)

Mainnet  (1)

Get information from a Ethereum mainnet transaction:

Testnet  (1)

Get information from a Ethereum testnet transaction:

Applications  (1)

Get information on the most recent Ethereum block:

Randomly select a transaction from this block:

Get detailed information for this transaction:

Convert the transaction amount to fiat currency using the current price:

Properties & Relations  (2)

Encoding the public key provided by "SenderPublicKey" returns the sender address:

Verify the authenticity of the signature by using the transaction digest and public key:

Possible Issues  (2)

Nonexistent Hashes  (1)

Using a transaction ID from one blockchain in another blockchain will return a Missing output:

Incorrect Hashes  (1)

Providing a transaction ID that is not a hex number will return a $Failed output:

Wolfram Research (2019), BlockchainTransactionData, Wolfram Language function, https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionData-Ethereum.html.

Text

Wolfram Research (2019), BlockchainTransactionData, Wolfram Language function, https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionData-Ethereum.html.

CMS

Wolfram Language. 2019. "BlockchainTransactionData." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionData-Ethereum.html.

APA

Wolfram Language. (2019). BlockchainTransactionData. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionData-Ethereum.html

BibTeX

@misc{reference.wolfram_2024_blockchaintransactiondata, author="Wolfram Research", title="{BlockchainTransactionData}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionData-Ethereum.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_blockchaintransactiondata, organization={Wolfram Research}, title={BlockchainTransactionData}, year={2019}, url={https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionData-Ethereum.html}, note=[Accessed: 22-November-2024 ]}