Skip to content

Vyper Support with forge verify-contract #10702

Open
@mpeyfuss

Description

@mpeyfuss

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge Version: 1.2.2-stable Commit SHA: 73ac79f Build Timestamp: 2025-06-01T14:56:45.336809000Z (1748789805) Build Profile: maxperf

What version of Foundryup are you on?

foundryup: 1.1.0

What command(s) is the bug in?

either forge create src/counter.vy:counter --verify or forge verify-contract 0x...

Operating System

macOS (Apple Silicon)

Describe the bug

It's possible to deploy vyper contracts with the forge create or forge script methods as mentioned in the docs, however, it's not possible to verify the contract on etherscan because the verify command is only targeting the solidity endpoint.

Etherscan now has a vyper endpoint that can be targeted with vyper-json. It's possible to generate vyper json through vyper src/counter.vy -f solc_json.

You can test out my template repo here: https://github.com/mpeyfuss/vyper-template

API endpoint: https://docs.etherscan.io/etherscan-v2/api-endpoints/contracts#verify-vyper-source-code

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions