Skip to Content
EVMVerify Contracts

Verify contract

Verify your deployed contract using flattened source code, JSON input, Sourcify and more. Verifying your deployed contract ensures transparency and trust by making the source code publicly available and verifiable. Seitrace supports verification for both Solidity and Vyper contracts, with seven methods available through the Seitrace UI.

Benefits of Verification

  • Transparency: Publicly available source code.
  • Trust: Community can verify the contract’s functionality.
  • Security: Greater confidence in the contract’s integrity.

API For EVM Contract verification

You can use these API URLs as a replacement for the blockscout verification

Example:

forge verify-contract --watch --compiler-version "0.8.24" $CONTRACT_ADDRESS $CONTRACT_NAME \ --verifier blockscout --verifier-url $VERIFIER_URL --etherscan-api-key random --force

Seitrace UI

Verification is available for both Solidity and Vyper contracts. Currently, there are 6 methods for verification using the Seitrace UI.
Access function at: https://seitrace.com/contract-verification

Go to the Verify contract page (Resources → Verify contract (EVM))

Enter in the contract address you received during deployment. The dropdown will show you several available verification options. Select the one you would like to use and continue.

  • Solidity (Flattened source code)
  • Solidity (Standard JSON input)
  • Solidity (Multi-part files)
  • Vyper (Contract)
  • Vyper (Multi-part files)
  • Vyper (Standard JSON input)

Solidity (Flattened source code)

  1. Contract Address: The 0x address supplied on contract creation (added above).
  2. Is Yul contract: Select if the contract is coded in Yul for efficiency.
  3. Include Nightly Builds: Select if you want to show nightly builds.
  4. Compiler: derived from the first line in the contract pragma solidity X.X.X. Use the corresponding compiler version rather than the nightly build.
  5. EVM Version: Select the correct EVM version if known, otherwise use default.
  6. Optimization Enabled: If you enabled optimization during compilation, select and enter the run value. 200 is the Solidity‑compiler default value. Only change if you changed this value while compiling.
  7. Enter the Solidity Contract Code: You may need to flatten your Solidity code if it utilizes a library or inherits dependencies from another contract. We recommend Hardhat or the POA Solidity Flattener.
  8. Add Contract Libraries: Enter the name and 0x address for any required libraries called in the .sol file. You can add multiple contracts with the “+” button.
  9. Click the Verify and Publish button.
  10. If all goes well, you will see a check‑mark ✅ next to Code in the code tab, and an additional tab called Read Contract. The contract name will now appear in Seitrace with any transactions related to your contract.

Solidity (Standard JSON input)

More information on JSON input is available here.

  1. Include nightly builds: You can choose Yes or No depending on your compiler.
  2. Compiler: Choose the compiler version used to compile your smart contract. If you selected Yes for nightly builds, use the compiler version rather than the build.
  3. Standard Input JSON: Upload your Standard Input JSON file. File should follow the Solidity format and all the sources must be in Literal Content format, not a URL.

Click Verify & Publish and wait for the response.

Vyper Contract

  1. Contract Name: Name assigned to the contract.
  2. Compiler: Select the compiler version used in the source code.
  3. EVM Version: Select the correct EVM version if known, otherwise use default.
  4. Contract Code: Copy and paste the contract code.
  5. Click the Verify and Publish button.

If all goes well, you will see a check‑mark ✅ next to Code in the code tab, and an additional tab called Read Contract.

The contract name will now appear in Seitrace with any transactions related to your contract.

Vyper Multi-part files and standard json input

See the information above.

Troubleshooting

If you receive the There was an error compiling your contract message this means the bytecode doesn’t match the supplied sourcecode.

Unfortunately, there are many reasons this may be the case. Here are a few things to try:

  1. Double check the compiler version is correct.
    Check all version digits — for example 0.5.1 is different from 0.5.10
  2. Check that an extra space has not been added to the end of the contract. When pasting in, an extra space may be added. Delete this and attempt to recompile.
  3. Copy, paste, and verify your source code in Remix. You may find some exceptions here.

Hardhat Verification Plugin

Hardhat is a full‑featured development environment for contract compilation, deployment and verification. The Hardhat Verification Plugin supports contract verification on Seitrace.

Get started

Install Hardhat

Via npm

npm install --save-dev hardhat

Via yarn

