Where To Verify

Blast has a several block explorers to choose from. Which explorer you choose to spend the most time with is a matter of personal preference, but one common question from new builders is where do I verify my contracts?. Out of the available options, blastscan.io and blastexplorer.io are where most people verify their contracts, so that’s what we’d recommend.

The following guide will help you steer clear common issues while verifying your contracts with Foundry and Hardhat.

Do I Need An API Key?

Whether or not you need valid API key depends on (a) which network you’re using and (b) which API you’re targeting. Blastexplorer’s API will let you verify on testnet and mainnet without requiring a valid API key, but blastscan does require one when verifying on mainnet. You can get a blastscan API key by creating a free account here, and navigating to the “API-KEYs” section of your profile.


forge requires a value for the --etherscan-api-key option even in cases where a valid API key is not required. Just use a placeholder here.

Verification Endpoints

Once you’ve decided where to verify, ensure that you are making your verification request to the correct API endpoint. In Hardhat, this “verification endpoint” is the apiUrl specified in config; in Foundry, this is the --verifier-url you’ll need to provide in your forge command:


Verification Examples


Use these examples, filling in appropriate values as discussed above, to verify your contracts during deployment using forge script or to verify an existing deployment with forge verify-contract.

forge script <deploy-script> 
    --verify --verifier-url <verification-endpoint> \
    --etherscan-api-key <api-key> --rpc-url <rpc-url> \
    --verify --broadcast -vvvv


Whether using hardhat-ignition-ethers or hardhat-verify, successful verification in Hardhat is primarily a matter of setting up your hardhat.config.ts or hardhat.config.js file correctly.

You’ll need to configure the networks and etherscan properties as demonstrated below. In order to specify the correct verification endpoint from the table above, you will also need to configure the etherscan.customChains property.

import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import "@nomicfoundation/hardhat-ignition-ethers";
import { vars } from "hardhat/config";

const PRIVATE_KEY = vars.get("PRIVATE_KEY");

const config: HardhatUserConfig = {
  solidity: "0.8.24",
  networks: {
    "blast-sepolia": {
    url: "https://sepolia.blast.io",
    accounts: [PRIVATE_KEY]
    "blast-mainnet": {
        url: "https://rpc.blast.io",
        accounts: [PRIVATE_KEY]
  etherscan: {
    apiKey: API_KEY,
    customChains: [
        network: "blast-sepolia",
        chainId: 168587773,
        urls: {
          apiURL: <verification-endpoint>,
          browserURL: <explorer-url>
        network: "blast-mainnet",
        chainId: 81457,                        
        urls: {
          apiURL: <verification-endpoint>,
          browserURL: <explorer-url>
    enabled: true

export default config;