-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Autoprovider repo template #1736
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
Comments
Documenting remote providers we've heard interest for:
|
What would the expected api for this look like. Something like below?
|
I have been thinking about this some more. Ideally there could be an external library that could provide enough configuration to web3.py to create a w3 instance. This external library ideally would not be dependent on the web3.py library so they are not tightly coupled. I was thinking of creating a new web3.auto.external module. This module would take in a configuration object and then return a w3 instance. A user could pass in an object from an external library and web3 would convert that into a w3 instance. Here is just a thought what that might look like, it is totally not fully implemented just thoughts. web3.auto.external.py
Then an external library could provide a class that looks something like this.
This So the final product would look something like this
I would love some feedback on this idea as I am sure there are other options here too. Finally, if I can get this all up and running I was also, going to create a repo external to the ethereum org with some of the auto providers in it. @kclowes thoughts?? |
What was wrong?
Currently, you can access an Infura provider in web3 using
from web3.auto.infura import w3
. This was good at the time because Infura was the only viable provider. However, a while back someone submitted a PR to add Nodesmith as an auto provider. After some internal discussion, we decided that we didn't want to be the gatekeeper for every new node provider, and decided that we would use Infura as an example to make a new template that people can follow to implement their own auto node providers.How can it be fixed?
On a high level, pull out the logic for Infura's auto provider, put it in a new repo, and provide a web3 API for people to use their own auto provider package.
The text was updated successfully, but these errors were encountered: