aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Evans <jacob@dekz.net>2019-01-12 13:50:16 +0800
committerJacob Evans <jacob@dekz.net>2019-01-12 15:50:05 +0800
commit043fb3f46021f3f46f87d96db3ab02b92c8ab254 (patch)
treec11938e16fd9d76153f4daa6e21021d3f3b2409c
parent34cce04c434cf34c7fc742aa1a3ccdb8c6f06a56 (diff)
downloaddexon-sol-tools-043fb3f46021f3f46f87d96db3ab02b92c8ab254.tar
dexon-sol-tools-043fb3f46021f3f46f87d96db3ab02b92c8ab254.tar.gz
dexon-sol-tools-043fb3f46021f3f46f87d96db3ab02b92c8ab254.tar.bz2
dexon-sol-tools-043fb3f46021f3f46f87d96db3ab02b92c8ab254.tar.lz
dexon-sol-tools-043fb3f46021f3f46f87d96db3ab02b92c8ab254.tar.xz
dexon-sol-tools-043fb3f46021f3f46f87d96db3ab02b92c8ab254.tar.zst
dexon-sol-tools-043fb3f46021f3f46f87d96db3ab02b92c8ab254.zip
Group similar setup transactions
-rw-r--r--packages/migrations/src/migration.ts15
1 files changed, 9 insertions, 6 deletions
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),
);