mirror of
https://github.com/oceanprotocol/market.git
synced 2024-11-14 17:24:51 +01:00
refactor Ocean config
This commit is contained in:
parent
d15fe74eb9
commit
6d2ac9804a
29
.env.example
29
.env.example
@ -1,26 +1,11 @@
|
||||
#Spree config
|
||||
# Local config
|
||||
NODE_URI='http://localhost:8545'
|
||||
AQUARIUS_URI='http://aquarius:5000'
|
||||
BRIZO_URI='http://localhost:8030'
|
||||
BRIZO_ADDRESS='0x068ed00cf0441e4829d9784fcbe7b9e26d4bd8d0'
|
||||
SECRET_STORE_URI='http://localhost:12001'
|
||||
FAUCET_URI='https://localhost:3001'
|
||||
RATING_URI='http://localhost:8000'
|
||||
|
||||
#Nile market
|
||||
#NODE_URI='https://nile.dev-ocean.com'
|
||||
#AQUARIUS_URI='https://aquarius.nile.market.dev-ocean.com'
|
||||
#BRIZO_URI='https://brizo.nile.market.dev-ocean.com'
|
||||
#BRIZO_ADDRESS='0xeD792C5FcC8bF3322a6ba89A6e51eF0B6fB3C530'
|
||||
#SECRET_STORE_URI='https://secret-store.nile.dev-ocean.com'
|
||||
#FAUCET_URI='https://faucet.nile.dev-ocean.com'
|
||||
#RATING_URI='https://rating.nile.market.dev-ocean.com'
|
||||
METADATA_STORE_URI='http://aquarius:5000'
|
||||
PROVIDER_URI='http://localhost:8030'
|
||||
FACTORY_ADDRESS='0x068ed00cf0441e4829d9784fcbe7b9e26d4bd8d0'
|
||||
|
||||
#Pacific market
|
||||
#NODE_URI='https://pacific.oceanprotocol.com'
|
||||
#AQUARIUS_URI='https://aquarius.pacific.market.dev-ocean.com'
|
||||
#BRIZO_URI='https://brizo.pacific.market.dev-ocean.com'
|
||||
#BRIZO_ADDRESS='0xeD792C5FcC8bF3322a6ba89A6e51eF0B6fB3C530'
|
||||
#SECRET_STORE_URI='https://secret-store.oceanprotocol.com'
|
||||
#FAUCET_URI='https://faucet.oceanprotocol.com'
|
||||
#RATING_URI='https://rating.pacific.market.dev-ocean.com'
|
||||
#METADATA_STORE_URI='https://aquarius.pacific.market.dev-ocean.com'
|
||||
#PROVIDER_URI='https://brizo.pacific.market.dev-ocean.com'
|
||||
#FACTORY_ADDRESS='0xeD792C5FcC8bF3322a6ba89A6e51eF0B6fB3C530'
|
||||
|
@ -1,19 +1,14 @@
|
||||
module.exports = {
|
||||
oceanConfig: {
|
||||
nodeUri: process.env.NODE_URI || 'https://pacific.oceanprotocol.com',
|
||||
aquariusUri:
|
||||
process.env.AQUARIUS_URI ||
|
||||
metadataStoreUri:
|
||||
process.env.METADATA_STORE_URI ||
|
||||
'https://aquarius.marketplace.oceanprotocol.com',
|
||||
brizoUri:
|
||||
process.env.BRIZO_URI || 'https://brizo.marketplace.oceanprotocol.com',
|
||||
brizoAddress:
|
||||
process.env.BRIZO_ADDRESS || '0x00c6A0BC5cD0078d6Cd0b659E8061B404cfa5704',
|
||||
secretStoreUri:
|
||||
process.env.SECRET_STORE_URI || 'https://secret-store.oceanprotocol.com',
|
||||
faucetUri: process.env.FAUCET_URI || 'https://faucet.oceanprotocol.com',
|
||||
ratingUri:
|
||||
process.env.RATING_URI ||
|
||||
'https://rating.pacific.marketplace.dev-ocean.com',
|
||||
providerUri:
|
||||
process.env.PROVIDER_URI || 'https://brizo.marketplace.oceanprotocol.com',
|
||||
factoryAddress:
|
||||
process.env.FACTORY_ADDRESS ||
|
||||
'0x00c6A0BC5cD0078d6Cd0b659E8061B404cfa5704',
|
||||
verbose: 3
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ module.exports = {
|
||||
{
|
||||
resolve: 'gatsby-source-ocean',
|
||||
options: {
|
||||
aquariusUri: oceanConfig.aquariusUri
|
||||
metadataStoreUri: oceanConfig.metadataStoreUri
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -2,18 +2,18 @@ const axios = require('axios')
|
||||
|
||||
exports.sourceNodes = async (
|
||||
{ actions, createNodeId, createContentDigest },
|
||||
{ aquariusUri }
|
||||
{ metadataStoreUri }
|
||||
) => {
|
||||
const { createNode } = actions
|
||||
|
||||
// Query for all assets to use in creating pages.
|
||||
const result = await axios(`${aquariusUri}/api/v1/aquarius/assets`)
|
||||
const result = await axios(`${metadataStoreUri}/api/v1/aquarius/assets`)
|
||||
|
||||
for (let i = 0; i < result.data.ids.length; i++) {
|
||||
const did = result.data.ids[i]
|
||||
|
||||
const metadataResult = await axios(
|
||||
`${aquariusUri}/api/v1/aquarius/assets/metadata/${did}`
|
||||
`${metadataStoreUri}/api/v1/aquarius/assets/metadata/${did}`
|
||||
)
|
||||
|
||||
const metadata = {
|
||||
@ -28,7 +28,7 @@ exports.sourceNodes = async (
|
||||
internal: {
|
||||
type: 'OceanAsset',
|
||||
contentDigest: createContentDigest(metadata),
|
||||
description: `All data sets queried from ${aquariusUri}`
|
||||
description: `All data sets queried from ${metadataStoreUri}`
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user