From c8f37de759c5471d7397e148a8564c11b9f3620e Mon Sep 17 00:00:00 2001 From: Aitor <1726644+aaitor@users.noreply.github.com> Date: Fri, 20 Oct 2023 09:46:52 +0200 Subject: [PATCH 1/3] chore: changelog --- CHANGELOG.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8d8a86ab..18fef31d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1310,7 +1310,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). > 2 May 2022 -- add aave service agreement to ddo when creating nft721 asset [`#248`](https://github.com/nevermined-io/sdk-js/pull/248) +- add aave service agreement to ddo when creating nft721 asset [`#248`](https://github.com/nevermined-io/sdk-js/pull/248) - Adding v0.19.21 Changelog updates [`c93cdc5`](https://github.com/nevermined-io/sdk-js/commit/c93cdc55f139a43db4130ccb0f80924d2645a931) #### [v0.19.21](https://github.com/nevermined-io/sdk-js/compare/v0.19.20...v0.19.21) @@ -1573,7 +1573,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). > 18 January 2022 -- Removing not used parameter [`#186`](https://github.com/nevermined-io/sdk-js/pull/186) +- Removing not used parameter [`#186`](https://github.com/nevermined-io/sdk-js/pull/186) - [wip] Create agreement+pay in one transaction [`#183`](https://github.com/nevermined-io/sdk-js/pull/183) - Adapting to contracts `v1.3.3` [`#177`](https://github.com/nevermined-io/sdk-js/pull/177) - Adding v0.17.2 Changelog updates [`5eddda4`](https://github.com/nevermined-io/sdk-js/commit/5eddda43954e013e6e6f7344c9a877d801aacb5c) @@ -2079,7 +2079,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - Feature/sync develop [`#268`](https://github.com/nevermined-io/sdk-js/pull/268) - Quick fix for non-eip1559 networks [`#266`](https://github.com/nevermined-io/sdk-js/pull/266) - integrate Permissions and refactor search query [`#264`](https://github.com/nevermined-io/sdk-js/pull/264) -- add aave service agreement to ddo when creating nft721 asset [`#248`](https://github.com/nevermined-io/sdk-js/pull/248) +- add aave service agreement to ddo when creating nft721 asset [`#248`](https://github.com/nevermined-io/sdk-js/pull/248) - Get the keeper version from the artifacts instead of package version [`#244`](https://github.com/nevermined-io/sdk-js/pull/244) - replace `metadata-api` url by `marketplace-api` and sort type [`#243`](https://github.com/nevermined-io/sdk-js/pull/243) - fixing issues with BigNumbers [`#246`](https://github.com/nevermined-io/sdk-js/pull/246) @@ -2118,7 +2118,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - Feature/190 add did to sec markets [`#191`](https://github.com/nevermined-io/sdk-js/pull/191) - Adding utility methods for getting nft token uri [`#189`](https://github.com/nevermined-io/sdk-js/pull/189) - Lint ... [`#187`](https://github.com/nevermined-io/sdk-js/pull/187) -- Removing not used parameter [`#186`](https://github.com/nevermined-io/sdk-js/pull/186) +- Removing not used parameter [`#186`](https://github.com/nevermined-io/sdk-js/pull/186) - [wip] Create agreement+pay in one transaction [`#183`](https://github.com/nevermined-io/sdk-js/pull/183) - Adapting to contracts `v1.3.3` [`#177`](https://github.com/nevermined-io/sdk-js/pull/177) - Correct typo in route [`#184`](https://github.com/nevermined-io/sdk-js/pull/184) From 1e4c8fb77b6343ed9cd3d124279e68d2b4c93b7b Mon Sep 17 00:00:00 2001 From: Aitor <1726644+aaitor@users.noreply.github.com> Date: Fri, 20 Oct 2023 10:32:32 +0200 Subject: [PATCH 2/3] fix: query param missing --- integration/external/Services_NFT1155.e2e.test.ts | 2 ++ package.json | 1 + 2 files changed, 3 insertions(+) diff --git a/integration/external/Services_NFT1155.e2e.test.ts b/integration/external/Services_NFT1155.e2e.test.ts index d73bcb35f..1122aeaf0 100644 --- a/integration/external/Services_NFT1155.e2e.test.ts +++ b/integration/external/Services_NFT1155.e2e.test.ts @@ -537,6 +537,7 @@ describe('Gate-keeping of Web Services using NFT ERC-1155 End-to-End', () => { it('should be able to retrieve services associated with a subscription filtering by endpoints', async () => { const result = await nevermined.search.servicesBySubscription( subscriptionDDO.id, + NeverminedNFT1155Type.nft1155Credit, endpointsFilter, ) assert.equal(result.totalResults.value, 1) @@ -553,6 +554,7 @@ describe('Gate-keeping of Web Services using NFT ERC-1155 End-to-End', () => { it('should not be able to retrieve any services associated with a subscription filtering by endpoints which do not exist', async () => { const result = await nevermined.search.servicesBySubscription( subscriptionDDO.id, + NeverminedNFT1155Type.nft1155Credit, endpointsFilter2, ) assert.equal(result.totalResults.value, 0) diff --git a/package.json b/package.json index cd7679dde..3a728c286 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "integration:e2e:mumbai": "export NETWORK_NAME=mumbai; yarn integration:e2e", "integration:compute": "mocha --config integration/.mocharc.json ./integration/compute/Compute*.test.ts", "integration:external": "mocha --config integration/.mocharc.json ./integration/external/*.test.ts", + "integration:external-services": "mocha --config integration/.mocharc.json integration/external/Services_NFT1155.e2e.test.ts", "clean": "rm -rf ./dist/ ./doc/ ./.nyc_output", "lint": "eslint ./", "lint:fix": "eslint ./ --fix", From 6fd0d44581da652e3c3e26939fe91bfe89ff73d1 Mon Sep 17 00:00:00 2001 From: Aitor <1726644+aaitor@users.noreply.github.com> Date: Mon, 30 Oct 2023 11:16:56 +0100 Subject: [PATCH 3/3] fix: granting role til contracts resolve issue --- integration/external/Services_NFT1155.e2e.test.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/integration/external/Services_NFT1155.e2e.test.ts b/integration/external/Services_NFT1155.e2e.test.ts index 1122aeaf0..03d830ec0 100644 --- a/integration/external/Services_NFT1155.e2e.test.ts +++ b/integration/external/Services_NFT1155.e2e.test.ts @@ -163,6 +163,9 @@ describe('Gate-keeping of Web Services using NFT ERC-1155 End-to-End', () => { console.log(` AUTHORIZATION_PASSWORD=${AUTHORIZATION_PASSWORD}`) } console.log(` REQUEST_DATA=${process.env.REQUEST_DATA}`) + console.log(` NODE_ADDRESS=${neverminedNodeAddress}`) + console.log(` PUBLISHER_ADDRESS=${publisher.getId()}`) + console.log(` SUBSCRIBER_ADDRESS=${subscriber.getId()}`) }) describe('As Subscriber I want to get access to a web service I am not subscribed', () => { @@ -202,6 +205,7 @@ describe('Gate-keeping of Web Services using NFT ERC-1155 End-to-End', () => { await nevermined.contracts.loadNft1155(subscriptionNFT.address) await subscriptionNFT.grantOperatorRole(transferNftCondition.address, publisher) + await subscriptionNFT.grantOperatorRole(neverminedNodeAddress, publisher) const isOperator = await subscriptionNFT.getContract.isOperator(transferNftCondition.address) assert.isTrue(isOperator)