-
Notifications
You must be signed in to change notification settings - Fork 39
Add v2 verify routes #73
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
Conversation
There was a problem hiding this 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
@mattsse updated with suggestions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for the delay, last nits
let api_key = std::env::var("ETHERSCAN_API_KEY")?; | ||
Client::builder() | ||
.with_api_version(EtherscanApiVersion::V2) | ||
.with_api_key(api_key) | ||
.chain(chain)? | ||
.build() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then this can just call new ad with_version(v2)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A little confused as to where this would be called -- within the builder or skip the builder entirely and use with_version()
rather than new_v2_from_env
?
Hey, not sure if it#s the right place to comment, but i think there's currently a little bug in the etherscan verification that could be considered when migrating to v2. If there's a similar match, it seems like foundry currently skips verification, but it should not. Perhaps foundry should always try to verify and not even bother to check if it's verified or not. |
That’s a good point.
I wonder if you just could try to verify and if it’s already verified the
api fails is a better flow than checking first.
…On Thu, Feb 27, 2025 at 08:52 Lukas ***@***.***> wrote:
Hey, not sure if it#s the right place to comment, but i think there's
currently a little bug in the etherscan verification.
If there's a similar match, it seems like foundry currently skips
verification, but it should not.
I benchmarked etherscan a bit, and seems like the etherscan api is highly
irregular (at least on v1).
Some networks(e.g. mainnet & base) will report SimilarMatch as part of
the response, but also provide SourceCode.
Some networks(e.g. sonic) will throw an error.
Some networks(e.g. zksync) will just return SourceCode and not indicate
anything.
Perhaps foundry should always try to verify and not even bother to check
if it's verified or not.
—
Reply to this email directly, view it on GitHub
<#73 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGMCOCHXVEBEXKVIMXCB4D2R4KDPAVCNFSM6AAAAABUWWM3SWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOBYGAZDSOJYGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
[image: sakulstra]*sakulstra* left a comment
(foundry-rs/block-explorers#73)
<#73 (comment)>
Hey, not sure if it#s the right place to comment, but i think there's
currently a little bug in the etherscan verification.
If there's a similar match, it seems like foundry currently skips
verification, but it should not.
I benchmarked etherscan a bit, and seems like the etherscan api is highly
irregular (at least on v1).
Some networks(e.g. mainnet & base) will report SimilarMatch as part of
the response, but also provide SourceCode.
Some networks(e.g. sonic) will throw an error.
Some networks(e.g. zksync) will just return SourceCode and not indicate
anything.
Perhaps foundry should always try to verify and not even bother to check
if it's verified or not.
—
Reply to this email directly, view it on GitHub
<#73 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGMCOCHXVEBEXKVIMXCB4D2R4KDPAVCNFSM6AAAAABUWWM3SWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOBYGAZDSOJYGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Tracking this as well, happy to take any questions from Etherscan's end! @sakulstra noted on the Similar Match case, this new field is being added to all chains and will be standardised |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ty!
terribly sorry for the delay here...
this lgtm! especially since this is opt-in, we can try experiment with this in foundry and see what we're missing
standard-json-input
integration testsThis is a prerequisite PR for foundry-rs/foundry#9196
Notes: