🔦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.
Last updated
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.
Last updated
The below video demonstrates how to upload smart contract source code and interact with the smart contracts from within Chainlens.
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.
You have the compiled source code and metadata. Read more about contract metadata.
Using solc --metadata
command as explained in the solidity documentation.
The contracts metadata can be found in the artifacts/build-info/
directory as a .json file for hardhat projects.
Truffle adds the contract's compiled files in the build/contracts/
folder.
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.
You can now interact directly with the contract in Chainlens via the read and write tabs in the UI.