From a7238d0fdb302d7062f3f63c3119910286f992c5 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Wed, 18 Jul 2018 16:21:24 -0700 Subject: Implement initial forwarder wrapper --- .../test/forwarder_wrapper_test.ts | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 packages/contract-wrappers/test/forwarder_wrapper_test.ts (limited to 'packages/contract-wrappers/test') diff --git a/packages/contract-wrappers/test/forwarder_wrapper_test.ts b/packages/contract-wrappers/test/forwarder_wrapper_test.ts new file mode 100644 index 000000000..61a21a0d7 --- /dev/null +++ b/packages/contract-wrappers/test/forwarder_wrapper_test.ts @@ -0,0 +1,57 @@ +import { BlockchainLifecycle, callbackErrorReporter } from '@0xproject/dev-utils'; +import { FillScenarios } from '@0xproject/fill-scenarios'; +import { assetDataUtils, orderHashUtils } from '@0xproject/order-utils'; +import { DoneCallback, SignedOrder } from '@0xproject/types'; +import { BigNumber } from '@0xproject/utils'; +import * as chai from 'chai'; +import { BlockParamLiteral } from 'ethereum-types'; +import 'mocha'; + +import { + ContractWrappers, + DecodedLogEvent, + ExchangeCancelEventArgs, + ExchangeEvents, + ExchangeFillEventArgs, + OrderStatus, +} from '../src'; + +import { chaiSetup } from './utils/chai_setup'; +import { constants } from './utils/constants'; +import { tokenUtils } from './utils/token_utils'; +import { provider, web3Wrapper } from './utils/web3_wrapper'; + +chaiSetup.configure(); +const expect = chai.expect; +const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper); + +describe('ForwarderWrapper', () => { + let contractWrappers: ContractWrappers; + let forwarderContractAddress: string; + let userAddresses: string[]; + const config = { + networkId: constants.TESTRPC_NETWORK_ID, + blockPollingIntervalMs: 0, + }; + before(async () => { + await blockchainLifecycle.startAsync(); + contractWrappers = new ContractWrappers(provider, config); + forwarderContractAddress = contractWrappers.exchange.getContractAddress(); + userAddresses = await web3Wrapper.getAvailableAddressesAsync(); + }); + after(async () => { + await blockchainLifecycle.revertAsync(); + }); + beforeEach(async () => { + await blockchainLifecycle.startAsync(); + }); + afterEach(async () => { + await blockchainLifecycle.revertAsync(); + }); + // describe('#fillOrderAsync', () => { + // it('should fill a valid order', async () => { + // // txHash = await contractWrappers.exchange.fillOrderAsync(signedOrder, takerTokenFillAmount, takerAddress); + // // await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); + // }); + // }); +}); -- cgit From 045751a430c512d94bf7e515d7531bac68dc2179 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Mon, 30 Jul 2018 17:43:02 -0700 Subject: Add getOrdersInfo to exchange_wrapper --- packages/contract-wrappers/test/exchange_wrapper_test.ts | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'packages/contract-wrappers/test') diff --git a/packages/contract-wrappers/test/exchange_wrapper_test.ts b/packages/contract-wrappers/test/exchange_wrapper_test.ts index dca212f65..e468187f2 100644 --- a/packages/contract-wrappers/test/exchange_wrapper_test.ts +++ b/packages/contract-wrappers/test/exchange_wrapper_test.ts @@ -277,6 +277,15 @@ describe('ExchangeWrapper', () => { expect(orderInfo.orderHash).to.be.equal(orderHash); }); }); + describe('#getOrdersInfoAsync', () => { + it('should get the orders info', async () => { + const ordersInfo = await contractWrappers.exchange.getOrdersInfoAsync([signedOrder, anotherSignedOrder]); + const orderHash = orderHashUtils.getOrderHashHex(signedOrder); + expect(ordersInfo[0].orderHash).to.be.equal(orderHash); + const anotherOrderHash = orderHashUtils.getOrderHashHex(anotherSignedOrder); + expect(ordersInfo[1].orderHash).to.be.equal(anotherOrderHash); + }); + }); describe('#isValidSignature', () => { it('should check if the signature is valid', async () => { const orderHash = orderHashUtils.getOrderHashHex(signedOrder); -- cgit From 44498f2263ccfec805a6815a1ab673e2dd423e8d Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Mon, 30 Jul 2018 17:51:02 -0700 Subject: Fix spelling error in exchange wrapper tests --- packages/contract-wrappers/test/exchange_wrapper_test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/contract-wrappers/test') diff --git a/packages/contract-wrappers/test/exchange_wrapper_test.ts b/packages/contract-wrappers/test/exchange_wrapper_test.ts index e468187f2..fa3b49eb9 100644 --- a/packages/contract-wrappers/test/exchange_wrapper_test.ts +++ b/packages/contract-wrappers/test/exchange_wrapper_test.ts @@ -304,7 +304,7 @@ describe('ExchangeWrapper', () => { }); }); describe('#isAllowedValidatorAsync', () => { - it('should check if the validator is alllowed', async () => { + it('should check if the validator is allowed', async () => { const signerAddress = makerAddress; const validatorAddress = constants.NULL_ADDRESS; const isAllowed = await contractWrappers.exchange.isAllowedValidatorAsync(signerAddress, validatorAddress); -- cgit From bc93ff0cb5c846fcb534f90b93e54bba0747f562 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Mon, 30 Jul 2018 19:43:44 -0700 Subject: Write initial test for forwarder_wrapper --- .../test/forwarder_wrapper_test.ts | 81 ++++++++++++++++++---- 1 file changed, 69 insertions(+), 12 deletions(-) (limited to 'packages/contract-wrappers/test') diff --git a/packages/contract-wrappers/test/forwarder_wrapper_test.ts b/packages/contract-wrappers/test/forwarder_wrapper_test.ts index 61a21a0d7..0fb695b9e 100644 --- a/packages/contract-wrappers/test/forwarder_wrapper_test.ts +++ b/packages/contract-wrappers/test/forwarder_wrapper_test.ts @@ -26,18 +26,65 @@ const expect = chai.expect; const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper); describe('ForwarderWrapper', () => { - let contractWrappers: ContractWrappers; - let forwarderContractAddress: string; - let userAddresses: string[]; - const config = { + const contractWrappersConfig = { networkId: constants.TESTRPC_NETWORK_ID, blockPollingIntervalMs: 0, }; + const fillableAmount = new BigNumber(5); + const takerTokenFillAmount = new BigNumber(5); + let contractWrappers: ContractWrappers; + let fillScenarios: FillScenarios; + let forwarderContractAddress: string; + let exchangeContractAddress: string; + let zrxTokenAddress: string; + let userAddresses: string[]; + let coinbase: string; + let makerAddress: string; + let takerAddress: string; + let feeRecipient: string; + let anotherMakerAddress: string; + let makerTokenAddress: string; + let takerTokenAddress: string; + let makerAssetData: string; + let takerAssetData: string; + let signedOrder: SignedOrder; + let anotherSignedOrder: SignedOrder; before(async () => { await blockchainLifecycle.startAsync(); - contractWrappers = new ContractWrappers(provider, config); - forwarderContractAddress = contractWrappers.exchange.getContractAddress(); + contractWrappers = new ContractWrappers(provider, contractWrappersConfig); + forwarderContractAddress = contractWrappers.forwarder.getContractAddress(); + exchangeContractAddress = contractWrappers.exchange.getContractAddress(); userAddresses = await web3Wrapper.getAvailableAddressesAsync(); + zrxTokenAddress = tokenUtils.getProtocolTokenAddress(); + fillScenarios = new FillScenarios( + provider, + userAddresses, + zrxTokenAddress, + exchangeContractAddress, + contractWrappers.erc20Proxy.getContractAddress(), + contractWrappers.erc721Proxy.getContractAddress(), + ); + [coinbase, makerAddress, takerAddress, feeRecipient, anotherMakerAddress] = userAddresses; + [makerTokenAddress] = tokenUtils.getDummyERC20TokenAddresses(); + takerTokenAddress = tokenUtils.getWethTokenAddress(); + [makerAssetData, takerAssetData] = [ + assetDataUtils.encodeERC20AssetData(makerTokenAddress), + assetDataUtils.encodeERC20AssetData(takerTokenAddress), + ]; + signedOrder = await fillScenarios.createFillableSignedOrderAsync( + makerAssetData, + takerAssetData, + makerAddress, + constants.NULL_ADDRESS, + fillableAmount, + ); + anotherSignedOrder = await fillScenarios.createFillableSignedOrderAsync( + makerAssetData, + takerAssetData, + makerAddress, + constants.NULL_ADDRESS, + fillableAmount, + ); }); after(async () => { await blockchainLifecycle.revertAsync(); @@ -48,10 +95,20 @@ describe('ForwarderWrapper', () => { afterEach(async () => { await blockchainLifecycle.revertAsync(); }); - // describe('#fillOrderAsync', () => { - // it('should fill a valid order', async () => { - // // txHash = await contractWrappers.exchange.fillOrderAsync(signedOrder, takerTokenFillAmount, takerAddress); - // // await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); - // }); - // }); + describe('#marketBuyOrdersWithEthAsync', () => { + it('should market buy orders with eth', async () => { + const signedOrders = [signedOrder, anotherSignedOrder]; + const makerAssetFillAmount = signedOrder.makerAssetAmount.plus(anotherSignedOrder.makerAssetAmount); + const txHash = await contractWrappers.forwarder.marketBuyOrdersWithEthAsync( + signedOrders, + makerAssetFillAmount, + takerAddress, + makerAssetFillAmount, + ); + await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); + const ordersInfo = await contractWrappers.exchange.getOrdersInfoAsync([signedOrder, anotherSignedOrder]); + expect(ordersInfo[0].orderStatus).to.be.equal(OrderStatus.FULLY_FILLED); + expect(ordersInfo[1].orderStatus).to.be.equal(OrderStatus.FULLY_FILLED); + }); + }); }); -- cgit From 5d44a67e62eb47ba4a8664e83ed46568df5eb78f Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Tue, 31 Jul 2018 00:10:58 -0700 Subject: Update forwarder_wrapper_test --- .../contract-wrappers/test/forwarder_wrapper_test.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'packages/contract-wrappers/test') diff --git a/packages/contract-wrappers/test/forwarder_wrapper_test.ts b/packages/contract-wrappers/test/forwarder_wrapper_test.ts index 0fb695b9e..3f3b40e0b 100644 --- a/packages/contract-wrappers/test/forwarder_wrapper_test.ts +++ b/packages/contract-wrappers/test/forwarder_wrapper_test.ts @@ -111,4 +111,20 @@ describe('ForwarderWrapper', () => { expect(ordersInfo[1].orderStatus).to.be.equal(OrderStatus.FULLY_FILLED); }); }); + describe('#marketSellOrdersWithEthAsync', () => { + it('should market sell orders with eth', async () => { + const signedOrders = [signedOrder, anotherSignedOrder]; + const makerAssetFillAmount = signedOrder.makerAssetAmount.plus(anotherSignedOrder.makerAssetAmount); + const txHash = await contractWrappers.forwarder.marketSellOrdersWithEthAsync( + signedOrders, + takerAddress, + makerAssetFillAmount, + ); + await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS); + const ordersInfo = await contractWrappers.exchange.getOrdersInfoAsync([signedOrder, anotherSignedOrder]); + expect(ordersInfo[0].orderStatus).to.be.equal(OrderStatus.FULLY_FILLED); + expect(ordersInfo[1].orderStatus).to.be.equal(OrderStatus.FILLABLE); + expect(ordersInfo[1].orderTakerAssetFilledAmount).to.be.bignumber.equal(new BigNumber(4)); // only 95% of ETH is sold + }); + }); }); -- cgit From 30c6fe08ec5f67fa3679c0043a24ffc420974964 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Wed, 1 Aug 2018 15:08:34 -0700 Subject: Add tests --- .../test/market_orders_optimization_utils_test.ts | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 packages/contract-wrappers/test/market_orders_optimization_utils_test.ts (limited to 'packages/contract-wrappers/test') diff --git a/packages/contract-wrappers/test/market_orders_optimization_utils_test.ts b/packages/contract-wrappers/test/market_orders_optimization_utils_test.ts new file mode 100644 index 000000000..742294df2 --- /dev/null +++ b/packages/contract-wrappers/test/market_orders_optimization_utils_test.ts @@ -0,0 +1,66 @@ +import { orderFactory } from '@0xproject/order-utils'; +import * as chai from 'chai'; +import * as _ from 'lodash'; +import 'mocha'; + +import { constants } from '../src/utils/constants'; +import { marketOrdersOptimizationUtils } from '../src/utils/market_orders_optimization_utils'; + +import { chaiSetup } from './utils/chai_setup'; +import { assert } from '../src/utils/assert'; +import { NULL_BYTES } from '@0xproject/utils'; + +chaiSetup.configure(); +const expect = chai.expect; + +// utility for generating a set of order objects with mostly NULL values +// except for a specified makerAssetData and takerAssetData +const FAKE_ORDERS_COUNT = 5; +const generateFakeOrders = (makerAssetData: string, takerAssetData: string) => + _.map(_.range(FAKE_ORDERS_COUNT), index => { + const order = orderFactory.createOrder( + constants.NULL_ADDRESS, + constants.NULL_ADDRESS, + constants.NULL_ADDRESS, + constants.ZERO_AMOUNT, + constants.ZERO_AMOUNT, + constants.ZERO_AMOUNT, + makerAssetData, + constants.ZERO_AMOUNT, + takerAssetData, + constants.NULL_ADDRESS, + constants.NULL_ADDRESS, + ); + return { + ...order, + signature: 'dummy signature', + }; + }); + +describe('marketOrdersOptimizationUtils', () => { + const fakeMakerAssetData = 'fakeMakerAssetData'; + const fakeTakerAssetData = 'fakeTakerAssetData'; + const orders = generateFakeOrders(fakeMakerAssetData, fakeTakerAssetData); + describe('#optimizeMarketOrders', () => { + it('should make makerAssetData `0x` unless first order', () => { + const optimizedOrders = marketOrdersOptimizationUtils.optimizeMarketOrders(orders); + expect(optimizedOrders[0].makerAssetData).to.equal(fakeMakerAssetData); + const ordersWithoutHead = _.slice(optimizedOrders, 1); + _.forEach(ordersWithoutHead, order => expect(order.makerAssetData).to.equal(constants.NULL_BYTES)); + }); + it('should make all takerAssetData `0x`', () => { + const optimizedOrders = marketOrdersOptimizationUtils.optimizeMarketOrders(orders); + _.forEach(optimizedOrders, order => expect(order.takerAssetData).to.equal(constants.NULL_BYTES)); + }); + }); + describe('#optimizeFeeOrders', () => { + it('should make all makerAssetData `0x`', () => { + const optimizedOrders = marketOrdersOptimizationUtils.optimizeFeeOrders(orders); + _.forEach(optimizedOrders, order => expect(order.makerAssetData).to.equal(constants.NULL_BYTES)); + }); + it('should make all takerAssetData `0x`', () => { + const optimizedOrders = marketOrdersOptimizationUtils.optimizeFeeOrders(orders); + _.forEach(optimizedOrders, order => expect(order.takerAssetData).to.equal(constants.NULL_BYTES)); + }); + }); +}); -- cgit From 82092ab50a73e15e167f387380cd75ac52581e88 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Thu, 2 Aug 2018 16:02:58 -0700 Subject: Rename to calldata utils --- .../test/calldata_optimization_utils_test.ts | 66 ++++++++++++++++++++++ .../test/market_orders_optimization_utils_test.ts | 66 ---------------------- 2 files changed, 66 insertions(+), 66 deletions(-) create mode 100644 packages/contract-wrappers/test/calldata_optimization_utils_test.ts delete mode 100644 packages/contract-wrappers/test/market_orders_optimization_utils_test.ts (limited to 'packages/contract-wrappers/test') diff --git a/packages/contract-wrappers/test/calldata_optimization_utils_test.ts b/packages/contract-wrappers/test/calldata_optimization_utils_test.ts new file mode 100644 index 000000000..107d913ba --- /dev/null +++ b/packages/contract-wrappers/test/calldata_optimization_utils_test.ts @@ -0,0 +1,66 @@ +import { orderFactory } from '@0xproject/order-utils'; +import * as chai from 'chai'; +import * as _ from 'lodash'; +import 'mocha'; + +import { constants } from '../src/utils/constants'; +import { calldataOptimizationUtils } from '../src/utils/calldata_optimization_utils'; + +import { chaiSetup } from './utils/chai_setup'; +import { assert } from '../src/utils/assert'; +import { NULL_BYTES } from '@0xproject/utils'; + +chaiSetup.configure(); +const expect = chai.expect; + +// utility for generating a set of order objects with mostly NULL values +// except for a specified makerAssetData and takerAssetData +const FAKE_ORDERS_COUNT = 5; +const generateFakeOrders = (makerAssetData: string, takerAssetData: string) => + _.map(_.range(FAKE_ORDERS_COUNT), index => { + const order = orderFactory.createOrder( + constants.NULL_ADDRESS, + constants.NULL_ADDRESS, + constants.NULL_ADDRESS, + constants.ZERO_AMOUNT, + constants.ZERO_AMOUNT, + constants.ZERO_AMOUNT, + makerAssetData, + constants.ZERO_AMOUNT, + takerAssetData, + constants.NULL_ADDRESS, + constants.NULL_ADDRESS, + ); + return { + ...order, + signature: 'dummy signature', + }; + }); + +describe('calldataOptimizationUtils', () => { + const fakeMakerAssetData = 'fakeMakerAssetData'; + const fakeTakerAssetData = 'fakeTakerAssetData'; + const orders = generateFakeOrders(fakeMakerAssetData, fakeTakerAssetData); + describe('#optimizeForwarderOrders', () => { + it('should make makerAssetData `0x` unless first order', () => { + const optimizedOrders = calldataOptimizationUtils.optimizeForwarderOrders(orders); + expect(optimizedOrders[0].makerAssetData).to.equal(fakeMakerAssetData); + const ordersWithoutHead = _.slice(optimizedOrders, 1); + _.forEach(ordersWithoutHead, order => expect(order.makerAssetData).to.equal(constants.NULL_BYTES)); + }); + it('should make all takerAssetData `0x`', () => { + const optimizedOrders = calldataOptimizationUtils.optimizeForwarderOrders(orders); + _.forEach(optimizedOrders, order => expect(order.takerAssetData).to.equal(constants.NULL_BYTES)); + }); + }); + describe('#optimizeForwarderFeeOrders', () => { + it('should make all makerAssetData `0x`', () => { + const optimizedOrders = calldataOptimizationUtils.optimizeForwarderFeeOrders(orders); + _.forEach(optimizedOrders, order => expect(order.makerAssetData).to.equal(constants.NULL_BYTES)); + }); + it('should make all takerAssetData `0x`', () => { + const optimizedOrders = calldataOptimizationUtils.optimizeForwarderFeeOrders(orders); + _.forEach(optimizedOrders, order => expect(order.takerAssetData).to.equal(constants.NULL_BYTES)); + }); + }); +}); diff --git a/packages/contract-wrappers/test/market_orders_optimization_utils_test.ts b/packages/contract-wrappers/test/market_orders_optimization_utils_test.ts deleted file mode 100644 index 742294df2..000000000 --- a/packages/contract-wrappers/test/market_orders_optimization_utils_test.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { orderFactory } from '@0xproject/order-utils'; -import * as chai from 'chai'; -import * as _ from 'lodash'; -import 'mocha'; - -import { constants } from '../src/utils/constants'; -import { marketOrdersOptimizationUtils } from '../src/utils/market_orders_optimization_utils'; - -import { chaiSetup } from './utils/chai_setup'; -import { assert } from '../src/utils/assert'; -import { NULL_BYTES } from '@0xproject/utils'; - -chaiSetup.configure(); -const expect = chai.expect; - -// utility for generating a set of order objects with mostly NULL values -// except for a specified makerAssetData and takerAssetData -const FAKE_ORDERS_COUNT = 5; -const generateFakeOrders = (makerAssetData: string, takerAssetData: string) => - _.map(_.range(FAKE_ORDERS_COUNT), index => { - const order = orderFactory.createOrder( - constants.NULL_ADDRESS, - constants.NULL_ADDRESS, - constants.NULL_ADDRESS, - constants.ZERO_AMOUNT, - constants.ZERO_AMOUNT, - constants.ZERO_AMOUNT, - makerAssetData, - constants.ZERO_AMOUNT, - takerAssetData, - constants.NULL_ADDRESS, - constants.NULL_ADDRESS, - ); - return { - ...order, - signature: 'dummy signature', - }; - }); - -describe('marketOrdersOptimizationUtils', () => { - const fakeMakerAssetData = 'fakeMakerAssetData'; - const fakeTakerAssetData = 'fakeTakerAssetData'; - const orders = generateFakeOrders(fakeMakerAssetData, fakeTakerAssetData); - describe('#optimizeMarketOrders', () => { - it('should make makerAssetData `0x` unless first order', () => { - const optimizedOrders = marketOrdersOptimizationUtils.optimizeMarketOrders(orders); - expect(optimizedOrders[0].makerAssetData).to.equal(fakeMakerAssetData); - const ordersWithoutHead = _.slice(optimizedOrders, 1); - _.forEach(ordersWithoutHead, order => expect(order.makerAssetData).to.equal(constants.NULL_BYTES)); - }); - it('should make all takerAssetData `0x`', () => { - const optimizedOrders = marketOrdersOptimizationUtils.optimizeMarketOrders(orders); - _.forEach(optimizedOrders, order => expect(order.takerAssetData).to.equal(constants.NULL_BYTES)); - }); - }); - describe('#optimizeFeeOrders', () => { - it('should make all makerAssetData `0x`', () => { - const optimizedOrders = marketOrdersOptimizationUtils.optimizeFeeOrders(orders); - _.forEach(optimizedOrders, order => expect(order.makerAssetData).to.equal(constants.NULL_BYTES)); - }); - it('should make all takerAssetData `0x`', () => { - const optimizedOrders = marketOrdersOptimizationUtils.optimizeFeeOrders(orders); - _.forEach(optimizedOrders, order => expect(order.takerAssetData).to.equal(constants.NULL_BYTES)); - }); - }); -}); -- cgit From 4f381ca1d9b6f8ecc232d0481d86f8ba695f7601 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Fri, 3 Aug 2018 15:47:19 -0400 Subject: Update orderFactory interface --- .../contract-wrappers/test/calldata_optimization_utils_test.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'packages/contract-wrappers/test') diff --git a/packages/contract-wrappers/test/calldata_optimization_utils_test.ts b/packages/contract-wrappers/test/calldata_optimization_utils_test.ts index 107d913ba..a4cea772f 100644 --- a/packages/contract-wrappers/test/calldata_optimization_utils_test.ts +++ b/packages/contract-wrappers/test/calldata_optimization_utils_test.ts @@ -3,12 +3,11 @@ import * as chai from 'chai'; import * as _ from 'lodash'; import 'mocha'; -import { constants } from '../src/utils/constants'; +import { assert } from '../src/utils/assert'; import { calldataOptimizationUtils } from '../src/utils/calldata_optimization_utils'; +import { constants } from '../src/utils/constants'; import { chaiSetup } from './utils/chai_setup'; -import { assert } from '../src/utils/assert'; -import { NULL_BYTES } from '@0xproject/utils'; chaiSetup.configure(); const expect = chai.expect; @@ -20,16 +19,11 @@ const generateFakeOrders = (makerAssetData: string, takerAssetData: string) => _.map(_.range(FAKE_ORDERS_COUNT), index => { const order = orderFactory.createOrder( constants.NULL_ADDRESS, - constants.NULL_ADDRESS, - constants.NULL_ADDRESS, - constants.ZERO_AMOUNT, - constants.ZERO_AMOUNT, constants.ZERO_AMOUNT, makerAssetData, constants.ZERO_AMOUNT, takerAssetData, constants.NULL_ADDRESS, - constants.NULL_ADDRESS, ); return { ...order, -- cgit