-
Notifications
You must be signed in to change notification settings - Fork 51
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
feat: Etherscan contract verification #330
base: master
Are you sure you want to change the base?
Conversation
wait_time = backoff | ||
while datetime.now() < timeout: | ||
if result := predicate(): | ||
return result |
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.
why return the result?
"module": "contract", | ||
"action": "verifysourcecode", | ||
"apikey": api_key, | ||
"chainId": boa.env.get_chain_id(), |
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.
let's move this effect out of the verifier
response.raise_for_status() | ||
response_json = response.json() | ||
if response_json.get("status") == "1": | ||
return response_json["result"] |
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.
this is a string?
) | ||
return None | ||
|
||
identifier = _wait_until( |
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.
maybe rename to etherscan_guid
) | ||
|
||
|
||
def _wait_until( |
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.
the indirection here is extremely confusing.
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.
why not just make it part of the base contract verifier?
What I did
How I did it
Cute Animal Picture