Chainlens
  • Getting started
    • 🔗Overview
    • ✨Chainlens versions
  • Features
    • 🔎Navigation
    • 💠NFTs
    • ⚙️REST API
    • 📱Mobile Experience
    • 🔦Source Code Verification
    • ⚡Chain Syncing
  • Help & FAQs
    • ⛰️Roadmap
    • 📖Release Notes
    • ❔FAQs
Powered by GitBook
On this page
  • Video Walkthrough
  • Prerequisites
  • Getting the Contract Metadata
  • Source Code Verification
  • Contract Interaction
  1. Features

Source Code Verification

Chainlens block explorer provides a source code verification feature that allows deployed contracts on blockchain networks to be verified and interacted with via the Chainlens user interface.

PreviousMobile ExperienceNextChain Syncing

Last updated 1 year ago

Video Walkthrough

The below video demonstrates how to upload smart contract source code and interact with the smart contracts from within Chainlens.

Prerequisites

  1. You should have a smart contract written in Solidity, compiled, and deployed to your preferred EVM-compatible network. You should be able to locate the contract in Chainlens using the contract's address.

Getting the Contract Metadata

  1. The contracts metadata can be found in the artifacts/build-info/ directory as a .json file for hardhat projects.

  2. Truffle adds the contract's compiled files in the build/contracts/ folder.

Source Code Verification

On the view of the contract in Chainlens click on the sources tab.

From the sources tab, upload the contract's solidity source code and the generated metadata.

The source code verification status will be changed, and the contract's source codes and ABI will be visible after successful verification.

Contract Interaction

You can now interact directly with the contract in Chainlens via the read and write tabs in the UI.

You have the compiled source code and metadata.

Using solc --metadata command as explained in the .

🔦
Read more about contract metadata.
solidity documentation
Overview of source code verification in Chainlens