aboutsummaryrefslogtreecommitdiffstats
path: root/packages/migrations
diff options
context:
space:
mode:
Diffstat (limited to 'packages/migrations')
-rw-r--r--packages/migrations/artifacts/2.0.0-beta-testnet/AssetProxyOwner.json4
-rw-r--r--packages/migrations/artifacts/2.0.0-beta-testnet/ERC20Proxy.json2
-rw-r--r--packages/migrations/artifacts/2.0.0-beta-testnet/ERC721Proxy.json2
-rw-r--r--packages/migrations/artifacts/2.0.0-beta-testnet/Exchange.json2
-rw-r--r--packages/migrations/src/2.0.0-beta-testnet/migration.ts67
5 files changed, 45 insertions, 32 deletions
diff --git a/packages/migrations/artifacts/2.0.0-beta-testnet/AssetProxyOwner.json b/packages/migrations/artifacts/2.0.0-beta-testnet/AssetProxyOwner.json
index 8068e9392..a6b1ccb17 100644
--- a/packages/migrations/artifacts/2.0.0-beta-testnet/AssetProxyOwner.json
+++ b/packages/migrations/artifacts/2.0.0-beta-testnet/AssetProxyOwner.json
@@ -746,9 +746,9 @@
},
"networks": {
"42": {
- "address": "0xab9fa1f522d7410b17aff4878b577affa756e047",
+ "address": "0x43c20f5b889f9a24ed9bc134daaf9a4a87cc5238",
"links": {},
- "constructorArgs": "[[\"0x9df8137872ac09a8fee71d0da5c7539923fb9bf0\",\"0xcf34d44db312d188789f43a63d11cf2bebb4da15\",\"0x73fd50f2a6beac9cdac9fe87ef68a18edc415831\"],[\"0x85e2494acdbd23b86ce3fbb7be96a6cc74966b05\",\"0xe057bc2d3e3754c98c740b48ed84feea53b58c41\"],\"1\",\"0\"]"
+ "constructorArgs": "[[\"0x9df8137872ac09a8fee71d0da5c7539923fb9bf0\",\"0xcf34d44db312d188789f43a63d11cf2bebb4da15\",\"0x73fd50f2a6beac9cdac9fe87ef68a18edc415831\"],[\"0xeb89396a921a931fbb5157109b1c8b696a36d7db\",\"0x83989bb5bda10bf67b0529117fab5f26487d0ef2\"],\"1\",\"0\"]"
}
}
} \ No newline at end of file
diff --git a/packages/migrations/artifacts/2.0.0-beta-testnet/ERC20Proxy.json b/packages/migrations/artifacts/2.0.0-beta-testnet/ERC20Proxy.json
index e36fac58d..08df592d0 100644
--- a/packages/migrations/artifacts/2.0.0-beta-testnet/ERC20Proxy.json
+++ b/packages/migrations/artifacts/2.0.0-beta-testnet/ERC20Proxy.json
@@ -279,7 +279,7 @@
},
"networks": {
"42": {
- "address": "0x85e2494acdbd23b86ce3fbb7be96a6cc74966b05",
+ "address": "0xeb89396a921a931fbb5157109b1c8b696a36d7db",
"links": {},
"constructorArgs": "[]"
}
diff --git a/packages/migrations/artifacts/2.0.0-beta-testnet/ERC721Proxy.json b/packages/migrations/artifacts/2.0.0-beta-testnet/ERC721Proxy.json
index 22a14d6b9..10c0641b7 100644
--- a/packages/migrations/artifacts/2.0.0-beta-testnet/ERC721Proxy.json
+++ b/packages/migrations/artifacts/2.0.0-beta-testnet/ERC721Proxy.json
@@ -279,7 +279,7 @@
},
"networks": {
"42": {
- "address": "0xe057bc2d3e3754c98c740b48ed84feea53b58c41",
+ "address": "0x83989bb5bda10bf67b0529117fab5f26487d0ef2",
"links": {},
"constructorArgs": "[]"
}
diff --git a/packages/migrations/artifacts/2.0.0-beta-testnet/Exchange.json b/packages/migrations/artifacts/2.0.0-beta-testnet/Exchange.json
index cd461da62..1881f78bb 100644
--- a/packages/migrations/artifacts/2.0.0-beta-testnet/Exchange.json
+++ b/packages/migrations/artifacts/2.0.0-beta-testnet/Exchange.json
@@ -2061,7 +2061,7 @@
},
"networks": {
"42": {
- "address": "0x9dba06fec8404e872023aa6e99a553b98f4ef9d7",
+ "address": "0x6013732754571cefd2922661e669f2517f387101",
"links": {},
"constructorArgs": "[]"
}
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 df41fd401..b8173bac5 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 { logUtils } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import { Provider, TxData } from 'ethereum-types';
@@ -42,22 +43,26 @@ export const runV2TestnetMigrationsAsync = async (
const exchange = await ExchangeContract.deployFrom0xArtifactAsync(artifacts.Exchange, provider, txDefaults);
artifactsWriter.saveArtifact(exchange);
+ let txHash;
// Register AssetProxies in Exchange
const oldAssetProxy = constants.NULL_ADDRESS;
- await web3Wrapper.awaitTransactionSuccessAsync(
- await exchange.registerAssetProxy.sendTransactionAsync(
- constants.ERC20_PROXY_ID,
- erc20proxy.address,
- oldAssetProxy,
- ),
+ txHash = await exchange.registerAssetProxy.sendTransactionAsync(
+ constants.ERC20_PROXY_ID,
+ erc20proxy.address,
+ oldAssetProxy,
);
- await web3Wrapper.awaitTransactionSuccessAsync(
- await exchange.registerAssetProxy.sendTransactionAsync(
- constants.ERC721_PROXY_ID,
- erc721proxy.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');
+ await web3Wrapper.awaitTransactionSuccessAsync(txHash);
// Deploy AssetProxyOwner
const assetProxyOwner = await AssetProxyOwnerContract.deployFrom0xArtifactAsync(
@@ -72,21 +77,29 @@ export const runV2TestnetMigrationsAsync = async (
artifactsWriter.saveArtifact(assetProxyOwner);
// Authorize Exchange contracts to call AssetProxies
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20proxy.addAuthorizedAddress.sendTransactionAsync(exchange.address),
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc721proxy.addAuthorizedAddress.sendTransactionAsync(exchange.address),
- );
+ txHash = await erc20proxy.addAuthorizedAddress.sendTransactionAsync(exchange.address);
+ logUtils.log(`transactionHash: ${txHash}`);
+ logUtils.log('Authorizing Exchange on ERC20Proxy');
+ await web3Wrapper.awaitTransactionSuccessAsync(txHash);
+
+ txHash = await erc721proxy.addAuthorizedAddress.sendTransactionAsync(exchange.address);
+ logUtils.log(`transactionHash: ${txHash}`);
+ logUtils.log('Authorizing Exchange on ERC721Proxy');
+ await web3Wrapper.awaitTransactionSuccessAsync(txHash);
// Transfer ownership of AssetProxies and Exchange to AssetProxyOwner
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20proxy.transferOwnership.sendTransactionAsync(assetProxyOwner.address),
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc721proxy.transferOwnership.sendTransactionAsync(assetProxyOwner.address),
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await exchange.transferOwnership.sendTransactionAsync(assetProxyOwner.address),
- );
+ txHash = await erc20proxy.transferOwnership.sendTransactionAsync(assetProxyOwner.address);
+ logUtils.log(`transactionHash: ${txHash}`);
+ logUtils.log('Transferring ownership of ERC20Proxy');
+ await web3Wrapper.awaitTransactionSuccessAsync(txHash);
+
+ txHash = await erc721proxy.transferOwnership.sendTransactionAsync(assetProxyOwner.address);
+ logUtils.log(`transactionHash: ${txHash}`);
+ logUtils.log('Transferring ownership of ERC721Proxy');
+ await web3Wrapper.awaitTransactionSuccessAsync(txHash);
+
+ txHash = await exchange.transferOwnership.sendTransactionAsync(assetProxyOwner.address);
+ logUtils.log(`transactionHash: ${txHash}`);
+ logUtils.log('Transferring ownership of Exchange');
+ await web3Wrapper.awaitTransactionSuccessAsync(txHash);
};