From 32e77753b518e0821d75c404b9dcd16af8f2cd8b Mon Sep 17 00:00:00 2001 From: Amir Bandeali Date: Sun, 22 Apr 2018 19:30:04 -0700 Subject: Define numbers of dummy tokens to deploy in constants --- packages/contracts/src/utils/constants.ts | 2 ++ packages/contracts/src/utils/erc20_wrapper.ts | 2 +- packages/contracts/src/utils/erc721_wrapper.ts | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'packages/contracts/src/utils') diff --git a/packages/contracts/src/utils/constants.ts b/packages/contracts/src/utils/constants.ts index 9662a5c27..2c9d7b272 100644 --- a/packages/contracts/src/utils/constants.ts +++ b/packages/contracts/src/utils/constants.ts @@ -29,6 +29,8 @@ export const constants = { MAX_TOKEN_APPROVE_GAS: 60000, DUMMY_ERC20_TOKEN_ARGS: [DUMMY_TOKEN_NAME, DUMMY_TOKEN_SYMBOL, DUMMY_TOKEN_DECIMALS, DUMMY_TOKEN_TOTAL_SUPPLY], DUMMY_ERC721_TOKEN_ARGS: [DUMMY_TOKEN_NAME, DUMMY_TOKEN_SYMBOL], + NUM_DUMMY_ERC20_TO_DEPLOY: 3, + NUM_DUMMY_ERC721_TO_DEPLOY: 1, NUM_ERC721_TOKENS_TO_MINT: 2, TESTRPC_PRIVATE_KEYS: _.map(TESTRPC_PRIVATE_KEYS_STRINGS, privateKeyString => ethUtil.toBuffer(privateKeyString)), INITIAL_ERC20_BALANCE: ZeroEx.toBaseUnitAmount(new BigNumber(10000), 18), diff --git a/packages/contracts/src/utils/erc20_wrapper.ts b/packages/contracts/src/utils/erc20_wrapper.ts index 950b20c99..212a639ff 100644 --- a/packages/contracts/src/utils/erc20_wrapper.ts +++ b/packages/contracts/src/utils/erc20_wrapper.ts @@ -24,7 +24,7 @@ export class ERC20Wrapper { } public async deployDummyERC20TokensAsync(): Promise { const tokenContractInstances = await Promise.all( - _.map(this._tokenOwnerAddresses, tokenOwnerAddress => + _.map(_.range(constants.NUM_DUMMY_ERC20_TO_DEPLOY), () => this._deployer.deployAsync(ContractName.DummyERC20Token, constants.DUMMY_ERC20_TOKEN_ARGS), ), ); diff --git a/packages/contracts/src/utils/erc721_wrapper.ts b/packages/contracts/src/utils/erc721_wrapper.ts index 906e564d0..0c62fd5d9 100644 --- a/packages/contracts/src/utils/erc721_wrapper.ts +++ b/packages/contracts/src/utils/erc721_wrapper.ts @@ -26,7 +26,7 @@ export class ERC721Wrapper { } public async deployDummyERC721TokensAsync(): Promise { const tokenContractInstances = await Promise.all( - _.map(this._tokenOwnerAddresses, tokenOwnerAddress => + _.map(_.range(constants.NUM_DUMMY_ERC721_TO_DEPLOY), () => this._deployer.deployAsync(ContractName.DummyERC721Token, constants.DUMMY_ERC721_TOKEN_ARGS), ), ); -- cgit v1.2.3