Knowledge Base Home

Block Explorer

The Kaleido block explorer is an environment-specific console that provides realtime and historical snapshots of the blockchain. It can be leveraged for both high-level analytics (e.g. chain height, commonly called contracts, transaction rate, etc.) and more granular insights (e.g. block contents, transaction hashes, sending accounts, etc.). The explorer also exposes a source code verification module that allows for the indecipherable byte code of a deployed smart contract to be verified by a counter party. This verification feature extends powerful assurances to callers of a contract, as they are able to unequivocally confirm the contract’s logic prior to the issuance of any transactions or queries.

 

Use the search bar to jump directly to a specific subset of the ledger. The search bar accepts three valid inputs:

  • Block Number – The number of the desired block for inspection. For example, enter 0 to see the contents of the chain’s genesis block. Bear in mind that the Kaleido consensus mechanisms may cut blocks regardless of transaction presence (PoA and IBFT output multiple blocks in a minute). As a result, if you are operating in an environment with low transaction throughput and running PoA or IBFT consensus, a large allotment of blocks will be devoid of transactions.
  • Contract address – callable address of an Ethereum smart contract deployed within the environment.
  • Transaction hash – The ID of a specific transaction. A transaction implies that byte code has been executed by the EVM. These include deployments of smart contracts and subsequent invocations.

Blocks

By default, the explorer home screen displays the 25 most recent blocks on the chain. As mentioned above, blocks are minted in accordance with the consensus protocol’s system configuration and do not necessarily contain transactions. Click the block number to see the contents of a specific block. Each block will contain:

  • Block number – height on the chain
  • Time – ISO timestamp when the block was minted
  • Hash – a hash of the block
  • Parent Hash – a hash of the preceding block on the chain
  • SHA-3 Uncles – SHA-3 hash of the uncle’s block
  • Mined by – the Ethereum account credited with minting the block
  • Gas Used – compute expended to mine the block
  • Transactions – if applicable, the block’s transaction hash(es) are listed in order of execution at the bottom of the page

Transactions

Transactions are listed chronologically with the most recent transaction at the top of the list. The transaction table exposes truncated values for transaction hash and the sending account. Additionally, if the transaction is a smart contract deployment, it is denoted with a New Contract Created tag. Each transaction will contain:

  • Hash – a hash of the transaction serving as the transaction’s ID
  • Block – the block containing the transaction
  • Time – ISO timestamp when the transaction was executed by the EVM
  • From – the Ethereum account sending the transaction
  • To – the Ethereum account or smart contract the transaction targeted
  • Gas Provided – the allocated compute to execute the transaction
  • Input Data – the function hash and 32 byte argument passed to the contract.

Smart Contracts

The Smart Contracts tab exposes the currently instantiated smart contracts within the environment. Each contract is identified by its address (the targetable hex string) and an auto-generated name.  The auto-generated name will appear with the following syntax – unverified-contract-deploymentOrder. For example, the first smart contract that you instantiate in an environment will display as unverified-contract-00001. The contract name can be updated to reflect a more intuitive representation of its purpose once its corresponding source code has been verified. Refer to the Contract Source section below for details on source code verification.

Drill into the contract by clicking on the address hyperlink. The contract-specific screen offers two options – Transactions and Source Code.

  1. Transactions:  The transactions tab will list any transactions that updated/altered the contract’s state. The table identifies each transaction’s: hash, block, sending account and calling address (i.e. the contract).
  2. Contract Source:  The contract source tab can be used verify the compiled contract source against the deployed byte code on the blockchain. To verify the source code, input the name of the contract passed to the solidity compiler in the Name field. This name is:
  • preceded by a colon
  • case sensitive
  • passed without the .sol suffix

For example, if simplestorage.sol was passed to the compiler, you would input :simplestorage. Select the appropriate compiler version for the solidity code and paste the contract source into the Contract Code box. Then click compile to verify the contract. Once verified, you will be able to see the plaintext source that correlates to the deployed byte code.  For example:

The explorer makes use of the /ledger API. The /ledger endpoint exposes several sub-routes (e.g. /transactions, /blocks and /contracts for refined queries against on-chain data. Note that these APIs do not return state information associated with deployed smart contracts. Instead, you should use an Ethereum-compatible client library (e.g. Web3.js) or the Kaleido Eth-Connect Bridge to properly interface with smart contract addresses.

    • Refer to the API Reference documentation for the full /ledger specification.
    • Refer to the Understanding the Kaleido API topic for sample calls and additional clarification.  For example, to retrieve the most recent block on the chain:

curl -X GET -H "$HDR_AUTH" -H "$HDR_CT" "$APIURL/ledger/{consortia_id}/{environment_id}/blocks/latest" | jq

Prev Ether Pool Next HD Wallet