Skip to content

Proposal: add verifying-contracts-on-basescan skill #35

Description

@xam-dev-ux

Proposal

Add a new skill verifying-contracts-on-basescan covering contract verification on Base Mainnet and Sepolia.

Why this keeps breaking in practice

The most common failure mode — for both developers and AI coding agents — is using the deprecated Basescan V1 API. V1 was fully deactivated on August 15, 2025, and the error it returns is:

You are using a deprecated V1 endpoint, switch to Etherscan API V2
using https://docs.etherscan.io/v2-migration

Stale docs, LLM training data, and blog posts keep surfacing api.basescan.org/api and per-chain Basescan keys. The correct path is the unified Etherscan V2 endpoint (https://api.etherscan.io/v2/api) with chainid=8453 / 84532 and a single Etherscan key. A dedicated skill is the cleanest fix: one authoritative reference that agents can be pointed to.

This is already tested — not just proposed

I verified the full flow on Base Sepolia before opening this issue:

  • Deployed SimpleStorage with a constructor argument
  • Verified via Etherscan V2 (forge verify-contract --verifier-url "https://api.etherscan.io/v2/api?chainid=84532"): 0xA6E4e2977dD3470Fa3E9683B98DC30B888755D0aPass - Verified
  • Verified the same contract via Sourcify (--verifier sourcify, no API key): 0xF0E6DF13b99525f9144D82f23b9DF860BAB4EE1eexact_match
  • Confirmed the V1 endpoint returns exactly the error above
  • Confirmed Foundry's already verified. Skipping verification behavior (graceful, not an error)

The skill content is already drafted and matches the structure and tone of existing skills.

Scope (small, focused)

  • V1 → V2 migration table with the exact error message
  • Foundry forge verify-contract (Mainnet/Sepolia, constructor args, --watch, linked libraries)
  • foundry.toml V2 config replacing the deprecated per-chain basescan URLs
  • Hardhat @nomicfoundation/hardhat-verifyapiKey as single string + customChains pointing to V2
  • Manual UI verification on basescan.org (single file vs standard JSON input)
  • Sourcify as a decentralized alternative (no API key)
  • Common errors table with causes and fixes
  • Cross-reference to deploying-contracts-on-base for deploy+verify flow — no duplication

Out of scope

Deployment itself — that lives in deploying-contracts-on-base.

On CONTRIBUTING.md

I noticed it currently says contributions are limited to the Base core team. Happy to work within whatever process you prefer — if you'd rather take the content and merge it internally that's fine too, just say the word. cc @youssefea @soheimam

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions