BlockchainBlockData (for Ethereum)
BlockchainBlockData["hash"]
gives information about the block with the specified hash on the Ethereum blockchain.
gives information about block n on the Ethereum blockchain.
gives information about the block n elements from the end of the Ethereum blockchain.
BlockchainBlockData[bspec,prop]
gives the specified property of the block.
Details
- BlockchainBlockData[-1] gives information on the latest Ethereum block.
- Properties include:
-
"BlockHash" hash of this block "BlockNumber" number (height) of this block in the Ethereum blockchain "Status" finality status of this block "Timestamp" time when this block was mined "Size" size of this block in bytes "Nonce" nonce used in the hash for this block "Confirmations" number of confirmations "ConsensusData" information from Ethereum's consensus mechanism "PreviousBlockHash" hash of the previous block "MerkleRoot" Merkle root hash of the transactions "FeeRecipient" address that receives the transaction fees of this block "GasUsed" amount of gas used in this block "GasLimit" maximum gas allowed in this block "BaseFeePerGas" base fee value per unit of gas "BurntFees" amount of fees burnt in this block "TotalTransactions" total number of transactions in this block "TransactionList" list of transaction IDs in this block - "Status" property has the following values:
-
"Unfinalized" block has been recently added to the blockchain "Safe" block received votes from two thirds of the validators "Finalized" block cannot be reverted outside of manual intervention - "ConsensusData" gives an association with the following properties as its keys:
-
"Slot" slot when this block was proposed "Epoch" 32-slot period when this block was proposed "ProposerIndex" index of the validator that proposed this block "SlotRootHash" hash tree root of the slot in the consensus layer "DepositCount" number of successful deposits from validators "Graffiti" arbitrary data used by the validator to tag this block "BlockRandomness" value used for validator selection "RandaoReveal" one of the values used to select the next block proposer - Possible options include:
-
BlockchainBase Automatic sets the blockchain and its network MaxItems All the maximum number of items to return - BlockchainBlockData can access the Ethereum mainnet (default) and testnet (Sepolia). To specify these networks, use the BlockchainBase option.
- The setting for MaxItems specifies the maximum number of transactions to include in the result.
- "BaseFeePerGas" and "BurntFees" information is only available for blocks created after Ethereum's London hard fork upgrade on block 12965000 on mainnet and block 1 on testnet.
- Consensus information is only available after Ethereum's transition to proof-of-stake on block 15537394 on mainnet and block 1450409 on testnet.
Examples
open allclose allBasic Examples (6)
Get information about a block from the Ethereum blockchain using its height:
Get the latest block of the Ethereum testnet blockchain:
Use a block hash to get information about a Ethereum block:
Get multiple Ethereum blocks by providing a list of heights or block hashes:
Scope (17)
Options (3)
Applications (2)
Possible Issues (2)
Text
Wolfram Research (2019), BlockchainBlockData, Wolfram Language function, https://reference.wolfram.com/language/ref/blockchain/BlockchainBlockData-Ethereum.html.
CMS
Wolfram Language. 2019. "BlockchainBlockData." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/blockchain/BlockchainBlockData-Ethereum.html.
APA
Wolfram Language. (2019). BlockchainBlockData. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/blockchain/BlockchainBlockData-Ethereum.html