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

reorganized contract #2567

Merged
merged 10 commits into from
Jan 25, 2023
Merged

reorganized contract #2567

merged 10 commits into from
Jan 25, 2023

Conversation

dbfreem
Copy link
Contributor

@dbfreem dbfreem commented Jul 10, 2022

How was it fixed?

Reorganized contract to align with the format discussed in #2441

Todo:

@dbfreem dbfreem marked this pull request as draft July 11, 2022 02:10
@dbfreem dbfreem marked this pull request as ready for review July 11, 2022 23:02
@kclowes kclowes mentioned this pull request Oct 26, 2022
22 tasks
Contract,
ContractConstructor,
ContractCaller,
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

These are the only classes that get exported to other files in our codebase. I think that our public API all stems from either Contract or AsyncContract, but I wonder if it's worth exposing other classes like ContractFunctions or ContractEvents here too?

Copy link
Contributor

Choose a reason for hiding this comment

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

I would lean towards only exposing what is necessary and add more if when it's called for. Adding things here wouldn't be breaking, right?

Copy link
Collaborator

@kclowes kclowes left a comment

Choose a reason for hiding this comment

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

@fselmo / @pacrob This is ready for a once-over. I'll go through tomorrow and double check that all methods from the old contract.py file were copied over, but I'm reasonably confident that they did since the tests are passing.

Copy link
Contributor

@pacrob pacrob left a comment

Choose a reason for hiding this comment

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

LGTM! Nit/question - I've been grouping async functions together in the lower half of a file, separated with # --- async --- #. Do we want to continue that theme here? I think it's cleaner in an overall organization sense, but there's merit to having sync and async versions visually next to each other if they need changes in the future. 🤷

@kclowes
Copy link
Collaborator

kclowes commented Jan 20, 2023

I've been grouping async functions together in the lower half of a file, separated with # --- async --- #. Do we want to continue that theme here?

oops, yes! Thanks for the reminder!

Copy link
Collaborator

@fselmo fselmo left a comment

Choose a reason for hiding this comment

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

This lgtm! I'd piggy back what @pacrob said about splitting out the async functions and say that might be useful to do inside the utils.py file as well for better readability [oops that's the only file I see for that hah]. But that's a nit.

@kclowes kclowes merged commit d99d7db into ethereum:master Jan 25, 2023
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.

4 participants