diff options
author | Alex Browne <stephenalexbrowne@gmail.com> | 2018-10-05 07:33:10 +0800 |
---|---|---|
committer | Alex Browne <stephenalexbrowne@gmail.com> | 2018-10-16 04:37:56 +0800 |
commit | 29063cab186196dc7051ca16ca9409e8619c6673 (patch) | |
tree | 39b285cde57c1df15aecae9649aaaae66f49f857 /packages/order-watcher/test/expiration_watcher_test.ts | |
parent | 3da032fb24a7b3d27fd388ce4fbc6bd194971201 (diff) | |
download | dexon-0x-contracts-29063cab186196dc7051ca16ca9409e8619c6673.tar dexon-0x-contracts-29063cab186196dc7051ca16ca9409e8619c6673.tar.gz dexon-0x-contracts-29063cab186196dc7051ca16ca9409e8619c6673.tar.bz2 dexon-0x-contracts-29063cab186196dc7051ca16ca9409e8619c6673.tar.lz dexon-0x-contracts-29063cab186196dc7051ca16ca9409e8619c6673.tar.xz dexon-0x-contracts-29063cab186196dc7051ca16ca9409e8619c6673.tar.zst dexon-0x-contracts-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.ts | 19 |
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(); |