> ## Documentation Index
> Fetch the complete documentation index at: https://blockscout-vb-api-internal-txs-pending-head-tolerance.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Sourcify plugin for Hardhat

> Submit deployed contract sources to Sourcify from your Hardhat project so Blockscout can display verified metadata alongside on-chain contracts.

Similar to the [hardhat verification plugin](/devs/verification/hardhat-verification-plugin), this plugin submits the contract source and other info of all deployed contracts to Sourcify.

### Verify

Similar to the verification approach described in the [hardhat verification plugin](/devs/verification/hardhat-verification-plugin), you can verify the contract source code in Sourcify as well by setting the following in the hardhat config file:

```javascript theme={null}
// ...
const config: HardhatUserConfig = {
  // ...
  sourcify: {
    enabled: true
  },
  // ...
};

export default config;
```

```sh theme={null}
npx hardhat verify --network <network> DEPLOYED_CONTRACT_ADDRESS "Constructor argument 1"
```

Optimism Sepolia example:

```sh theme={null}
> npx hardhat verify --network optimism-sepolia 0xCD562a6426b474390A9E7e554b9B4f9f62Ea38Ba 1234
Successfully submitted source code for contract
contracts/Lock.sol:Lock at 0xCD562a6426b474390A9E7e554b9B4f9f62Ea38Ba
for verification on the block explorer. Waiting for verification result...

Successfully verified contract Lock on the block explorer.
https://optimism-sepolia.blockscout.com/address/0xCD562a6426b474390A9E7e554b9B4f9f62Ea38Ba#code

Successfully verified contract Lock on Sourcify.
https://repo.sourcify.dev/contracts/full_match/11155420/0xCD562a6426b474390A9E7e554b9B4f9f62Ea38Ba/
```

## Confirm Verification on Blockscout

Go to your BlockScout instance and paste the contract address into the search bar.

<Frame caption="">
  <img src="https://mintcdn.com/blockscout-vb-api-internal-txs-pending-head-tolerance/RMJAJ2gHcDUZvyb0/images/fc3fb8d9-image.jpeg?fit=max&auto=format&n=RMJAJ2gHcDUZvyb0&q=85&s=ec961a6591d1faddb9f27eb6484d5f7e" alt="" width="2304" height="769" data-path="images/fc3fb8d9-image.jpeg" />
</Frame>

Scroll down to see verified status. A green checkmark ✅ means the contract is verified.

<Frame caption="">
  <img src="https://mintcdn.com/blockscout-vb-api-internal-txs-pending-head-tolerance/UrCDX4nBWcWf3yWQ/images/d9dab800-image.jpeg?fit=max&auto=format&n=UrCDX4nBWcWf3yWQ&q=85&s=5aa2769397af5eaf5d23dd941a9a5ad2" alt="" width="2304" height="1265" data-path="images/d9dab800-image.jpeg" />
</Frame>

If your screen size is limited, you may need to click the 3 dots to view and click through to the contract.

<Frame caption="">
  <img src="https://mintcdn.com/blockscout-vb-api-internal-txs-pending-head-tolerance/_e0MlHtKz9AoauGF/images/47a3a81c-image.jpeg?fit=max&auto=format&n=_e0MlHtKz9AoauGF&q=85&s=a50afec161dd710bab0b460aaa4e294f" alt="" width="1960" height="338" data-path="images/47a3a81c-image.jpeg" />
</Frame>

Scroll down to see and interact with the contract code.

<Frame caption="">
  <img src="https://mintcdn.com/blockscout-vb-api-internal-txs-pending-head-tolerance/vWqHAktyRvVNmFjb/images/9ae7288e-image.jpeg?fit=max&auto=format&n=vWqHAktyRvVNmFjb&q=85&s=631f712e7ba8f825a4adac6a095ddaee" alt="" width="2304" height="1468" data-path="images/9ae7288e-image.jpeg" />
</Frame>
