aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/test/asset_proxy
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-06-28 16:43:37 +0800
committerFabio Berger <me@fabioberger.com>2018-06-28 16:43:37 +0800
commit646927962a9147272d8e3dcc95e2217de205280b (patch)
treea4e13c19a93b2a1f6b06b107467507f0c651b99e /packages/contracts/test/asset_proxy
parentb56baefaa66bb37ba1ea6c0dd487b2caf1ef44bd (diff)
downloaddexon-sol-tools-646927962a9147272d8e3dcc95e2217de205280b.tar.gz
dexon-sol-tools-646927962a9147272d8e3dcc95e2217de205280b.tar.zst
dexon-sol-tools-646927962a9147272d8e3dcc95e2217de205280b.zip
Reduce the userAddresses to the individual addresses actually used by tests, as well as only deploy the number of ERC20 tokens needed for each test suite
Diffstat (limited to 'packages/contracts/test/asset_proxy')
-rw-r--r--packages/contracts/test/asset_proxy/proxies.ts13
1 files changed, 8 insertions, 5 deletions
diff --git a/packages/contracts/test/asset_proxy/proxies.ts b/packages/contracts/test/asset_proxy/proxies.ts
index 6303a50fa..39121d95c 100644
--- a/packages/contracts/test/asset_proxy/proxies.ts
+++ b/packages/contracts/test/asset_proxy/proxies.ts
@@ -5,6 +5,7 @@ import { BigNumber } from '@0xproject/utils';
import * as chai from 'chai';
import { LogWithDecodedArgs } from 'ethereum-types';
import ethUtil = require('ethereumjs-util');
+import * as _ from 'lodash';
import { DummyERC20TokenContract } from '../../src/generated_contract_wrappers/dummy_e_r_c20_token';
import {
@@ -53,15 +54,17 @@ describe('Asset Transfer Proxies', () => {
});
before(async () => {
const accounts = await web3Wrapper.getAvailableAddressesAsync();
- const usedAddresses = ([owner, notAuthorized, exchangeAddress, makerAddress, takerAddress] = accounts);
+ const usedAddresses = ([owner, notAuthorized, exchangeAddress, makerAddress, takerAddress] = _.slice(
+ accounts,
+ 0,
+ 5,
+ ));
erc20Wrapper = new ERC20Wrapper(provider, usedAddresses, owner);
erc721Wrapper = new ERC721Wrapper(provider, usedAddresses, owner);
- [zrxToken] = await erc20Wrapper.deployDummyTokensAsync(
- constants.NUM_DUMMY_ERC20_TO_DEPLOY,
- constants.DUMMY_TOKEN_DECIMALS,
- );
+ const numDummyErc20ToDeploy = 1;
+ [zrxToken] = await erc20Wrapper.deployDummyTokensAsync(numDummyErc20ToDeploy, constants.DUMMY_TOKEN_DECIMALS);
erc20Proxy = await erc20Wrapper.deployProxyAsync();
await erc20Wrapper.setBalancesAndAllowancesAsync();
await web3Wrapper.awaitTransactionSuccessAsync(