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

Merge branch 'main' into issue-1820-fix-compute-status

This commit is contained in:
paulo-ocean 2024-06-25 16:46:26 +01:00
commit 7448a1246c
3 changed files with 81 additions and 47 deletions

View File

@ -4,8 +4,19 @@ All notable changes to this project will be documented in this file. Dates are d
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
#### [v3.3.2](https://github.com/oceanprotocol/ocean.js/compare/v3.3.1...v3.3.2)
- Split coupled tests to fix timeout issues [`#1827`](https://github.com/oceanprotocol/ocean.js/pull/1827)
- Bump braces from 3.0.2 to 3.0.3 [`#1819`](https://github.com/oceanprotocol/ocean.js/pull/1819)
- Bump chai-spies and @types/chai-spies [`#1816`](https://github.com/oceanprotocol/ocean.js/pull/1816)
- Pontus x devnet config [`#1806`](https://github.com/oceanprotocol/ocean.js/pull/1806)
- Update CODEOWNERS [`#1824`](https://github.com/oceanprotocol/ocean.js/pull/1824)
- Sanitize service endpoint by adding/reving slash when needed. [`#1821`](https://github.com/oceanprotocol/ocean.js/pull/1821)
#### [v3.3.1](https://github.com/oceanprotocol/ocean.js/compare/v3.3.0...v3.3.1) #### [v3.3.1](https://github.com/oceanprotocol/ocean.js/compare/v3.3.0...v3.3.1)
> 9 May 2024
- Bump express from 4.18.2 to 4.19.2 [`#1813`](https://github.com/oceanprotocol/ocean.js/pull/1813) - Bump express from 4.18.2 to 4.19.2 [`#1813`](https://github.com/oceanprotocol/ocean.js/pull/1813)
- Bump typescript from 5.1.6 to 5.4.5 [`#1810`](https://github.com/oceanprotocol/ocean.js/pull/1810) - Bump typescript from 5.1.6 to 5.4.5 [`#1810`](https://github.com/oceanprotocol/ocean.js/pull/1810)
- Bump ejs from 3.1.7 to 3.1.10 [`#1812`](https://github.com/oceanprotocol/ocean.js/pull/1812) - Bump ejs from 3.1.7 to 3.1.10 [`#1812`](https://github.com/oceanprotocol/ocean.js/pull/1812)
@ -15,6 +26,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- Bump es5-ext from 0.10.62 to 0.10.64 [`#1805`](https://github.com/oceanprotocol/ocean.js/pull/1805) - Bump es5-ext from 0.10.62 to 0.10.64 [`#1805`](https://github.com/oceanprotocol/ocean.js/pull/1805)
- Multiple fixes [`#1785`](https://github.com/oceanprotocol/ocean.js/pull/1785) - Multiple fixes [`#1785`](https://github.com/oceanprotocol/ocean.js/pull/1785)
- Update ConfigHelper.ts [`#1807`](https://github.com/oceanprotocol/ocean.js/pull/1807) - Update ConfigHelper.ts [`#1807`](https://github.com/oceanprotocol/ocean.js/pull/1807)
- Release 3.3.1 [`1f4e433`](https://github.com/oceanprotocol/ocean.js/commit/1f4e4336dd64d8950a2b314a9de526b40fbe63f5)
#### [v3.3.0](https://github.com/oceanprotocol/ocean.js/compare/v3.2.3...v3.3.0) #### [v3.3.0](https://github.com/oceanprotocol/ocean.js/compare/v3.2.3...v3.3.0)

28
package-lock.json generated
View File

@ -4766,12 +4766,12 @@
} }
}, },
"node_modules/braces": { "node_modules/braces": {
"version": "3.0.2", "version": "3.0.3",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"fill-range": "^7.0.1" "fill-range": "^7.1.1"
}, },
"engines": { "engines": {
"node": ">=8" "node": ">=8"
@ -8401,9 +8401,9 @@
} }
}, },
"node_modules/fill-range": { "node_modules/fill-range": {
"version": "7.0.1", "version": "7.1.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"to-regex-range": "^5.0.1" "to-regex-range": "^5.0.1"
@ -21092,12 +21092,12 @@
} }
}, },
"braces": { "braces": {
"version": "3.0.2", "version": "3.0.3",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
"dev": true, "dev": true,
"requires": { "requires": {
"fill-range": "^7.0.1" "fill-range": "^7.1.1"
} }
}, },
"brorand": { "brorand": {
@ -23931,9 +23931,9 @@
"dev": true "dev": true
}, },
"fill-range": { "fill-range": {
"version": "7.0.1", "version": "7.1.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
"dev": true, "dev": true,
"requires": { "requires": {
"to-regex-range": "^5.0.1" "to-regex-range": "^5.0.1"

View File

@ -197,7 +197,7 @@ describe('Publish consume test', async () => {
) )
}) })
it('Should publish the assets', async () => { it('Should publish url asset', async () => {
urlAssetId = await createAsset( urlAssetId = await createAsset(
'UrlDatatoken', 'UrlDatatoken',
'URLDT', 'URLDT',
@ -209,19 +209,9 @@ describe('Publish consume test', async () => {
aquarius aquarius
) )
assert(urlAssetId, 'Failed to publish url DDO') assert(urlAssetId, 'Failed to publish url DDO')
})
arweaveAssetId = await createAsset( it('Should publish ipfs asset', async () => {
'ArwaveDatatoken',
'ARWAVEDT',
publisherAccount,
arweaveFile,
assetDdo,
providerUrl,
addresses.ERC721Factory,
aquarius
)
assert(urlAssetId, 'Failed to arwave publish DDO')
ipfsAssetId = await createAsset( ipfsAssetId = await createAsset(
'IpfsDatatoken', 'IpfsDatatoken',
'IPFSDT', 'IPFSDT',
@ -233,7 +223,23 @@ describe('Publish consume test', async () => {
aquarius aquarius
) )
assert(urlAssetId, 'Failed to publish ipfs DDO') assert(urlAssetId, 'Failed to publish ipfs DDO')
})
it('Should publish arwave asset', async () => {
arweaveAssetId = await createAsset(
'ArweaveDatatoken',
'ARWEAVEDT',
publisherAccount,
arweaveFile,
assetDdo,
providerUrl,
addresses.ERC721Factory,
aquarius
)
assert(arweaveAssetId, 'Failed to publish ipfs DDO')
})
it('Should publish onchain asset', async () => {
const chainFile: Smartcontract = { const chainFile: Smartcontract = {
type: 'smartcontract', type: 'smartcontract',
address: addresses.Router, address: addresses.Router,
@ -246,11 +252,10 @@ describe('Publish consume test', async () => {
}, },
chainId: 8996 chainId: 8996
} }
onchainFile.files[0] = chainFile onchainFile.files[0] = chainFile
onchainAssetId = await createAsset( onchainAssetId = await createAsset(
'IpfsDatatoken', 'ChainDatatoken',
'IPFSDT', 'CHAINDT',
publisherAccount, publisherAccount,
onchainFile, onchainFile,
assetDdo, assetDdo,
@ -259,10 +264,12 @@ describe('Publish consume test', async () => {
aquarius aquarius
) )
assert(onchainAssetId, 'Failed to publish onchain DDO') assert(onchainAssetId, 'Failed to publish onchain DDO')
})
it('Should publish graphql asset', async () => {
grapqlAssetId = await createAsset( grapqlAssetId = await createAsset(
'IpfsDatatoken', 'GraphDatatoken',
'IPFSDT', 'GRAPHDT',
publisherAccount, publisherAccount,
grapqlFile, grapqlFile,
assetDdo, assetDdo,
@ -335,9 +342,8 @@ describe('Publish consume test', async () => {
assert(graphqlMintTx, 'Failed minting graphql datatoken to consumer.') assert(graphqlMintTx, 'Failed minting graphql datatoken to consumer.')
}) })
it('Should order the datasets', async () => { it('Should order url dataset', async () => {
datatoken = new Datatoken(consumerAccount, config.chainId) datatoken = new Datatoken(consumerAccount, config.chainId)
urlOrderTx = await orderAsset( urlOrderTx = await orderAsset(
resolvedUrlAssetDdo.id, resolvedUrlAssetDdo.id,
resolvedUrlAssetDdo.services[0].datatokenAddress, resolvedUrlAssetDdo.services[0].datatokenAddress,
@ -348,7 +354,9 @@ describe('Publish consume test', async () => {
providerUrl providerUrl
) )
assert(urlOrderTx, 'Ordering url dataset failed.') assert(urlOrderTx, 'Ordering url dataset failed.')
}).timeout(40000)
it('Should order arweave dataset', async () => {
arwaveOrderTx = await orderAsset( arwaveOrderTx = await orderAsset(
resolvedArweaveAssetDdo.id, resolvedArweaveAssetDdo.id,
resolvedArweaveAssetDdo.services[0].datatokenAddress, resolvedArweaveAssetDdo.services[0].datatokenAddress,
@ -359,18 +367,9 @@ describe('Publish consume test', async () => {
providerUrl providerUrl
) )
assert(arwaveOrderTx, 'Ordering arwave dataset failed.') assert(arwaveOrderTx, 'Ordering arwave dataset failed.')
}).timeout(40000)
onchainOrderTx = await orderAsset( it('Should order ipfs dataset', async () => {
resolvedOnchainAssetDdo.id,
resolvedOnchainAssetDdo.services[0].datatokenAddress,
await consumerAccount.getAddress(),
resolvedOnchainAssetDdo.services[0].id,
0,
datatoken,
providerUrl
)
assert(onchainOrderTx, 'Ordering onchain dataset failed.')
ipfsOrderTx = await orderAsset( ipfsOrderTx = await orderAsset(
resolvedIpfsAssetDdo.id, resolvedIpfsAssetDdo.id,
resolvedIpfsAssetDdo.services[0].datatokenAddress, resolvedIpfsAssetDdo.services[0].datatokenAddress,
@ -381,7 +380,22 @@ describe('Publish consume test', async () => {
providerUrl providerUrl
) )
assert(ipfsOrderTx, 'Ordering ipfs dataset failed.') assert(ipfsOrderTx, 'Ordering ipfs dataset failed.')
}).timeout(40000)
it('Should order onchain dataset', async () => {
onchainOrderTx = await orderAsset(
resolvedOnchainAssetDdo.id,
resolvedOnchainAssetDdo.services[0].datatokenAddress,
await consumerAccount.getAddress(),
resolvedOnchainAssetDdo.services[0].id,
0,
datatoken,
providerUrl
)
assert(onchainOrderTx, 'Ordering onchain dataset failed.')
}).timeout(40000)
it('Should order graphQl dataset', async () => {
grapqlOrderTx = await orderAsset( grapqlOrderTx = await orderAsset(
resolvedGraphqlAssetDdo.id, resolvedGraphqlAssetDdo.id,
resolvedGraphqlAssetDdo.services[0].datatokenAddress, resolvedGraphqlAssetDdo.services[0].datatokenAddress,
@ -392,7 +406,7 @@ describe('Publish consume test', async () => {
providerUrl providerUrl
) )
assert(grapqlOrderTx, 'Ordering graphql dataset failed.') assert(grapqlOrderTx, 'Ordering graphql dataset failed.')
}).timeout(40000) })
it('Should download the datasets files', async () => { it('Should download the datasets files', async () => {
const urlDownloadUrl = await ProviderInstance.getDownloadUrl( const urlDownloadUrl = await ProviderInstance.getDownloadUrl(
@ -467,7 +481,7 @@ describe('Publish consume test', async () => {
} }
}) })
it('Should update datasets metadata', async () => { it('Should update url dataset', async () => {
resolvedUrlAssetDdo.metadata.name = 'updated url asset name' resolvedUrlAssetDdo.metadata.name = 'updated url asset name'
const updateUrlTx = await updateAssetMetadata( const updateUrlTx = await updateAssetMetadata(
publisherAccount, publisherAccount,
@ -476,7 +490,9 @@ describe('Publish consume test', async () => {
aquarius aquarius
) )
assert(updateUrlTx, 'Failed to update url asset metadata') assert(updateUrlTx, 'Failed to update url asset metadata')
})
it('Should update arweave dataset', async () => {
resolvedArweaveAssetDdo.metadata.name = 'updated arwave asset name' resolvedArweaveAssetDdo.metadata.name = 'updated arwave asset name'
const updateArwaveTx = await updateAssetMetadata( const updateArwaveTx = await updateAssetMetadata(
publisherAccount, publisherAccount,
@ -485,7 +501,9 @@ describe('Publish consume test', async () => {
aquarius aquarius
) )
assert(updateArwaveTx, 'Failed to update arwave asset metadata') assert(updateArwaveTx, 'Failed to update arwave asset metadata')
})
it('Should update ipfs dataset', async () => {
resolvedIpfsAssetDdo.metadata.name = 'updated ipfs asset name' resolvedIpfsAssetDdo.metadata.name = 'updated ipfs asset name'
const updateIpfsTx = await updateAssetMetadata( const updateIpfsTx = await updateAssetMetadata(
publisherAccount, publisherAccount,
@ -494,7 +512,9 @@ describe('Publish consume test', async () => {
aquarius aquarius
) )
assert(updateIpfsTx, 'Failed to update ipfs asset metadata') assert(updateIpfsTx, 'Failed to update ipfs asset metadata')
})
it('Should update onchain dataset', async () => {
resolvedOnchainAssetDdo.metadata.name = 'updated onchain asset name' resolvedOnchainAssetDdo.metadata.name = 'updated onchain asset name'
const updateOnchainTx = await updateAssetMetadata( const updateOnchainTx = await updateAssetMetadata(
publisherAccount, publisherAccount,
@ -503,7 +523,9 @@ describe('Publish consume test', async () => {
aquarius aquarius
) )
assert(updateOnchainTx, 'Failed to update ipfs asset metadata') assert(updateOnchainTx, 'Failed to update ipfs asset metadata')
})
it('Should update graphql dataset', async () => {
resolvedGraphqlAssetDdo.metadata.name = 'updated graphql asset name' resolvedGraphqlAssetDdo.metadata.name = 'updated graphql asset name'
const updateGraphqlTx = await updateAssetMetadata( const updateGraphqlTx = await updateAssetMetadata(
publisherAccount, publisherAccount,