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, 11 insertions, 9 deletions
diff --git a/packages/contracts/test/exchange/wrapper.ts b/packages/contracts/test/exchange/wrapper.ts
index 88e42fee6..44145b4f0 100644
--- a/packages/contracts/test/exchange/wrapper.ts
+++ b/packages/contracts/test/exchange/wrapper.ts
@@ -12,16 +12,16 @@ import { ERC20ProxyContract } from '../../src/contract_wrappers/generated/e_r_c2
import { ERC721ProxyContract } from '../../src/contract_wrappers/generated/e_r_c721_proxy';
import { ExchangeContract } from '../../src/contract_wrappers/generated/exchange';
import { TokenRegistryContract } from '../../src/contract_wrappers/generated/token_registry';
+import { artifacts } from '../../src/utils/artifacts';
import { assetProxyUtils } from '../../src/utils/asset_proxy_utils';
+import { chaiSetup } from '../../src/utils/chai_setup';
import { constants } from '../../src/utils/constants';
import { ERC20Wrapper } from '../../src/utils/erc20_wrapper';
import { ERC721Wrapper } from '../../src/utils/erc721_wrapper';
import { ExchangeWrapper } from '../../src/utils/exchange_wrapper';
import { OrderFactory } from '../../src/utils/order_factory';
-import { AssetProxyId, ContractName, ERC20BalancesByOwner, SignedOrder } from '../../src/utils/types';
-import { chaiSetup } from '../utils/chai_setup';
-import { deployer } from '../utils/deployer';
-import { provider, web3Wrapper } from '../utils/web3_wrapper';
+import { AssetProxyId, ERC20BalancesByOwner, SignedOrder } from '../../src/utils/types';
+import { provider, txDefaults, web3Wrapper } from '../../src/utils/web3_wrapper';
chaiSetup.configure();
const expect = chai.expect;
@@ -59,8 +59,8 @@ describe('Exchange wrappers', () => {
const accounts = await web3Wrapper.getAvailableAddressesAsync();
const usedAddresses = ([owner, makerAddress, takerAddress, feeRecipientAddress] = accounts);
- erc20Wrapper = new ERC20Wrapper(deployer, provider, usedAddresses, owner);
- erc721Wrapper = new ERC721Wrapper(deployer, provider, usedAddresses, owner);
+ erc20Wrapper = new ERC20Wrapper(provider, usedAddresses, owner);
+ erc721Wrapper = new ERC721Wrapper(provider, usedAddresses, owner);
[erc20TokenA, erc20TokenB, zrxToken] = await erc20Wrapper.deployDummyTokensAsync();
erc20Proxy = await erc20Wrapper.deployProxyAsync();
@@ -73,10 +73,12 @@ describe('Exchange wrappers', () => {
erc721MakerAssetId = erc721Balances[makerAddress][erc721Token.address][0];
erc721TakerAssetId = erc721Balances[takerAddress][erc721Token.address][0];
- const exchangeInstance = await deployer.deployAsync(ContractName.Exchange, [
+ exchange = await ExchangeContract.deployFrom0xArtifactAsync(
+ artifacts.Exchange,
+ provider,
+ txDefaults,
assetProxyUtils.encodeERC20ProxyData(zrxToken.address),
- ]);
- exchange = new ExchangeContract(exchangeInstance.abi, exchangeInstance.address, provider);
+ );
zeroEx = new ZeroEx(provider, {
exchangeContractAddress: exchange.address,
networkId: constants.TESTRPC_NETWORK_ID,