ocean.py icon indicating copy to clipboard operation
ocean.py copied to clipboard

Addresses imported from the venv

Open mariacarmina opened this issue 2 years ago • 1 comments

Fixes #971 .

Changes proposed in this PR:

  • removed --pre flag from ocean-lib installation step
  • fixed addresses import, updated address file path
  • tested on rinkeby.

mariacarmina avatar Sep 30 '22 13:09 mariacarmina

Test output: Screenshot from 2022-09-30 16-54-42

It retrieved the addresses successfully.

mariacarmina avatar Sep 30 '22 13:09 mariacarmina

This should work by default, not just if you use ExampleConfig. Putting it into ExampleConfig is too late.

Examples:

  1. Anyone using ocean_lib for some remote network should be able to just specify the network RPC. From that, it should auto-find the chainid. From that, it should auto-find the addresses. If the user has to specific chainid or addresses, then we're still not done.
  2. You can capture the essence of (1) in the test_mumbai.py::test_ocean_tx. It should work, without having to specify the Ocean addresses anywhere. (And not by forcing it in some example config).

trentmc avatar Oct 02 '22 23:10 trentmc

@mariacarmina please use the latest version of main.Then, keeping your --pre changes, I think adding the changes in get_contracts_addresses, like done for the CHAIN_ID, is a good way to go.

calina-c avatar Oct 04 '22 05:10 calina-c

@trentmc, can we have some test keys on mumbai as we have exposed for ganache? In order to make test_mumbai::test_ocean_tx pass, we need to have remote test keys exported and I thought that maybe we can set them in pytest.ini file as well.

mariacarmina avatar Oct 05 '22 08:10 mariacarmina

@trentmc, can we have some test keys on mumbai as we have exposed for ganache? In order to make test_mumbai::test_ocean_tx pass, we need to have remote test keys exported and I thought that maybe we can set them in pytest.ini file as well.

We have test keys, but they cannot be publicly visible because bots will eat the fake MATIC, and you can only get a little fake MATIC at a time from faucets.

Our test keys are visible to CI as Github Actions Secrets. The CI can see them: the other Mumbai test needs fake MATIC and the tests pass.

You will need the keys locally too. Instructions are at sections 3 of: https://github.com/oceanprotocol/ocean.py/blob/main/READMEs/developers.md

trentmc avatar Oct 05 '22 09:10 trentmc