aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src
diff options
context:
space:
mode:
authorAmir Bandeali <abandeali1@gmail.com>2018-04-23 10:30:04 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-04-24 00:57:13 +0800
commit32e77753b518e0821d75c404b9dcd16af8f2cd8b (patch)
treeeda93b3795120fa55837e816e814b812d62f52bb /packages/contracts/src
parentf427a736a39d716e5d3c796ffe7648a79469e6ec (diff)
downloaddexon-sol-tools-32e77753b518e0821d75c404b9dcd16af8f2cd8b.tar
dexon-sol-tools-32e77753b518e0821d75c404b9dcd16af8f2cd8b.tar.gz
dexon-sol-tools-32e77753b518e0821d75c404b9dcd16af8f2cd8b.tar.bz2
dexon-sol-tools-32e77753b518e0821d75c404b9dcd16af8f2cd8b.tar.lz
dexon-sol-tools-32e77753b518e0821d75c404b9dcd16af8f2cd8b.tar.xz
dexon-sol-tools-32e77753b518e0821d75c404b9dcd16af8f2cd8b.tar.zst
dexon-sol-tools-32e77753b518e0821d75c404b9dcd16af8f2cd8b.zip
Define numbers of dummy tokens to deploy in constants
Diffstat (limited to 'packages/contracts/src')
-rw-r--r--packages/contracts/src/utils/constants.ts2
-rw-r--r--packages/contracts/src/utils/erc20_wrapper.ts2
-rw-r--r--packages/contracts/src/utils/erc721_wrapper.ts2
3 files changed, 4 insertions, 2 deletions
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<DummyERC20TokenContract[]> {
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<DummyERC721TokenContract[]> {
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),
),
);