Apply prettify on json and md files

This commit is contained in:
Leonid Logvinov 2018-01-04 12:54:16 +01:00
parent 326a6b729f
commit c700046b76
No known key found for this signature in database
GPG Key ID: 0DD294BFDE8C95D4
88 changed files with 3102 additions and 3156 deletions

View File

@ -1,2 +1,4 @@
lib
generated
.nyc_output
/packages/contracts/build/contracts

View File

@ -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!

View File

@ -1,2 +1,3 @@
This PR:
*
\*

View File

@ -11,8 +11,7 @@ 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/)
@ -20,7 +19,7 @@ This repository contains all the 0x developer tools written in TypeScript. Our h
### 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 |
@ -35,7 +34,7 @@ This repository contains all the 0x developer tools written in TypeScript. Our h
### 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 |
@ -44,10 +43,11 @@ This repository contains all the 0x developer tools written in TypeScript. Our h
## 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
```

View File

@ -1,8 +1,6 @@
{
"lerna": "2.5.1",
"packages": [
"packages/*"
],
"packages": ["packages/*"],
"version": "independent",
"npmClient": "yarn",
"useWorkspaces": true

View File

@ -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":

View File

@ -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.

View File

@ -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:

View File

@ -2,28 +2,26 @@
"name": "0x.js",
"version": "0.29.0",
"description": "A javascript library for interacting with the 0x protocol",
"keywords": [
"0x.js",
"0xproject",
"ethereum",
"tokens",
"exchange"
],
"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",
"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: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;",
"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",

View File

@ -1,7 +1,6 @@
{
"contract_name": "DummyToken",
"abi":
[
"abi": [
{
"constant": false,
"inputs": [

View File

@ -2,7 +2,7 @@
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"lib": [ "es2015", "dom" ],
"lib": ["es2015", "dom"],
"outDir": "lib",
"sourceMap": true,
"declaration": true,

View File

@ -1,5 +1,3 @@
{
"extends": [
"@0xproject/tslint-config"
]
"extends": ["@0xproject/tslint-config"]
}

View File

@ -1,6 +1,6 @@
# 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)

View File

@ -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.

View File

@ -9,9 +9,5 @@
"noImplicitAny": true,
"strictNullChecks": true
},
"include": [
"./src/**/*",
"./test/**/*",
"../../node_modules/web3-typescript-typings/index.d.ts"
]
"include": ["./src/**/*", "./test/**/*", "../../node_modules/web3-typescript-typings/index.d.ts"]
}

View File

@ -1,5 +1,3 @@
{
"extends": [
"@0xproject/tslint-config"
]
"extends": ["@0xproject/tslint-config"]
}

View File

@ -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.

View File

@ -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
```

View File

@ -2,7 +2,7 @@
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"lib": [ "es2017", "dom"],
"lib": ["es2017", "dom"],
"outDir": "lib",
"sourceMap": true,
"declaration": true,

View File

@ -1,5 +1,3 @@
{
"extends": [
"@0xproject/tslint-config"
]
"extends": ["@0xproject/tslint-config"]
}

View File

@ -1,16 +1,16 @@
# CHANGELOG
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

View File

@ -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
```

View File

@ -2,20 +2,15 @@
"name": "@0xproject/connect",
"version": "0.3.2",
"description": "A javascript library for interacting with the standard relayer api",
"keywords": [
"connect",
"0xproject",
"ethereum",
"tokens",
"exchange"
],
"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",
"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",

View File

@ -2,7 +2,7 @@
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"lib": [ "es2015", "dom" ],
"lib": ["es2015", "dom"],
"outDir": "lib",
"sourceMap": true,
"declaration": true,
@ -16,4 +16,4 @@
"../../node_modules/chai-typescript-typings/index.d.ts",
"../../node_modules/web3-typescript-typings/index.d.ts"
]
}
}

View File

@ -1,5 +1,3 @@
{
"extends": [
"@0xproject/tslint-config"
]
"extends": ["@0xproject/tslint-config"]
}

View File

@ -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
```

View File

