mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
Merge pull request #164 from oceanprotocol/feature/rinkeby_helper
add rinkeby to known configs
This commit is contained in:
commit
4455c70af8
@ -3,21 +3,41 @@ export interface ConfigHelper {
|
|||||||
url: string
|
url: string
|
||||||
factoryAddress: string
|
factoryAddress: string
|
||||||
oceanTokenAddress: string
|
oceanTokenAddress: string
|
||||||
|
metadataStoreUri: string
|
||||||
|
providerUri: string
|
||||||
}
|
}
|
||||||
|
|
||||||
const configs = [
|
const configs = [
|
||||||
{ network: 'development', url: 'http://localhost:8545', factoryAddress: null },
|
{
|
||||||
|
network: 'development',
|
||||||
|
url: 'http://localhost:8545',
|
||||||
|
factoryAddress: null,
|
||||||
|
metadataStoreUri: 'http://127.0.0.1:5000',
|
||||||
|
providerUri: 'http://127.0.0.1:8030'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
network: 'pacific',
|
network: 'pacific',
|
||||||
url: 'https://pacific.oceanprotocol.com',
|
url: 'https://pacific.oceanprotocol.com',
|
||||||
factoryAddress: '0x1234',
|
factoryAddress: '0x1234',
|
||||||
oceanTokenAddress: '0x012578f9381e876A9E2a9111Dfd436FF91A451ae'
|
oceanTokenAddress: '0x012578f9381e876A9E2a9111Dfd436FF91A451ae',
|
||||||
|
metadataStoreUri: null,
|
||||||
|
providerUri: null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
network: 'rinkeby',
|
||||||
|
url: 'https://rinkeby.infura.io/v3/YOUR-PROJECT-ID',
|
||||||
|
factoryAddress: '0xB9d406D24B310A7D821D0b782a36909e8c925471',
|
||||||
|
oceanTokenAddress: '0x8967BCF84170c91B0d24D4302C2376283b0B3a07',
|
||||||
|
metadataStoreUri: 'https://aquarius.rinkeby.v3.dev-ocean.com/',
|
||||||
|
providerUri: 'https://provider.rinkeby.v3.dev-ocean.com/'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
network: 'mainnet',
|
network: 'mainnet',
|
||||||
url: 'https://mainnet.infura.io/v3/YOUR-PROJECT-ID',
|
url: 'https://mainnet.infura.io/v3/YOUR-PROJECT-ID',
|
||||||
factoryAddress: '0x1234',
|
factoryAddress: '0x1234',
|
||||||
oceanTokenAddress: '0x985dd3d42de1e256d09e1c10f112bccb8015ad41'
|
oceanTokenAddress: '0x985dd3d42de1e256d09e1c10f112bccb8015ad41',
|
||||||
|
metadataStoreUri: null,
|
||||||
|
providerUri: null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -29,12 +49,17 @@ export class ConfigHelper {
|
|||||||
confighelp.url = null
|
confighelp.url = null
|
||||||
confighelp.network = network
|
confighelp.network = network
|
||||||
confighelp.oceanTokenAddress = null
|
confighelp.oceanTokenAddress = null
|
||||||
|
confighelp.metadataStoreUri = null
|
||||||
|
confighelp.providerUri = null
|
||||||
|
|
||||||
const knownconfig = configs.find((c) => c.network === network)
|
const knownconfig = configs.find((c) => c.network === network)
|
||||||
if (knownconfig) {
|
if (knownconfig) {
|
||||||
confighelp.factoryAddress = knownconfig.factoryAddress
|
confighelp.factoryAddress = knownconfig.factoryAddress
|
||||||
confighelp.oceanTokenAddress = knownconfig.oceanTokenAddress
|
confighelp.oceanTokenAddress = knownconfig.oceanTokenAddress
|
||||||
confighelp.url = knownconfig.url
|
confighelp.url = knownconfig.url
|
||||||
confighelp.network = knownconfig.network
|
confighelp.network = knownconfig.network
|
||||||
|
confighelp.metadataStoreUri = knownconfig.metadataStoreUri
|
||||||
|
confighelp.providerUri = knownconfig.providerUri
|
||||||
}
|
}
|
||||||
return confighelp
|
return confighelp
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user