diff options
Diffstat (limited to 'packages/contracts/migrations/2_deploy_independent_contracts.ts')
-rw-r--r-- | packages/contracts/migrations/2_deploy_independent_contracts.ts | 63 |
1 files changed, 32 insertions, 31 deletions
diff --git a/packages/contracts/migrations/2_deploy_independent_contracts.ts b/packages/contracts/migrations/2_deploy_independent_contracts.ts index 10947655b..878860eb6 100644 --- a/packages/contracts/migrations/2_deploy_independent_contracts.ts +++ b/packages/contracts/migrations/2_deploy_independent_contracts.ts @@ -1,43 +1,44 @@ import {Artifacts} from '../util/artifacts'; import {ContractInstance, MultiSigConfigByNetwork} from '../util/types'; const { - MultiSigWalletWithTimeLock, - TokenTransferProxy, - EtherToken, - TokenRegistry, + MultiSigWalletWithTimeLock, + TokenTransferProxy, + EtherToken, + TokenRegistry, } = new Artifacts(artifacts); let multiSigConfigByNetwork: MultiSigConfigByNetwork; try { - /* tslint:disable */ - const multiSigConfig = require('./config/multisig'); - multiSigConfigByNetwork = multiSigConfig.multiSig; - /* tslint:enable */ + /* tslint:disable */ + const multiSigConfig = require('./config/multisig'); + multiSigConfigByNetwork = multiSigConfig.multiSig; + /* tslint:enable */ } catch (e) { - multiSigConfigByNetwork = {}; + multiSigConfigByNetwork = {}; } module.exports = (deployer: any, network: string, accounts: string[]) => { - const defaultConfig = { - owners: [accounts[0], accounts[1]], - confirmationsRequired: 2, - secondsRequired: 0, - }; - const config = multiSigConfigByNetwork[network] || defaultConfig; - if (network !== 'live') { - deployer.deploy(MultiSigWalletWithTimeLock, config.owners, config.confirmationsRequired, config.secondsRequired) - .then(() => { - return deployer.deploy(TokenTransferProxy); - }).then(() => { - return deployer.deploy(TokenRegistry); - }).then(() => { - return deployer.deploy(EtherToken); - }); - } else { - deployer.deploy([ - [MultiSigWalletWithTimeLock, config.owners, config.confirmationsRequired, config.secondsRequired], - TokenTransferProxy, - TokenRegistry, - ]); - } + const defaultConfig = { + owners: [accounts[0], accounts[1]], + confirmationsRequired: 2, + secondsRequired: 0, + }; + const config = multiSigConfigByNetwork[network] || defaultConfig; + if (network !== 'live') { + deployer.deploy(MultiSigWalletWithTimeLock, config.owners, + config.confirmationsRequired, config.secondsRequired) + .then(() => { + return deployer.deploy(TokenTransferProxy); + }).then(() => { + return deployer.deploy(TokenRegistry); + }).then(() => { + return deployer.deploy(EtherToken); + }); + } else { + deployer.deploy([ + [MultiSigWalletWithTimeLock, config.owners, config.confirmationsRequired, config.secondsRequired], + TokenTransferProxy, + TokenRegistry, + ]); + } }; |