aboutsummaryrefslogtreecommitdiffstats
path: root/packages/migrations/src/2.0.0
diff options
context:
space:
mode:
authorAmir Bandeali <abandeali1@gmail.com>2018-08-20 11:56:21 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-08-22 04:53:38 +0800
commit3d25758b1d107528b0bc8a578e3c5ecf020395b3 (patch)
treefe1a32ce5caa37e0549e3c9577e7ed4ebbda768b /packages/migrations/src/2.0.0
parentdafb282432f51b670e5117e70e7a15cd64aea899 (diff)
downloaddexon-0x-contracts-3d25758b1d107528b0bc8a578e3c5ecf020395b3.tar.gz
dexon-0x-contracts-3d25758b1d107528b0bc8a578e3c5ecf020395b3.tar.zst
dexon-0x-contracts-3d25758b1d107528b0bc8a578e3c5ecf020395b3.zip
Add OrderValidator to migrations
Diffstat (limited to 'packages/migrations/src/2.0.0')
-rw-r--r--packages/migrations/src/2.0.0/artifacts.ts2
-rw-r--r--packages/migrations/src/2.0.0/migration.ts12
2 files changed, 14 insertions, 0 deletions
diff --git a/packages/migrations/src/2.0.0/artifacts.ts b/packages/migrations/src/2.0.0/artifacts.ts
index 8bbd1fcd9..da0dec6c0 100644
--- a/packages/migrations/src/2.0.0/artifacts.ts
+++ b/packages/migrations/src/2.0.0/artifacts.ts
@@ -7,6 +7,7 @@ import * as ERC20Proxy from '../../artifacts/2.0.0/ERC20Proxy.json';
import * as ERC721Proxy from '../../artifacts/2.0.0/ERC721Proxy.json';
import * as Exchange from '../../artifacts/2.0.0/Exchange.json';
import * as Forwarder from '../../artifacts/2.0.0/Forwarder.json';
+import * as OrderValidator from '../../artifacts/2.0.0/OrderValidator.json';
import * as WETH9 from '../../artifacts/2.0.0/WETH9.json';
import * as ZRX from '../../artifacts/2.0.0/ZRXToken.json';
@@ -20,4 +21,5 @@ export const artifacts = {
ERC20Proxy: (ERC20Proxy as any) as ContractArtifact,
ERC721Proxy: (ERC721Proxy as any) as ContractArtifact,
Forwarder: (Forwarder as any) as ContractArtifact,
+ OrderValidator: (OrderValidator as any) as ContractArtifact,
};
diff --git a/packages/migrations/src/2.0.0/migration.ts b/packages/migrations/src/2.0.0/migration.ts
index 0566e67e8..bddb020d2 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';
@@ -75,6 +76,7 @@ export const runV2MigrationsAsync = async (provider: Provider, artifactsDir: str
secondsRequired,
);
artifactsWriter.saveArtifact(assetProxyOwner);
+
await web3Wrapper.awaitTransactionSuccessAsync(
await erc20proxy.addAuthorizedAddress.sendTransactionAsync(exchange.address, {
from: owner,
@@ -139,4 +141,14 @@ export const runV2MigrationsAsync = async (provider: Provider, artifactsDir: str
assetDataUtils.encodeERC20AssetData(etherToken.address),
);
artifactsWriter.saveArtifact(forwarder);
+
+ // OrderValidator
+ const orderValidator = await OrderValidatorContract.deployFrom0xArtifactAsync(
+ artifacts.OrderValidator,
+ provider,
+ txDefaults,
+ exchange.address,
+ zrxAssetData,
+ );
+ artifactsWriter.saveArtifact(orderValidator);
};