Skip to content

Feature/asyncify contract #2404

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

Merged
merged 32 commits into from
Mar 24, 2022

Conversation

dbfreem
Copy link
Contributor

@dbfreem dbfreem commented Mar 24, 2022

More AsyncContract

Set default contract factory to AsyncContract in AsyncEth

Unfortunately, this required copy and pasting those three contract functions and the property from the BaseEth class to the Eth and AsyncEth classes

@dbfreem
Copy link
Contributor Author

dbfreem commented Mar 24, 2022

@ChristianCoenen this is a change that should fix what you reported in #2394. Let me know what you think.

@pacrob Setting the defaultContractFactory to AsyncContract in AsyncEth

@ChristianCoenen
Copy link

Thanks, lgtm!

Unfortunately, this required copy and pasting those three contract functions and the property from the BaseEth class to the Eth and AsyncEth classes

Was there a reason for this like failing tests or some edge cases? Wouldn't just adding

defaultContractFactory: Type[Union[AsyncContract, AsyncContractCaller]] = AsyncContract

to AsyncEth be sufficient? That's what I did temporarily to make my code work.

@pacrob pacrob merged commit fb238c9 into ethereum:asyncify-contract Mar 24, 2022
@dbfreem
Copy link
Contributor Author

dbfreem commented Mar 25, 2022

@ChristianCoenen I don't know what happened but when I made the change you suggested it broke some test. To be honest I didn't look into it and just moved the methods down to AsyncEth and Eth. It was probably something simple I did.

I read your message above and thought "yea that should have worked" and it did when I made the changes you suggested again this evening. So I am opening another PR to revert some of those changes I made last night and implement your suggestion.

Thanks so much for looking into this!

pacrob pushed a commit to pacrob/web3.py that referenced this pull request Mar 31, 2022
* setting default contract factory in AsyncEth to AsyncContract
pacrob pushed a commit to pacrob/web3.py that referenced this pull request Apr 13, 2022
* setting default contract factory in AsyncEth to AsyncContract
pacrob pushed a commit to pacrob/web3.py that referenced this pull request Apr 23, 2022
* setting default contract factory in AsyncEth to AsyncContract
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.

3 participants