Multichain Provider
alexcos20 opened this issue · 0 comments
(part of oceanprotocol/pm#185)
Make sure that chainId is available when provider cannot figure it out.
Provider will choose the corresponding web3 object based on chainId
This affects code in https://github.com/oceanprotocol/ocean.js/blob/main/src/services/Provider.ts.
Provider calls that need to be updated:
- /api/services/encrypt - add chainId , in case Provider has different privateKeys per each chain
Provider calls that do not need updates:
-
/api/services/initialize - no need, provider will take chainId by resolving DID
-
/api/services/download - no need, provider will take chainId by resolving DID
-
/api/services/fileinfo - no need, provider will take chainId by resolving DID if DID is passed, otherwise it's just a Files object
-
POST /api/services/compute - - no need, provider will take chainId by resolving each DID (algo, datasets, etc)
-
Add integration tests for the multichain provider
-
By using this barge branch: oceanprotocol/barge#348 let's add a test for publish the asset, edit the metadata service and then consume the asset.