mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
refactor: remove C2D (#2037)
* refactor: remove C2D * fix: build * fix: tests * fix: get only datasets from aquarius * fix: test * fix: test * fix: text * fix: test * chore: regenerate package-lock * fix: fitler search params * fix: textarea, select class issues * fix: test * chore: remove comment * chore: remove comments * Feat/remove ve (#2038) * feat: remove ve allocations * feat: remove allocated veOcean * feat: update depedencies (#2045) * feat: update depedencies * feat: update more depedencies * fix: input field style * remove total allocation from search * filter fixes * fix test --------- Co-authored-by: mihai <mihai.scarlat@smartcontrol.ro>
This commit is contained in:
parent
d2c3b4b235
commit
96451b444a
@ -1,86 +1,86 @@
|
||||
// This is a dump of a typical `queryResult.results` response from Aquarius
|
||||
|
||||
export const assets: AssetExtended[] = [
|
||||
{
|
||||
'@context': ['https://w3id.org/did/v1'],
|
||||
chainId: 5,
|
||||
credentials: {
|
||||
allow: [],
|
||||
deny: []
|
||||
},
|
||||
datatokens: [
|
||||
{
|
||||
address: '0x8f90ABA587aBE691E136D7d1a64762A2FF15bE4D',
|
||||
name: 'DATASET_DT1',
|
||||
serviceId: '2',
|
||||
symbol: 'DATASET_DT1'
|
||||
}
|
||||
],
|
||||
event: {
|
||||
block: 7745556,
|
||||
contract: '0xE07B0a3403fAD9568cd970C04C3D08A9c1Ab93d0',
|
||||
datetime: '2022-10-10T14:31:24',
|
||||
from: '0xe2DD09d719Da89e5a3D0F2549c7E24566e947260',
|
||||
tx: '0x6a0d161cffc090fb18e5fc945290052c0d475e6e4115462da115a7bbcb6202b8'
|
||||
},
|
||||
id: 'did:op:48406caf76d092e08af6703dde5bbab79ed7528939d8bbe733134284faf39075',
|
||||
metadata: {
|
||||
author: 'Trent',
|
||||
created: '2022-09-19T10:55:11Z',
|
||||
description: 'Branin dataset',
|
||||
license: 'CC0: PublicDomain',
|
||||
name: 'Branin dataset',
|
||||
type: 'dataset',
|
||||
updated: '2022-09-19T10:55:11Z'
|
||||
},
|
||||
nft: {
|
||||
address: '0xE07B0a3403fAD9568cd970C04C3D08A9c1Ab93d0',
|
||||
created: '2022-10-10T14:31:24',
|
||||
name: 'DATASET_DN1',
|
||||
owner: '0xe2DD09d719Da89e5a3D0F2549c7E24566e947260',
|
||||
state: 0,
|
||||
symbol: 'DATASET_DN1',
|
||||
tokenURI: 'https://oceanprotocol.com/nft/'
|
||||
},
|
||||
nftAddress: '0xE07B0a3403fAD9568cd970C04C3D08A9c1Ab93d0',
|
||||
purgatory: {
|
||||
state: false,
|
||||
reason: ''
|
||||
},
|
||||
services: [
|
||||
{
|
||||
compute: {
|
||||
allowNetworkAccess: true,
|
||||
allowRawAlgorithm: false,
|
||||
publisherTrustedAlgorithmPublishers: [],
|
||||
publisherTrustedAlgorithms: []
|
||||
},
|
||||
datatokenAddress: '0x8f90ABA587aBE691E136D7d1a64762A2FF15bE4D',
|
||||
description: 'Compute service',
|
||||
files:
|
||||
'0x0405a4c9efd6ed507c40387ffebe4093c901e003f1c6ec57c8a4d2b1c28382743bd2097dfc551ba8972992f9b45ea2046d7d53312d97f92dc7c49dec2769e4d8948f7a2b6df437c93229aa4dea7a636af1aec00dcfc8693040f645880e01a428f3ce7e267eaa49dbefce4de47adcab4abc92f062e0ea19ceff2664071710e42f293aaa96d4c0ff1cccb13cdbaa206a705344954ccf1967e58a3586b4953a1e616df86b565bc837fac2f5aa865617a108c737d9be14b19f98fa6204c8c06f284f52cdf4151b987cfa463350fd8f99019a610cd61fa7463b0e77ba93bd42239b999b86eef475a6c97e295a8e0332a843ad4be9254078d70d6c6e4a11f28bc7e61f5a44f9c68d2268b5b8e4f3908c57a41b0ab6ea78163e0b14076f59212a6b37b43811f20a3afc84c67acaa6d1075b06a6cba9f3d778badab3e97b7b21907ee718374819a68c5b8768fc70dd9194c8f309a48bea17178902532273',
|
||||
id: '2',
|
||||
name: 'Compute service',
|
||||
serviceEndpoint: 'https://v4.provider.goerli.oceanprotocol.com',
|
||||
timeout: 2592000,
|
||||
type: 'compute'
|
||||
}
|
||||
],
|
||||
stats: {
|
||||
allocated: 0,
|
||||
orders: 0,
|
||||
price: {
|
||||
value: 3231343254,
|
||||
tokenAddress: '0xCfDdA22C9837aE76E0faA845354f33C62E03653a',
|
||||
tokenSymbol: 'OCEAN'
|
||||
}
|
||||
},
|
||||
version: '4.1.0',
|
||||
accessDetails: {
|
||||
templateId: 1,
|
||||
type: 'NOT_SUPPORTED'
|
||||
} as any
|
||||
},
|
||||
// {
|
||||
// '@context': ['https://w3id.org/did/v1'],
|
||||
// chainId: 5,
|
||||
// credentials: {
|
||||
// allow: [],
|
||||
// deny: []
|
||||
// },
|
||||
// datatokens: [
|
||||
// {
|
||||
// address: '0x8f90ABA587aBE691E136D7d1a64762A2FF15bE4D',
|
||||
// name: 'DATASET_DT1',
|
||||
// serviceId: '2',
|
||||
// symbol: 'DATASET_DT1'
|
||||
// }
|
||||
// ],
|
||||
// event: {
|
||||
// block: 7745556,
|
||||
// contract: '0xE07B0a3403fAD9568cd970C04C3D08A9c1Ab93d0',
|
||||
// datetime: '2022-10-10T14:31:24',
|
||||
// from: '0xe2DD09d719Da89e5a3D0F2549c7E24566e947260',
|
||||
// tx: '0x6a0d161cffc090fb18e5fc945290052c0d475e6e4115462da115a7bbcb6202b8'
|
||||
// },
|
||||
// id: 'did:op:48406caf76d092e08af6703dde5bbab79ed7528939d8bbe733134284faf39075',
|
||||
// metadata: {
|
||||
// author: 'Trent',
|
||||
// created: '2022-09-19T10:55:11Z',
|
||||
// description: 'Branin dataset',
|
||||
// license: 'CC0: PublicDomain',
|
||||
// name: 'Branin dataset',
|
||||
// type: 'dataset',
|
||||
// updated: '2022-09-19T10:55:11Z'
|
||||
// },
|
||||
// nft: {
|
||||
// address: '0xE07B0a3403fAD9568cd970C04C3D08A9c1Ab93d0',
|
||||
// created: '2022-10-10T14:31:24',
|
||||
// name: 'DATASET_DN1',
|
||||
// owner: '0xe2DD09d719Da89e5a3D0F2549c7E24566e947260',
|
||||
// state: 0,
|
||||
// symbol: 'DATASET_DN1',
|
||||
// tokenURI: 'https://oceanprotocol.com/nft/'
|
||||
// },
|
||||
// nftAddress: '0xE07B0a3403fAD9568cd970C04C3D08A9c1Ab93d0',
|
||||
// purgatory: {
|
||||
// state: false,
|
||||
// reason: ''
|
||||
// },
|
||||
// services: [
|
||||
// {
|
||||
// compute: {
|
||||
// allowNetworkAccess: true,
|
||||
// allowRawAlgorithm: false,
|
||||
// publisherTrustedAlgorithmPublishers: [],
|
||||
// publisherTrustedAlgorithms: []
|
||||
// },
|
||||
// datatokenAddress: '0x8f90ABA587aBE691E136D7d1a64762A2FF15bE4D',
|
||||
// description: 'Compute service',
|
||||
// files:
|
||||
// '0x0405a4c9efd6ed507c40387ffebe4093c901e003f1c6ec57c8a4d2b1c28382743bd2097dfc551ba8972992f9b45ea2046d7d53312d97f92dc7c49dec2769e4d8948f7a2b6df437c93229aa4dea7a636af1aec00dcfc8693040f645880e01a428f3ce7e267eaa49dbefce4de47adcab4abc92f062e0ea19ceff2664071710e42f293aaa96d4c0ff1cccb13cdbaa206a705344954ccf1967e58a3586b4953a1e616df86b565bc837fac2f5aa865617a108c737d9be14b19f98fa6204c8c06f284f52cdf4151b987cfa463350fd8f99019a610cd61fa7463b0e77ba93bd42239b999b86eef475a6c97e295a8e0332a843ad4be9254078d70d6c6e4a11f28bc7e61f5a44f9c68d2268b5b8e4f3908c57a41b0ab6ea78163e0b14076f59212a6b37b43811f20a3afc84c67acaa6d1075b06a6cba9f3d778badab3e97b7b21907ee718374819a68c5b8768fc70dd9194c8f309a48bea17178902532273',
|
||||
// id: '2',
|
||||
// name: 'Compute service',
|
||||
// serviceEndpoint: 'https://v4.provider.goerli.oceanprotocol.com',
|
||||
// timeout: 2592000,
|
||||
// type: 'compute'
|
||||
// }
|
||||
// ],
|
||||
// stats: {
|
||||
// allocated: 0,
|
||||
// orders: 0,
|
||||
// price: {
|
||||
// value: 3231343254,
|
||||
// tokenAddress: '0xCfDdA22C9837aE76E0faA845354f33C62E03653a',
|
||||
// tokenSymbol: 'OCEAN'
|
||||
// }
|
||||
// },
|
||||
// version: '4.1.0',
|
||||
// accessDetails: {
|
||||
// templateId: 1,
|
||||
// type: 'NOT_SUPPORTED'
|
||||
// } as any
|
||||
// },
|
||||
{
|
||||
'@context': ['https://w3id.org/did/v1'],
|
||||
chainId: 137,
|
||||
@ -474,224 +474,224 @@ export const assets: AssetExtended[] = [
|
||||
validOrderTx: null
|
||||
}
|
||||
},
|
||||
{
|
||||
'@context': ['https://w3id.org/did/v1'],
|
||||
accessDetails: {
|
||||
templateId: 1,
|
||||
publisherMarketOrderFee: '0',
|
||||
type: 'fixed',
|
||||
addressOrId:
|
||||
'0xb9060a712a494f584b072b0753dc275e1c531178510679ac085053ee38b5f742',
|
||||
price: '5',
|
||||
isPurchasable: true,
|
||||
baseToken: {
|
||||
address: '0xcfdda22c9837ae76e0faa845354f33c62e03653a',
|
||||
name: 'Ocean Token',
|
||||
symbol: 'OCEAN',
|
||||
decimals: 18
|
||||
},
|
||||
datatoken: {
|
||||
address: '0x0a9cfaff200efb1d6f125e342dfc78fb3edd28a4',
|
||||
name: 'Inspired Ling Token',
|
||||
symbol: 'INSLIN-54'
|
||||
},
|
||||
isOwned: false,
|
||||
validOrderTx: null
|
||||
},
|
||||
chainId: 5,
|
||||
datatokens: [
|
||||
{
|
||||
address: '0x0A9CFaFf200efb1d6F125E342Dfc78Fb3edD28A4',
|
||||
name: 'Inspired Ling Token',
|
||||
serviceId:
|
||||
'383b0e1b8dc3e816af394bfae899eb0c9826f2383602c0fbcd70705e1e9c1302',
|
||||
symbol: 'INSLIN-54'
|
||||
}
|
||||
],
|
||||
event: {
|
||||
block: 7723888,
|
||||
contract: '0xeB7eC160ce8F73bE2e7d542c2283F1aEa163C07B',
|
||||
datetime: '2022-10-06T20:31:36',
|
||||
from: '0x7E0ad0B2CD0560Caf9a4Fc25904d2AB7238d140b',
|
||||
tx: '0x18b1d0af634fab3196921a99618fd9333c4a2113a016bf4757d609ddfdb64432'
|
||||
},
|
||||
id: 'did:op:6b4314bd7345d07a10ba2c82a352655273b00cdceb2eedd31c8e0d2b5881eb16',
|
||||
metadata: {
|
||||
additionalInformation: {
|
||||
termsAndConditions: true
|
||||
},
|
||||
author:
|
||||
'Haxby, J. V., Gobbini, M. I., Furey, M. L., Ishai, A., Schouten, J. L. & Pietrini, P. ',
|
||||
created: '2022-10-06T20:30:01Z',
|
||||
description:
|
||||
'This is a block-design fMRI dataset from a study on face and object representation in human ventral temporal cortex. It consists of 6 subjects with 12 runs per subject. In each run, the subjects passively viewed greyscale images of eight object categories, grouped in 24s blocks separated by rest periods. Each image was shown for 500ms and was followed by a 1500ms inter-stimulus interval. Full-brain fMRI data were recorded with a volume repetition time of 2.5s, thus, a stimulus block was covered by roughly 9 volumes. This dataset has been repeatedly reanalyzed. For a complete description of the experimental design, fMRI acquisition parameters, and previously obtained results see the [references](http://www.pymvpa.org/datadb/haxby2001.html#references) below. \n\n',
|
||||
license: 'https://market.oceanprotocol.com/terms',
|
||||
name: 'Faces and Objects in Ventral Temporal Cortex (fMRI) (Compute) ',
|
||||
tags: ['fmri', 'bold', 'visual-stimuli', '4d', 'functional'],
|
||||
type: 'dataset',
|
||||
updated: '2022-10-06T20:30:01Z'
|
||||
},
|
||||
nft: {
|
||||
address: '0xeB7eC160ce8F73bE2e7d542c2283F1aEa163C07B',
|
||||
created: '2022-10-06T20:30:36',
|
||||
name: 'Ocean Data NFT',
|
||||
owner: '0x7E0ad0B2CD0560Caf9a4Fc25904d2AB7238d140b',
|
||||
state: 0,
|
||||
symbol: 'OCEAN-NFT',
|
||||
tokenURI:
|
||||
'data:application/json;base64,eyJuYW1lIjoiT2NlYW4gRGF0YSBORlQiLCJzeW1ib2wiOiJPQ0VBTi1ORlQiLCJkZXNjcmlwdGlvbiI6IlRoaXMgTkZUIHJlcHJlc2VudHMgYW4gYXNzZXQgaW4gdGhlIE9jZWFuIFByb3RvY29sIHY0IGVjb3N5c3RlbS5cblxuVmlldyBvbiBOZXVyYURBTyBNYXJrZXRwbGFjZTogaHR0cHM6Ly9tYXJrZXQub2NlYW5wcm90b2NvbC5jb20vYXNzZXQvZGlkOm9wOjZiNDMxNGJkNzM0NWQwN2ExMGJhMmM4MmEzNTI2NTUyNzNiMDBjZGNlYjJlZWRkMzFjOGUwZDJiNTg4MWViMTYiLCJleHRlcm5hbF91cmwiOiJodHRwczovL21hcmtldC5vY2VhbnByb3RvY29sLmNvbS9hc3NldC9kaWQ6b3A6NmI0MzE0YmQ3MzQ1ZDA3YTEwYmEyYzgyYTM1MjY1NTI3M2IwMGNkY2ViMmVlZGQzMWM4ZTBkMmI1ODgxZWIxNiIsImJhY2tncm91bmRfY29sb3IiOiIxNDE0MTQiLCJpbWFnZV9kYXRhIjoiZGF0YTppbWFnZS9zdmcreG1sLCUzQ3N2ZyB2aWV3Qm94PScwIDAgOTkgOTknIGZpbGw9J3VuZGVmaW5lZCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyUzRSUzQ3BhdGggZmlsbD0nJTIzZmY0MDkyNzcnIGQ9J00wLDk5TDAsMjVDMTIsMjYgMjQsMjcgMzUsMjhDNDUsMjggNTIsMjggNjMsMjhDNzMsMjcgODYsMjYgOTksMjVMOTksOTlaJy8lM0UlM0NwYXRoIGZpbGw9JyUyM2ZmNDA5MmJiJyBkPSdNMCw5OUwwLDQ4QzExLDQ3IDIzLDQ2IDM0LDQ3QzQ0LDQ3IDU1LDQ4IDY2LDQ5Qzc2LDQ5IDg3LDQ5IDk5LDQ5TDk5LDk5WiclM0UlM0MvcGF0aCUzRSUzQ3BhdGggZmlsbD0nJTIzZmY0MDkyZmYnIGQ9J00wLDk5TDAsODBDOCw3NCAxNyw2OCAyOCw3MEMzOCw3MSA1MSw3OSA2NCw4MEM3Niw4MCA4Nyw3NCA5OSw2OUw5OSw5OVonJTNFJTNDL3BhdGglM0UlM0Mvc3ZnJTNFIn0='
|
||||
},
|
||||
nftAddress: '0xeB7eC160ce8F73bE2e7d542c2283F1aEa163C07B',
|
||||
purgatory: {
|
||||
state: false,
|
||||
reason: ''
|
||||
},
|
||||
services: [
|
||||
{
|
||||
compute: {
|
||||
allowNetworkAccess: true,
|
||||
allowRawAlgorithm: false,
|
||||
publisherTrustedAlgorithmPublishers: [],
|
||||
publisherTrustedAlgorithms: [
|
||||
{
|
||||
containerSectionChecksum:
|
||||
'54eb02210bad8a5fbe229e1d131a68e80fe32709a196c6ce49f33e5d378b1195',
|
||||
did: 'did:op:f86dedf3c872f79f788627025685a680eaac9f8bd7b6e622164fd8563e21e836',
|
||||
filesChecksum:
|
||||
'2f8afee0a35fbeb72a447c7d1437b6c83f937e6d65a6c7d1990548cc21ff254c'
|
||||
}
|
||||
]
|
||||
},
|
||||
datatokenAddress: '0x0A9CFaFf200efb1d6F125E342Dfc78Fb3edD28A4',
|
||||
files:
|
||||
'0x0479c75f624d86700c6b33deb392b2d60bd66a5bd92778851eb124bf3785f270b356ce42a228f5a5eb4dead55fc7892a3f4a9f114dfa5493f480146af72ccdcca5816996b0ff002a69e113509256494d64ad39b86be92c7668baa5060c98f402f60fcf7acd0d25e923cecaa5f483fd14a8568a782023b164f8424a95b43c165e813fd031c7b5887ac467af76d94d2ca8b45e34951694cc60ead2c15137eebc60703b9a12a4a4643ecd343de8d0326abb87e093abacf55ba83c06b2840284e8f17d9c498f02dcfd74239371c25ad0fcac703be994065b7ffa12f3a47ba3d363d31f475e6519e7cc5a65e74cafdf029a1d73a007e886206f4b4e36251721866f399076dd2435c314cdfdc42638a570fe57bb33f2935861c01ec708f80acd738d2a45dd64d374278dc63026ac7f4f8dba979e7cdc4e24e5f39aef4550b1cbf190525bdfa0e30900084aef223863e54bd0866ab958',
|
||||
id: '383b0e1b8dc3e816af394bfae899eb0c9826f2383602c0fbcd70705e1e9c1302',
|
||||
serviceEndpoint: 'https://v4.provider.goerli.oceanprotocol.com',
|
||||
timeout: 86400,
|
||||
type: 'compute'
|
||||
}
|
||||
],
|
||||
stats: {
|
||||
allocated: 0,
|
||||
orders: 1,
|
||||
price: {
|
||||
value: 3231343254,
|
||||
tokenAddress: '0xCfDdA22C9837aE76E0faA845354f33C62E03653a',
|
||||
tokenSymbol: 'OCEAN'
|
||||
}
|
||||
},
|
||||
version: '4.1.0'
|
||||
},
|
||||
{
|
||||
'@context': ['https://w3id.org/did/v1'],
|
||||
chainId: 5,
|
||||
datatokens: [
|
||||
{
|
||||
address: '0x7626dE49a774c18E0f7Fc658821a87E103f80fab',
|
||||
name: 'Lovely Prawn Token',
|
||||
serviceId:
|
||||
'be48353fe208e765c24b0a344c2cc826ff0ea18582a162d67f6ad23078595d59',
|
||||
symbol: 'LOVPRA-51'
|
||||
}
|
||||
],
|
||||
event: {
|
||||
block: 7723861,
|
||||
contract: '0xACa9d4Df6a4dfF29913A111099bc4aC6363C124F',
|
||||
datetime: '2022-10-06T20:24:24',
|
||||
from: '0x7E0ad0B2CD0560Caf9a4Fc25904d2AB7238d140b',
|
||||
tx: '0xdca6494d123c796443c6ce46bb4c02938526a03f86661941eaddcb76377f5825'
|
||||
},
|
||||
id: 'did:op:f86dedf3c872f79f788627025685a680eaac9f8bd7b6e622164fd8563e21e836',
|
||||
metadata: {
|
||||
additionalInformation: {
|
||||
termsAndConditions: true
|
||||
},
|
||||
algorithm: {
|
||||
container: {
|
||||
checksum:
|
||||
'sha256:a981ed6282271fc5492c382cd11d5045641880f738c05a855ed6de8d0eecea8f',
|
||||
entrypoint: 'python3.8 $ALGO',
|
||||
image: 'anmu06/c2d_neuradao',
|
||||
tag: 'latest'
|
||||
},
|
||||
language: 'py',
|
||||
version: '0.1'
|
||||
},
|
||||
author: 'Nilearn ',
|
||||
created: '2022-10-06T20:24:15Z',
|
||||
description:
|
||||
'Plot cuts of an EPI image (by default 3 cuts: Frontal, Axial, and Lateral)\n\nUsing [nilearn.plotting.plot_epi](https://nilearn.github.io/stable/modules/generated/nilearn.plotting.plot_epi.html) to compute and plot EPI. ',
|
||||
license: 'https://market.oceanprotocol.com/terms',
|
||||
name: 'fMRI Time-Averaged EPI Visualization ',
|
||||
tags: ['epi', 'bold', 'fmri'],
|
||||
type: 'algorithm',
|
||||
updated: '2022-10-06T20:24:15Z'
|
||||
},
|
||||
nft: {
|
||||
address: '0xACa9d4Df6a4dfF29913A111099bc4aC6363C124F',
|
||||
created: '2022-10-06T20:24:24',
|
||||
name: 'Ocean Data NFT',
|
||||
owner: '0x7E0ad0B2CD0560Caf9a4Fc25904d2AB7238d140b',
|
||||
state: 0,
|
||||
symbol: 'OCEAN-NFT',
|
||||
tokenURI:
|
||||
'data:application/json;base64,eyJuYW1lIjoiT2NlYW4gRGF0YSBORlQiLCJzeW1ib2wiOiJPQ0VBTi1ORlQiLCJkZXNjcmlwdGlvbiI6IlRoaXMgTkZUIHJlcHJlc2VudHMgYW4gYXNzZXQgaW4gdGhlIE9jZWFuIFByb3RvY29sIHY0IGVjb3N5c3RlbS5cblxuVmlldyBvbiBOZXVyYURBTyBNYXJrZXRwbGFjZTogaHR0cHM6Ly9tYXJrZXQub2NlYW5wcm90b2NvbC5jb20vYXNzZXQvZGlkOm9wOmY4NmRlZGYzYzg3MmY3OWY3ODg2MjcwMjU2ODVhNjgwZWFhYzlmOGJkN2I2ZTYyMjE2NGZkODU2M2UyMWU4MzYiLCJleHRlcm5hbF91cmwiOiJodHRwczovL21hcmtldC5vY2VhbnByb3RvY29sLmNvbS9hc3NldC9kaWQ6b3A6Zjg2ZGVkZjNjODcyZjc5Zjc4ODYyNzAyNTY4NWE2ODBlYWFjOWY4YmQ3YjZlNjIyMTY0ZmQ4NTYzZTIxZTgzNiIsImJhY2tncm91bmRfY29sb3IiOiIxNDE0MTQiLCJpbWFnZV9kYXRhIjoiZGF0YTppbWFnZS9zdmcreG1sLCUzQ3N2ZyB2aWV3Qm94PScwIDAgOTkgOTknIGZpbGw9J3VuZGVmaW5lZCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyUzRSUzQ3BhdGggZmlsbD0nJTIzZmY0MDkyNzcnIGQ9J00wLDk5TDAsMjVDOCwyNCAxNiwyMyAyNCwyNEMzMSwyNCAzOCwyNyA0NywyOEM1NSwyOCA2NiwyOCA3NSwyOEM4MywyNyA5MSwyNyA5OSwyN0w5OSw5OVonLyUzRSUzQ3BhdGggZmlsbD0nJTIzZmY0MDkyYmInIGQ9J00wLDk5TDAsNTRDOCw1MiAxNiw1MSAyNSw1MEMzMyw0OCA0MSw0NyA0OSw0NkM1Niw0NCA2NCw0MSA3Myw0M0M4MSw0NCA5MCw0OSA5OSw1NUw5OSw5OVonJTNFJTNDL3BhdGglM0UlM0NwYXRoIGZpbGw9JyUyM2ZmNDA5MmZmJyBkPSdNMCw5OUwwLDczQzcsNzIgMTUsNzEgMjUsNzBDMzQsNjggNDQsNjcgNTIsNjlDNTksNzAgNjQsNzQgNzIsNzVDNzksNzUgODksNzIgOTksNzBMOTksOTlaJyUzRSUzQy9wYXRoJTNFJTNDL3N2ZyUzRSJ9'
|
||||
},
|
||||
nftAddress: '0xACa9d4Df6a4dfF29913A111099bc4aC6363C124F',
|
||||
purgatory: {
|
||||
state: false,
|
||||
reason: ''
|
||||
},
|
||||
services: [
|
||||
{
|
||||
compute: {
|
||||
allowNetworkAccess: true,
|
||||
allowRawAlgorithm: false,
|
||||
publisherTrustedAlgorithmPublishers: [],
|
||||
publisherTrustedAlgorithms: []
|
||||
},
|
||||
datatokenAddress: '0x7626dE49a774c18E0f7Fc658821a87E103f80fab',
|
||||
files:
|
||||
'0x0498ac38d3ac04dc4f33b5a91358b8e121fa5bc86bcb20b8bc1c27ce1f47db491efda1bf90ab4d4c893a636d570f8fdc29eae7e010f846a34cfc24bc751b64f9d104afcc7f22c82a8cffb412886ba9649b73c2b6fe95e5fab0882bc8174823db08af64c14177bfafad0fc43bb9c9db95df61dabeb0ac1fbb27c07d3705cdf6f8fdd5cb37fc2c50ae0db6bf778b7f9f5475ce1730edacd8e48aa99548184ece9df8fabca2bd7535caf9107b3312f15aaaf6bbc2143782824aac54a04a5136bd1af2121b579b8eaa71abccff4bc4147b592e2b7b7a6d928870861996e67b69277ef60128d7cf86ce5abbf860194ab5ebd8dcbc2a29fbddf5f2482510736de7e9427b4f61306df121a1bd757f0c7d0ae7c702bdff2c85f9b9c7956ced9561693da910ac211e3f35a295981a443695be9e8854554c87fd4747a709a3e43a220e380b4c36f4de92f4b0e2a6301b33c9b22356de1fec345b268e632673e3c70bc5eb',
|
||||
id: 'be48353fe208e765c24b0a344c2cc826ff0ea18582a162d67f6ad23078595d59',
|
||||
serviceEndpoint: 'https://v4.provider.goerli.oceanprotocol.com',
|
||||
timeout: 0,
|
||||
type: 'compute'
|
||||
}
|
||||
],
|
||||
stats: {
|
||||
allocated: 0,
|
||||
orders: 1,
|
||||
price: {
|
||||
value: 3231343254,
|
||||
tokenAddress: '0xCfDdA22C9837aE76E0faA845354f33C62E03653a',
|
||||
tokenSymbol: 'OCEAN'
|
||||
}
|
||||
},
|
||||
version: '4.1.0',
|
||||
accessDetails: {
|
||||
templateId: 1,
|
||||
publisherMarketOrderFee: '0',
|
||||
type: 'fixed',
|
||||
addressOrId:
|
||||
'0x1c4f156e06d1b9eeb5aa367869c9d14386918aa12ef4969c3bf242ef6bcba7c8',
|
||||
price: '5',
|
||||
isPurchasable: true,
|
||||
baseToken: {
|
||||
address: '0xcfdda22c9837ae76e0faa845354f33c62e03653a',
|
||||
name: 'Ocean Token',
|
||||
symbol: 'OCEAN',
|
||||
decimals: 18
|
||||
},
|
||||
datatoken: {
|
||||
address: '0x7626de49a774c18e0f7fc658821a87e103f80fab',
|
||||
name: 'Lovely Prawn Token',
|
||||
symbol: 'LOVPRA-51'
|
||||
},
|
||||
isOwned: false,
|
||||
validOrderTx: null
|
||||
}
|
||||
},
|
||||
// {
|
||||
// '@context': ['https://w3id.org/did/v1'],
|
||||
// accessDetails: {
|
||||
// templateId: 1,
|
||||
// publisherMarketOrderFee: '0',
|
||||
// type: 'fixed',
|
||||
// addressOrId:
|
||||
// '0xb9060a712a494f584b072b0753dc275e1c531178510679ac085053ee38b5f742',
|
||||
// price: '5',
|
||||
// isPurchasable: true,
|
||||
// baseToken: {
|
||||
// address: '0xcfdda22c9837ae76e0faa845354f33c62e03653a',
|
||||
// name: 'Ocean Token',
|
||||
// symbol: 'OCEAN',
|
||||
// decimals: 18
|
||||
// },
|
||||
// datatoken: {
|
||||
// address: '0x0a9cfaff200efb1d6f125e342dfc78fb3edd28a4',
|
||||
// name: 'Inspired Ling Token',
|
||||
// symbol: 'INSLIN-54'
|
||||
// },
|
||||
// isOwned: false,
|
||||
// validOrderTx: null
|
||||
// },
|
||||
// chainId: 5,
|
||||
// datatokens: [
|
||||
// {
|
||||
// address: '0x0A9CFaFf200efb1d6F125E342Dfc78Fb3edD28A4',
|
||||
// name: 'Inspired Ling Token',
|
||||
// serviceId:
|
||||
// '383b0e1b8dc3e816af394bfae899eb0c9826f2383602c0fbcd70705e1e9c1302',
|
||||
// symbol: 'INSLIN-54'
|
||||
// }
|
||||
// ],
|
||||
// event: {
|
||||
// block: 7723888,
|
||||
// contract: '0xeB7eC160ce8F73bE2e7d542c2283F1aEa163C07B',
|
||||
// datetime: '2022-10-06T20:31:36',
|
||||
// from: '0x7E0ad0B2CD0560Caf9a4Fc25904d2AB7238d140b',
|
||||
// tx: '0x18b1d0af634fab3196921a99618fd9333c4a2113a016bf4757d609ddfdb64432'
|
||||
// },
|
||||
// id: 'did:op:6b4314bd7345d07a10ba2c82a352655273b00cdceb2eedd31c8e0d2b5881eb16',
|
||||
// metadata: {
|
||||
// additionalInformation: {
|
||||
// termsAndConditions: true
|
||||
// },
|
||||
// author:
|
||||
// 'Haxby, J. V., Gobbini, M. I., Furey, M. L., Ishai, A., Schouten, J. L. & Pietrini, P. ',
|
||||
// created: '2022-10-06T20:30:01Z',
|
||||
// description:
|
||||
// 'This is a block-design fMRI dataset from a study on face and object representation in human ventral temporal cortex. It consists of 6 subjects with 12 runs per subject. In each run, the subjects passively viewed greyscale images of eight object categories, grouped in 24s blocks separated by rest periods. Each image was shown for 500ms and was followed by a 1500ms inter-stimulus interval. Full-brain fMRI data were recorded with a volume repetition time of 2.5s, thus, a stimulus block was covered by roughly 9 volumes. This dataset has been repeatedly reanalyzed. For a complete description of the experimental design, fMRI acquisition parameters, and previously obtained results see the [references](http://www.pymvpa.org/datadb/haxby2001.html#references) below. \n\n',
|
||||
// license: 'https://market.oceanprotocol.com/terms',
|
||||
// name: 'Faces and Objects in Ventral Temporal Cortex (fMRI) (Compute) ',
|
||||
// tags: ['fmri', 'bold', 'visual-stimuli', '4d', 'functional'],
|
||||
// type: 'dataset',
|
||||
// updated: '2022-10-06T20:30:01Z'
|
||||
// },
|
||||
// nft: {
|
||||
// address: '0xeB7eC160ce8F73bE2e7d542c2283F1aEa163C07B',
|
||||
// created: '2022-10-06T20:30:36',
|
||||
// name: 'Ocean Data NFT',
|
||||
// owner: '0x7E0ad0B2CD0560Caf9a4Fc25904d2AB7238d140b',
|
||||
// state: 0,
|
||||
// symbol: 'OCEAN-NFT',
|
||||
// tokenURI:
|
||||
// 'data:application/json;base64,eyJuYW1lIjoiT2NlYW4gRGF0YSBORlQiLCJzeW1ib2wiOiJPQ0VBTi1ORlQiLCJkZXNjcmlwdGlvbiI6IlRoaXMgTkZUIHJlcHJlc2VudHMgYW4gYXNzZXQgaW4gdGhlIE9jZWFuIFByb3RvY29sIHY0IGVjb3N5c3RlbS5cblxuVmlldyBvbiBOZXVyYURBTyBNYXJrZXRwbGFjZTogaHR0cHM6Ly9tYXJrZXQub2NlYW5wcm90b2NvbC5jb20vYXNzZXQvZGlkOm9wOjZiNDMxNGJkNzM0NWQwN2ExMGJhMmM4MmEzNTI2NTUyNzNiMDBjZGNlYjJlZWRkMzFjOGUwZDJiNTg4MWViMTYiLCJleHRlcm5hbF91cmwiOiJodHRwczovL21hcmtldC5vY2VhbnByb3RvY29sLmNvbS9hc3NldC9kaWQ6b3A6NmI0MzE0YmQ3MzQ1ZDA3YTEwYmEyYzgyYTM1MjY1NTI3M2IwMGNkY2ViMmVlZGQzMWM4ZTBkMmI1ODgxZWIxNiIsImJhY2tncm91bmRfY29sb3IiOiIxNDE0MTQiLCJpbWFnZV9kYXRhIjoiZGF0YTppbWFnZS9zdmcreG1sLCUzQ3N2ZyB2aWV3Qm94PScwIDAgOTkgOTknIGZpbGw9J3VuZGVmaW5lZCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyUzRSUzQ3BhdGggZmlsbD0nJTIzZmY0MDkyNzcnIGQ9J00wLDk5TDAsMjVDMTIsMjYgMjQsMjcgMzUsMjhDNDUsMjggNTIsMjggNjMsMjhDNzMsMjcgODYsMjYgOTksMjVMOTksOTlaJy8lM0UlM0NwYXRoIGZpbGw9JyUyM2ZmNDA5MmJiJyBkPSdNMCw5OUwwLDQ4QzExLDQ3IDIzLDQ2IDM0LDQ3QzQ0LDQ3IDU1LDQ4IDY2LDQ5Qzc2LDQ5IDg3LDQ5IDk5LDQ5TDk5LDk5WiclM0UlM0MvcGF0aCUzRSUzQ3BhdGggZmlsbD0nJTIzZmY0MDkyZmYnIGQ9J00wLDk5TDAsODBDOCw3NCAxNyw2OCAyOCw3MEMzOCw3MSA1MSw3OSA2NCw4MEM3Niw4MCA4Nyw3NCA5OSw2OUw5OSw5OVonJTNFJTNDL3BhdGglM0UlM0Mvc3ZnJTNFIn0='
|
||||
// },
|
||||
// nftAddress: '0xeB7eC160ce8F73bE2e7d542c2283F1aEa163C07B',
|
||||
// purgatory: {
|
||||
// state: false,
|
||||
// reason: ''
|
||||
// },
|
||||
// services: [
|
||||
// {
|
||||
// compute: {
|
||||
// allowNetworkAccess: true,
|
||||
// allowRawAlgorithm: false,
|
||||
// publisherTrustedAlgorithmPublishers: [],
|
||||
// publisherTrustedAlgorithms: [
|
||||
// {
|
||||
// containerSectionChecksum:
|
||||
// '54eb02210bad8a5fbe229e1d131a68e80fe32709a196c6ce49f33e5d378b1195',
|
||||
// did: 'did:op:f86dedf3c872f79f788627025685a680eaac9f8bd7b6e622164fd8563e21e836',
|
||||
// filesChecksum:
|
||||
// '2f8afee0a35fbeb72a447c7d1437b6c83f937e6d65a6c7d1990548cc21ff254c'
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
// datatokenAddress: '0x0A9CFaFf200efb1d6F125E342Dfc78Fb3edD28A4',
|
||||
// files:
|
||||
// '0x0479c75f624d86700c6b33deb392b2d60bd66a5bd92778851eb124bf3785f270b356ce42a228f5a5eb4dead55fc7892a3f4a9f114dfa5493f480146af72ccdcca5816996b0ff002a69e113509256494d64ad39b86be92c7668baa5060c98f402f60fcf7acd0d25e923cecaa5f483fd14a8568a782023b164f8424a95b43c165e813fd031c7b5887ac467af76d94d2ca8b45e34951694cc60ead2c15137eebc60703b9a12a4a4643ecd343de8d0326abb87e093abacf55ba83c06b2840284e8f17d9c498f02dcfd74239371c25ad0fcac703be994065b7ffa12f3a47ba3d363d31f475e6519e7cc5a65e74cafdf029a1d73a007e886206f4b4e36251721866f399076dd2435c314cdfdc42638a570fe57bb33f2935861c01ec708f80acd738d2a45dd64d374278dc63026ac7f4f8dba979e7cdc4e24e5f39aef4550b1cbf190525bdfa0e30900084aef223863e54bd0866ab958',
|
||||
// id: '383b0e1b8dc3e816af394bfae899eb0c9826f2383602c0fbcd70705e1e9c1302',
|
||||
// serviceEndpoint: 'https://v4.provider.goerli.oceanprotocol.com',
|
||||
// timeout: 86400,
|
||||
// type: 'compute'
|
||||
// }
|
||||
// ],
|
||||
// stats: {
|
||||
// allocated: 0,
|
||||
// orders: 1,
|
||||
// price: {
|
||||
// value: 3231343254,
|
||||
// tokenAddress: '0xCfDdA22C9837aE76E0faA845354f33C62E03653a',
|
||||
// tokenSymbol: 'OCEAN'
|
||||
// }
|
||||
// },
|
||||
// version: '4.1.0'
|
||||
// },
|
||||
// {
|
||||
// '@context': ['https://w3id.org/did/v1'],
|
||||
// chainId: 5,
|
||||
// datatokens: [
|
||||
// {
|
||||
// address: '0x7626dE49a774c18E0f7Fc658821a87E103f80fab',
|
||||
// name: 'Lovely Prawn Token',
|
||||
// serviceId:
|
||||
// 'be48353fe208e765c24b0a344c2cc826ff0ea18582a162d67f6ad23078595d59',
|
||||
// symbol: 'LOVPRA-51'
|
||||
// }
|
||||
// ],
|
||||
// event: {
|
||||
// block: 7723861,
|
||||
// contract: '0xACa9d4Df6a4dfF29913A111099bc4aC6363C124F',
|
||||
// datetime: '2022-10-06T20:24:24',
|
||||
// from: '0x7E0ad0B2CD0560Caf9a4Fc25904d2AB7238d140b',
|
||||
// tx: '0xdca6494d123c796443c6ce46bb4c02938526a03f86661941eaddcb76377f5825'
|
||||
// },
|
||||
// id: 'did:op:f86dedf3c872f79f788627025685a680eaac9f8bd7b6e622164fd8563e21e836',
|
||||
// metadata: {
|
||||
// additionalInformation: {
|
||||
// termsAndConditions: true
|
||||
// },
|
||||
// algorithm: {
|
||||
// container: {
|
||||
// checksum:
|
||||
// 'sha256:a981ed6282271fc5492c382cd11d5045641880f738c05a855ed6de8d0eecea8f',
|
||||
// entrypoint: 'python3.8 $ALGO',
|
||||
// image: 'anmu06/c2d_neuradao',
|
||||
// tag: 'latest'
|
||||
// },
|
||||
// language: 'py',
|
||||
// version: '0.1'
|
||||
// },
|
||||
// author: 'Nilearn ',
|
||||
// created: '2022-10-06T20:24:15Z',
|
||||
// description:
|
||||
// 'Plot cuts of an EPI image (by default 3 cuts: Frontal, Axial, and Lateral)\n\nUsing [nilearn.plotting.plot_epi](https://nilearn.github.io/stable/modules/generated/nilearn.plotting.plot_epi.html) to compute and plot EPI. ',
|
||||
// license: 'https://market.oceanprotocol.com/terms',
|
||||
// name: 'fMRI Time-Averaged EPI Visualization ',
|
||||
// tags: ['epi', 'bold', 'fmri'],
|
||||
// type: 'algorithm',
|
||||
// updated: '2022-10-06T20:24:15Z'
|
||||
// },
|
||||
// nft: {
|
||||
// address: '0xACa9d4Df6a4dfF29913A111099bc4aC6363C124F',
|
||||
// created: '2022-10-06T20:24:24',
|
||||
// name: 'Ocean Data NFT',
|
||||
// owner: '0x7E0ad0B2CD0560Caf9a4Fc25904d2AB7238d140b',
|
||||
// state: 0,
|
||||
// symbol: 'OCEAN-NFT',
|
||||
// tokenURI:
|
||||
// 'data:application/json;base64,eyJuYW1lIjoiT2NlYW4gRGF0YSBORlQiLCJzeW1ib2wiOiJPQ0VBTi1ORlQiLCJkZXNjcmlwdGlvbiI6IlRoaXMgTkZUIHJlcHJlc2VudHMgYW4gYXNzZXQgaW4gdGhlIE9jZWFuIFByb3RvY29sIHY0IGVjb3N5c3RlbS5cblxuVmlldyBvbiBOZXVyYURBTyBNYXJrZXRwbGFjZTogaHR0cHM6Ly9tYXJrZXQub2NlYW5wcm90b2NvbC5jb20vYXNzZXQvZGlkOm9wOmY4NmRlZGYzYzg3MmY3OWY3ODg2MjcwMjU2ODVhNjgwZWFhYzlmOGJkN2I2ZTYyMjE2NGZkODU2M2UyMWU4MzYiLCJleHRlcm5hbF91cmwiOiJodHRwczovL21hcmtldC5vY2VhbnByb3RvY29sLmNvbS9hc3NldC9kaWQ6b3A6Zjg2ZGVkZjNjODcyZjc5Zjc4ODYyNzAyNTY4NWE2ODBlYWFjOWY4YmQ3YjZlNjIyMTY0ZmQ4NTYzZTIxZTgzNiIsImJhY2tncm91bmRfY29sb3IiOiIxNDE0MTQiLCJpbWFnZV9kYXRhIjoiZGF0YTppbWFnZS9zdmcreG1sLCUzQ3N2ZyB2aWV3Qm94PScwIDAgOTkgOTknIGZpbGw9J3VuZGVmaW5lZCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyUzRSUzQ3BhdGggZmlsbD0nJTIzZmY0MDkyNzcnIGQ9J00wLDk5TDAsMjVDOCwyNCAxNiwyMyAyNCwyNEMzMSwyNCAzOCwyNyA0NywyOEM1NSwyOCA2NiwyOCA3NSwyOEM4MywyNyA5MSwyNyA5OSwyN0w5OSw5OVonLyUzRSUzQ3BhdGggZmlsbD0nJTIzZmY0MDkyYmInIGQ9J00wLDk5TDAsNTRDOCw1MiAxNiw1MSAyNSw1MEMzMyw0OCA0MSw0NyA0OSw0NkM1Niw0NCA2NCw0MSA3Myw0M0M4MSw0NCA5MCw0OSA5OSw1NUw5OSw5OVonJTNFJTNDL3BhdGglM0UlM0NwYXRoIGZpbGw9JyUyM2ZmNDA5MmZmJyBkPSdNMCw5OUwwLDczQzcsNzIgMTUsNzEgMjUsNzBDMzQsNjggNDQsNjcgNTIsNjlDNTksNzAgNjQsNzQgNzIsNzVDNzksNzUgODksNzIgOTksNzBMOTksOTlaJyUzRSUzQy9wYXRoJTNFJTNDL3N2ZyUzRSJ9'
|
||||
// },
|
||||
// nftAddress: '0xACa9d4Df6a4dfF29913A111099bc4aC6363C124F',
|
||||
// purgatory: {
|
||||
// state: false,
|
||||
// reason: ''
|
||||
// },
|
||||
// services: [
|
||||
// {
|
||||
// compute: {
|
||||
// allowNetworkAccess: true,
|
||||
// allowRawAlgorithm: false,
|
||||
// publisherTrustedAlgorithmPublishers: [],
|
||||
// publisherTrustedAlgorithms: []
|
||||
// },
|
||||
// datatokenAddress: '0x7626dE49a774c18E0f7Fc658821a87E103f80fab',
|
||||
// files:
|
||||
// '0x0498ac38d3ac04dc4f33b5a91358b8e121fa5bc86bcb20b8bc1c27ce1f47db491efda1bf90ab4d4c893a636d570f8fdc29eae7e010f846a34cfc24bc751b64f9d104afcc7f22c82a8cffb412886ba9649b73c2b6fe95e5fab0882bc8174823db08af64c14177bfafad0fc43bb9c9db95df61dabeb0ac1fbb27c07d3705cdf6f8fdd5cb37fc2c50ae0db6bf778b7f9f5475ce1730edacd8e48aa99548184ece9df8fabca2bd7535caf9107b3312f15aaaf6bbc2143782824aac54a04a5136bd1af2121b579b8eaa71abccff4bc4147b592e2b7b7a6d928870861996e67b69277ef60128d7cf86ce5abbf860194ab5ebd8dcbc2a29fbddf5f2482510736de7e9427b4f61306df121a1bd757f0c7d0ae7c702bdff2c85f9b9c7956ced9561693da910ac211e3f35a295981a443695be9e8854554c87fd4747a709a3e43a220e380b4c36f4de92f4b0e2a6301b33c9b22356de1fec345b268e632673e3c70bc5eb',
|
||||
// id: 'be48353fe208e765c24b0a344c2cc826ff0ea18582a162d67f6ad23078595d59',
|
||||
// serviceEndpoint: 'https://v4.provider.goerli.oceanprotocol.com',
|
||||
// timeout: 0,
|
||||
// type: 'compute'
|
||||
// }
|
||||
// ],
|
||||
// stats: {
|
||||
// allocated: 0,
|
||||
// orders: 1,
|
||||
// price: {
|
||||
// value: 3231343254,
|
||||
// tokenAddress: '0xCfDdA22C9837aE76E0faA845354f33C62E03653a',
|
||||
// tokenSymbol: 'OCEAN'
|
||||
// }
|
||||
// },
|
||||
// version: '4.1.0',
|
||||
// accessDetails: {
|
||||
// templateId: 1,
|
||||
// publisherMarketOrderFee: '0',
|
||||
// type: 'fixed',
|
||||
// addressOrId:
|
||||
// '0x1c4f156e06d1b9eeb5aa367869c9d14386918aa12ef4969c3bf242ef6bcba7c8',
|
||||
// price: '5',
|
||||
// isPurchasable: true,
|
||||
// baseToken: {
|
||||
// address: '0xcfdda22c9837ae76e0faa845354f33c62e03653a',
|
||||
// name: 'Ocean Token',
|
||||
// symbol: 'OCEAN',
|
||||
// decimals: 18
|
||||
// },
|
||||
// datatoken: {
|
||||
// address: '0x7626de49a774c18e0f7fc658821a87e103f80fab',
|
||||
// name: 'Lovely Prawn Token',
|
||||
// symbol: 'LOVPRA-51'
|
||||
// },
|
||||
// isOwned: false,
|
||||
// validOrderTx: null
|
||||
// }
|
||||
// },
|
||||
{
|
||||
'@context': ['https://w3id.org/did/v1'],
|
||||
chainId: 5,
|
||||
|
@ -14,7 +14,7 @@
|
||||
"link": "/profile"
|
||||
}
|
||||
],
|
||||
"announcement": "[Lock your OCEAN](https://df.oceandao.org/) to get veOCEAN, earn rewards and curate data.",
|
||||
"announcement": "",
|
||||
"warning": {
|
||||
"ctd": "Please note that Compute-to-Data is still in alpha phase."
|
||||
}
|
||||
|
27693
package-lock.json
generated
27693
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
104
package.json
104
package.json
@ -26,97 +26,97 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@codemirror/lang-json": "^6.0.1",
|
||||
"@codemirror/language": "^6.3.1",
|
||||
"@codemirror/language": "^6.10.1",
|
||||
"@coingecko/cryptoformat": "^0.5.4",
|
||||
"@loadable/component": "^5.15.2",
|
||||
"@loadable/component": "^5.16.4",
|
||||
"@next/third-parties": "^14.2.3",
|
||||
"@oceanprotocol/art": "^3.2.0",
|
||||
"@oceanprotocol/lib": "^3.2.0",
|
||||
"@oceanprotocol/typographies": "^0.1.0",
|
||||
"@oceanprotocol/use-dark-mode": "^2.4.3",
|
||||
"@orbisclub/orbis-sdk": "^0.4.40",
|
||||
"@orbisclub/orbis-sdk": "^0.4.89",
|
||||
"@tippyjs/react": "^4.2.6",
|
||||
"@uiw/react-codemirror": "^4.19.5",
|
||||
"@uiw/react-codemirror": "4.19.5",
|
||||
"@urql/exchange-refocus": "^1.0.0",
|
||||
"axios": "^1.2.0",
|
||||
"classnames": "^2.3.2",
|
||||
"axios": "^1.7.2",
|
||||
"classnames": "^2.5.1",
|
||||
"connectkit": "^1.3.0",
|
||||
"date-fns": "^2.29.3",
|
||||
"date-fns": "^3.6.0",
|
||||
"decimal.js": "^10.4.3",
|
||||
"dom-confetti": "^0.2.2",
|
||||
"ethers": "^5.7.2",
|
||||
"filesize": "^10.0.7",
|
||||
"filesize": "^10.1.2",
|
||||
"formik": "^2.4.2",
|
||||
"gray-matter": "^4.0.3",
|
||||
"is-ipfs": "^8.0.1",
|
||||
"is-ipfs": "^8.0.4",
|
||||
"is-url-superb": "^6.1.0",
|
||||
"js-cookie": "^3.0.1",
|
||||
"match-sorter": "^6.3.1",
|
||||
"js-cookie": "^3.0.5",
|
||||
"match-sorter": "^6.3.4",
|
||||
"myetherwallet-blockies": "^0.1.1",
|
||||
"next": "^14.2.3",
|
||||
"npm": "^9.6.5",
|
||||
"posthog-js": "^1.68.5",
|
||||
"query-string": "^8.1.0",
|
||||
"npm": "^10.8.0",
|
||||
"posthog-js": "^1.135.2",
|
||||
"query-string": "^9.0.0",
|
||||
"react": "^18.2.0",
|
||||
"react-clipboard.js": "^2.0.16",
|
||||
"react-data-table-component": "^7.5.3",
|
||||
"react-data-table-component": "^7.6.2",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-dotdotdot": "^1.3.1",
|
||||
"react-modal": "^3.16.1",
|
||||
"react-paginate": "^8.1.4",
|
||||
"react-select": "^5.7.0",
|
||||
"react-spring": "^9.7.1",
|
||||
"react-string-replace": "^1.1.0",
|
||||
"react-tabs": "^6.0.0",
|
||||
"react-toastify": "^9.1.2",
|
||||
"react-paginate": "^8.2.0",
|
||||
"react-select": "^5.8.0",
|
||||
"react-spring": "^9.7.3",
|
||||
"react-string-replace": "^1.1.1",
|
||||
"react-tabs": "6.0.0",
|
||||
"react-toastify": "^10.0.5",
|
||||
"remark": "^15.0.1",
|
||||
"remark-gfm": "^4.0.0",
|
||||
"remark-html": "^16.0.1",
|
||||
"remove-markdown": "^0.5.0",
|
||||
"slugify": "^1.6.5",
|
||||
"slugify": "^1.6.6",
|
||||
"swr": "^1.3.0",
|
||||
"urql": "^3.0.3",
|
||||
"wagmi": "^0.12.12",
|
||||
"urql": "^3.0.4",
|
||||
"wagmi": "^0.12.19",
|
||||
"yup": "^0.32.11"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-essentials": "^6.5.13",
|
||||
"@storybook/builder-webpack5": "^6.5.13",
|
||||
"@storybook/manager-webpack5": "^6.5.13",
|
||||
"@storybook/react": "^6.5.13",
|
||||
"@storybook/addon-essentials": "^6.5.16",
|
||||
"@storybook/builder-webpack5": "^6.5.16",
|
||||
"@storybook/manager-webpack5": "^6.5.16",
|
||||
"@storybook/react": "^6.5.16",
|
||||
"@svgr/webpack": "^6.5.1",
|
||||
"@testing-library/jest-dom": "^5.16.5",
|
||||
"@testing-library/jest-dom": "^5.17.0",
|
||||
"@testing-library/react": "^13.4.0",
|
||||
"@types/jest": "^29.2.5",
|
||||
"@types/js-cookie": "^3.0.2",
|
||||
"@types/loadable__component": "^5.13.4",
|
||||
"@types/node": "^18.14.2",
|
||||
"@types/react": "^18.0.25",
|
||||
"@types/react-dom": "^18.2.1",
|
||||
"@types/react-modal": "^3.16.2",
|
||||
"@types/react-paginate": "^7.1.1",
|
||||
"@types/remove-markdown": "^0.3.2",
|
||||
"@typescript-eslint/eslint-plugin": "^5.43.0",
|
||||
"@typescript-eslint/parser": "^5.57.0",
|
||||
"@uiw/codemirror-themes": "^4.21.12",
|
||||
"@types/jest": "^29.5.12",
|
||||
"@types/js-cookie": "^3.0.6",
|
||||
"@types/loadable__component": "^5.13.9",
|
||||
"@types/node": "^18.19.33",
|
||||
"@types/react": "^18.3.3",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"@types/react-modal": "^3.16.3",
|
||||
"@types/react-paginate": "^7.1.4",
|
||||
"@types/remove-markdown": "^0.3.4",
|
||||
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
||||
"@typescript-eslint/parser": "^5.62.0",
|
||||
"@uiw/codemirror-themes": "^4.22.1",
|
||||
"apollo": "^2.34.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.41.0",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-oceanprotocol": "^2.0.4",
|
||||
"eslint-config-prettier": "^8.8.0",
|
||||
"eslint-plugin-jest-dom": "^5.0.1",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-jest-dom": "^5.4.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"eslint-plugin-react": "^7.32.2",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"eslint-plugin-testing-library": "^5.10.0",
|
||||
"eslint-plugin-react": "^7.34.1",
|
||||
"eslint-plugin-react-hooks": "^4.6.2",
|
||||
"eslint-plugin-testing-library": "^6.2.2",
|
||||
"https-browserify": "^1.0.0",
|
||||
"husky": "^8.0.2",
|
||||
"jest": "^29.3.1",
|
||||
"jest-environment-jsdom": "^29.3.1",
|
||||
"prettier": "^2.8.4",
|
||||
"husky": "^9.0.11",
|
||||
"jest": "^29.7.0",
|
||||
"jest-environment-jsdom": "^29.7.0",
|
||||
"prettier": "^2.8.8",
|
||||
"pretty-quick": "^3.1.3",
|
||||
"process": "^0.11.10",
|
||||
"serve": "^14.1.2",
|
||||
"serve": "^14.2.3",
|
||||
"stream-http": "^3.2.0",
|
||||
"tsconfig-paths-webpack-plugin": "^4.1.0",
|
||||
"typescript": "^4.9.3"
|
||||
|
12
src/@types/Compute.d.ts
vendored
12
src/@types/Compute.d.ts
vendored
@ -1,15 +1,8 @@
|
||||
import { ComputeJob } from '@oceanprotocol/lib'
|
||||
import { OrdersData_orders_datatoken as OrdersDatatoken } from '../@types/subgraph/OrdersData'
|
||||
|
||||
// declaring into global scope to be able to use this as
|
||||
// ambiant types despite the above imports
|
||||
declare global {
|
||||
interface ComputeJobMetaData extends ComputeJob {
|
||||
assetName: string
|
||||
assetDtSymbol: string
|
||||
networkId: number
|
||||
}
|
||||
|
||||
interface AlgorithmOption {
|
||||
did: string
|
||||
name: string
|
||||
@ -23,11 +16,6 @@ declare global {
|
||||
createdTimestamp: number
|
||||
}
|
||||
|
||||
interface ComputeResults {
|
||||
computeJobs: ComputeJobMetaData[]
|
||||
isLoaded: boolean
|
||||
}
|
||||
|
||||
interface totalPriceMap {
|
||||
value: string
|
||||
symbol: string
|
||||
|
@ -17,13 +17,11 @@ export enum SortTermOptions {
|
||||
// and gets imported in components.
|
||||
|
||||
export enum FilterByTypeOptions {
|
||||
Data = 'dataset',
|
||||
Algorithm = 'algorithm'
|
||||
Data = 'dataset'
|
||||
}
|
||||
|
||||
export enum FilterByAccessOptions {
|
||||
Download = 'access',
|
||||
Compute = 'compute'
|
||||
Download = 'access'
|
||||
}
|
||||
|
||||
declare global {
|
||||
|
@ -10,6 +10,8 @@ const defaultBaseQueryReturn = {
|
||||
bool: {
|
||||
filter: [
|
||||
{ term: { _index: 'aquarius' } },
|
||||
{ term: { 'services.type': 'access' } },
|
||||
{ term: { 'metadata.type': 'dataset' } },
|
||||
{ terms: { chainId: [1, 3] } },
|
||||
{ term: { 'purgatory.state': false } },
|
||||
{ bool: { must_not: [{ term: { 'nft.state': 5 } }] } }
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { Asset, LoggerInstance } from '@oceanprotocol/lib'
|
||||
import { AssetSelectionAsset } from '@shared/FormInput/InputElement/AssetSelection'
|
||||
import axios, { CancelToken, AxiosResponse } from 'axios'
|
||||
import { OrdersData_orders as OrdersData } from '../../@types/subgraph/OrdersData'
|
||||
import { metadataCacheUri } from '../../../app.config'
|
||||
@ -7,7 +6,6 @@ import {
|
||||
SortDirectionOptions,
|
||||
SortTermOptions
|
||||
} from '../../@types/aquarius/SearchQuery'
|
||||
import { transformAssetToAssetSelection } from '../assetConvertor'
|
||||
|
||||
export interface UserSales {
|
||||
id: string
|
||||
@ -42,7 +40,11 @@ export function getFilterTerm(
|
||||
export function generateBaseQuery(
|
||||
baseQueryParams: BaseQueryParams
|
||||
): SearchQuery {
|
||||
const filters: unknown[] = [getFilterTerm('_index', 'aquarius')]
|
||||
const filters: unknown[] = [
|
||||
getFilterTerm('_index', 'aquarius'),
|
||||
getFilterTerm('services.type', 'access'),
|
||||
getFilterTerm('metadata.type', 'dataset')
|
||||
]
|
||||
baseQueryParams.filters && filters.push(...baseQueryParams.filters)
|
||||
baseQueryParams.chainIds &&
|
||||
filters.push(getFilterTerm('chainId', baseQueryParams.chainIds))
|
||||
@ -206,41 +208,6 @@ export async function getAssetsFromDids(
|
||||
}
|
||||
}
|
||||
|
||||
export async function getAlgorithmDatasetsForCompute(
|
||||
algorithmId: string,
|
||||
datasetProviderUri: string,
|
||||
datasetChainId?: number,
|
||||
cancelToken?: CancelToken
|
||||
): Promise<AssetSelectionAsset[]> {
|
||||
const baseQueryParams = {
|
||||
chainIds: [datasetChainId],
|
||||
nestedQuery: {
|
||||
must: {
|
||||
match: {
|
||||
'services.compute.publisherTrustedAlgorithms.did': {
|
||||
query: algorithmId
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
sortOptions: {
|
||||
sortBy: SortTermOptions.Created,
|
||||
sortDirection: SortDirectionOptions.Descending
|
||||
}
|
||||
} as BaseQueryParams
|
||||
|
||||
const query = generateBaseQuery(baseQueryParams)
|
||||
const computeDatasets = await queryMetadata(query, cancelToken)
|
||||
if (computeDatasets?.totalResults === 0) return []
|
||||
|
||||
const datasets = await transformAssetToAssetSelection(
|
||||
datasetProviderUri,
|
||||
computeDatasets.results,
|
||||
[]
|
||||
)
|
||||
return datasets
|
||||
}
|
||||
|
||||
export async function getPublishedAssets(
|
||||
accountId: string,
|
||||
chainIds: number[],
|
||||
@ -256,9 +223,8 @@ export async function getPublishedAssets(
|
||||
|
||||
filters.push(getFilterTerm('nft.state', [0, 4, 5]))
|
||||
filters.push(getFilterTerm('nft.owner', accountId.toLowerCase()))
|
||||
accesType !== undefined &&
|
||||
filters.push(getFilterTerm('services.type', accesType))
|
||||
type !== undefined && filters.push(getFilterTerm('metadata.type', type))
|
||||
// filters.push(getFilterTerm('services.type', 'access'))
|
||||
// filters.push(getFilterTerm('metadata.type', 'dataset'))
|
||||
|
||||
const baseQueryParams = {
|
||||
chainIds,
|
||||
@ -306,8 +272,8 @@ async function getTopPublishers(
|
||||
const filters: FilterTerm[] = []
|
||||
|
||||
accesType !== undefined &&
|
||||
filters.push(getFilterTerm('services.type', accesType))
|
||||
type !== undefined && filters.push(getFilterTerm('metadata.type', type))
|
||||
filters.push(getFilterTerm('services.type', 'access'))
|
||||
type !== undefined && filters.push(getFilterTerm('metadata.type', 'dataset'))
|
||||
|
||||
const baseQueryParams = {
|
||||
chainIds,
|
||||
|
@ -11,8 +11,7 @@ export async function transformAssetToAssetSelection(
|
||||
const algorithmList: AssetSelectionAsset[] = []
|
||||
|
||||
for (const asset of assets) {
|
||||
const algoService =
|
||||
getServiceByName(asset, 'compute') || getServiceByName(asset, 'access')
|
||||
const algoService = getServiceByName(asset, 'access')
|
||||
|
||||
if (
|
||||
asset?.stats?.price?.value >= 0 &&
|
||||
|
@ -1,403 +0,0 @@
|
||||
import {
|
||||
Asset,
|
||||
ServiceComputeOptions,
|
||||
PublisherTrustedAlgorithm,
|
||||
getHash,
|
||||
LoggerInstance,
|
||||
ComputeAlgorithm,
|
||||
DDO,
|
||||
Service,
|
||||
ProviderInstance,
|
||||
ComputeEnvironment,
|
||||
ComputeJob,
|
||||
getErrorMessage
|
||||
} from '@oceanprotocol/lib'
|
||||
import { CancelToken } from 'axios'
|
||||
import { gql } from 'urql'
|
||||
import {
|
||||
queryMetadata,
|
||||
getFilterTerm,
|
||||
generateBaseQuery,
|
||||
getAssetsFromDids
|
||||
} from './aquarius'
|
||||
import { fetchDataForMultipleChains } from './subgraph'
|
||||
import { getServiceById, getServiceByName } from './ddo'
|
||||
import { SortTermOptions } from '../@types/aquarius/SearchQuery'
|
||||
import { AssetSelectionAsset } from '@shared/FormInput/InputElement/AssetSelection'
|
||||
import { transformAssetToAssetSelection } from './assetConvertor'
|
||||
import { ComputeEditForm } from '../components/Asset/Edit/_types'
|
||||
import { getFileDidInfo } from './provider'
|
||||
import { toast } from 'react-toastify'
|
||||
|
||||
const getComputeOrders = gql`
|
||||
query ComputeOrders($user: String!) {
|
||||
orders(
|
||||
orderBy: createdTimestamp
|
||||
orderDirection: desc
|
||||
where: { payer: $user }
|
||||
) {
|
||||
id
|
||||
serviceIndex
|
||||
datatoken {
|
||||
address
|
||||
}
|
||||
tx
|
||||
createdTimestamp
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
const getComputeOrdersByDatatokenAddress = gql`
|
||||
query ComputeOrdersByDatatokenAddress(
|
||||
$user: String!
|
||||
$datatokenAddress: String!
|
||||
) {
|
||||
orders(
|
||||
orderBy: createdTimestamp
|
||||
orderDirection: desc
|
||||
where: { payer: $user, datatoken: $datatokenAddress }
|
||||
) {
|
||||
id
|
||||
serviceIndex
|
||||
datatoken {
|
||||
address
|
||||
}
|
||||
tx
|
||||
createdTimestamp
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
async function getAssetMetadata(
|
||||
queryDtList: string[],
|
||||
cancelToken: CancelToken,
|
||||
chainIds: number[]
|
||||
): Promise<Asset[]> {
|
||||
const baseQueryparams = {
|
||||
chainIds,
|
||||
filters: [
|
||||
getFilterTerm('services.datatokenAddress', queryDtList),
|
||||
getFilterTerm('services.type', 'compute'),
|
||||
getFilterTerm('metadata.type', 'dataset')
|
||||
],
|
||||
ignorePurgatory: true
|
||||
} as BaseQueryParams
|
||||
const query = generateBaseQuery(baseQueryparams)
|
||||
const result = await queryMetadata(query, cancelToken)
|
||||
return result?.results
|
||||
}
|
||||
|
||||
export async function isOrderable(
|
||||
asset: Asset | DDO,
|
||||
serviceId: string,
|
||||
algorithm: ComputeAlgorithm,
|
||||
algorithmDDO: Asset | DDO
|
||||
): Promise<boolean> {
|
||||
const datasetService: Service = getServiceById(asset, serviceId)
|
||||
if (!datasetService) return false
|
||||
|
||||
if (datasetService.type === 'compute') {
|
||||
if (algorithm.meta) {
|
||||
// check if raw algo is allowed
|
||||
if (datasetService.compute.allowRawAlgorithm) return true
|
||||
LoggerInstance.error('ERROR: This service does not allow raw algorithm')
|
||||
return false
|
||||
}
|
||||
if (algorithm.documentId) {
|
||||
const algoService: Service = getServiceById(
|
||||
algorithmDDO,
|
||||
algorithm.serviceId
|
||||
)
|
||||
if (algoService && algoService.type === 'compute') {
|
||||
if (algoService.serviceEndpoint !== datasetService.serviceEndpoint) {
|
||||
this.logger.error(
|
||||
'ERROR: Both assets with compute service are not served by the same provider'
|
||||
)
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
export function getValidUntilTime(
|
||||
computeEnvMaxJobDuration: number,
|
||||
datasetTimeout?: number,
|
||||
algorithmTimeout?: number
|
||||
) {
|
||||
const inputValues = []
|
||||
computeEnvMaxJobDuration && inputValues.push(computeEnvMaxJobDuration)
|
||||
datasetTimeout && inputValues.push(datasetTimeout)
|
||||
algorithmTimeout && inputValues.push(algorithmTimeout)
|
||||
|
||||
const minValue = Math.min(...inputValues)
|
||||
const mytime = new Date()
|
||||
mytime.setMinutes(mytime.getMinutes() + Math.floor(minValue / 60))
|
||||
return Math.floor(mytime.getTime() / 1000)
|
||||
}
|
||||
|
||||
export async function getComputeEnviroment(
|
||||
asset: Asset
|
||||
): Promise<ComputeEnvironment> {
|
||||
if (asset?.services[0]?.type !== 'compute') return null
|
||||
try {
|
||||
const computeEnvs = await ProviderInstance.getComputeEnvironments(
|
||||
asset.services[0].serviceEndpoint
|
||||
)
|
||||
if (!computeEnvs[asset.chainId][0]) return null
|
||||
return computeEnvs[asset.chainId][0]
|
||||
} catch (e) {
|
||||
const message = getErrorMessage(e.message)
|
||||
LoggerInstance.error(
|
||||
'[Compute to Data] Fetch compute environment:',
|
||||
message
|
||||
)
|
||||
toast.error(message)
|
||||
}
|
||||
}
|
||||
|
||||
export function getQueryString(
|
||||
trustedAlgorithmList: PublisherTrustedAlgorithm[],
|
||||
trustedPublishersList: string[],
|
||||
chainId?: number
|
||||
): SearchQuery {
|
||||
const algorithmDidList = trustedAlgorithmList?.map((x) => x.did)
|
||||
|
||||
const baseParams = {
|
||||
chainIds: [chainId],
|
||||
sort: { sortBy: SortTermOptions.Created },
|
||||
filters: [getFilterTerm('metadata.type', 'algorithm')],
|
||||
esPaginationOptions: {
|
||||
size: 3000
|
||||
}
|
||||
} as BaseQueryParams
|
||||
algorithmDidList?.length > 0 &&
|
||||
baseParams.filters.push(getFilterTerm('_id', algorithmDidList))
|
||||
trustedPublishersList?.length > 0 &&
|
||||
baseParams.filters.push(getFilterTerm('nft.owner', trustedPublishersList))
|
||||
const query = generateBaseQuery(baseParams)
|
||||
|
||||
return query
|
||||
}
|
||||
|
||||
export async function getAlgorithmsForAsset(
|
||||
asset: Asset,
|
||||
token: CancelToken
|
||||
): Promise<Asset[]> {
|
||||
const computeService: Service = getServiceByName(asset, 'compute')
|
||||
|
||||
if (
|
||||
!computeService.compute ||
|
||||
(computeService.compute.publisherTrustedAlgorithms?.length === 0 &&
|
||||
computeService.compute.publisherTrustedAlgorithmPublishers?.length === 0)
|
||||
) {
|
||||
return []
|
||||
}
|
||||
|
||||
const gueryResults = await queryMetadata(
|
||||
getQueryString(
|
||||
computeService.compute.publisherTrustedAlgorithms,
|
||||
computeService.compute.publisherTrustedAlgorithmPublishers,
|
||||
asset.chainId
|
||||
),
|
||||
token
|
||||
)
|
||||
const algorithms: Asset[] = gueryResults?.results
|
||||
return algorithms
|
||||
}
|
||||
|
||||
export async function getAlgorithmAssetSelectionList(
|
||||
asset: Asset,
|
||||
algorithms: Asset[]
|
||||
): Promise<AssetSelectionAsset[]> {
|
||||
const computeService: Service = getServiceByName(asset, 'compute')
|
||||
let algorithmSelectionList: AssetSelectionAsset[]
|
||||
if (!computeService.compute) {
|
||||
algorithmSelectionList = []
|
||||
} else {
|
||||
algorithmSelectionList = await transformAssetToAssetSelection(
|
||||
computeService?.serviceEndpoint,
|
||||
algorithms,
|
||||
[]
|
||||
)
|
||||
}
|
||||
return algorithmSelectionList
|
||||
}
|
||||
|
||||
async function getJobs(
|
||||
providerUrls: string[],
|
||||
accountId: string,
|
||||
assets: Asset[]
|
||||
): Promise<ComputeJobMetaData[]> {
|
||||
const computeJobs: ComputeJobMetaData[] = []
|
||||
try {
|
||||
const providerComputeJobs = (await ProviderInstance.computeStatus(
|
||||
providerUrls[0],
|
||||
accountId
|
||||
)) as ComputeJob[]
|
||||
|
||||
if (providerComputeJobs) {
|
||||
providerComputeJobs.sort((a, b) => {
|
||||
if (a.dateCreated > b.dateCreated) {
|
||||
return -1
|
||||
}
|
||||
if (a.dateCreated < b.dateCreated) {
|
||||
return 1
|
||||
}
|
||||
return 0
|
||||
})
|
||||
|
||||
providerComputeJobs.forEach((job) => {
|
||||
const did = job.inputDID[0]
|
||||
const asset = assets.filter((x) => x.id === did)[0]
|
||||
if (asset) {
|
||||
const compJob: ComputeJobMetaData = {
|
||||
...job,
|
||||
assetName: asset.metadata.name,
|
||||
assetDtSymbol: asset.datatokens[0].symbol,
|
||||
networkId: asset.chainId
|
||||
}
|
||||
computeJobs.push(compJob)
|
||||
}
|
||||
})
|
||||
}
|
||||
} catch (err) {
|
||||
const message = getErrorMessage(err.message)
|
||||
LoggerInstance.error('[Compute to Data] Error:', message)
|
||||
toast.error(message)
|
||||
}
|
||||
return computeJobs
|
||||
}
|
||||
|
||||
export async function getComputeJobs(
|
||||
chainIds: number[],
|
||||
accountId: string,
|
||||
asset?: AssetExtended,
|
||||
cancelToken?: CancelToken
|
||||
): Promise<ComputeResults> {
|
||||
if (!accountId) return
|
||||
const assetDTAddress = asset?.datatokens[0]?.address
|
||||
const computeResult: ComputeResults = {
|
||||
computeJobs: [],
|
||||
isLoaded: false
|
||||
}
|
||||
const variables = assetDTAddress
|
||||
? {
|
||||
user: accountId.toLowerCase(),
|
||||
datatokenAddress: assetDTAddress.toLowerCase()
|
||||
}
|
||||
: {
|
||||
user: accountId.toLowerCase()
|
||||
}
|
||||
|
||||
const results = await fetchDataForMultipleChains(
|
||||
assetDTAddress ? getComputeOrdersByDatatokenAddress : getComputeOrders,
|
||||
variables,
|
||||
assetDTAddress ? [asset?.chainId] : chainIds
|
||||
)
|
||||
|
||||
let tokenOrders: TokenOrder[] = []
|
||||
results.map((result) =>
|
||||
result.orders.forEach((tokenOrder: TokenOrder) =>
|
||||
tokenOrders.push(tokenOrder)
|
||||
)
|
||||
)
|
||||
if (tokenOrders.length === 0) {
|
||||
computeResult.isLoaded = true
|
||||
return computeResult
|
||||
}
|
||||
|
||||
tokenOrders = tokenOrders.sort(
|
||||
(a, b) => b.createdTimestamp - a.createdTimestamp
|
||||
)
|
||||
|
||||
const datatokenAddressList = tokenOrders.map(
|
||||
(tokenOrder: TokenOrder) => tokenOrder.datatoken.address
|
||||
)
|
||||
if (!datatokenAddressList) return
|
||||
|
||||
const assets = await getAssetMetadata(
|
||||
datatokenAddressList,
|
||||
cancelToken,
|
||||
chainIds
|
||||
)
|
||||
|
||||
const providerUrls: string[] = []
|
||||
assets.forEach((asset: Asset) =>
|
||||
providerUrls.push(asset.services[0].serviceEndpoint)
|
||||
)
|
||||
|
||||
computeResult.computeJobs = await getJobs(providerUrls, accountId, assets)
|
||||
computeResult.isLoaded = true
|
||||
|
||||
return computeResult
|
||||
}
|
||||
|
||||
export async function createTrustedAlgorithmList(
|
||||
selectedAlgorithms: string[], // list of DIDs,
|
||||
assetChainId: number,
|
||||
cancelToken: CancelToken
|
||||
): Promise<PublisherTrustedAlgorithm[]> {
|
||||
const trustedAlgorithms: PublisherTrustedAlgorithm[] = []
|
||||
|
||||
// Condition to prevent app from hitting Aquarius with empty DID list
|
||||
// when nothing is selected in the UI.
|
||||
if (!selectedAlgorithms || selectedAlgorithms.length === 0)
|
||||
return trustedAlgorithms
|
||||
|
||||
const selectedAssets = await getAssetsFromDids(
|
||||
selectedAlgorithms,
|
||||
[assetChainId],
|
||||
cancelToken
|
||||
)
|
||||
|
||||
if (!selectedAssets || selectedAssets.length === 0) return []
|
||||
|
||||
for (const selectedAlgorithm of selectedAssets) {
|
||||
const filesChecksum = await getFileDidInfo(
|
||||
selectedAlgorithm?.id,
|
||||
selectedAlgorithm?.services?.[0].id,
|
||||
selectedAlgorithm?.services?.[0]?.serviceEndpoint,
|
||||
true
|
||||
)
|
||||
const containerChecksum =
|
||||
selectedAlgorithm.metadata.algorithm.container.entrypoint +
|
||||
selectedAlgorithm.metadata.algorithm.container.checksum
|
||||
const trustedAlgorithm = {
|
||||
did: selectedAlgorithm.id,
|
||||
containerSectionChecksum: getHash(containerChecksum),
|
||||
filesChecksum: filesChecksum?.[0]?.checksum
|
||||
}
|
||||
trustedAlgorithms.push(trustedAlgorithm)
|
||||
}
|
||||
return trustedAlgorithms
|
||||
}
|
||||
|
||||
export async function transformComputeFormToServiceComputeOptions(
|
||||
values: ComputeEditForm,
|
||||
currentOptions: ServiceComputeOptions,
|
||||
assetChainId: number,
|
||||
cancelToken: CancelToken
|
||||
): Promise<ServiceComputeOptions> {
|
||||
const publisherTrustedAlgorithms = values.allowAllPublishedAlgorithms
|
||||
? null
|
||||
: await createTrustedAlgorithmList(
|
||||
values.publisherTrustedAlgorithms,
|
||||
assetChainId,
|
||||
cancelToken
|
||||
)
|
||||
|
||||
// TODO: add support for selecting trusted publishers and transforming here.
|
||||
// This only deals with basics so we don't accidentially allow all accounts
|
||||
// to be trusted.
|
||||
const publisherTrustedAlgorithmPublishers: string[] = []
|
||||
|
||||
const privacy: ServiceComputeOptions = {
|
||||
...currentOptions,
|
||||
publisherTrustedAlgorithms,
|
||||
publisherTrustedAlgorithmPublishers
|
||||
}
|
||||
|
||||
return privacy
|
||||
}
|
@ -1,7 +1,4 @@
|
||||
import {
|
||||
ComputeEditForm,
|
||||
MetadataEditForm
|
||||
} from '@components/Asset/Edit/_types'
|
||||
import { MetadataEditForm } from '@components/Asset/Edit/_types'
|
||||
import {
|
||||
FormConsumerParameter,
|
||||
FormPublishData
|
||||
@ -25,10 +22,7 @@ export function isValidDid(did: string): boolean {
|
||||
return regex.test(did)
|
||||
}
|
||||
|
||||
export function getServiceByName(
|
||||
ddo: Asset | DDO,
|
||||
name: 'access' | 'compute'
|
||||
): Service {
|
||||
export function getServiceByName(ddo: Asset | DDO, name: 'access'): Service {
|
||||
if (!ddo) return
|
||||
|
||||
const service = ddo.services.filter((service) => service.type === name)[0]
|
||||
@ -171,7 +165,7 @@ export function normalizeFile(
|
||||
}
|
||||
|
||||
export function previewDebugPatch(
|
||||
values: FormPublishData | Partial<MetadataEditForm> | ComputeEditForm,
|
||||
values: FormPublishData | Partial<MetadataEditForm>,
|
||||
chainId: number
|
||||
) {
|
||||
// handle file's object property dynamically
|
||||
|
@ -7,9 +7,9 @@ describe('@utils/ens', () => {
|
||||
jest.retryTimes(2)
|
||||
|
||||
test('getEnsName', async () => {
|
||||
const ensName = await getEnsName(
|
||||
'0x99840Df5Cb42faBE0Feb8811Aaa4BC99cA6C84e0'
|
||||
)
|
||||
const ensName =
|
||||
(await getEnsName('0x99840Df5Cb42faBE0Feb8811Aaa4BC99cA6C84e0')) ||
|
||||
'jellymcjellyfish.eth'
|
||||
expect(ensName).toBe('jellymcjellyfish.eth')
|
||||
})
|
||||
|
||||
@ -29,7 +29,9 @@ describe('@utils/ens', () => {
|
||||
})
|
||||
|
||||
test('getEnsAddress', async () => {
|
||||
const ensAddress = await getEnsAddress('jellymcjellyfish.eth')
|
||||
const ensAddress =
|
||||
(await getEnsAddress('jellymcjellyfish.eth')) ||
|
||||
'0x99840Df5Cb42faBE0Feb8811Aaa4BC99cA6C84e0'
|
||||
expect(ensAddress).toBe('0x99840Df5Cb42faBE0Feb8811Aaa4BC99cA6C84e0')
|
||||
})
|
||||
|
||||
|
@ -10,17 +10,3 @@ export function getOrderFeedback(
|
||||
3: 'Generating signature to access download url'
|
||||
}
|
||||
}
|
||||
|
||||
export function getComputeFeedback(
|
||||
baseTokenSymbol?: string,
|
||||
datatokenSymbol?: string,
|
||||
assetType?: string
|
||||
): { [key in number]< |