aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/contract-addresses/src/index.ts8
-rw-r--r--packages/migrations/src/migration.ts44
2 files changed, 30 insertions, 22 deletions
diff --git a/packages/contract-addresses/src/index.ts b/packages/contract-addresses/src/index.ts
index 4630d84ca..e319181a5 100644
--- a/packages/contract-addresses/src/index.ts
+++ b/packages/contract-addresses/src/index.ts
@@ -75,10 +75,10 @@ const networkToAddresses: { [networkId: number]: ContractAddresses } = {
zrxToken: '0x871dd7c2b4b25e1aa18728e9d5f2af4c4e431f5c',
etherToken: '0x0b1ba0af832d7c05fd64161e0db78e85978e8082',
exchange: '0x48bacb9266a570d521063ef5dd96e61686dbe788',
- assetProxyOwner: '0x34d402f14d58e001d8efbe6585051bf9706aa064',
- forwarder: '0xdc688d29394a3f1e6f1e5100862776691afaf3d2',
- orderValidator: '0xb7c9b454221e26880eb9c3101b3295ca7d8279ef',
- dutchAuction: '0x6000eca38b8b5bba64986182fe2a69c57f6b5414',
+ assetProxyOwner: '0x7e3f4e1deb8d3a05d9d2da87d9521268d0ec3239',
+ forwarder: '0xb7c9b454221e26880eb9c3101b3295ca7d8279ef',
+ orderValidator: '0x6000eca38b8b5bba64986182fe2a69c57f6b5414',
+ dutchAuction: '0x32eecaf51dfea9618e9bc94e9fbfddb1bbdcba15',
},
};
diff --git a/packages/migrations/src/migration.ts b/packages/migrations/src/migration.ts
index 3d97409e6..8e6ae7726 100644
--- a/packages/migrations/src/migration.ts
+++ b/packages/migrations/src/migration.ts
@@ -18,6 +18,8 @@ import { erc20TokenInfo, erc721TokenInfo } from './utils/token_info';
*/
export async function runMigrationsAsync(provider: Provider, txDefaults: Partial<TxData>): Promise<ContractAddresses> {
const web3Wrapper = new Web3Wrapper(provider);
+ const accounts: string[] = await web3Wrapper.getAvailableAddressesAsync();
+ const owner = accounts[0];
// Proxies
const erc20Proxy = await wrappers.ERC20ProxyContract.deployFrom0xArtifactAsync(
@@ -50,24 +52,6 @@ export async function runMigrationsAsync(provider: Provider, txDefaults: Partial
zrxAssetData,
);
- // Multisigs
- const accounts: string[] = await web3Wrapper.getAvailableAddressesAsync();
- const owners = [accounts[0], accounts[1]];
- const confirmationsRequired = new BigNumber(2);
- const secondsRequired = new BigNumber(0);
- const owner = accounts[0];
-
- // AssetProxyOwner
- const assetProxyOwner = await wrappers.AssetProxyOwnerContract.deployFrom0xArtifactAsync(
- artifacts.AssetProxyOwner,
- provider,
- txDefaults,
- owners,
- [erc20Proxy.address, erc721Proxy.address],
- confirmationsRequired,
- secondsRequired,
- );
-
// Dummy ERC20 tokens
for (const token of erc20TokenInfo) {
const totalSupply = new BigNumber(1000000000000000000000000000);
@@ -122,6 +106,14 @@ export async function runMigrationsAsync(provider: Provider, txDefaults: Partial
}),
);
+ // Register Asset Proxies to the MultiAssetProxy
+ await web3Wrapper.awaitTransactionSuccessAsync(
+ await multiAssetProxy.registerAssetProxy.sendTransactionAsync(erc20Proxy.address),
+ );
+ await web3Wrapper.awaitTransactionSuccessAsync(
+ await multiAssetProxy.registerAssetProxy.sendTransactionAsync(erc721Proxy.address),
+ );
+
// Register the Asset Proxies to the Exchange
await web3Wrapper.awaitTransactionSuccessAsync(
await exchange.registerAssetProxy.sendTransactionAsync(erc20Proxy.address),
@@ -160,6 +152,22 @@ export async function runMigrationsAsync(provider: Provider, txDefaults: Partial
exchange.address,
);
+ // Multisigs
+ const owners = [accounts[0], accounts[1]];
+ const confirmationsRequired = new BigNumber(2);
+ const secondsRequired = new BigNumber(0);
+
+ // AssetProxyOwner
+ const assetProxyOwner = await wrappers.AssetProxyOwnerContract.deployFrom0xArtifactAsync(
+ artifacts.AssetProxyOwner,
+ provider,
+ txDefaults,
+ owners,
+ [erc20Proxy.address, erc721Proxy.address, multiAssetProxy.address],
+ confirmationsRequired,
+ secondsRequired,
+ );
+
// Transfer Ownership to the Asset Proxy Owner
await web3Wrapper.awaitTransactionSuccessAsync(
await erc20Proxy.transferOwnership.sendTransactionAsync(assetProxyOwner.address, {