Skip to content

Commit 3dc111e

Browse files
authored
Merge pull request #90 from oceanprotocol/issue-authorized-publisher
add authorized publishers, update DDO validate call
2 parents b3e9fcd + c415ad4 commit 3dc111e

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ jobs:
138138
FEE_TOKENS: '{ "1": "0x967da4048cD07aB37855c090aAF366e4ce1b9F48", "137": "0x282d8efCe846A88B159800bd4130ad77443Fa1A1", "80001": "0xd8992Ed72C445c35Cb4A2be468568Ed1079357c8", "56": "0xDCe07662CA8EbC241316a15B611c89711414Dd1a" }'
139139
FEE_AMOUNT: '{ "amount": 1, "unit": "MB" }'
140140
AUTHORIZED_DECRYPTERS: '["0xe2DD09d719Da89e5a3D0F2549c7E24566e947260","0x529043886F21D9bc1AE0feDb751e34265a246e47"]'
141+
AUTHORIZED_PUBLISHERS: '["0xe2DD09d719Da89e5a3D0F2549c7E24566e947260","0x529043886F21D9bc1AE0feDb751e34265a246e47"]'
141142
ALLOWED_ADMINS: '["0xe2DD09d719Da89e5a3D0F2549c7E24566e947260"]'
142143
MAX_REQ_PER_MINUTE: 320
143144
MAX_CONNECTIONS_PER_MINUTE: 500

src/helpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,11 @@ export async function updateAssetMetadata(
158158
aquariusInstance: Aquarius,
159159
macOsProviderUrl?: string,
160160
encryptDDO: boolean = true
161-
) {
161+
): Promise<any> {
162162
const nft = new Nft(owner, (await owner.provider.getNetwork()).chainId);
163163
let flags;
164164
let metadata;
165-
const validateResult = await aquariusInstance.validate(updatedDdo);
165+
const validateResult = await aquariusInstance.validate(updatedDdo, owner, providerUrl || macOsProviderUrl);
166166
if (encryptDDO) {
167167
const providerResponse = await ProviderInstance.encrypt(
168168
updatedDdo,

test/consumeFlow.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ describe("Ocean CLI Publishing", function() {
5555
}
5656

5757
process.env.PRIVATE_KEY = "0x1d751ded5a32226054cd2e71261039b65afb9ee1c746d055dd699b1150a5befc";
58+
// Using this account: 0x529043886F21D9bc1AE0feDb751e34265a246e47
5859
process.env.RPC = "http://127.0.0.1:8545";
5960
process.env.AQUARIUS_URL = "http://127.0.0.1:8001";
6061
process.env.PROVIDER_URL = "http://127.0.0.1:8001";

0 commit comments

Comments
 (0)