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

feat: Etherscan contract verification #330

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

DanielSchiavini
Copy link
Collaborator

What I did

  • Implemented contract validation on Etherscan

How I did it

Cute Animal Picture

image

@DanielSchiavini DanielSchiavini marked this pull request as ready for review November 13, 2024 12:02
wait_time = backoff
while datetime.now() < timeout:
if result := predicate():
return result
Copy link
Member

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(),
Copy link
Member

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"]
Copy link
Member

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(
Copy link
Member

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(
Copy link
Member

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.

Copy link
Member

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?

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