diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-06-09 04:12:07 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-06-09 05:56:45 +0800 |
commit | 25866095dbc7ae7e08f1f44939c7cf1910d50b6b (patch) | |
tree | 58b3767a3b0aff9ed97b480948711377464cdbcf /packages/migrations | |
parent | b6c8d8e9712eafd7e93f061ea41fb47dc1ca2788 (diff) | |
download | dexon-sol-tools-25866095dbc7ae7e08f1f44939c7cf1910d50b6b.tar.gz dexon-sol-tools-25866095dbc7ae7e08f1f44939c7cf1910d50b6b.tar.zst dexon-sol-tools-25866095dbc7ae7e08f1f44939c7cf1910d50b6b.zip |
Await transactions in migrations
Diffstat (limited to 'packages/migrations')
-rw-r--r-- | packages/migrations/src/v2/migration.ts | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/packages/migrations/src/v2/migration.ts b/packages/migrations/src/v2/migration.ts index 64f5d2d8b..f77063a1b 100644 --- a/packages/migrations/src/v2/migration.ts +++ b/packages/migrations/src/v2/migration.ts @@ -73,10 +73,18 @@ export const runV2MigrationsAsync = async (provider: Provider, artifactsDir: str secondsRequired, ); artifactsWriter.saveArtifact(assetProxyOwner); - await erc20proxy.addAuthorizedAddress.sendTransactionAsync(exchange.address, { from: owner }); - await erc20proxy.transferOwnership.sendTransactionAsync(assetProxyOwner.address, { from: owner }); - await erc721proxy.addAuthorizedAddress.sendTransactionAsync(exchange.address, { from: owner }); - await erc721proxy.transferOwnership.sendTransactionAsync(assetProxyOwner.address, { from: owner }); + await web3Wrapper.awaitTransactionSuccessAsync( + await erc20proxy.addAuthorizedAddress.sendTransactionAsync(exchange.address, { from: owner }), + ); + await web3Wrapper.awaitTransactionSuccessAsync( + await erc20proxy.transferOwnership.sendTransactionAsync(assetProxyOwner.address, { from: owner }), + ); + await web3Wrapper.awaitTransactionSuccessAsync( + await erc721proxy.addAuthorizedAddress.sendTransactionAsync(exchange.address, { from: owner }), + ); + await web3Wrapper.awaitTransactionSuccessAsync( + await erc721proxy.transferOwnership.sendTransactionAsync(assetProxyOwner.address, { from: owner }), + ); // Dummy ERC20 tokens for (const token of erc20TokenInfo) { |