@ -8,7 +8,8 @@
"test": "test"
},
"scripts": {
"build": "rm -rf ./lib; copyfiles ./build/**/* ./deploy/solc/solc_bin/* ./deploy/test/fixtures/contracts/**/* ./deploy/test/fixtures/contracts/* ./lib; tsc;",
"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",

View File

@ -21,7 +21,5 @@
"./migrations/**/*",
"./deploy/**/*"
],
"exclude": [
"./deploy/solc/solc_bin"
]
"exclude": ["./deploy/solc/solc_bin"]
}

View File

@ -1,5 +1,3 @@
{
"extends": [
"@0xproject/tslint-config"
]
"extends": ["@0xproject/tslint-config"]
}

View File

@ -1,5 +1,4 @@
Dev utils
------
## Dev utils
Dev utils to be shared across 0x projects and packages

View File

@ -2,7 +2,7 @@
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"lib": [ "es2017", "dom"],
"lib": ["es2017", "dom"],
"outDir": "lib",
"sourceMap": true,
"declaration": true,

View File

@ -1,5 +1,3 @@
{
"extends": [
"@0xproject/tslint-config"
]
"extends": ["@0xproject/tslint-config"]
}

View File

@ -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

View File

@ -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
```

View File

@ -2,16 +2,12 @@
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"lib": [ "es2017", "dom"],
"lib": ["es2017", "dom"],
"outDir": "lib",
"sourceMap": true,
"declaration": true,
"noImplicitAny": true,
"strictNullChecks": true
},
"include": [
"./src/**/*",
"./test/**/*",
"../../node_modules/chai-typescript-typings/index.d.ts"
]
"include": ["./src/**/*", "./test/**/*", "../../node_modules/chai-typescript-typings/index.d.ts"]
}

View File

@ -1,5 +1,3 @@
{
"extends": [
"@0xproject/tslint-config"
]
"extends": ["@0xproject/tslint-config"]
}

View File

@ -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`.

View File

@ -2,15 +2,12 @@
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"lib": [ "es2015", "dom" ],
"lib": ["es2015", "dom"],
"outDir": "lib",
"sourceMap": true,
"declaration": true,
"noImplicitAny": true,
"experimentalDecorators": true,
"experimentalDecorators": true
},
"include": [
"../../node_modules/web3-typescript-typings/index.d.ts",
"./src/ts/**/*"
]
"include": ["../../node_modules/web3-typescript-typings/index.d.ts", "./src/ts/**/*"]
}

View File

@ -1,5 +1,3 @@
{
"extends": [
"@0xproject/tslint-config"
]
"extends": ["@0xproject/tslint-config"]
}

View File

@ -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
```

View File

@ -7,7 +7,5 @@
"noImplicitAny": true,
"strictNullChecks": true
},
"include": [
"./src/**/*"
]
"include": ["./src/**/*"]
}

View File

@ -1,5 +1,3 @@
{
"extends": [
"@0xproject/tslint-config"
]
"extends": ["@0xproject/tslint-config"]
}

View File

@ -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)

View File

@ -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:

View File

@ -2,7 +2,7 @@
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"lib": [ "es2015", "dom" ],
"lib": ["es2015", "dom"],
"outDir": "lib",
"sourceMap": true,
"declaration": true,

View File

@ -1,5 +1,3 @@
{
"extends": [
"@0xproject/tslint-config"
]
"extends": ["@0xproject/tslint-config"]
}

View File

@ -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.

View File

@ -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
```

View File

@ -8,22 +8,12 @@
"clean": "shx rm -rf lib",
"lint": "tslint --project . 'rules/**/*.ts'"
},
"files": [
"tslint.js",
"README.md",
"LICENSE"
],
"files": ["tslint.js", "README.md", "LICENSE"],
"repository": {
"type": "git",
"url": "git://github.com/0xProject/0x.js.git"
},
"keywords": [
"tslint",
"config",
"0xProject",
"typescript",
"ts"
],
"keywords": ["tslint", "config", "0xProject", "typescript", "ts"],
"author": {
"name": "Fabio Berger",
"email": "fabio@0xproject.com"

View File

@ -2,14 +2,12 @@
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"lib": [ "es2017", "dom"],
"lib": ["es2017", "dom"],
"outDir": "lib",
"sourceMap": true,
"declaration": true,
"noImplicitAny": true,
"strictNullChecks": true
},
"include": [
"./rules/**/*"
]
"include": ["./rules/**/*"]
}

