mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
refactor network config
This commit is contained in:
parent
c7fdd37f56
commit
69f8a091d8
19
.env.example
19
.env.example
@ -1,16 +1,5 @@
|
||||
GATSBY_INFURA_PROJECT_ID="xxx"
|
||||
# Network, possible values: development, pacific, rinkeby, mainnet
|
||||
GATSBY_NETWORK="rinkeby"
|
||||
|
||||
# Local config
|
||||
GATSBY_NODE_URI='http://localhost:8545'
|
||||
GATSBY_METADATA_STORE_URI='http://aquarius:5000'
|
||||
GATSBY_PROVIDER_URI='http://localhost:8030'
|
||||
GATSBY_FACTORY_ADDRESS='0xxxx'
|
||||
#GATSBY_OCEAN_TOKEN_ADDRESS='0xxxx'
|
||||
|
||||
# Rinkeby
|
||||
#GATSBY_NODE_URI='https://rinkeby.infura.io/v3/GATSBY_INFURA_PROJECT_ID'
|
||||
#GATSBY_METADATA_STORE_URI='https://aquarius.rinkeby.v3.dev-ocean.com'
|
||||
#GATSBY_PROVIDER_URI='https://provider.rinkeby.v3.dev-ocean.com'
|
||||
#GATSBY_FACTORY_ADDRESS='0xcDfEe5D80041224cDCe9AE2334E85B3236385EA3'
|
||||
#GATSBY_OCEAN_TOKEN_ADDRESS='0x8967BCF84170c91B0d24D4302C2376283b0B3a07'
|
||||
#GATSBY_MARKET_ADDRESS='xxx'
|
||||
#GATSBY_INFURA_PROJECT_ID="xxx"
|
||||
#GATSBY_MARKET_ADDRESS="xxx"
|
@ -1,20 +1,13 @@
|
||||
const { ConfigHelper } = require('@oceanprotocol/lib')
|
||||
|
||||
const networkConfig = new ConfigHelper().getConfig(
|
||||
process.env.GATSBY_NETWORK || 'rinkeby'
|
||||
)
|
||||
|
||||
module.exports = {
|
||||
oceanConfig: {
|
||||
nodeUri:
|
||||
process.env.GATSBY_NODE_URI ||
|
||||
`https://rinkeby.infura.io/${process.env.GATSBY_INFURA_PROJECT_ID}`,
|
||||
metadataStoreUri:
|
||||
process.env.GATSBY_METADATA_STORE_URI ||
|
||||
'https://aquarius.rinkeby.v3.dev-ocean.com',
|
||||
providerUri:
|
||||
process.env.GATSBY_PROVIDER_URI ||
|
||||
'https://provider.rinkeby.v3.dev-ocean.com',
|
||||
factoryAddress:
|
||||
process.env.GATSBY_FACTORY_ADDRESS ||
|
||||
'0xcDfEe5D80041224cDCe9AE2334E85B3236385EA3',
|
||||
oceanTokenAddress:
|
||||
process.env.GATSBY_OCEAN_TOKEN_ADDRESS ||
|
||||
'0x8967BCF84170c91B0d24D4302C2376283b0B3a07',
|
||||
...networkConfig,
|
||||
url: `https://rinkeby.infura.io/${process.env.GATSBY_INFURA_PROJECT_ID}`,
|
||||
verbose: 3
|
||||
},
|
||||
// Main, Rinkeby, Kovan
|
||||
|
@ -18,9 +18,10 @@ const query = graphql`
|
||||
networks
|
||||
marketAddress
|
||||
oceanConfig {
|
||||
url
|
||||
factoryAddress
|
||||
oceanTokenAddress
|
||||
metadataStoreUri
|
||||
nodeUri
|
||||
providerUri
|
||||
verbose
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user