yarn add --dev hardhat
  1. Create a project
    Run npx hardhat in your project folder and follow the instructions to create (more info here).
  2. Install plugin
    Install the hardhat-etherscan plugin (requires v3.0.0+).

Via npm

npm install --save-dev @nomiclabs/hardhat-etherscan

Via yarn

yarn add --dev @nomiclabs/hardhat-etherscan
  1. Add plugin reference to config file:

Add the following statement to your hardhat.config.js.

require("@nomiclabs/hardhat-etherscan");

If using TypeScript, add this to your hardhat.config.ts. More info on using TypeScript with Hardhat is available here.

import "@nomiclabs/hardhat-etherscan";

Config File

Your basic Hardhat config file (hardhat.config.js or hardhat.config.ts) will be setup to support the network you are working on. In this example we use the Sokol test network and a .js file.
Here we add an RPC url without an API key, however some value is still required. You can use any arbitrary string. More info on this here.
If you prefer, you can migrate to hardhat-toolbox to use a plugin bundle.

import dotenv from 'dotenv'; import { HardhatUserConfig } from 'hardhat/config'; import '@nomicfoundation/hardhat-toolbox'; import 'tsconfig-paths/register'; import '@openzeppelin/hardhat-upgrades'; /** * Config dotenv first */ dotenv.config(); /** * Default hardhat configs */ const config: HardhatUserConfig = { solidity: { compilers: [ { version: '0.8.20', settings: { optimizer: { enabled: true, runs: 200 } } } ] } }; /** * Extract env vars */ const privateKey = process.env.PRIVATE_KEY || ''; /** * If private key is available, attach network configs */ if (privateKey) { config.networks = { sei_arctic_1: { url: 'https://evm-rpc.arctic-1.seinetwork.io/', chainId: 713715, accounts: [privateKey], gas: 'auto', gasPrice: 'auto' } }; } /** * Load etherscan key */ const seitraceKey = process.env.SEITRACE_KEY || ''; if (seitraceKey) { config.etherscan = { apiKey: { sei_arctic_1: seitraceKey }, customChains: [ { network: 'sei_arctic_1', chainId: 713715, urls: { apiURL: 'https://seitrace.com/arctic-1/api', browserURL: 'https://seitrace.com' } } ] }; } export default config;

Set up env. file

  • PRIVATE_KEY: Wallet private key
  • SEITRACE_KEY: You can also use a random string
PRIVATE_KEY="4c1a9ffd2dce9ed5b5f464c6b6a38efceb051855d123c9e6aeec751c35762d91" SEITRACE_KEY="can-be-any-string"

Deploy and Verify

  1. Deploy
npx hardhat run .\scripts\<path>\deploy.multicall.ts --network sei_arctic_1
  1. Verify
npx hardhat verify --network sei_arctic_1 <contract_address> "Constructor argument"

This is how your verification flow should look like:

PS D:\verify-contract> npx hardhat verify --network sei_arctic_1 0xaa338AbfB92e7476596D4cCb98b29700BDcA2a6E "0xc99259dE8f9ec4cd443C0CF5D45D547c513E03be" Successfully submitted source code for contract contracts/VuNFT721.sol:VuSEI721 at 0xaa338AbfB92e7476596D4cCb98b29700BDcA2a6E for verification on the block explorer. Waiting for verification result... Successfully verified contract VuSEI721 on the block explorer. https://seitrace.com/address/0xaa338AbfB92e7476596D4cCb98b29700BDcA2a6E#code

Confirm Verification on Seitrace

Custom ABI

The Custom ABI feature is useful for debugging and testing newly deployed smart contracts. This feature can be used with verified or unverified contracts.

Once a custom ABI is added, the user can test methods using the Write Custom feature.

  1. Login to My Account in Seitrace to get started. Once logged in:

    a. Go to Custom ABI in the My Account menu.
    b. Press the Add Custom ABI button

  2. Fill in the fields.

    a. Smart Contract Address: Enter the correct 0x address of the deployed contract.
    b. Project Name: Create a name for your own reference.
    c. Custom ABI: Copy and paste in the ABI for the contract from your development environment (truffle, hardhat, remix etc.) or, if the contract is verified, you can copy it from Seitrace.
    d. Press Create custom ABI.

  3. Custom ABI added to the home screen: You can edit or remove current custom ABIs or add additional custom ABIs from here.

Last updated on