LaChain Docs
  • Welcome
  • Getting Started
    • Build Decentralized Apps
    • How LaChain works
  • Basics
    • Run a node
    • Testnet
    • Deploy a Smart contract
    • Deploy with Remix
    • Verify a Smart Contract
    • Glossary
Powered by GitBook
On this page
  1. Basics

Verify a Smart Contract

PreviousDeploy with RemixNextGlossary

Last updated 7 months ago

To verify a smart contract in Explorer:

1. After creating a contract, you will receive an address. Go to LaChain Explorer () and enter the contract address in the search bar.

2. Once you find your contract details, select the "Code" tab to view the bytecode. There, you'll see a button called "Verify & Publish." Click on it.

3. Several verification options will be offered. Two common methods are:

- Flattened Source Code (Solidity): Must provide contract address (prefixed with "0x"), contract class name, compiler version, EVM version, if optimization was enabled during compile , the number of optimization runs, the contract code in Solidity, and other optional details as needed. Then click the "Verify and Publish" button.

- Standard JSON Input: In this method, you will provide the name of the contract, the compiler version, a standard input JSON file (following the Solidity format), and other optional details. After filling out the form, click the "Verify & Publish" button.

4. Wait for the response after clicking "Verify & Publish". If all goes well, you will see a check mark next to "Code" in the code tab and an additional tab called "Read Contract" is added to access your verified contract.

https://explorer.lachain.network