diff options
author | Alex Browne <stephenalexbrowne@gmail.com> | 2018-10-04 07:21:17 +0800 |
---|---|---|
committer | Alex Browne <stephenalexbrowne@gmail.com> | 2018-10-16 04:36:59 +0800 |
commit | 3a7bb97ad1182eb9c718797bda8dca5eb5d7f9cd (patch) | |
tree | 15d4c7df95fd96d6aedb712738cd18bfb213b1f1 /packages/contract-wrappers/test/erc721_wrapper_test.ts | |
parent | 2aa73fc83962d421eae4447108a07a5d952b569d (diff) | |
download | dexon-0x-contracts-3a7bb97ad1182eb9c718797bda8dca5eb5d7f9cd.tar.gz dexon-0x-contracts-3a7bb97ad1182eb9c718797bda8dca5eb5d7f9cd.tar.zst dexon-0x-contracts-3a7bb97ad1182eb9c718797bda8dca5eb5d7f9cd.zip |
Remove artifacts from migrations package and update contract-wrappers accordingly
Diffstat (limited to 'packages/contract-wrappers/test/erc721_wrapper_test.ts')
-rw-r--r-- | packages/contract-wrappers/test/erc721_wrapper_test.ts | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/packages/contract-wrappers/test/erc721_wrapper_test.ts b/packages/contract-wrappers/test/erc721_wrapper_test.ts index 10bac6086..65eca16dc 100644 --- a/packages/contract-wrappers/test/erc721_wrapper_test.ts +++ b/packages/contract-wrappers/test/erc721_wrapper_test.ts @@ -1,4 +1,5 @@ import { BlockchainLifecycle, callbackErrorReporter } from '@0xproject/dev-utils'; +import { getContractAddresses } from '@0xproject/migrations'; import { EmptyWalletSubprovider, Web3ProviderEngine } from '@0xproject/subproviders'; import { DoneCallback } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; @@ -10,13 +11,14 @@ import { BlockParamLiteral, BlockRange, ContractWrappers, + ContractWrappersConfig, ContractWrappersError, + DecodedLogEvent, ERC721TokenApprovalEventArgs, ERC721TokenApprovalForAllEventArgs, ERC721TokenEvents, ERC721TokenTransferEventArgs, } from '../src'; -import { DecodedLogEvent } from '../src/types'; import { chaiSetup } from './utils/chai_setup'; import { constants } from './utils/constants'; @@ -37,10 +39,14 @@ describe('ERC721Wrapper', () => { let operatorAddress: string; let approvedAddress: string; let receiverAddress: string; - const config = { - networkId: constants.TESTRPC_NETWORK_ID, - }; + let config: ContractWrappersConfig; + before(async () => { + config = { + networkId: constants.TESTRPC_NETWORK_ID, + contractAddresses: getContractAddresses(), + blockPollingIntervalMs: 10, + }; contractWrappers = new ContractWrappers(provider, config); userAddresses = await web3Wrapper.getAvailableAddressesAsync(); tokens = tokenUtils.getDummyERC721TokenAddresses(); @@ -333,7 +339,7 @@ describe('ERC721Wrapper', () => { callbackNeverToBeCalled, ); const callbackToBeCalled = callbackErrorReporter.reportNodeCallbackErrors(done)(); - contractWrappers.setProvider(provider, constants.TESTRPC_NETWORK_ID); + contractWrappers.setProvider(provider); contractWrappers.erc721Token.subscribe( tokenAddress, ERC721TokenEvents.Approval, |