aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src/utils
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-06-06 02:46:05 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-06-06 02:46:05 +0800
commit59cb2132f27c0c28a1e6077aaac320e485786e65 (patch)
tree882dda46b44061bfab57139d8d11d7652cb478c2 /packages/contracts/src/utils
parent9778695b4ad1fd999eb79b01c768a2f2b9938917 (diff)
downloaddexon-sol-tools-59cb2132f27c0c28a1e6077aaac320e485786e65.tar
dexon-sol-tools-59cb2132f27c0c28a1e6077aaac320e485786e65.tar.gz
dexon-sol-tools-59cb2132f27c0c28a1e6077aaac320e485786e65.tar.bz2
dexon-sol-tools-59cb2132f27c0c28a1e6077aaac320e485786e65.tar.lz
dexon-sol-tools-59cb2132f27c0c28a1e6077aaac320e485786e65.tar.xz
dexon-sol-tools-59cb2132f27c0c28a1e6077aaac320e485786e65.tar.zst
dexon-sol-tools-59cb2132f27c0c28a1e6077aaac320e485786e65.zip
Linter now passes
Diffstat (limited to 'packages/contracts/src/utils')
-rw-r--r--packages/contracts/src/utils/coverage.ts1
-rw-r--r--packages/contracts/src/utils/exchange_wrapper.ts2
-rw-r--r--packages/contracts/src/utils/log_decoder.ts2
-rw-r--r--packages/contracts/src/utils/match_order_tester.ts24
-rw-r--r--packages/contracts/src/utils/multi_sig_wrapper.ts1
-rw-r--r--packages/contracts/src/utils/order_factory.ts1
-rw-r--r--packages/contracts/src/utils/order_utils.ts3
-rw-r--r--packages/contracts/src/utils/transaction_factory.ts1
-rw-r--r--packages/contracts/src/utils/types.ts4
-rw-r--r--packages/contracts/src/utils/web3_wrapper.ts1
10 files changed, 6 insertions, 34 deletions
diff --git a/packages/contracts/src/utils/coverage.ts b/packages/contracts/src/utils/coverage.ts
index a37939464..41c83f703 100644
--- a/packages/contracts/src/utils/coverage.ts
+++ b/packages/contracts/src/utils/coverage.ts
@@ -1,6 +1,5 @@
import { devConstants } from '@0xproject/dev-utils';
import { CoverageSubprovider, SolCompilerArtifactAdapter } from '@0xproject/sol-cov';
-import * as fs from 'fs';
import * as _ from 'lodash';
let coverageSubprovider: CoverageSubprovider;
diff --git a/packages/contracts/src/utils/exchange_wrapper.ts b/packages/contracts/src/utils/exchange_wrapper.ts
index dd278e77c..ea8eb47c7 100644
--- a/packages/contracts/src/utils/exchange_wrapper.ts
+++ b/packages/contracts/src/utils/exchange_wrapper.ts
@@ -1,7 +1,7 @@
import { AssetProxyId, SignedOrder } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
-import { LogEntry, Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
+import { Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
import * as _ from 'lodash';
import { ExchangeContract } from '../contract_wrappers/generated/exchange';
diff --git a/packages/contracts/src/utils/log_decoder.ts b/packages/contracts/src/utils/log_decoder.ts
index 07d10e69d..79d41d2da 100644
--- a/packages/contracts/src/utils/log_decoder.ts
+++ b/packages/contracts/src/utils/log_decoder.ts
@@ -39,7 +39,7 @@ export class LogDecoder {
}
public decodeLogOrThrow<ArgsType extends DecodedLogArgs>(log: LogEntry): LogWithDecodedArgs<ArgsType> | RawLog {
const logWithDecodedArgsOrLog = this._abiDecoder.tryToDecodeLogOrNoop(log);
- if (_.isUndefined((logWithDecodedArgsOrLog as LogWithDecodedArgs<ArgsType>).args)) {
+ if (_.isUndefined((logWithDecodedArgsOrLog).args)) {
throw new Error(`Unable to decode log: ${JSON.stringify(log)}`);
}
LogDecoder.wrapLogBigNumbers(logWithDecodedArgsOrLog);
diff --git a/packages/contracts/src/utils/match_order_tester.ts b/packages/contracts/src/utils/match_order_tester.ts
index 6170188bc..f4f7f965b 100644
--- a/packages/contracts/src/utils/match_order_tester.ts
+++ b/packages/contracts/src/utils/match_order_tester.ts
@@ -1,38 +1,21 @@
-import { BlockchainLifecycle } from '@0xproject/dev-utils';
-import { assetProxyUtils, crypto, orderHashUtils } from '@0xproject/order-utils';
+import { assetProxyUtils, orderHashUtils } from '@0xproject/order-utils';
import { AssetProxyId, SignedOrder } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import * as chai from 'chai';
-import { LogWithDecodedArgs } from 'ethereum-types';
-import ethUtil = require('ethereumjs-util');
import * as _ from 'lodash';
-import { DummyERC20TokenContract } from '../contract_wrappers/generated/dummy_e_r_c20_token';
-import { DummyERC721TokenContract } from '../contract_wrappers/generated/dummy_e_r_c721_token';
-import { ERC20ProxyContract } from '../contract_wrappers/generated/e_r_c20_proxy';
-import { ERC721ProxyContract } from '../contract_wrappers/generated/e_r_c721_proxy';
-import {
- CancelContractEventArgs,
- ExchangeContract,
- FillContractEventArgs,
-} from '../contract_wrappers/generated/exchange';
import { chaiSetup } from '../utils/chai_setup';
-import { constants } from '../utils/constants';
import { ERC20Wrapper } from '../utils/erc20_wrapper';
import { ERC721Wrapper } from '../utils/erc721_wrapper';
import { ExchangeWrapper } from '../utils/exchange_wrapper';
-import { OrderFactory } from '../utils/order_factory';
import {
- ContractName,
ERC20BalancesByOwner,
ERC721TokenIdsByOwner,
TransferAmountsByMatchOrders as TransferAmounts,
} from '../utils/types';
-import { provider, web3Wrapper } from '../utils/web3_wrapper';
chaiSetup.configure();
const expect = chai.expect;
-const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
export class MatchOrderTester {
private _exchangeWrapper: ExchangeWrapper;
@@ -112,11 +95,6 @@ export class MatchOrderTester {
initialTakerAssetFilledAmountLeft?: BigNumber,
initialTakerAssetFilledAmountRight?: BigNumber,
): Promise<[ERC20BalancesByOwner, ERC721TokenIdsByOwner]> {
- // Test setup & verify preconditions
- const makerAddressLeft = signedOrderLeft.makerAddress;
- const makerAddressRight = signedOrderRight.makerAddress;
- const feeRecipientAddressLeft = signedOrderLeft.feeRecipientAddress;
- const feeRecipientAddressRight = signedOrderRight.feeRecipientAddress;
// Verify Left order preconditions
const orderTakerAssetFilledAmountLeft = await this._exchangeWrapper.getTakerAssetFilledAmountAsync(
orderHashUtils.getOrderHashHex(signedOrderLeft),
diff --git a/packages/contracts/src/utils/multi_sig_wrapper.ts b/packages/contracts/src/utils/multi_sig_wrapper.ts
index 9971e8f6e..750466ce1 100644
--- a/packages/contracts/src/utils/multi_sig_wrapper.ts
+++ b/packages/contracts/src/utils/multi_sig_wrapper.ts
@@ -6,7 +6,6 @@ import * as _ from 'lodash';
import { AssetProxyOwnerContract } from '../contract_wrappers/generated/asset_proxy_owner';
import { MultiSigWalletContract } from '../contract_wrappers/generated/multi_sig_wallet';
-import { constants } from './constants';
import { LogDecoder } from './log_decoder';
export class MultiSigWrapper {
diff --git a/packages/contracts/src/utils/order_factory.ts b/packages/contracts/src/utils/order_factory.ts
index af411c01f..6e4c9a883 100644
--- a/packages/contracts/src/utils/order_factory.ts
+++ b/packages/contracts/src/utils/order_factory.ts
@@ -1,7 +1,6 @@
import { generatePseudoRandomSalt, orderHashUtils } from '@0xproject/order-utils';
import { Order, SignatureType, SignedOrder } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
-import * as _ from 'lodash';
import { constants } from './constants';
import { signingUtils } from './signing_utils';
diff --git a/packages/contracts/src/utils/order_utils.ts b/packages/contracts/src/utils/order_utils.ts
index 0d0329aa1..2a8791e4c 100644
--- a/packages/contracts/src/utils/order_utils.ts
+++ b/packages/contracts/src/utils/order_utils.ts
@@ -1,6 +1,5 @@
-import { Order, OrderWithoutExchangeAddress, SignedOrder } from '@0xproject/types';
+import { OrderWithoutExchangeAddress, SignedOrder } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
-import ethUtil = require('ethereumjs-util');
import { CancelOrder, MatchOrder } from './types';
diff --git a/packages/contracts/src/utils/transaction_factory.ts b/packages/contracts/src/utils/transaction_factory.ts
index 434611908..a060263b1 100644
--- a/packages/contracts/src/utils/transaction_factory.ts
+++ b/packages/contracts/src/utils/transaction_factory.ts
@@ -1,6 +1,5 @@
import { crypto, generatePseudoRandomSalt } from '@0xproject/order-utils';
import { SignatureType } from '@0xproject/types';
-import { BigNumber } from '@0xproject/utils';
import * as ethUtil from 'ethereumjs-util';
import { signingUtils } from './signing_utils';
diff --git a/packages/contracts/src/utils/types.ts b/packages/contracts/src/utils/types.ts
index 360e1fdbc..491890fa1 100644
--- a/packages/contracts/src/utils/types.ts
+++ b/packages/contracts/src/utils/types.ts
@@ -1,6 +1,6 @@
-import { Order, OrderWithoutExchangeAddress } from '@0xproject/types';
+import { OrderWithoutExchangeAddress } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
-import { AbiDefinition, ContractAbi } from 'ethereum-types';
+import { AbiDefinition } from 'ethereum-types';
export interface ERC20BalancesByOwner {
[ownerAddress: string]: {
diff --git a/packages/contracts/src/utils/web3_wrapper.ts b/packages/contracts/src/utils/web3_wrapper.ts
index 1049ab967..95fb55753 100644
--- a/packages/contracts/src/utils/web3_wrapper.ts
+++ b/packages/contracts/src/utils/web3_wrapper.ts
@@ -1,7 +1,6 @@
import { devConstants, env, EnvVars, web3Factory } from '@0xproject/dev-utils';
import { prependSubprovider } from '@0xproject/subproviders';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
-import { Provider } from 'ethereum-types';
import { coverage } from './coverage';