diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2018-04-24 00:56:20 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-24 00:56:20 +0800 |
commit | ebf5077e1a19eaac70a1a53d56d3620baad50f72 (patch) | |
tree | 5a839a524cd04c141ae4948a351fa0d0dfce0117 /packages/contracts/test/exchange/helpers.ts | |
parent | 67117913ddd492d5e8a6ccec57d8c5ced238040a (diff) | |
parent | 7d26b96d42f2594ba88954f9c56a791a77b7f31d (diff) | |
download | dexon-sol-tools-ebf5077e1a19eaac70a1a53d56d3620baad50f72.tar dexon-sol-tools-ebf5077e1a19eaac70a1a53d56d3620baad50f72.tar.gz dexon-sol-tools-ebf5077e1a19eaac70a1a53d56d3620baad50f72.tar.bz2 dexon-sol-tools-ebf5077e1a19eaac70a1a53d56d3620baad50f72.tar.lz dexon-sol-tools-ebf5077e1a19eaac70a1a53d56d3620baad50f72.tar.xz dexon-sol-tools-ebf5077e1a19eaac70a1a53d56d3620baad50f72.tar.zst dexon-sol-tools-ebf5077e1a19eaac70a1a53d56d3620baad50f72.zip |
Merge pull request #547 from 0xProject/refactor/contracts/cleanup
Cleanup contracts
Diffstat (limited to 'packages/contracts/test/exchange/helpers.ts')
-rw-r--r-- | packages/contracts/test/exchange/helpers.ts | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/packages/contracts/test/exchange/helpers.ts b/packages/contracts/test/exchange/helpers.ts index 43dfd5402..3c4431647 100644 --- a/packages/contracts/test/exchange/helpers.ts +++ b/packages/contracts/test/exchange/helpers.ts @@ -7,7 +7,7 @@ import ethUtil = require('ethereumjs-util'); import { ERC20ProxyContract } from '../../src/contract_wrappers/generated/e_r_c20_proxy'; import { ExchangeContract } from '../../src/contract_wrappers/generated/exchange'; -import { encodeERC20ProxyData } from '../../src/utils/asset_proxy_utils'; +import { assetProxyUtils } from '../../src/utils/asset_proxy_utils'; import { constants } from '../../src/utils/constants'; import { ExchangeWrapper } from '../../src/utils/exchange_wrapper'; import { OrderFactory } from '../../src/utils/order_factory'; @@ -36,16 +36,15 @@ describe('Exchange', () => { const owner = accounts[0]; const tokenRegistry = await deployer.deployAsync(ContractName.TokenRegistry); const [rep, dgd, zrx] = await Promise.all([ - deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS), - deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS), - deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS), + deployer.deployAsync(ContractName.DummyERC20Token, constants.DUMMY_TOKEN_ARGS), + deployer.deployAsync(ContractName.DummyERC20Token, constants.DUMMY_TOKEN_ARGS), + deployer.deployAsync(ContractName.DummyERC20Token, constants.DUMMY_TOKEN_ARGS), ]); const assetProxyDispatcher = await deployer.deployAsync(ContractName.AssetProxyDispatcher); // Deploy and configure Exchange const exchangeInstance = await deployer.deployAsync(ContractName.Exchange, [ - zrx.address, - AssetProxyId.ERC20, assetProxyDispatcher.address, + AssetProxyId.ERC20, ]); const exchange = new ExchangeContract(exchangeInstance.abi, exchangeInstance.address, provider); await assetProxyDispatcher.addAuthorizedAddress.sendTransactionAsync(exchange.address, { from: owner }); @@ -55,12 +54,12 @@ describe('Exchange', () => { exchangeAddress: exchange.address, makerAddress, feeRecipientAddress, - makerTokenAmount: ZeroEx.toBaseUnitAmount(new BigNumber(100), 18), - takerTokenAmount: ZeroEx.toBaseUnitAmount(new BigNumber(200), 18), + makerAssetAmount: ZeroEx.toBaseUnitAmount(new BigNumber(100), 18), + takerAssetAmount: ZeroEx.toBaseUnitAmount(new BigNumber(200), 18), makerFee: ZeroEx.toBaseUnitAmount(new BigNumber(1), 18), takerFee: ZeroEx.toBaseUnitAmount(new BigNumber(1), 18), - makerAssetData: encodeERC20ProxyData(rep.address), - takerAssetData: encodeERC20ProxyData(dgd.address), + makerAssetData: assetProxyUtils.encodeERC20ProxyData(rep.address), + takerAssetData: assetProxyUtils.encodeERC20ProxyData(dgd.address), }; const privateKey = constants.TESTRPC_PRIVATE_KEYS[0]; orderFactory = new OrderFactory(privateKey, defaultOrderParams); |