aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-12-15 20:58:30 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-12-15 20:58:30 +0800
commit126048bac9f52871b841d9898cabe7cfd265ebb6 (patch)
treebcb2d17aeeaa4a99482bdf8e8a41758f02fd4ee4 /packages/contracts
parent274aa50d740e4f3af9e3d50468843ed19b555aa3 (diff)
downloaddexon-sol-tools-126048bac9f52871b841d9898cabe7cfd265ebb6.tar
dexon-sol-tools-126048bac9f52871b841d9898cabe7cfd265ebb6.tar.gz
dexon-sol-tools-126048bac9f52871b841d9898cabe7cfd265ebb6.tar.bz2
dexon-sol-tools-126048bac9f52871b841d9898cabe7cfd265ebb6.tar.lz
dexon-sol-tools-126048bac9f52871b841d9898cabe7cfd265ebb6.tar.xz
dexon-sol-tools-126048bac9f52871b841d9898cabe7cfd265ebb6.tar.zst
dexon-sol-tools-126048bac9f52871b841d9898cabe7cfd265ebb6.zip
Fix connect unused vars
Diffstat (limited to 'packages/contracts')
-rw-r--r--packages/contracts/deploy/migrations/migrate.ts2
-rw-r--r--packages/contracts/deploy/src/compiler.ts2
-rw-r--r--packages/contracts/deploy/src/deployer.ts1
-rw-r--r--packages/contracts/deploy/test/deploy_test.ts2
-rw-r--r--packages/contracts/migrations/2_deploy_independent_contracts.ts2
-rw-r--r--packages/contracts/migrations/3_register_tokens.ts2
-rw-r--r--packages/contracts/test/ts/ether_token_v2.ts5
-rw-r--r--packages/contracts/test/ts/exchange/core.ts1
-rw-r--r--packages/contracts/test/ts/exchange/wrapper.ts4
-rw-r--r--packages/contracts/util/crypto.ts1
10 files changed, 6 insertions, 16 deletions
diff --git a/packages/contracts/deploy/migrations/migrate.ts b/packages/contracts/deploy/migrations/migrate.ts
index f40b7c4ba..e893e6a6f 100644
--- a/packages/contracts/deploy/migrations/migrate.ts
+++ b/packages/contracts/deploy/migrations/migrate.ts
@@ -1,11 +1,9 @@
import {Web3Wrapper} from '@0xproject/web3-wrapper';
import {BigNumber} from 'bignumber.js';
import * as _ from 'lodash';
-import * as Web3 from 'web3';
import {Deployer} from './../src/deployer';
import {constants} from './../src/utils/constants';
-import {Token} from './../src/utils/types';
import {tokenInfo} from './config/token_info';
export const migrator = {
diff --git a/packages/contracts/deploy/src/compiler.ts b/packages/contracts/deploy/src/compiler.ts
index 8a44e94a3..333a2d0ce 100644
--- a/packages/contracts/deploy/src/compiler.ts
+++ b/packages/contracts/deploy/src/compiler.ts
@@ -1,4 +1,3 @@
-import {promisify} from '@0xproject/utils';
import * as ethUtil from 'ethereumjs-util';
import * as _ from 'lodash';
import * as path from 'path';
@@ -14,7 +13,6 @@ import {
ContractNetworks,
ContractSources,
ImportContents,
- SolcErrors,
} from './utils/types';
import {utils} from './utils/utils';
diff --git a/packages/contracts/deploy/src/deployer.ts b/packages/contracts/deploy/src/deployer.ts
index 4c8018ecc..991504972 100644
--- a/packages/contracts/deploy/src/deployer.ts
+++ b/packages/contracts/deploy/src/deployer.ts
@@ -1,5 +1,4 @@
import {TxData} from '@0xproject/types';
-import {promisify} from '@0xproject/utils';
import {Web3Wrapper} from '@0xproject/web3-wrapper';
import * as _ from 'lodash';
import * as Web3 from 'web3';
diff --git a/packages/contracts/deploy/test/deploy_test.ts b/packages/contracts/deploy/test/deploy_test.ts
index 7e7b98f90..263174a94 100644
--- a/packages/contracts/deploy/test/deploy_test.ts
+++ b/packages/contracts/deploy/test/deploy_test.ts
@@ -4,7 +4,7 @@ import 'mocha';
import {Compiler} from './../src/compiler';
import {Deployer} from './../src/deployer';
import {fsWrapper} from './../src/utils/fs_wrapper';
-import {CompilerOptions, ContractArtifact, ContractData, DeployerOptions, DoneCallback} from './../src/utils/types';
+import {CompilerOptions, ContractArtifact, ContractData, DoneCallback} from './../src/utils/types';
import {constructor_args, exchange_binary} from './fixtures/exchange_bin';
import {constants} from './util/constants';
diff --git a/packages/contracts/migrations/2_deploy_independent_contracts.ts b/packages/contracts/migrations/2_deploy_independent_contracts.ts
index db9fc370d..4bf316be6 100644
--- a/packages/contracts/migrations/2_deploy_independent_contracts.ts
+++ b/packages/contracts/migrations/2_deploy_independent_contracts.ts
@@ -1,5 +1,5 @@
import {Artifacts} from '../util/artifacts';
-import {ContractInstance, MultiSigConfigByNetwork} from '../util/types';
+import {MultiSigConfigByNetwork} from '../util/types';
const {
MultiSigWalletWithTimeLock,
TokenTransferProxy,
diff --git a/packages/contracts/migrations/3_register_tokens.ts b/packages/contracts/migrations/3_register_tokens.ts
index c72ac1510..f81693628 100644
--- a/packages/contracts/migrations/3_register_tokens.ts
+++ b/packages/contracts/migrations/3_register_tokens.ts
@@ -3,7 +3,7 @@ import * as _ from 'lodash';
import {Artifacts} from '../util/artifacts';
import {constants} from '../util/constants';
-import {ContractInstance, Token, TokenInfoByNetwork} from '../util/types';
+import {ContractInstance, Token} from '../util/types';
import {tokenInfo} from './config/token_info';
const {
diff --git a/packages/contracts/test/ts/ether_token_v2.ts b/packages/contracts/test/ts/ether_token_v2.ts
index b88fef579..61ac4cb57 100644
--- a/packages/contracts/test/ts/ether_token_v2.ts
+++ b/packages/contracts/test/ts/ether_token_v2.ts
@@ -81,7 +81,7 @@ contract('EtherTokenV2', (accounts: string[]) => {
const logArgs = (logs[0] as any).args;
expect(logArgs._from).to.equal(expectedFrom);
expect(logArgs._to).to.equal(expectedTo);
- expect(logArgs._value).to.be.bignumber.equal(ethToDeposit);
+ expect(logArgs._value).to.be.bignumber.equal(expectedValue);
});
});
@@ -120,7 +120,6 @@ contract('EtherTokenV2', (accounts: string[]) => {
it('should log 1 event with correct arguments', async () => {
const initEthTokenBalance = await zeroEx.token.getBalanceAsync(etherTokenAddress, account);
- const initEthBalance = await getEthBalanceAsync(account);
const ethTokensToWithdraw = initEthTokenBalance;
expect(ethTokensToWithdraw).to.not.be.bignumber.equal(0);
const txHash = await zeroEx.etherToken.withdrawAsync(ethTokensToWithdraw, account, {
@@ -137,7 +136,7 @@ contract('EtherTokenV2', (accounts: string[]) => {
const logArgs = (logs[0] as any).args;
expect(logArgs._from).to.equal(expectedFrom);
expect(logArgs._to).to.equal(expectedTo);
- expect(logArgs._value).to.be.bignumber.equal(ethTokensToWithdraw);
+ expect(logArgs._value).to.be.bignumber.equal(expectedValue);
});
});
diff --git a/packages/contracts/test/ts/exchange/core.ts b/packages/contracts/test/ts/exchange/core.ts
index 641084937..aef2b5a5d 100644
--- a/packages/contracts/test/ts/exchange/core.ts
+++ b/packages/contracts/test/ts/exchange/core.ts
@@ -748,7 +748,6 @@ contract('Exchange', (accounts: string[]) => {
const res = await exWrapper.cancelOrderAsync(order, maker);
expect(res.logs).to.have.length(1);
- const errId = res.logs[0].args.errorId.toNumber();
const errCode = res.logs[0].args.errorId.toNumber();
expect(errCode).to.be.equal(ExchangeContractErrs.ERROR_ORDER_FULLY_FILLED_OR_CANCELLED);
});
diff --git a/packages/contracts/test/ts/exchange/wrapper.ts b/packages/contracts/test/ts/exchange/wrapper.ts
index 3097f6887..13a0b6058 100644
--- a/packages/contracts/test/ts/exchange/wrapper.ts
+++ b/packages/contracts/test/ts/exchange/wrapper.ts
@@ -227,8 +227,6 @@ contract('Exchange', (accounts: string[]) => {
it('should throw if a single order does not fill the expected amount', async () => {
const fillTakerTokenAmounts: BigNumber[] = [];
- const makerToken = rep.address;
- const takerToken = dgd.address;
orders.forEach(order => {
const fillTakerTokenAmount = order.params.takerTokenAmount.div(2);
fillTakerTokenAmounts.push(fillTakerTokenAmount);
@@ -311,7 +309,7 @@ contract('Exchange', (accounts: string[]) => {
const cancelTakerTokenAmounts = _.map(orders, order => order.params.takerTokenAmount);
await exWrapper.batchCancelOrdersAsync(orders, maker, {cancelTakerTokenAmounts});
- const res = await exWrapper.batchFillOrdersAsync(
+ await exWrapper.batchFillOrdersAsync(
orders, taker, {fillTakerTokenAmounts: cancelTakerTokenAmounts});
const newBalances = await dmyBalances.getAsync();
expect(balances).to.be.deep.equal(newBalances);
diff --git a/packages/contracts/util/crypto.ts b/packages/contracts/util/crypto.ts
index 5253b8c15..2e43ae816 100644
--- a/packages/contracts/util/crypto.ts
+++ b/packages/contracts/util/crypto.ts
@@ -1,4 +1,3 @@
-import {BigNumber} from 'bignumber.js';
import BN = require('bn.js');
import ABI = require('ethereumjs-abi');
import ethUtil = require('ethereumjs-util');