aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-09-18 21:58:47 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-09-18 21:58:47 +0800
commitf5dbf212e355c6a19126c6bd2d9851210f9ed9aa (patch)
tree7792720aad79b0aceefe90c8d3f1cf9c715dec7d
parenta22d2dc7ee3a1f354074009f3ff117b14050f5c6 (diff)
parente2559798df37cd246fe26d40d5bd030431a683e9 (diff)
downloaddexon-sol-tools-f5dbf212e355c6a19126c6bd2d9851210f9ed9aa.tar
dexon-sol-tools-f5dbf212e355c6a19126c6bd2d9851210f9ed9aa.tar.gz
dexon-sol-tools-f5dbf212e355c6a19126c6bd2d9851210f9ed9aa.tar.bz2
dexon-sol-tools-f5dbf212e355c6a19126c6bd2d9851210f9ed9aa.tar.lz
dexon-sol-tools-f5dbf212e355c6a19126c6bd2d9851210f9ed9aa.tar.xz
dexon-sol-tools-f5dbf212e355c6a19126c6bd2d9851210f9ed9aa.tar.zst
dexon-sol-tools-f5dbf212e355c6a19126c6bd2d9851210f9ed9aa.zip
Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/forwarder-helper/sra-and-rpc
-rw-r--r--packages/0x.js/CHANGELOG.json9
-rw-r--r--packages/0x.js/CHANGELOG.md4
-rw-r--r--packages/0x.js/README.md11
-rw-r--r--packages/0x.js/package.json8
-rw-r--r--packages/asset-buyer/package.json5
-rw-r--r--packages/contract-wrappers/CHANGELOG.json9
-rw-r--r--packages/contract-wrappers/CHANGELOG.md4
-rw-r--r--packages/contract-wrappers/package.json4
-rw-r--r--packages/contract-wrappers/src/utils/decorators.ts2
-rw-r--r--packages/migrations/CHANGELOG.json9
-rw-r--r--packages/migrations/CHANGELOG.md4
-rw-r--r--packages/migrations/artifacts/2.0.0/WETH9.json5
-rw-r--r--packages/migrations/artifacts/2.0.0/ZRXToken.json5
-rw-r--r--packages/migrations/package.json2
-rw-r--r--packages/order-watcher/CHANGELOG.json9
-rw-r--r--packages/order-watcher/CHANGELOG.md4
-rw-r--r--packages/order-watcher/package.json6
-rw-r--r--packages/testnet-faucets/package.json4
-rw-r--r--packages/website/md/docs/0xjs/0.0.1/async.md (renamed from packages/website/md/docs/0xjs/1.0.0/async.md)0
-rw-r--r--packages/website/md/docs/0xjs/0.0.1/errors.md (renamed from packages/website/md/docs/0xjs/1.0.0/errors.md)0
-rw-r--r--packages/website/md/docs/0xjs/0.0.1/installation.md (renamed from packages/website/md/docs/0xjs/1.0.0/installation.md)0
-rw-r--r--packages/website/md/docs/0xjs/0.0.1/introduction.md (renamed from packages/website/md/docs/0xjs/1.0.0/introduction.md)0
-rw-r--r--packages/website/md/docs/0xjs/0.0.1/versioning.md (renamed from packages/website/md/docs/0xjs/1.0.0/versioning.md)0
-rw-r--r--packages/website/md/docs/0xjs/1.0.1/async.md31
-rw-r--r--packages/website/md/docs/0xjs/1.0.1/installation.md40
-rw-r--r--packages/website/md/docs/0xjs/1.0.1/introduction.md (renamed from packages/website/md/docs/0xjs/2.0.0/introduction.md)2
-rw-r--r--packages/website/md/docs/0xjs/1.0.1/versioning.md (renamed from packages/website/md/docs/0xjs/2.0.0/versioning.md)2
-rw-r--r--packages/website/md/docs/0xjs/2.0.0/async.md26
-rw-r--r--packages/website/md/docs/0xjs/2.0.0/installation.md38
-rw-r--r--packages/website/package.json4
-rw-r--r--packages/website/ts/containers/zero_ex_js_documentation.ts33
31 files changed, 241 insertions, 39 deletions
diff --git a/packages/0x.js/CHANGELOG.json b/packages/0x.js/CHANGELOG.json
index 9ff4963c0..f4aa99b82 100644
--- a/packages/0x.js/CHANGELOG.json
+++ b/packages/0x.js/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "version": "1.0.2",
+ "changes": [
+ {
+ "note": "Add ZRX & WETH mainnet contract addresses into the included artifacts"
+ }
+ ],
+ "timestamp": 1537265493
+ },
+ {
"timestamp": 1536142250,
"version": "1.0.1",
"changes": [
diff --git a/packages/0x.js/CHANGELOG.md b/packages/0x.js/CHANGELOG.md
index 2fd357eb6..9e92e877f 100644
--- a/packages/0x.js/CHANGELOG.md
+++ b/packages/0x.js/CHANGELOG.md
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v1.0.2 - _September 18, 2018_
+
+ * Add ZRX & WETH mainnet contract addresses into the included artifacts
+
## v1.0.1 - _September 5, 2018_
* Dependencies updated
diff --git a/packages/0x.js/README.md b/packages/0x.js/README.md
index fd6217151..329037324 100644
--- a/packages/0x.js/README.md
+++ b/packages/0x.js/README.md
@@ -1,6 +1,6 @@
## 0x.js
-A TypeScript/Javascript library for interacting with the 0x protocol.
+A TypeScript/Javascript library for interacting with the 0x protocol. It is a high level package which combines a number of underlying packages such as order-utils and order-watcher.
### Read the [Documentation](https://0xproject.com/docs/0x.js).
@@ -19,7 +19,14 @@ npm install 0x.js --save
**Import**
```javascript
-import { ZeroEx } from '0x.js';
+import {
+ assetDataUtils,
+ BigNumber,
+ ContractWrappers,
+ generatePseudoRandomSalt,
+ orderHashUtils,
+ signatureUtils,
+} from '0x.js';
```
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json
index c2286ebf2..d52914d3e 100644
--- a/packages/0x.js/package.json
+++ b/packages/0x.js/package.json
@@ -1,6 +1,6 @@
{
"name": "0x.js",
- "version": "1.0.1",
+ "version": "1.0.2",
"engines": {
"node": ">=6.12"
},
@@ -43,7 +43,7 @@
"devDependencies": {
"@0xproject/abi-gen": "^1.0.8",
"@0xproject/dev-utils": "^1.0.7",
- "@0xproject/migrations": "^1.0.7",
+ "@0xproject/migrations": "^1.0.8",
"@0xproject/monorepo-scripts": "^1.0.8",
"@0xproject/tslint-config": "^1.0.7",
"@types/lodash": "4.14.104",
@@ -75,9 +75,9 @@
"dependencies": {
"@0xproject/assert": "^1.0.8",
"@0xproject/base-contract": "^2.0.2",
- "@0xproject/contract-wrappers": "^1.0.1",
+ "@0xproject/contract-wrappers": "^1.0.2",
"@0xproject/order-utils": "^1.0.1",
- "@0xproject/order-watcher": "^1.0.1",
+ "@0xproject/order-watcher": "^1.0.2",
"@0xproject/subproviders": "^2.0.2",
"@0xproject/types": "^1.0.1",
"@0xproject/typescript-typings": "^2.0.0",
diff --git a/packages/asset-buyer/package.json b/packages/asset-buyer/package.json
index 0d6d1f52b..f36044ae2 100644
--- a/packages/asset-buyer/package.json
+++ b/packages/asset-buyer/package.json
@@ -18,10 +18,7 @@
"run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --exit",
"clean": "shx rm -rf lib test_temp scripts",
"build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
- "manual:postpublish": "yarn build; node ./scripts/postpublish.js",
- "docs:stage": "node scripts/stage_docs.js",
- "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES",
- "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"
+ "manual:postpublish": "yarn build; node ./scripts/postpublish.js"
},
"config": {
"postpublish": {
diff --git a/packages/contract-wrappers/CHANGELOG.json b/packages/contract-wrappers/CHANGELOG.json
index 477537bb3..a05a43114 100644
--- a/packages/contract-wrappers/CHANGELOG.json
+++ b/packages/contract-wrappers/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "version": "1.0.2",
+ "changes": [
+ {
+ "note": "Add ZRX & WETH mainnet contract addresses into the included artifacts"
+ }
+ ],
+ "timestamp": 1537265493
+ },
+ {
"version": "1.0.1",
"changes": [
{
diff --git a/packages/contract-wrappers/CHANGELOG.md b/packages/contract-wrappers/CHANGELOG.md
index b5be34d36..5056d0f87 100644
--- a/packages/contract-wrappers/CHANGELOG.md
+++ b/packages/contract-wrappers/CHANGELOG.md
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v1.0.2 - _September 18, 2018_
+
+ * Add ZRX & WETH mainnet contract addresses into the included artifacts
+
## v1.0.1 - _September 5, 2018_
* Add `OrderValidatorWrapper`
diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json
index 5cfe8f6b5..d785dc20d 100644
--- a/packages/contract-wrappers/package.json
+++ b/packages/contract-wrappers/package.json
@@ -1,6 +1,6 @@
{
"name": "@0xproject/contract-wrappers",
- "version": "1.0.1",
+ "version": "1.0.2",
"description": "Smart TS wrappers for 0x smart contracts",
"keywords": [
"0xproject",
@@ -43,7 +43,7 @@
"devDependencies": {
"@0xproject/abi-gen": "^1.0.8",
"@0xproject/dev-utils": "^1.0.7",
- "@0xproject/migrations": "^1.0.7",
+ "@0xproject/migrations": "^1.0.8",
"@0xproject/subproviders": "^2.0.2",
"@0xproject/tslint-config": "^1.0.7",
"@types/lodash": "4.14.104",
diff --git a/packages/contract-wrappers/src/utils/decorators.ts b/packages/contract-wrappers/src/utils/decorators.ts
index 6e77450e8..d6bf6ec1e 100644
--- a/packages/contract-wrappers/src/utils/decorators.ts
+++ b/packages/contract-wrappers/src/utils/decorators.ts
@@ -24,7 +24,7 @@ const contractCallErrorTransformer = (error: Error) => {
const schemaErrorTransformer = (error: Error) => {
if (_.includes(error.message, constants.INVALID_TAKER_FORMAT)) {
const errMsg =
- 'Order taker must be of type string. If you want anyone to be able to fill an order - pass ZeroEx.NULL_ADDRESS';
+ 'Order taker must be of type string. If you want anyone to be able to fill an order - pass NULL_ADDRESS';
return new Error(errMsg);
}
return error;
diff --git a/packages/migrations/CHANGELOG.json b/packages/migrations/CHANGELOG.json
index 3d9280938..e4636ade0 100644
--- a/packages/migrations/CHANGELOG.json
+++ b/packages/migrations/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "timestamp": 1537265493,
+ "version": "1.0.8",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ]
+ },
+ {
"timestamp": 1536142250,
"version": "1.0.7",
"changes": [
diff --git a/packages/migrations/CHANGELOG.md b/packages/migrations/CHANGELOG.md
index ed328a60c..5021e7a02 100644
--- a/packages/migrations/CHANGELOG.md
+++ b/packages/migrations/CHANGELOG.md
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v1.0.8 - _September 18, 2018_
+
+ * Dependencies updated
+
## v1.0.7 - _September 5, 2018_
* Dependencies updated
diff --git a/packages/migrations/artifacts/2.0.0/WETH9.json b/packages/migrations/artifacts/2.0.0/WETH9.json
index 8cca84e41..a4f90ae2f 100644
--- a/packages/migrations/artifacts/2.0.0/WETH9.json
+++ b/packages/migrations/artifacts/2.0.0/WETH9.json
@@ -327,6 +327,11 @@
}
},
"networks": {
+ "1": {
+ "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
+ "links": {},
+ "constructorArgs": "[]"
+ },
"3": {
"address": "0xc778417e063141139fce010982780140aa0cd5ab",
"links": {},
diff --git a/packages/migrations/artifacts/2.0.0/ZRXToken.json b/packages/migrations/artifacts/2.0.0/ZRXToken.json
index 76ee77b34..b984aa171 100644
--- a/packages/migrations/artifacts/2.0.0/ZRXToken.json
+++ b/packages/migrations/artifacts/2.0.0/ZRXToken.json
@@ -10022,6 +10022,11 @@
}
},
"networks": {
+ "1": {
+ "address": "0xe41d2489571d322189246dafa5ebde1f4699f498",
+ "links": {},
+ "constructorArgs": "[]"
+ },
"3": {
"address": "0xff67881f8d12f372d91baae9752eb3631ff0ed00",
"links": {},
diff --git a/packages/migrations/package.json b/packages/migrations/package.json
index 2447de51a..230c0c3ab 100644
--- a/packages/migrations/package.json
+++ b/packages/migrations/package.json
@@ -1,6 +1,6 @@
{
"name": "@0xproject/migrations",
- "version": "1.0.7",
+ "version": "1.0.8",
"engines": {
"node": ">=6.12"
},
diff --git a/packages/order-watcher/CHANGELOG.json b/packages/order-watcher/CHANGELOG.json
index d6cfe9c3c..351d8853f 100644
--- a/packages/order-watcher/CHANGELOG.json
+++ b/packages/order-watcher/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "version": "1.0.2",
+ "changes": [
+ {
+ "note": "Add ZRX & WETH mainnet contract addresses into the included artifacts"
+ }
+ ],
+ "timestamp": 1537265493
+ },
+ {
"timestamp": 1536142250,
"version": "1.0.1",
"changes": [
diff --git a/packages/order-watcher/CHANGELOG.md b/packages/order-watcher/CHANGELOG.md
index 31ed75927..ec31791a0 100644
--- a/packages/order-watcher/CHANGELOG.md
+++ b/packages/order-watcher/CHANGELOG.md
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v1.0.2 - _September 18, 2018_
+
+ * Add ZRX & WETH mainnet contract addresses into the included artifacts
+
## v1.0.1 - _September 5, 2018_
* Dependencies updated
diff --git a/packages/order-watcher/package.json b/packages/order-watcher/package.json
index a6195793b..d36112a91 100644
--- a/packages/order-watcher/package.json
+++ b/packages/order-watcher/package.json
@@ -1,6 +1,6 @@
{
"name": "@0xproject/order-watcher",
- "version": "1.0.1",
+ "version": "1.0.2",
"description": "An order watcher daemon that watches for order validity",
"keywords": [
"0x",
@@ -44,7 +44,7 @@
"devDependencies": {
"@0xproject/abi-gen": "^1.0.8",
"@0xproject/dev-utils": "^1.0.7",
- "@0xproject/migrations": "^1.0.7",
+ "@0xproject/migrations": "^1.0.8",
"@0xproject/tslint-config": "^1.0.7",
"@types/bintrees": "^1.0.2",
"@types/lodash": "4.14.104",
@@ -72,7 +72,7 @@
"dependencies": {
"@0xproject/assert": "^1.0.8",
"@0xproject/base-contract": "^2.0.2",
- "@0xproject/contract-wrappers": "^1.0.1",
+ "@0xproject/contract-wrappers": "^1.0.2",
"@0xproject/fill-scenarios": "^1.0.1",
"@0xproject/json-schemas": "^1.0.1",
"@0xproject/order-utils": "^1.0.1",
diff --git a/packages/testnet-faucets/package.json b/packages/testnet-faucets/package.json
index a2d107f58..5774d323a 100644
--- a/packages/testnet-faucets/package.json
+++ b/packages/testnet-faucets/package.json
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@0xproject/testnet-faucets",
- "version": "1.0.44",
+ "version": "1.0.45",
"engines": {
"node": ">=6.12"
},
@@ -17,7 +17,7 @@
"author": "Fabio Berger",
"license": "Apache-2.0",
"dependencies": {
- "0x.js": "1.0.1",
+ "0x.js": "^1.0.2",
"@0xproject/subproviders": "^2.0.2",
"@0xproject/typescript-typings": "^2.0.0",
"@0xproject/utils": "^1.0.8",
diff --git a/packages/website/md/docs/0xjs/1.0.0/async.md b/packages/website/md/docs/0xjs/0.0.1/async.md
index 8abaef331..8abaef331 100644
--- a/packages/website/md/docs/0xjs/1.0.0/async.md
+++ b/packages/website/md/docs/0xjs/0.0.1/async.md
diff --git a/packages/website/md/docs/0xjs/1.0.0/errors.md b/packages/website/md/docs/0xjs/0.0.1/errors.md
index e97973ccf..e97973ccf 100644
--- a/packages/website/md/docs/0xjs/1.0.0/errors.md
+++ b/packages/website/md/docs/0xjs/0.0.1/errors.md
diff --git a/packages/website/md/docs/0xjs/1.0.0/installation.md b/packages/website/md/docs/0xjs/0.0.1/installation.md
index ac0a47699..ac0a47699 100644
--- a/packages/website/md/docs/0xjs/1.0.0/installation.md
+++ b/packages/website/md/docs/0xjs/0.0.1/installation.md
diff --git a/packages/website/md/docs/0xjs/1.0.0/introduction.md b/packages/website/md/docs/0xjs/0.0.1/introduction.md
index 008376d33..008376d33 100644
--- a/packages/website/md/docs/0xjs/1.0.0/introduction.md
+++ b/packages/website/md/docs/0xjs/0.0.1/introduction.md
diff --git a/packages/website/md/docs/0xjs/1.0.0/versioning.md b/packages/website/md/docs/0xjs/0.0.1/versioning.md
index 6bcaa5b4d..6bcaa5b4d 100644
--- a/packages/website/md/docs/0xjs/1.0.0/versioning.md
+++ b/packages/website/md/docs/0xjs/0.0.1/versioning.md
diff --git a/packages/website/md/docs/0xjs/1.0.1/async.md b/packages/website/md/docs/0xjs/1.0.1/async.md
new file mode 100644
index 000000000..bd5ae9d8a
--- /dev/null
+++ b/packages/website/md/docs/0xjs/1.0.1/async.md
@@ -0,0 +1,31 @@
+0x packages are promise-based libraries. 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):_
+
+```javascript
+try {
+ const signature = await signatureUtils.ecSignOrderHashAsync(
+ providerEngine,
+ orderHashHex,
+ maker,
+ SignerType.Default,
+ );
+} catch (error) {
+ console.log('Caught error: ', error);
+}
+```
+
+_Promise syntax:_
+
+```javascript
+signatureUtils
+ .ecSignOrderHashAsync(providerEngine, orderHashHex, maker, SignerType.Default)
+ .then(function(signature) {
+ console.log(signature);
+ })
+ .catch(function(error) {
+ console.log('Caught error: ', error);
+ });
+```
+
+As is the convention with promise-based libraries, if an error occurs, it is thrown. It is the callers responsibility to catch thrown errors and to handle them appropriately.
diff --git a/packages/website/md/docs/0xjs/1.0.1/installation.md b/packages/website/md/docs/0xjs/1.0.1/installation.md
new file mode 100644
index 000000000..74c902afd
--- /dev/null
+++ b/packages/website/md/docs/0xjs/1.0.1/installation.md
@@ -0,0 +1,40 @@
+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)_:
+
+**Install**
+
+```bash
+npm install 0x.js --save
+```
+
+**Import**
+
+```javascript
+import {
+ assetDataUtils,
+ BigNumber,
+ ContractWrappers,
+ generatePseudoRandomSalt,
+ Order,
+ orderHashUtils,
+ signatureUtils,
+ SignerType,
+} from '0x.js';
+```
+
+#### UMD:
+
+**Install**
+
+Download the UMD module from our [releases page](https://github.com/0xProject/0x-monorepo/releases) and add it to your project.
+
+**Import**
+
+```html
+<script type="text/javascript" src="0x.js"></script>
+```
+
+### Wiki
+
+Check out our [wiki](https://0xproject.com/wiki) for articles on how to get 0x.js setup with Ganache, Infura and more!
diff --git a/packages/website/md/docs/0xjs/2.0.0/introduction.md b/packages/website/md/docs/0xjs/1.0.1/introduction.md
index d228c6855..4d5d314d3 100644
--- a/packages/website/md/docs/0xjs/2.0.0/introduction.md
+++ b/packages/website/md/docs/0xjs/1.0.1/introduction.md
@@ -1,3 +1 @@
-<b>**NOTE:** Release candidate versions are meant to work with V2 of 0x protocol. To interact with V1, select a 0.X version.</b>
-
Welcome to the [0x.js](https://github.com/0xProject/0x-monorepo/tree/development/packages/0x.js) documentation! 0x.js is a Javascript library for interacting with the 0x protocol. With it, you can easily make calls to the 0x smart contracts as well as any token adhering to the token standards supported by the protocol (currently ERC20 & ERC721). Functionality includes generating, signing, filling and cancelling orders, verifying an orders signature, setting or checking a users ERC20/ERC721 token balance/allowance and much more.
diff --git a/packages/website/md/docs/0xjs/2.0.0/versioning.md b/packages/website/md/docs/0xjs/1.0.1/versioning.md
index 7f2b6fee9..6bae835d3 100644
--- a/packages/website/md/docs/0xjs/2.0.0/versioning.md
+++ b/packages/website/md/docs/0xjs/1.0.1/versioning.md
@@ -1 +1 @@
-Since v1.0.0, this package adheres to the [Semantic Versioning 2.0.0](http://semver.org/) specification. The library's public interface includes all the methods, properties and types included in the documentation. We will publish with a major version bump for any breaking change to the public interface, use a minor version bump when introducing new features in a backwards-compatible way, and patch versions when introducing backwards-compatible bug fixes. Because of this, we recommend you import `0x.js` with a caret `^2.0.0` to take advantage of non-breaking bug fixes.
+Since v1.0.0, this package adheres to the [Semantic Versioning 2.0.0](http://semver.org/) specification. The library's public interface includes all the methods, properties and types included in the documentation. We will publish with a major version bump for any breaking change to the public interface, use a minor version bump when introducing new features in a backwards-compatible way, and patch versions when introducing backwards-compatible bug fixes. Because of this, we recommend you import `0x.js` with a caret `^1.0.0` to take advantage of non-breaking bug fixes.
diff --git a/packages/website/md/docs/0xjs/2.0.0/async.md b/packages/website/md/docs/0xjs/2.0.0/async.md
new file mode 100644
index 000000000..c84eebf94
--- /dev/null
+++ b/packages/website/md/docs/0xjs/2.0.0/async.md
@@ -0,0 +1,26 @@
+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):_
+
+```javascript
+try {
+ var availableAddresses = await web3Wrapper.getAvailableAddressesAsync();
+} catch (error) {
+ console.log('Caught error: ', error);
+}
+```
+
+_Promise syntax:_
+
+```javascript
+web3Wrapper
+ .getAvailableAddressesAsync()
+ .then(function(availableAddresses) {
+ console.log(availableAddresses);
+ })
+ .catch(function(error) {
+ console.log('Caught error: ', error);
+ });
+```
+
+As is the convention with promise-based libraries, if an error occurs, it is thrown. It is the callers responsibility to catch thrown errors and to handle them appropriately.
diff --git a/packages/website/md/docs/0xjs/2.0.0/installation.md b/packages/website/md/docs/0xjs/2.0.0/installation.md
new file mode 100644
index 000000000..aaac263d0
--- /dev/null
+++ b/packages/website/md/docs/0xjs/2.0.0/installation.md
@@ -0,0 +1,38 @@
+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)_:
+
+**Install**
+
+```bash
+npm install 0x.js --save
+```
+
+**Import**
+
+```javascript
+import {
+ assetDataUtils,
+ BigNumber,
+ ContractWrappers,
+ generatePseudoRandomSalt,
+ orderHashUtils,
+ signatureUtils,
+} from '0x.js';
+```
+
+#### UMD:
+
+**Install**
+
+Download the UMD module from our [releases page](https://github.com/0xProject/0x-monorepo/releases) and add it to your project.
+
+**Import**
+
+```html
+<script type="text/javascript" src="0x.js"></script>
+```
+
+### Wiki
+
+Check out our [wiki](https://0xproject.com/wiki) for articles on how to get 0x.js setup with TestRPC, Infura and more!
diff --git a/packages/website/package.json b/packages/website/package.json
index b602a3116..025711cef 100644
--- a/packages/website/package.json
+++ b/packages/website/package.json
@@ -1,6 +1,6 @@
{
"name": "@0xproject/website",
- "version": "0.0.47",
+ "version": "0.0.48",
"engines": {
"node": ">=6.12"
},
@@ -19,7 +19,7 @@
"license": "Apache-2.0",
"dependencies": {
"0x.js": "^0.38.6",
- "@0xproject/contract-wrappers": "^1.0.1",
+ "@0xproject/contract-wrappers": "^1.0.2",
"@0xproject/order-utils": "^1.0.1",
"@0xproject/react-docs": "^1.0.8",
"@0xproject/react-shared": "^1.0.9",
diff --git a/packages/website/ts/containers/zero_ex_js_documentation.ts b/packages/website/ts/containers/zero_ex_js_documentation.ts
index 922dd3c10..2a3afd86c 100644
--- a/packages/website/ts/containers/zero_ex_js_documentation.ts
+++ b/packages/website/ts/containers/zero_ex_js_documentation.ts
@@ -9,14 +9,18 @@ import { DocPackages } from 'ts/types';
import { Translate } from 'ts/utils/translate';
/* tslint:disable:no-var-requires */
-const IntroMarkdownV1 = require('md/docs/0xjs/1.0.0/introduction');
-const InstallationMarkdownV1 = require('md/docs/0xjs/1.0.0/installation');
-const AsyncMarkdownV1 = require('md/docs/0xjs/1.0.0/async');
-const ErrorsMarkdownV1 = require('md/docs/0xjs/1.0.0/errors');
-const versioningMarkdownV1 = require('md/docs/0xjs/1.0.0/versioning');
+const IntroMarkdownV0 = require('md/docs/0xjs/0.0.1/introduction');
+const InstallationMarkdownV0 = require('md/docs/0xjs/0.0.1/installation');
+const AsyncMarkdownV0 = require('md/docs/0xjs/0.0.1/async');
+const ErrorsMarkdownV0 = require('md/docs/0xjs/0.0.1/errors');
+const versioningMarkdownV0 = require('md/docs/0xjs/0.0.1/versioning');
+
+const IntroMarkdownV1 = require('md/docs/0xjs/1.0.1/introduction');
+const InstallationMarkdownV1 = require('md/docs/0xjs/1.0.1/installation');
+const AsyncMarkdownV1 = require('md/docs/0xjs/1.0.1/async');
+const ErrorsMarkdownV1 = ErrorsMarkdownV0;
+const versioningMarkdownV1 = require('md/docs/0xjs/1.0.1/versioning');
-const IntroMarkdownV2 = require('md/docs/0xjs/2.0.0/introduction');
-const versioningMarkdownV2 = require('md/docs/0xjs/2.0.0/versioning');
/* tslint:enable:no-var-requires */
const markdownSections = {
@@ -41,17 +45,16 @@ const docsInfoConfig: DocsInfoConfig = {
},
sectionNameToMarkdownByVersion: {
'0.0.1': {
+ [markdownSections.introduction]: IntroMarkdownV0,
+ [markdownSections.installation]: InstallationMarkdownV0,
+ [markdownSections.versioning]: versioningMarkdownV0,
+ [markdownSections.async]: AsyncMarkdownV0,
+ [markdownSections.errors]: ErrorsMarkdownV0,
+ },
+ '1.0.1': {
[markdownSections.introduction]: IntroMarkdownV1,
[markdownSections.installation]: InstallationMarkdownV1,
- [markdownSections.async]: AsyncMarkdownV1,
- [markdownSections.errors]: ErrorsMarkdownV1,
[markdownSections.versioning]: versioningMarkdownV1,
- },
- '1.0.0-rc.1': {
- [markdownSections.introduction]: IntroMarkdownV2,
- [markdownSections.versioning]: versioningMarkdownV2,
- // These are the same as for V1
- [markdownSections.installation]: InstallationMarkdownV1,
[markdownSections.async]: AsyncMarkdownV1,
[markdownSections.errors]: ErrorsMarkdownV1,
},