-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
ENS.fromWeb3 not copying middleware #1657
Comments
Thanks for the report. Seems like a reasonable expectation. I see that @pipermerriam @carver thoughts on passing/cloning a web3 instance into ENS to preserve the middleware onion? Was this avoided in the past for any reason? If you like the idea, do you have a preferred implementation? |
Yeah, there are definitely some quirks there. But I think they're all managed by the methods @marcgarreau already found at Lines 77 to 96 in 6258d2e
So the bulk of the work is to pass in a "template" w3 instance and copy the existing middlewares & provider, as a kind of alternative to (Also a reminder that @Uxio0 will have to pass |
`ENS.fromWeb3` is not copying web3 middleware (`geth_poa_middleware`). This is important for using ENS with Rinkeby and Goerli, as it needs the POA middleware. This is fixed by manually injecting props - Issue: ethereum/web3.py#1657
What was wrong?
I would expect that after configuring a Web3 instance, if I do
ENS.fromWeb3(w3)
it would copy the middleware and parameters needed. Instead, it just uses the provider. This is very important for using ENS with Rinkeby and Geth, as it needs the POA middleware.Steps to reproduce:
Initialize instance of Web3, add middleware for POA and then create an ENS instance from that.
How can it be fixed?
Copy web3 instance or allow to provide one.
The text was updated successfully, but these errors were encountered: