block explorers are your portal to ethereum's data. you can use them to see real-time data on blocks, transactions, miners, accounts, and other on-chain activity.
You should understand the basic concepts of Ethereum so you can make sense of the data that a block explorer gives you. Start with an intro to Ethereum.
hg0088线上ethereum is transparent by design so everything is verifiable. block explorers provide an interface for getting this information. and this is for both the main ethereum network and the testnets, should you need that data.
hg0088线上here's a summary of the types of data you can get from a block explorer.
new blocks are added to ethereum every ~12 seconds (this can fluctuate) so there's a near-constant stream of data that gets added to block explorers. blocks contain a lot of important data that you may find useful:
Block height – The block number and length of the blockchain (in blocks) on creation of the current block
Timestamp – The time at which a miner mined the block
Transactions – The number of transactions included within the block
Miner – The address of the miner who mined the block
Reward – The amount of ETH awarded to the miner for adding the block (standard 2ETH reward + any transaction fees of transactions included in the block)
Difficulty – The difficulty associated with mining the block
Size – The size of the data within the block (measured in bytes)
Gas used – The total units of gas used by the transactions in the block
Gas limit – The total gas limits set by the transactions in the block
Extra data – Any extra data the miner has included in the block
Hash – The cryptographic hash that represents the block header (the unique identifier of the block)
Parent hash – The hash of the block that came before the current block
Sha3Uncles – ???
StateRoot – ????
Nonce – A value used to demonstrate proof-of-work for a block by the miner
uncle blocks are created when two miners create blocks at near-enough the same time – only one block can be validated across the nodes. they are not included but still receive a reward for the work.
block explorers provide information about uncle blocks like:
An uncle block number
A time they occurred
The block height at which they were created
Who mined it
The ETH reward
hg0088线上not only will block explorers give you data about gas usage in transactions and blocks, but some will give you information on the network's current gas prices. this will help you understand network usage, submit safe transactions and not overspend on gas. look out for apis that can help you get this information into your product's interface. gas-specific data covers:
Estimated units of gas needed for a safe but slow transaction (+ estimated price and duration)
Estimated units of gas needed for an average transaction (+ estimated price and duration)
Estimated units of gas needed for a fast transaction (+ estimated price and duration)
Average confirmation time based on gas price
Contracts that are consuming gas – in other words, popular products that are seeing lots of usage on the network
Accounts that are spending gas – in other words, frequent network users
block explorers have become a common place for people to track the progress of their transactions. that's because the level of detail you can get provides extra certainty. transaction data includes:
Transaction hash – A hash generated when the transaction is submitted
Status – An indication of whether the transaction is pending, failed or a success
Block – The block in which the transaction has been included
Timestamp – The time at which a miner mined the transaction
From – The address of the account that submitted the transaction
To – The address of the recipient or smart contract that the transaction interacts with
Tokens transferred – A list of tokens that were transferred as part of the transaction
Value – The total ETH value being transferred
Transaction fee – The amount paid to the miner to process the transaction (calculated by gas price*gas used)
Gas limit – The maximum numbers of gas units this transaction can consume
Gas used – The actual amount of gas units the transaction consumed
Gas price – The price set per gas unit
Nonce – The transaction number for the from address (bear in mind this starts at 0 so a nonce of 100 would actually be the 101st transaction submitted by this account
Input data – Any extra information required by the transaction
there's a lot of data that you can access about an account. this is why it's often recommended to use multiple accounts so that your assets and value can't be easily tracked. there are also some solutions being developed to make transactions and account activity more private. but here's the data that's available for accounts:
Account address – The public address you can use to send funds to
ETH balance – The amount of ETH associated with that account
Total ETH value – The value of the ETH
Tokens – The tokens associated with the account and their value
Transaction history – A list of all the transactions where this account was either the sender or the recipient
smart contract accounts have all the data that a user account will have, but some block explorers will even display some code information too. examples include:
Contract creator – The address that deployed the contract to mainnet
Creation transaction – The transaction that included the deployment to mainnet
Source code – The solidity or vyper code of the smart contract
Contract ABI – The Application Binary Interface of the contract – the calls the contract makes and the data received
Contract creation code – The compiled bytecode of the smart contract – created when you compile a smart contract written in Solidity or Vyper, etc.
Contract events – A history of the methods called in the smart contract. Basically a way to see how the contract is being used and how often
token are a type of contract so they'll have similar data to a smart contract. but because they have value and can be traded they have additional data points:
Type – Whether they're an ERC-20, ERC-721 or another token standard
Price – If they're an ERC-20 they'll have a current market value
Marketcap – If they're an ERC-20 they'll have a market cap (calculated by price*total supply)
Total supply – The number of tokens in circulation
Holders – The number of addresses that hold the token
Transfers – The number of times the token has been transferred between accounts
Transaction history – A history of all the transactions including the token
Contract address – The address of the token that was deployed to mainnet
Decimals – ERC-20 tokens are divisible and have decimal places
of course there's some data that speaks to the health of the network. these are quite specific to ethereum's proof-of-work consensus mechanism. when ethereum transitions to eth2 some of this data will be redundant
Difficulty – The current mining difficulty
Hash rate – An estimate of how many hashes are being generated by Ethereum miners trying to solve the current Ethereum block or any given block.
Total transactions – The number of transactions since Ethereum was created
Transactions per second – The number of transactions processable withing a second
ETH price – The current valuations of 1 ETH
Total ETH supply – Number of ETH in circulation – remember new ETH is created with the creation of every block in the form of block rewards
Marketcap – Calculation of price*supply
eth2 is still in development but it's worth talking about some of the data points that explorers will be able to provide you. in fact, all of this data is available right now for the testnets.