diff options
author | Fabio Berger <me@fabioberger.com> | 2018-06-07 18:27:03 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-06-07 18:27:03 +0800 |
commit | 73429fc7202ff7b58eb64a7e0b939b971f16a27e (patch) | |
tree | 6abd050f91750c819e98045d21cd8952a0e14071 /packages/0x.js | |
parent | cb754ee1253622974e751e4a8d723a424250c878 (diff) | |
parent | e0bc01eea1c20e0afda296f331c6a475e062b59c (diff) | |
download | dexon-sol-tools-73429fc7202ff7b58eb64a7e0b939b971f16a27e.tar.gz dexon-sol-tools-73429fc7202ff7b58eb64a7e0b939b971f16a27e.tar.zst dexon-sol-tools-73429fc7202ff7b58eb64a7e0b939b971f16a27e.zip |
merge v2-prototype
Diffstat (limited to 'packages/0x.js')
-rw-r--r-- | packages/0x.js/package.json | 5 | ||||
-rw-r--r-- | packages/0x.js/src/0x.ts | 1 | ||||
-rw-r--r-- | packages/0x.js/src/types.ts | 13 | ||||
-rw-r--r-- | packages/0x.js/src/utils/constants.ts | 2 | ||||
-rw-r--r-- | packages/0x.js/test/0x.js_test.ts | 7 | ||||
-rw-r--r-- | packages/0x.js/test/artifacts_test.ts | 1 | ||||
-rw-r--r-- | packages/0x.js/test/global_hooks.ts | 2 | ||||
-rw-r--r-- | packages/0x.js/test/utils/web3_wrapper.ts | 2 |
8 files changed, 6 insertions, 27 deletions
diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index 430089bff..997ecff1a 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -20,8 +20,8 @@ "build:all": "run-p build:umd:prod build:commonjs; exit 0;", "pre_build": "run-s generate_contract_wrappers copy_artifacts", "copy_artifacts": "copyfiles -u 2 './src/compact_artifacts/**/*.json' ./lib/src/compact_artifacts", - "generate_contract_wrappers": "abi-gen --abis 'src/compact_artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|TokenRegistry|DummyToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers && prettier --write 'src/generated_contract_wrappers/**.ts'", - "lint": "tslint --project .", + "generate_contract_wrappers": "abi-gen --abis 'src/compact_artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|TokenRegistry|DummyToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers/generated --backend ethers", + "lint": "tslint --project . --exclude **/src/contract_wrappers/generated/**/*", "test:circleci": "run-s test:coverage", "test": "yarn run_mocha", "rebuild_and_test": "run-s build test", @@ -91,7 +91,6 @@ "npm-run-all": "^4.1.2", "nyc": "^11.0.1", "opn-cli": "^3.1.0", - "prettier": "^1.11.1", "shx": "^0.2.2", "sinon": "^4.0.0", "source-map-support": "^0.5.0", diff --git a/packages/0x.js/src/0x.ts b/packages/0x.js/src/0x.ts index 206954a0b..001f336e7 100644 --- a/packages/0x.js/src/0x.ts +++ b/packages/0x.js/src/0x.ts @@ -19,7 +19,6 @@ import { OrderWatcher, OrderWatcherConfig } from '@0xproject/order-watcher'; import { ECSignature, Order, Provider, SignedOrder, TransactionReceiptWithDecodedLogs } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; -import * as _ from 'lodash'; import { constants } from './utils/constants'; diff --git a/packages/0x.js/src/types.ts b/packages/0x.js/src/types.ts index a8cf62c64..651b15abd 100644 --- a/packages/0x.js/src/types.ts +++ b/packages/0x.js/src/types.ts @@ -1,16 +1,3 @@ -import { - BlockParam, - BlockParamLiteral, - ContractAbi, - ContractEventArg, - ExchangeContractErrs, - FilterObject, - LogWithDecodedArgs, - Order, - OrderState, - SignedOrder, -} from '@0xproject/types'; - export enum InternalZeroExError { NoAbiDecoder = 'NO_ABI_DECODER', ZrxNotInTokenRegistry = 'ZRX_NOT_IN_TOKEN_REGISTRY', diff --git a/packages/0x.js/src/utils/constants.ts b/packages/0x.js/src/utils/constants.ts index 7cd5eb574..5a5ba0e0a 100644 --- a/packages/0x.js/src/utils/constants.ts +++ b/packages/0x.js/src/utils/constants.ts @@ -1,5 +1,3 @@ -import { BigNumber } from '@0xproject/utils'; - export const constants = { NULL_ADDRESS: '0x0000000000000000000000000000000000000000', TESTRPC_NETWORK_ID: 50, diff --git a/packages/0x.js/test/0x.js_test.ts b/packages/0x.js/test/0x.js_test.ts index 509d3f9f2..5d2eb6d7e 100644 --- a/packages/0x.js/test/0x.js_test.ts +++ b/packages/0x.js/test/0x.js_test.ts @@ -1,14 +1,12 @@ import { ContractWrappers } from '@0xproject/contract-wrappers'; -import { BlockchainLifecycle, devConstants, web3Factory } from '@0xproject/dev-utils'; +import { BlockchainLifecycle } from '@0xproject/dev-utils'; import { BigNumber } from '@0xproject/utils'; import * as chai from 'chai'; import * as _ from 'lodash'; import 'make-promises-safe'; import 'mocha'; -import * as path from 'path'; -import * as Sinon from 'sinon'; -import { ApprovalContractEventArgs, LogWithDecodedArgs, Order, TokenEvents, ZeroEx } from '../src'; +import { ApprovalContractEventArgs, LogWithDecodedArgs, TokenEvents, ZeroEx } from '../src'; import { chaiSetup } from './utils/chai_setup'; import { constants } from './utils/constants'; @@ -137,6 +135,7 @@ describe('ZeroEx library', () => { const proxyAddress = zeroEx.proxy.getContractAddress(); const txHash = await zeroEx.token.setUnlimitedProxyAllowanceAsync(zrxTokenAddress, coinbase); const txReceiptWithDecodedLogs = await zeroEx.awaitTransactionMinedAsync(txHash); + // tslint:disable-next-line:no-unnecessary-type-assertion const log = txReceiptWithDecodedLogs.logs[0] as LogWithDecodedArgs<ApprovalContractEventArgs>; expect(log.event).to.be.equal(TokenEvents.Approval); expect(log.args._owner).to.be.equal(coinbase); diff --git a/packages/0x.js/test/artifacts_test.ts b/packages/0x.js/test/artifacts_test.ts index 982fb8e63..fd7066aac 100644 --- a/packages/0x.js/test/artifacts_test.ts +++ b/packages/0x.js/test/artifacts_test.ts @@ -1,5 +1,4 @@ import { web3Factory } from '@0xproject/dev-utils'; -import * as fs from 'fs'; import 'make-promises-safe'; import { ZeroEx } from '../src'; diff --git a/packages/0x.js/test/global_hooks.ts b/packages/0x.js/test/global_hooks.ts index 6d2c3219b..9d6903af5 100644 --- a/packages/0x.js/test/global_hooks.ts +++ b/packages/0x.js/test/global_hooks.ts @@ -1,8 +1,6 @@ import { devConstants } from '@0xproject/dev-utils'; import { runV1MigrationsAsync } from '@0xproject/migrations'; -import * as path from 'path'; -import { constants } from './utils/constants'; import { provider } from './utils/web3_wrapper'; before('migrate contracts', async function(): Promise<void> { diff --git a/packages/0x.js/test/utils/web3_wrapper.ts b/packages/0x.js/test/utils/web3_wrapper.ts index 71a0dc1c2..f7d11f138 100644 --- a/packages/0x.js/test/utils/web3_wrapper.ts +++ b/packages/0x.js/test/utils/web3_wrapper.ts @@ -1,4 +1,4 @@ -import { devConstants, web3Factory } from '@0xproject/dev-utils'; +import { web3Factory } from '@0xproject/dev-utils'; import { Provider } from '@0xproject/types'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; |