View File

@ -1,4 +1,3 @@
# CHANGELOG
vx.x.x
------------------------
## vx.x.x

View File

@ -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
```

View File

@ -2,15 +2,12 @@
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"lib": [ "es2017", "dom"],
"lib": ["es2017", "dom"],
"outDir": "lib",
"sourceMap": true,
"declaration": true,
"noImplicitAny": true,
"strictNullChecks": true
},
"include": [
"./src/**/*",
"../../node_modules/web3-typescript-typings/index.d.ts"
]
"include": ["./src/**/*", "../../node_modules/web3-typescript-typings/index.d.ts"]
}

View File

@ -1,5 +1,3 @@
{
"extends": [
"@0xproject/tslint-config"
]
"extends": ["@0xproject/tslint-config"]
}

View File

@ -1,4 +1,3 @@
# CHANGELOG
vx.x.x
------------------------
## vx.x.x

View File

@ -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
```

View File

@ -2,14 +2,12 @@
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"lib": [ "es2017", "dom"],
"lib": ["es2017", "dom"],
"outDir": "lib",
"sourceMap": true,
"declaration": true,
"noImplicitAny": true,
"strictNullChecks": true
},
"include": [
"./src/**/*"
]
"include": ["./src/**/*"]
}

View File

@ -1,5 +1,3 @@
{
"extends": [
"@0xproject/tslint-config"
]
"extends": ["@0xproject/tslint-config"]
}

View File

@ -1,4 +1,3 @@
# CHANGELOG
vx.x.x
------------------------
## vx.x.x

View File

