aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-watcher/test/expiration_watcher_test.ts
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-10-05 07:33:10 +0800
committerAlex Browne <stephenalexbrowne@gmail.com>2018-10-16 04:37:56 +0800
commit29063cab186196dc7051ca16ca9409e8619c6673 (patch)
tree39b285cde57c1df15aecae9649aaaae66f49f857 /packages/order-watcher/test/expiration_watcher_test.ts
parent3da032fb24a7b3d27fd388ce4fbc6bd194971201 (diff)
downloaddexon-sol-tools-29063cab186196dc7051ca16ca9409e8619c6673.tar
dexon-sol-tools-29063cab186196dc7051ca16ca9409e8619c6673.tar.gz
dexon-sol-tools-29063cab186196dc7051ca16ca9409e8619c6673.tar.bz2
dexon-sol-tools-29063cab186196dc7051ca16ca9409e8619c6673.tar.lz
dexon-sol-tools-29063cab186196dc7051ca16ca9409e8619c6673.tar.xz
dexon-sol-tools-29063cab186196dc7051ca16ca9409e8619c6673.tar.zst
dexon-sol-tools-29063cab186196dc7051ca16ca9409e8619c6673.zip
update order-watcher to use new artifacts and abi-gen wrappers packages
Diffstat (limited to 'packages/order-watcher/test/expiration_watcher_test.ts')
-rw-r--r--packages/order-watcher/test/expiration_watcher_test.ts19
1 files changed, 6 insertions, 13 deletions
diff --git a/packages/order-watcher/test/expiration_watcher_test.ts b/packages/order-watcher/test/expiration_watcher_test.ts
index ea9923487..056e53988 100644
--- a/packages/order-watcher/test/expiration_watcher_test.ts
+++ b/packages/order-watcher/test/expiration_watcher_test.ts
@@ -1,7 +1,7 @@
-import { ContractWrappers } from '@0xproject/contract-wrappers';
import { tokenUtils } from '@0xproject/contract-wrappers/lib/test/utils/token_utils';
import { BlockchainLifecycle, callbackErrorReporter } from '@0xproject/dev-utils';
import { FillScenarios } from '@0xproject/fill-scenarios';
+import { getContractAddresses } from '@0xproject/migrations';
import { assetDataUtils, orderHashUtils } from '@0xproject/order-utils';
import { DoneCallback } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
@@ -14,7 +14,6 @@ import { ExpirationWatcher } from '../src/order_watcher/expiration_watcher';
import { utils } from '../src/utils/utils';
import { chaiSetup } from './utils/chai_setup';
-import { constants } from './utils/constants';
import { provider, web3Wrapper } from './utils/web3_wrapper';
chaiSetup.configure();
@@ -23,14 +22,8 @@ const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
const MILISECONDS_IN_SECOND = 1000;
describe('ExpirationWatcher', () => {
- const config = {
- networkId: constants.TESTRPC_NETWORK_ID,
- };
- const contractWrappers = new ContractWrappers(provider, config);
let userAddresses: string[];
- let zrxTokenAddress: string;
let fillScenarios: FillScenarios;
- const exchangeContractAddress = contractWrappers.exchange.getContractAddress();
let makerAssetData: string;
let takerAssetData: string;
let coinbase: string;
@@ -43,15 +36,15 @@ describe('ExpirationWatcher', () => {
let expirationWatcher: ExpirationWatcher;
before(async () => {
await blockchainLifecycle.startAsync();
+ const contractAddresses = getContractAddresses();
userAddresses = await web3Wrapper.getAvailableAddressesAsync();
- zrxTokenAddress = tokenUtils.getProtocolTokenAddress();
fillScenarios = new FillScenarios(
provider,
userAddresses,
- zrxTokenAddress,
- exchangeContractAddress,
- contractWrappers.erc20Proxy.getContractAddress(),
- contractWrappers.erc721Proxy.getContractAddress(),
+ contractAddresses.zrxToken,
+ contractAddresses.exchange,
+ contractAddresses.erc20Proxy,
+ contractAddresses.erc721Proxy,
);
[coinbase, makerAddress, takerAddress, feeRecipient] = userAddresses;
const [makerTokenAddress, takerTokenAddress] = tokenUtils.getDummyERC20TokenAddresses();