foundry-rs / foundry-rs/foundry

feat: have `forge verify-contract` take standard JSON input

Open
#8,873 1 comment 1 reaction 0 assignees View on GitHub
A-compatibility Cmd-forge-verify T-feature T-post-V1
Dominant language
Rust
Stars
10.6k
Forks
2.6k
Avg merge
18h 20m
Merged PRs (30d)
510

Description

### Component

Forge

### Describe the feature you would like

Verification of contracts after some time passes is tricky because the metadata content changes with Foundry updates (e.g. https://github.com/foundry-rs/foundry/issues/8611, but I also noticed it myself). This seems to be a difficult problem to solve globally, so it's better to work it around by keep the standard JSON input generated during the contract deployment. Such JSON can be reliably submitted later, probably using different Foundry version, different tooling and a new scanner. Unfortunately `forge verify-contract` doesn't accept standard JSON input, it always wants to compile the current sources using its latest logic. This forces the user to use the scanners' web APIs, which accept the JSONs, but are clunky and slow. Using foundry's CLI would be so much move convenient.

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.