From 043fb3f46021f3f46f87d96db3ab02b92c8ab254 Mon Sep 17 00:00:00 2001 From: Jacob Evans Date: Sat, 12 Jan 2019 16:50:16 +1100 Subject: Group similar setup transactions --- packages/migrations/src/migration.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'packages') diff --git a/packages/migrations/src/migration.ts b/packages/migrations/src/migration.ts index 8e6ae7726..e0f245017 100644 --- a/packages/migrations/src/migration.ts +++ b/packages/migrations/src/migration.ts @@ -83,20 +83,25 @@ export async function runMigrationsAsync(provider: Provider, txDefaults: Partial txDefaults, ); - // Note: Perform all setup after contract deployments to have consistent addresses - // available in the snapshots await web3Wrapper.awaitTransactionSuccessAsync( await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(exchange.address, { from: owner, }), ); await web3Wrapper.awaitTransactionSuccessAsync( - await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(multiAssetProxy.address, { + await erc721Proxy.addAuthorizedAddress.sendTransactionAsync(exchange.address, { from: owner, }), ); await web3Wrapper.awaitTransactionSuccessAsync( - await erc721Proxy.addAuthorizedAddress.sendTransactionAsync(exchange.address, { + await multiAssetProxy.addAuthorizedAddress.sendTransactionAsync(exchange.address, { + from: owner, + }), + ); + + // MultiAssetProxy + await web3Wrapper.awaitTransactionSuccessAsync( + await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(multiAssetProxy.address, { from: owner, }), ); @@ -105,8 +110,6 @@ export async function runMigrationsAsync(provider: Provider, txDefaults: Partial from: owner, }), ); - - // Register Asset Proxies to the MultiAssetProxy await web3Wrapper.awaitTransactionSuccessAsync( await multiAssetProxy.registerAssetProxy.sendTransactionAsync(erc20Proxy.address), ); -- cgit