diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-01-10 18:23:03 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-01-10 18:23:03 +0800 |
commit | a767c353d25588cf5802868ee7b3710e99316e96 (patch) | |
tree | a4d2bbf93e082a719007f8cc5903ce2028fd32b2 | |
parent | a39d3d723399e124ae617dfda67e754907312a98 (diff) | |
parent | c700046b7673a0f470c8d8abeec3cf873049a78a (diff) | |
download | dexon-0x-contracts-a767c353d25588cf5802868ee7b3710e99316e96.tar dexon-0x-contracts-a767c353d25588cf5802868ee7b3710e99316e96.tar.gz dexon-0x-contracts-a767c353d25588cf5802868ee7b3710e99316e96.tar.bz2 dexon-0x-contracts-a767c353d25588cf5802868ee7b3710e99316e96.tar.lz dexon-0x-contracts-a767c353d25588cf5802868ee7b3710e99316e96.tar.xz dexon-0x-contracts-a767c353d25588cf5802868ee7b3710e99316e96.tar.zst dexon-0x-contracts-a767c353d25588cf5802868ee7b3710e99316e96.zip |
Merge branch 'fix/prettify_json' into development
88 files changed, 3096 insertions, 3150 deletions
diff --git a/.prettierignore b/.prettierignore index 4d69afcba..79eeb6b8c 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1,4 @@ lib generated +.nyc_output +/packages/contracts/build/contracts diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c0fd7d89c..e8828ff6b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,5 +1,4 @@ -0x Contribution Guide ---------------------- +## 0x Contribution Guide Thank you for your interest in contributing to 0x protocol! We welcome contributions from anyone on the internet, and are grateful for even the smallest of fixes! diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index 5c917a901..db78022e2 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -1,2 +1,3 @@ This PR: -* + +\* @@ -11,43 +11,43 @@ This repository contains all the 0x developer tools written in TypeScript. Our h [![CircleCI](https://circleci.com/gh/0xProject/0x.js.svg?style=svg&circle-token=61bf7cd8c9b4e11b132089dfcffdd1be277d1e0c)](https://circleci.com/gh/0xProject/0x.js) [![Coverage Status](https://coveralls.io/repos/github/0xProject/0x.js/badge.svg?branch=master&t=fp0cXD)](https://coveralls.io/github/0xProject/0x.js?branch=master) -[![Discord](https://img.shields.io/badge/chat-rocket.chat-yellow.svg?style=flat -)](https://chat.0xproject.com) +[![Discord](https://img.shields.io/badge/chat-rocket.chat-yellow.svg?style=flat)](https://chat.0xproject.com) [![Join the chat at https://gitter.im/0xProject/Lobby](https://badges.gitter.im/0xProject/Lobby.svg)](https://gitter.im/0xProject/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Greenkeeper badge](https://badges.greenkeeper.io/0xProject/0x.js.svg?token=7c22e5c72acf39d3ead8d29c5d9bb38f9096df3e643024dcedd53ab732847be1&ts=1496426342666)](https://greenkeeper.io/) ### Published Packages -| Package | Version | Description | -|---------|---------|-------------| -| [`0x.js`](/packages/0x.js) | [![npm](https://img.shields.io/npm/v/0x.js.svg)](https://www.npmjs.com/package/0x.js) | A Javascript library for interacting with the 0x protocol | -| [`@0xproject/abi-gen`](/packages/abi-gen) | [![npm](https://img.shields.io/npm/v/@0xproject/abi-gen.svg)](https://www.npmjs.com/package/@0xproject/abi-gen) | Tool to generate TS wrappers from smart contract ABIs | -| [`@0xproject/assert`](/packages/assert) | [![npm](https://img.shields.io/npm/v/@0xproject/assert.svg)](https://www.npmjs.com/package/@0xproject/assert) | Type and schema assertions used by our packages | -| [`@0xproject/connect`](/packages/connect) | [![npm](https://img.shields.io/npm/v/@0xproject/connect.svg)](https://www.npmjs.com/package/@0xproject/connect) | A Javascript library for interacting with the standard relayer api | -| [`@0xproject/json-schemas`](/packages/json-schemas) | [![npm](https://img.shields.io/npm/v/@0xproject/json-schemas.svg)](https://www.npmjs.com/package/@0xproject/json-schemas) | 0x-related json schemas | -| [`@0xproject/subproviders`](/packages/subproviders) | [![npm](https://img.shields.io/npm/v/@0xproject/subproviders.svg)](https://www.npmjs.com/package/@0xproject/subproviders) | Useful web3 subproviders (e.g LedgerSubprovider) | -| [`@0xproject/tslint-config`](/packages/tslint-config) | [![npm](https://img.shields.io/npm/v/@0xproject/tslint-config.svg)](https://www.npmjs.com/package/@0xproject/tslint-config) | Custom 0x development TSLint rules | -| [`@0xproject/types`](/packages/types) | [![npm](https://img.shields.io/npm/v/@0xproject/types.svg)](https://www.npmjs.com/package/@0xproject/types) | Shared type declarations | -| [`@0xproject/utils`](/packages/utils) | [![npm](https://img.shields.io/npm/v/@0xproject/utils.svg)](https://www.npmjs.com/package/@0xproject/utils) | Shared utilities | -| [`@0xproject/web3-wrapper`](/packages/web3-wrapper) | [![npm](https://img.shields.io/npm/v/@0xproject/web3-wrapper.svg)](https://www.npmjs.com/package/@0xproject/web3-wrapper) | Web3 wrapper | +| Package | Version | Description | +| ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | +| [`0x.js`](/packages/0x.js) | [![npm](https://img.shields.io/npm/v/0x.js.svg)](https://www.npmjs.com/package/0x.js) | A Javascript library for interacting with the 0x protocol | +| [`@0xproject/abi-gen`](/packages/abi-gen) | [![npm](https://img.shields.io/npm/v/@0xproject/abi-gen.svg)](https://www.npmjs.com/package/@0xproject/abi-gen) | Tool to generate TS wrappers from smart contract ABIs | +| [`@0xproject/assert`](/packages/assert) | [![npm](https://img.shields.io/npm/v/@0xproject/assert.svg)](https://www.npmjs.com/package/@0xproject/assert) | Type and schema assertions used by our packages | +| [`@0xproject/connect`](/packages/connect) | [![npm](https://img.shields.io/npm/v/@0xproject/connect.svg)](https://www.npmjs.com/package/@0xproject/connect) | A Javascript library for interacting with the standard relayer api | +| [`@0xproject/json-schemas`](/packages/json-schemas) | [![npm](https://img.shields.io/npm/v/@0xproject/json-schemas.svg)](https://www.npmjs.com/package/@0xproject/json-schemas) | 0x-related json schemas | +| [`@0xproject/subproviders`](/packages/subproviders) | [![npm](https://img.shields.io/npm/v/@0xproject/subproviders.svg)](https://www.npmjs.com/package/@0xproject/subproviders) | Useful web3 subproviders (e.g LedgerSubprovider) | +| [`@0xproject/tslint-config`](/packages/tslint-config) | [![npm](https://img.shields.io/npm/v/@0xproject/tslint-config.svg)](https://www.npmjs.com/package/@0xproject/tslint-config) | Custom 0x development TSLint rules | +| [`@0xproject/types`](/packages/types) | [![npm](https://img.shields.io/npm/v/@0xproject/types.svg)](https://www.npmjs.com/package/@0xproject/types) | Shared type declarations | +| [`@0xproject/utils`](/packages/utils) | [![npm](https://img.shields.io/npm/v/@0xproject/utils.svg)](https://www.npmjs.com/package/@0xproject/utils) | Shared utilities | +| [`@0xproject/web3-wrapper`](/packages/web3-wrapper) | [![npm](https://img.shields.io/npm/v/@0xproject/web3-wrapper.svg)](https://www.npmjs.com/package/@0xproject/web3-wrapper) | Web3 wrapper | ### Private Packages -| Package | Description | -|---------|-------------| -| [`@0xproject/contracts`](/packages/contracts) | 0x solidity smart contracts & tests | -| [`@0xproject/kovan_faucets`](/packages/kovan-faucets) | A faucet micro-service that dispenses test ERC20 tokens or Ether | -| [`@0xproject/monorepo-scripts`](/packages/monorepo-scripts) | Shared monorepo scripts | -| [`@0xproject/website`](/packages/website) | 0x website & Portal DApp | +| Package | Description | +| ----------------------------------------------------------- | ---------------------------------------------------------------- | +| [`@0xproject/contracts`](/packages/contracts) | 0x solidity smart contracts & tests | +| [`@0xproject/kovan_faucets`](/packages/kovan-faucets) | A faucet micro-service that dispenses test ERC20 tokens or Ether | +| [`@0xproject/monorepo-scripts`](/packages/monorepo-scripts) | Shared monorepo scripts | +| [`@0xproject/website`](/packages/website) | 0x website & Portal DApp | ## Usage Dedicated documentation pages: -- [0x.js Library](https://0xproject.com/docs/0xjs) -- [0x Connect](https://0xproject.com/docs/connect) -- [Smart contracts](https://0xproject.com/docs/contracts) -- [Standard Relayer API](https://github.com/0xProject/standard-relayer-api/blob/master/README.md) + +* [0x.js Library](https://0xproject.com/docs/0xjs) +* [0x Connect](https://0xproject.com/docs/connect) +* [Smart contracts](https://0xproject.com/docs/contracts) +* [Standard Relayer API](https://github.com/0xProject/standard-relayer-api/blob/master/README.md) ## Contributing @@ -58,11 +58,13 @@ Please read our [contribution guidelines](./CONTRIBUTING.md) before getting star ### Install dependencies If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: + ```bash yarn config set workspaces-experimental true ``` Then install dependencies + ```bash yarn install ``` @@ -78,6 +80,7 @@ yarn lerna:run build ### Lint Lint all packages + ```bash yarn lerna:run lint ``` @@ -87,11 +90,13 @@ yarn lerna:run lint Before running the tests, you will need to spin up a [TestRPC](https://www.npmjs.com/package/ethereumjs-testrpc) instance and deploy all the 0x smart contracts. In a separate terminal, start TestRPC (a convenience command is provided as part of this repo) + ```bash yarn testrpc ``` Then in your main terminal run + ``` cd packages/contracts yarn migrate @@ -99,6 +104,7 @@ cd .. ``` And finally from the root project directory run + ```bash yarn lerna:run test ``` diff --git a/lerna.json b/lerna.json index 901adea36..be294216a 100644 --- a/lerna.json +++ b/lerna.json @@ -1,9 +1,7 @@ { - "lerna": "2.5.1", - "packages": [ - "packages/*" - ], - "version": "independent", - "npmClient": "yarn", - "useWorkspaces": true + "lerna": "2.5.1", + "packages": ["packages/*"], + "version": "independent", + "npmClient": "yarn", + "useWorkspaces": true } diff --git a/package.json b/package.json index 5dfe30eb6..597e61886 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,8 @@ "workspaces": ["packages/*"], "scripts": { "testrpc": "testrpc -p 8545 --networkId 50 -m \"${npm_package_config_mnemonic}\"", - "prettier": "prettier --write '**/*.{ts,tsx}'", - "prettier:ci": "prettier --list-different '**/*.{ts,tsx}'", + "prettier": "prettier --write '**/*.{ts,tsx,json,md}'", + "prettier:ci": "prettier --list-different '**/*.{ts,tsx,json,md}'", "lerna:run": "lerna run", "lerna:rebuild": "lerna run clean; lerna run build;", "lerna:publish": diff --git a/packages/0x.js/CHANGELOG.md b/packages/0x.js/CHANGELOG.md index a37eb24cf..6d628136a 100644 --- a/packages/0x.js/CHANGELOG.md +++ b/packages/0x.js/CHANGELOG.md @@ -1,12 +1,12 @@ # CHANGELOG -v0.29.0 - _December 28, 2017_ ------------------------- +## v0.29.0 - _December 28, 2017_ + * Assert baseUnit amount supplied to `toUnitAmount` is integer amount. (#287) * `toBaseUnitAmount` throws if amount supplied has too many decimals (#287) -v0.28.0 - _December 20, 2017_ ------------------------- +## v0.28.0 - _December 20, 2017_ + * Add `etherTokenAddress` arg to `depositAsync` and `withdrawAsync` methods on `zeroEx.etherToken` (#267) * Removed accidentally included `unsubscribeAll` method from `zeroEx.proxy`, `zeroEx.etherToken` and `zeroEx.tokenRegistry` (#267) * Removed `etherTokenContractAddress` from `ZeroEx` constructor arg `ZeroExConfig` (#267) @@ -17,12 +17,12 @@ v0.28.0 - _December 20, 2017_ * Support `Deposit` and `Withdraw` events on etherToken (#277) * Improve the error message when taker is not a string (#278) -v0.27.1 - _November 28, 2017_ ------------------------- +## v0.27.1 - _November 28, 2017_ + * Export `TransactionOpts` type -v0.27.0 - _November 28, 2017_ ------------------------- +## v0.27.0 - _November 28, 2017_ + * Make `ZeroExConfig` required parameter of `ZeroEx` constructor (#233) * Add a required property `networkId` to `ZeroExConfig` (#233) * Make all `getContractAddress` functions, `zeroEx.exchange.subscribe`, `zeroEx.exchange.getZRXTokenAddress` sync (#233) @@ -33,66 +33,66 @@ v0.27.0 - _November 28, 2017_ * All transaction sending methods now call `estimateGas` if no gas amount was supplied (#235) * Modify order validation methods to validate against the `latest` block, not against the `pending` block (#236) -v0.26.0 - _November 21, 2017_ ------------------------- +## v0.26.0 - _November 21, 2017_ + * Add post-formatter for logs converting `blockNumber`, `logIndex`, `transactionIndex` from hexes to numbers (#231) * Remove support for Async callback types when used in Subscribe functions (#222) * In OrderWatcher subscribe to ZRX Token Transfer and Approval events when maker token is different (#225) -v0.25.1 - _November 13, 2017_ ------------------------- +## v0.25.1 - _November 13, 2017_ + * Standardise on Cancelled over Canceled (#217) * Add missing `DecodedLogEvent` type to exported types (#205) * Normalized the transactionReceipt status to be `null|0|1`, 1 meaning transaction execution successful, 0 unsuccessful and `null` if it is a pre-byzantinium transaction. (#200) -v0.23.0 - _November 12, 2017_ ------------------------- +## v0.23.0 - _November 12, 2017_ + * Fixed unhandled promise rejection error in subscribe methods (#209) * Subscribe callbacks now receive an error object as their first argument -v0.22.6 - _November 10, 2017_ ------------------------- +## v0.22.6 - _November 10, 2017_ + * Add a timeout parameter to transaction awaiting (#206) -v0.22.5 - _November 7, 2017_ ------------------------- +## v0.22.5 - _November 7, 2017_ + * Re-publish v0.22.4 to fix publishing issue -v0.22.4 - _October 25, 2017_ ------------------------- +## v0.22.4 - _October 25, 2017_ + * Upgraded bignumber.js to a new version that ships with native typings -v0.22.3 - _October 25, 2017_ ------------------------- +## v0.22.3 - _October 25, 2017_ + * Fixed an issue with new version of testrpc and unlimited proxy allowance (#199) -v0.22.2 - _October 24, 2017_ ------------------------- +## v0.22.2 - _October 24, 2017_ + * Fixed rounding of maker fill amount and incorrect validation of partial fees (#197) -v0.22.0 - _October 16, 2017_ ------------------------- +## v0.22.0 - _October 16, 2017_ + * Started using `OrderFillRequest` interface instead of `OrderFillOrKillRequest` interface for `zeroEx.exchange.batchFillOrKill` (#187) * Removed `OrderFillOrKillRequest` (#187) -v0.21.4 - _October 13, 2017_ ------------------------- +## v0.21.4 - _October 13, 2017_ + * Made 0x.js more type-safe by making `getLogsAsync` and `subscribe/subscribeAsync` generics parametrized with arg type (#194) -v0.21.3 - _October 12, 2017_ ------------------------- +## v0.21.3 - _October 12, 2017_ + * Fixed a bug causing order fills to throw `INSUFFICIENT_TAKER_ALLOWANCE` (#193) -v0.21.2 - _October 11, 2017_ ------------------------- +## v0.21.2 - _October 11, 2017_ + * Exported `ContractEventArg` as a public type (#190) -v0.21.1 - _October 11, 2017_ ------------------------- +## v0.21.1 - _October 11, 2017_ + * Fixed a bug in subscriptions (#189) -v0.21.0 - _October 10, 2017_ ------------------------- +## v0.21.0 - _October 10, 2017_ + * Complete rewrite of subscription logic (#182) * Subscriptions no longer return historical logs. If you want them - use `getLogsAsync` * Subscriptions now use [ethereumjs-blockstream](https://github.com/ethereumjs/ethereumjs-blockstream) under the hood @@ -106,77 +106,77 @@ v0.21.0 - _October 10, 2017_ * Renamed `zeroEx.token.stopWatchingAllEventsAsync` to `zeroEx.token.unsubscribeAll` * Fixed the batch fills validation by emulating all balance & proxy allowance changes (#185) -v0.20.0 - _October 5, 2017_ ------------------------- +## v0.20.0 - _October 5, 2017_ + * Add `zeroEx.token.getLogsAsync` (#178) * Add `zeroEx.exchange.getLogsAsync` (#178) * Fixed fees validation when one of the tokens transferred is ZRX (#181) -v0.19.0 - _September 29, 2017_ ------------------------- +## v0.19.0 - _September 29, 2017_ + * Made order validation optional (#172) * Added Ropsten testnet support (#173) * Fixed a bug causing awaitTransactionMinedAsync to DDos backend nodes (#175) -v0.18.0 - _September 26, 2017_ ------------------------- +## v0.18.0 - _September 26, 2017_ + * Added `zeroEx.exchange.validateOrderFillableOrThrowAsync` to simplify orderbook pruning (#170) -v0.17.0 - _September 26, 2017_ ------------------------- +## v0.17.0 - _September 26, 2017_ + * Made `zeroEx.exchange.getZRXTokenAddressAsync` public (#171) -v0.16.0 - _September 20, 2017_ ------------------------- +## v0.16.0 - _September 20, 2017_ + * Added the ability to specify custom contract addresses to be used with 0x.js (#165) * ZeroExConfig.exchangeContractAddress * ZeroExConfig.tokenRegistryContractAddress * ZeroExConfig.etherTokenContractAddress * Added `zeroEx.tokenRegistry.getContractAddressAsync` (#165) -v0.15.0 - _September 8, 2017_ ------------------------- +## v0.15.0 - _September 8, 2017_ + * Added the ability to specify a historical `blockNumber` at which to query the blockchain's state when calling a token or exchange method (#161) -v0.14.2 - _September 7, 2017_ ------------------------- +## v0.14.2 - _September 7, 2017_ + * Fixed an issue with bignumber.js types not found (#160) -v0.14.1 - _September 7, 2017_ ------------------------- +## v0.14.1 - _September 7, 2017_ + * Fixed an issue with Artifact type not found (#159) -v0.14.0 - _September 6, 2017_ ------------------------- +## v0.14.0 - _September 6, 2017_ + * Added `zeroEx.exchange.throwLogErrorsAsErrors` method to public interface (#157) * Fixed an issue with overlapping async intervals in `zeroEx.awaitTransactionMinedAsync` (#157) * Fixed an issue with log decoder returning `BigNumber`s as `strings` (#157) -v0.13.0 - _September 6, 2017_ ------------------------- +## v0.13.0 - _September 6, 2017_ + * Made all the functions submitting transactions to the network to immediately return transaction hash (#151) * Added `zeroEx.awaitTransactionMinedAsync` (#151) * Added `TransactionReceiptWithDecodedLogs`, `LogWithDecodedArgs`, `DecodedLogArgs` to public types (#151) * Added signature validation to `validateFillOrderThrowIfInvalidAsync` (#152) -v0.12.1 - _September 2, 2017_ ------------------------- +## v0.12.1 - _September 2, 2017_ + * Added the support for web3@1.x.x provider (#142) * Added the optional `zeroExConfig` parameter to the constructor of `ZeroEx` (#139) * Added the ability to specify `gasPrice` when instantiating `ZeroEx` (#139) -v0.11.0 - _August 24, 2017_ ------------------------- +## v0.11.0 - _August 24, 2017_ + * Added `zeroEx.token.setUnlimitedProxyAllowanceAsync` (#137) * Added `zeroEx.token.setUnlimitedAllowanceAsync` (#137) * Added `zeroEx.token.UNLIMITED_ALLOWANCE_IN_BASE_UNITS` (#137) -v0.10.4 - _Aug 24, 2017_ ------------------------- +## v0.10.4 - _Aug 24, 2017_ + * Fixed a bug where checksummed addresses were being pulled from artifacts and not lower-cased. (#135) -v0.10.1 - _Aug 24, 2017_ ------------------------- +## v0.10.1 - _Aug 24, 2017_ + * Added `zeroEx.exchange.validateFillOrderThrowIfInvalidAsync` (#128) * Added `zeroEx.exchange.validateFillOrKillOrderThrowIfInvalidAsync` (#128) * Added `zeroEx.exchange.validateCancelOrderThrowIfInvalidAsync` (#128) @@ -190,21 +190,21 @@ v0.10.1 - _Aug 24, 2017_ * Added clear error message when checksummed address is passed to a public method (#124) * Fixes the description of `shouldThrowOnInsufficientBalanceOrAllowance` in docs (#127) -v0.9.3 - _Aug 22, 2017_ ------------------------- +## v0.9.3 - _Aug 22, 2017_ + * Update contract artifacts to include latest Kovan and Mainnet deploys (#118) -v0.9.2 - _Aug 21, 2017_ ------------------------- +## v0.9.2 - _Aug 21, 2017_ + * *This version was unpublished because of a publishing issue.* * Update contract artifacts to include latest Kovan and Mainnet deploys (#118) -v0.9.1 - _Aug. 16, 2017_ ------------------------- +## v0.9.1 - _Aug. 16, 2017_ + * Fixed the bug causing `zeroEx.token.getBalanceAsync()` to fail if no addresses available (#120) -v0.9.0 - _Jul. 26, 2017_ ------------------------- +## v0.9.0 - _Jul. 26, 2017_ + * Migrated to the new version of smart contracts (#101) * Removed the ability to call methods on multiple authorized Exchange smart contracts (#106) * Made `zeroEx.getOrderHashHex` a static method (#107) @@ -214,8 +214,8 @@ v0.9.0 - _Jul. 26, 2017_ * Updated to typescript v2.4 (#104) * Fixed an issue with incorrect balance/allowance validation when ZRX is one of the tokens traded (#109) -v0.8.0 - _Jul. 4, 2017_ ------------------------- +## v0.8.0 - _Jul. 4, 2017_ + * Added the ability to call methods on different authorized versions of the Exchange smart contract (#82) * Updated contract artifacts to reflect latest changes to the smart contracts (0xproject/contracts#59) * Added `zeroEx.proxy.isAuthorizedAsync` and `zeroEx.proxy.getAuthorizedAddressesAsync` (#89) @@ -227,35 +227,35 @@ v0.8.0 - _Jul. 4, 2017_ * `zeroEx.tokenRegistry.invalidateContractInstance` * Fixed the bug where `zeroEx.setProviderAsync` didn't invalidate etherToken contract's instance -v0.7.1 - _Jun. 26, 2017_ ------------------------- +## v0.7.1 - _Jun. 26, 2017_ + * Added the ability to convert Ether to wrapped Ether tokens and back via `zeroEx.etherToken.depostAsync` and `zeroEx.etherToken.withdrawAsync` (#81) -v0.7.0 - _Jun. 22, 2017_ ------------------------- +## v0.7.0 - _Jun. 22, 2017_ + * Added Kovan smart contract artifacts (#78) * Started returning fillAmount from `fillOrderAsync` and `fillUpToAsync` (#72) * Started returning cancelledAmount from `cancelOrderAsync` (#72) * Renamed type `LogCancelArgs` to `LogCancelContractEventArgs` and `LogFillArgs` to `LogFillContractEventArgs` -v0.6.2 - _Jun. 21, 2017_ ------------------------- +## v0.6.2 - _Jun. 21, 2017_ + * Reduced bundle size * Improved documentation -v0.6.1 - _Jun. 19, 2017_ ------------------------- +## v0.6.1 - _Jun. 19, 2017_ + * Improved documentation -v0.6.0 - _Jun. 19, 2017_ ------------------------- +## v0.6.0 - _Jun. 19, 2017_ + * Made `ZeroEx` class accept `Web3Provider` instance instead of `Web3` instance * Added types for contract event arguments -v0.5.2 - _Jun. 15, 2017_ ------------------------- +## v0.5.2 - _Jun. 15, 2017_ + * Fixed the bug in `postpublish` script that caused that only unminified UMD bundle was uploaded to release page -v0.5.1 - _Jun. 15, 2017_ ------------------------- +## v0.5.1 - _Jun. 15, 2017_ + * Added `postpublish` script to publish to Github Releases with assets. diff --git a/packages/0x.js/README.md b/packages/0x.js/README.md index 6cdcbde70..bac4fa5d8 100644 --- a/packages/0x.js/README.md +++ b/packages/0x.js/README.md @@ -1,11 +1,10 @@ -0x.js ------ +## 0x.js ## Installation 0x.js ships as both a [UMD](https://github.com/umdjs/umd) module and a [CommonJS](https://en.wikipedia.org/wiki/CommonJS) package. -#### CommonJS *(recommended)*: +#### CommonJS _(recommended)_: **Install** @@ -16,7 +15,7 @@ npm install 0x.js --save **Import** ```javascript -import {ZeroEx} from '0x.js'; +import { ZeroEx } from '0x.js'; ``` #### UMD: diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index e953ca8c0..b0c646bc5 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -1,103 +1,101 @@ { - "name": "0x.js", - "version": "0.29.0", - "description": "A javascript library for interacting with the 0x protocol", - "keywords": [ - "0x.js", - "0xproject", - "ethereum", - "tokens", - "exchange" - ], - "main": "lib/src/index.js", - "types": "lib/src/index.d.ts", - "scripts": { - "prebuild": "run-s clean generate_contract_wrappers", - "build": "run-p build:umd:prod build:commonjs; exit 0;", - "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_DIR", - "upload_docs_json": "aws s3 cp generated_docs/index.json $S3_URL --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type application/json", - "generate_contract_wrappers": "node ../abi-gen/lib/index.js --abiGlob 'src/artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|TokenRegistry|DummyToken).json' --templates contract_templates --output src/contract_wrappers/generated", - "lint": "tslint --project . 'src/**/*.ts' 'test/**/*.ts'", - "test:circleci": "run-s test:coverage report_test_coverage && if [ $CIRCLE_BRANCH = \"development\" ]; then yarn test:umd; fi", - "test": "run-s clean test:commonjs", - "test:umd": "./scripts/test_umd.sh", - "test:coverage": "nyc npm run test --all", - "report_test_coverage": "nyc report --reporter=text-lcov | coveralls", - "update_contracts": "for i in ${npm_package_config_artifacts}; do copyfiles -u 4 ../contracts/build/contracts/$i.json ../0x.js/src/artifacts; done;", - "clean": "shx rm -rf _bundles lib test_temp", - "build:umd:dev": "webpack", - "build:umd:prod": "NODE_ENV=production webpack", - "build:commonjs": "tsc && copyfiles -u 2 './src/artifacts/**/*.json' ./lib/src/artifacts;", - "test:commonjs": "run-s build:commonjs run_mocha", - "pretest:umd": "run-s clean build:umd:dev build:commonjs", - "substitute_umd_bundle": "shx mv _bundles/* lib/src", - "run_mocha": "mocha lib/test/**/*_test.js --timeout 10000 --bail --exit" - }, - "config": { - "artifacts": "TokenTransferProxy Exchange TokenRegistry Token EtherToken" - }, - "repository": { - "type": "git", - "url": "https://github.com/0xProject/0x.js" - }, - "license": "Apache-2.0", - "engines": { - "node": ">=6.0.0" - }, - "devDependencies": { - "@0xproject/abi-gen": "^0.0.4", - "@0xproject/dev-utils": "^0.0.3", - "@0xproject/tslint-config": "^0.4.0", - "@0xproject/types": "^0.1.2", - "@types/bintrees": "^1.0.2", - "@types/jsonschema": "^1.1.1", - "@types/lodash": "^4.14.86", - "@types/mocha": "^2.2.42", - "@types/node": "^8.0.53", - "@types/sinon": "^2.2.2", - "@types/uuid": "^3.4.2", - "awesome-typescript-loader": "^3.1.3", - "chai": "^4.0.1", - "chai-as-promised": "^7.1.0", - "chai-as-promised-typescript-typings": "^0.0.3", - "chai-bignumber": "^2.0.1", - "chai-typescript-typings": "^0.0.1", - "copyfiles": "^1.2.0", - "coveralls": "^3.0.0", - "dirty-chai": "^2.0.1", - "json-loader": "^0.5.4", - "mocha": "^4.0.1", - "npm-run-all": "^4.1.2", - "nyc": "^11.0.1", - "opn-cli": "^3.1.0", - "request": "^2.81.0", - "request-promise-native": "^1.0.4", - "shx": "^0.2.2", - "sinon": "^4.0.0", - "source-map-support": "^0.5.0", - "truffle-hdwallet-provider": "^0.0.3", - "tslint": "5.8.0", - "typedoc": "~0.8.0", - "typescript": "~2.6.1", - "web3-provider-engine": "^13.0.1", - "web3-typescript-typings": "^0.7.2", - "webpack": "^3.1.0" - }, - "dependencies": { - "@0xproject/assert": "^0.0.9", - "@0xproject/json-schemas": "^0.7.1", - "@0xproject/utils": "^0.1.2", - "@0xproject/web3-wrapper": "^0.1.2", - "bintrees": "^1.0.2", - "bn.js": "^4.11.8", - "compare-versions": "^3.0.1", - "ethereumjs-abi": "^0.6.4", - "ethereumjs-blockstream": "^2.0.6", - "ethereumjs-util": "^5.1.1", - "find-versions": "^2.0.0", - "js-sha3": "^0.6.1", - "lodash": "^4.17.4", - "uuid": "^3.1.0", - "web3": "^0.20.0" - } + "name": "0x.js", + "version": "0.29.0", + "description": "A javascript library for interacting with the 0x protocol", + "keywords": ["0x.js", "0xproject", "ethereum", "tokens", "exchange"], + "main": "lib/src/index.js", + "types": "lib/src/index.d.ts", + "scripts": { + "prebuild": "run-s clean generate_contract_wrappers", + "build": "run-p build:umd:prod build:commonjs; exit 0;", + "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_DIR", + "upload_docs_json": + "aws s3 cp generated_docs/index.json $S3_URL --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type application/json", + "generate_contract_wrappers": + "node ../abi-gen/lib/index.js --abiGlob 'src/artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|TokenRegistry|DummyToken).json' --templates contract_templates --output src/contract_wrappers/generated", + "lint": "tslint --project . 'src/**/*.ts' 'test/**/*.ts'", + "test:circleci": + "run-s test:coverage report_test_coverage && if [ $CIRCLE_BRANCH = \"development\" ]; then yarn test:umd; fi", + "test": "run-s clean test:commonjs", + "test:umd": "./scripts/test_umd.sh", + "test:coverage": "nyc npm run test --all", + "report_test_coverage": "nyc report --reporter=text-lcov | coveralls", + "update_contracts": + "for i in ${npm_package_config_artifacts}; do copyfiles -u 4 ../contracts/build/contracts/$i.json ../0x.js/src/artifacts; done;", + "clean": "shx rm -rf _bundles lib test_temp", + "build:umd:dev": "webpack", + "build:umd:prod": "NODE_ENV=production webpack", + "build:commonjs": "tsc && copyfiles -u 2 './src/artifacts/**/*.json' ./lib/src/artifacts;", + "test:commonjs": "run-s build:commonjs run_mocha", + "pretest:umd": "run-s clean build:umd:dev build:commonjs", + "substitute_umd_bundle": "shx mv _bundles/* lib/src", + "run_mocha": "mocha lib/test/**/*_test.js --timeout 10000 --bail --exit" + }, + "config": { + "artifacts": "TokenTransferProxy Exchange TokenRegistry Token EtherToken" + }, + "repository": { + "type": "git", + "url": "https://github.com/0xProject/0x.js" + }, + "license": "Apache-2.0", + "engines": { + "node": ">=6.0.0" + }, + "devDependencies": { + "@0xproject/abi-gen": "^0.0.4", + "@0xproject/dev-utils": "^0.0.3", + "@0xproject/tslint-config": "^0.4.0", + "@0xproject/types": "^0.1.2", + "@types/bintrees": "^1.0.2", + "@types/jsonschema": "^1.1.1", + "@types/lodash": "^4.14.86", + "@types/mocha": "^2.2.42", + "@types/node": "^8.0.53", + "@types/sinon": "^2.2.2", + "@types/uuid": "^3.4.2", + "awesome-typescript-loader": "^3.1.3", + "chai": "^4.0.1", + "chai-as-promised": "^7.1.0", + "chai-as-promised-typescript-typings": "^0.0.3", + "chai-bignumber": "^2.0.1", + "chai-typescript-typings": "^0.0.1", + "copyfiles": "^1.2.0", + "coveralls": "^3.0.0", + "dirty-chai": "^2.0.1", + "json-loader": "^0.5.4", + "mocha": "^4.0.1", + "npm-run-all": "^4.1.2", + "nyc": "^11.0.1", + "opn-cli": "^3.1.0", + "request": "^2.81.0", + "request-promise-native": "^1.0.4", + "shx": "^0.2.2", + "sinon": "^4.0.0", + "source-map-support": "^0.5.0", + "truffle-hdwallet-provider": "^0.0.3", + "tslint": "5.8.0", + "typedoc": "~0.8.0", + "typescript": "~2.6.1", + "web3-provider-engine": "^13.0.1", + "web3-typescript-typings": "^0.7.2", + "webpack": "^3.1.0" + }, + "dependencies": { + "@0xproject/assert": "^0.0.9", + "@0xproject/json-schemas": "^0.7.1", + "@0xproject/utils": "^0.1.2", + "@0xproject/web3-wrapper": "^0.1.2", + "bintrees": "^1.0.2", + "bn.js": "^4.11.8", + "compare-versions": "^3.0.1", + "ethereumjs-abi": "^0.6.4", + "ethereumjs-blockstream": "^2.0.6", + "ethereumjs-util": "^5.1.1", + "find-versions": "^2.0.0", + "js-sha3": "^0.6.1", + "lodash": "^4.17.4", + "uuid": "^3.1.0", + "web3": "^0.20.0" + } } diff --git a/packages/0x.js/src/artifacts/DummyToken.json b/packages/0x.js/src/artifacts/DummyToken.json index fd44397db..f64a8cd3d 100644 --- a/packages/0x.js/src/artifacts/DummyToken.json +++ b/packages/0x.js/src/artifacts/DummyToken.json @@ -1,7 +1,6 @@ { "contract_name": "DummyToken", - "abi": - [ + "abi": [ { "constant": false, "inputs": [ diff --git a/packages/0x.js/src/artifacts/EtherToken.json b/packages/0x.js/src/artifacts/EtherToken.json index 1105af3b0..91fba7f0a 100644 --- a/packages/0x.js/src/artifacts/EtherToken.json +++ b/packages/0x.js/src/artifacts/EtherToken.json @@ -1,284 +1,284 @@ { - "contract_name": "EtherToken", - "abi": [ - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ + "contract_name": "EtherToken", + "abi": [ { - "name": "", - "type": "string" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_spender", - "type": "address" + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "type": "function" }, { - "name": "_value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_from", - "type": "address" + "constant": false, + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" }, { - "name": "_to", - "type": "address" + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" }, { - "name": "_value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "amount", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "name": "", - "type": "uint8" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_to", - "type": "address" + "constant": false, + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" }, { - "name": "_value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "deposit", - "outputs": [], - "payable": true, - "type": "function" - }, - { - "constant": true, - "inputs": [ + "constant": false, + "inputs": [ + { + "name": "amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "payable": false, + "type": "function" + }, { - "name": "_owner", - "type": "address" + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "type": "function" }, { - "name": "_spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "payable": true, - "type": "fallback" - }, - { - "anonymous": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "type": "function" + }, { - "indexed": true, - "name": "_from", - "type": "address" + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" }, { - "indexed": true, - "name": "_to", - "type": "address" + "constant": false, + "inputs": [], + "name": "deposit", + "outputs": [], + "payable": true, + "type": "function" }, { - "indexed": false, - "name": "_value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + }, + { + "name": "_spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, { - "indexed": true, - "name": "_owner", - "type": "address" + "payable": true, + "type": "fallback" }, { - "indexed": true, - "name": "_spender", - "type": "address" + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "name": "_value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" }, { - "indexed": false, - "name": "_value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "name": "_spender", + "type": "address" + }, + { + "indexed": false, + "name": "_value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, { - "indexed": true, - "name": "_owner", - "type": "address" + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_owner", + "type": "address" + }, + { + "indexed": false, + "name": "_value", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" }, { - "indexed": false, - "name": "_value", - "type": "uint256" + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_owner", + "type": "address" + }, + { + "indexed": false, + "name": "_value", + "type": "uint256" + } + ], + "name": "Withdrawal", + "type": "event" } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_owner", - "type": "address" + ], + "networks": { + "1": { + "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2" }, - { - "indexed": false, - "name": "_value", - "type": "uint256" + "3": { + "address": "0xc00fd9820cd2898cc4c054b7bf142de637ad129a" + }, + "42": { + "address": "0x653e49e301e508a13237c0ddc98ae7d4cd2667a1" + }, + "50": { + "address": "0x871dd7c2b4b25e1aa18728e9d5f2af4c4e431f5c" } - ], - "name": "Withdrawal", - "type": "event" - } - ], - "networks": { - "1": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2" - }, - "3": { - "address": "0xc00fd9820cd2898cc4c054b7bf142de637ad129a" - }, - "42": { - "address": "0x653e49e301e508a13237c0ddc98ae7d4cd2667a1" - }, - "50": { - "address": "0x871dd7c2b4b25e1aa18728e9d5f2af4c4e431f5c" } - } } diff --git a/packages/0x.js/src/artifacts/Exchange.json b/packages/0x.js/src/artifacts/Exchange.json index cf9124ca7..45e277c45 100644 --- a/packages/0x.js/src/artifacts/Exchange.json +++ b/packages/0x.js/src/artifacts/Exchange.json @@ -1,607 +1,607 @@ { - "contract_name": "Exchange", - "abi": [ - { - "constant": true, - "inputs": [ - { - "name": "numerator", - "type": "uint256" - }, - { - "name": "denominator", - "type": "uint256" - }, - { - "name": "target", - "type": "uint256" - } - ], - "name": "isRoundingError", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "name": "filled", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "name": "cancelled", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "orderAddresses", - "type": "address[5][]" - }, - { - "name": "orderValues", - "type": "uint256[6][]" - }, - { - "name": "fillTakerTokenAmount", - "type": "uint256" - }, - { - "name": "shouldThrowOnInsufficientBalanceOrAllowance", - "type": "bool" - }, - { - "name": "v", - "type": "uint8[]" - }, - { - "name": "r", - "type": "bytes32[]" - }, - { - "name": "s", - "type": "bytes32[]" - } - ], - "name": "fillOrdersUpTo", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "orderAddresses", - "type": "address[5]" - }, - { - "name": "orderValues", - "type": "uint256[6]" - }, - { - "name": "cancelTakerTokenAmount", - "type": "uint256" - } - ], - "name": "cancelOrder", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "ZRX_TOKEN_CONTRACT", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "orderAddresses", - "type": "address[5][]" - }, - { - "name": "orderValues", - "type": "uint256[6][]" - }, - { - "name": "fillTakerTokenAmounts", - "type": "uint256[]" - }, - { - "name": "v", - "type": "uint8[]" - }, - { - "name": "r", - "type": "bytes32[]" - }, - { - "name": "s", - "type": "bytes32[]" - } - ], - "name": "batchFillOrKillOrders", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "orderAddresses", - "type": "address[5]" - }, - { - "name": "orderValues", - "type": "uint256[6]" - }, - { - "name": "fillTakerTokenAmount", - "type": "uint256" - }, - { - "name": "v", - "type": "uint8" - }, - { - "name": "r", - "type": "bytes32" - }, - { - "name": "s", - "type": "bytes32" - } - ], - "name": "fillOrKillOrder", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "orderHash", - "type": "bytes32" - } - ], - "name": "getUnavailableTakerTokenAmount", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "signer", - "type": "address" - }, - { - "name": "hash", - "type": "bytes32" - }, - { - "name": "v", - "type": "uint8" - }, - { - "name": "r", - "type": "bytes32" - }, - { - "name": "s", - "type": "bytes32" - } - ], - "name": "isValidSignature", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "numerator", - "type": "uint256" - }, - { - "name": "denominator", - "type": "uint256" - }, - { - "name": "target", - "type": "uint256" - } - ], - "name": "getPartialAmount", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "TOKEN_TRANSFER_PROXY_CONTRACT", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "orderAddresses", - "type": "address[5][]" - }, - { - "name": "orderValues", - "type": "uint256[6][]" - }, - { - "name": "fillTakerTokenAmounts", - "type": "uint256[]" - }, - { - "name": "shouldThrowOnInsufficientBalanceOrAllowance", - "type": "bool" - }, - { - "name": "v", - "type": "uint8[]" - }, - { - "name": "r", - "type": "bytes32[]" - }, - { - "name": "s", - "type": "bytes32[]" - } - ], - "name": "batchFillOrders", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "orderAddresses", - "type": "address[5][]" - }, - { - "name": "orderValues", - "type": "uint256[6][]" - }, - { - "name": "cancelTakerTokenAmounts", - "type": "uint256[]" - } - ], - "name": "batchCancelOrders", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "orderAddresses", - "type": "address[5]" - }, - { - "name": "orderValues", - "type": "uint256[6]" - }, - { - "name": "fillTakerTokenAmount", - "type": "uint256" - }, - { - "name": "shouldThrowOnInsufficientBalanceOrAllowance", - "type": "bool" - }, - { - "name": "v", - "type": "uint8" - }, - { - "name": "r", - "type": "bytes32" - }, - { - "name": "s", - "type": "bytes32" - } - ], - "name": "fillOrder", - "outputs": [ - { - "name": "filledTakerTokenAmount", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "orderAddresses", - "type": "address[5]" - }, - { - "name": "orderValues", - "type": "uint256[6]" - } - ], - "name": "getOrderHash", - "outputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "EXTERNAL_QUERY_GAS_LIMIT", - "outputs": [ - { - "name": "", - "type": "uint16" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "VERSION", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "type": "function" - }, - { - "inputs": [ - { - "name": "_zrxToken", - "type": "address" - }, - { - "name": "_tokenTransferProxy", - "type": "address" - } - ], - "payable": false, - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "maker", - "type": "address" - }, - { - "indexed": false, - "name": "taker", - "type": "address" - }, - { - "indexed": true, - "name": "feeRecipient", - "type": "address" - }, - { - "indexed": false, - "name": "makerToken", - "type": "address" - }, - { - "indexed": false, - "name": "takerToken", - "type": "address" - }, - { - "indexed": false, - "name": "filledMakerTokenAmount", - "type": "uint256" - }, - { - "indexed": false, - "name": "filledTakerTokenAmount", - "type": "uint256" - }, - { - "indexed": false, - "name": "paidMakerFee", - "type": "uint256" - }, - { - "indexed": false, - "name": "paidTakerFee", - "type": "uint256" - }, - { - "indexed": true, - "name": "tokens", - "type": "bytes32" - }, - { - "indexed": false, - "name": "orderHash", - "type": "bytes32" + "contract_name": "Exchange", + "abi": [ + { + "constant": true, + "inputs": [ + { + "name": "numerator", + "type": "uint256" + }, + { + "name": "denominator", + "type": "uint256" + }, + { + "name": "target", + "type": "uint256" + } + ], + "name": "isRoundingError", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "bytes32" + } + ], + "name": "filled", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "bytes32" + } + ], + "name": "cancelled", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "orderAddresses", + "type": "address[5][]" + }, + { + "name": "orderValues", + "type": "uint256[6][]" + }, + { + "name": "fillTakerTokenAmount", + "type": "uint256" + }, + { + "name": "shouldThrowOnInsufficientBalanceOrAllowance", + "type": "bool" + }, + { + "name": "v", + "type": "uint8[]" + }, + { + "name": "r", + "type": "bytes32[]" + }, + { + "name": "s", + "type": "bytes32[]" + } + ], + "name": "fillOrdersUpTo", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "orderAddresses", + "type": "address[5]" + }, + { + "name": "orderValues", + "type": "uint256[6]" + }, + { + "name": "cancelTakerTokenAmount", + "type": "uint256" + } + ], + "name": "cancelOrder", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "ZRX_TOKEN_CONTRACT", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "orderAddresses", + "type": "address[5][]" + }, + { + "name": "orderValues", + "type": "uint256[6][]" + }, + { + "name": "fillTakerTokenAmounts", + "type": "uint256[]" + }, + { + "name": "v", + "type": "uint8[]" + }, + { + "name": "r", + "type": "bytes32[]" + }, + { + "name": "s", + "type": "bytes32[]" + } + ], + "name": "batchFillOrKillOrders", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "orderAddresses", + "type": "address[5]" + }, + { + "name": "orderValues", + "type": "uint256[6]" + }, + { + "name": "fillTakerTokenAmount", + "type": "uint256" + }, + { + "name": "v", + "type": "uint8" + }, + { + "name": "r", + "type": "bytes32" + }, + { + "name": "s", + "type": "bytes32" + } + ], + "name": "fillOrKillOrder", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "orderHash", + "type": "bytes32" + } + ], + "name": "getUnavailableTakerTokenAmount", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "signer", + "type": "address" + }, + { + "name": "hash", + "type": "bytes32" + }, + { + "name": "v", + "type": "uint8" + }, + { + "name": "r", + "type": "bytes32" + }, + { + "name": "s", + "type": "bytes32" + } + ], + "name": "isValidSignature", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "numerator", + "type": "uint256" + }, + { + "name": "denominator", + "type": "uint256" + }, + { + "name": "target", + "type": "uint256" + } + ], + "name": "getPartialAmount", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "TOKEN_TRANSFER_PROXY_CONTRACT", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "orderAddresses", + "type": "address[5][]" + }, + { + "name": "orderValues", + "type": "uint256[6][]" + }, + { + "name": "fillTakerTokenAmounts", + "type": "uint256[]" + }, + { + "name": "shouldThrowOnInsufficientBalanceOrAllowance", + "type": "bool" + }, + { + "name": "v", + "type": "uint8[]" + }, + { + "name": "r", + "type": "bytes32[]" + }, + { + "name": "s", + "type": "bytes32[]" + } + ], + "name": "batchFillOrders", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "orderAddresses", + "type": "address[5][]" + }, + { + "name": "orderValues", + "type": "uint256[6][]" + }, + { + "name": "cancelTakerTokenAmounts", + "type": "uint256[]" + } + ], + "name": "batchCancelOrders", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "orderAddresses", + "type": "address[5]" + }, + { + "name": "orderValues", + "type": "uint256[6]" + }, + { + "name": "fillTakerTokenAmount", + "type": "uint256" + }, + { + "name": "shouldThrowOnInsufficientBalanceOrAllowance", + "type": "bool" + }, + { + "name": "v", + "type": "uint8" + }, + { + "name": "r", + "type": "bytes32" + }, + { + "name": "s", + "type": "bytes32" + } + ], + "name": "fillOrder", + "outputs": [ + { + "name": "filledTakerTokenAmount", + "type": "uint256" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "orderAddresses", + "type": "address[5]" + }, + { + "name": "orderValues", + "type": "uint256[6]" + } + ], + "name": "getOrderHash", + "outputs": [ + { + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "EXTERNAL_QUERY_GAS_LIMIT", + "outputs": [ + { + "name": "", + "type": "uint16" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "VERSION", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "type": "function" + }, + { + "inputs": [ + { + "name": "_zrxToken", + "type": "address" + }, + { + "name": "_tokenTransferProxy", + "type": "address" + } + ], + "payable": false, + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "maker", + "type": "address" + }, + { + "indexed": false, + "name": "taker", + "type": "address" + }, + { + "indexed": true, + "name": "feeRecipient", + "type": "address" + }, + { + "indexed": false, + "name": "makerToken", + "type": "address" + }, + { + "indexed": false, + "name": "takerToken", + "type": "address" + }, + { + "indexed": false, + "name": "filledMakerTokenAmount", + "type": "uint256" + }, + { + "indexed": false, + "name": "filledTakerTokenAmount", + "type": "uint256" + }, + { + "indexed": false, + "name": "paidMakerFee", + "type": "uint256" + }, + { + "indexed": false, + "name": "paidTakerFee", + "type": "uint256" + }, + { + "indexed": true, + "name": "tokens", + "type": "bytes32" + }, + { + "indexed": false, + "name": "orderHash", + "type": "bytes32" + } + ], + "name": "LogFill", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "maker", + "type": "address" + }, + { + "indexed": true, + "name": "feeRecipient", + "type": "address" + }, + { + "indexed": false, + "name": "makerToken", + "type": "address" + }, + { + "indexed": false, + "name": "takerToken", + "type": "address" + }, + { + "indexed": false, + "name": "cancelledMakerTokenAmount", + "type": "uint256" + }, + { + "indexed": false, + "name": "cancelledTakerTokenAmount", + "type": "uint256" + }, + { + "indexed": true, + "name": "tokens", + "type": "bytes32" + }, + { + "indexed": false, + "name": "orderHash", + "type": "bytes32" + } + ], + "name": "LogCancel", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "errorId", + "type": "uint8" + }, + { + "indexed": true, + "name": "orderHash", + "type": "bytes32" + } + ], + "name": "LogError", + "type": "event" + } + ], + "networks": { + "1": { + "address": "0x12459c951127e0c374ff9105dda097662a027093" + }, + "3": { + "address": "0x479cc461fecd078f766ecc58533d6f69580cf3ac" + }, + "42": { + "address": "0x90fe2af704b34e0224bf2299c838e04d4dcf1364" + }, + "50": { + "address": "0x48bacb9266a570d521063ef5dd96e61686dbe788" } - ], - "name": "LogFill", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "maker", - "type": "address" - }, - { - "indexed": true, - "name": "feeRecipient", - "type": "address" - }, - { - "indexed": false, - "name": "makerToken", - "type": "address" - }, - { - "indexed": false, - "name": "takerToken", - "type": "address" - }, - { - "indexed": false, - "name": "cancelledMakerTokenAmount", - "type": "uint256" - }, - { - "indexed": false, - "name": "cancelledTakerTokenAmount", - "type": "uint256" - }, - { - "indexed": true, - "name": "tokens", - "type": "bytes32" - }, - { - "indexed": false, - "name": "orderHash", - "type": "bytes32" - } - ], - "name": "LogCancel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "errorId", - "type": "uint8" - }, - { - "indexed": true, - "name": "orderHash", - "type": "bytes32" - } - ], - "name": "LogError", - "type": "event" - } - ], - "networks": { - "1": { - "address": "0x12459c951127e0c374ff9105dda097662a027093" - }, - "3": { - "address": "0x479cc461fecd078f766ecc58533d6f69580cf3ac" - }, - "42": { - "address": "0x90fe2af704b34e0224bf2299c838e04d4dcf1364" - }, - "50": { - "address": "0x48bacb9266a570d521063ef5dd96e61686dbe788" } - } } diff --git a/packages/0x.js/src/artifacts/Token.json b/packages/0x.js/src/artifacts/Token.json index a86f8228d..3b5a86ae0 100644 --- a/packages/0x.js/src/artifacts/Token.json +++ b/packages/0x.js/src/artifacts/Token.json @@ -1,172 +1,172 @@ { - "contract_name": "Token", - "abi": [ - { - "constant": false, - "inputs": [ - { - "name": "_spender", - "type": "address" + "contract_name": "Token", + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "type": "function" }, { - "name": "_value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "success", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "supply", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_from", - "type": "address" + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "supply", + "type": "uint256" + } + ], + "payable": false, + "type": "function" }, { - "name": "_to", - "type": "address" + "constant": false, + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "type": "function" }, { - "name": "_value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "success", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "balance", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_to", - "type": "address" + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "balance", + "type": "uint256" + } + ], + "payable": false, + "type": "function" }, { - "name": "_value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "success", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - }, - { - "name": "_spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "remaining", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_from", - "type": "address" + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "type": "function" }, { - "indexed": true, - "name": "_to", - "type": "address" - }, - { - "indexed": false, - "name": "_value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_owner", - "type": "address" + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + }, + { + "name": "_spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "remaining", + "type": "uint256" + } + ], + "payable": false, + "type": "function" }, { - "indexed": true, - "name": "_spender", - "type": "address" + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "name": "_value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" }, { - "indexed": false, - "name": "_value", - "type": "uint256" + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "name": "_spender", + "type": "address" + }, + { + "indexed": false, + "name": "_value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" } - ], - "name": "Approval", - "type": "event" - } - ] + ] } diff --git a/packages/0x.js/src/artifacts/TokenRegistry.json b/packages/0x.js/src/artifacts/TokenRegistry.json index 973a101e8..81780074c 100644 --- a/packages/0x.js/src/artifacts/TokenRegistry.json +++ b/packages/0x.js/src/artifacts/TokenRegistry.json @@ -1,544 +1,544 @@ { - "contract_name": "TokenRegistry", - "abi": [ - { - "constant": false, - "inputs": [ - { - "name": "_token", - "type": "address" - }, - { - "name": "_index", - "type": "uint256" - } - ], - "name": "removeToken", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_name", - "type": "string" - } - ], - "name": "getTokenAddressByName", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_symbol", - "type": "string" - } - ], - "name": "getTokenAddressBySymbol", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_token", - "type": "address" - }, - { - "name": "_swarmHash", - "type": "bytes" - } - ], - "name": "setTokenSwarmHash", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_token", - "type": "address" - } - ], - "name": "getTokenMetaData", - "outputs": [ - { - "name": "", - "type": "address" - }, - { - "name": "", - "type": "string" - }, - { - "name": "", - "type": "string" - }, - { - "name": "", - "type": "uint8" - }, - { - "name": "", - "type": "bytes" - }, - { - "name": "", - "type": "bytes" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_token", - "type": "address" - }, - { - "name": "_name", - "type": "string" - }, - { - "name": "_symbol", - "type": "string" - }, - { - "name": "_decimals", - "type": "uint8" - }, - { - "name": "_ipfsHash", - "type": "bytes" - }, - { - "name": "_swarmHash", - "type": "bytes" - } - ], - "name": "addToken", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_token", - "type": "address" - }, - { - "name": "_name", - "type": "string" - } - ], - "name": "setTokenName", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "address" - } - ], - "name": "tokens", - "outputs": [ - { - "name": "token", - "type": "address" - }, - { - "name": "name", - "type": "string" - }, - { - "name": "symbol", - "type": "string" - }, - { - "name": "decimals", - "type": "uint8" - }, - { - "name": "ipfsHash", - "type": "bytes" - }, - { - "name": "swarmHash", - "type": "bytes" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - } - ], - "name": "tokenAddresses", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_name", - "type": "string" - } - ], - "name": "getTokenByName", - "outputs": [ - { - "name": "", - "type": "address" - }, - { - "name": "", - "type": "string" - }, - { - "name": "", - "type": "string" - }, - { - "name": "", - "type": "uint8" - }, - { - "name": "", - "type": "bytes" - }, - { - "name": "", - "type": "bytes" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getTokenAddresses", - "outputs": [ - { - "name": "", - "type": "address[]" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_token", - "type": "address" - }, - { - "name": "_ipfsHash", - "type": "bytes" - } - ], - "name": "setTokenIpfsHash", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_symbol", - "type": "string" - } - ], - "name": "getTokenBySymbol", - "outputs": [ - { - "name": "", - "type": "address" - }, - { - "name": "", - "type": "string" - }, - { - "name": "", - "type": "string" - }, - { - "name": "", - "type": "uint8" - }, - { - "name": "", - "type": "bytes" - }, - { - "name": "", - "type": "bytes" + "contract_name": "TokenRegistry", + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "_token", + "type": "address" + }, + { + "name": "_index", + "type": "uint256" + } + ], + "name": "removeToken", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_name", + "type": "string" + } + ], + "name": "getTokenAddressByName", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_symbol", + "type": "string" + } + ], + "name": "getTokenAddressBySymbol", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_token", + "type": "address" + }, + { + "name": "_swarmHash", + "type": "bytes" + } + ], + "name": "setTokenSwarmHash", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_token", + "type": "address" + } + ], + "name": "getTokenMetaData", + "outputs": [ + { + "name": "", + "type": "address" + }, + { + "name": "", + "type": "string" + }, + { + "name": "", + "type": "string" + }, + { + "name": "", + "type": "uint8" + }, + { + "name": "", + "type": "bytes" + }, + { + "name": "", + "type": "bytes" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_token", + "type": "address" + }, + { + "name": "_name", + "type": "string" + }, + { + "name": "_symbol", + "type": "string" + }, + { + "name": "_decimals", + "type": "uint8" + }, + { + "name": "_ipfsHash", + "type": "bytes" + }, + { + "name": "_swarmHash", + "type": "bytes" + } + ], + "name": "addToken", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_token", + "type": "address" + }, + { + "name": "_name", + "type": "string" + } + ], + "name": "setTokenName", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "tokens", + "outputs": [ + { + "name": "token", + "type": "address" + }, + { + "name": "name", + "type": "string" + }, + { + "name": "symbol", + "type": "string" + }, + { + "name": "decimals", + "type": "uint8" + }, + { + "name": "ipfsHash", + "type": "bytes" + }, + { + "name": "swarmHash", + "type": "bytes" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "uint256" + } + ], + "name": "tokenAddresses", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_name", + "type": "string" + } + ], + "name": "getTokenByName", + "outputs": [ + { + "name": "", + "type": "address" + }, + { + "name": "", + "type": "string" + }, + { + "name": "", + "type": "string" + }, + { + "name": "", + "type": "uint8" + }, + { + "name": "", + "type": "bytes" + }, + { + "name": "", + "type": "bytes" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getTokenAddresses", + "outputs": [ + { + "name": "", + "type": "address[]" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_token", + "type": "address" + }, + { + "name": "_ipfsHash", + "type": "bytes" + } + ], + "name": "setTokenIpfsHash", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_symbol", + "type": "string" + } + ], + "name": "getTokenBySymbol", + "outputs": [ + { + "name": "", + "type": "address" + }, + { + "name": "", + "type": "string" + }, + { + "name": "", + "type": "string" + }, + { + "name": "", + "type": "uint8" + }, + { + "name": "", + "type": "bytes" + }, + { + "name": "", + "type": "bytes" + } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_token", + "type": "address" + }, + { + "name": "_symbol", + "type": "string" + } + ], + "name": "setTokenSymbol", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "token", + "type": "address" + }, + { + "indexed": false, + "name": "name", + "type": "string" + }, + { + "indexed": false, + "name": "symbol", + "type": "string" + }, + { + "indexed": false, + "name": "decimals", + "type": "uint8" + }, + { + "indexed": false, + "name": "ipfsHash", + "type": "bytes" + }, + { + "indexed": false, + "name": "swarmHash", + "type": "bytes" + } + ], + "name": "LogAddToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "token", + "type": "address" + }, + { + "indexed": false, + "name": "name", + "type": "string" + }, + { + "indexed": false, + "name": "symbol", + "type": "string" + }, + { + "indexed": false, + "name": "decimals", + "type": "uint8" + }, + { + "indexed": false, + "name": "ipfsHash", + "type": "bytes" + }, + { + "indexed": false, + "name": "swarmHash", + "type": "bytes" + } + ], + "name": "LogRemoveToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "token", + "type": "address" + }, + { + "indexed": false, + "name": "oldName", + "type": "string" + }, + { + "indexed": false, + "name": "newName", + "type": "string" + } + ], + "name": "LogTokenNameChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "token", + "type": "address" + }, + { + "indexed": false, + "name": "oldSymbol", + "type": "string" + }, + { + "indexed": false, + "name": "newSymbol", + "type": "string" + } + ], + "name": "LogTokenSymbolChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "token", + "type": "address" + }, + { + "indexed": false, + "name": "oldIpfsHash", + "type": "bytes" + }, + { + "indexed": false, + "name": "newIpfsHash", + "type": "bytes" + } + ], + "name": "LogTokenIpfsHashChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "token", + "type": "address" + }, + { + "indexed": false, + "name": "oldSwarmHash", + "type": "bytes" + }, + { + "indexed": false, + "name": "newSwarmHash", + "type": "bytes" + } + ], + "name": "LogTokenSwarmHashChange", + "type": "event" } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_token", - "type": "address" + ], + "networks": { + "1": { + "address": "0x926a74c5c36adf004c87399e65f75628b0f98d2c" }, - { - "name": "_symbol", - "type": "string" - } - ], - "name": "setTokenSymbol", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "token", - "type": "address" + "3": { + "address": "0x6b1a50f0bb5a7995444bd3877b22dc89c62843ed" }, - { - "indexed": false, - "name": "name", - "type": "string" + "42": { + "address": "0xf18e504561f4347bea557f3d4558f559dddbae7f" }, - { - "indexed": false, - "name": "symbol", - "type": "string" - }, - { - "indexed": false, - "name": "decimals", - "type": "uint8" - }, - { - "indexed": false, - "name": "ipfsHash", - "type": "bytes" - }, - { - "indexed": false, - "name": "swarmHash", - "type": "bytes" + "50": { + "address": "0x0b1ba0af832d7c05fd64161e0db78e85978e8082" } - ], - "name": "LogAddToken", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "token", - "type": "address" - }, - { - "indexed": false, - "name": "name", - "type": "string" - }, - { - "indexed": false, - "name": "symbol", - "type": "string" - }, - { - "indexed": false, - "name": "decimals", - "type": "uint8" - }, - { - "indexed": false, - "name": "ipfsHash", - "type": "bytes" - }, - { - "indexed": false, - "name": "swarmHash", - "type": "bytes" - } - ], - "name": "LogRemoveToken", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "token", - "type": "address" - }, - { - "indexed": false, - "name": "oldName", - "type": "string" - }, - { - "indexed": false, - "name": "newName", - "type": "string" - } - ], - "name": "LogTokenNameChange", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "token", - "type": "address" - }, - { - "indexed": false, - "name": "oldSymbol", - "type": "string" - }, - { - "indexed": false, - "name": "newSymbol", - "type": "string" - } - ], - "name": "LogTokenSymbolChange", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "token", - "type": "address" - }, - { - "indexed": false, - "name": "oldIpfsHash", - "type": "bytes" - }, - { - "indexed": false, - "name": "newIpfsHash", - "type": "bytes" - } - ], - "name": "LogTokenIpfsHashChange", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "token", - "type": "address" - }, - { - "indexed": false, - "name": "oldSwarmHash", - "type": "bytes" - }, - { - "indexed": false, - "name": "newSwarmHash", - "type": "bytes" - } - ], - "name": "LogTokenSwarmHashChange", - "type": "event" - } - ], - "networks": { - "1": { - "address": "0x926a74c5c36adf004c87399e65f75628b0f98d2c" - }, - "3": { - "address": "0x6b1a50f0bb5a7995444bd3877b22dc89c62843ed" - }, - "42": { - "address": "0xf18e504561f4347bea557f3d4558f559dddbae7f" - }, - "50": { - "address": "0x0b1ba0af832d7c05fd64161e0db78e85978e8082" } - } } diff --git a/packages/0x.js/src/artifacts/TokenTransferProxy.json b/packages/0x.js/src/artifacts/TokenTransferProxy.json index 023f39bdf..9b6a6cdf9 100644 --- a/packages/0x.js/src/artifacts/TokenTransferProxy.json +++ b/packages/0x.js/src/artifacts/TokenTransferProxy.json @@ -1,184 +1,184 @@ { - "contract_name": "TokenTransferProxy", - "abi": [ - { - "constant": false, - "inputs": [ - { - "name": "token", - "type": "address" + "contract_name": "TokenTransferProxy", + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "token", + "type": "address" + }, + { + "name": "from", + "type": "address" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" }, { - "name": "from", - "type": "address" + "constant": false, + "inputs": [ + { + "name": "target", + "type": "address" + } + ], + "name": "addAuthorizedAddress", + "outputs": [], + "payable": false, + "type": "function" }, { - "name": "to", - "type": "address" + "constant": true, + "inputs": [ + { + "name": "", + "type": "uint256" + } + ], + "name": "authorities", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "type": "function" }, { - "name": "value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "target", - "type": "address" - } - ], - "name": "addAuthorizedAddress", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - } - ], - "name": "authorities", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "target", - "type": "address" - } - ], - "name": "removeAuthorizedAddress", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ + "constant": false, + "inputs": [ + { + "name": "target", + "type": "address" + } + ], + "name": "removeAuthorizedAddress", + "outputs": [], + "payable": false, + "type": "function" + }, { - "name": "", - "type": "address" - } - ], - "name": "authorized", - "outputs": [ + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "type": "function" + }, { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getAuthorizedAddresses", - "outputs": [ + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "authorized", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" + }, { - "name": "", - "type": "address[]" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "getAuthorizedAddresses", + "outputs": [ + { + "name": "", + "type": "address[]" + } + ], + "payable": false, + "type": "function" + }, { - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "anonymous": false, - "inputs": [ + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "type": "function" + }, { - "indexed": true, - "name": "target", - "type": "address" + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "target", + "type": "address" + }, + { + "indexed": true, + "name": "caller", + "type": "address" + } + ], + "name": "LogAuthorizedAddressAdded", + "type": "event" }, { - "indexed": true, - "name": "caller", - "type": "address" + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "target", + "type": "address" + }, + { + "indexed": true, + "name": "caller", + "type": "address" + } + ], + "name": "LogAuthorizedAddressRemoved", + "type": "event" } - ], - "name": "LogAuthorizedAddressAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "target", - "type": "address" + ], + "networks": { + "1": { + "address": "0x8da0d80f5007ef1e431dd2127178d224e32c2ef4" }, - { - "indexed": true, - "name": "caller", - "type": "address" + "3": { + "address": "0x4e9aad8184de8833365fea970cd9149372fdf1e6" + }, + "42": { + "address": "0x087eed4bc1ee3de49befbd66c662b434b15d49d4" + }, + "50": { + "address": "0x1dc4c1cefef38a777b15aa20260a54e584b16c48" } - ], - "name": "LogAuthorizedAddressRemoved", - "type": "event" } - ], - "networks": { - "1": { - "address": "0x8da0d80f5007ef1e431dd2127178d224e32c2ef4" - }, - "3": { - "address": "0x4e9aad8184de8833365fea970cd9149372fdf1e6" - }, - "42": { - "address": "0x087eed4bc1ee3de49befbd66c662b434b15d49d4" - }, - "50": { - "address": "0x1dc4c1cefef38a777b15aa20260a54e584b16c48" - } - } } diff --git a/packages/0x.js/src/artifacts/ZRX.json b/packages/0x.js/src/artifacts/ZRX.json index a9fe1799a..1bd973178 100644 --- a/packages/0x.js/src/artifacts/ZRX.json +++ b/packages/0x.js/src/artifacts/ZRX.json @@ -1,17 +1,17 @@ { - "contract_name": "ZRX", - "networks": { - "1": { - "address": "0xe41d2489571d322189246dafa5ebde1f4699f498" - }, - "3": { - "address": "0xa8e9fa8f91e5ae138c74648c9c304f1c75003a8d" - }, - "42": { - "address": "0x6ff6c0ff1d68b964901f986d4c9fa3ac68346570" - }, - "50": { - "address": "0x1d7022f5b17d2f8b695918fb48fa1089c9f85401" + "contract_name": "ZRX", + "networks": { + "1": { + "address": "0xe41d2489571d322189246dafa5ebde1f4699f498" + }, + "3": { + "address": "0xa8e9fa8f91e5ae138c74648c9c304f1c75003a8d" + }, + "42": { + "address": "0x6ff6c0ff1d68b964901f986d4c9fa3ac68346570" + }, + "50": { + "address": "0x1d7022f5b17d2f8b695918fb48fa1089c9f85401" + } } - } } diff --git a/packages/0x.js/tsconfig.json b/packages/0x.js/tsconfig.json index a5da86b88..d872fcf54 100644 --- a/packages/0x.js/tsconfig.json +++ b/packages/0x.js/tsconfig.json @@ -1,22 +1,22 @@ { - "compilerOptions": { - "module": "commonjs", - "target": "es5", - "lib": [ "es2015", "dom" ], - "outDir": "lib", - "sourceMap": true, - "declaration": true, - "noImplicitAny": true, - "experimentalDecorators": true, - "strictNullChecks": true - }, - "include": [ - "./src/**/*", - "./test/**/*", - "../../node_modules/types-bn/index.d.ts", - "../../node_modules/types-ethereumjs-util/index.d.ts", - "../../node_modules/web3-typescript-typings/index.d.ts", - "../../node_modules/chai-typescript-typings/index.d.ts", - "../../node_modules/chai-as-promised-typescript-typings/index.d.ts" - ] + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": ["es2015", "dom"], + "outDir": "lib", + "sourceMap": true, + "declaration": true, + "noImplicitAny": true, + "experimentalDecorators": true, + "strictNullChecks": true + }, + "include": [ + "./src/**/*", + "./test/**/*", + "../../node_modules/types-bn/index.d.ts", + "../../node_modules/types-ethereumjs-util/index.d.ts", + "../../node_modules/web3-typescript-typings/index.d.ts", + "../../node_modules/chai-typescript-typings/index.d.ts", + "../../node_modules/chai-as-promised-typescript-typings/index.d.ts" + ] } diff --git a/packages/0x.js/tslint.json b/packages/0x.js/tslint.json index a07795151..ffaefe83a 100644 --- a/packages/0x.js/tslint.json +++ b/packages/0x.js/tslint.json @@ -1,5 +1,3 @@ { - "extends": [ - "@0xproject/tslint-config" - ] + "extends": ["@0xproject/tslint-config"] } diff --git a/packages/abi-gen/CHANGELOG.md b/packages/abi-gen/CHANGELOG.md index 0afd6abd4..983f7a3d1 100644 --- a/packages/abi-gen/CHANGELOG.md +++ b/packages/abi-gen/CHANGELOG.md @@ -1,7 +1,7 @@ # CHANGELOG -v0.x.x - _TBD, 2018_ ------------------------- +## v0.x.x - _TBD, 2018_ + * Fixed array typings with union types (#295) * Add event ABIs to context data passed to templates (#302) * Add constructor ABIs to context data passed to templates (#304)
\ No newline at end of file diff --git a/packages/abi-gen/README.md b/packages/abi-gen/README.md index ab2315232..1188bd437 100644 --- a/packages/abi-gen/README.md +++ b/packages/abi-gen/README.md @@ -8,8 +8,11 @@ For an example of the generated [wrapper files](https://github.com/0xProject/0x. [Here](https://github.com/0xProject/0x.js/tree/development/packages/0x.js/contract_templates) are the templates used to generate those files. ## Installation + `yarn add -g @0xproject/abi-gen` + ## Usage + ``` abi-gen Options: @@ -19,8 +22,10 @@ Options: --templates Folder where to search for templates [string] [required] --output Folder where to put the output files [string] [required] ``` + ## ABI files -You're required to pass a [glob](https://en.wikipedia.org/wiki/Glob_(programming)) template where your abi files are located. + +You're required to pass a [glob](<https://en.wikipedia.org/wiki/Glob_(programming)>) template where your abi files are located. TL;DR - here is the example from 0x.js. `--abiGlob 'src/artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|TokenRegistry).json` @@ -28,12 +33,18 @@ TL;DR - here is the example from 0x.js. We could've just used `--abiGlob 'src/artifacts/*.json` but we wanted to exclude some of the abi files. The abi file should be either a [Truffle](http://truffleframework.com/) contract artifact (a JSON object with an abi key) or a JSON abi array. + ## How to write custom templates? + The best way to get started is to copy [0x.js templates](https://github.com/0xProject/0x.js/tree/development/packages/0x.js/contract_templates) and start adjusting them for your needs. We use [handlebars](http://handlebarsjs.com/) template engine under the hood. You need to have a master template called `contract.mustache`. it will be used to generate each contract wrapper. Although - you don't need and probably shouldn't write all your logic in a single template file. You can write [partial templates](http://handlebarsjs.com/partials.html) and as long as they are within a partials folder - they will be registered and available. + ## Which data/context do I get in my templates? + For now you don't get much on top of methods abi, some useful helpers and a contract name because it was enough for our use-case, but if you need something else - create a PR. See the [type definition](https://github.com/0xProject/0x.js/tree/development/packages/abi-gen/src/types.ts) of what we pass to the render method. + ## Output files + Output files will be generated within an output folder with names converted to camel case and taken from abi file names. If you already have some files in that folder they will be overwritten. diff --git a/packages/abi-gen/package.json b/packages/abi-gen/package.json index 50efc43a1..b42a7fbce 100644 --- a/packages/abi-gen/package.json +++ b/packages/abi-gen/package.json @@ -1,48 +1,48 @@ { - "name": "@0xproject/abi-gen", - "version": "0.0.4", - "description": "Generate contract wrappers from ABI and handlebars templates", - "main": "lib/index.js", - "types": "lib/index.d.ts", - "scripts": { - "lint": "tslint --project . 'src/**/*.ts'", - "clean": "shx rm -rf lib", - "build": "tsc" - }, - "bin": { - "abi-gen": "lib/index.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/0xProject/0x.js.git" - }, - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/0xProject/0x.js/issues" - }, - "homepage": "https://github.com/0xProject/0x.js/packages/abi-gen/README.md", - "dependencies": { - "@0xproject/utils": "^0.1.2", - "chalk": "^2.3.0", - "glob": "^7.1.2", - "handlebars": "^4.0.11", - "lodash": "^4.17.4", - "mkdirp": "^0.5.1", - "to-snake-case": "^1.0.0", - "web3": "^0.20.0", - "yargs": "^10.0.3" - }, - "devDependencies": { - "@0xproject/tslint-config": "^0.4.0", - "@types/glob": "^5.0.33", - "@types/handlebars": "^4.0.36", - "@types/mkdirp": "^0.5.1", - "@types/node": "^8.0.53", - "@types/yargs": "^10.0.0", - "npm-run-all": "^4.1.2", - "shx": "^0.2.2", - "tslint": "5.8.0", - "typescript": "~2.6.1", - "web3-typescript-typings": "^0.9.0" - } + "name": "@0xproject/abi-gen", + "version": "0.0.4", + "description": "Generate contract wrappers from ABI and handlebars templates", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "scripts": { + "lint": "tslint --project . 'src/**/*.ts'", + "clean": "shx rm -rf lib", + "build": "tsc" + }, + "bin": { + "abi-gen": "lib/index.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/0xProject/0x.js.git" + }, + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/0xProject/0x.js/issues" + }, + "homepage": "https://github.com/0xProject/0x.js/packages/abi-gen/README.md", + "dependencies": { + "@0xproject/utils": "^0.1.2", + "chalk": "^2.3.0", + "glob": "^7.1.2", + "handlebars": "^4.0.11", + "lodash": "^4.17.4", + "mkdirp": "^0.5.1", + "to-snake-case": "^1.0.0", + "web3": "^0.20.0", + "yargs": "^10.0.3" + }, + "devDependencies": { + "@0xproject/tslint-config": "^0.4.0", + "@types/glob": "^5.0.33", + "@types/handlebars": "^4.0.36", + "@types/mkdirp": "^0.5.1", + "@types/node": "^8.0.53", + "@types/yargs": "^10.0.0", + "npm-run-all": "^4.1.2", + "shx": "^0.2.2", + "tslint": "5.8.0", + "typescript": "~2.6.1", + "web3-typescript-typings": "^0.9.0" + } } diff --git a/packages/abi-gen/tsconfig.json b/packages/abi-gen/tsconfig.json index 695f2a47e..c9a7e9189 100644 --- a/packages/abi-gen/tsconfig.json +++ b/packages/abi-gen/tsconfig.json @@ -1,17 +1,13 @@ { - "compilerOptions": { - "module": "commonjs", - "target": "es5", - "lib": ["es2015", "dom"], - "outDir": "lib", - "sourceMap": true, - "declaration": true, - "noImplicitAny": true, - "strictNullChecks": true - }, - "include": [ - "./src/**/*", - "./test/**/*", - "../../node_modules/web3-typescript-typings/index.d.ts" - ] + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": ["es2015", "dom"], + "outDir": "lib", + "sourceMap": true, + "declaration": true, + "noImplicitAny": true, + "strictNullChecks": true + }, + "include": ["./src/**/*", "./test/**/*", "../../node_modules/web3-typescript-typings/index.d.ts"] } diff --git a/packages/abi-gen/tslint.json b/packages/abi-gen/tslint.json index a07795151..ffaefe83a 100644 --- a/packages/abi-gen/tslint.json +++ b/packages/abi-gen/tslint.json @@ -1,5 +1,3 @@ { - "extends": [ - "@0xproject/tslint-config" - ] + "extends": ["@0xproject/tslint-config"] } diff --git a/packages/assert/CHANGELOG.md b/packages/assert/CHANGELOG.md index fd6bec3f4..cd04130de 100644 --- a/packages/assert/CHANGELOG.md +++ b/packages/assert/CHANGELOG.md @@ -1,6 +1,6 @@ # CHANGELOG -v0.0.4 - _Nov. 14, 2017_ ------------------------- +## v0.0.4 - _Nov. 14, 2017_ + * Re-publish Assert previously published under NPM package @0xproject/0x-assert * Added assertion isValidBaseUnitAmount which checks both that the value is a valid bigNumber and that it does not contain decimals. diff --git a/packages/assert/README.md b/packages/assert/README.md index 052d56582..59ab63e91 100644 --- a/packages/assert/README.md +++ b/packages/assert/README.md @@ -1,5 +1,4 @@ -@0xproject/assert ------- +## @0xproject/assert Standard type and schema assertions to be used across all 0x projects and packages @@ -12,7 +11,7 @@ yarn add @0xproject/assert ## Usage ```typescript -import {assert} from '@0xproject/assert'; +import { assert } from '@0xproject/assert'; assert.isValidBaseUnitAmount('baseUnitAmount', baseUnitAmount); ``` @@ -26,11 +25,13 @@ Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting ### Install Dependencies If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: + ```bash yarn config set workspaces-experimental true ``` Then install dependencies + ```bash yarn install ``` diff --git a/packages/assert/package.json b/packages/assert/package.json index 1752f4b17..2dadef146 100644 --- a/packages/assert/package.json +++ b/packages/assert/package.json @@ -1,45 +1,45 @@ { - "name": "@0xproject/assert", - "version": "0.0.9", - "description": "Provides a standard way of performing type and schema validation across 0x projects", - "main": "lib/src/index.js", - "types": "lib/src/index.d.ts", - "scripts": { - "build": "tsc", - "clean": "shx rm -rf _bundles lib test_temp", - "lint": "tslint --project . 'src/**/*.ts' 'test/**/*.ts'", - "run_mocha": "mocha lib/test/**/*_test.js", - "prepublishOnly": "run-p build", - "test": "run-s clean build run_mocha", - "test:circleci": "yarn test" - }, - "license": "Apache-2.0", - "repository": { - "type": "git", - "url": "https://github.com/0xProject/0x.js.git" - }, - "bugs": { - "url": "https://github.com/0xProject/0x.js/issues" - }, - "homepage": "https://github.com/0xProject/0x.js/packages/assert/README.md", - "devDependencies": { - "@0xproject/tslint-config": "^0.4.0", - "@types/lodash": "^4.14.86", - "@types/mocha": "^2.2.42", - "@types/valid-url": "^1.0.2", - "chai": "^4.0.1", - "chai-typescript-typings": "^0.0.1", - "dirty-chai": "^2.0.1", - "mocha": "^4.0.1", - "npm-run-all": "^4.1.2", - "shx": "^0.2.2", - "tslint": "5.8.0", - "typescript": "~2.6.1" - }, - "dependencies": { - "@0xproject/json-schemas": "^0.7.1", - "@0xproject/utils": "^0.1.2", - "lodash": "^4.17.4", - "valid-url": "^1.0.9" - } + "name": "@0xproject/assert", + "version": "0.0.9", + "description": "Provides a standard way of performing type and schema validation across 0x projects", + "main": "lib/src/index.js", + "types": "lib/src/index.d.ts", + "scripts": { + "build": "tsc", + "clean": "shx rm -rf _bundles lib test_temp", + "lint": "tslint --project . 'src/**/*.ts' 'test/**/*.ts'", + "run_mocha": "mocha lib/test/**/*_test.js", + "prepublishOnly": "run-p build", + "test": "run-s clean build run_mocha", + "test:circleci": "yarn test" + }, + "license": "Apache-2.0", + "repository": { + "type": "git", + "url": "https://github.com/0xProject/0x.js.git" + }, + "bugs": { + "url": "https://github.com/0xProject/0x.js/issues" + }, + "homepage": "https://github.com/0xProject/0x.js/packages/assert/README.md", + "devDependencies": { + "@0xproject/tslint-config": "^0.4.0", + "@types/lodash": "^4.14.86", + "@types/mocha": "^2.2.42", + "@types/valid-url": "^1.0.2", + "chai": "^4.0.1", + "chai-typescript-typings": "^0.0.1", + "dirty-chai": "^2.0.1", + "mocha": "^4.0.1", + "npm-run-all": "^4.1.2", + "shx": "^0.2.2", + "tslint": "5.8.0", + "typescript": "~2.6.1" + }, + "dependencies": { + "@0xproject/json-schemas": "^0.7.1", + "@0xproject/utils": "^0.1.2", + "lodash": "^4.17.4", + "valid-url": "^1.0.9" + } } diff --git a/packages/assert/tsconfig.json b/packages/assert/tsconfig.json index 709e20154..31bedfeb7 100644 --- a/packages/assert/tsconfig.json +++ b/packages/assert/tsconfig.json @@ -1,18 +1,18 @@ { - "compilerOptions": { - "module": "commonjs", - "target": "es5", - "lib": [ "es2017", "dom"], - "outDir": "lib", - "sourceMap": true, - "declaration": true, - "noImplicitAny": true, - "strictNullChecks": true - }, - "include": [ - "./src/**/*", - "./test/**/*", - "../../node_modules/chai-typescript-typings/index.d.ts", - "../../node_modules/web3-typescript-typings/index.d.ts" - ] + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": ["es2017", "dom"], + "outDir": "lib", + "sourceMap": true, + "declaration": true, + "noImplicitAny": true, + "strictNullChecks": true + }, + "include": [ + "./src/**/*", + "./test/**/*", + "../../node_modules/chai-typescript-typings/index.d.ts", + "../../node_modules/web3-typescript-typings/index.d.ts" + ] } diff --git a/packages/assert/tslint.json b/packages/assert/tslint.json index a07795151..ffaefe83a 100644 --- a/packages/assert/tslint.json +++ b/packages/assert/tslint.json @@ -1,5 +1,3 @@ { - "extends": [ - "@0xproject/tslint-config" - ] + "extends": ["@0xproject/tslint-config"] } diff --git a/packages/connect/CHANGELOG.md b/packages/connect/CHANGELOG.md index 16e343fb5..a0bc68a0b 100644 --- a/packages/connect/CHANGELOG.md +++ b/packages/connect/CHANGELOG.md @@ -1,20 +1,20 @@ # CHANGELOG -vx.x.x ------------------------- +## vx.x.x + * Prevent getFeesAsync method on HttpClient from mutating input (#296) -v0.3.0 - _December 8, 2017_ ------------------------- +## v0.3.0 - _December 8, 2017_ + * Expose WebSocketOrderbookChannel and associated types to public interface (#251) * Remove tokenA and tokenB fields from OrdersRequest (#256) -v0.2.0 - _November 29, 2017_ ------------------------- +## v0.2.0 - _November 29, 2017_ + * Add SignedOrder and TokenTradeInfo to the public interface * Add ECSignature and Order to the public interface * Remove dependency on 0x.js -v0.1.0 - _November 22, 2017_ ------------------------- +## v0.1.0 - _November 22, 2017_ + * Provide a HttpClient class for interacting with standard relayer api compliant HTTP urls diff --git a/packages/connect/README.md b/packages/connect/README.md index dd2002af4..63faf5271 100644 --- a/packages/connect/README.md +++ b/packages/connect/README.md @@ -1,5 +1,4 @@ -@0xproject/connect ------- +## @0xproject/connect This repository contains a Javascript library that makes it easy to interact with Relayers that conform to the [Standard Relayer API](https://github.com/0xProject/standard-relayer-api) @@ -23,11 +22,13 @@ Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting ### Install Dependencies If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: + ```bash yarn config set workspaces-experimental true ``` Then install dependencies + ```bash yarn install ``` diff --git a/packages/connect/package.json b/packages/connect/package.json index 2995372d9..bd200db8d 100644 --- a/packages/connect/package.json +++ b/packages/connect/package.json @@ -1,69 +1,64 @@ { - "name": "@0xproject/connect", - "version": "0.3.2", - "description": "A javascript library for interacting with the standard relayer api", - "keywords": [ - "connect", - "0xproject", - "ethereum", - "tokens", - "exchange" - ], - "main": "lib/src/index.js", - "types": "lib/src/index.d.ts", - "scripts": { - "build": "tsc", - "clean": "shx rm -rf _bundles lib test_temp", - "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_DIR", - "upload_docs_json": "aws s3 cp generated_docs/index.json $S3_URL --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type application/json", - "copy_test_fixtures": "copyfiles -u 2 './test/fixtures/**/*.json' ./lib/test/fixtures", - "lint": "tslint --project . 'src/**/*.ts' 'test/**/*.ts'", - "run_mocha": "mocha lib/test/**/*_test.js", - "test": "run-s clean build copy_test_fixtures run_mocha", - "test:circleci": "yarn test" - }, - "repository": { - "type": "git", - "url": "https://github.com/0xProject/0x.js.git" - }, - "author": "Brandon Millman", - "license": "Apache-2.0", - "engines": { - "node": ">=6.0.0" - }, - "bugs": { - "url": "https://github.com/0xProject/0x.js/issues" - }, - "homepage": "https://github.com/0xProject/0x.js/packages/connect/README.md", - "dependencies": { - "@0xproject/assert": "^0.0.9", - "@0xproject/json-schemas": "^0.7.1", - "@0xproject/utils": "^0.1.2", - "isomorphic-fetch": "^2.2.1", - "lodash": "^4.17.4", - "query-string": "^5.0.1", - "websocket": "^1.0.25" - }, - "devDependencies": { - "@0xproject/tslint-config": "^0.4.0", - "@types/fetch-mock": "^5.12.1", - "@types/lodash": "^4.14.86", - "@types/mocha": "^2.2.42", - "@types/query-string": "^5.0.1", - "@types/websocket": "^0.0.34", - "chai": "^4.0.1", - "chai-as-promised": "^7.1.0", - "chai-as-promised-typescript-typings": "^0.0.3", - "chai-typescript-typings": "^0.0.1", - "copyfiles": "^1.2.0", - "dirty-chai": "^2.0.1", - "fetch-mock": "^5.13.1", - "mocha": "^4.0.1", - "npm-run-all": "^4.1.2", - "shx": "^0.2.2", - "tslint": "5.8.0", - "typedoc": "~0.8.0", - "typescript": "~2.6.1", - "web3-typescript-typings": "^0.7.2" - } + "name": "@0xproject/connect", + "version": "0.3.2", + "description": "A javascript library for interacting with the standard relayer api", + "keywords": ["connect", "0xproject", "ethereum", "tokens", "exchange"], + "main": "lib/src/index.js", + "types": "lib/src/index.d.ts", + "scripts": { + "build": "tsc", + "clean": "shx rm -rf _bundles lib test_temp", + "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_DIR", + "upload_docs_json": + "aws s3 cp generated_docs/index.json $S3_URL --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type application/json", + "copy_test_fixtures": "copyfiles -u 2 './test/fixtures/**/*.json' ./lib/test/fixtures", + "lint": "tslint --project . 'src/**/*.ts' 'test/**/*.ts'", + "run_mocha": "mocha lib/test/**/*_test.js", + "test": "run-s clean build copy_test_fixtures run_mocha", + "test:circleci": "yarn test" + }, + "repository": { + "type": "git", + "url": "https://github.com/0xProject/0x.js.git" + }, + "author": "Brandon Millman", + "license": "Apache-2.0", + "engines": { + "node": ">=6.0.0" + }, + "bugs": { + "url": "https://github.com/0xProject/0x.js/issues" + }, + "homepage": "https://github.com/0xProject/0x.js/packages/connect/README.md", + "dependencies": { + "@0xproject/assert": "^0.0.9", + "@0xproject/json-schemas": "^0.7.1", + "@0xproject/utils": "^0.1.2", + "isomorphic-fetch": "^2.2.1", + "lodash": "^4.17.4", + "query-string": "^5.0.1", + "websocket": "^1.0.25" + }, + "devDependencies": { + "@0xproject/tslint-config": "^0.4.0", + "@types/fetch-mock": "^5.12.1", + "@types/lodash": "^4.14.86", + "@types/mocha": "^2.2.42", + "@types/query-string": "^5.0.1", + "@types/websocket": "^0.0.34", + "chai": "^4.0.1", + "chai-as-promised": "^7.1.0", + "chai-as-promised-typescript-typings": "^0.0.3", + "chai-typescript-typings": "^0.0.1", + "copyfiles": "^1.2.0", + "dirty-chai": "^2.0.1", + "fetch-mock": "^5.13.1", + "mocha": "^4.0.1", + "npm-run-all": "^4.1.2", + "shx": "^0.2.2", + "tslint": "5.8.0", + "typedoc": "~0.8.0", + "typescript": "~2.6.1", + "web3-typescript-typings": "^0.7.2" + } } diff --git a/packages/connect/test/fixtures/standard_relayer_api/orderbook.json b/packages/connect/test/fixtures/standard_relayer_api/orderbook.json index bd6e10e4c..825be34c2 100644 --- a/packages/connect/test/fixtures/standard_relayer_api/orderbook.json +++ b/packages/connect/test/fixtures/standard_relayer_api/orderbook.json @@ -41,4 +41,4 @@ } } ] -}
\ No newline at end of file +} diff --git a/packages/connect/tsconfig.json b/packages/connect/tsconfig.json index a6c8277f8..90400975b 100644 --- a/packages/connect/tsconfig.json +++ b/packages/connect/tsconfig.json @@ -1,19 +1,19 @@ { "compilerOptions": { - "module": "commonjs", - "target": "es5", - "lib": [ "es2015", "dom" ], - "outDir": "lib", - "sourceMap": true, - "declaration": true, - "noImplicitAny": true, - "strictNullChecks": true + "module": "commonjs", + "target": "es5", + "lib": ["es2015", "dom"], + "outDir": "lib", + "sourceMap": true, + "declaration": true, + "noImplicitAny": true, + "strictNullChecks": true }, "include": [ - "./src/**/*", - "./test/**/*", - "../../node_modules/chai-as-promised-typescript-typings/index.d.ts", - "../../node_modules/chai-typescript-typings/index.d.ts", - "../../node_modules/web3-typescript-typings/index.d.ts" + "./src/**/*", + "./test/**/*", + "../../node_modules/chai-as-promised-typescript-typings/index.d.ts", + "../../node_modules/chai-typescript-typings/index.d.ts", + "../../node_modules/web3-typescript-typings/index.d.ts" ] - } +} diff --git a/packages/connect/tslint.json b/packages/connect/tslint.json index a07795151..ffaefe83a 100644 --- a/packages/connect/tslint.json +++ b/packages/connect/tslint.json @@ -1,5 +1,3 @@ { - "extends": [ - "@0xproject/tslint-config" - ] + "extends": ["@0xproject/tslint-config"] } diff --git a/packages/contracts/README.md b/packages/contracts/README.md index 52fa6062d..0a1c272ab 100644 --- a/packages/contracts/README.md +++ b/packages/contracts/README.md @@ -1,5 +1,4 @@ -Contracts --------- +## Contracts Smart contracts that implement the 0x protocol. @@ -22,11 +21,13 @@ Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting ### Install Dependencies If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: + ```bash yarn config set workspaces-experimental true ``` Then install dependencies + ```bash yarn install ``` @@ -54,12 +55,14 @@ yarn lint Before running the tests, you will need to spin up a [TestRPC](https://www.npmjs.com/package/ethereumjs-testrpc) instance. In a separate terminal, start TestRPC (a convenience command is provided as part of the [0x.js monorepo](https://github.com/0xProject/0x.js)) + ```bash cd ../.. yarn testrpc ``` Then in your main terminal run + ```bash yarn test ``` diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 16dd2db63..d5bd78fc2 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -1,72 +1,73 @@ { - "private": true, - "name": "contracts", - "version": "2.1.1", - "description": "Smart contract components of 0x protocol", - "main": "index.js", - "directories": { - "test": "test" - }, - "scripts": { - "build": "rm -rf ./lib; copyfiles ./build/**/* ./deploy/solc/solc_bin/* ./deploy/test/fixtures/contracts/**/* ./deploy/test/fixtures/contracts/* ./lib; tsc;", - "test": "npm run build; truffle test", - "compile": "npm run build; node lib/deploy/cli.js compile", - "clean": "rm -rf ./lib", - "migrate:truffle": "npm run build; truffle migrate", - "migrate": "npm run build; node lib/deploy/cli.js migrate", - "lint": "tslint --project . 'migrations/**/*.ts' 'test/**/*.ts' 'util/**/*.ts' 'deploy/**/*.ts'", - "test:circleci": "yarn test; yarn test:deployer", - "test:deployer": "npm run build; mocha lib/deploy/test/*_test.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/0xProject/0x.js.git" - }, - "author": "Amir Bandeali", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/0xProject/0x.js/issues" - }, - "homepage": "https://github.com/0xProject/0x.js/packages/contracts/README.md", - "devDependencies": { - "@0xproject/dev-utils": "^0.0.3", - "@0xproject/tslint-config": "^0.4.0", - "@0xproject/types": "^0.1.2", - "@types/bluebird": "^3.5.3", - "@types/lodash": "^4.14.86", - "@types/node": "^8.0.53", - "@types/request-promise-native": "^1.0.2", - "@types/yargs": "^10.0.0", - "chai": "^4.0.1", - "chai-as-promised": "^7.1.0", - "chai-as-promised-typescript-typings": "^0.0.3", - "chai-bignumber": "^2.0.1", - "chai-typescript-typings": "^0.0.1", - "copyfiles": "^1.2.0", - "dirty-chai": "^2.0.1", - "mocha": "^4.0.1", - "solc": "^0.4.18", - "truffle": "^4.0.1", - "tslint": "5.8.0", - "types-bn": "^0.0.1", - "types-ethereumjs-util": "0xProject/types-ethereumjs-util", - "typescript": "~2.6.1", - "web3-typescript-typings": "^0.7.2", - "yargs": "^10.0.3" - }, - "dependencies": { - "0x.js": "^0.29.0", - "@0xproject/json-schemas": "^0.7.1", - "@0xproject/utils": "^0.1.2", - "@0xproject/web3-wrapper": "^0.1.2", - "bluebird": "^3.5.0", - "bn.js": "^4.11.8", - "ethereumjs-abi": "^0.6.4", - "ethereumjs-util": "^5.1.1", - "isomorphic-fetch": "^2.2.1", - "lodash": "^4.17.4", - "request": "^2.81.0", - "web3": "^0.20.0", - "web3-eth-abi": "^1.0.0-beta.24" - } + "private": true, + "name": "contracts", + "version": "2.1.1", + "description": "Smart contract components of 0x protocol", + "main": "index.js", + "directories": { + "test": "test" + }, + "scripts": { + "build": + "rm -rf ./lib; copyfiles ./build/**/* ./deploy/solc/solc_bin/* ./deploy/test/fixtures/contracts/**/* ./deploy/test/fixtures/contracts/* ./lib; tsc;", + "test": "npm run build; truffle test", + "compile": "npm run build; node lib/deploy/cli.js compile", + "clean": "rm -rf ./lib", + "migrate:truffle": "npm run build; truffle migrate", + "migrate": "npm run build; node lib/deploy/cli.js migrate", + "lint": "tslint --project . 'migrations/**/*.ts' 'test/**/*.ts' 'util/**/*.ts' 'deploy/**/*.ts'", + "test:circleci": "yarn test; yarn test:deployer", + "test:deployer": "npm run build; mocha lib/deploy/test/*_test.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/0xProject/0x.js.git" + }, + "author": "Amir Bandeali", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/0xProject/0x.js/issues" + }, + "homepage": "https://github.com/0xProject/0x.js/packages/contracts/README.md", + "devDependencies": { + "@0xproject/dev-utils": "^0.0.3", + "@0xproject/tslint-config": "^0.4.0", + "@0xproject/types": "^0.1.2", + "@types/bluebird": "^3.5.3", + "@types/lodash": "^4.14.86", + "@types/node": "^8.0.53", + "@types/request-promise-native": "^1.0.2", + "@types/yargs": "^10.0.0", + "chai": "^4.0.1", + "chai-as-promised": "^7.1.0", + "chai-as-promised-typescript-typings": "^0.0.3", + "chai-bignumber": "^2.0.1", + "chai-typescript-typings": "^0.0.1", + "copyfiles": "^1.2.0", + "dirty-chai": "^2.0.1", + "mocha": "^4.0.1", + "solc": "^0.4.18", + "truffle": "^4.0.1", + "tslint": "5.8.0", + "types-bn": "^0.0.1", + "types-ethereumjs-util": "0xProject/types-ethereumjs-util", + "typescript": "~2.6.1", + "web3-typescript-typings": "^0.7.2", + "yargs": "^10.0.3" + }, + "dependencies": { + "0x.js": "^0.29.0", + "@0xproject/json-schemas": "^0.7.1", + "@0xproject/utils": "^0.1.2", + "@0xproject/web3-wrapper": "^0.1.2", + "bluebird": "^3.5.0", + "bn.js": "^4.11.8", + "ethereumjs-abi": "^0.6.4", + "ethereumjs-util": "^5.1.1", + "isomorphic-fetch": "^2.2.1", + "lodash": "^4.17.4", + "request": "^2.81.0", + "web3": "^0.20.0", + "web3-eth-abi": "^1.0.0-beta.24" + } } diff --git a/packages/contracts/tsconfig.json b/packages/contracts/tsconfig.json index c51d5acc4..cbcd8ad6d 100644 --- a/packages/contracts/tsconfig.json +++ b/packages/contracts/tsconfig.json @@ -21,7 +21,5 @@ "./migrations/**/*", "./deploy/**/*" ], - "exclude": [ - "./deploy/solc/solc_bin" - ] + "exclude": ["./deploy/solc/solc_bin"] } diff --git a/packages/contracts/tslint.json b/packages/contracts/tslint.json index a07795151..ffaefe83a 100644 --- a/packages/contracts/tslint.json +++ b/packages/contracts/tslint.json @@ -1,5 +1,3 @@ { - "extends": [ - "@0xproject/tslint-config" - ] + "extends": ["@0xproject/tslint-config"] } diff --git a/packages/dev-utils/README.md b/packages/dev-utils/README.md index 98f31cda6..5a8e71f2f 100644 --- a/packages/dev-utils/README.md +++ b/packages/dev-utils/README.md @@ -1,5 +1,4 @@ -Dev utils ------- +## Dev utils Dev utils to be shared across 0x projects and packages diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index 09c684a5c..05970cbe4 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -1,37 +1,37 @@ { - "name": "@0xproject/dev-utils", - "version": "0.0.3", - "description": "0x dev TS utils", - "main": "lib/index.js", - "types": "lib/index.d.ts", - "scripts": { - "build": "tsc", - "clean": "shx rm -rf lib", - "lint": "tslint --project . 'src/**/*.ts'" - }, - "license": "Apache-2.0", - "repository": { - "type": "git", - "url": "https://github.com/0xProject/0x.js.git" - }, - "bugs": { - "url": "https://github.com/0xProject/0x.js/issues" - }, - "homepage": "https://github.com/0xProject/0x.js/packages/dev-utils/README.md", - "devDependencies": { - "@0xproject/tslint-config": "^0.4.0", - "@types/lodash": "^4.14.86", - "npm-run-all": "^4.1.2", - "shx": "^0.2.2", - "tslint": "5.8.0", - "types-bn": "^0.0.1", - "types-ethereumjs-util": "0xProject/types-ethereumjs-util", - "typescript": "~2.6.1" - }, - "dependencies": { - "@0xproject/utils": "^0.1.2", - "ethereumjs-util": "^5.1.2", - "lodash": "^4.17.4", - "request-promise-native": "^1.0.5" - } + "name": "@0xproject/dev-utils", + "version": "0.0.3", + "description": "0x dev TS utils", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "scripts": { + "build": "tsc", + "clean": "shx rm -rf lib", + "lint": "tslint --project . 'src/**/*.ts'" + }, + "license": "Apache-2.0", + "repository": { + "type": "git", + "url": "https://github.com/0xProject/0x.js.git" + }, + "bugs": { + "url": "https://github.com/0xProject/0x.js/issues" + }, + "homepage": "https://github.com/0xProject/0x.js/packages/dev-utils/README.md", + "devDependencies": { + "@0xproject/tslint-config": "^0.4.0", + "@types/lodash": "^4.14.86", + "npm-run-all": "^4.1.2", + "shx": "^0.2.2", + "tslint": "5.8.0", + "types-bn": "^0.0.1", + "types-ethereumjs-util": "0xProject/types-ethereumjs-util", + "typescript": "~2.6.1" + }, + "dependencies": { + "@0xproject/utils": "^0.1.2", + "ethereumjs-util": "^5.1.2", + "lodash": "^4.17.4", + "request-promise-native": "^1.0.5" + } } diff --git a/packages/dev-utils/tsconfig.json b/packages/dev-utils/tsconfig.json index 66609c87d..51e3d5ef0 100644 --- a/packages/dev-utils/tsconfig.json +++ b/packages/dev-utils/tsconfig.json @@ -1,17 +1,17 @@ { - "compilerOptions": { - "module": "commonjs", - "target": "es5", - "lib": [ "es2017", "dom"], - "outDir": "lib", - "sourceMap": true, - "declaration": true, - "noImplicitAny": true, - "strictNullChecks": true - }, - "include": [ - "./src/**/*", - "../../node_modules/types-bn/index.d.ts", - "../../node_modules/types-ethereumjs-util/index.d.ts" - ] + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": ["es2017", "dom"], + "outDir": "lib", + "sourceMap": true, + "declaration": true, + "noImplicitAny": true, + "strictNullChecks": true + }, + "include": [ + "./src/**/*", + "../../node_modules/types-bn/index.d.ts", + "../../node_modules/types-ethereumjs-util/index.d.ts" + ] } diff --git a/packages/dev-utils/tslint.json b/packages/dev-utils/tslint.json index a07795151..ffaefe83a 100644 --- a/packages/dev-utils/tslint.json +++ b/packages/dev-utils/tslint.json @@ -1,5 +1,3 @@ { - "extends": [ - "@0xproject/tslint-config" - ] + "extends": ["@0xproject/tslint-config"] } diff --git a/packages/json-schemas/CHANGELOG.md b/packages/json-schemas/CHANGELOG.md index 12a3ab000..28f38acc5 100644 --- a/packages/json-schemas/CHANGELOG.md +++ b/packages/json-schemas/CHANGELOG.md @@ -1,9 +1,9 @@ # CHANGELOG -v0.7.0 - _December 20, 2017_ ------------------------- +## v0.7.0 - _December 20, 2017_ + * Rename `subscriptionOptsSchema` to `blockRangeSchema` (#272) -v0.6.7 - _November 14, 2017_ ------------------------- +## v0.6.7 - _November 14, 2017_ + * Re-publish JSON-schema previously published under NPM package 0x-json-schemas diff --git a/packages/json-schemas/README.md b/packages/json-schemas/README.md index 94dfd8640..9166f50c1 100644 --- a/packages/json-schemas/README.md +++ b/packages/json-schemas/README.md @@ -1,5 +1,4 @@ -@0xproject/json-schemas ------- +## @0xproject/json-schemas Contains 0x-related json schemas @@ -33,11 +32,13 @@ Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting ### Install Dependencies If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: + ```bash yarn config set workspaces-experimental true ``` Then install dependencies + ```bash yarn install ``` diff --git a/packages/json-schemas/package.json b/packages/json-schemas/package.json index 9f6cfccc7..14e9aff98 100644 --- a/packages/json-schemas/package.json +++ b/packages/json-schemas/package.json @@ -1,45 +1,45 @@ { - "name": "@0xproject/json-schemas", - "version": "0.7.1", - "description": "0x-related json schemas", - "main": "lib/src/index.js", - "types": "lib/src/index.d.ts", - "scripts": { - "lint": "tslint --project . 'src/**/*.ts' 'test/**/*.ts'", - "test": "run-s clean build run_mocha", - "test:circleci": "yarn test", - "run_mocha": "mocha lib/test/**/*_test.js", - "clean": "shx rm -rf _bundles lib test_temp", - "build": "tsc" - }, - "repository": { - "type": "git", - "url": "https://github.com/0xProject/0x.js.git" - }, - "author": "", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/0xProject/0x.js/issues" - }, - "homepage": "https://github.com/0xProject/0x.js/packages/json-schemas/README.md", - "dependencies": { - "jsonschema": "^1.2.0", - "lodash.values": "^4.3.0" - }, - "devDependencies": { - "@0xproject/tslint-config": "^0.4.0", - "@0xproject/utils": "^0.1.2", - "@types/lodash.foreach": "^4.5.3", - "@types/lodash.values": "^4.3.3", - "@types/mocha": "^2.2.42", - "chai": "^4.0.1", - "chai-typescript-typings": "^0.0.1", - "dirty-chai": "^2.0.1", - "lodash.foreach": "^4.5.0", - "mocha": "^4.0.1", - "npm-run-all": "^4.1.2", - "shx": "^0.2.2", - "tslint": "5.8.0", - "typescript": "~2.6.1" - } + "name": "@0xproject/json-schemas", + "version": "0.7.1", + "description": "0x-related json schemas", + "main": "lib/src/index.js", + "types": "lib/src/index.d.ts", + "scripts": { + "lint": "tslint --project . 'src/**/*.ts' 'test/**/*.ts'", + "test": "run-s clean build run_mocha", + "test:circleci": "yarn test", + "run_mocha": "mocha lib/test/**/*_test.js", + "clean": "shx rm -rf _bundles lib test_temp", + "build": "tsc" + }, + "repository": { + "type": "git", + "url": "https://github.com/0xProject/0x.js.git" + }, + "author": "", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/0xProject/0x.js/issues" + }, + "homepage": "https://github.com/0xProject/0x.js/packages/json-schemas/README.md", + "dependencies": { + "jsonschema": "^1.2.0", + "lodash.values": "^4.3.0" + }, + "devDependencies": { + "@0xproject/tslint-config": "^0.4.0", + "@0xproject/utils": "^0.1.2", + "@types/lodash.foreach": "^4.5.3", + "@types/lodash.values": "^4.3.3", + "@types/mocha": "^2.2.42", + "chai": "^4.0.1", + "chai-typescript-typings": "^0.0.1", + "dirty-chai": "^2.0.1", + "lodash.foreach": "^4.5.0", + "mocha": "^4.0.1", + "npm-run-all": "^4.1.2", + "shx": "^0.2.2", + "tslint": "5.8.0", + "typescript": "~2.6.1" + } } diff --git a/packages/json-schemas/tsconfig.json b/packages/json-schemas/tsconfig.json index 40c2f0c8c..27d415a13 100644 --- a/packages/json-schemas/tsconfig.json +++ b/packages/json-schemas/tsconfig.json @@ -1,17 +1,13 @@ { - "compilerOptions": { - "module": "commonjs", - "target": "es5", - "lib": [ "es2017", "dom"], - "outDir": "lib", - "sourceMap": true, - "declaration": true, - "noImplicitAny": true, - "strictNullChecks": true - }, - "include": [ - "./src/**/*", - "./test/**/*", - "../../node_modules/chai-typescript-typings/index.d.ts" - ] + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": ["es2017", "dom"], + "outDir": "lib", + "sourceMap": true, + "declaration": true, + "noImplicitAny": true, + "strictNullChecks": true + }, + "include": ["./src/**/*", "./test/**/*", "../../node_modules/chai-typescript-typings/index.d.ts"] } diff --git a/packages/json-schemas/tslint.json b/packages/json-schemas/tslint.json index a07795151..ffaefe83a 100644 --- a/packages/json-schemas/tslint.json +++ b/packages/json-schemas/tslint.json @@ -1,5 +1,3 @@ { - "extends": [ - "@0xproject/tslint-config" - ] + "extends": ["@0xproject/tslint-config"] } diff --git a/packages/kovan-faucets/README.md b/packages/kovan-faucets/README.md index 111e88302..07bd23575 100644 --- a/packages/kovan-faucets/README.md +++ b/packages/kovan-faucets/README.md @@ -1,5 +1,4 @@ -@0xproject/kovan_faucets ------- +## @0xproject/kovan_faucets This faucet dispenses 0.1 test ether to one recipient per second and 0.1 test ZRX every 5 seconds. It has a max queue size of 1000. @@ -16,11 +15,13 @@ Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting ### Install Dependencies If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: + ```bash yarn config set workspaces-experimental true ``` Then install dependencies + ```bash yarn install ``` @@ -47,11 +48,11 @@ yarn dev ### Endpoints -```GET /ether/:recipient``` +`GET /ether/:recipient` Where recipient_address is a hex encoded Ethereum address prefixed with `0x`. -```GET /zrx/:recipient``` +`GET /zrx/:recipient` Where recipient_address is a hex encoded Ethereum address prefixed with `0x`. diff --git a/packages/kovan-faucets/package.json b/packages/kovan-faucets/package.json index 85349dd3d..fe7cef5f2 100644 --- a/packages/kovan-faucets/package.json +++ b/packages/kovan-faucets/package.json @@ -1,43 +1,43 @@ { - "private": true, - "name": "@0xproject/kovan_faucets", - "version": "1.0.2", - "description": "A faucet micro-service that dispenses test ERC20 tokens or Ether", - "main": "server.js", - "scripts": { - "build": "node ../../node_modules/gulp/bin/gulp.js build", - "dev": "node ../../node_modules/gulp/bin/gulp.js run", - "start": "node ./bin/server.js", - "lint": "tslint --project . 'src/**/*.ts'", - "clean": "shx rm -rf bin" - }, - "author": "Fabio Berger", - "license": "Apache-2.0", - "dependencies": { - "0x.js": "^0.29.0", - "@0xproject/utils": "^0.1.2", - "body-parser": "^1.17.1", - "ethereumjs-tx": "^1.3.3", - "express": "^4.15.2", - "lodash": "^4.17.4", - "rollbar": "^0.6.5", - "web3": "^0.20.0", - "web3-provider-engine": "^13.0.1" - }, - "devDependencies": { - "@0xproject/tslint-config": "^0.4.0", - "@types/body-parser": "^1.16.1", - "@types/express": "^4.0.35", - "@types/lodash": "^4.14.86", - "awesome-typescript-loader": "^3.1.3", - "gulp": "^3.9.1", - "nodemon": "^1.11.0", - "shx": "^0.2.2", - "source-map-loader": "^0.1.6", - "tslint": "5.8.0", - "typescript": "~2.6.1", - "web3-typescript-typings": "^0.7.2", - "webpack": "^3.1.0", - "webpack-node-externals": "^1.6.0" - } + "private": true, + "name": "@0xproject/kovan_faucets", + "version": "1.0.2", + "description": "A faucet micro-service that dispenses test ERC20 tokens or Ether", + "main": "server.js", + "scripts": { + "build": "node ../../node_modules/gulp/bin/gulp.js build", + "dev": "node ../../node_modules/gulp/bin/gulp.js run", + "start": "node ./bin/server.js", + "lint": "tslint --project . 'src/**/*.ts'", + "clean": "shx rm -rf bin" + }, + "author": "Fabio Berger", + "license": "Apache-2.0", + "dependencies": { + "0x.js": "^0.29.0", + "@0xproject/utils": "^0.1.2", + "body-parser": "^1.17.1", + "ethereumjs-tx": "^1.3.3", + "express": "^4.15.2", + "lodash": "^4.17.4", + "rollbar": "^0.6.5", + "web3": "^0.20.0", + "web3-provider-engine": "^13.0.1" + }, + "devDependencies": { + "@0xproject/tslint-config": "^0.4.0", + "@types/body-parser": "^1.16.1", + "@types/express": "^4.0.35", + "@types/lodash": "^4.14.86", + "awesome-typescript-loader": "^3.1.3", + "gulp": "^3.9.1", + "nodemon": "^1.11.0", + "shx": "^0.2.2", + "source-map-loader": "^0.1.6", + "tslint": "5.8.0", + "typescript": "~2.6.1", + "web3-typescript-typings": "^0.7.2", + "webpack": "^3.1.0", + "webpack-node-externals": "^1.6.0" + } } diff --git a/packages/kovan-faucets/tsconfig.json b/packages/kovan-faucets/tsconfig.json index 6b14a6f6b..7f0031ec6 100644 --- a/packages/kovan-faucets/tsconfig.json +++ b/packages/kovan-faucets/tsconfig.json @@ -1,16 +1,13 @@ { - "compilerOptions": { - "module": "commonjs", - "target": "es5", - "lib": [ "es2015", "dom" ], - "outDir": "lib", - "sourceMap": true, - "declaration": true, - "noImplicitAny": true, - "experimentalDecorators": true, - }, - "include": [ - "../../node_modules/web3-typescript-typings/index.d.ts", - "./src/ts/**/*" - ] + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": ["es2015", "dom"], + "outDir": "lib", + "sourceMap": true, + "declaration": true, + "noImplicitAny": true, + "experimentalDecorators": true + }, + "include": ["../../node_modules/web3-typescript-typings/index.d.ts", "./src/ts/**/*"] } diff --git a/packages/kovan-faucets/tslint.json b/packages/kovan-faucets/tslint.json index a07795151..ffaefe83a 100644 --- a/packages/kovan-faucets/tslint.json +++ b/packages/kovan-faucets/tslint.json @@ -1,5 +1,3 @@ { - "extends": [ - "@0xproject/tslint-config" - ] + "extends": ["@0xproject/tslint-config"] } diff --git a/packages/monorepo-scripts/README.md b/packages/monorepo-scripts/README.md index 452e0f94c..bed9bd6a6 100644 --- a/packages/monorepo-scripts/README.md +++ b/packages/monorepo-scripts/README.md @@ -1,11 +1,11 @@ -Mono repo scripts ------- +## Mono repo scripts This repository contains a few helpful scripts for working with this mono repo. ## Usage #### Dependency versions + In order to reduce the size of this repo, we try and use the same versions of dependencies between packages. To make it easier to discover version discrepancies between packages, you can run: ```bash @@ -23,11 +23,13 @@ Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting ### Install Dependencies If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: + ```bash yarn config set workspaces-experimental true ``` Then install dependencies + ```bash yarn install ``` diff --git a/packages/monorepo-scripts/package.json b/packages/monorepo-scripts/package.json index 65248323e..06444e738 100644 --- a/packages/monorepo-scripts/package.json +++ b/packages/monorepo-scripts/package.json @@ -1,34 +1,34 @@ { - "name": "@0xproject/monorepo-scripts", - "version": "0.1.2", - "private": true, - "description": "Helper scripts for the monorepo", - "scripts": { - "deps_versions": "node ./lib/deps_versions.js", - "lint": "tslint --project . 'src/**/*.ts'", - "clean": "shx rm -rf lib", - "build": "tsc" - }, - "repository": { - "type": "git", - "url": "https://github.com/0xProject/0x.js.git" - }, - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/0xProject/0x.js/issues" - }, - "homepage": "https://github.com/0xProject/0x.js/packages/monorepo-scripts/README.md", - "devDependencies": { - "@0xproject/tslint-config": "^0.4.0", - "@types/glob": "^5.0.33", - "@types/node": "^8.0.53", - "shx": "^0.2.2", - "tslint": "5.8.0", - "typescript": "~2.6.1" - }, - "dependencies": { - "chalk": "^2.3.0", - "glob": "^7.1.2", - "lodash": "^4.17.4" - } + "name": "@0xproject/monorepo-scripts", + "version": "0.1.2", + "private": true, + "description": "Helper scripts for the monorepo", + "scripts": { + "deps_versions": "node ./lib/deps_versions.js", + "lint": "tslint --project . 'src/**/*.ts'", + "clean": "shx rm -rf lib", + "build": "tsc" + }, + "repository": { + "type": "git", + "url": "https://github.com/0xProject/0x.js.git" + }, + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/0xProject/0x.js/issues" + }, + "homepage": "https://github.com/0xProject/0x.js/packages/monorepo-scripts/README.md", + "devDependencies": { + "@0xproject/tslint-config": "^0.4.0", + "@types/glob": "^5.0.33", + "@types/node": "^8.0.53", + "shx": "^0.2.2", + "tslint": "5.8.0", + "typescript": "~2.6.1" + }, + "dependencies": { + "chalk": "^2.3.0", + "glob": "^7.1.2", + "lodash": "^4.17.4" + } } diff --git a/packages/monorepo-scripts/tsconfig.json b/packages/monorepo-scripts/tsconfig.json index a2d90e5dc..b915df2a8 100644 --- a/packages/monorepo-scripts/tsconfig.json +++ b/packages/monorepo-scripts/tsconfig.json @@ -1,13 +1,11 @@ { - "compilerOptions": { - "module": "commonjs", - "target": "es5", - "lib": ["es2015", "dom"], - "outDir": "lib", - "noImplicitAny": true, - "strictNullChecks": true - }, - "include": [ - "./src/**/*" - ] + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": ["es2015", "dom"], + "outDir": "lib", + "noImplicitAny": true, + "strictNullChecks": true + }, + "include": ["./src/**/*"] } diff --git a/packages/monorepo-scripts/tslint.json b/packages/monorepo-scripts/tslint.json index a07795151..ffaefe83a 100644 --- a/packages/monorepo-scripts/tslint.json +++ b/packages/monorepo-scripts/tslint.json @@ -1,5 +1,3 @@ { - "extends": [ - "@0xproject/tslint-config" - ] + "extends": ["@0xproject/tslint-config"] } diff --git a/packages/subproviders/CHANGELOG.md b/packages/subproviders/CHANGELOG.md index 9dd87bc5e..789df8849 100644 --- a/packages/subproviders/CHANGELOG.md +++ b/packages/subproviders/CHANGELOG.md @@ -1,9 +1,9 @@ # CHANGELOG -v0.3.0 - _December 28, 2017_ ------------------------- +## v0.3.0 - _December 28, 2017_ + * Allow LedgerSubprovider to handle `eth_sign` in addition to `personal_sign` RPC requests -v0.2.0 - _December 20, 2017_ ------------------------- +## v0.2.0 - _December 20, 2017_ + * Improve the performance of address fetching (#271) diff --git a/packages/subproviders/README.md b/packages/subproviders/README.md index 9f01b4453..d7b80f7ee 100644 --- a/packages/subproviders/README.md +++ b/packages/subproviders/README.md @@ -1,5 +1,4 @@ -@0xproject/subproviders --------- +## @0xproject/subproviders A few useful web3 subproviders including a LedgerSubprovider useful for adding Ledger Nano S support. @@ -50,6 +49,7 @@ Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting ### Install Dependencies If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: + ```bash yarn config set workspaces-experimental true ``` @@ -88,10 +88,10 @@ yarn run test:unit In order to run the integration tests, make sure you have a Ledger Nano S available. -- Plug it into your computer -- Unlock the device -- Open the on-device Ethereum app -- Make sure "browser support" is disabled +* Plug it into your computer +* Unlock the device +* Open the on-device Ethereum app +* Make sure "browser support" is disabled Then run: diff --git a/packages/subproviders/package.json b/packages/subproviders/package.json index 9f6ebfc27..fba8b4c5b 100644 --- a/packages/subproviders/package.json +++ b/packages/subproviders/package.json @@ -1,55 +1,55 @@ { - "name": "@0xproject/subproviders", - "version": "0.2.0", - "main": "lib/src/index.js", - "types": "lib/src/index.d.ts", - "license": "Apache-2.0", - "scripts": { - "clean": "shx rm -rf lib", - "build": "tsc", - "lint": "tslint --project . 'src/**/*.ts' 'test/**/*.ts'", - "run_mocha_unit": "mocha lib/test/unit/**/*_test.js --timeout 10000 --bail --exit", - "run_mocha_integration": "mocha lib/test/integration/**/*_test.js --timeout 10000 --bail --exit", - "test": "npm run test:unit", - "test:circleci": "npm run test:unit", - "test:all": "run-s test:unit test:integration", - "test:unit": "run-s clean build run_mocha_unit", - "test:integration": "run-s clean build run_mocha_integration" - }, - "dependencies": { - "@0xproject/assert": "^0.0.9", - "@0xproject/utils": "^0.1.2", - "bn.js": "^4.11.8", - "es6-promisify": "^5.0.0", - "ethereumjs-tx": "^1.3.3", - "ethereumjs-util": "^5.1.1", - "hdkey": "^0.7.1", - "ledgerco": "0xProject/ledger-node-js-api", - "lodash": "^4.17.4", - "semaphore-async-await": "^1.5.1", - "web3": "^0.20.0", - "web3-provider-engine": "^13.0.1" - }, - "devDependencies": { - "@0xproject/tslint-config": "^0.4.0", - "@0xproject/utils": "^0.1.2", - "@types/lodash": "^4.14.86", - "@types/mocha": "^2.2.42", - "@types/node": "^8.0.53", - "awesome-typescript-loader": "^3.1.3", - "chai": "^4.0.1", - "chai-as-promised": "^7.1.0", - "chai-as-promised-typescript-typings": "^0.0.3", - "chai-typescript-typings": "^0.0.1", - "dirty-chai": "^2.0.1", - "mocha": "^4.0.1", - "npm-run-all": "^4.1.2", - "shx": "^0.2.2", - "tslint": "5.8.0", - "types-bn": "^0.0.1", - "types-ethereumjs-util": "0xproject/types-ethereumjs-util", - "typescript": "~2.6.1", - "web3-typescript-typings": "^0.7.2", - "webpack": "^3.1.0" - } + "name": "@0xproject/subproviders", + "version": "0.2.0", + "main": "lib/src/index.js", + "types": "lib/src/index.d.ts", + "license": "Apache-2.0", + "scripts": { + "clean": "shx rm -rf lib", + "build": "tsc", + "lint": "tslint --project . 'src/**/*.ts' 'test/**/*.ts'", + "run_mocha_unit": "mocha lib/test/unit/**/*_test.js --timeout 10000 --bail --exit", + "run_mocha_integration": "mocha lib/test/integration/**/*_test.js --timeout 10000 --bail --exit", + "test": "npm run test:unit", + "test:circleci": "npm run test:unit", + "test:all": "run-s test:unit test:integration", + "test:unit": "run-s clean build run_mocha_unit", + "test:integration": "run-s clean build run_mocha_integration" + }, + "dependencies": { + "@0xproject/assert": "^0.0.9", + "@0xproject/utils": "^0.1.2", + "bn.js": "^4.11.8", + "es6-promisify": "^5.0.0", + "ethereumjs-tx": "^1.3.3", + "ethereumjs-util": "^5.1.1", + "hdkey": "^0.7.1", + "ledgerco": "0xProject/ledger-node-js-api", + "lodash": "^4.17.4", + "semaphore-async-await": "^1.5.1", + "web3": "^0.20.0", + "web3-provider-engine": "^13.0.1" + }, + "devDependencies": { + "@0xproject/tslint-config": "^0.4.0", + "@0xproject/utils": "^0.1.2", + "@types/lodash": "^4.14.86", + "@types/mocha": "^2.2.42", + "@types/node": "^8.0.53", + "awesome-typescript-loader": "^3.1.3", + "chai": "^4.0.1", + "chai-as-promised": "^7.1.0", + "chai-as-promised-typescript-typings": "^0.0.3", + "chai-typescript-typings": "^0.0.1", + "dirty-chai": "^2.0.1", + "mocha": "^4.0.1", + "npm-run-all": "^4.1.2", + "shx": "^0.2.2", + "tslint": "5.8.0", + "types-bn": "^0.0.1", + "types-ethereumjs-util": "0xproject/types-ethereumjs-util", + "typescript": "~2.6.1", + "web3-typescript-typings": "^0.7.2", + "webpack": "^3.1.0" + } } diff --git a/packages/subproviders/tsconfig.json b/packages/subproviders/tsconfig.json index 24adf4637..63fb7d7d1 100644 --- a/packages/subproviders/tsconfig.json +++ b/packages/subproviders/tsconfig.json @@ -1,22 +1,22 @@ { - "compilerOptions": { - "module": "commonjs", - "target": "es5", - "lib": [ "es2015", "dom" ], - "outDir": "lib", - "sourceMap": true, - "declaration": true, - "noImplicitAny": true, - "experimentalDecorators": true, - "strictNullChecks": true - }, - "include": [ - "./src/**/*", - "./test/**/*", - "../../node_modules/web3-typescript-typings/index.d.ts", - "../../node_modules/chai-typescript-typings/index.d.ts", - "../../node_modules/types-bn/index.d.ts", - "../../node_modules/types-ethereumjs-util/index.d.ts", - "../../node_modules/chai-as-promised-typescript-typings/index.d.ts" - ] + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": ["es2015", "dom"], + "outDir": "lib", + "sourceMap": true, + "declaration": true, + "noImplicitAny": true, + "experimentalDecorators": true, + "strictNullChecks": true + }, + "include": [ + "./src/**/*", + "./test/**/*", + "../../node_modules/web3-typescript-typings/index.d.ts", + "../../node_modules/chai-typescript-typings/index.d.ts", + "../../node_modules/types-bn/index.d.ts", + "../../node_modules/types-ethereumjs-util/index.d.ts", + "../../node_modules/chai-as-promised-typescript-typings/index.d.ts" + ] } diff --git a/packages/subproviders/tslint.json b/packages/subproviders/tslint.json index a07795151..ffaefe83a 100644 --- a/packages/subproviders/tslint.json +++ b/packages/subproviders/tslint.json @@ -1,5 +1,3 @@ { - "extends": [ - "@0xproject/tslint-config" - ] + "extends": ["@0xproject/tslint-config"] } diff --git a/packages/tslint-config/CHANGELOG.md b/packages/tslint-config/CHANGELOG.md index daea1975c..1d56bca5b 100644 --- a/packages/tslint-config/CHANGELOG.md +++ b/packages/tslint-config/CHANGELOG.md @@ -1,15 +1,15 @@ # CHANGELOG -v0.4.0 - _December 28, 2017_ ------------------------- +## v0.4.0 - _December 28, 2017_ + * Added custom 'underscore-privates' rule, requiring underscores to be prepended to private variable names * Because our tools can be used in both a TS and JS environment, we want to make the private methods of any public facing interface show up at the bottom of auto-complete lists. Additionally, we wanted to remain consistent with respect to our usage of underscores in order to enforce this rule with a linter rule, rather then manual code reviews. -v0.3.0 - _December 20, 2017_ ------------------------- +## v0.3.0 - _December 20, 2017_ + * Added rules for unused imports, variables and Async suffixes (#265) -v0.1.0 - _Nov. 14, 2017_ ------------------------- +## v0.1.0 - _Nov. 14, 2017_ + * Re-published TsLintConfig previously published under NPM package `tslint-config-0xproject` * Updated to TSLint v5.8.0, requiring several rule additions to keep our conventions aligned. diff --git a/packages/tslint-config/README.md b/packages/tslint-config/README.md index b27d05df0..8a6fa8a2f 100644 --- a/packages/tslint-config/README.md +++ b/packages/tslint-config/README.md @@ -1,5 +1,4 @@ -@0xproject/tslint-config ------- +## @0xproject/tslint-config TSLint configuration and custom linter rules used by 0xProject. @@ -12,11 +11,10 @@ yarn add --dev @0xproject/tslint-config ## Usage Add the following to your `tslint.json` file + ```json { - "extends": [ - "@0xproject/tslint-config" - ] + "extends": ["@0xproject/tslint-config"] } ``` @@ -29,11 +27,13 @@ Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting ### Install Dependencies If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: + ```bash yarn config set workspaces-experimental true ``` Then install dependencies + ```bash yarn install ``` diff --git a/packages/tslint-config/package.json b/packages/tslint-config/package.json index 0b99332e7..17b9ebc1e 100644 --- a/packages/tslint-config/package.json +++ b/packages/tslint-config/package.json @@ -1,47 +1,37 @@ { - "name": "@0xproject/tslint-config", - "version": "0.4.0", - "description": "Lint rules related to 0xProject for TSLint", - "main": "tslint.json", - "scripts": { - "build": "tsc", - "clean": "shx rm -rf lib", - "lint": "tslint --project . 'rules/**/*.ts'" - }, - "files": [ - "tslint.js", - "README.md", - "LICENSE" - ], - "repository": { - "type": "git", - "url": "git://github.com/0xProject/0x.js.git" - }, - "keywords": [ - "tslint", - "config", - "0xProject", - "typescript", - "ts" - ], - "author": { - "name": "Fabio Berger", - "email": "fabio@0xproject.com" - }, - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/0xProject/0x.js/issues" - }, - "homepage": "https://github.com/0xProject/0x.js/packages/tslint-config/README.md", - "devDependencies": { - "@types/lodash": "^4.14.86", - "shx": "^0.2.2", - "tslint": "5.8.0", - "tslint-eslint-rules": "^4.1.1", - "typescript": "~2.6.1" - }, - "dependencies": { - "lodash": "^4.17.4", - "tslint-react": "^3.2.0" - } + "name": "@0xproject/tslint-config", + "version": "0.4.0", + "description": "Lint rules related to 0xProject for TSLint", + "main": "tslint.json", + "scripts": { + "build": "tsc", + "clean": "shx rm -rf lib", + "lint": "tslint --project . 'rules/**/*.ts'" + }, + "files": ["tslint.js", "README.md", "LICENSE"], + "repository": { + "type": "git", + "url": "git://github.com/0xProject/0x.js.git" + }, + "keywords": ["tslint", "config", "0xProject", "typescript", "ts"], + "author": { + "name": "Fabio Berger", + "email": "fabio@0xproject.com" + }, + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/0xProject/0x.js/issues" + }, + "homepage": "https://github.com/0xProject/0x.js/packages/tslint-config/README.md", + "devDependencies": { + "@types/lodash": "^4.14.86", + "shx": "^0.2.2", + "tslint": "5.8.0", + "tslint-eslint-rules": "^4.1.1", + "typescript": "~2.6.1" + }, + "dependencies": { + "lodash": "^4.17.4", + "tslint-react": "^3.2.0" + } } diff --git a/packages/tslint-config/tsconfig.json b/packages/tslint-config/tsconfig.json index 7661a9d07..77ddf892f 100644 --- a/packages/tslint-config/tsconfig.json +++ b/packages/tslint-config/tsconfig.json @@ -1,15 +1,13 @@ { - "compilerOptions": { - "module": "commonjs", - "target": "es5", - "lib": [ "es2017", "dom"], - "outDir": "lib", - "sourceMap": true, - "declaration": true, - "noImplicitAny": true, - "strictNullChecks": true - }, - "include": [ - "./rules/**/*" - ] + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": ["es2017", "dom"], + "outDir": "lib", + "sourceMap": true, + "declaration": true, + "noImplicitAny": true, + "strictNullChecks": true + }, + "include": ["./rules/**/*"] } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index b4cce6be0..899482c4c 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -1,4 +1,3 @@ # CHANGELOG -vx.x.x ------------------------- +## vx.x.x diff --git a/packages/types/README.md b/packages/types/README.md index c549a736f..d63970150 100644 --- a/packages/types/README.md +++ b/packages/types/README.md @@ -1,5 +1,4 @@ -@0xproject/types ------- +## @0xproject/types Typescript types shared across 0x projects and packages @@ -12,14 +11,9 @@ yarn add -D @0xproject/types ## Usage ```javascript -import { - TransactionReceipt, - TxData, - TxDataPayable, -} from '@0xproject/types'; +import { TransactionReceipt, TxData, TxDataPayable } from '@0xproject/types'; ``` - ## Contributing We strongly recommend that the community help us make improvements and determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository. @@ -29,11 +23,13 @@ Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting ### Install Dependencies If you don't have yarn workspaces e`nabled (Yarn < v1.0) - enable them: + ```bash yarn config set workspaces-experimental true ``` Then install dependencies + ```bash yarn install ``` diff --git a/packages/types/package.json b/packages/types/package.json index a16217169..67200203c 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,31 +1,31 @@ { - "name": "@0xproject/types", - "version": "0.1.2", - "description": "0x types", - "main": "lib/index.js", - "types": "lib/index.d.ts", - "scripts": { - "build": "tsc", - "clean": "shx rm -rf lib", - "lint": "tslint --project . 'src/**/*.ts'" - }, - "license": "Apache-2.0", - "repository": { - "type": "git", - "url": "https://github.com/0xProject/0x.js.git" - }, - "bugs": { - "url": "https://github.com/0xProject/0x.js/issues" - }, - "homepage": "https://github.com/0xProject/0x.js/packages/types/README.md", - "devDependencies": { - "@0xproject/tslint-config": "^0.4.0", - "shx": "^0.2.2", - "tslint": "5.8.0", - "typescript": "~2.6.1" - }, - "dependencies": { - "@0xproject/utils": "^0.1.2", - "web3": "^0.20.0" - } + "name": "@0xproject/types", + "version": "0.1.2", + "description": "0x types", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "scripts": { + "build": "tsc", + "clean": "shx rm -rf lib", + "lint": "tslint --project . 'src/**/*.ts'" + }, + "license": "Apache-2.0", + "repository": { + "type": "git", + "url": "https://github.com/0xProject/0x.js.git" + }, + "bugs": { + "url": "https://github.com/0xProject/0x.js/issues" + }, + "homepage": "https://github.com/0xProject/0x.js/packages/types/README.md", + "devDependencies": { + "@0xproject/tslint-config": "^0.4.0", + "shx": "^0.2.2", + "tslint": "5.8.0", + "typescript": "~2.6.1" + }, + "dependencies": { + "@0xproject/utils": "^0.1.2", + "web3": "^0.20.0" + } } diff --git a/packages/types/tsconfig.json b/packages/types/tsconfig.json index de186cfc4..0aa8c3dde 100644 --- a/packages/types/tsconfig.json +++ b/packages/types/tsconfig.json @@ -1,16 +1,13 @@ { - "compilerOptions": { - "module": "commonjs", - "target": "es5", - "lib": [ "es2017", "dom"], - "outDir": "lib", - "sourceMap": true, - "declaration": true, - "noImplicitAny": true, - "strictNullChecks": true - }, - "include": [ - "./src/**/*", - "../../node_modules/web3-typescript-typings/index.d.ts" - ] + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": ["es2017", "dom"], + "outDir": "lib", + "sourceMap": true, + "declaration": true, + "noImplicitAny": true, + "strictNullChecks": true + }, + "include": ["./src/**/*", "../../node_modules/web3-typescript-typings/index.d.ts"] } diff --git a/packages/types/tslint.json b/packages/types/tslint.json index a07795151..ffaefe83a 100644 --- a/packages/types/tslint.json +++ b/packages/types/tslint.json @@ -1,5 +1,3 @@ { - "extends": [ - "@0xproject/tslint-config" - ] + "extends": ["@0xproject/tslint-config"] } diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index b4cce6be0..899482c4c 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -1,4 +1,3 @@ # CHANGELOG -vx.x.x ------------------------- +## vx.x.x diff --git a/packages/utils/README.md b/packages/utils/README.md index f56c6c4e7..d6cacfa11 100644 --- a/packages/utils/README.md +++ b/packages/utils/README.md @@ -1,5 +1,4 @@ -@0xproject/utils ------- +## @0xproject/utils Utils to be shared across 0x projects and packages @@ -12,13 +11,7 @@ yarn add @0xproject/utils ## Usage ```javascript -import { - addressUtils, - bigNumberConfigs, - classUtils, - intervalUtils, - promisify, -} from '@0xproject/utils'; +import { addressUtils, bigNumberConfigs, classUtils, intervalUtils, promisify } from '@0xproject/utils'; ``` ## Contributing @@ -30,11 +23,13 @@ Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting ### Install Dependencies If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: + ```bash yarn config set workspaces-experimental true ``` Then install dependencies + ```bash yarn install ``` diff --git a/packages/utils/package.json b/packages/utils/package.json index 815006170..744cb162c 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,34 +1,34 @@ { - "name": "@0xproject/utils", - "version": "0.1.2", - "description": "0x TS utils", - "main": "lib/index.js", - "types": "lib/index.d.ts", - "scripts": { - "build": "tsc", - "clean": "shx rm -rf lib", - "lint": "tslint --project . 'src/**/*.ts'" - }, - "license": "Apache-2.0", - "repository": { - "type": "git", - "url": "https://github.com/0xProject/0x.js.git" - }, - "bugs": { - "url": "https://github.com/0xProject/0x.js/issues" - }, - "homepage": "https://github.com/0xProject/0x.js/packages/utils/README.md", - "devDependencies": { - "@0xproject/tslint-config": "^0.4.0", - "@types/lodash": "^4.14.86", - "npm-run-all": "^4.1.2", - "shx": "^0.2.2", - "tslint": "5.8.0", - "typescript": "~2.6.1" - }, - "dependencies": { - "bignumber.js": "~4.1.0", - "js-sha3": "^0.7.0", - "lodash": "^4.17.4" - } + "name": "@0xproject/utils", + "version": "0.1.2", + "description": "0x TS utils", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "scripts": { + "build": "tsc", + "clean": "shx rm -rf lib", + "lint": "tslint --project . 'src/**/*.ts'" + }, + "license": "Apache-2.0", + "repository": { + "type": "git", + "url": "https://github.com/0xProject/0x.js.git" + }, + "bugs": { + "url": "https://github.com/0xProject/0x.js/issues" + }, + "homepage": "https://github.com/0xProject/0x.js/packages/utils/README.md", + "devDependencies": { + "@0xproject/tslint-config": "^0.4.0", + "@types/lodash": "^4.14.86", + "npm-run-all": "^4.1.2", + "shx": "^0.2.2", + "tslint": "5.8.0", + "typescript": "~2.6.1" + }, + "dependencies": { + "bignumber.js": "~4.1.0", + "js-sha3": "^0.7.0", + "lodash": "^4.17.4" + } } diff --git a/packages/utils/tsconfig.json b/packages/utils/tsconfig.json index 111df6d3b..10c38a15b 100644 --- a/packages/utils/tsconfig.json +++ b/packages/utils/tsconfig.json @@ -1,15 +1,13 @@ { - "compilerOptions": { - "module": "commonjs", - "target": "es5", - "lib": [ "es2017", "dom"], - "outDir": "lib", - "sourceMap": true, - "declaration": true, - "noImplicitAny": true, - "strictNullChecks": true - }, - "include": [ - "./src/**/*" - ] + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": ["es2017", "dom"], + "outDir": "lib", + "sourceMap": true, + "declaration": true, + "noImplicitAny": true, + "strictNullChecks": true + }, + "include": ["./src/**/*"] } diff --git a/packages/utils/tslint.json b/packages/utils/tslint.json index a07795151..ffaefe83a 100644 --- a/packages/utils/tslint.json +++ b/packages/utils/tslint.json @@ -1,5 +1,3 @@ { - "extends": [ - "@0xproject/tslint-config" - ] + "extends": ["@0xproject/tslint-config"] } diff --git a/packages/web3-wrapper/CHANGELOG.md b/packages/web3-wrapper/CHANGELOG.md index b4cce6be0..899482c4c 100644 --- a/packages/web3-wrapper/CHANGELOG.md +++ b/packages/web3-wrapper/CHANGELOG.md @@ -1,4 +1,3 @@ # CHANGELOG -vx.x.x ------------------------- +## vx.x.x diff --git a/packages/web3-wrapper/README.md b/packages/web3-wrapper/README.md index c6e2163a3..5b22aefd4 100644 --- a/packages/web3-wrapper/README.md +++ b/packages/web3-wrapper/README.md @@ -1,5 +1,4 @@ -@0xproject/web3-wrapper ------- +## @0xproject/web3-wrapper Wrapped version of web3 with a nicer interface that is used across 0x projects and packages @@ -28,11 +27,13 @@ Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting ### Install Dependencies If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: + ```bash yarn config set workspaces-experimental true ``` Then install dependencies + ```bash yarn install ``` diff --git a/packages/web3-wrapper/package.json b/packages/web3-wrapper/package.json index 053712b12..e7269d277 100644 --- a/packages/web3-wrapper/package.json +++ b/packages/web3-wrapper/package.json @@ -1,36 +1,36 @@ { - "name": "@0xproject/web3-wrapper", - "version": "0.1.2", - "description": "Wraps around web3 and gives a nicer interface", - "main": "lib/index.js", - "types": "lib/index.d.ts", - "scripts": { - "build": "tsc", - "clean": "shx rm -rf lib", - "lint": "tslint --project . 'src/**/*.ts'" - }, - "license": "Apache-2.0", - "repository": { - "type": "git", - "url": "https://github.com/0xProject/0x.js.git" - }, - "bugs": { - "url": "https://github.com/0xProject/0x.js/issues" - }, - "homepage": "https://github.com/0xProject/0x.js/packages/web3-wrapper/README.md", - "devDependencies": { - "@0xproject/tslint-config": "^0.4.0", - "@0xproject/types": "^0.1.2", - "@types/lodash": "^4.14.86", - "npm-run-all": "^4.1.2", - "shx": "^0.2.2", - "tslint": "5.8.0", - "typescript": "~2.6.1", - "web3-typescript-typings": "^0.7.2" - }, - "dependencies": { - "@0xproject/utils": "^0.1.2", - "lodash": "^4.17.4", - "web3": "^0.20.0" - } + "name": "@0xproject/web3-wrapper", + "version": "0.1.2", + "description": "Wraps around web3 and gives a nicer interface", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "scripts": { + "build": "tsc", + "clean": "shx rm -rf lib", + "lint": "tslint --project . 'src/**/*.ts'" + }, + "license": "Apache-2.0", + "repository": { + "type": "git", + "url": "https://github.com/0xProject/0x.js.git" + }, + "bugs": { + "url": "https://github.com/0xProject/0x.js/issues" + }, + "homepage": "https://github.com/0xProject/0x.js/packages/web3-wrapper/README.md", + "devDependencies": { + "@0xproject/tslint-config": "^0.4.0", + "@0xproject/types": "^0.1.2", + "@types/lodash": "^4.14.86", + "npm-run-all": "^4.1.2", + "shx": "^0.2.2", + "tslint": "5.8.0", + "typescript": "~2.6.1", + "web3-typescript-typings": "^0.7.2" + }, + "dependencies": { + "@0xproject/utils": "^0.1.2", + "lodash": "^4.17.4", + "web3": "^0.20.0" + } } diff --git a/packages/web3-wrapper/tsconfig.json b/packages/web3-wrapper/tsconfig.json index de186cfc4..0aa8c3dde 100644 --- a/packages/web3-wrapper/tsconfig.json +++ b/packages/web3-wrapper/tsconfig.json @@ -1,16 +1,13 @@ { - "compilerOptions": { - "module": "commonjs", - "target": "es5", - "lib": [ "es2017", "dom"], - "outDir": "lib", - "sourceMap": true, - "declaration": true, - "noImplicitAny": true, - "strictNullChecks": true - }, - "include": [ - "./src/**/*", - "../../node_modules/web3-typescript-typings/index.d.ts" - ] + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": ["es2017", "dom"], + "outDir": "lib", + "sourceMap": true, + "declaration": true, + "noImplicitAny": true, + "strictNullChecks": true + }, + "include": ["./src/**/*", "../../node_modules/web3-typescript-typings/index.d.ts"] } diff --git a/packages/web3-wrapper/tslint.json b/packages/web3-wrapper/tslint.json index a07795151..ffaefe83a 100644 --- a/packages/web3-wrapper/tslint.json +++ b/packages/web3-wrapper/tslint.json @@ -1,5 +1,3 @@ { - "extends": [ - "@0xproject/tslint-config" - ] + "extends": ["@0xproject/tslint-config"] } diff --git a/packages/website/README.md b/packages/website/README.md index c050c6387..7d3187781 100644 --- a/packages/website/README.md +++ b/packages/website/README.md @@ -1,5 +1,4 @@ -Website & 0x Portal DApp ------ +## Website & 0x Portal DApp This repository contains our website and [0x Portal DApp][portal-url] (over-the-counter exchange), facilitating trustless over-the-counter trading of Ethereum-based tokens using 0x protocol. @@ -59,11 +58,11 @@ yarn lint ##### Toolkit -- [Material Design Icon Font](http://zavoloklom.github.io/material-design-iconic-font/icons.html#directional) -- [BassCSS toolkit](http://basscss.com/) -- [Material-UI component library](http://www.material-ui.com/#/) +* [Material Design Icon Font](http://zavoloklom.github.io/material-design-iconic-font/icons.html#directional) +* [BassCSS toolkit](http://basscss.com/) +* [Material-UI component library](http://www.material-ui.com/#/) ##### Recommended Atom packages: -- [atom-typescript](https://atom.io/packages/atom-typescript) -- [linter-tslint](https://atom.io/packages/linter-tslint) +* [atom-typescript](https://atom.io/packages/atom-typescript) +* [linter-tslint](https://atom.io/packages/linter-tslint) diff --git a/packages/website/contracts/Mintable.json b/packages/website/contracts/Mintable.json index 52dc7507f..dc46dc829 100644 --- a/packages/website/contracts/Mintable.json +++ b/packages/website/contracts/Mintable.json @@ -1,189 +1,190 @@ { - "contract_name": "Mintable", - "abi": [ - { - "constant": false, - "inputs": [ - { - "name": "_spender", - "type": "address" + "contract_name": "Mintable", + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" }, { - "name": "_value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_from", - "type": "address" + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" }, { - "name": "_to", - "type": "address" + "constant": false, + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" }, { - "name": "_value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_value", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" }, { - "name": "_spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_from", - "type": "address" + "constant": false, + "inputs": [ + { + "name": "_value", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "payable": false, + "type": "function" }, { - "indexed": true, - "name": "_to", - "type": "address" + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "type": "function" }, { - "indexed": false, - "name": "_value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_owner", - "type": "address" + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + }, + { + "name": "_spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "type": "function" }, { - "indexed": true, - "name": "_spender", - "type": "address" + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "name": "_value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" }, { - "indexed": false, - "name": "_value", - "type": "uint256" + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "name": "_spender", + "type": "address" + }, + { + "indexed": false, + "name": "_value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" } - ], - "name": "Approval", - "type": "event" - } - ], - "unlinked_binary": "0x6060604052341561000c57fe5b5b6105018061001c6000396000f300606060405236156100675763ffffffff60e060020a600035041663095ea7b3811461006957806318160ddd1461009c57806323b872dd146100be57806370a08231146100f7578063a0712d6814610125578063a9059cbb1461013a578063dd62ed3e1461016d575bfe5b341561007157fe5b610088600160a060020a03600435166024356101a1565b604080519115158252519081900360200190f35b34156100a457fe5b6100ac61020c565b60408051918252519081900360200190f35b34156100c657fe5b610088600160a060020a0360043581169060243516604435610212565b604080519115158252519081900360200190f35b34156100ff57fe5b6100ac600160a060020a0360043516610335565b60408051918252519081900360200190f35b341561012d57fe5b610138600435610354565b005b341561014257fe5b610088600160a060020a03600435166024356103bc565b604080519115158252519081900360200190f35b341561017557fe5b6100ac600160a060020a036004358116906024351661046e565b60408051918252519081900360200190f35b600160a060020a03338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60025481565b600160a060020a03808416600081815260016020908152604080832033909516835293815283822054928252819052918220548390108015906102555750828110155b801561027b5750600160a060020a03841660009081526020819052604090205483810110155b1561032757600160a060020a03808516600090815260208190526040808220805487019055918716815220805484900390556000198110156102e557600160a060020a03808616600090815260016020908152604080832033909416835292905220805484900390555b83600160a060020a031685600160a060020a03166000805160206104b6833981519152856040518082815260200191505060405180910390a36001915061032c565b600091505b5b509392505050565b600160a060020a0381166000908152602081905260409020545b919050565b68056bc75e2d6310000081111561036b5760006000fd5b600160a060020a03331660009081526020819052604090205461038f90829061049b565b600160a060020a0333166000908152602081905260409020556002546103b5908261049b565b6002555b50565b600160a060020a0333166000908152602081905260408120548290108015906103ff5750600160a060020a03831660009081526020819052604090205482810110155b1561045f57600160a060020a0333811660008181526020818152604080832080548890039055938716808352918490208054870190558351868152935191936000805160206104b6833981519152929081900390910190a3506001610206565b506000610206565b5b92915050565b600160a060020a038083166000908152600160209081526040808320938516835292905220545b92915050565b6000828201838110156104aa57fe5b8091505b50929150505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a72305820998c8326b9629e063eb4867166e72c68a8c2e3ebca6a9d35ebc78c041c7aa47b0029", - "networks": {}, - "schema_version": "0.0.5", - "updated_at": 1503413048892 -}
\ No newline at end of file + ], + "unlinked_binary": + "0x6060604052341561000c57fe5b5b6105018061001c6000396000f300606060405236156100675763ffffffff60e060020a600035041663095ea7b3811461006957806318160ddd1461009c57806323b872dd146100be57806370a08231146100f7578063a0712d6814610125578063a9059cbb1461013a578063dd62ed3e1461016d575bfe5b341561007157fe5b610088600160a060020a03600435166024356101a1565b604080519115158252519081900360200190f35b34156100a457fe5b6100ac61020c565b60408051918252519081900360200190f35b34156100c657fe5b610088600160a060020a0360043581169060243516604435610212565b604080519115158252519081900360200190f35b34156100ff57fe5b6100ac600160a060020a0360043516610335565b60408051918252519081900360200190f35b341561012d57fe5b610138600435610354565b005b341561014257fe5b610088600160a060020a03600435166024356103bc565b604080519115158252519081900360200190f35b341561017557fe5b6100ac600160a060020a036004358116906024351661046e565b60408051918252519081900360200190f35b600160a060020a03338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60025481565b600160a060020a03808416600081815260016020908152604080832033909516835293815283822054928252819052918220548390108015906102555750828110155b801561027b5750600160a060020a03841660009081526020819052604090205483810110155b1561032757600160a060020a03808516600090815260208190526040808220805487019055918716815220805484900390556000198110156102e557600160a060020a03808616600090815260016020908152604080832033909416835292905220805484900390555b83600160a060020a031685600160a060020a03166000805160206104b6833981519152856040518082815260200191505060405180910390a36001915061032c565b600091505b5b509392505050565b600160a060020a0381166000908152602081905260409020545b919050565b68056bc75e2d6310000081111561036b5760006000fd5b600160a060020a03331660009081526020819052604090205461038f90829061049b565b600160a060020a0333166000908152602081905260409020556002546103b5908261049b565b6002555b50565b600160a060020a0333166000908152602081905260408120548290108015906103ff5750600160a060020a03831660009081526020819052604090205482810110155b1561045f57600160a060020a0333811660008181526020818152604080832080548890039055938716808352918490208054870190558351868152935191936000805160206104b6833981519152929081900390910190a3506001610206565b506000610206565b5b92915050565b600160a060020a038083166000908152600160209081526040808320938516835292905220545b92915050565b6000828201838110156104aa57fe5b8091505b50929150505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a72305820998c8326b9629e063eb4867166e72c68a8c2e3ebca6a9d35ebc78c041c7aa47b0029", + "networks": {}, + "schema_version": "0.0.5", + "updated_at": 1503413048892 +} diff --git a/packages/website/md/docs/0xjs/async.md b/packages/website/md/docs/0xjs/async.md index 63924c76c..8abaef331 100644 --- a/packages/website/md/docs/0xjs/async.md +++ b/packages/website/md/docs/0xjs/async.md @@ -1,6 +1,7 @@ 0x.js is a promise-based library. This means that whenever an asynchronous call is required, the library method will return a native Javascript promise. You can therefore choose between using `promise` or `async/await` syntax when calling our async methods. -*Async/await syntax (recommended):* +_Async/await syntax (recommended):_ + ```javascript try { var availableAddresses = await zeroEx.getAvailableAddressesAsync(); @@ -9,9 +10,11 @@ try { } ``` -*Promise syntax:* +_Promise syntax:_ + ```javascript -zeroEx.getAvailableAddressesAsync() +zeroEx + .getAvailableAddressesAsync() .then(function(availableAddresses) { console.log(availableAddresses); }) diff --git a/packages/website/md/docs/0xjs/installation.md b/packages/website/md/docs/0xjs/installation.md index 457b27a04..5f5c9137e 100644 --- a/packages/website/md/docs/0xjs/installation.md +++ b/packages/website/md/docs/0xjs/installation.md @@ -1,6 +1,6 @@ 0x.js ships as both a [UMD](https://github.com/umdjs/umd) module and a [CommonJS](https://en.wikipedia.org/wiki/CommonJS) package. -#### CommonJS *(recommended)*: +#### CommonJS _(recommended)_: **Install** @@ -11,7 +11,7 @@ npm install 0x.js --save **Import** ```javascript -import {ZeroEx} from '0x.js'; +import { ZeroEx } from '0x.js'; ``` #### UMD: diff --git a/packages/website/md/docs/connect/installation.md b/packages/website/md/docs/connect/installation.md index b14bc1b52..184fa6e0d 100644 --- a/packages/website/md/docs/connect/installation.md +++ b/packages/website/md/docs/connect/installation.md @@ -7,7 +7,7 @@ npm install @0xproject/connect --save **Import** ```javascript -import {HttpClient} from '@0xproject/connect'; +import { HttpClient } from '@0xproject/connect'; ``` ### Wiki diff --git a/packages/website/md/docs/smart_contracts/introduction.md b/packages/website/md/docs/smart_contracts/introduction.md index 406177f84..20396289b 100644 --- a/packages/website/md/docs/smart_contracts/introduction.md +++ b/packages/website/md/docs/smart_contracts/introduction.md @@ -2,7 +2,7 @@ Welcome to the [0x smart contracts](https://github.com/0xProject/contracts) docu ### Helpful wiki articles: -- [Overview of 0x protocol architecture](https://0xproject.com/wiki#Architecture) -- [0x smart contract interactions](https://0xproject.com/wiki#Contract-Interactions) -- [Deployed smart contract addresses](https://0xproject.com/wiki#Deployed-Addresses) -- [0x protocol message format](https://0xproject.com/wiki#Message-Format) +* [Overview of 0x protocol architecture](https://0xproject.com/wiki#Architecture) +* [0x smart contract interactions](https://0xproject.com/wiki#Contract-Interactions) +* [Deployed smart contract addresses](https://0xproject.com/wiki#Deployed-Addresses) +* [0x protocol message format](https://0xproject.com/wiki#Message-Format) diff --git a/packages/website/package.json b/packages/website/package.json index b4ff61011..89f8e14bc 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -1,106 +1,109 @@ { - "name": "@0xproject/website", - "version": "0.0.4", - "private": true, - "description": "Website and 0x portal dapp", - "scripts": { - "build": "NODE_ENV=production webpack; exit 0;", - "clean": "shx rm -f public/bundle*", - "lint": "tslint --project . 'ts/**/*.ts' 'ts/**/*.tsx'", - "dev": "webpack-dev-server --content-base public --https", - "update_contracts": "for i in ${npm_package_config_artifacts}; do copyfiles -u 4 ../contracts/build/contracts/$i.json ../website/contracts; done;", - "deploy_staging": "npm run build; aws s3 sync ./public/. s3://staging-0xproject --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers", - "deploy_live": "npm run build; aws s3 sync ./public/. s3://0xproject.com --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers" - }, - "config": { - "artifacts": "Mintable" - }, - "author": "Fabio Berger", - "license": "Apache-2.0", - "dependencies": { - "0x.js": "^0.29.0", - "@0xproject/subproviders": "^0.2.0", - "@0xproject/utils": "^0.1.2", - "accounting": "^0.4.1", - "basscss": "^8.0.3", - "blockies": "^0.0.2", - "compare-versions": "^3.0.1", - "dateformat": "^2.0.0", - "deep-equal": "^1.0.1", - "dharma-loan-frame": "^0.0.12", - "ethereumjs-tx": "^1.3.3", - "ethereumjs-util": "^5.1.1", - "find-versions": "^2.0.0", - "is-mobile": "^0.2.2", - "jsonschema": "^1.2.0", - "ledgerco": "0xProject/ledger-node-js-api", - "less": "^2.7.2", - "lodash": "^4.17.4", - "material-ui": "^0.17.1", - "moment": "^2.18.1", - "query-string": "^5.0.1", - "react": "15.6.1", - "react-copy-to-clipboard": "^4.2.3", - "react-document-title": "^2.0.3", - "react-dom": "15.6.1", - "react-highlight": "^0.10.0", - "react-html5video": "^2.1.0", - "react-inlinesvg": "^0.5.5", - "react-markdown": "^2.5.0", - "react-recaptcha": "^2.3.2", - "react-redux": "^5.0.3", - "react-router-dom": "^4.1.1", - "react-router-hash-link": "^1.1.0", - "react-scroll": "^1.5.2", - "react-tap-event-plugin": "^2.0.1", - "react-tooltip": "^3.2.7", - "react-waypoint": "^7.0.4", - "redux": "^3.6.0", - "scroll-to-element": "^2.0.0", - "semver-sort": "0.0.4", - "thenby": "^1.2.3", - "truffle-contract": "2.0.1", - "tslint-config-0xproject": "^0.0.2", - "web3": "^0.20.0", - "web3-provider-engine": "^13.0.1", - "whatwg-fetch": "^2.0.3", - "xml-js": "^1.3.2" - }, - "devDependencies": { - "@types/accounting": "^0.4.1", - "@types/dateformat": "^1.0.1", - "@types/deep-equal": "^1.0.0", - "@types/jsonschema": "^1.1.1", - "@types/lodash": "^4.14.86", - "@types/material-ui": "0.18.0", - "@types/moment": "^2.13.0", - "@types/node": "^8.0.53", - "@types/query-string": "^5.0.1", - "@types/react": "^15.0.15", - "@types/react-copy-to-clipboard": "^4.2.0", - "@types/react-dom": "^0.14.23", - "@types/react-redux": "^4.4.37", - "@types/react-router-dom": "^4.0.4", - "@types/react-scroll": "0.0.31", - "@types/react-tap-event-plugin": "0.0.30", - "@types/redux": "^3.6.0", - "awesome-typescript-loader": "^3.1.3", - "copy-webpack-plugin": "^4.0.1", - "copyfiles": "^1.2.0", - "css-loader": "0.23.x", - "exports-loader": "0.6.x", - "imports-loader": "0.6.x", - "json-loader": "^0.5.4", - "less-loader": "^2.2.3", - "raw-loader": "^0.5.1", - "shx": "^0.2.2", - "source-map-loader": "^0.1.6", - "style-loader": "0.13.x", - "tslint": "5.8.0", - "typescript": "~2.6.1", - "web3-typescript-typings": "^0.7.2", - "webpack": "^3.1.0", - "webpack-dev-middleware": "^1.10.0", - "webpack-dev-server": "^2.5.0" - } + "name": "@0xproject/website", + "version": "0.0.4", + "private": true, + "description": "Website and 0x portal dapp", + "scripts": { + "build": "NODE_ENV=production webpack; exit 0;", + "clean": "shx rm -f public/bundle*", + "lint": "tslint --project . 'ts/**/*.ts' 'ts/**/*.tsx'", + "dev": "webpack-dev-server --content-base public --https", + "update_contracts": + "for i in ${npm_package_config_artifacts}; do copyfiles -u 4 ../contracts/build/contracts/$i.json ../website/contracts; done;", + "deploy_staging": + "npm run build; aws s3 sync ./public/. s3://staging-0xproject --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers", + "deploy_live": + "npm run build; aws s3 sync ./public/. s3://0xproject.com --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers" + }, + "config": { + "artifacts": "Mintable" + }, + "author": "Fabio Berger", + "license": "Apache-2.0", + "dependencies": { + "0x.js": "^0.29.0", + "@0xproject/subproviders": "^0.2.0", + "@0xproject/utils": "^0.1.2", + "accounting": "^0.4.1", + "basscss": "^8.0.3", + "blockies": "^0.0.2", + "compare-versions": "^3.0.1", + "dateformat": "^2.0.0", + "deep-equal": "^1.0.1", + "dharma-loan-frame": "^0.0.12", + "ethereumjs-tx": "^1.3.3", + "ethereumjs-util": "^5.1.1", + "find-versions": "^2.0.0", + "is-mobile": "^0.2.2", + "jsonschema": "^1.2.0", + "ledgerco": "0xProject/ledger-node-js-api", + "less": "^2.7.2", + "lodash": "^4.17.4", + "material-ui": "^0.17.1", + "moment": "^2.18.1", + "query-string": "^5.0.1", + "react": "15.6.1", + "react-copy-to-clipboard": "^4.2.3", + "react-document-title": "^2.0.3", + "react-dom": "15.6.1", + "react-highlight": "^0.10.0", + "react-html5video": "^2.1.0", + "react-inlinesvg": "^0.5.5", + "react-markdown": "^2.5.0", + "react-recaptcha": "^2.3.2", + "react-redux": "^5.0.3", + "react-router-dom": "^4.1.1", + "react-router-hash-link": "^1.1.0", + "react-scroll": "^1.5.2", + "react-tap-event-plugin": "^2.0.1", + "react-tooltip": "^3.2.7", + "react-waypoint": "^7.0.4", + "redux": "^3.6.0", + "scroll-to-element": "^2.0.0", + "semver-sort": "0.0.4", + "thenby": "^1.2.3", + "truffle-contract": "2.0.1", + "tslint-config-0xproject": "^0.0.2", + "web3": "^0.20.0", + "web3-provider-engine": "^13.0.1", + "whatwg-fetch": "^2.0.3", + "xml-js": "^1.3.2" + }, + "devDependencies": { + "@types/accounting": "^0.4.1", + "@types/dateformat": "^1.0.1", + "@types/deep-equal": "^1.0.0", + "@types/jsonschema": "^1.1.1", + "@types/lodash": "^4.14.86", + "@types/material-ui": "0.18.0", + "@types/moment": "^2.13.0", + "@types/node": "^8.0.53", + "@types/query-string": "^5.0.1", + "@types/react": "^15.0.15", + "@types/react-copy-to-clipboard": "^4.2.0", + "@types/react-dom": "^0.14.23", + "@types/react-redux": "^4.4.37", + "@types/react-router-dom": "^4.0.4", + "@types/react-scroll": "0.0.31", + "@types/react-tap-event-plugin": "0.0.30", + "@types/redux": "^3.6.0", + "awesome-typescript-loader": "^3.1.3", + "copy-webpack-plugin": "^4.0.1", + "copyfiles": "^1.2.0", + "css-loader": "0.23.x", + "exports-loader": "0.6.x", + "imports-loader": "0.6.x", + "json-loader": "^0.5.4", + "less-loader": "^2.2.3", + "raw-loader": "^0.5.1", + "shx": "^0.2.2", + "source-map-loader": "^0.1.6", + "style-loader": "0.13.x", + "tslint": "5.8.0", + "typescript": "~2.6.1", + "web3-typescript-typings": "^0.7.2", + "webpack": "^3.1.0", + "webpack-dev-middleware": "^1.10.0", + "webpack-dev-server": "^2.5.0" + } } diff --git a/packages/website/tsconfig.json b/packages/website/tsconfig.json index 5b3510c26..ebbee7ff3 100644 --- a/packages/website/tsconfig.json +++ b/packages/website/tsconfig.json @@ -3,7 +3,7 @@ "allowSyntheticDefaultImports": true, "outDir": "./transpiled/", "sourceMap": true, - "lib": [ "es2015", "dom" ], + "lib": ["es2015", "dom"], "noImplicitAny": true, "module": "commonjs", "target": "es5", @@ -11,11 +11,8 @@ "baseUrl": "./", "allowJs": true, "paths": { - "*": [ "node_modules/@types/*", "*"] + "*": ["node_modules/@types/*", "*"] } }, - "include": [ - "./ts/**/*", - "../../node_modules/web3-typescript-typings/index.d.ts" - ] + "include": ["./ts/**/*", "../../node_modules/web3-typescript-typings/index.d.ts"] } diff --git a/packages/website/tslint.json b/packages/website/tslint.json index 957c0e11d..d6a5f5031 100644 --- a/packages/website/tslint.json +++ b/packages/website/tslint.json @@ -1,11 +1,9 @@ { - "extends": [ - "@0xproject/tslint-config" - ], - "rules": { - "no-implicit-dependencies": false, - "no-object-literal-type-assertion": false, - "completed-docs": false, - "prefer-function-over-method": false - } + "extends": ["@0xproject/tslint-config"], + "rules": { + "no-implicit-dependencies": false, + "no-object-literal-type-assertion": false, + "completed-docs": false, + "prefer-function-over-method": false + } } |