diff options
author | Fabio Berger <me@fabioberger.com> | 2018-07-25 19:12:26 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-07-25 19:12:26 +0800 |
commit | d3f9b72c84f46938adaa3afeb67a0212c4d8fef8 (patch) | |
tree | f4dbe0c08b6043ef2389a0239bcf33d8b0c6a73a /packages/migrations/src/2.0.0-beta-testnet | |
parent | 05b35c0fdcbca7980d4195e96ec791c1c2d13398 (diff) | |
download | dexon-0x-contracts-d3f9b72c84f46938adaa3afeb67a0212c4d8fef8.tar.gz dexon-0x-contracts-d3f9b72c84f46938adaa3afeb67a0212c4d8fef8.tar.zst dexon-0x-contracts-d3f9b72c84f46938adaa3afeb67a0212c4d8fef8.zip |
Update v2-beta-testnet migration
Diffstat (limited to 'packages/migrations/src/2.0.0-beta-testnet')
-rw-r--r-- | packages/migrations/src/2.0.0-beta-testnet/migration.ts | 10 |
1 files changed, 4 insertions, 6 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..f74d16906 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,25 +41,22 @@ 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, ); logUtils.log(`transactionHash: ${txHash}`); logUtils.log('Registering ERC20Proxy'); await web3Wrapper.awaitTransactionSuccessAsync(txHash); txHash = await exchange.registerAssetProxy.sendTransactionAsync( - constants.ERC721_PROXY_ID, erc721proxy.address, - oldAssetProxy, ); logUtils.log(`transactionHash: ${txHash}`); logUtils.log('Registering ERC721Proxy'); |