Skip to content
This repository was archived by the owner on Jun 16, 2025. It is now read-only.

Etherscan verifcation not working #146

@heueristik

Description

@heueristik

I tried verifying the EvenNumber.sol contract that I've deployed to sepolia using

➜  risc0-foundry-template git:(main) ✗ forge verify-contract ${EVEN_NUMBER_ADDRESS} --rpc-url https://eth-sepolia.g.alchemy.com/v2/${ALCHEMY_API_KEY:?} --verifier etherscan 
[⠊] Compiling...
No files changed, compilation skipped
Start verifying contract `0x998A5735633afc905d542a97C9C2Dd664394e397` deployed on sepolia

Submitting verification for [contracts/EvenNumber.sol:EvenNumber] 0x998A5735633afc905d542a97C9C2Dd664394e397.
Submitted contract for verification:
        Response: `OK`
        GUID: `kc2hwswvs7wxnznyww6ufes8ni4sgek4zsij5dvtidleaskx1b`
        URL: https://sepolia.etherscan.io/address/0x998a5735633afc905d542a97c9c2dd664394e397
➜  risc0-foundry-template git:(main) ✗ 

but doesn't verify the contract (see https://sepolia.etherscan.io/address/0x998a5735633afc905d542a97c9c2dd664394e397).

This doesn't change if I execute the command from the root instead of the contracts directory.
This problem seems to be caused by ambiguous import paths as per the foundry book

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