parent
49f930acf7
commit
47bc925aaf
@ -1,18 +1,18 @@ |
|||||||
import * as alfajores from '../../config/testnets/alfajores'; |
|
||||||
import * as kovan from '../../config/testnets/kovan'; |
|
||||||
import * as gorli from '../../config/testnets/gorli'; |
|
||||||
import * as fuji from '../../config/testnets/fuji'; |
|
||||||
import * as mumbai from '../../config/testnets/mumbai'; |
|
||||||
import { updateProviderDomain } from '../../src/provider'; |
import { updateProviderDomain } from '../../src/provider'; |
||||||
import { configPath } from './agentConfig'; |
import { configPath, networks } from './agentConfig'; |
||||||
import { makeAllConfigs } from '../../src/config'; |
import { makeCoreDeploys } from '../../src/core/CoreDeploy'; |
||||||
|
import { makeBridgeDeploys } from '../../src/bridge/BridgeDeploy'; |
||||||
|
|
||||||
updateProviderDomain('dev', configPath, [ |
|
||||||
makeAllConfigs(alfajores, (_) => _.devConfig), |
|
||||||
makeAllConfigs(kovan, (_) => _.devConfig), |
|
||||||
makeAllConfigs(gorli, (_) => _.devConfig), |
|
||||||
makeAllConfigs(fuji, (_) => _.devConfig), |
|
||||||
makeAllConfigs(mumbai, (_) => _.devConfig), |
|
||||||
]); |
|
||||||
|
|
||||||
|
const coreDeploys = makeCoreDeploys( |
||||||
|
configPath, |
||||||
|
networks, |
||||||
|
(_) => _.chain, |
||||||
|
(_) => _.devConfig, |
||||||
|
); |
||||||
|
const bridgeDeploys = makeBridgeDeploys( |
||||||
|
configPath, |
||||||
|
networks, |
||||||
|
(_) => _.chain, |
||||||
|
(_) => _.bridgeConfig, |
||||||
|
); |
||||||
|
updateProviderDomain('dev', coreDeploys, bridgeDeploys); |
||||||
|
@ -1,16 +0,0 @@ |
|||||||
import * as celo from '../../config/mainnets/celo'; |
|
||||||
import * as ethereum from '../../config/mainnets/ethereum'; |
|
||||||
import * as avalanche from '../../config/mainnets/avalanche'; |
|
||||||
import * as polygon from '../../config/mainnets/polygon'; |
|
||||||
import { updateProviderDomain } from '../../src/provider'; |
|
||||||
import { makeAllConfigs } from '../../src/config'; |
|
||||||
|
|
||||||
|
|
||||||
const configPath = '../../rust/config/production-community'; |
|
||||||
updateProviderDomain('mainnetCommunity', configPath, [ |
|
||||||
makeAllConfigs(celo, (_) => _.config), |
|
||||||
makeAllConfigs(ethereum, (_) => _.config), |
|
||||||
makeAllConfigs(avalanche, (_) => _.config), |
|
||||||
makeAllConfigs(polygon, (_) => _.config), |
|
||||||
]); |
|
||||||
|
|
@ -0,0 +1,8 @@ |
|||||||
|
import * as celo from '../../config/mainnets/celo'; |
||||||
|
import * as ethereum from '../../config/mainnets/ethereum'; |
||||||
|
import * as polygon from '../../config/mainnets/polygon'; |
||||||
|
import * as avalanche from '../../config/mainnets/avalanche'; |
||||||
|
|
||||||
|
const configDirectory = 'production-community' |
||||||
|
export const configPath = `../../rust/config/${configDirectory}`; |
||||||
|
export const networks = [celo, polygon, avalanche, ethereum]; |
@ -1,14 +1,18 @@ |
|||||||
import * as celo from '../../config/mainnets/celo'; |
|
||||||
import * as ethereum from '../../config/mainnets/ethereum'; |
|
||||||
import * as polygon from '../../config/mainnets/polygon'; |
|
||||||
import { updateProviderDomain } from '../../src/provider'; |
import { updateProviderDomain } from '../../src/provider'; |
||||||
import { makeAllConfigs } from '../../src/config'; |
import { makeCoreDeploys } from '../../src/core/CoreDeploy'; |
||||||
|
import { makeBridgeDeploys } from '../../src/bridge/BridgeDeploy'; |
||||||
|
import { configPath, networks } from './agentConfig'; |
||||||
const configPath = '../../rust/config/mainnet'; |
|
||||||
updateProviderDomain('mainnet', configPath, [ |
|
||||||
makeAllConfigs(ethereum, (_) => _.config), |
|
||||||
makeAllConfigs(polygon, (_) => _.config), |
|
||||||
makeAllConfigs(celo, (_) => _.config), |
|
||||||
]); |
|
||||||
|
|
||||||
|
const coreDeploys = makeCoreDeploys( |
||||||
|
configPath, |
||||||
|
networks, |
||||||
|
(_) => _.chain, |
||||||
|
(_) => _.config, |
||||||
|
); |
||||||
|
const bridgeDeploys = makeBridgeDeploys( |
||||||
|
configPath, |
||||||
|
networks, |
||||||
|
(_) => _.chain, |
||||||
|
(_) => _.bridgeConfig, |
||||||
|
); |
||||||
|
updateProviderDomain('mainnetCommunity', coreDeploys, bridgeDeploys); |
||||||
|
@ -1,16 +1,20 @@ |
|||||||
import * as alfajores from '../../config/testnets/alfajores'; |
|
||||||
import * as kovan from '../../config/testnets/kovan'; |
|
||||||
import * as gorli from '../../config/testnets/gorli'; |
|
||||||
import * as ropsten from '../../config/testnets/ropsten'; |
|
||||||
import { updateProviderDomain } from '../../src/provider'; |
|
||||||
import { makeAllConfigs } from '../../src/config'; |
|
||||||
|
|
||||||
|
import { updateProviderDomain } from '../../src/provider'; |
||||||
|
import { makeCoreDeploys } from '../../src/core/CoreDeploy'; |
||||||
|
import { makeBridgeDeploys } from '../../src/bridge/BridgeDeploy'; |
||||||
|
import { configPath, networks } from './agentConfig'; |
||||||
|
|
||||||
const configPath = '../../rust/config/staging-community'; |
const coreDeploys = makeCoreDeploys( |
||||||
updateProviderDomain('stagingCommunity', configPath, [ |
configPath, |
||||||
makeAllConfigs(alfajores, (_) => _.devConfig), |
networks, |
||||||
makeAllConfigs(ropsten, (_) => _.devConfig), |
(_) => _.chain, |
||||||
makeAllConfigs(kovan, (_) => _.devConfig), |
(_) => _.stagingCommunityConfig, |
||||||
makeAllConfigs(gorli, (_) => _.devConfig), |
); |
||||||
]); |
const bridgeDeploys = makeBridgeDeploys( |
||||||
|
configPath, |
||||||
|
networks, |
||||||
|
(_) => _.chain, |
||||||
|
(_) => _.bridgeConfig, |
||||||
|
); |
||||||
|
updateProviderDomain('mainnet', coreDeploys, bridgeDeploys); |
||||||
|
|
||||||
|
@ -1,14 +0,0 @@ |
|||||||
import * as alfajores from '../../config/testnets/alfajores'; |
|
||||||
import * as kovan from '../../config/testnets/kovan'; |
|
||||||
import * as rinkeby from '../../config/testnets/rinkeby'; |
|
||||||
import { updateProviderDomain } from '../../src/provider'; |
|
||||||
import { makeAllConfigs } from '../../src/config'; |
|
||||||
|
|
||||||
|
|
||||||
const configPath = '../../rust/config/staging'; |
|
||||||
updateProviderDomain('staging', configPath, [ |
|
||||||
makeAllConfigs(alfajores, (_) => _.devConfig), |
|
||||||
makeAllConfigs(kovan, (_) => _.devConfig), |
|
||||||
makeAllConfigs(rinkeby, (_) => _.devConfig), |
|
||||||
]); |
|
||||||
|
|
@ -1,14 +0,0 @@ |
|||||||
import { BridgeConfig } from './bridge/BridgeDeploy'; |
|
||||||
import { CoreConfig } from './core/CoreDeploy'; |
|
||||||
import { Chain } from './chain'; |
|
||||||
|
|
||||||
export interface AllConfigs { |
|
||||||
chain: Chain; |
|
||||||
coreConfig: CoreConfig; |
|
||||||
bridgeConfig: BridgeConfig; |
|
||||||
} |
|
||||||
|
|
||||||
// The accessor is necessary as a network may have multiple core configs
|
|
||||||
export function makeAllConfigs<V>(data: V, coreConfigAccessor: (data: V) => CoreConfig) { |
|
||||||
return { ...data, coreConfig: coreConfigAccessor(data) }; |
|
||||||
} |
|
Loading…
Reference in new issue