From 7a416990bb8e3c308053f4647120c829aa85e90a Mon Sep 17 00:00:00 2001 From: paulo-ocean Date: Tue, 18 Feb 2025 11:25:52 +0000 Subject: [PATCH 1/5] add authorized publishers --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bf6a677..fb1c34b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -139,6 +139,7 @@ jobs: FEE_TOKENS: '{ "1": "0x967da4048cD07aB37855c090aAF366e4ce1b9F48", "137": "0x282d8efCe846A88B159800bd4130ad77443Fa1A1", "80001": "0xd8992Ed72C445c35Cb4A2be468568Ed1079357c8", "56": "0xDCe07662CA8EbC241316a15B611c89711414Dd1a" }' FEE_AMOUNT: '{ "amount": 1, "unit": "MB" }' AUTHORIZED_DECRYPTERS: '["0xe2DD09d719Da89e5a3D0F2549c7E24566e947260"]' + AUTHORIZED_PUBLISHERS: '["0xe2DD09d719Da89e5a3D0F2549c7E24566e947260"]' ALLOWED_ADMINS: '["0xe2DD09d719Da89e5a3D0F2549c7E24566e947260"]' MAX_REQ_PER_MINUTE: 320 - name: Check Ocean Node is running From ab9b858cca154f96aab76f64bca916282e19539b Mon Sep 17 00:00:00 2001 From: paulo-ocean Date: Tue, 18 Feb 2025 12:09:43 +0000 Subject: [PATCH 2/5] update test addresses, publishers and decryters --- .github/workflows/ci.yml | 4 ++-- test/consumeFlow.test.ts | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fb1c34b..3ec5c98 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -138,8 +138,8 @@ jobs: DB_URL: 'http://localhost:8108/?apiKey=xyz' FEE_TOKENS: '{ "1": "0x967da4048cD07aB37855c090aAF366e4ce1b9F48", "137": "0x282d8efCe846A88B159800bd4130ad77443Fa1A1", "80001": "0xd8992Ed72C445c35Cb4A2be468568Ed1079357c8", "56": "0xDCe07662CA8EbC241316a15B611c89711414Dd1a" }' FEE_AMOUNT: '{ "amount": 1, "unit": "MB" }' - AUTHORIZED_DECRYPTERS: '["0xe2DD09d719Da89e5a3D0F2549c7E24566e947260"]' - AUTHORIZED_PUBLISHERS: '["0xe2DD09d719Da89e5a3D0F2549c7E24566e947260"]' + AUTHORIZED_DECRYPTERS: '["0xe2DD09d719Da89e5a3D0F2549c7E24566e947260","0x529043886F21D9bc1AE0feDb751e34265a246e47"]' + AUTHORIZED_PUBLISHERS: '["0xe2DD09d719Da89e5a3D0F2549c7E24566e947260","0x529043886F21D9bc1AE0feDb751e34265a246e47"]' ALLOWED_ADMINS: '["0xe2DD09d719Da89e5a3D0F2549c7E24566e947260"]' MAX_REQ_PER_MINUTE: 320 - name: Check Ocean Node is running diff --git a/test/consumeFlow.test.ts b/test/consumeFlow.test.ts index c7bf0f7..f18a491 100644 --- a/test/consumeFlow.test.ts +++ b/test/consumeFlow.test.ts @@ -49,6 +49,7 @@ describe("Ocean CLI Publishing", function() { } process.env.PRIVATE_KEY = "0x1d751ded5a32226054cd2e71261039b65afb9ee1c746d055dd699b1150a5befc"; + // 0x529043886F21D9bc1AE0feDb751e34265a246e47 process.env.RPC = "http://127.0.0.1:8545"; process.env.AQUARIUS_URL = "http://127.0.0.1:8001"; process.env.PROVIDER_URL = "http://127.0.0.1:8001"; From 3181573426372c85906941681529ba27222810bb Mon Sep 17 00:00:00 2001 From: "paulo@oceanprotocol" <143717839+paulo-ocean@users.noreply.github.com> Date: Fri, 21 Feb 2025 09:38:24 +0000 Subject: [PATCH 3/5] Update test/consumeFlow.test.ts Co-authored-by: Jamie Hewitt --- test/consumeFlow.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/consumeFlow.test.ts b/test/consumeFlow.test.ts index f18a491..6d7ec3c 100644 --- a/test/consumeFlow.test.ts +++ b/test/consumeFlow.test.ts @@ -49,7 +49,7 @@ describe("Ocean CLI Publishing", function() { } process.env.PRIVATE_KEY = "0x1d751ded5a32226054cd2e71261039b65afb9ee1c746d055dd699b1150a5befc"; - // 0x529043886F21D9bc1AE0feDb751e34265a246e47 + // Using this account: 0x529043886F21D9bc1AE0feDb751e34265a246e47 process.env.RPC = "http://127.0.0.1:8545"; process.env.AQUARIUS_URL = "http://127.0.0.1:8001"; process.env.PROVIDER_URL = "http://127.0.0.1:8001"; From 292a924731cf3bb101c19c40a30c94d865acbd95 Mon Sep 17 00:00:00 2001 From: paulo-ocean Date: Mon, 24 Feb 2025 11:36:42 +0000 Subject: [PATCH 4/5] minor change on validate call --- src/helpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers.ts b/src/helpers.ts index 20476ea..6b8dd68 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -162,7 +162,7 @@ export async function updateAssetMetadata( const nft = new Nft(owner, (await owner.provider.getNetwork()).chainId); let flags; let metadata; - const validateResult = await aquariusInstance.validate(updatedDdo); + const validateResult = await aquariusInstance.validate(updatedDdo, owner, macOsProviderUrl || providerUrl); if (encryptDDO) { const providerResponse = await ProviderInstance.encrypt( updatedDdo, From 1dd9694cbc5aef04f4b846fc1021228cd0606372 Mon Sep 17 00:00:00 2001 From: paulo-ocean Date: Tue, 25 Feb 2025 09:43:37 +0000 Subject: [PATCH 5/5] no need to supply the provider url param, get it from .env --- src/helpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers.ts b/src/helpers.ts index 6b8dd68..360b806 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -162,7 +162,7 @@ export async function updateAssetMetadata( const nft = new Nft(owner, (await owner.provider.getNetwork()).chainId); let flags; let metadata; - const validateResult = await aquariusInstance.validate(updatedDdo, owner, macOsProviderUrl || providerUrl); + const validateResult = await aquariusInstance.validate(updatedDdo, owner); if (encryptDDO) { const providerResponse = await ProviderInstance.encrypt( updatedDdo,