aboutsummaryrefslogtreecommitdiffstats
path: root/packages/migrations/src/2.0.0/migration.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/migrations/src/2.0.0/migration.ts')
-rw-r--r--packages/migrations/src/2.0.0/migration.ts22
1 files changed, 14 insertions, 8 deletions
diff --git a/packages/migrations/src/2.0.0/migration.ts b/packages/migrations/src/2.0.0/migration.ts
index f51c236de..1c30fb9ec 100644
--- a/packages/migrations/src/2.0.0/migration.ts
+++ b/packages/migrations/src/2.0.0/migration.ts
@@ -14,6 +14,7 @@ import { ERC20ProxyContract } from './contract_wrappers/erc20_proxy';
import { ERC721ProxyContract } from './contract_wrappers/erc721_proxy';
import { ExchangeContract } from './contract_wrappers/exchange';
import { ForwarderContract } from './contract_wrappers/forwarder';
+import { OrderValidatorContract } from './contract_wrappers/order_validator';
import { WETH9Contract } from './contract_wrappers/weth9';
import { ZRXTokenContract } from './contract_wrappers/zrx_token';
@@ -49,12 +50,8 @@ export const runV2MigrationsAsync = async (provider: Provider, artifactsDir: str
artifactsWriter.saveArtifact(etherToken);
// Exchange
- const exchange = await ExchangeContract.deployFrom0xArtifactAsync(
- artifacts.Exchange,
- provider,
- txDefaults,
- assetDataUtils.encodeERC20AssetData(zrxToken.address),
- );
+ const zrxAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address);
+ const exchange = await ExchangeContract.deployFrom0xArtifactAsync(artifacts.Exchange, provider, txDefaults);
artifactsWriter.saveArtifact(exchange);
// Multisigs
@@ -75,6 +72,7 @@ export const runV2MigrationsAsync = async (provider: Provider, artifactsDir: str
secondsRequired,
);
artifactsWriter.saveArtifact(assetProxyOwner);
+
await web3Wrapper.awaitTransactionSuccessAsync(
await erc20proxy.addAuthorizedAddress.sendTransactionAsync(exchange.address, {
from: owner,
@@ -135,10 +133,18 @@ export const runV2MigrationsAsync = async (provider: Provider, artifactsDir: str
provider,
txDefaults,
exchange.address,
- etherToken.address,
- zrxToken.address,
assetDataUtils.encodeERC20AssetData(zrxToken.address),
assetDataUtils.encodeERC20AssetData(etherToken.address),
);
artifactsWriter.saveArtifact(forwarder);
+
+ // OrderValidator
+ const orderValidator = await OrderValidatorContract.deployFrom0xArtifactAsync(
+ artifacts.OrderValidator,
+ provider,
+ txDefaults,
+ exchange.address,
+ zrxAssetData,
+ );
+ artifactsWriter.saveArtifact(orderValidator);
};