From 1b47c473b4bd9c6bfd4250cb330a20779eef90be Mon Sep 17 00:00:00 2001 From: Jacob Evans Date: Tue, 24 Sep 2019 15:34:04 +0200 Subject: [PATCH] Quick fixes * Fixed the webpack publish for asset swapper to be in line with 0x.js * Modified the migration snapshot name to not clobber v2 until we're ready to overwrite * Added filler transactions to keep contract addresses stable whilst asset proxy is disabled * Non-private package publish for orderbook --- packages/asset-swapper/webpack.config.js | 3 +++ packages/migrations/package.json | 2 +- packages/migrations/src/migration.ts | 7 +++++++ packages/orderbook/package.json | 3 +++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/asset-swapper/webpack.config.js b/packages/asset-swapper/webpack.config.js index 3f465186ee..c9420f3931 100644 --- a/packages/asset-swapper/webpack.config.js +++ b/packages/asset-swapper/webpack.config.js @@ -39,6 +39,9 @@ module.exports = { }), ], }, + externals: { + fs: true, + }, module: { rules: [ { diff --git a/packages/migrations/package.json b/packages/migrations/package.json index 4df3f66390..35da5f5611 100644 --- a/packages/migrations/package.json +++ b/packages/migrations/package.json @@ -30,7 +30,7 @@ "config": { "s3_snapshot_bucket": "s3://ganache-snapshots.0x.org", "docker_snapshot_name": "0xorg/ganache-cli", - "snapshot_name": "0x_ganache_snapshot", + "snapshot_name": "0x_ganache_snapshot-v3-beta", "postpublish": { "assets": [] } diff --git a/packages/migrations/src/migration.ts b/packages/migrations/src/migration.ts index 85bd1d6e2f..db3a1a7239 100644 --- a/packages/migrations/src/migration.ts +++ b/packages/migrations/src/migration.ts @@ -260,6 +260,13 @@ export async function runMigrationsAsync( // await multiAssetProxy.transferOwnership.sendTransactionAsync(assetProxyOwner.address, txDefaults), // ); + // Fake the above transactions so our nonce increases and we result with the same addresses + // while AssetProxyOwner is disabled (TODO: @dekz remove) + const dummyTransactionCount = 5; + for (let index = 0; index < dummyTransactionCount; index++) { + await web3Wrapper.sendTransactionAsync({ to: txDefaults.from, from: txDefaults.from, value: new BigNumber(0) }); + } + // Fund the Forwarder with ZRX const zrxDecimals = await zrxToken.decimals.callAsync(); const zrxForwarderAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(5000), zrxDecimals); diff --git a/packages/orderbook/package.json b/packages/orderbook/package.json index dfdac6d0de..72c755319c 100644 --- a/packages/orderbook/package.json +++ b/packages/orderbook/package.json @@ -12,6 +12,9 @@ "type": "git", "url": "https://github.com/0xProject/0x-monorepo.git" }, + "publishConfig": { + "access": "public" + }, "scripts": { "clean": "shx rm -rf lib generated_docs", "test": "jest",