-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: Etherscan contract verification #330
base: master
Are you sure you want to change the base?
Conversation
boa/verifiers.py
Outdated
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?
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.
so it could be used with more than just bools (but yeah I know you don't like truthiness)
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.
So the value is actually used to wait until the contract is created:
Line 104 in a83112e
identifier = _wait_until( |
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?
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.
yes definitely, that's the identifier
boa/verifiers.py
Outdated
) | ||
|
||
|
||
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?
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.
While it is in the verifiers file, it is definitely not specific for contract verification.
Since it doesn't use anything from self
I didn't see the point of keeping it in a class
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.
thanks! sorry it took so long for me to get this in
https://github.com/vyperlang/titanoboa/actions/runs/13031053950/job/36350261380?pr=330 hmm looks like there are still failing tests |
What I did
How I did it
Cute Animal Picture