aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/src/utils
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-11-23 04:07:53 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-11-24 05:13:37 +0800
commit87d34f9c7f3ccf22e01798c27c4a4d5d4f943816 (patch)
treee92510af5e9f1504acbfda424a59bf4facd0249d /packages/0x.js/src/utils
parentd20926e150beed4785b31451a415bbf545f850be (diff)
downloaddexon-sol-tools-87d34f9c7f3ccf22e01798c27c4a4d5d4f943816.tar
dexon-sol-tools-87d34f9c7f3ccf22e01798c27c4a4d5d4f943816.tar.gz
dexon-sol-tools-87d34f9c7f3ccf22e01798c27c4a4d5d4f943816.tar.bz2
dexon-sol-tools-87d34f9c7f3ccf22e01798c27c4a4d5d4f943816.tar.lz
dexon-sol-tools-87d34f9c7f3ccf22e01798c27c4a4d5d4f943816.tar.xz
dexon-sol-tools-87d34f9c7f3ccf22e01798c27c4a4d5d4f943816.tar.zst
dexon-sol-tools-87d34f9c7f3ccf22e01798c27c4a4d5d4f943816.zip
Auto-fix linter errors
Diffstat (limited to 'packages/0x.js/src/utils')
-rw-r--r--packages/0x.js/src/utils/abi_decoder.ts7
-rw-r--r--packages/0x.js/src/utils/assert.ts11
-rw-r--r--packages/0x.js/src/utils/decorators.ts4
-rw-r--r--packages/0x.js/src/utils/exchange_transfer_simulator.ts5
-rw-r--r--packages/0x.js/src/utils/filter_utils.ts7
-rw-r--r--packages/0x.js/src/utils/order_state_utils.ts23
-rw-r--r--packages/0x.js/src/utils/order_validation_utils.ts10
-rw-r--r--packages/0x.js/src/utils/signature_utils.ts1
-rw-r--r--packages/0x.js/src/utils/utils.ts7
9 files changed, 43 insertions, 32 deletions
diff --git a/packages/0x.js/src/utils/abi_decoder.ts b/packages/0x.js/src/utils/abi_decoder.ts
index df0fb2d6f..f027026da 100644
--- a/packages/0x.js/src/utils/abi_decoder.ts
+++ b/packages/0x.js/src/utils/abi_decoder.ts
@@ -1,9 +1,10 @@
-import * as Web3 from 'web3';
-import * as _ from 'lodash';
import BigNumber from 'bignumber.js';
-import {AbiType, DecodedLogArgs, LogWithDecodedArgs, RawLog, SolidityTypes, ContractEventArgs} from '../types';
+import * as _ from 'lodash';
+import * as Web3 from 'web3';
import * as SolidityCoder from 'web3/lib/solidity/coder';
+import {AbiType, ContractEventArgs, DecodedLogArgs, LogWithDecodedArgs, RawLog, SolidityTypes} from '../types';
+
export class AbiDecoder {
private savedABIs: Web3.AbiDefinition[] = [];
private methodIds: {[signatureHash: string]: Web3.EventAbi} = {};
diff --git a/packages/0x.js/src/utils/assert.ts b/packages/0x.js/src/utils/assert.ts
index 55912525c..3cff9d2cf 100644
--- a/packages/0x.js/src/utils/assert.ts
+++ b/packages/0x.js/src/utils/assert.ts
@@ -1,11 +1,12 @@
+import {assert as sharedAssert} from '@0xproject/assert';
+import {Schema, SchemaValidator} from '@0xproject/json-schemas';
+import BigNumber from 'bignumber.js';
import * as _ from 'lodash';
import * as Web3 from 'web3';
-import BigNumber from 'bignumber.js';
-import {SchemaValidator, Schema} from '@0xproject/json-schemas';
-import {assert as sharedAssert} from '@0xproject/assert';
-import {Web3Wrapper} from '../web3_wrapper';
-import {signatureUtils} from '../utils/signature_utils';
+
import {ECSignature} from '../types';
+import {signatureUtils} from '../utils/signature_utils';
+import {Web3Wrapper} from '../web3_wrapper';
const HEX_REGEX = /^0x[0-9A-F]*$/i;
diff --git a/packages/0x.js/src/utils/decorators.ts b/packages/0x.js/src/utils/decorators.ts
index ec750b891..1760d8872 100644
--- a/packages/0x.js/src/utils/decorators.ts
+++ b/packages/0x.js/src/utils/decorators.ts
@@ -1,7 +1,9 @@
import * as _ from 'lodash';
-import {constants} from './constants';
+
import {AsyncMethod, ZeroExError} from '../types';
+import {constants} from './constants';
+
export const decorators = {
/**
* Source: https://stackoverflow.com/a/29837695/3546986
diff --git a/packages/0x.js/src/utils/exchange_transfer_simulator.ts b/packages/0x.js/src/utils/exchange_transfer_simulator.ts
index cadded224..c3a2d1585 100644
--- a/packages/0x.js/src/utils/exchange_transfer_simulator.ts
+++ b/packages/0x.js/src/utils/exchange_transfer_simulator.ts
@@ -1,8 +1,9 @@
-import * as _ from 'lodash';
import BigNumber from 'bignumber.js';
-import {ExchangeContractErrs, TradeSide, TransferType, BlockParamLiteral} from '../types';
+import * as _ from 'lodash';
+
import {TokenWrapper} from '../contract_wrappers/token_wrapper';
import {BalanceAndProxyAllowanceLazyStore} from '../stores/balance_proxy_allowance_lazy_store';
+import {BlockParamLiteral, ExchangeContractErrs, TradeSide, TransferType} from '../types';
enum FailureReason {
Balance = 'balance',
diff --git a/packages/0x.js/src/utils/filter_utils.ts b/packages/0x.js/src/utils/filter_utils.ts
index e09a95a6e..57c3ee71c 100644
--- a/packages/0x.js/src/utils/filter_utils.ts
+++ b/packages/0x.js/src/utils/filter_utils.ts
@@ -1,8 +1,9 @@
-import * as _ from 'lodash';
-import * as Web3 from 'web3';
-import * as uuid from 'uuid/v4';
import * as ethUtil from 'ethereumjs-util';
import * as jsSHA3 from 'js-sha3';
+import * as _ from 'lodash';
+import * as uuid from 'uuid/v4';
+import * as Web3 from 'web3';
+
import {ContractEvents, IndexedFilterValues, SubscriptionOpts} from '../types';
const TOPIC_LENGTH = 32;
diff --git a/packages/0x.js/src/utils/order_state_utils.ts b/packages/0x.js/src/utils/order_state_utils.ts
index 891849424..6654b9ae1 100644
--- a/packages/0x.js/src/utils/order_state_utils.ts
+++ b/packages/0x.js/src/utils/order_state_utils.ts
@@ -1,23 +1,24 @@
+import BigNumber from 'bignumber.js';
import * as _ from 'lodash';
import * as Web3 from 'web3';
-import BigNumber from 'bignumber.js';
+
+import {ZeroEx} from '../0x';
+import {ExchangeWrapper} from '../contract_wrappers/exchange_wrapper';
+import {TokenWrapper} from '../contract_wrappers/token_wrapper';
+import {RemainingFillableCalculator} from '../order_watcher/remaining_fillable_calculator';
+import {BalanceAndProxyAllowanceLazyStore} from '../stores/balance_proxy_allowance_lazy_store';
+import {OrderFilledCancelledLazyStore} from '../stores/order_filled_cancelled_lazy_store';
import {
ExchangeContractErrs,
- SignedOrder,
- OrderRelevantState,
MethodOpts,
+ OrderRelevantState,
OrderState,
- OrderStateValid,
OrderStateInvalid,
+ OrderStateValid,
+ SignedOrder,
} from '../types';
-import {ZeroEx} from '../0x';
-import {TokenWrapper} from '../contract_wrappers/token_wrapper';
-import {ExchangeWrapper} from '../contract_wrappers/exchange_wrapper';
-import {utils} from '../utils/utils';
import {constants} from '../utils/constants';
-import {OrderFilledCancelledLazyStore} from '../stores/order_filled_cancelled_lazy_store';
-import {BalanceAndProxyAllowanceLazyStore} from '../stores/balance_proxy_allowance_lazy_store';
-import {RemainingFillableCalculator} from '../order_watcher/remaining_fillable_calculator';
+import {utils} from '../utils/utils';
const ACCEPTABLE_RELATIVE_ROUNDING_ERROR = 0.0001;
diff --git a/packages/0x.js/src/utils/order_validation_utils.ts b/packages/0x.js/src/utils/order_validation_utils.ts
index 4822f66e2..06cfca7bd 100644
--- a/packages/0x.js/src/utils/order_validation_utils.ts
+++ b/packages/0x.js/src/utils/order_validation_utils.ts
@@ -1,11 +1,13 @@
-import * as _ from 'lodash';
import BigNumber from 'bignumber.js';
-import {ExchangeContractErrs, SignedOrder, Order, ZeroExError, TradeSide, TransferType} from '../types';
+import * as _ from 'lodash';
+
import {ZeroEx} from '../0x';
-import {TokenWrapper} from '../contract_wrappers/token_wrapper';
import {ExchangeWrapper} from '../contract_wrappers/exchange_wrapper';
-import {utils} from '../utils/utils';
+import {TokenWrapper} from '../contract_wrappers/token_wrapper';
+import {ExchangeContractErrs, Order, SignedOrder, TradeSide, TransferType, ZeroExError} from '../types';
import {constants} from '../utils/constants';
+import {utils} from '../utils/utils';
+
import {ExchangeTransferSimulator} from './exchange_transfer_simulator';
export class OrderValidationUtils {
diff --git a/packages/0x.js/src/utils/signature_utils.ts b/packages/0x.js/src/utils/signature_utils.ts
index d066f8bf0..aaf04e7b0 100644
--- a/packages/0x.js/src/utils/signature_utils.ts
+++ b/packages/0x.js/src/utils/signature_utils.ts
@@ -1,4 +1,5 @@
import * as ethUtil from 'ethereumjs-util';
+
import {ECSignature} from '../types';
export const signatureUtils = {
diff --git a/packages/0x.js/src/utils/utils.ts b/packages/0x.js/src/utils/utils.ts
index 5370c3b4b..04ae34aac 100644
--- a/packages/0x.js/src/utils/utils.ts
+++ b/packages/0x.js/src/utils/utils.ts
@@ -1,9 +1,10 @@
-import * as _ from 'lodash';
+import BigNumber from 'bignumber.js';
+import BN = require('bn.js');
import * as ethABI from 'ethereumjs-abi';
import * as ethUtil from 'ethereumjs-util';
+import * as _ from 'lodash';
+
import {Order, SignedOrder, SolidityTypes} from '../types';
-import BigNumber from 'bignumber.js';
-import BN = require('bn.js');
export const utils = {
/**