diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2018-04-22 07:03:58 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-04-22 08:31:17 +0800 |
commit | 1c94ab7cc3819ee991800a3d2439c02e4083a891 (patch) | |
tree | 09fc1bfcebb298e6443e1fb4e33e42b6a9b825d5 /packages/contracts/test/exchange/core.ts | |
parent | aa3be5198093c5514d8ce237272e390f8be65d65 (diff) | |
download | dexon-sol-tools-1c94ab7cc3819ee991800a3d2439c02e4083a891.tar dexon-sol-tools-1c94ab7cc3819ee991800a3d2439c02e4083a891.tar.gz dexon-sol-tools-1c94ab7cc3819ee991800a3d2439c02e4083a891.tar.bz2 dexon-sol-tools-1c94ab7cc3819ee991800a3d2439c02e4083a891.tar.lz dexon-sol-tools-1c94ab7cc3819ee991800a3d2439c02e4083a891.tar.xz dexon-sol-tools-1c94ab7cc3819ee991800a3d2439c02e4083a891.tar.zst dexon-sol-tools-1c94ab7cc3819ee991800a3d2439c02e4083a891.zip |
export proxyUtils instead of individual functions
Diffstat (limited to 'packages/contracts/test/exchange/core.ts')
-rw-r--r-- | packages/contracts/test/exchange/core.ts | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/packages/contracts/test/exchange/core.ts b/packages/contracts/test/exchange/core.ts index baa157dbc..482eb84e9 100644 --- a/packages/contracts/test/exchange/core.ts +++ b/packages/contracts/test/exchange/core.ts @@ -18,7 +18,7 @@ import { ExchangeErrorContractEventArgs, FillContractEventArgs, } from '../../src/contract_wrappers/generated/exchange'; -import { encodeERC20ProxyData, encodeERC721ProxyData } from '../../src/utils/asset_proxy_utils'; +import { proxyUtils } from '../../src/utils/asset_proxy_utils'; import { Balances } from '../../src/utils/balances'; import { constants } from '../../src/utils/constants'; import { crypto } from '../../src/utils/crypto'; @@ -130,7 +130,7 @@ describe('Exchange', () => { // Deploy and configure Exchange const exchangeInstance = await deployer.deployAsync(ContractName.Exchange, [ assetProxyDispatcher.address, - encodeERC20ProxyData(zrx.address), + proxyUtils.encodeERC20ProxyData(zrx.address), ]); exchange = new ExchangeContract(exchangeInstance.abi, exchangeInstance.address, provider); await assetProxyDispatcher.addAuthorizedAddress.sendTransactionAsync(exchange.address, { from: owner }); @@ -151,8 +151,8 @@ describe('Exchange', () => { takerTokenAmount: ZeroEx.toBaseUnitAmount(new BigNumber(200), 18), makerFee: ZeroEx.toBaseUnitAmount(new BigNumber(1), 18), takerFee: ZeroEx.toBaseUnitAmount(new BigNumber(1), 18), - makerAssetData: encodeERC20ProxyData(defaultMakerTokenAddress), - takerAssetData: encodeERC20ProxyData(defaultTakerTokenAddress), + makerAssetData: proxyUtils.encodeERC20ProxyData(defaultMakerTokenAddress), + takerAssetData: proxyUtils.encodeERC20ProxyData(defaultTakerTokenAddress), }; const privateKey = constants.TESTRPC_PRIVATE_KEYS[0]; orderFactory = new OrderFactory(privateKey, defaultOrderParams); @@ -829,8 +829,8 @@ describe('Exchange', () => { signedOrder = orderFactory.newSignedOrder({ makerTokenAmount: new BigNumber(1), takerTokenAmount: new BigNumber(1), - makerAssetData: encodeERC721ProxyData(erc721Token.address, makerTokenId), - takerAssetData: encodeERC721ProxyData(erc721Token.address, takerTokenId), + makerAssetData: proxyUtils.encodeERC721ProxyData(erc721Token.address, makerTokenId), + takerAssetData: proxyUtils.encodeERC721ProxyData(erc721Token.address, takerTokenId), }); // Verify pre-conditions const initialOwnerMakerToken = await erc721Token.ownerOf.callAsync(makerTokenId); @@ -854,8 +854,8 @@ describe('Exchange', () => { signedOrder = orderFactory.newSignedOrder({ makerTokenAmount: new BigNumber(1), takerTokenAmount: new BigNumber(1), - makerAssetData: encodeERC721ProxyData(erc721Token.address, makerTokenId), - takerAssetData: encodeERC721ProxyData(erc721Token.address, takerTokenId), + makerAssetData: proxyUtils.encodeERC721ProxyData(erc721Token.address, makerTokenId), + takerAssetData: proxyUtils.encodeERC721ProxyData(erc721Token.address, takerTokenId), }); // Verify pre-conditions const initialOwnerMakerToken = await erc721Token.ownerOf.callAsync(makerTokenId); @@ -876,8 +876,8 @@ describe('Exchange', () => { signedOrder = orderFactory.newSignedOrder({ makerTokenAmount: new BigNumber(1), takerTokenAmount: new BigNumber(1), - makerAssetData: encodeERC721ProxyData(erc721Token.address, makerTokenId), - takerAssetData: encodeERC721ProxyData(erc721Token.address, takerTokenId), + makerAssetData: proxyUtils.encodeERC721ProxyData(erc721Token.address, makerTokenId), + takerAssetData: proxyUtils.encodeERC721ProxyData(erc721Token.address, takerTokenId), }); // Verify pre-conditions const initialOwnerMakerToken = await erc721Token.ownerOf.callAsync(makerTokenId); @@ -898,8 +898,8 @@ describe('Exchange', () => { signedOrder = orderFactory.newSignedOrder({ makerTokenAmount: new BigNumber(2), takerTokenAmount: new BigNumber(1), - makerAssetData: encodeERC721ProxyData(erc721Token.address, makerTokenId), - takerAssetData: encodeERC721ProxyData(erc721Token.address, takerTokenId), + makerAssetData: proxyUtils.encodeERC721ProxyData(erc721Token.address, makerTokenId), + takerAssetData: proxyUtils.encodeERC721ProxyData(erc721Token.address, takerTokenId), }); // Verify pre-conditions const initialOwnerMakerToken = await erc721Token.ownerOf.callAsync(makerTokenId); @@ -920,8 +920,8 @@ describe('Exchange', () => { signedOrder = orderFactory.newSignedOrder({ makerTokenAmount: new BigNumber(1), takerTokenAmount: new BigNumber(500), - makerAssetData: encodeERC721ProxyData(erc721Token.address, makerTokenId), - takerAssetData: encodeERC721ProxyData(erc721Token.address, takerTokenId), + makerAssetData: proxyUtils.encodeERC721ProxyData(erc721Token.address, makerTokenId), + takerAssetData: proxyUtils.encodeERC721ProxyData(erc721Token.address, takerTokenId), }); // Verify pre-conditions const initialOwnerMakerToken = await erc721Token.ownerOf.callAsync(makerTokenId); @@ -942,8 +942,8 @@ describe('Exchange', () => { signedOrder = orderFactory.newSignedOrder({ makerTokenAmount: new BigNumber(1), takerTokenAmount: new BigNumber(0), - makerAssetData: encodeERC721ProxyData(erc721Token.address, makerTokenId), - takerAssetData: encodeERC721ProxyData(erc721Token.address, takerTokenId), + makerAssetData: proxyUtils.encodeERC721ProxyData(erc721Token.address, makerTokenId), + takerAssetData: proxyUtils.encodeERC721ProxyData(erc721Token.address, takerTokenId), }); // Verify pre-conditions const initialOwnerMakerToken = await erc721Token.ownerOf.callAsync(makerTokenId); @@ -963,8 +963,8 @@ describe('Exchange', () => { signedOrder = orderFactory.newSignedOrder({ makerTokenAmount: new BigNumber(1), takerTokenAmount: ZeroEx.toBaseUnitAmount(new BigNumber(100), 18), - makerAssetData: encodeERC721ProxyData(erc721Token.address, makerTokenId), - takerAssetData: encodeERC20ProxyData(defaultTakerTokenAddress), + makerAssetData: proxyUtils.encodeERC721ProxyData(erc721Token.address, makerTokenId), + takerAssetData: proxyUtils.encodeERC20ProxyData(defaultTakerTokenAddress), }); // Verify pre-conditions const initialOwnerMakerToken = await erc721Token.ownerOf.callAsync(makerTokenId); @@ -1001,8 +1001,8 @@ describe('Exchange', () => { signedOrder = orderFactory.newSignedOrder({ takerTokenAmount: new BigNumber(1), makerTokenAmount: ZeroEx.toBaseUnitAmount(new BigNumber(100), 18), - takerAssetData: encodeERC721ProxyData(erc721Token.address, takerTokenId), - makerAssetData: encodeERC20ProxyData(defaultMakerTokenAddress), + takerAssetData: proxyUtils.encodeERC721ProxyData(erc721Token.address, takerTokenId), + makerAssetData: proxyUtils.encodeERC20ProxyData(defaultMakerTokenAddress), }); // Verify pre-conditions const initialOwnerTakerToken = await erc721Token.ownerOf.callAsync(takerTokenId); |