From a90be44c9fe8dd64d4d5d182658deb7b740504f8 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 21 Nov 2018 11:48:07 +0000 Subject: Improve comments --- packages/migrations/src/migration.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'packages/migrations/src/migration.ts') diff --git a/packages/migrations/src/migration.ts b/packages/migrations/src/migration.ts index 86c76a54b..570f18408 100644 --- a/packages/migrations/src/migration.ts +++ b/packages/migrations/src/migration.ts @@ -11,10 +11,9 @@ import { erc20TokenInfo, erc721TokenInfo } from './utils/token_info'; /** * Creates and deploys all the contracts that are required for the latest - * version of the 0x protocol. Custom migrations can be defined here. This will - * be called with the CLI 'migrate:v2' command. - * @param provider Web3 provider instance. - * @param txDefaults Default transaction values to use when deploying contracts. + * version of the 0x protocol. + * @param provider Web3 provider instance. Your provider instance should connect to the testnet you want to deploy to. + * @param txDefaults Default transaction values to use when deploying contracts (e.g., specify the desired contract creator with the `from` parameter). * @returns The addresses of the contracts that were deployed. */ export async function runMigrationsAsync(provider: Provider, txDefaults: Partial): Promise { -- cgit v1.2.3 From baf69a60ebe14b525479d2824c62080589e0ad16 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 21 Nov 2018 11:53:50 +0000 Subject: Fix additional comments --- packages/migrations/src/migration.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages/migrations/src/migration.ts') diff --git a/packages/migrations/src/migration.ts b/packages/migrations/src/migration.ts index 570f18408..61ac56938 100644 --- a/packages/migrations/src/migration.ts +++ b/packages/migrations/src/migration.ts @@ -158,8 +158,8 @@ let _cachedContractAddresses: ContractAddresses; * Exactly like runMigrationsAsync but will only run the migrations the first * time it is called. Any subsequent calls will return the cached contract * addresses. - * @param provider Web3 provider instance. - * @param txDefaults Default transaction values to use when deploying contracts. + * @param provider Web3 provider instance. Your provider instance should connect to the testnet you want to deploy to. + * @param txDefaults Default transaction values to use when deploying contracts (e.g., specify the desired contract creator with the `from` parameter). * @returns The addresses of the contracts that were deployed. */ export async function runMigrationsOnceAsync( -- cgit v1.2.3 From f0f6b26c3bb206f59549e086b788da85bedd26f2 Mon Sep 17 00:00:00 2001 From: Jacob Evans Date: Fri, 23 Nov 2018 17:52:08 +1100 Subject: bug: Use Testnet Exchange over mainnet --- packages/migrations/src/migration.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'packages/migrations/src/migration.ts') diff --git a/packages/migrations/src/migration.ts b/packages/migrations/src/migration.ts index 61ac56938..04d1abd4c 100644 --- a/packages/migrations/src/migration.ts +++ b/packages/migrations/src/migration.ts @@ -47,6 +47,7 @@ export async function runMigrationsAsync(provider: Provider, txDefaults: Partial artifacts.Exchange, provider, txDefaults, + zrxAssetData, ); // Multisigs -- cgit v1.2.3 From 99e92a346b134c1e91ecf02db8124614d8fd971d Mon Sep 17 00:00:00 2001 From: Jacob Evans Date: Mon, 26 Nov 2018 09:37:31 +1100 Subject: chore: Fund forwarder in migrations --- packages/migrations/src/migration.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'packages/migrations/src/migration.ts') diff --git a/packages/migrations/src/migration.ts b/packages/migrations/src/migration.ts index 04d1abd4c..e4febb1f8 100644 --- a/packages/migrations/src/migration.ts +++ b/packages/migrations/src/migration.ts @@ -141,6 +141,11 @@ export async function runMigrationsAsync(provider: Provider, txDefaults: Partial zrxAssetData, ); + // Fund the Forwarder with ZRX + await web3Wrapper.awaitTransactionSuccessAsync( + await zrxToken.transfer.sendTransactionAsync(forwarder.address, new BigNumber(1000000000000000000), txDefaults), + ); + return { erc20Proxy: erc20Proxy.address, erc721Proxy: erc721Proxy.address, -- cgit v1.2.3 From 09a683557bdf8633e1e0ff85ebf8c8789f391c27 Mon Sep 17 00:00:00 2001 From: Jacob Evans Date: Mon, 26 Nov 2018 09:57:43 +1100 Subject: chore: Update CHANGELOGS use mainnet ZRX amount in Forwarder. --- packages/migrations/src/migration.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'packages/migrations/src/migration.ts') diff --git a/packages/migrations/src/migration.ts b/packages/migrations/src/migration.ts index e4febb1f8..c684c4970 100644 --- a/packages/migrations/src/migration.ts +++ b/packages/migrations/src/migration.ts @@ -142,8 +142,10 @@ export async function runMigrationsAsync(provider: Provider, txDefaults: Partial ); // Fund the Forwarder with ZRX + const zrxDecimals = await zrxToken.decimals.callAsync(); + const zrxForwarderAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(5000), zrxDecimals); await web3Wrapper.awaitTransactionSuccessAsync( - await zrxToken.transfer.sendTransactionAsync(forwarder.address, new BigNumber(1000000000000000000), txDefaults), + await zrxToken.transfer.sendTransactionAsync(forwarder.address, zrxForwarderAmount, txDefaults), ); return { -- cgit v1.2.3 From 43b648e7dc1ea49aff3ab1e6883aa6e069fae72f Mon Sep 17 00:00:00 2001 From: Greg Hysen Date: Thu, 20 Dec 2018 15:39:19 -0800 Subject: Dutch wrapper --- packages/migrations/src/migration.ts | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'packages/migrations/src/migration.ts') diff --git a/packages/migrations/src/migration.ts b/packages/migrations/src/migration.ts index c684c4970..99d1719f1 100644 --- a/packages/migrations/src/migration.ts +++ b/packages/migrations/src/migration.ts @@ -141,6 +141,14 @@ export async function runMigrationsAsync(provider: Provider, txDefaults: Partial zrxAssetData, ); + // DutchAuction + const dutchAuction = await wrappers.DutchAuctionContract.deployFrom0xArtifactAsync( + artifacts.DutchAuction, + provider, + txDefaults, + exchange.address, + ); + // Fund the Forwarder with ZRX const zrxDecimals = await zrxToken.decimals.callAsync(); const zrxForwarderAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(5000), zrxDecimals); @@ -157,6 +165,7 @@ export async function runMigrationsAsync(provider: Provider, txDefaults: Partial assetProxyOwner: assetProxyOwner.address, forwarder: forwarder.address, orderValidator: orderValidator.address, + dutchAuction: dutchAuction.address, }; } -- cgit v1.2.3