> ## Documentation Index
> Fetch the complete documentation index at: https://mantrachain.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Verifying Contracts

> Verify your smart contracts on MANTRA Chain block explorers

After deploying your contract, verify it on the block explorer to make the source code publicly available and enable users to interact with it.

## Block Explorers

### Testnet (DuKong)

* **EVM Explorer**: [explorer.dukong.io](https://explorer.dukong.io)

### Mainnet

* **EVM Explorer**: [blockscout.mantrascan.io](https://blockscout.mantrascan.io)

## Using Hardhat

### Hardhat Verify Plugin

Install the verification plugin:

```bash theme={null}
npm install --save-dev @nomicfoundation/hardhat-verify
```

Add to `hardhat.config.js`:

```javascript theme={null}
require("@nomicfoundation/hardhat-verify");

module.exports = {
  // ... other config
  etherscan: {
    apiKey: {
      mantra_testnet: "your-api-key", // Not always required
    },
    customChains: [
      {
        network: "mantra_testnet",
        chainId: 5887,
        urls: {
          apiURL: "https://explorer.dukong.io/api",
          browserURL: "https://explorer.dukong.io"
        }
      }
    ]
  }
};
```

Verify your contract:

```bash theme={null}
npx hardhat verify --network mantra_testnet <CONTRACT_ADDRESS> <CONSTRUCTOR_ARGS>
```

## Using Foundry

### Forge Verify

```bash theme={null}
forge verify-contract <CONTRACT_ADDRESS> \
  src/MyContract.sol:MyContract \
  --chain-id 5887 \
  --etherscan-api-key <API_KEY> \
  --constructor-args <CONSTRUCTOR_ARGS>
```

## Manual Verification

1. Go to the block explorer
2. Navigate to your contract address
3. Click "Verify and Publish"
4. Fill in the verification form:
   * Compiler version
   * Optimization settings
   * Source code
   * Constructor arguments (if any)

## Verification Requirements

* Contract source code
* Compiler version used
* Optimization settings
* Constructor arguments (if applicable)
* Contract address

## Next Steps

* Learn about [deploying contracts](https://mantrachain.mintlify.site/developers/evm/deploying-contracts.md)
* Explore [EVM development](https://mantrachain.mintlify.site/developers/evm/getting-started.md)
* Understand [using precompiles](https://mantrachain.mintlify.site/developers/evm/using-precompiles.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.