From b3b0496c49f039b9b3d6b1ade53ff0979f581665 Mon Sep 17 00:00:00 2001 From: Amir Bandeali Date: Mon, 2 Sep 2019 11:41:13 -0700 Subject: [PATCH] Fix build and linting errors --- contracts/dev-utils/test/lib_transaction_decoder.ts | 4 ++-- contracts/exchange/compiler.json | 2 +- contracts/exchange/test/wrapper.ts | 11 ----------- contracts/test-utils/package.json | 3 +-- 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/contracts/dev-utils/test/lib_transaction_decoder.ts b/contracts/dev-utils/test/lib_transaction_decoder.ts index 0b3d24ec57..bdf93a1306 100644 --- a/contracts/dev-utils/test/lib_transaction_decoder.ts +++ b/contracts/dev-utils/test/lib_transaction_decoder.ts @@ -56,7 +56,7 @@ describe('LibTransactionDecoder', () => { ]); }); - for (const func of ['batchFillOrders', 'batchFillOrdersNoThrow', 'batchFillOrKillOrders']) { + for (const func of ['batchFillOrdersNoThrow', 'batchFillOrKillOrders']) { const input = (exchangeInterface as any)[func].getABIEncodedTransactionData( [order, order], [takerAssetFillAmount, takerAssetFillAmount], @@ -82,7 +82,7 @@ describe('LibTransactionDecoder', () => { ]); }); - for (const func of ['fillOrder', 'fillOrderNoThrow', 'fillOrKillOrder']) { + for (const func of ['fillOrder', 'fillOrKillOrder']) { const input = (exchangeInterface as any)[func].getABIEncodedTransactionData( order, takerAssetFillAmount, diff --git a/contracts/exchange/compiler.json b/contracts/exchange/compiler.json index f91ef38ffe..6b74c612c2 100644 --- a/contracts/exchange/compiler.json +++ b/contracts/exchange/compiler.json @@ -7,7 +7,7 @@ "evmVersion": "constantinople", "optimizer": { "enabled": true, - "runs": 10000000, + "runs": 1000000, "details": { "yul": true, "deduplicate": true, "cse": true, "constantOptimizer": true } }, "outputSelection": { diff --git a/contracts/exchange/test/wrapper.ts b/contracts/exchange/test/wrapper.ts index 3d83787d60..47456c08dd 100644 --- a/contracts/exchange/test/wrapper.ts +++ b/contracts/exchange/test/wrapper.ts @@ -1,6 +1,5 @@ import { ERC20ProxyContract, ERC20Wrapper, ERC721ProxyContract, ERC721Wrapper } from '@0x/contracts-asset-proxy'; import { DummyERC20TokenContract } from '@0x/contracts-erc20'; -import { DummyERC721TokenContract } from '@0x/contracts-erc721'; import { blockchainTests, constants, @@ -8,7 +7,6 @@ import { ERC20BalancesByOwner, expect, getLatestBlockTimestampAsync, - increaseTimeAndMineBlockAsync, OrderFactory, } from '@0x/contracts-test-utils'; import { assetDataUtils, ExchangeRevertErrors, orderHashUtils } from '@0x/order-utils'; @@ -30,7 +28,6 @@ blockchainTests.resets('Exchange wrappers', env => { let erc20TokenA: DummyERC20TokenContract; let erc20TokenB: DummyERC20TokenContract; let feeToken: DummyERC20TokenContract; - let erc721Token: DummyERC721TokenContract; let exchange: ExchangeContract; let erc20Proxy: ERC20ProxyContract; let erc721Proxy: ERC721ProxyContract; @@ -41,14 +38,10 @@ blockchainTests.resets('Exchange wrappers', env => { let erc20Balances: ERC20BalancesByOwner; let orderFactory: OrderFactory; - let erc721MakerAssetId: BigNumber; - let erc721TakerAssetId: BigNumber; - let defaultMakerAssetAddress: string; let defaultTakerAssetAddress: string; let defaultFeeAssetAddress: string; - const DEFAULT_GAS_PRICE = new BigNumber(2); const PROTOCOL_FEE_MULTIPLIER = new BigNumber(150); const nullFillResults: FillResults = { @@ -75,12 +68,8 @@ blockchainTests.resets('Exchange wrappers', env => { erc20Proxy = await erc20Wrapper.deployProxyAsync(); await erc20Wrapper.setBalancesAndAllowancesAsync(); - [erc721Token] = await erc721Wrapper.deployDummyTokensAsync(); erc721Proxy = await erc721Wrapper.deployProxyAsync(); await erc721Wrapper.setBalancesAndAllowancesAsync(); - const erc721Balances = await erc721Wrapper.getBalancesAsync(); - erc721MakerAssetId = erc721Balances[makerAddress][erc721Token.address][0]; - erc721TakerAssetId = erc721Balances[takerAddress][erc721Token.address][0]; exchange = await ExchangeContract.deployFrom0xArtifactAsync( artifacts.Exchange, diff --git a/contracts/test-utils/package.json b/contracts/test-utils/package.json index 7e4975316e..38c28b382c 100644 --- a/contracts/test-utils/package.json +++ b/contracts/test-utils/package.json @@ -68,8 +68,7 @@ "ethers": "~4.0.4", "js-combinatorics": "^0.5.3", "lodash": "^4.17.11", - "make-promises-safe": "^1.1.0", - "mocha": "^4.1.0" + "make-promises-safe": "^1.1.0" }, "publishConfig": { "access": "public"