-
Notifications
You must be signed in to change notification settings - Fork 1.8k
init commit of async contract #2377
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
init commit of async contract #2377
Conversation
@pacrob Here is the AsyncEthereumTester and Contract parts of my other PR. I closed that PR. One problem we will need to overcome with removing the ENS work is that contract is reliant on ENS there are other examples in there too. The problem I ran into while testing was that the w3 instance that is being used to create the AsyncContract has a AsyncEth Module in it. This web3 instance also has a standard ENS in it. When ens is called from AsyncContract the AsyncEth module is then used to call web3.eth.call which is async but ens is expecting it not to be async. Hope that all makes sense. There may be a way around this like maybe not allowing ens addresses to be passed into AsyncContract until ENS is asyncified. Thoughts?? Also, let me know what parts of async contract you want to work on and I can pick some of the left over parts. Thanks, for setting this feature branch of for collaborating. |
Just FYI, somewhere along the lines of moving the ENS out and fixing linting errors, a few of the test broke, Will look at these this evening as well as finish up the linting |
I cleaned up some of the linting, and going to start on ContractEvents/ContractEvent |
I've been working on trying to resolve the linting but not much success today. Will continue tomorrow. I think because this PR has the main class restructuring, we should get it in before I start changing anything further. On the ENS dependency, is it just the calls to normalize_address that require the ENS object? If that's the only place, we could add a non-ens version of the normalizer or something similar. |
So I almost have the Main BaseContract/Contract/AsyncContract done with the exception of a couple methods. I think it is just be the normalizer that was using ens so that's would probably work making a non ens version of it. I hope to finish that up later this evening or tommorrow. The ENS part is isolated so you could probably work on the normalizer piece without conflicts until I finish the may contract object. |
Sounds good. I've added a |
Here is where I am at. I have that one weird lint error where it is complaining about the web3_module but besides that I "think" contract is for the "most part" done. I pulled in your The next thing I was going to look at is |
Looks good. With that structure in, should be easier to work on in chunks. I pulled it in with the lint failing, but it looks like reverting that ignore type line in web3/_utils/module_testing/web3_module.py fixes it. Is there another reason for removing it? |
So one time I would run lint and it would tell me the typing wasn't right on that line and another time it would say that the type ignore was wrong. So probably just my local env being flaky. If removing the type ignore works then that is fine with me. |
Create Base/Async structure for ContractFunctions, ContractEvents, Contract, ContractConstructor, ContractFunction, ContractEvent, ContractCaller classes
Create Base/Async structure for ContractFunctions, ContractEvents, Contract, ContractConstructor, ContractFunction, ContractEvent, ContractCaller classes
Create Base/Async structure for ContractFunctions, ContractEvents, Contract, ContractConstructor, ContractFunction, ContractEvent, ContractCaller classes
init commit of async contract see PR #2370