For the complete documentation index, see llms.txt. This page is also available as Markdown.

Verifying Smart Contracts

Using Developer Tools

Most smart contract tooling has plugins for verifying your contracts easily on Blast chain explorer.

Blast Chain Explorer API: https://blastchain.org/api

Hardhat

Modify hardhat.config.ts to point to Blast Chain’s RPC and block explorer API.

For example, the config for Blast Chain will look like this:

...

const config: HardhatUserConfig = {
  ...
  networks: {
    blastChain: {
      url: 'https://zkevmrpc.blastchain.org' || '',
      accounts:
        process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
    },
  },
  etherscan: {
    apiKey: {
      blastChain: <YOUR API KEY>,
    },
    customChains: [
      {
        network: 'blastChain',
        chainId: 238,
        urls: {
          apiURL: 'https://blastchain.org/api',
          browserURL: 'https://blastchain.org/',
        },
      },
    ],
  },
}

...

Now you can verify the smart contract by running the following command.

For example, this is how a smart contract that receives two uint parameters in the constructor should look:

Last updated