@ -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
```

View File

@ -2,15 +2,12 @@
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"lib": [ "es2017", "dom"],
"lib": ["es2017", "dom"],
"outDir": "lib",
"sourceMap": true,
"declaration": true,
"noImplicitAny": true,
"strictNullChecks": true
},
"include": [
"./src/**/*",
"../../node_modules/web3-typescript-typings/index.d.ts"
]
"include": ["./src/**/*", "../../node_modules/web3-typescript-typings/index.d.ts"]
}

View File

@ -1,5 +1,3 @@
{
"extends": [
"@0xproject/tslint-config"
]
"extends": ["@0xproject/tslint-config"]
}

View File

@ -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)

View File

@ -182,7 +182,8 @@
"type": "event"
}
],
"unlinked_binary": "0x6060604052341561000c57fe5b5b6105018061001c6000396000f300606060405236156100675763ffffffff60e060020a600035041663095ea7b3811461006957806318160ddd1461009c57806323b872dd146100be57806370a08231146100f7578063a0712d6814610125578063a9059cbb1461013a578063dd62ed3e1461016d575bfe5b341561007157fe5b610088600160a060020a03600435166024356101a1565b604080519115158252519081900360200190f35b34156100a457fe5b6100ac61020c565b60408051918252519081900360200190f35b34156100c657fe5b610088600160a060020a0360043581169060243516604435610212565b604080519115158252519081900360200190f35b34156100ff57fe5b6100ac600160a060020a0360043516610335565b60408051918252519081900360200190f35b341561012d57fe5b610138600435610354565b005b341561014257fe5b610088600160a060020a03600435166024356103bc565b604080519115158252519081900360200190f35b341561017557fe5b6100ac600160a060020a036004358116906024351661046e565b60408051918252519081900360200190f35b600160a060020a03338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60025481565b600160a060020a03808416600081815260016020908152604080832033909516835293815283822054928252819052918220548390108015906102555750828110155b801561027b5750600160a060020a03841660009081526020819052604090205483810110155b1561032757600160a060020a03808516600090815260208190526040808220805487019055918716815220805484900390556000198110156102e557600160a060020a03808616600090815260016020908152604080832033909416835292905220805484900390555b83600160a060020a031685600160a060020a03166000805160206104b6833981519152856040518082815260200191505060405180910390a36001915061032c565b600091505b5b509392505050565b600160a060020a0381166000908152602081905260409020545b919050565b68056bc75e2d6310000081111561036b5760006000fd5b600160a060020a03331660009081526020819052604090205461038f90829061049b565b600160a060020a0333166000908152602081905260409020556002546103b5908261049b565b6002555b50565b600160a060020a0333166000908152602081905260408120548290108015906103ff5750600160a060020a03831660009081526020819052604090205482810110155b1561045f57600160a060020a0333811660008181526020818152604080832080548890039055938716808352918490208054870190558351868152935191936000805160206104b6833981519152929081900390910190a3506001610206565b506000610206565b5b92915050565b600160a060020a038083166000908152600160209081526040808320938516835292905220545b92915050565b6000828201838110156104aa57fe5b8091505b50929150505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a72305820998c8326b9629e063eb4867166e72c68a8c2e3ebca6a9d35ebc78c041c7aa47b0029",
"unlinked_binary":
"0x6060604052341561000c57fe5b5b6105018061001c6000396000f300606060405236156100675763ffffffff60e060020a600035041663095ea7b3811461006957806318160ddd1461009c57806323b872dd146100be57806370a08231146100f7578063a0712d6814610125578063a9059cbb1461013a578063dd62ed3e1461016d575bfe5b341561007157fe5b610088600160a060020a03600435166024356101a1565b604080519115158252519081900360200190f35b34156100a457fe5b6100ac61020c565b60408051918252519081900360200190f35b34156100c657fe5b610088600160a060020a0360043581169060243516604435610212565b604080519115158252519081900360200190f35b34156100ff57fe5b6100ac600160a060020a0360043516610335565b60408051918252519081900360200190f35b341561012d57fe5b610138600435610354565b005b341561014257fe5b610088600160a060020a03600435166024356103bc565b604080519115158252519081900360200190f35b341561017557fe5b6100ac600160a060020a036004358116906024351661046e565b60408051918252519081900360200190f35b600160a060020a03338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60025481565b600160a060020a03808416600081815260016020908152604080832033909516835293815283822054928252819052918220548390108015906102555750828110155b801561027b5750600160a060020a03841660009081526020819052604090205483810110155b1561032757600160a060020a03808516600090815260208190526040808220805487019055918716815220805484900390556000198110156102e557600160a060020a03808616600090815260016020908152604080832033909416835292905220805484900390555b83600160a060020a031685600160a060020a03166000805160206104b6833981519152856040518082815260200191505060405180910390a36001915061032c565b600091505b5b509392505050565b600160a060020a0381166000908152602081905260409020545b919050565b68056bc75e2d6310000081111561036b5760006000fd5b600160a060020a03331660009081526020819052604090205461038f90829061049b565b600160a060020a0333166000908152602081905260409020556002546103b5908261049b565b6002555b50565b600160a060020a0333166000908152602081905260408120548290108015906103ff5750600160a060020a03831660009081526020819052604090205482810110155b1561045f57600160a060020a0333811660008181526020818152604080832080548890039055938716808352918490208054870190558351868152935191936000805160206104b6833981519152929081900390910190a3506001610206565b506000610206565b5b92915050565b600160a060020a038083166000908152600160209081526040808320938516835292905220545b92915050565b6000828201838110156104aa57fe5b8091505b50929150505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a72305820998c8326b9629e063eb4867166e72c68a8c2e3ebca6a9d35ebc78c041c7aa47b0029",
"networks": {},
"schema_version": "0.0.5",
"updated_at": 1503413048892

View File

@ -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);
})

View File

@ -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:

View File

@ -7,7 +7,7 @@ npm install @0xproject/connect --save
**Import**
```javascript
import {HttpClient} from '@0xproject/connect';
import { HttpClient } from '@0xproject/connect';
```
### Wiki

View File

@ -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)

View File

@ -8,9 +8,12 @@
"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"
"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"

View File

@ -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"]
}

View File

@ -1,7 +1,5 @@
{
"extends": [
"@0xproject/tslint-config"
],
"extends": ["@0xproject/tslint-config"],
"rules": {
"no-implicit-dependencies": false,
"no-object-literal-type-assertion": false,