Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add v2 verify routes #73

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

iainnash
Copy link

@iainnash iainnash commented Jan 7, 2025

  • Fix existing verify integration tests
  • Add standard-json-input integration tests
  • Fix current single file test
  • Add v2 integration tests
  • Allow v2 setting on client with etherscan client

This is a prerequisite PR for foundry-rs/foundry#9196

Notes:

  • Fantomscan test has no env var passed in and can be removed safely.
  • Gas estimates now do not fail with even 1 passed in, so skipping the failure test because I couldn't find a failure test.

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ty, smol nits and suggestions

Comment on lines +47 to +51
#[derive(Clone, Debug, PartialEq, Copy)]
pub enum EtherscanApiVersion {
V1,
V2,
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs doc oneliner

@@ -99,6 +107,15 @@ impl Client {
Client::builder().with_api_key(api_key).chain(chain)?.build()
}

pub fn new_v2_from_env(chain: Chain) -> Result<Self> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs

Comment on lines +303 to +304
/// Etherscan API version (v2 is new verifier version)
etherscan_api_version: Option<EtherscanApiVersion>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can remove this option and use v1 as the default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants