mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +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'
|
NODE_URI='http://localhost:8545'
|
||||||
AQUARIUS_URI='http://aquarius:5000'
|
METADATA_STORE_URI='http://aquarius:5000'
|
||||||
BRIZO_URI='http://localhost:8030'
|
PROVIDER_URI='http://localhost:8030'
|
||||||
BRIZO_ADDRESS='0x068ed00cf0441e4829d9784fcbe7b9e26d4bd8d0'
|
FACTORY_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'
|
|
||||||
|
|
||||||
#Pacific market
|
#Pacific market
|
||||||
#NODE_URI='https://pacific.oceanprotocol.com'
|
#NODE_URI='https://pacific.oceanprotocol.com'
|
||||||
#AQUARIUS_URI='https://aquarius.pacific.market.dev-ocean.com'
|
#METADATA_STORE_URI='https://aquarius.pacific.market.dev-ocean.com'
|
||||||
#BRIZO_URI='https://brizo.pacific.market.dev-ocean.com'
|
#PROVIDER_URI='https://brizo.pacific.market.dev-ocean.com'
|
||||||
#BRIZO_ADDRESS='0xeD792C5FcC8bF3322a6ba89A6e51eF0B6fB3C530'
|
#FACTORY_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'
|
|
||||||
|
@ -1,19 +1,14 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
oceanConfig: {
|
oceanConfig: {
|
||||||
nodeUri: process.env.NODE_URI || 'https://pacific.oceanprotocol.com',
|
nodeUri: process.env.NODE_URI || 'https://pacific.oceanprotocol.com',
|
||||||
aquariusUri:
|
metadataStoreUri:
|
||||||
process.env.AQUARIUS_URI ||
|
process.env.METADATA_STORE_URI ||
|
||||||
'https://aquarius.marketplace.oceanprotocol.com',
|
'https://aquarius.marketplace.oceanprotocol.com',
|
||||||
brizoUri:
|
providerUri:
|
||||||
process.env.BRIZO_URI || 'https://brizo.marketplace.oceanprotocol.com',
|
process.env.PROVIDER_URI || 'https://brizo.marketplace.oceanprotocol.com',
|
||||||
brizoAddress:
|
factoryAddress:
|
||||||
process.env.BRIZO_ADDRESS || '0x00c6A0BC5cD0078d6Cd0b659E8061B404cfa5704',
|
process.env.FACTORY_ADDRESS ||
|
||||||
secretStoreUri:
|
'0x00c6A0BC5cD0078d6Cd0b659E8061B404cfa5704',
|
||||||
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',
|
|
||||||
verbose: 3
|
verbose: 3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ module.exports = {
|
|||||||
{
|
{
|
||||||
resolve: 'gatsby-source-ocean',
|
resolve: 'gatsby-source-ocean',
|
||||||
options: {
|
options: {
|
||||||
aquariusUri: oceanConfig.aquariusUri
|
metadataStoreUri: oceanConfig.metadataStoreUri
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -2,18 +2,18 @@ const axios = require('axios')
|
|||||||
|
|
||||||
exports.sourceNodes = async (
|
exports.sourceNodes = async (
|
||||||
{ actions, createNodeId, createContentDigest },
|
{ actions, createNodeId, createContentDigest },
|
||||||
{ aquariusUri }
|
{ metadataStoreUri }
|
||||||
) => {
|
) => {
|
||||||
const { createNode } = actions
|
const { createNode } = actions
|
||||||
|
|
||||||
// Query for all assets to use in creating pages.
|
// 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++) {
|
for (let i = 0; i < result.data.ids.length; i++) {
|
||||||
const did = result.data.ids[i]
|
const did = result.data.ids[i]
|
||||||
|
|
||||||
const metadataResult = await axios(
|
const metadataResult = await axios(
|
||||||
`${aquariusUri}/api/v1/aquarius/assets/metadata/${did}`
|
`${metadataStoreUri}/api/v1/aquarius/assets/metadata/${did}`
|
||||||
)
|
)
|
||||||
|
|
||||||
const metadata = {
|
const metadata = {
|
||||||
@ -28,7 +28,7 @@ exports.sourceNodes = async (
|
|||||||
internal: {
|
internal: {
|
||||||
type: 'OceanAsset',
|
type: 'OceanAsset',
|
||||||
contentDigest: createContentDigest(metadata),
|
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