aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/test/exchange/wrapper.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contracts/test/exchange/wrapper.ts')
-rw-r--r--packages/contracts/test/exchange/wrapper.ts20
1 files changed, 8 insertions, 12 deletions
diff --git a/packages/contracts/test/exchange/wrapper.ts b/packages/contracts/test/exchange/wrapper.ts
index 0d3e18711..c658dca79 100644
--- a/packages/contracts/test/exchange/wrapper.ts
+++ b/packages/contracts/test/exchange/wrapper.ts
@@ -22,7 +22,7 @@ import { OrderFactory } from '../../util/order_factory';
import { BalancesByOwner, ContractName } from '../../util/types';
import { chaiSetup } from '../utils/chai_setup';
import { deployer } from '../utils/deployer';
-import { web3, web3Wrapper } from '../utils/web3_wrapper';
+import { provider, web3Wrapper } from '../utils/web3_wrapper';
chaiSetup.configure();
const expect = chai.expect;
@@ -59,28 +59,24 @@ describe('Exchange', () => {
deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS),
deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS),
]);
- rep = new DummyTokenContract(web3Wrapper, repInstance.abi, repInstance.address);
- dgd = new DummyTokenContract(web3Wrapper, dgdInstance.abi, dgdInstance.address);
- zrx = new DummyTokenContract(web3Wrapper, zrxInstance.abi, zrxInstance.address);
+ rep = new DummyTokenContract(repInstance.abi, repInstance.address, provider);
+ dgd = new DummyTokenContract(dgdInstance.abi, dgdInstance.address, provider);
+ zrx = new DummyTokenContract(zrxInstance.abi, zrxInstance.address, provider);
const tokenRegistryInstance = await deployer.deployAsync(ContractName.TokenRegistry);
- tokenRegistry = new TokenRegistryContract(
- web3Wrapper,
- tokenRegistryInstance.abi,
- tokenRegistryInstance.address,
- );
+ tokenRegistry = new TokenRegistryContract(tokenRegistryInstance.abi, tokenRegistryInstance.address, provider);
const tokenTransferProxyInstance = await deployer.deployAsync(ContractName.TokenTransferProxy);
tokenTransferProxy = new TokenTransferProxyContract(
- web3Wrapper,
tokenTransferProxyInstance.abi,
tokenTransferProxyInstance.address,
+ provider,
);
const exchangeInstance = await deployer.deployAsync(ContractName.Exchange, [
zrx.address,
tokenTransferProxy.address,
]);
- exchange = new ExchangeContract(web3Wrapper, exchangeInstance.abi, exchangeInstance.address);
+ exchange = new ExchangeContract(exchangeInstance.abi, exchangeInstance.address, provider);
await tokenTransferProxy.addAuthorizedAddress.sendTransactionAsync(exchange.address, { from: accounts[0] });
- const zeroEx = new ZeroEx(web3.currentProvider, { networkId: constants.TESTRPC_NETWORK_ID });
+ const zeroEx = new ZeroEx(provider, { networkId: constants.TESTRPC_NETWORK_ID });
exWrapper = new ExchangeWrapper(exchange, zeroEx);
const defaultOrderParams = {