HomeFAQsWhy does "unverified" appear next to my smart contract?

Why does "unverified" appear next to my smart contract?

By default, any smart contracts instantiated in a Kaleido environment (regardless of protocol and consensus configurations) will initially display as “unverified” when viewed in the Block Explorer. This is a byproduct of the on-chain representation of an Ethereum smart contract as indecipherable machine/byte code. To remove the “unverified” label, the human readable source code matching the compiled byte code must be uploaded into the Explorer’s smart contract console.

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 only be updated to reflect a more intuitive representation of its purpose once the corresponding source code has been verified. The following steps outline the necessary procedures for successfully completing source code verification against an “unverified” smart contract:

  • From within the Block Explorer, click either the Smart Contracts tab or the New contract created hyperlink in the Transactions column
  • If you are on the Smart Contracts page, identify the smart contract you wish to verify and click its address
  • Make sure you are on the Contract Source screen and click the Upload source code to verify hyperlink
  • Enter the human readable solidity source into the Contract Code field
  • In the Contract Name field enter the name of the contract that was passed to the compiler.  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 contract
  • Click Validate Code to initiate the verification

Once verified, you will be able to see the plaintext source that correlates to the deployed byte code.  For example: