oceanprotocol / ocean.py

🦑 Ocean Protocol's Python library to privately & securely publish, exchange, and consume data.
https://oceanprotocol.com
Apache License 2.0
172 stars 78 forks source link

RPC envvar label shouldn't be specific to the network #1479

Closed alexcos20 closed 1 year ago

alexcos20 commented 1 year ago

Quote from README:

Export env vars of the format NETWORKNAME_RPC_URL e.g. export POLYGON_RPC_URL=https://polygon-rpc.com In case you have an Infura project, you need to also export the WEB3_INFURA_PROJECT_ID variable alongside the base rpc urls.

What if I want to use another rpc provider? Or my own network ? Who do I know what ENV to use for EWC? etc...

Ocean.py should not deal with ENVs, it should use the rpc in the following way:

config = get_config_dict(RPC_URL)
ocean = Ocean(config)

where get_config_dict should: