aboutsummaryrefslogtreecommitdiffstats
path: root/packages/migrations/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/migrations/src')
-rw-r--r--packages/migrations/src/2.0.0-beta-testnet/migration.ts23
-rw-r--r--packages/migrations/src/utils/constants.ts2
-rw-r--r--packages/migrations/src/utils/provider_factory.ts2
3 files changed, 13 insertions, 14 deletions
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 e8ce1d92d..19fe5f02c 100644
--- a/packages/migrations/src/2.0.0-beta-testnet/migration.ts
+++ b/packages/migrations/src/2.0.0-beta-testnet/migration.ts
@@ -1,3 +1,4 @@
+import { assetDataUtils } from '@0xproject/order-utils';
import { logUtils } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import { Provider, TxData } from 'ethereum-types';
@@ -40,26 +41,24 @@ export const runV2TestnetMigrationsAsync = async (
artifactsWriter.saveArtifact(erc721proxy);
// Deploy Exchange
- const exchange = await ExchangeContract.deployFrom0xArtifactAsync(artifacts.Exchange, provider, txDefaults);
+ const zrxAddressOnKovan = '0x6ff6c0ff1d68b964901f986d4c9fa3ac68346570';
+ const zrxAssetData = assetDataUtils.encodeERC20AssetData(zrxAddressOnKovan);
+ const exchange = await ExchangeContract.deployFrom0xArtifactAsync(
+ artifacts.Exchange,
+ provider,
+ txDefaults,
+ zrxAssetData,
+ );
artifactsWriter.saveArtifact(exchange);
let txHash;
// Register AssetProxies in Exchange
- const oldAssetProxy = constants.NULL_ADDRESS;
- txHash = await exchange.registerAssetProxy.sendTransactionAsync(
- constants.ERC20_PROXY_ID,
- erc20proxy.address,
- oldAssetProxy,
- );
+ txHash = await exchange.registerAssetProxy.sendTransactionAsync(erc20proxy.address);
logUtils.log(`transactionHash: ${txHash}`);
logUtils.log('Registering ERC20Proxy');
await web3Wrapper.awaitTransactionSuccessAsync(txHash);
- txHash = await exchange.registerAssetProxy.sendTransactionAsync(
- constants.ERC721_PROXY_ID,
- erc721proxy.address,
- oldAssetProxy,
- );
+ txHash = await exchange.registerAssetProxy.sendTransactionAsync(erc721proxy.address);
logUtils.log(`transactionHash: ${txHash}`);
logUtils.log('Registering ERC721Proxy');
await web3Wrapper.awaitTransactionSuccessAsync(txHash);
diff --git a/packages/migrations/src/utils/constants.ts b/packages/migrations/src/utils/constants.ts
index 53ce2f5f1..4ae2ff833 100644
--- a/packages/migrations/src/utils/constants.ts
+++ b/packages/migrations/src/utils/constants.ts
@@ -11,6 +11,6 @@ export const constants = {
ERC20_PROXY_ID: '0xf47261b0',
ERC721_PROXY_ID: '0x02571792',
NULL_ADDRESS: '0x0000000000000000000000000000000000000000',
- RPC_URL: 'http://localhost:8545',
+ KOVAN_RPC_URL: 'https://kovan.infura.io/',
KOVAN_NETWORK_ID: 42,
};
diff --git a/packages/migrations/src/utils/provider_factory.ts b/packages/migrations/src/utils/provider_factory.ts
index 5f69b258d..a0d4e436e 100644
--- a/packages/migrations/src/utils/provider_factory.ts
+++ b/packages/migrations/src/utils/provider_factory.ts
@@ -20,7 +20,7 @@ export const providerFactory = {
};
const ledgerSubprovider = new LedgerSubprovider(ledgerWalletConfigs);
provider.addProvider(ledgerSubprovider);
- provider.addProvider(new RPCSubprovider(constants.RPC_URL));
+ provider.addProvider(new RPCSubprovider(constants.KOVAN_RPC_URL));
provider.start();
return provider;
},