diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f20185b3..a2ed470a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,7 +59,7 @@ jobs: run: | bash -x start_ocean.sh --no-aquarius --no-elasticsearch --no-provider --no-dashboard 2>&1 > start_ocean.log & env: - CONTRACTS_VERSION: v4_rc1 + CONTRACTS_VERSION: v1.0.0-alpha.28 - run: npm ci - name: Wait for contracts deployment working-directory: ${{ github.workspace }}/barge @@ -118,7 +118,7 @@ jobs: run: | bash -x start_ocean.sh --with-provider2 --no-dashboard --with-c2d 2>&1 > start_ocean.log & env: - CONTRACTS_VERSION: v4_rc1 + CONTRACTS_VERSION: v1.0.0-alpha.28 - run: npm ci - run: npm run build:metadata diff --git a/package-lock.json b/package-lock.json index 2d174700..250b7f9c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0-next.32", "license": "Apache-2.0", "dependencies": { - "@oceanprotocol/contracts": "1.0.0-alpha.27", + "@oceanprotocol/contracts": "^1.0.0-alpha.28", "bignumber.js": "^9.0.2", "cross-fetch": "^3.1.5", "crypto-js": "^4.1.1", @@ -2437,9 +2437,9 @@ } }, "node_modules/@oceanprotocol/contracts": { - "version": "1.0.0-alpha.27", - "resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-1.0.0-alpha.27.tgz", - "integrity": "sha512-j1sktKku5RpVk3W2Vm6ur7xPaBC26DqfZxdXU29O+Dkhe8VhqI1LlXRaaRRXQ3061d3rm/AOroPRRFokuUPIYA==" + "version": "1.0.0-alpha.28", + "resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-1.0.0-alpha.28.tgz", + "integrity": "sha512-M/yyKfpWmMRHWPTjvKlrRWUcIbfkRWyHhjHUI1kPggJPPX6ADxApTwtzwVXJ/+WyegcaYc7bqwuclqvg9XPqBQ==" }, "node_modules/@octokit/auth-token": { "version": "2.5.0", @@ -19124,9 +19124,9 @@ } }, "@oceanprotocol/contracts": { - "version": "1.0.0-alpha.27", - "resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-1.0.0-alpha.27.tgz", - "integrity": "sha512-j1sktKku5RpVk3W2Vm6ur7xPaBC26DqfZxdXU29O+Dkhe8VhqI1LlXRaaRRXQ3061d3rm/AOroPRRFokuUPIYA==" + "version": "1.0.0-alpha.28", + "resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-1.0.0-alpha.28.tgz", + "integrity": "sha512-M/yyKfpWmMRHWPTjvKlrRWUcIbfkRWyHhjHUI1kPggJPPX6ADxApTwtzwVXJ/+WyegcaYc7bqwuclqvg9XPqBQ==" }, "@octokit/auth-token": { "version": "2.5.0", diff --git a/package.json b/package.json index 045e238a..ef78a399 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "web3": "^1.7.1" }, "dependencies": { - "@oceanprotocol/contracts": "1.0.0-alpha.27", + "@oceanprotocol/contracts": "1.0.0-alpha.28", "bignumber.js": "^9.0.2", "cross-fetch": "^3.1.5", "crypto-js": "^4.1.1", diff --git a/src/factories/NFTFactory.ts b/src/factories/NFTFactory.ts index ce3e97da..d01b207e 100644 --- a/src/factories/NFTFactory.ts +++ b/src/factories/NFTFactory.ts @@ -41,6 +41,8 @@ export interface NftCreateData { symbol: string templateIndex: number tokenURI: string + transferable: boolean + owner: string } const addressZERO = '0x0000000000000000000000000000000000000000' @@ -94,7 +96,9 @@ export class NftFactory { nftData.templateIndex, addressZERO, addressZERO, - nftData.tokenURI + nftData.tokenURI, + nftData.transferable, + nftData.owner ) .estimateGas({ from: address }, (err, estGas) => (err ? gasLimitDefault : estGas)) } catch (e) { @@ -137,7 +141,9 @@ export class NftFactory { nftData.templateIndex, addressZERO, addressZERO, - nftData.tokenURI + nftData.tokenURI, + nftData.transferable, + nftData.owner ) .send({ from: address, diff --git a/test/integration/ComputeFlow.test.ts b/test/integration/ComputeFlow.test.ts index d9fb5d0b..e5e0e661 100644 --- a/test/integration/ComputeFlow.test.ts +++ b/test/integration/ComputeFlow.test.ts @@ -136,7 +136,9 @@ describe('Simple compute tests', async () => { name: 'testNFT', symbol: 'TST', templateIndex: 1, - tokenURI: 'aaa' + tokenURI: 'aaa', + transferable: true, + owner: publisherAccount } const erc20ParamsAsset: Erc20CreateParams = { templateIndex: 1, @@ -185,7 +187,9 @@ describe('Simple compute tests', async () => { name: 'testNFT', symbol: 'TST', templateIndex: 1, - tokenURI: '' + tokenURI: '', + transferable: true, + owner: publisherAccount } const erc20ParamsAlgo: Erc20CreateParams = { templateIndex: 1, diff --git a/test/integration/PublishFlows.test.ts b/test/integration/PublishFlows.test.ts index 5b733d1f..62713ec4 100644 --- a/test/integration/PublishFlows.test.ts +++ b/test/integration/PublishFlows.test.ts @@ -96,7 +96,9 @@ describe('Publish tests', async () => { name: 'testNftPool', symbol: 'TSTP', templateIndex: 1, - tokenURI: '' + tokenURI: '', + transferable: true, + owner: accounts[0] } const erc20Params: Erc20CreateParams = { templateIndex: 1, @@ -175,7 +177,9 @@ describe('Publish tests', async () => { name: 'testNftFre', symbol: 'TSTF', templateIndex: 1, - tokenURI: '' + tokenURI: '', + transferable: true, + owner: accounts[0] } const erc20Params: Erc20CreateParams = { templateIndex: 1, @@ -251,7 +255,9 @@ describe('Publish tests', async () => { name: 'testNftDispenser', symbol: 'TSTD', templateIndex: 1, - tokenURI: '' + tokenURI: '', + transferable: true, + owner: accounts[0] } const erc20Params: Erc20CreateParams = { templateIndex: 1, diff --git a/test/integration/SimplePublishConsumeFlow.test.ts b/test/integration/SimplePublishConsumeFlow.test.ts index 51d55323..99b4e87f 100644 --- a/test/integration/SimplePublishConsumeFlow.test.ts +++ b/test/integration/SimplePublishConsumeFlow.test.ts @@ -76,7 +76,9 @@ describe('Simple Publish & consume test', async () => { name: 'testNFT', symbol: 'TST', templateIndex: 1, - tokenURI: '' + tokenURI: '', + transferable: true, + owner: publisherAccount } const erc20Params: Erc20CreateParams = { templateIndex: 1, diff --git a/test/unit/NftFactory.test.ts b/test/unit/NftFactory.test.ts index fbcaabc8..03f361b5 100644 --- a/test/unit/NftFactory.test.ts +++ b/test/unit/NftFactory.test.ts @@ -71,7 +71,9 @@ describe('Nft Factory test', () => { name: '72120Bundle', symbol: '72Bundle', templateIndex: 1, - tokenURI: 'https://oceanprotocol.com/nft/' + tokenURI: 'https://oceanprotocol.com/nft/', + transferable: true, + owner: factoryOwner } const ercParams: Erc20CreateParams = { @@ -107,7 +109,9 @@ describe('Nft Factory test', () => { name: '72120Bundle', symbol: '72Bundle', templateIndex: 1, - tokenURI: 'https://oceanprotocol.com/nft/' + tokenURI: 'https://oceanprotocol.com/nft/', + transferable: true, + owner: factoryOwner } const ercParams: Erc20CreateParams = { @@ -157,7 +161,9 @@ describe('Nft Factory test', () => { name: '72120Bundle', symbol: '72Bundle', templateIndex: 1, - tokenURI: 'https://oceanprotocol.com/nft/' + tokenURI: 'https://oceanprotocol.com/nft/', + transferable: true, + owner: factoryOwner } const ercParams: Erc20CreateParams = { @@ -207,7 +213,9 @@ describe('Nft Factory test', () => { name: '72120Bundle', symbol: '72Bundle', templateIndex: 1, - tokenURI: 'https://oceanprotocol.com/nft/' + tokenURI: 'https://oceanprotocol.com/nft/', + transferable: true, + owner: factoryOwner } const ercParams: Erc20CreateParams = { diff --git a/test/unit/pools/Router.test.ts b/test/unit/pools/Router.test.ts index 66b3e99c..03d10ca1 100644 --- a/test/unit/pools/Router.test.ts +++ b/test/unit/pools/Router.test.ts @@ -95,7 +95,9 @@ describe('Router unit test', () => { name: '72120Bundle', symbol: '72Bundle', templateIndex: 1, - tokenURI: 'https://oceanprotocol.com/nft/' + tokenURI: 'https://oceanprotocol.com/nft/', + transferable: true, + owner: factoryOwner } const ercParams: Erc20CreateParams = { @@ -148,7 +150,9 @@ describe('Router unit test', () => { name: '72120Bundle2', symbol: '72Bundle2', templateIndex: 1, - tokenURI: 'https://oceanprotocol.com/nft2/' + tokenURI: 'https://oceanprotocol.com/nft2/', + transferable: true, + owner: factoryOwner } const ercParams2: Erc20CreateParams = { diff --git a/test/unit/pools/balancer/Pool.test.ts b/test/unit/pools/balancer/Pool.test.ts index 73552f82..11f78373 100644 --- a/test/unit/pools/balancer/Pool.test.ts +++ b/test/unit/pools/balancer/Pool.test.ts @@ -105,7 +105,9 @@ describe('Pool unit test', () => { name: '72120Bundle', symbol: '72Bundle', templateIndex: 1, - tokenURI: 'https://oceanprotocol.com/nft/' + tokenURI: 'https://oceanprotocol.com/nft/', + transferable: true, + owner: factoryOwner } const ercParams: Erc20CreateParams = { @@ -560,7 +562,9 @@ describe('Pool unit test', () => { name: '72120Bundle', symbol: '72Bundle', templateIndex: 1, - tokenURI: 'https://oceanprotocol.com/nft/' + tokenURI: 'https://oceanprotocol.com/nft/', + transferable: true, + owner: factoryOwner } const ercParams: Erc20CreateParams = { diff --git a/test/unit/pools/dispenser/Dispenser.test.ts b/test/unit/pools/dispenser/Dispenser.test.ts index 69f7452d..637d3b35 100644 --- a/test/unit/pools/dispenser/Dispenser.test.ts +++ b/test/unit/pools/dispenser/Dispenser.test.ts @@ -56,7 +56,9 @@ describe('Dispenser flow', () => { name: '72120Bundle', symbol: '72Bundle', templateIndex: 1, - tokenURI: 'https://oceanprotocol.com/nft/' + tokenURI: 'https://oceanprotocol.com/nft/', + transferable: true, + owner: factoryOwner } const ercParams: Erc20CreateParams = { diff --git a/test/unit/pools/fixedRate/FixedRateExchange.test.ts b/test/unit/pools/fixedRate/FixedRateExchange.test.ts index f53f41f1..0d995079 100644 --- a/test/unit/pools/fixedRate/FixedRateExchange.test.ts +++ b/test/unit/pools/fixedRate/FixedRateExchange.test.ts @@ -69,7 +69,9 @@ describe('Fixed Rate unit test', () => { name: '72120Bundle', symbol: '72Bundle', templateIndex: 1, - tokenURI: 'https://oceanprotocol.com/nft/' + tokenURI: 'https://oceanprotocol.com/nft/', + transferable: true, + owner: factoryOwner } const ercParams: Erc20CreateParams = { @@ -387,7 +389,9 @@ describe('Fixed Rate unit test', () => { name: '72120Bundle', symbol: '72Bundle', templateIndex: 1, - tokenURI: 'https://oceanprotocol.com/nft/' + tokenURI: 'https://oceanprotocol.com/nft/', + transferable: true, + owner: factoryOwner } const ercParams: Erc20CreateParams = { diff --git a/test/unit/pools/ssContracts/SideStaking.test.ts b/test/unit/pools/ssContracts/SideStaking.test.ts index ea053213..da626a4d 100644 --- a/test/unit/pools/ssContracts/SideStaking.test.ts +++ b/test/unit/pools/ssContracts/SideStaking.test.ts @@ -119,7 +119,9 @@ describe('SideStaking unit test', () => { name: '72120Bundle', symbol: '72Bundle', templateIndex: 1, - tokenURI: 'https://oceanprotocol.com/nft/' + tokenURI: 'https://oceanprotocol.com/nft/', + transferable: true, + owner: factoryOwner } const ercParams: Erc20CreateParams = { @@ -360,7 +362,9 @@ describe('SideStaking unit test', () => { name: '72120Bundle', symbol: '72Bundle', templateIndex: 1, - tokenURI: 'https://oceanprotocol.com/nft/' + tokenURI: 'https://oceanprotocol.com/nft/', + transferable: true, + owner: factoryOwner } const ercParams: Erc20CreateParams = { diff --git a/test/unit/tokens/Datatoken.test.ts b/test/unit/tokens/Datatoken.test.ts index 405340a2..713effd1 100644 --- a/test/unit/tokens/Datatoken.test.ts +++ b/test/unit/tokens/Datatoken.test.ts @@ -66,7 +66,9 @@ describe('Datatoken', () => { name: nftName, symbol: nftSymbol, templateIndex: 1, - tokenURI: 'https://oceanprotocol.com/nft/' + tokenURI: 'https://oceanprotocol.com/nft/', + transferable: true, + owner: nftOwner } nftAddress = await nftFactory.createNFT(nftOwner, nftData) diff --git a/test/unit/tokens/Nft.test.ts b/test/unit/tokens/Nft.test.ts index aa92082d..acd812be 100644 --- a/test/unit/tokens/Nft.test.ts +++ b/test/unit/tokens/Nft.test.ts @@ -45,7 +45,9 @@ describe('NFT', () => { name: nftName, symbol: nftSymbol, templateIndex: 1, - tokenURI: 'https://oceanprotocol.com/nft/' + tokenURI: 'https://oceanprotocol.com/nft/', + transferable: true, + owner: nftOwner } nftAddress = await nftFactory.createNFT(nftOwner, nftData)