From 9cab034448c67a69dd2bb72c36afc429943cb106 Mon Sep 17 00:00:00 2001 From: Lawrence Forman Date: Mon, 1 Jun 2020 15:14:45 -0400 Subject: [PATCH] `@0x/migrations`: Use new `ContractAddresses` type. --- packages/migrations/CHANGELOG.json | 4 +++ packages/migrations/src/migration.ts | 46 ++++++++++++++++------------ 2 files changed, 31 insertions(+), 19 deletions(-) diff --git a/packages/migrations/CHANGELOG.json b/packages/migrations/CHANGELOG.json index 7b684c83d1..eecbc63a11 100644 --- a/packages/migrations/CHANGELOG.json +++ b/packages/migrations/CHANGELOG.json @@ -13,6 +13,10 @@ { "note": "Added `UniswapV2Bridge` address on Mainnet", "pr": 2599 + }, + { + "note": "Return emtpy Exchange Proxy addresses", + "pr": 2591 } ] }, diff --git a/packages/migrations/src/migration.ts b/packages/migrations/src/migration.ts index 94561d79bf..edeb62ec7e 100644 --- a/packages/migrations/src/migration.ts +++ b/packages/migrations/src/migration.ts @@ -49,6 +49,8 @@ const allArtifacts = { ...erc20BridgeSamplerArtifacts, }; +const { NULL_ADDRESS } = constants; + /** * Creates and deploys all the contracts that are required for the latest * version of the 0x protocol. @@ -202,8 +204,8 @@ export async function runMigrationsAsync( txDefaults, allArtifacts, exchange.address, - constants.NULL_ADDRESS, - constants.NULL_ADDRESS, + NULL_ADDRESS, + NULL_ADDRESS, ); // tslint:disable-next-line:no-unused-variable @@ -278,7 +280,7 @@ export async function runMigrationsAsync( txDefaults, allArtifacts, exchange.address, - exchangeV2Address || constants.NULL_ADDRESS, + exchangeV2Address || NULL_ADDRESS, etherToken.address, ); @@ -297,33 +299,39 @@ export async function runMigrationsAsync( zrxToken: zrxToken.address, etherToken: etherToken.address, exchange: exchange.address, - assetProxyOwner: constants.NULL_ADDRESS, + assetProxyOwner: NULL_ADDRESS, erc20BridgeProxy: erc20BridgeProxy.address, - zeroExGovernor: constants.NULL_ADDRESS, + zeroExGovernor: NULL_ADDRESS, forwarder: forwarder.address, coordinatorRegistry: coordinatorRegistry.address, coordinator: coordinator.address, multiAssetProxy: multiAssetProxy.address, staticCallProxy: staticCallProxy.address, devUtils: devUtils.address, - exchangeV2: exchangeV2Address || constants.NULL_ADDRESS, + exchangeV2: exchangeV2Address || NULL_ADDRESS, zrxVault: zrxVault.address, staking: stakingLogic.address, stakingProxy: stakingProxy.address, - uniswapBridge: constants.NULL_ADDRESS, - uniswapV2Bridge: constants.NULL_ADDRESS, - eth2DaiBridge: constants.NULL_ADDRESS, - kyberBridge: constants.NULL_ADDRESS, + uniswapBridge: NULL_ADDRESS, + eth2DaiBridge: NULL_ADDRESS, + kyberBridge: NULL_ADDRESS, erc20BridgeSampler: erc20BridgeSampler.address, - chaiBridge: constants.NULL_ADDRESS, - dydxBridge: constants.NULL_ADDRESS, - curveBridge: constants.NULL_ADDRESS, - godsUnchainedValidator: constants.NULL_ADDRESS, - broker: constants.NULL_ADDRESS, - chainlinkStopLimit: constants.NULL_ADDRESS, - maximumGasPrice: constants.NULL_ADDRESS, - dexForwarderBridge: constants.NULL_ADDRESS, - multiBridge: constants.NULL_ADDRESS, + chaiBridge: NULL_ADDRESS, + dydxBridge: NULL_ADDRESS, + curveBridge: NULL_ADDRESS, + godsUnchainedValidator: NULL_ADDRESS, + broker: NULL_ADDRESS, + chainlinkStopLimit: NULL_ADDRESS, + maximumGasPrice: NULL_ADDRESS, + dexForwarderBridge: NULL_ADDRESS, + multiBridge: NULL_ADDRESS, + exchangeProxy: NULL_ADDRESS, + exchangeProxyAllowanceTarget: NULL_ADDRESS, + transformers: { + wethTransformer: NULL_ADDRESS, + payTakerTransformer: NULL_ADDRESS, + fillQuoteTransformer: NULL_ADDRESS, + }, }; return contractAddresses; }