diff options
30 files changed, 181 insertions, 34 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 cfe35ff3e..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). 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/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/forwarder-helper/CHANGELOG.json b/packages/forwarder-helper/CHANGELOG.json index f0e646700..b505cb7d1 100644 --- a/packages/forwarder-helper/CHANGELOG.json +++ b/packages/forwarder-helper/CHANGELOG.json @@ -1,5 +1,14 @@ [ { + "timestamp": 1537265493, + "version": "1.0.2", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, + { "timestamp": 1536142250, "version": "1.0.1", "changes": [ diff --git a/packages/forwarder-helper/CHANGELOG.md b/packages/forwarder-helper/CHANGELOG.md index d6b67aa1b..23cba8f46 100644 --- a/packages/forwarder-helper/CHANGELOG.md +++ b/packages/forwarder-helper/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.0.2 - _September 18, 2018_ + + * Dependencies updated + ## v1.0.1 - _September 5, 2018_ * Dependencies updated diff --git a/packages/forwarder-helper/package.json b/packages/forwarder-helper/package.json index 99f82d32e..64613561d 100644 --- a/packages/forwarder-helper/package.json +++ b/packages/forwarder-helper/package.json @@ -1,6 +1,6 @@ { "name": "@0xproject/forwarder-helper", - "version": "1.0.1", + "version": "1.0.2", "engines": { "node": ">=6.12" }, 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/package.json b/packages/website/package.json index f0a44b97b..cfb4bceb5 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/json-schemas": "^1.0.1", "@0xproject/order-utils": "^1.0.1", "@0xproject/react-docs": "^1.0.8", 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, }, |