1
0
mirror of https://github.com/oceanprotocol/ocean.js.git synced 2024-11-26 20:39:05 +01:00

Feature/bump contracts to alpha 28 (#1392)

* bump contracts to alpha 28
This commit is contained in:
Alex Coseru 2022-04-04 14:56:41 +03:00 committed by GitHub
parent be25458ffe
commit 005c2d9760
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 81 additions and 33 deletions

View File

@ -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

14
package-lock.json generated
View File

@ -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",

View File

@ -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",

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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 = {

View File

@ -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 = {

View File

@ -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 = {

View File

@ -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 = {

View File

@ -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 = {

View File

@ -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 = {

View File

@ -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)

View File

@ -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)