aboutsummaryrefslogtreecommitdiffstats
path: root/packages/migrations/src/2.0.0-beta-testnet
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-beta-testnet
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-beta-testnet')
-rw-r--r--packages/migrations/src/2.0.0-beta-testnet/artifacts.ts2
-rw-r--r--packages/migrations/src/2.0.0-beta-testnet/migration.ts10
2 files changed, 12 insertions, 0 deletions
diff --git a/packages/migrations/src/2.0.0-beta-testnet/artifacts.ts b/packages/migrations/src/2.0.0-beta-testnet/artifacts.ts
index c9a341eb3..5fcf14328 100644
--- a/packages/migrations/src/2.0.0-beta-testnet/artifacts.ts
+++ b/packages/migrations/src/2.0.0-beta-testnet/artifacts.ts
@@ -4,10 +4,12 @@ import * as AssetProxyOwner from '../../artifacts/2.0.0-beta-testnet/AssetProxyO
import * as ERC20Proxy from '../../artifacts/2.0.0-beta-testnet/ERC20Proxy.json';
import * as ERC721Proxy from '../../artifacts/2.0.0-beta-testnet/ERC721Proxy.json';
import * as Exchange from '../../artifacts/2.0.0-beta-testnet/Exchange.json';
+import * as OrderValidator from '../../artifacts/2.0.0-beta-testnet/OrderValidator.json';
export const artifacts = {
AssetProxyOwner: (AssetProxyOwner as any) as ContractArtifact,
Exchange: (Exchange as any) as ContractArtifact,
ERC20Proxy: (ERC20Proxy as any) as ContractArtifact,
ERC721Proxy: (ERC721Proxy as any) as ContractArtifact,
+ OrderValidator: (OrderValidator as any) as ContractArtifact,
};
diff --git a/packages/migrations/src/2.0.0-beta-testnet/migration.ts b/packages/migrations/src/2.0.0-beta-testnet/migration.ts
index 19fe5f02c..c5780615f 100644
--- a/packages/migrations/src/2.0.0-beta-testnet/migration.ts
+++ b/packages/migrations/src/2.0.0-beta-testnet/migration.ts
@@ -12,6 +12,7 @@ import { AssetProxyOwnerContract } from './contract_wrappers/asset_proxy_owner';
import { ERC20ProxyContract } from './contract_wrappers/erc20_proxy';
import { ERC721ProxyContract } from './contract_wrappers/erc721_proxy';
import { ExchangeContract } from './contract_wrappers/exchange';
+import { OrderValidatorContract } from './contract_wrappers/order_validator';
/**
* Custom migrations should be defined in this function. This will be called with the CLI 'migrate:v2-beta-testnet' command.
@@ -75,6 +76,15 @@ export const runV2TestnetMigrationsAsync = async (
);
artifactsWriter.saveArtifact(assetProxyOwner);
+ // Deploy OrderValidator
+ const orderValidator = await OrderValidatorContract.deployFrom0xArtifactAsync(
+ artifacts.OrderValidator,
+ provider,
+ txDefaults,
+ exchange.address,
+ );
+ artifactsWriter.saveArtifact(orderValidator);
+
// Authorize Exchange contracts to call AssetProxies
txHash = await erc20proxy.addAuthorizedAddress.sendTransactionAsync(exchange.address);
logUtils.log(`transactionHash: ${txHash}`);