aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-12-24 13:54:51 +0800
committerGreg Hysen <greg.hysen@gmail.com>2019-01-15 02:49:44 +0800
commitf39c03191c8a8870aaf5180d2764cd8c8eb17d0c (patch)
treedd6366ca1c7a799d3d92e73436766bd0c278b071
parent05adb38a09021581e955d45644c4b34ea720fe74 (diff)
downloaddexon-0x-contracts-f39c03191c8a8870aaf5180d2764cd8c8eb17d0c.tar.gz
dexon-0x-contracts-f39c03191c8a8870aaf5180d2764cd8c8eb17d0c.tar.zst
dexon-0x-contracts-f39c03191c8a8870aaf5180d2764cd8c8eb17d0c.zip
Ran linter
-rw-r--r--contracts/protocol/test/utils/exchange_wrapper.ts13
-rw-r--r--contracts/protocol/test/utils/fill_order_combinatorial_utils.ts1
-rw-r--r--contracts/protocol/test/utils/types.ts4
-rw-r--r--packages/base-contract/src/index.ts12
-rw-r--r--packages/utils/src/abi_encoder/evm_data_types/tuple.ts1
5 files changed, 18 insertions, 13 deletions
diff --git a/contracts/protocol/test/utils/exchange_wrapper.ts b/contracts/protocol/test/utils/exchange_wrapper.ts
index 804b0141e..0feb5af15 100644
--- a/contracts/protocol/test/utils/exchange_wrapper.ts
+++ b/contracts/protocol/test/utils/exchange_wrapper.ts
@@ -7,12 +7,11 @@ import {
SignedTransaction,
} from '@0x/contracts-test-utils';
import { artifacts as tokensArtifacts } from '@0x/contracts-tokens';
-import { OrderWithoutExchangeAddress, SignedOrder } from '@0x/types';
-import { BigNumber } from '@0x/utils';
+import { SignedOrder } from '@0x/types';
+import { AbiEncoder, BigNumber } from '@0x/utils';
import { Web3Wrapper } from '@0x/web3-wrapper';
import { AbiDefinition, MethodAbi, Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
import * as _ from 'lodash';
-import { AbiEncoder } from '@0x/utils';
import { ExchangeContract } from '../../generated-wrappers/exchange';
import { artifacts } from '../../src/artifacts';
@@ -279,12 +278,10 @@ export class ExchangeWrapper {
);
return data;
}
- public abiDecodeFillOrder(
- data: string,
- ): AbiDecodedFillOrderData {
+ public abiDecodeFillOrder(data: string): AbiDecodedFillOrderData {
// Lookup fillOrder ABI
- let fillOrderAbi = _.find(this._exchange.abi, (value: AbiDefinition) => {
- if (value.type === 'function' && (value as MethodAbi).name === 'fillOrder') {
+ const fillOrderAbi = _.find(this._exchange.abi, (value: AbiDefinition) => {
+ if (value.type === 'function' && (value as any).name === 'fillOrder') {
return true;
}
return false;
diff --git a/contracts/protocol/test/utils/fill_order_combinatorial_utils.ts b/contracts/protocol/test/utils/fill_order_combinatorial_utils.ts
index df38bd59c..86490c37e 100644
--- a/contracts/protocol/test/utils/fill_order_combinatorial_utils.ts
+++ b/contracts/protocol/test/utils/fill_order_combinatorial_utils.ts
@@ -42,7 +42,6 @@ import { ExchangeWrapper } from './exchange_wrapper';
import { OrderFactoryFromScenario } from './order_factory_from_scenario';
import { SimpleAssetBalanceAndProxyAllowanceFetcher } from './simple_asset_balance_and_proxy_allowance_fetcher';
import { SimpleOrderFilledCancelledFetcher } from './simple_order_filled_cancelled_fetcher';
-import { Method } from '@0x/utils/lib/src/abi_encoder';
chaiSetup.configure();
const expect = chai.expect;
diff --git a/contracts/protocol/test/utils/types.ts b/contracts/protocol/test/utils/types.ts
index d18cd0599..b4cd88673 100644
--- a/contracts/protocol/test/utils/types.ts
+++ b/contracts/protocol/test/utils/types.ts
@@ -2,7 +2,7 @@ import { SignedOrder } from '@0x/types';
import { BigNumber } from '@0x/utils';
export interface AbiDecodedFillOrderData {
- order: SignedOrder;
+ order: SignedOrder;
akerAssetFillAmount: BigNumber;
signature: string;
-} \ No newline at end of file
+}
diff --git a/packages/base-contract/src/index.ts b/packages/base-contract/src/index.ts
index a08c3381d..f9867a348 100644
--- a/packages/base-contract/src/index.ts
+++ b/packages/base-contract/src/index.ts
@@ -1,6 +1,16 @@
import { AbiEncoder, abiUtils } from '@0x/utils';
import { Web3Wrapper } from '@0x/web3-wrapper';
-import { AbiDefinition, AbiType, ConstructorAbi, ContractAbi, DataItem, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
+import {
+ AbiDefinition,
+ AbiType,
+ ConstructorAbi,
+ ContractAbi,
+ DataItem,
+ MethodAbi,
+ Provider,
+ TxData,
+ TxDataPayable,
+} from 'ethereum-types';
import * as ethers from 'ethers';
import * as _ from 'lodash';
diff --git a/packages/utils/src/abi_encoder/evm_data_types/tuple.ts b/packages/utils/src/abi_encoder/evm_data_types/tuple.ts
index 3d1cb5a92..2370ecdef 100644
--- a/packages/utils/src/abi_encoder/evm_data_types/tuple.ts
+++ b/packages/utils/src/abi_encoder/evm_data_types/tuple.ts
@@ -5,7 +5,6 @@ import { DataTypeFactory } from '../abstract_data_types/interfaces';
import { AbstractSetDataType } from '../abstract_data_types/types/set';
export class TupleDataType extends AbstractSetDataType {
-
public static matchType(type: string): boolean {
return type === SolidityTypes.Tuple;
}