diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-08-25 02:14:34 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-08-25 02:14:34 +0800 |
commit | 9ffddb47b8c9187401c1df6e5d5953caad3a9274 (patch) | |
tree | 44344c48c860ce24f424f6d504e24f8f1a5560f6 | |
parent | 7bcaac4e1080ae6c5d1b482992c7878b4be3174f (diff) | |
parent | b38ef579fb75c777fac2eef3d4bcda2c97014f0b (diff) | |
download | dexon-sol-tools-9ffddb47b8c9187401c1df6e5d5953caad3a9274.tar.gz dexon-sol-tools-9ffddb47b8c9187401c1df6e5d5953caad3a9274.tar.zst dexon-sol-tools-9ffddb47b8c9187401c1df6e5d5953caad3a9274.zip |
Merge branch 'development' of https://github.com/0xProject/0x-monorepo into sra-api/rename/sra-spec
78 files changed, 1048 insertions, 117 deletions
diff --git a/packages/0x.js/CHANGELOG.json b/packages/0x.js/CHANGELOG.json index 0f5a10e43..346938958 100644 --- a/packages/0x.js/CHANGELOG.json +++ b/packages/0x.js/CHANGELOG.json @@ -7,7 +7,8 @@ "Re-organize the exported interface of 0x.js. Remove the `ZeroEx` class, and instead export the same exports as `0x.js`'s sub-packages: `@0xproject/contract-wrappers`, `@0xproject/order-utils` and `@0xproject/order-watcher`", "pr": 963 } - ] + ], + "timestamp": 1535133899 }, { "version": "1.0.1-rc.3", diff --git a/packages/0x.js/CHANGELOG.md b/packages/0x.js/CHANGELOG.md index adeaed9eb..e94907353 100644 --- a/packages/0x.js/CHANGELOG.md +++ b/packages/0x.js/CHANGELOG.md @@ -5,7 +5,11 @@ Edit the package's CHANGELOG.json file only. CHANGELOG -## v1.0.1-rc.3 - _August 13, 2018_ +## v1.0.1-rc.4 - _August 24, 2018_ + + * Re-organize the exported interface of 0x.js. Remove the `ZeroEx` class, and instead export the same exports as `0x.js`'s sub-packages: `@0xproject/contract-wrappers`, `@0xproject/order-utils` and `@0xproject/order-watcher` (#963) + +## v1.0.1-rc.3 - _August 14, 2018_ * Dependencies updated * Update ecSignOrderHashAsync to return the signature as a string for immediate use in contracts (#914) @@ -22,11 +26,11 @@ CHANGELOG * Dependencies updated -## v1.0.0-rc.2 - _July 19, 2018_ +## v1.0.0-rc.2 - _July 20, 2018_ * Remove `zeroEx.assetData` and instead re-export it's static functions directly off `ZeroEx` -## v1.0.0-rc.1 - _July 19, 2018_ +## v1.0.0-rc.1 - _July 20, 2018_ * Remove tokenRegistry wrapper (#863) * Rename `zeroEx.token` to `zeroEx.erc20Token`, and add `zeroEx.erc721Token` (#863) @@ -66,7 +70,7 @@ CHANGELOG * Renamed createOrderStateWatcher to createOrderWatcherAsync since it is now async (#579) * Renamed ZeroExError to ContractWrappersErrors since they now lives in the @0xproject/contract-wrappers subpackage (#579) -## v0.37.2 - _May 4, 2018_ +## v0.37.2 - _May 5, 2018_ * Dependencies updated diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index 54a896bfc..bb0799f4b 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -20,7 +20,6 @@ "build:all": "run-p build:umd:prod build:commonjs", "lint": "tslint --project . --exclude **/src/generated_contract_wrappers/**/*", "test:circleci": "run-s test:coverage", - "test": "yarn run_mocha", "rebuild_and_test": "run-s build test", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", diff --git a/packages/abi-gen/CHANGELOG.json b/packages/abi-gen/CHANGELOG.json index d7b084fe6..0b6a9a052 100644 --- a/packages/abi-gen/CHANGELOG.json +++ b/packages/abi-gen/CHANGELOG.json @@ -1,5 +1,14 @@ [ { + "timestamp": 1535133899, + "version": "1.0.6", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, + { "timestamp": 1534210131, "version": "1.0.5", "changes": [ diff --git a/packages/abi-gen/CHANGELOG.md b/packages/abi-gen/CHANGELOG.md index 5368ae3f0..477f69e2c 100644 --- a/packages/abi-gen/CHANGELOG.md +++ b/packages/abi-gen/CHANGELOG.md @@ -5,7 +5,11 @@ Edit the package's CHANGELOG.json file only. CHANGELOG -## v1.0.5 - _August 13, 2018_ +## v1.0.6 - _August 24, 2018_ + + * Dependencies updated + +## v1.0.5 - _August 14, 2018_ * Dependencies updated @@ -25,7 +29,7 @@ CHANGELOG * Fix the abi-gen entry point in package.json (#901) -## v1.0.0 - _July 19, 2018_ +## v1.0.0 - _July 20, 2018_ * Convert e_r_c to erc in generated file names (#822) * Remove the output directory before writing to it (#822) @@ -43,7 +47,7 @@ CHANGELOG * Dependencies updated -## v0.3.1 - _May 31, 2018_ +## v0.3.1 - _June 1, 2018_ * Incorrect publish that was unpublished @@ -51,7 +55,7 @@ CHANGELOG * Properly export the executable binary (#588) -## v0.2.13 - _May 4, 2018_ +## v0.2.13 - _May 5, 2018_ * Dependencies updated diff --git a/packages/assert/CHANGELOG.json b/packages/assert/CHANGELOG.json index 1deacb7b5..01fd4c567 100644 --- a/packages/assert/CHANGELOG.json +++ b/packages/assert/CHANGELOG.json @@ -1,5 +1,14 @@ [ { + "timestamp": 1535133899, + "version": "1.0.6", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, + { "timestamp": 1534210131, "version": "1.0.5", "changes": [ diff --git a/packages/assert/CHANGELOG.md b/packages/assert/CHANGELOG.md index cdb5e45d4..ffa34c48c 100644 --- a/packages/assert/CHANGELOG.md +++ b/packages/assert/CHANGELOG.md @@ -5,7 +5,11 @@ Edit the package's CHANGELOG.json file only. CHANGELOG -## v1.0.5 - _August 13, 2018_ +## v1.0.6 - _August 24, 2018_ + + * Dependencies updated + +## v1.0.5 - _August 14, 2018_ * Dependencies updated @@ -25,7 +29,7 @@ CHANGELOG * Dependencies updated -## v1.0.0 - _July 19, 2018_ +## v1.0.0 - _July 20, 2018_ * Fix bug in string enum assertion. We erroneously were checking against the enum keys, not values (#821) @@ -41,7 +45,7 @@ CHANGELOG * Dependencies updated -## v0.2.11 - _May 31, 2018_ +## v0.2.11 - _June 1, 2018_ * Incorrect publish that was unpublished @@ -49,7 +53,7 @@ CHANGELOG * Dependencies updated -## v0.2.9 - _May 4, 2018_ +## v0.2.9 - _May 5, 2018_ * Dependencies updated diff --git a/packages/base-contract/CHANGELOG.json b/packages/base-contract/CHANGELOG.json index 39e3cbe5e..3f01ab0eb 100644 --- a/packages/base-contract/CHANGELOG.json +++ b/packages/base-contract/CHANGELOG.json @@ -1,5 +1,14 @@ [ { + "timestamp": 1535133899, + "version": "2.0.0", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, + { "version": "2.0.0-rc.1", "changes": [ { diff --git a/packages/base-contract/CHANGELOG.md b/packages/base-contract/CHANGELOG.md index 002ad931b..634b3f5a7 100644 --- a/packages/base-contract/CHANGELOG.md +++ b/packages/base-contract/CHANGELOG.md @@ -5,7 +5,11 @@ Edit the package's CHANGELOG.json file only. CHANGELOG -## v2.0.0-rc.1 - _August 13, 2018_ +## v2.0.0 - _August 24, 2018_ + + * Dependencies updated + +## v2.0.0-rc.1 - _August 14, 2018_ * Added strict encoding/decoding checks for sendTransaction and call (#915) @@ -25,7 +29,7 @@ CHANGELOG * Dependencies updated -## v1.0.0 - _July 19, 2018_ +## v1.0.0 - _July 20, 2018_ * Dependencies updated @@ -41,7 +45,7 @@ CHANGELOG * Update EthersJs to fix the `value.toLowerCase()` is not a function bug caused by `ethers.js` breaking patch version https://github.com/ethers-io/ethers.js/issues/201 -## v0.3.3 - _May 31, 2018_ +## v0.3.3 - _June 1, 2018_ * Incorrect publish that was unpublished @@ -49,7 +53,7 @@ CHANGELOG * Dependencies updated -## v0.3.1 - _May 4, 2018_ +## v0.3.1 - _May 5, 2018_ * Dependencies updated diff --git a/packages/connect/CHANGELOG.json b/packages/connect/CHANGELOG.json index 1d0efac95..6cf679b34 100644 --- a/packages/connect/CHANGELOG.json +++ b/packages/connect/CHANGELOG.json @@ -10,7 +10,8 @@ "note": "Stopped exporting `Order` type", "pr": 924 } - ] + ], + "timestamp": 1535133899 }, { "timestamp": 1534210131, diff --git a/packages/connect/CHANGELOG.md b/packages/connect/CHANGELOG.md index f9d84ff9c..a6821f064 100644 --- a/packages/connect/CHANGELOG.md +++ b/packages/connect/CHANGELOG.md @@ -5,7 +5,12 @@ Edit the package's CHANGELOG.json file only. CHANGELOG -## v1.0.5 - _August 13, 2018_ +## v2.0.0-rc.1 - _August 24, 2018_ + + * Updated for SRA v2 (#974) + * Stopped exporting `Order` type (#924) + +## v1.0.5 - _August 14, 2018_ * Dependencies updated @@ -25,7 +30,7 @@ CHANGELOG * Dependencies updated -## v1.0.0 - _July 19, 2018_ +## v1.0.0 - _July 20, 2018_ * Remove `WebSocketOrderbookChannel` from the public interface and replace with `orderbookChannelFactory` @@ -49,7 +54,7 @@ CHANGELOG * Dependencies updated -## v0.6.12 - _May 4, 2018_ +## v0.6.12 - _May 5, 2018_ * Dependencies updated diff --git a/packages/contract-wrappers/CHANGELOG.json b/packages/contract-wrappers/CHANGELOG.json index 8e86d7d58..3809ad098 100644 --- a/packages/contract-wrappers/CHANGELOG.json +++ b/packages/contract-wrappers/CHANGELOG.json @@ -16,7 +16,8 @@ "note": "Added Transaction Encoder for use with 0x Exchange executeTransaction", "pr": 975 } - ] + ], + "timestamp": 1535133899 }, { "version": "1.0.1-rc.3", diff --git a/packages/contract-wrappers/CHANGELOG.md b/packages/contract-wrappers/CHANGELOG.md index c2ad7218e..b1003edfd 100644 --- a/packages/contract-wrappers/CHANGELOG.md +++ b/packages/contract-wrappers/CHANGELOG.md @@ -5,7 +5,13 @@ Edit the package's CHANGELOG.json file only. CHANGELOG -## v1.0.1-rc.3 - _August 13, 2018_ +## v1.0.1-rc.4 - _August 24, 2018_ + + * Export missing types: `TransactionEncoder`, `ContractAbi`, `JSONRPCRequestPayload`, `JSONRPCResponsePayload`, `JSONRPCErrorCallback`, `AbiDefinition`, `FunctionAbi`, `EventAbi`, `EventParameter`, `DecodedLogArgs`, `MethodAbi`, `ConstructorAbi`, `FallbackAbi`, `DataItem`, `ConstructorStateMutability`, `StateMutability` & `ExchangeSignatureValidatorApprovalEventArgs` (#924) + * Remove superfluous exported types: `ContractEvent`, `Token`, `OrderFillRequest`, `ContractEventArgs`, `LogEvent`, `OnOrderStateChangeCallback`, `ECSignature`, `OrderStateValid`, `OrderStateInvalid`, `OrderState`, `FilterObject`, `TransactionReceipt` & `TransactionReceiptWithDecodedLogs` (#924) + * Added Transaction Encoder for use with 0x Exchange executeTransaction (#975) + +## v1.0.1-rc.3 - _August 14, 2018_ * Added strict encoding/decoding checks for sendTransaction and call (#915) * Add ForwarderWrapper (#934) @@ -23,7 +29,7 @@ CHANGELOG * Dependencies updated -## v1.0.0-rc.1 - _July 19, 2018_ +## v1.0.0-rc.1 - _July 20, 2018_ * Update blockstream to v5.0 and propogate up caught errors to active subscriptions (#815) * Update to v2 of 0x rpotocol (#822) diff --git a/packages/dev-utils/CHANGELOG.json b/packages/dev-utils/CHANGELOG.json index 51ae117cf..e0f08344b 100644 --- a/packages/dev-utils/CHANGELOG.json +++ b/packages/dev-utils/CHANGELOG.json @@ -1,5 +1,14 @@ [ { + "timestamp": 1535133899, + "version": "1.0.5", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, + { "timestamp": 1534210131, "version": "1.0.4", "changes": [ diff --git a/packages/dev-utils/CHANGELOG.md b/packages/dev-utils/CHANGELOG.md index 1e244ee7d..0e39de926 100644 --- a/packages/dev-utils/CHANGELOG.md +++ b/packages/dev-utils/CHANGELOG.md @@ -5,7 +5,11 @@ Edit the package's CHANGELOG.json file only. CHANGELOG -## v1.0.4 - _August 13, 2018_ +## v1.0.5 - _August 24, 2018_ + + * Dependencies updated + +## v1.0.4 - _August 14, 2018_ * Dependencies updated @@ -21,7 +25,7 @@ CHANGELOG * Dependencies updated -## v1.0.0 - _July 19, 2018_ +## v1.0.0 - _July 20, 2018_ * Dependencies updated @@ -47,7 +51,7 @@ CHANGELOG * Pass SolCompilerArtifactAdapter to CoverageSubprovider (#589) * Move callbackErrorReporter over from 0x.js (#579) -## v0.4.1 - _May 4, 2018_ +## v0.4.1 - _May 5, 2018_ * Dependencies updated diff --git a/packages/ethereum-types/CHANGELOG.json b/packages/ethereum-types/CHANGELOG.json index 64c6e6d27..1db0e2785 100644 --- a/packages/ethereum-types/CHANGELOG.json +++ b/packages/ethereum-types/CHANGELOG.json @@ -1,5 +1,14 @@ [ { + "timestamp": 1535133899, + "version": "1.0.5", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, + { "timestamp": 1534210131, "version": "1.0.4", "changes": [ diff --git a/packages/ethereum-types/CHANGELOG.md b/packages/ethereum-types/CHANGELOG.md index 67fa84437..76dd9ed19 100644 --- a/packages/ethereum-types/CHANGELOG.md +++ b/packages/ethereum-types/CHANGELOG.md @@ -5,7 +5,11 @@ Edit the package's CHANGELOG.json file only. CHANGELOG -## v1.0.4 - _August 13, 2018_ +## v1.0.5 - _August 24, 2018_ + + * Dependencies updated + +## v1.0.4 - _August 14, 2018_ * Dependencies updated @@ -21,11 +25,12 @@ CHANGELOG * Dependencies updated -## v1.0.0 - _July 19, 2018_ +## v1.0.0 - _July 20, 2018_ * Add `TraceParams` interface for `debug_traceTransaction` parameters (#675) * Add `TransactionReceiptStatus` type (#812) + * Add Artifact types: `CompilerSettings`, `CompilerOptions`, `OutputField` (#924) -## v0.0.2 - _May 31, 2018_ +## v0.0.2 - _June 1, 2018_ * Initial publish (#642) diff --git a/packages/fill-scenarios/CHANGELOG.json b/packages/fill-scenarios/CHANGELOG.json index 06f12a85f..481273fc4 100644 --- a/packages/fill-scenarios/CHANGELOG.json +++ b/packages/fill-scenarios/CHANGELOG.json @@ -1,5 +1,14 @@ [ { + "version": "1.0.1-rc.4", + "changes": [ + { + "note": "Dependencies updated" + } + ], + "timestamp": 1535133899 + }, + { "version": "1.0.1-rc.3", "changes": [ { diff --git a/packages/fill-scenarios/CHANGELOG.md b/packages/fill-scenarios/CHANGELOG.md index 7efe163ec..5ae50d1c4 100644 --- a/packages/fill-scenarios/CHANGELOG.md +++ b/packages/fill-scenarios/CHANGELOG.md @@ -5,7 +5,11 @@ Edit the package's CHANGELOG.json file only. CHANGELOG -## v1.0.1-rc.3 - _August 13, 2018_ +## v1.0.1-rc.4 - _August 24, 2018_ + + * Dependencies updated + +## v1.0.1-rc.3 - _August 14, 2018_ * Updated to use latest orderFactory interface, fixed `feeRecipient` spelling error in public interface (#936) * Dependencies updated @@ -22,7 +26,7 @@ CHANGELOG * Dependencies updated -## v1.0.0-rc.1 - _July 19, 2018_ +## v1.0.0-rc.1 - _July 20, 2018_ * Make fill-scenarios compatible with V2 of 0x protocol (#656) diff --git a/packages/forwarder-helper/.npmignore b/packages/forwarder-helper/.npmignore new file mode 100644 index 000000000..5333847e7 --- /dev/null +++ b/packages/forwarder-helper/.npmignore @@ -0,0 +1,8 @@ +.* +yarn-error.log +/src/ +/scripts/ +/schemas/ +test/ +tsconfig.json +/lib/src/monorepo_scripts/ diff --git a/packages/forwarder-helper/CHANGELOG.json b/packages/forwarder-helper/CHANGELOG.json new file mode 100644 index 000000000..b99a98b93 --- /dev/null +++ b/packages/forwarder-helper/CHANGELOG.json @@ -0,0 +1,12 @@ +[ + { + "version": "1.0.1-rc.1", + "changes": [ + { + "note": "Add initial forwarderHelperFactory", + "pr": 997 + } + ], + "timestamp": 1535133899 + } +] diff --git a/packages/forwarder-helper/CHANGELOG.md b/packages/forwarder-helper/CHANGELOG.md new file mode 100644 index 000000000..6d48268e6 --- /dev/null +++ b/packages/forwarder-helper/CHANGELOG.md @@ -0,0 +1,10 @@ +<!-- +changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly. +Edit the package's CHANGELOG.json file only. +--> + +CHANGELOG + +## v1.0.1-rc.1 - _August 24, 2018_ + + * Add initial forwarderHelperFactory (#997) diff --git a/packages/forwarder-helper/README.md b/packages/forwarder-helper/README.md new file mode 100644 index 000000000..c74526910 --- /dev/null +++ b/packages/forwarder-helper/README.md @@ -0,0 +1,83 @@ +## @0xproject/forwarder-helper + +Provides convenience objects to help work with the Forwarder Contract + +### Read the [Documentation](https://0xproject.com/docs/forwarder-helper). + +## Installation + +```bash +yarn add @0xproject/forwarder-helper +``` + +**Import** + +```typescript +import { forwarderHelperFactory } from '@0xproject/forwarder-helper'; +``` + +or + +```javascript +var forwarderHelperFactory = require('@0xproject/forwarder-helper').forwarderHelperFactory; +``` + +If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`: + +```json +"compilerOptions": { + "typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"], +} +``` + +## Contributing + +We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. + +Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. + +### 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 +``` + +### Build + +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: + +```bash +PKG=@0xproject/forwarder-helper yarn build +``` + +Or continuously rebuild on change: + +```bash +PKG=@0xproject/forwarder-helper yarn watch +``` + +### Clean + +```bash +yarn clean +``` + +### Lint + +```bash +yarn lint +``` + +### Run Tests + +```bash +yarn test +``` diff --git a/packages/forwarder-helper/package.json b/packages/forwarder-helper/package.json new file mode 100644 index 000000000..fcb483885 --- /dev/null +++ b/packages/forwarder-helper/package.json @@ -0,0 +1,74 @@ +{ + "name": "@0xproject/forwarder-helper", + "version": "1.0.0-rc.1", + "engines": { + "node": ">=6.12" + }, + "description": "Convenience object for working with the forwarder contract", + "main": "lib/src/index.js", + "types": "lib/src/index.d.ts", + "scripts": { + "watch_without_deps": "tsc -w", + "lint": "tslint --project .", + "test": "yarn run_mocha", + "rebuild_and_test": "run-s clean build test", + "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", + "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", + "test:circleci": "yarn test:coverage", + "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 --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" + }, + "config": { + "postpublish": { + "assets": [] + } + }, + "repository": { + "type": "git", + "url": "https://github.com/0xProject/0x-monorepo.git" + }, + "author": "", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/0xProject/0x-monorepo/issues" + }, + "homepage": "https://github.com/0xProject/0x-monorepo/packages/forwarder-helper/README.md", + "dependencies": { + "@0xproject/assert": "^1.0.5", + "@0xproject/json-schemas": "^1.0.1-rc.4", + "@0xproject/order-utils": "^1.0.1-rc.3", + "@0xproject/types": "^1.0.1-rc.4", + "@0xproject/typescript-typings": "^1.0.4", + "@0xproject/utils": "^1.0.5", + "@types/node": "^8.0.53", + "lodash": "^4.17.10" + }, + "devDependencies": { + "@0xproject/tslint-config": "^1.0.5", + "@types/lodash": "^4.14.116", + "@types/mocha": "^2.2.42", + "chai": "^4.0.1", + "chai-as-promised": "^7.1.0", + "chai-bignumber": "^2.0.1", + "copyfiles": "^1.2.0", + "dirty-chai": "^2.0.1", + "make-promises-safe": "^1.1.0", + "mocha": "^4.1.0", + "npm-run-all": "^4.1.2", + "nyc": "^11.0.1", + "shx": "^0.2.2", + "tslint": "5.11.0", + "typedoc": "0xProject/typedoc", + "typescript": "3.0.1" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/packages/forwarder-helper/src/constants.ts b/packages/forwarder-helper/src/constants.ts new file mode 100644 index 000000000..0ad30e4c0 --- /dev/null +++ b/packages/forwarder-helper/src/constants.ts @@ -0,0 +1,5 @@ +import { BigNumber } from '@0xproject/utils'; + +export const constants = { + ZERO_AMOUNT: new BigNumber(0), +}; diff --git a/packages/forwarder-helper/src/forwarder_helper_factory.ts b/packages/forwarder-helper/src/forwarder_helper_factory.ts new file mode 100644 index 000000000..95f11f555 --- /dev/null +++ b/packages/forwarder-helper/src/forwarder_helper_factory.ts @@ -0,0 +1,25 @@ +import { assert } from '@0xproject/assert'; +import { schemas } from '@0xproject/json-schemas'; +import { SignedOrder } from '@0xproject/types'; + +import { ForwarderHelperImpl, ForwarderHelperImplConfig } from './forwarder_helper_impl'; +import { ForwarderHelper } from './types'; + +export const forwarderHelperFactory = { + /** + * Given an array of orders and an array of feeOrders + * @param orders An array of objects conforming to SignedOrder. Each order should specify the same makerAssetData and takerAssetData + * @param feeOrders An array of objects conforming to SignedOrder. Each order should specify ZRX as makerAssetData WETH as takerAssetData + * @return A ForwarderHelper, see type for definition + */ + getForwarderHelperForOrders(orders: SignedOrder[], feeOrders: SignedOrder[] = []): ForwarderHelper { + assert.doesConformToSchema('orders', orders, schemas.signedOrdersSchema); + assert.doesConformToSchema('feeOrders', orders, schemas.signedOrdersSchema); + const config: ForwarderHelperImplConfig = { + orders, + feeOrders, + }; + const helper = new ForwarderHelperImpl(config); + return helper; + }, +}; diff --git a/packages/forwarder-helper/src/forwarder_helper_impl.ts b/packages/forwarder-helper/src/forwarder_helper_impl.ts new file mode 100644 index 000000000..a90edb0bb --- /dev/null +++ b/packages/forwarder-helper/src/forwarder_helper_impl.ts @@ -0,0 +1,64 @@ +import { marketUtils } from '@0xproject/order-utils'; +import { SignedOrder } from '@0xproject/types'; +import { BigNumber } from '@0xproject/utils'; +import * as _ from 'lodash'; + +import { constants } from './constants'; +import { ForwarderHelper, ForwarderHelperError, MarketBuyOrdersInfo, MarketBuyOrdersInfoRequest } from './types'; +import { forwarderHelperImplConfigUtils } from './utils/forwarder_helper_impl_config_utils'; + +const SLIPPAGE_PERCENTAGE = new BigNumber(0.2); // 20% slippage protection, possibly move this into request interface + +export interface ForwarderHelperImplConfig { + orders: SignedOrder[]; + feeOrders: SignedOrder[]; + remainingFillableMakerAssetAmounts?: BigNumber[]; + remainingFillableFeeAmounts?: BigNumber[]; +} + +export class ForwarderHelperImpl implements ForwarderHelper { + public readonly config: ForwarderHelperImplConfig; + constructor(config: ForwarderHelperImplConfig) { + this.config = forwarderHelperImplConfigUtils.sortedConfig(config); + } + public getMarketBuyOrdersInfo(request: MarketBuyOrdersInfoRequest): MarketBuyOrdersInfo { + const { makerAssetFillAmount, feePercentage } = request; + const { orders, feeOrders, remainingFillableMakerAssetAmounts, remainingFillableFeeAmounts } = this.config; + // TODO: make the slippage percentage customizable + const slippageBufferAmount = makerAssetFillAmount.mul(SLIPPAGE_PERCENTAGE).round(); + const { resultOrders, remainingFillAmount } = marketUtils.findOrdersThatCoverMakerAssetFillAmount( + orders, + makerAssetFillAmount, + { + remainingFillableMakerAssetAmounts, + slippageBufferAmount, + }, + ); + if (remainingFillAmount.gt(constants.ZERO_AMOUNT)) { + throw new Error(ForwarderHelperError.InsufficientMakerAssetLiquidity); + } + // TODO: update this logic to find the minimum amount of feeOrders to cover the worst case as opposed to + // finding order that cover all fees, this will help with estimating ETH and minimizing gas usage + const { resultFeeOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders( + resultOrders, + feeOrders, + { + remainingFillableMakerAssetAmounts, + remainingFillableFeeAmounts, + }, + ); + if (remainingFeeAmount.gt(constants.ZERO_AMOUNT)) { + throw new Error(ForwarderHelperError.InsufficientZrxLiquidity); + } + // TODO: calculate min and max eth usage + // TODO: optimize orders call data + return { + makerAssetFillAmount, + orders: resultOrders, + feeOrders: resultFeeOrders, + minEthAmount: constants.ZERO_AMOUNT, + maxEthAmount: constants.ZERO_AMOUNT, + feePercentage, + }; + } +} diff --git a/packages/forwarder-helper/src/globals.d.ts b/packages/forwarder-helper/src/globals.d.ts new file mode 100644 index 000000000..94e63a32d --- /dev/null +++ b/packages/forwarder-helper/src/globals.d.ts @@ -0,0 +1,6 @@ +declare module '*.json' { + const json: any; + /* tslint:disable */ + export default json; + /* tslint:enable */ +} diff --git a/packages/forwarder-helper/src/index.ts b/packages/forwarder-helper/src/index.ts new file mode 100644 index 000000000..eb3a34bd5 --- /dev/null +++ b/packages/forwarder-helper/src/index.ts @@ -0,0 +1,2 @@ +export { forwarderHelperFactory } from './forwarder_helper_factory'; +export { ForwarderHelper, ForwarderHelperError, MarketBuyOrdersInfoRequest, MarketBuyOrdersInfo } from './types'; diff --git a/packages/forwarder-helper/src/types.ts b/packages/forwarder-helper/src/types.ts new file mode 100644 index 000000000..fb171cc90 --- /dev/null +++ b/packages/forwarder-helper/src/types.ts @@ -0,0 +1,43 @@ +import { SignedOrder } from '@0xproject/types'; +import { BigNumber } from '@0xproject/utils'; + +export interface ForwarderHelper { + /** + * Given a MarketBuyOrdersInfoRequest, returns a MarketBuyOrdersInfo containing all information relevant to fulfilling the request + * using the ForwarderContract marketBuyOrdersWithEth function. + * @param request An object that conforms to MarketBuyOrdersInfoRequest. See type definition for more information. + * @return An object that conforms to MarketBuyOrdersInfo that satisfies the request. See type definition for more information. + */ + getMarketBuyOrdersInfo: (request: MarketBuyOrdersInfoRequest) => MarketBuyOrdersInfo; +} + +export enum ForwarderHelperError { + InsufficientMakerAssetLiquidity = 'INSUFFICIENT_MAKER_ASSET_LIQUIDITY', + InsufficientZrxLiquidity = 'INSUFFICIENT_ZRX_LIQUIDITY', +} + +/** + * makerAssetFillAmount: The amount of makerAsset requesting to be filled + * feePercentage: Optional affiliate percentage amount factoring into eth amount calculations + */ +export interface MarketBuyOrdersInfoRequest { + makerAssetFillAmount: BigNumber; + feePercentage?: BigNumber; +} + +/** + * makerAssetFillAmount: The amount of makerAsset requesting to be filled + * orders: An array of objects conforming to SignedOrder. These orders can be used to cover the requested makerAssetFillAmount plus slippage + * feeOrders: An array of objects conforming to SignedOrder. These orders can be used to cover the fees for the orders param above + * minEthAmount: Amount of eth in wei to send with the tx for the most optimistic case + * maxEthAmount: Amount of eth in wei to send with the tx for the worst case + * feePercentage: Affiliate fee percentage used to calculate the eth amounts above. Passed thru directly from the request + */ +export interface MarketBuyOrdersInfo { + makerAssetFillAmount: BigNumber; + orders: SignedOrder[]; + feeOrders: SignedOrder[]; + minEthAmount: BigNumber; + maxEthAmount: BigNumber; + feePercentage?: BigNumber; +} diff --git a/packages/forwarder-helper/src/utils/forwarder_helper_impl_config_utils.ts b/packages/forwarder-helper/src/utils/forwarder_helper_impl_config_utils.ts new file mode 100644 index 000000000..253384f65 --- /dev/null +++ b/packages/forwarder-helper/src/utils/forwarder_helper_impl_config_utils.ts @@ -0,0 +1,92 @@ +import { sortingUtils } from '@0xproject/order-utils'; +import { SignedOrder } from '@0xproject/types'; +import { BigNumber } from '@0xproject/utils'; +import * as _ from 'lodash'; + +import { ForwarderHelperImplConfig } from '../forwarder_helper_impl'; + +interface SignedOrderWithAmount extends SignedOrder { + remainingFillAmount: BigNumber; +} + +export const forwarderHelperImplConfigUtils = { + sortedConfig(config: ForwarderHelperImplConfig): ForwarderHelperImplConfig { + const { orders, feeOrders, remainingFillableMakerAssetAmounts, remainingFillableFeeAmounts } = config; + // TODO: provide a feeRate to the sorting function to more accurately sort based on the current market for ZRX tokens + const orderSorter = (ordersToSort: SignedOrder[]) => { + return sortingUtils.sortOrdersByFeeAdjustedRate(ordersToSort); + }; + const sortOrdersResult = sortOrdersAndRemainingFillAmounts( + orderSorter, + orders, + remainingFillableMakerAssetAmounts, + ); + const feeOrderSorter = (ordersToSort: SignedOrder[]) => { + return sortingUtils.sortFeeOrdersByFeeAdjustedRate(ordersToSort); + }; + const sortFeeOrdersResult = sortOrdersAndRemainingFillAmounts( + feeOrderSorter, + feeOrders, + remainingFillableFeeAmounts, + ); + return { + orders: sortOrdersResult.orders, + feeOrders: sortFeeOrdersResult.orders, + remainingFillableMakerAssetAmounts: sortOrdersResult.remainingFillAmounts, + remainingFillableFeeAmounts: sortFeeOrdersResult.remainingFillAmounts, + }; + }, +}; + +type OrderSorter = (orders: SignedOrder[]) => SignedOrder[]; + +function sortOrdersAndRemainingFillAmounts( + orderSorter: OrderSorter, + orders: SignedOrder[], + remainingFillAmounts?: BigNumber[], +): { orders: SignedOrder[]; remainingFillAmounts?: BigNumber[] } { + if (!_.isUndefined(remainingFillAmounts)) { + // Bundle orders together with their remainingFillAmounts so that we can sort them together + const orderWithAmounts = bundleSignedOrderWithAmounts(orders, remainingFillAmounts); + // Sort + const sortedOrderWithAmounts = orderSorter(orderWithAmounts) as SignedOrderWithAmount[]; + // Unbundle after sorting + const unbundledSortedOrderWithAmounts = unbundleSignedOrderWithAmounts(sortedOrderWithAmounts); + return { + orders: unbundledSortedOrderWithAmounts.orders, + remainingFillAmounts: unbundledSortedOrderWithAmounts.amounts, + }; + } else { + const sortedOrders = orderSorter(orders); + return { + orders: sortedOrders, + }; + } +} + +function bundleSignedOrderWithAmounts(orders: SignedOrder[], amounts: BigNumber[]): SignedOrderWithAmount[] { + const ordersAndAmounts = _.map(orders, (order, index) => { + return { + ...order, + remainingFillAmount: amounts[index], + }; + }); + return ordersAndAmounts; +} + +function unbundleSignedOrderWithAmounts( + signedOrderWithAmounts: SignedOrderWithAmount[], +): { orders: SignedOrder[]; amounts: BigNumber[] } { + const orders = _.map(signedOrderWithAmounts, order => { + const { remainingFillAmount, ...rest } = order; + return rest; + }); + const amounts = _.map(signedOrderWithAmounts, order => { + const { remainingFillAmount } = order; + return remainingFillAmount; + }); + return { + orders, + amounts, + }; +} diff --git a/packages/forwarder-helper/test/forwarder_helper_impl_test.ts b/packages/forwarder-helper/test/forwarder_helper_impl_test.ts new file mode 100644 index 000000000..3c3b6db92 --- /dev/null +++ b/packages/forwarder-helper/test/forwarder_helper_impl_test.ts @@ -0,0 +1,136 @@ +import { testOrderFactory } from '@0xproject/order-utils/lib/test/utils/test_order_factory'; +import { BigNumber } from '@0xproject/utils'; +import * as chai from 'chai'; +import * as _ from 'lodash'; +import 'mocha'; + +import { ForwarderHelperImpl, ForwarderHelperImplConfig } from '../src/forwarder_helper_impl'; +import { ForwarderHelperError } from '../src/types'; + +import { chaiSetup } from './utils/chai_setup'; + +chaiSetup.configure(); +const expect = chai.expect; + +describe('ForwarderHelperImpl', () => { + // rate: 2 takerAsset / makerAsset + const testOrder1 = testOrderFactory.generateTestSignedOrder({ + makerAssetAmount: new BigNumber(100), + takerAssetAmount: new BigNumber(200), + }); + // rate: 1 takerAsset / makerAsset + const testOrder2 = testOrderFactory.generateTestSignedOrder({ + makerAssetAmount: new BigNumber(100), + takerAssetAmount: new BigNumber(100), + }); + // rate: 3 takerAsset / makerAsset + const testOrder3 = testOrderFactory.generateTestSignedOrder({ + makerAssetAmount: new BigNumber(100), + takerAssetAmount: new BigNumber(300), + takerFee: new BigNumber(1), + }); + // rate: 3 WETH / ZRX + const testFeeOrder1 = testOrderFactory.generateTestSignedOrder({ + makerAssetAmount: new BigNumber(100), + takerAssetAmount: new BigNumber(300), + }); + // rate: 2 WETH / ZRX + const testFeeOrder2 = testOrderFactory.generateTestSignedOrder({ + makerAssetAmount: new BigNumber(100), + takerAssetAmount: new BigNumber(200), + }); + // rate: 1 WETH / ZRX + const testFeeOrder3 = testOrderFactory.generateTestSignedOrder({ + makerAssetAmount: new BigNumber(100), + takerAssetAmount: new BigNumber(100), + }); + const inputForwarderHelperConfig: ForwarderHelperImplConfig = { + orders: [testOrder1, testOrder2, testOrder3], + feeOrders: [testFeeOrder1, testFeeOrder2, testFeeOrder3], + remainingFillableMakerAssetAmounts: [new BigNumber(1), new BigNumber(2), new BigNumber(3)], + remainingFillableFeeAmounts: [new BigNumber(4), new BigNumber(5), new BigNumber(6)], + }; + describe('#constructor', () => { + const inputForwarderHelperConfigNoRemainingAmounts: ForwarderHelperImplConfig = { + orders: [testOrder1, testOrder2, testOrder3], + feeOrders: [testFeeOrder1, testFeeOrder2, testFeeOrder3], + }; + it('sorts orders', () => { + const forwarderHelper = new ForwarderHelperImpl(inputForwarderHelperConfig); + expect(forwarderHelper.config.orders).deep.equals([testOrder2, testOrder1, testOrder3]); + }); + it('sorts fee orders', () => { + const forwarderHelper = new ForwarderHelperImpl(inputForwarderHelperConfig); + expect(forwarderHelper.config.feeOrders).deep.equals([testFeeOrder3, testFeeOrder2, testFeeOrder1]); + }); + it('sorts remainingFillableMakerAssetAmounts', () => { + const forwarderHelper = new ForwarderHelperImpl(inputForwarderHelperConfig); + expect(forwarderHelper.config.remainingFillableMakerAssetAmounts).to.be.not.undefined(); + expect(_.nth(forwarderHelper.config.remainingFillableMakerAssetAmounts, 0)).to.bignumber.equal( + new BigNumber(2), + ); + expect(_.nth(forwarderHelper.config.remainingFillableMakerAssetAmounts, 1)).to.bignumber.equal( + new BigNumber(1), + ); + expect(_.nth(forwarderHelper.config.remainingFillableMakerAssetAmounts, 2)).to.bignumber.equal( + new BigNumber(3), + ); + }); + it('sorts remainingFillableFeeAmounts', () => { + const forwarderHelper = new ForwarderHelperImpl(inputForwarderHelperConfig); + expect(forwarderHelper.config.remainingFillableFeeAmounts).to.be.not.undefined(); + expect(_.nth(forwarderHelper.config.remainingFillableFeeAmounts, 0)).to.bignumber.equal(new BigNumber(6)); + expect(_.nth(forwarderHelper.config.remainingFillableFeeAmounts, 1)).to.bignumber.equal(new BigNumber(5)); + expect(_.nth(forwarderHelper.config.remainingFillableFeeAmounts, 2)).to.bignumber.equal(new BigNumber(4)); + }); + it('remainingFillableMakerAssetAmounts is undefined if none provided', () => { + const forwarderHelper = new ForwarderHelperImpl(inputForwarderHelperConfigNoRemainingAmounts); + expect(forwarderHelper.config.remainingFillableMakerAssetAmounts).to.be.undefined(); + }); + it('remainingFillableFeeAmounts is undefined if none provided', () => { + const forwarderHelper = new ForwarderHelperImpl(inputForwarderHelperConfigNoRemainingAmounts); + expect(forwarderHelper.config.remainingFillableFeeAmounts).to.be.undefined(); + }); + }); + describe('#getMarketBuyOrdersInfo', () => { + it('throws if not enough makerAsset liquidity', () => { + const forwarderHelper = new ForwarderHelperImpl(inputForwarderHelperConfig); + expect(() => { + // request for 6 makerAsset units, because we have exactly 6 available we should throw because there is a built in slippage buffer + forwarderHelper.getMarketBuyOrdersInfo({ + makerAssetFillAmount: new BigNumber(6), + }); + }).to.throw(ForwarderHelperError.InsufficientMakerAssetLiquidity); + }); + it('throws if not enough ZRX liquidity', () => { + const inputForwarderHelperConfigNoFees: ForwarderHelperImplConfig = { + orders: [testOrder1, testOrder2, testOrder3], + feeOrders: [], + }; + const forwarderHelper = new ForwarderHelperImpl(inputForwarderHelperConfigNoFees); + expect(() => { + // request for 4 makerAsset units, we need fees but no fee orders exist, show we should throw + forwarderHelper.getMarketBuyOrdersInfo({ + makerAssetFillAmount: new BigNumber(250), + }); + }).to.throw(ForwarderHelperError.InsufficientZrxLiquidity); + }); + it('passes the makerAssetFillAmount from the request to the info response', () => { + const forwarderHelper = new ForwarderHelperImpl(inputForwarderHelperConfig); + const makerAssetFillAmount = new BigNumber(4); + const info = forwarderHelper.getMarketBuyOrdersInfo({ + makerAssetFillAmount, + }); + expect(info.makerAssetFillAmount).to.bignumber.equal(makerAssetFillAmount); + }); + it('passes the feePercentage from the request to the info response', () => { + const forwarderHelper = new ForwarderHelperImpl(inputForwarderHelperConfig); + const feePercentage = new BigNumber(0.2); + const info = forwarderHelper.getMarketBuyOrdersInfo({ + makerAssetFillAmount: new BigNumber(4), + feePercentage, + }); + expect(info.feePercentage).to.bignumber.equal(feePercentage); + }); + }); +}); diff --git a/packages/forwarder-helper/test/utils/chai_setup.ts b/packages/forwarder-helper/test/utils/chai_setup.ts new file mode 100644 index 000000000..1a8733093 --- /dev/null +++ b/packages/forwarder-helper/test/utils/chai_setup.ts @@ -0,0 +1,13 @@ +import * as chai from 'chai'; +import chaiAsPromised = require('chai-as-promised'); +import ChaiBigNumber = require('chai-bignumber'); +import * as dirtyChai from 'dirty-chai'; + +export const chaiSetup = { + configure(): void { + chai.config.includeStack = true; + chai.use(ChaiBigNumber()); + chai.use(dirtyChai); + chai.use(chaiAsPromised); + }, +}; diff --git a/packages/forwarder-helper/tsconfig.json b/packages/forwarder-helper/tsconfig.json new file mode 100644 index 000000000..e35816553 --- /dev/null +++ b/packages/forwarder-helper/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig", + "compilerOptions": { + "outDir": "lib" + }, + "include": ["./src/**/*", "./test/**/*"] +} diff --git a/packages/forwarder-helper/tslint.json b/packages/forwarder-helper/tslint.json new file mode 100644 index 000000000..ffaefe83a --- /dev/null +++ b/packages/forwarder-helper/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": ["@0xproject/tslint-config"] +} diff --git a/packages/json-schemas/CHANGELOG.json b/packages/json-schemas/CHANGELOG.json index f22b78c2a..b17267414 100644 --- a/packages/json-schemas/CHANGELOG.json +++ b/packages/json-schemas/CHANGELOG.json @@ -6,7 +6,8 @@ "note": "Update incorrect relayer api fee recipients response schema", "pr": 974 } - ] + ], + "timestamp": 1535133899 }, { "version": "1.0.1-rc.4", diff --git a/packages/json-schemas/CHANGELOG.md b/packages/json-schemas/CHANGELOG.md index 0ebc3d237..e3fa8078d 100644 --- a/packages/json-schemas/CHANGELOG.md +++ b/packages/json-schemas/CHANGELOG.md @@ -5,7 +5,11 @@ Edit the package's CHANGELOG.json file only. CHANGELOG -## v1.0.1-rc.4 - _August 13, 2018_ +## v1.0.1-rc.5 - _August 24, 2018_ + + * Update incorrect relayer api fee recipients response schema (#974) + +## v1.0.1-rc.4 - _August 14, 2018_ * Allow for additional properties in txData schema (#938) * Change hexSchema to match `0x` (#937) @@ -27,7 +31,7 @@ CHANGELOG * Dependencies updated -## v1.0.0-rc.1 - _July 19, 2018_ +## v1.0.0-rc.1 - _July 20, 2018_ * Update schemas for V2 or 0x Protocol (#615) * Added CallData schema (#821) @@ -53,7 +57,7 @@ CHANGELOG * Dependencies updated -## v0.7.23 - _May 4, 2018_ +## v0.7.23 - _May 5, 2018_ * Dependencies updated diff --git a/packages/json-schemas/schemas/relayer_api_fee_recipients_response_schema.ts b/packages/json-schemas/schemas/relayer_api_fee_recipients_response_schema.ts index 4f96e5a2d..5f6bc0530 100644 --- a/packages/json-schemas/schemas/relayer_api_fee_recipients_response_schema.ts +++ b/packages/json-schemas/schemas/relayer_api_fee_recipients_response_schema.ts @@ -6,7 +6,6 @@ export const relayerApiFeeRecipientsResponseSchema = { { properties: { records: { - id: '/relayerApiFeeRecipientsSchema', type: 'array', items: { $ref: '/addressSchema' }, }, diff --git a/packages/migrations/CHANGELOG.json b/packages/migrations/CHANGELOG.json index f92bb48b4..17f185a9d 100644 --- a/packages/migrations/CHANGELOG.json +++ b/packages/migrations/CHANGELOG.json @@ -1,5 +1,14 @@ [ { + "timestamp": 1535133899, + "version": "1.0.5", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, + { "timestamp": 1534210131, "version": "1.0.4", "changes": [ diff --git a/packages/migrations/CHANGELOG.md b/packages/migrations/CHANGELOG.md index 7388c6ebc..0ebd03575 100644 --- a/packages/migrations/CHANGELOG.md +++ b/packages/migrations/CHANGELOG.md @@ -5,7 +5,11 @@ Edit the package's CHANGELOG.json file only. CHANGELOG -## v1.0.4 - _August 13, 2018_ +## v1.0.5 - _August 24, 2018_ + + * Dependencies updated + +## v1.0.4 - _August 14, 2018_ * Dependencies updated @@ -21,7 +25,7 @@ CHANGELOG * Dependencies updated -## v1.0.0 - _July 19, 2018_ +## v1.0.0 - _July 20, 2018_ * Added migrations for 0x Protocol v2 @@ -45,7 +49,7 @@ CHANGELOG * Dependencies updated -## v0.0.5 - _May 4, 2018_ +## v0.0.5 - _May 5, 2018_ * Dependencies updated diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts index d9e09bdeb..7e2e64536 100644 --- a/packages/monorepo-scripts/src/publish.ts +++ b/packages/monorepo-scripts/src/publish.ts @@ -18,7 +18,6 @@ import { DocGenerateAndUploadUtils } from './utils/doc_generate_and_upload_utils import { publishReleaseNotesAsync } from './utils/github_release_utils'; import { utils } from './utils/utils'; -const DOC_GEN_COMMAND = 'docs:json'; const NPM_NAMESPACE = '@0xproject/'; const TODAYS_TIMESTAMP = moment().unix(); @@ -88,7 +87,7 @@ async function confirmAsync(message: string): Promise<void> { function getPackagesWithDocs(allUpdatedPackages: Package[]): Package[] { const rootPackageJsonPath = `${constants.monorepoRootPath}/package.json`; const rootPackageJson = JSON.parse(fs.readFileSync(rootPackageJsonPath).toString()); - const packagesWithDocPagesStringIfExist = _.get(rootPackageJson, 'configs.packagesWithDocPages', undefined); + const packagesWithDocPagesStringIfExist = _.get(rootPackageJson, 'config.packagesWithDocPages', undefined); if (_.isUndefined(packagesWithDocPagesStringIfExist)) { return []; // None to generate & publish } diff --git a/packages/order-utils/CHANGELOG.json b/packages/order-utils/CHANGELOG.json index cd2a742d2..81782b501 100644 --- a/packages/order-utils/CHANGELOG.json +++ b/packages/order-utils/CHANGELOG.json @@ -24,8 +24,23 @@ "note": "Export types: `SignedOrder`, `Order`, `OrderRelevantState`, `OrderState`, `ECSignature`, `ERC20AssetData`, `ERC721AssetData`, `AssetProxyId`, `SignerType`, `SignatureType`, `OrderStateValid`, `OrderStateInvalid`, `ExchangeContractErrs`, `TradeSide`, `TransferType`, `FindFeeOrdersThatCoverFeesForTargetOrdersOpts`, `FindOrdersThatCoverMakerAssetFillAmountOpts`, `FeeOrdersAndRemainingFeeAmount`, `OrdersAndRemainingFillAmount`, `Provider`, `JSONRPCRequestPayload`, `JSONRPCErrorCallback` and `JSONRPCResponsePayload`", "pr": 924 + }, + { + "note": + "Rename `resultOrders` to `resultFeeOrders` for object returned by `findFeeOrdersThatCoverFeesForTargetOrders` in `marketUtils` api", + "pr": 997 + }, + { + "note": "Make `sortFeeOrdersByFeeAdjustedRate` in `sortingUtils` generic", + "pr": 997 + }, + { + "note": + "Update `findFeeOrdersThatCoverFeesForTargetOrders` to round the the nearest integer when calculating required fees", + "pr": 997 } - ] + ], + "timestamp": 1535133899 }, { "version": "1.0.1-rc.3", diff --git a/packages/order-utils/CHANGELOG.md b/packages/order-utils/CHANGELOG.md index 0df2a6a75..7af51fc61 100644 --- a/packages/order-utils/CHANGELOG.md +++ b/packages/order-utils/CHANGELOG.md @@ -5,7 +5,18 @@ Edit the package's CHANGELOG.json file only. CHANGELOG -## v1.0.1-rc.3 - _August 13, 2018_ +## v1.0.1-rc.4 - _August 24, 2018_ + + * Remove rounding error being thrown when maker amount is very small (#959) + * Added rateUtils and sortingUtils (#953) + * Update marketUtils api such that all optional parameters are bundled into one optional param and more defaults are provided (#954) + * Instead of exporting signature util methods individually, they are now exported as `signatureUtils` (#924) + * Export types: `SignedOrder`, `Order`, `OrderRelevantState`, `OrderState`, `ECSignature`, `ERC20AssetData`, `ERC721AssetData`, `AssetProxyId`, `SignerType`, `SignatureType`, `OrderStateValid`, `OrderStateInvalid`, `ExchangeContractErrs`, `TradeSide`, `TransferType`, `FindFeeOrdersThatCoverFeesForTargetOrdersOpts`, `FindOrdersThatCoverMakerAssetFillAmountOpts`, `FeeOrdersAndRemainingFeeAmount`, `OrdersAndRemainingFillAmount`, `Provider`, `JSONRPCRequestPayload`, `JSONRPCErrorCallback` and `JSONRPCResponsePayload` (#924) + * Rename `resultOrders` to `resultFeeOrders` for object returned by `findFeeOrdersThatCoverFeesForTargetOrders` in `marketUtils` api (#997) + * Make `sortFeeOrdersByFeeAdjustedRate` in `sortingUtils` generic (#997) + * Update `findFeeOrdersThatCoverFeesForTargetOrders` to round the the nearest integer when calculating required fees (#997) + +## v1.0.1-rc.3 - _August 14, 2018_ * Update ecSignOrderHashAsync to return signature string with signature type byte. Removes messagePrefixOpts. (#914) * Added a synchronous `createOrder` method in `orderFactory`, updated public interfaces to support some optional parameters (#936) @@ -28,7 +39,7 @@ CHANGELOG * Upgrade ethereumjs-abi dep including a fix so that addresses starting with 0 are properly decoded by `decodeERC20AssetData` -## v1.0.0-rc.1 - _July 19, 2018_ +## v1.0.0-rc.1 - _July 20, 2018_ * Refactor to work with V2 of 0x protocol (#636) * Export parseECSignature method (#684) @@ -54,7 +65,7 @@ CHANGELOG * Add orderStateUtils, a module for computing order state needed to decide if an order is still valid -## v0.0.4 - _May 4, 2018_ +## v0.0.4 - _May 5, 2018_ * Dependencies updated diff --git a/packages/order-utils/src/market_utils.ts b/packages/order-utils/src/market_utils.ts index 441c50e5c..4a664cb14 100644 --- a/packages/order-utils/src/market_utils.ts +++ b/packages/order-utils/src/market_utils.ts @@ -128,7 +128,7 @@ export const marketUtils = { const makerAssetAmountAvailable = remainingFillableMakerAssetAmounts[index]; const feeToFillMakerAssetAmountAvailable = makerAssetAmountAvailable .mul(order.takerFee) - .div(order.makerAssetAmount); + .dividedToIntegerBy(order.makerAssetAmount); return accFees.plus(feeToFillMakerAssetAmountAvailable); }, constants.ZERO_AMOUNT, @@ -142,7 +142,7 @@ export const marketUtils = { }, ); return { - resultOrders, + resultFeeOrders: resultOrders, remainingFeeAmount: remainingFillAmount, }; // TODO: add more orders here to cover rounding diff --git a/packages/order-utils/src/sorting_utils.ts b/packages/order-utils/src/sorting_utils.ts index 8811bcaf8..cd5163cf6 100644 --- a/packages/order-utils/src/sorting_utils.ts +++ b/packages/order-utils/src/sorting_utils.ts @@ -32,7 +32,7 @@ export const sortingUtils = { * the makerAsset and WETH as the takerAsset. * @return The input orders sorted by rate in ascending order */ - sortFeeOrdersByFeeAdjustedRate(feeOrders: Order[]): Order[] { + sortFeeOrdersByFeeAdjustedRate<T extends Order>(feeOrders: T[]): T[] { assert.doesConformToSchema('feeOrders', feeOrders, schemas.ordersSchema); const rateCalculator = rateUtils.getFeeAdjustedRateOfFeeOrder.bind(rateUtils); const sortedOrders = sortOrders(feeOrders, rateCalculator); diff --git a/packages/order-utils/src/types.ts b/packages/order-utils/src/types.ts index 4088805dc..09292e557 100644 --- a/packages/order-utils/src/types.ts +++ b/packages/order-utils/src/types.ts @@ -71,7 +71,7 @@ export interface FindFeeOrdersThatCoverFeesForTargetOrdersOpts { } export interface FeeOrdersAndRemainingFeeAmount<T> { - resultOrders: T[]; + resultFeeOrders: T[]; remainingFeeAmount: BigNumber; } diff --git a/packages/order-utils/test/market_utils_test.ts b/packages/order-utils/test/market_utils_test.ts index cce97e0e4..31986ba1a 100644 --- a/packages/order-utils/test/market_utils_test.ts +++ b/packages/order-utils/test/market_utils_test.ts @@ -140,11 +140,11 @@ describe('marketUtils', () => { ); describe('no target orders', () => { it('returns empty and zero remainingFeeAmount', async () => { - const { resultOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders( + const { resultFeeOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders( [], inputFeeOrders, ); - expect(resultOrders).to.be.empty; + expect(resultFeeOrders).to.be.empty; expect(remainingFeeAmount).to.be.bignumber.equal(constants.ZERO_AMOUNT); }); }); @@ -163,14 +163,14 @@ describe('marketUtils', () => { // generate remainingFillableMakerAssetAmounts that equal the makerAssetAmount const remainingFillableMakerAssetAmounts = [makerAssetAmount, makerAssetAmount, makerAssetAmount]; it('returns empty and non-zero remainingFeeAmount', async () => { - const { resultOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders( + const { resultFeeOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders( inputOrders, [], { remainingFillableMakerAssetAmounts, }, ); - expect(resultOrders).to.be.empty; + expect(resultFeeOrders).to.be.empty; expect(remainingFeeAmount).to.be.bignumber.equal(new BigNumber(30)); }); }); @@ -184,11 +184,11 @@ describe('marketUtils', () => { 3, ); it('returns empty and zero remainingFeeAmount', async () => { - const { resultOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders( + const { resultFeeOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders( inputOrders, inputFeeOrders, ); - expect(resultOrders).to.be.empty; + expect(resultFeeOrders).to.be.empty; expect(remainingFeeAmount).to.be.bignumber.equal(constants.ZERO_AMOUNT); }); }); @@ -205,11 +205,11 @@ describe('marketUtils', () => { 3, ); it('returns input fee orders and zero remainingFeeAmount', async () => { - const { resultOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders( + const { resultFeeOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders( inputOrders, inputFeeOrders, ); - expect(resultOrders).to.be.deep.equal(inputFeeOrders); + expect(resultFeeOrders).to.be.deep.equal(inputFeeOrders); expect(remainingFeeAmount).to.be.bignumber.equal(constants.ZERO_AMOUNT); }); }); @@ -231,14 +231,14 @@ describe('marketUtils', () => { // 3. order is completely fillable const remainingFillableMakerAssetAmounts = [constants.ZERO_AMOUNT, new BigNumber(5), makerAssetAmount]; it('returns first two input fee orders and zero remainingFeeAmount', async () => { - const { resultOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders( + const { resultFeeOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders( inputOrders, inputFeeOrders, { remainingFillableMakerAssetAmounts, }, ); - expect(resultOrders).to.be.deep.equal([inputFeeOrders[0], inputFeeOrders[1]]); + expect(resultFeeOrders).to.be.deep.equal([inputFeeOrders[0], inputFeeOrders[1]]); expect(remainingFeeAmount).to.be.bignumber.equal(constants.ZERO_AMOUNT); }); }); @@ -255,11 +255,11 @@ describe('marketUtils', () => { 3, ); it('returns input fee orders and non-zero remainingFeeAmount', async () => { - const { resultOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders( + const { resultFeeOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders( inputOrders, inputFeeOrders, ); - expect(resultOrders).to.be.deep.equal(inputFeeOrders); + expect(resultFeeOrders).to.be.deep.equal(inputFeeOrders); expect(remainingFeeAmount).to.be.bignumber.equal(new BigNumber(30)); }); }); diff --git a/packages/order-watcher/CHANGELOG.json b/packages/order-watcher/CHANGELOG.json index ee6d5540a..fe38e2175 100644 --- a/packages/order-watcher/CHANGELOG.json +++ b/packages/order-watcher/CHANGELOG.json @@ -11,7 +11,8 @@ "note": "Remove exporting types: `BlockParamLiteral`, `BlockParam`, `Order`", "pr": 924 } - ] + ], + "timestamp": 1535133899 }, { "version": "1.0.1-rc.3", diff --git a/packages/order-watcher/CHANGELOG.md b/packages/order-watcher/CHANGELOG.md index bb92f2850..73bfd5114 100644 --- a/packages/order-watcher/CHANGELOG.md +++ b/packages/order-watcher/CHANGELOG.md @@ -5,7 +5,12 @@ Edit the package's CHANGELOG.json file only. CHANGELOG -## v1.0.1-rc.3 - _August 13, 2018_ +## v1.0.1-rc.4 - _August 24, 2018_ + + * Export types: `ExchangeContractErrs`, `OrderRelevantState`, `JSONRPCRequestPayload`, `JSONRPCErrorCallback` and `JSONRPCResponsePayload` (#924) + * Remove exporting types: `BlockParamLiteral`, `BlockParam`, `Order` (#924) + +## v1.0.1-rc.3 - _August 14, 2018_ * Dependencies updated @@ -21,7 +26,7 @@ CHANGELOG * Dependencies updated -## v1.0.0-rc.1 - _July 19, 2018_ +## v1.0.0-rc.1 - _July 20, 2018_ * Add support for ERC721 event watching and Exchange V2 events (#887) diff --git a/packages/react-docs/CHANGELOG.json b/packages/react-docs/CHANGELOG.json index 2b83b7fae..5ca4f4d05 100644 --- a/packages/react-docs/CHANGELOG.json +++ b/packages/react-docs/CHANGELOG.json @@ -1,5 +1,14 @@ [ { + "timestamp": 1535133899, + "version": "1.0.6", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, + { "timestamp": 1534210131, "version": "1.0.5", "changes": [ diff --git a/packages/react-docs/CHANGELOG.md b/packages/react-docs/CHANGELOG.md index 38d2451dd..09d666d75 100644 --- a/packages/react-docs/CHANGELOG.md +++ b/packages/react-docs/CHANGELOG.md @@ -5,7 +5,11 @@ Edit the package's CHANGELOG.json file only. CHANGELOG -## v1.0.5 - _August 13, 2018_ +## v1.0.6 - _August 24, 2018_ + + * Dependencies updated + +## v1.0.5 - _August 14, 2018_ * Dependencies updated @@ -25,7 +29,7 @@ CHANGELOG * Dependencies updated -## v1.0.0 - _July 19, 2018_ +## v1.0.0 - _July 20, 2018_ * Dependencies updated @@ -45,7 +49,7 @@ CHANGELOG * Dependencies updated -## v0.0.13 - _May 31, 2018_ +## v0.0.13 - _June 1, 2018_ * Incorrect publish that was unpublished @@ -53,7 +57,7 @@ CHANGELOG * Dependencies updated -## v0.0.11 - _May 4, 2018_ +## v0.0.11 - _May 5, 2018_ * Dependencies updated diff --git a/packages/react-shared/CHANGELOG.json b/packages/react-shared/CHANGELOG.json index 1268bcc7b..01e97f9e7 100644 --- a/packages/react-shared/CHANGELOG.json +++ b/packages/react-shared/CHANGELOG.json @@ -1,5 +1,14 @@ [ { + "timestamp": 1535133899, + "version": "1.0.7", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, + { "timestamp": 1534210131, "version": "1.0.6", "changes": [ diff --git a/packages/react-shared/CHANGELOG.md b/packages/react-shared/CHANGELOG.md index cfbaf6c70..b70db245c 100644 --- a/packages/react-shared/CHANGELOG.md +++ b/packages/react-shared/CHANGELOG.md @@ -5,7 +5,11 @@ Edit the package's CHANGELOG.json file only. CHANGELOG -## v1.0.6 - _August 13, 2018_ +## v1.0.7 - _August 24, 2018_ + + * Dependencies updated + +## v1.0.6 - _August 14, 2018_ * Dependencies updated @@ -29,7 +33,7 @@ CHANGELOG * Dependencies updated -## v1.0.0 - _July 19, 2018_ +## v1.0.0 - _July 20, 2018_ * Dependencies updated @@ -45,11 +49,11 @@ CHANGELOG * Dependencies updated -## v0.2.0 - _May 4, 2018_ +## v0.2.0 - _May 5, 2018_ * Removed portal specific colors -## v0.1.6 - _May 4, 2018_ +## v0.1.6 - _May 5, 2018_ * Dependencies updated diff --git a/packages/sol-compiler/CHANGELOG.json b/packages/sol-compiler/CHANGELOG.json index a723ea12e..b27253b01 100644 --- a/packages/sol-compiler/CHANGELOG.json +++ b/packages/sol-compiler/CHANGELOG.json @@ -15,7 +15,8 @@ "note": "Export types: `CompilerSettings`, `OutputField`", "pr": 924 } - ] + ], + "timestamp": 1535133899 }, { "timestamp": 1534210131, diff --git a/packages/sol-compiler/CHANGELOG.md b/packages/sol-compiler/CHANGELOG.md index ee9eadeaa..852015ff9 100644 --- a/packages/sol-compiler/CHANGELOG.md +++ b/packages/sol-compiler/CHANGELOG.md @@ -5,7 +5,13 @@ Edit the package's CHANGELOG.json file only. CHANGELOG -## v1.0.5 - _August 13, 2018_ +## v1.1.0 - _August 24, 2018_ + + * Quicken compilation by sending multiple contracts to the same solcjs invocation, batching them together based on compiler version requirements. (#965) + * Stop exporting types: `ContractArtifact`, `ContractNetworks` (#924) + * Export types: `CompilerSettings`, `OutputField` (#924) + +## v1.0.5 - _August 14, 2018_ * Dependencies updated @@ -25,7 +31,7 @@ CHANGELOG * Dependencies updated -## v1.0.0 - _July 19, 2018_ +## v1.0.0 - _July 20, 2018_ * Dependencies updated @@ -51,7 +57,7 @@ CHANGELOG * Properly export the executable binary (#588) * Add the ability to define a specific solidity version (#589) -## v0.4.3 - _May 4, 2018_ +## v0.4.3 - _May 5, 2018_ * Dependencies updated diff --git a/packages/sol-cov/CHANGELOG.json b/packages/sol-cov/CHANGELOG.json index 166bd9255..597ba4875 100644 --- a/packages/sol-cov/CHANGELOG.json +++ b/packages/sol-cov/CHANGELOG.json @@ -7,7 +7,8 @@ "Export types: `JSONRPCRequestPayload`, `Provider`, `JSONRPCErrorCallback`, `JSONRPCResponsePayload`, `JSONRPCRequestPayloadWithMethod`, `NextCallback`, `ErrorCallback`, `OnNextCompleted` and `Callback`", "pr": 924 } - ] + ], + "timestamp": 1535133899 }, { "version": "2.0.0", diff --git a/packages/sol-cov/CHANGELOG.md b/packages/sol-cov/CHANGELOG.md index d7bdb9614..819b58c95 100644 --- a/packages/sol-cov/CHANGELOG.md +++ b/packages/sol-cov/CHANGELOG.md @@ -5,7 +5,11 @@ Edit the package's CHANGELOG.json file only. CHANGELOG -## v2.0.0 - _August 13, 2018_ +## v2.1.0 - _August 24, 2018_ + + * Export types: `JSONRPCRequestPayload`, `Provider`, `JSONRPCErrorCallback`, `JSONRPCResponsePayload`, `JSONRPCRequestPayloadWithMethod`, `NextCallback`, `ErrorCallback`, `OnNextCompleted` and `Callback` (#924) + +## v2.0.0 - _August 14, 2018_ * Fix a bug when eth_call coverage was not computed because of silent schema validation failures (#938) * Make `TruffleArtifactAdapter` read the `truffle.js` config for `solc` settings (#938) @@ -24,7 +28,7 @@ CHANGELOG * Dependencies updated -## v1.0.0 - _July 19, 2018_ +## v1.0.0 - _July 20, 2018_ * Add artifact adapter as a parameter for `CoverageSubprovider`. Export `AbstractArtifactAdapter` (#589) * Implement `SolCompilerArtifactAdapter` and `TruffleArtifactAdapter` (#589) @@ -57,7 +61,7 @@ CHANGELOG * Dependencies updated -## v0.1.0 - _May 31, 2018_ +## v0.1.0 - _June 1, 2018_ * Incorrect publish that was unpublished @@ -65,7 +69,7 @@ CHANGELOG * Dependencies updated -## v0.0.10 - _May 4, 2018_ +## v0.0.10 - _May 5, 2018_ * Dependencies updated diff --git a/packages/sol-resolver/CHANGELOG.json b/packages/sol-resolver/CHANGELOG.json index 42d4c7ed1..cd1dcbe01 100644 --- a/packages/sol-resolver/CHANGELOG.json +++ b/packages/sol-resolver/CHANGELOG.json @@ -1,5 +1,14 @@ [ { + "timestamp": 1535133899, + "version": "1.0.6", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, + { "version": "1.0.5", "changes": [ { diff --git a/packages/sol-resolver/CHANGELOG.md b/packages/sol-resolver/CHANGELOG.md index 1427ec3fe..64ae2d673 100644 --- a/packages/sol-resolver/CHANGELOG.md +++ b/packages/sol-resolver/CHANGELOG.md @@ -5,7 +5,11 @@ Edit the package's CHANGELOG.json file only. CHANGELOG -## v1.0.5 - _August 13, 2018_ +## v1.0.6 - _August 24, 2018_ + + * Dependencies updated + +## v1.0.5 - _August 14, 2018_ * Fix a bug where RelativeFSResolver would crash when trying to read a directory (#909) * Fix a bug where NpmResolver would crash when trying to read a directory (#961) @@ -26,7 +30,7 @@ CHANGELOG * Dependencies updated -## v1.0.0 - _July 19, 2018_ +## v1.0.0 - _July 20, 2018_ * Fix a bug in FsResolver where it tries to read directories as files (#589) * Fix a bug in NameResolver where it is not ignoring .sol files (#589) @@ -39,7 +43,7 @@ CHANGELOG * Dependencies updated -## v0.0.6 - _May 31, 2018_ +## v0.0.6 - _June 1, 2018_ * Incorrect publish that was unpublished @@ -47,7 +51,7 @@ CHANGELOG * Dependencies updated -## v0.0.4 - _May 4, 2018_ +## v0.0.4 - _May 5, 2018_ * Dependencies updated diff --git a/packages/sra-report/CHANGELOG.json b/packages/sra-report/CHANGELOG.json index 9711d3935..eecb81312 100644 --- a/packages/sra-report/CHANGELOG.json +++ b/packages/sra-report/CHANGELOG.json @@ -1,5 +1,14 @@ [ { + "timestamp": 1535133899, + "version": "1.0.6", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, + { "timestamp": 1534210131, "version": "1.0.5", "changes": [ diff --git a/packages/sra-report/CHANGELOG.md b/packages/sra-report/CHANGELOG.md index 410221951..3ff6a73ae 100644 --- a/packages/sra-report/CHANGELOG.md +++ b/packages/sra-report/CHANGELOG.md @@ -5,7 +5,11 @@ Edit the package's CHANGELOG.json file only. CHANGELOG -## v1.0.5 - _August 13, 2018_ +## v1.0.6 - _August 24, 2018_ + + * Dependencies updated + +## v1.0.5 - _August 14, 2018_ * Dependencies updated @@ -25,7 +29,7 @@ CHANGELOG * Dependencies updated -## v1.0.0 - _July 19, 2018_ +## v1.0.0 - _July 20, 2018_ * Dependencies updated @@ -57,7 +61,7 @@ CHANGELOG * Properly export the executable binary (#588) -## v0.0.14 - _May 4, 2018_ +## v0.0.14 - _May 5, 2018_ * Dependencies updated diff --git a/packages/sra-spec/CHANGELOG.json b/packages/sra-spec/CHANGELOG.json index d6797cc45..8467f3c68 100644 --- a/packages/sra-spec/CHANGELOG.json +++ b/packages/sra-spec/CHANGELOG.json @@ -6,7 +6,8 @@ "note": "Add takerAddress to /orders parameters", "pr": 974 } - ] + ], + "timestamp": 1535133899 }, { "version": "1.0.1-rc.4", diff --git a/packages/sra-spec/CHANGELOG.md b/packages/sra-spec/CHANGELOG.md index ed0d4891b..1a88b0ce1 100644 --- a/packages/sra-spec/CHANGELOG.md +++ b/packages/sra-spec/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG -## v1.0.1-rc.4 - _August 13, 2018_ +## v1.0.1-rc.5 - _August 24, 2018_ + + * Add takerAddress to /orders parameters (#974) + +## v1.0.1-rc.4 - _August 14, 2018_ * Add inital spec for SRA v2 (#916) diff --git a/packages/subproviders/CHANGELOG.json b/packages/subproviders/CHANGELOG.json index bdda74c27..e11f663e6 100644 --- a/packages/subproviders/CHANGELOG.json +++ b/packages/subproviders/CHANGELOG.json @@ -7,7 +7,8 @@ "Export types: `PartialTxParams`, `JSONRPCRequestPayloadWithMethod`, `ECSignatureString`, `AccountFetchingConfigs`, `LedgerEthereumClientFactoryAsync`, `OnNextCompleted`, `MnemonicWalletSubproviderConfigs`, LedgerGetAddressResult, `JSONRPCRequestPayload`, `Provider`, `JSONRPCResponsePayload` and `JSONRPCErrorCallback`", "pr": 924 } - ] + ], + "timestamp": 1535133899 }, { "timestamp": 1534210131, diff --git a/packages/subproviders/CHANGELOG.md b/packages/subproviders/CHANGELOG.md index 152c0027e..444d1997a 100644 --- a/packages/subproviders/CHANGELOG.md +++ b/packages/subproviders/CHANGELOG.md @@ -5,7 +5,11 @@ Edit the package's CHANGELOG.json file only. CHANGELOG -## v1.0.5 - _August 13, 2018_ +## v2.0.0 - _August 24, 2018_ + + * Export types: `PartialTxParams`, `JSONRPCRequestPayloadWithMethod`, `ECSignatureString`, `AccountFetchingConfigs`, `LedgerEthereumClientFactoryAsync`, `OnNextCompleted`, `MnemonicWalletSubproviderConfigs`, LedgerGetAddressResult, `JSONRPCRequestPayload`, `Provider`, `JSONRPCResponsePayload` and `JSONRPCErrorCallback` (#924) + +## v1.0.5 - _August 14, 2018_ * Dependencies updated @@ -25,7 +29,7 @@ CHANGELOG * Dependencies updated -## v1.0.0 - _July 19, 2018_ +## v1.0.0 - _July 20, 2018_ * Add `RpcSubprovider` with timeout (#874) * Add `EthLightwalletSubprovider` (#775) @@ -46,7 +50,7 @@ CHANGELOG * Dependencies updated -## v0.10.1 - _May 4, 2018_ +## v0.10.1 - _May 5, 2018_ * Dependencies updated diff --git a/packages/tslint-config/CHANGELOG.json b/packages/tslint-config/CHANGELOG.json index 8bad8526a..b70285f05 100644 --- a/packages/tslint-config/CHANGELOG.json +++ b/packages/tslint-config/CHANGELOG.json @@ -1,5 +1,14 @@ [ { + "timestamp": 1535133899, + "version": "1.0.6", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, + { "timestamp": 1534210131, "version": "1.0.5", "changes": [ diff --git a/packages/tslint-config/CHANGELOG.md b/packages/tslint-config/CHANGELOG.md index 136441971..5474a08be 100644 --- a/packages/tslint-config/CHANGELOG.md +++ b/packages/tslint-config/CHANGELOG.md @@ -5,7 +5,11 @@ Edit the package's CHANGELOG.json file only. CHANGELOG -## v1.0.5 - _August 13, 2018_ +## v1.0.6 - _August 24, 2018_ + + * Dependencies updated + +## v1.0.5 - _August 14, 2018_ * Dependencies updated @@ -25,7 +29,7 @@ CHANGELOG * Dependencies updated -## v1.0.0 - _July 19, 2018_ +## v1.0.0 - _July 20, 2018_ * Added a bunch of rules (#883) @@ -37,7 +41,7 @@ CHANGELOG * Dependencies updated -## v0.4.19 - _May 31, 2018_ +## v0.4.19 - _June 1, 2018_ * Incorrect publish that was unpublished diff --git a/packages/types/CHANGELOG.json b/packages/types/CHANGELOG.json index b99a8bc35..fabc80ecf 100644 --- a/packages/types/CHANGELOG.json +++ b/packages/types/CHANGELOG.json @@ -6,7 +6,8 @@ "note": "Add revert reasons for ERC721Token", "pr": 933 } - ] + ], + "timestamp": 1535133899 }, { "version": "1.0.1-rc.4", diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 9be0c8bca..3bd1d375f 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -5,7 +5,11 @@ Edit the package's CHANGELOG.json file only. CHANGELOG -## v1.0.1-rc.4 - _August 13, 2018_ +## v1.0.1-rc.5 - _August 24, 2018_ + + * Add revert reasons for ERC721Token (#933) + +## v1.0.1-rc.4 - _August 14, 2018_ * Added SignerType to handle different signing prefix scenarios (#914) @@ -25,7 +29,7 @@ CHANGELOG * Dependencies updated -## v1.0.0-rc.1 - _July 19, 2018_ +## v1.0.0-rc.1 - _July 20, 2018_ * Updated types for V2 of 0x protocol * Add `ECSignatureBuffer` @@ -48,7 +52,7 @@ CHANGELOG * Make OpCode type an enum (#589) * Moved ExchangeContractErrs, DoneCallback, Token, OrderRelevantState, OrderStateValid, OrderStateInvalid, OrderState, OrderAddresses and OrderValues types from 0x.js (#579) -## v0.6.3 - _May 4, 2018_ +## v0.6.3 - _May 5, 2018_ * Dependencies updated diff --git a/packages/typescript-typings/CHANGELOG.json b/packages/typescript-typings/CHANGELOG.json index 566d9f24c..8e6b2b3c8 100644 --- a/packages/typescript-typings/CHANGELOG.json +++ b/packages/typescript-typings/CHANGELOG.json @@ -1,5 +1,14 @@ [ { + "timestamp": 1535133899, + "version": "1.0.5", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, + { "timestamp": 1534210131, "version": "1.0.4", "changes": [ diff --git a/packages/typescript-typings/CHANGELOG.md b/packages/typescript-typings/CHANGELOG.md index 70e6574b2..b3a3f3e38 100644 --- a/packages/typescript-typings/CHANGELOG.md +++ b/packages/typescript-typings/CHANGELOG.md @@ -5,7 +5,11 @@ Edit the package's CHANGELOG.json file only. CHANGELOG -## v1.0.4 - _August 13, 2018_ +## v1.0.5 - _August 24, 2018_ + + * Dependencies updated + +## v1.0.4 - _August 14, 2018_ * Dependencies updated @@ -21,7 +25,7 @@ CHANGELOG * Dependencies updated -## v1.0.0 - _July 19, 2018_ +## v1.0.0 - _July 20, 2018_ * Add types for `eth-lightwallet` (#775) * Improve 'web3-provider-engine' typings (#768) @@ -46,7 +50,7 @@ CHANGELOG * Dependencies updated -## v0.3.1 - _May 4, 2018_ +## v0.3.1 - _May 5, 2018_ * Dependencies updated diff --git a/packages/utils/CHANGELOG.json b/packages/utils/CHANGELOG.json index 796a99a5a..6edafb946 100644 --- a/packages/utils/CHANGELOG.json +++ b/packages/utils/CHANGELOG.json @@ -1,5 +1,14 @@ [ { + "timestamp": 1535133899, + "version": "1.0.6", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, + { "version": "1.0.5", "changes": [ { diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index bdde2687d..a2d4d115b 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -5,9 +5,14 @@ Edit the package's CHANGELOG.json file only. CHANGELOG -## v1.0.5 - _August 13, 2018_ +## v1.0.6 - _August 24, 2018_ + + * Dependencies updated + +## v1.0.5 - _August 14, 2018_ * Increased BigNumber decimal precision from 20 to 78 (#807) + * Store different ABIs for events with same function signature and different amount of indexed arguments (#933) ## v1.0.4 - _July 26, 2018_ @@ -25,7 +30,7 @@ CHANGELOG * Add `AbortController` polyfill to `fetchAsync` (#903) -## v1.0.0 - _July 19, 2018_ +## v1.0.0 - _July 20, 2018_ * Add `fetchAsync` which adds a default timeout to all requests (#874) @@ -43,7 +48,7 @@ CHANGELOG * Dependencies updated -## v0.7.0 - _May 31, 2018_ +## v0.7.0 - _June 1, 2018_ * Incorrect publish that was unpublished @@ -51,7 +56,7 @@ CHANGELOG * Dependencies updated -## v0.6.1 - _May 4, 2018_ +## v0.6.1 - _May 5, 2018_ * Dependencies updated diff --git a/packages/web3-wrapper/CHANGELOG.json b/packages/web3-wrapper/CHANGELOG.json index b9cde2f95..e2bbcaeb8 100644 --- a/packages/web3-wrapper/CHANGELOG.json +++ b/packages/web3-wrapper/CHANGELOG.json @@ -15,7 +15,8 @@ "note": "Export `AbiDecoder` class", "pr": 924 } - ] + ], + "timestamp": 1535133899 }, { "version": "1.2.0", diff --git a/packages/web3-wrapper/CHANGELOG.md b/packages/web3-wrapper/CHANGELOG.md index 0955993f4..3bfe07d3b 100644 --- a/packages/web3-wrapper/CHANGELOG.md +++ b/packages/web3-wrapper/CHANGELOG.md @@ -5,7 +5,13 @@ Edit the package's CHANGELOG.json file only. CHANGELOG -## v1.2.0 - _August 13, 2018_ +## v2.0.0 - _August 24, 2018_ + + * Export types: `BlockParam`, `TxData`, `Provider`, `TransactionReceipt`, `Transaction`, `TraceParams`, `TransactionTrace``, BlockWithoutTransactionDat`a, `LogEntry`, `FilterObject`, `CallData`, `TransactionReceiptWithDecodedLogs`, `BlockWithTransactionData``, LogTopi`c, `JSONRPCRequestPayload`, `TransactionReceiptStatus`, `DecodedLogArgs`, `StructLog`, `JSONRPCErrorCallback``, BlockParamLitera`l, `ContractEventArg`, `DecodedLogEntry`, `LogEntryEvent`, `OpCode`, `TxDataPayable`, `JSONRPCResponsePayload``, RawLogEntr`y, `DecodedLogEntryEvent`, `LogWithDecodedArgs`, `AbiDefinition`, `RawLog`, `FunctionAbi`, `EventAbi`, `EventParameter``, MethodAb`i, `ConstructorAbi`, `FallbackAbi`, `DataItem`, `ConstructorStateMutability` and `StateMutability` (#924) + * Stop exporting types: `CallTxDataBaseRPC` and `AbstractBlockRPC` (#924) + * Export `AbiDecoder` class (#924) + +## v1.2.0 - _August 14, 2018_ * Export marshaller to convert between RPC and user-space data formats (#938) * Export RPC types (#938) @@ -26,7 +32,7 @@ CHANGELOG * Dependencies updated -## v1.0.0 - _July 19, 2018_ +## v1.0.0 - _July 20, 2018_ * Stop exporting `marshaller` utility file. (#902) * Export `marshaller` utility file. (#829) @@ -45,7 +51,7 @@ CHANGELOG * Dependencies updated -## v0.7.0 - _June 3, 2018_ +## v0.7.0 - _June 4, 2018_ * Add `web3Wrapper.getContractCodeAsync` (#675) * Add `web3Wrapper.getTransactionTraceAsync` (#675) @@ -60,7 +66,7 @@ CHANGELOG * Dependencies updated -## v0.6.3 - _May 4, 2018_ +## v0.6.3 - _May 5, 2018_ * Dependencies updated diff --git a/packages/website/md/docs/connect/2.0.0/introduction.md b/packages/website/md/docs/connect/2.0.0/introduction.md new file mode 100644 index 000000000..de7ece7ae --- /dev/null +++ b/packages/website/md/docs/connect/2.0.0/introduction.md @@ -0,0 +1,3 @@ +<b>**NOTE:** Release candidate versions are meant to work with V2 of the Standard Relayer API. To interact with V1, select a 1.X version of connect.</b> + +Welcome to the [0x Connect](https://github.com/0xProject/0x-monorepo/tree/development/packages/connect) documentation! 0x Connect is 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). Functionality includes getting supported asset pairs from a relayer, getting orders filtered by different attributes, getting individual orders specified by order hash, getting orderbooks for specific asset pairs, getting fee information, and submitting orders. diff --git a/packages/website/ts/containers/connect_documentation.ts b/packages/website/ts/containers/connect_documentation.ts index 8b13081c6..90137243c 100644 --- a/packages/website/ts/containers/connect_documentation.ts +++ b/packages/website/ts/containers/connect_documentation.ts @@ -10,6 +10,7 @@ import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ const IntroMarkdownV1 = require('md/docs/connect/1.0.0/introduction'); +const IntroMarkdownV2 = require('md/docs/connect/2.0.0/introduction'); const InstallationMarkdownV1 = require('md/docs/connect/1.0.0/installation'); /* tslint:enable:no-var-requires */ @@ -33,6 +34,10 @@ const docsInfoConfig: DocsInfoConfig = { [markdownSections.introduction]: IntroMarkdownV1, [markdownSections.installation]: InstallationMarkdownV1, }, + '2.0.0-rc.1': { + [markdownSections.introduction]: IntroMarkdownV2, + [markdownSections.installation]: InstallationMarkdownV1, + }, }, markdownSections, }; @@ -966,6 +966,12 @@ version "2.0.0" resolved "https://registry.yarnpkg.com/@types/find-versions/-/find-versions-2.0.0.tgz#a976ca032ab8dd1161116604eded0620d2b85df2" +"@types/fs-extra@5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-5.0.0.tgz#d3e225b35eb5c6d3a5a782c28219df365c781413" + dependencies: + "@types/node" "*" + "@types/fs-extra@^5.0.3": version "5.0.4" resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-5.0.4.tgz#b971134d162cc0497d221adde3dbb67502225599" @@ -980,6 +986,10 @@ "@types/minimatch" "*" "@types/node" "*" +"@types/handlebars@4.0.36": + version "4.0.36" + resolved "https://registry.yarnpkg.com/@types/handlebars/-/handlebars-4.0.36.tgz#ff57c77fa1ab6713bb446534ddc4d979707a3a79" + "@types/handlebars@^4.0.36": version "4.0.37" resolved "https://registry.yarnpkg.com/@types/handlebars/-/handlebars-4.0.37.tgz#a3bc3eba0c0f03f753cac00841a5b21e26a02c03" @@ -994,6 +1004,10 @@ dependencies: "@types/node" "*" +"@types/highlight.js@9.12.2": + version "9.12.2" + resolved "https://registry.yarnpkg.com/@types/highlight.js/-/highlight.js-9.12.2.tgz#6ee7cd395effe5ec80b515d3ff1699068cd0cd1d" + "@types/highlight.js@^9.12.3": version "9.12.3" resolved "https://registry.yarnpkg.com/@types/highlight.js/-/highlight.js-9.12.3.tgz#b672cfaac25cbbc634a0fd92c515f66faa18dbca" @@ -1040,7 +1054,11 @@ version "4.14.104" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.104.tgz#53ee2357fa2e6e68379341d92eb2ecea4b11bb80" -"@types/lodash@^4.14.110": +"@types/lodash@4.14.99": + version "4.14.99" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.99.tgz#e6e10c0a4cc16c7409b3181f1e66880d2fb7d4dc" + +"@types/lodash@^4.14.110", "@types/lodash@^4.14.116": version "4.14.116" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.116.tgz#5ccf215653e3e8c786a58390751033a9adca0eb9" @@ -1048,6 +1066,10 @@ version "1.5.3" resolved "https://registry.yarnpkg.com/@types/loglevel/-/loglevel-1.5.3.tgz#adfce55383edc5998a2170ad581b3e23d6adb5b8" +"@types/marked@0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@types/marked/-/marked-0.3.0.tgz#583c223dd33385a1dda01aaf77b0cd0411c4b524" + "@types/marked@^0.4.0": version "0.4.0" resolved "https://registry.yarnpkg.com/@types/marked/-/marked-0.4.0.tgz#057a6165703e7419217f8ffc6887747f980b6315" @@ -1228,6 +1250,13 @@ "@types/express-serve-static-core" "*" "@types/mime" "*" +"@types/shelljs@0.7.7": + version "0.7.7" + resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.7.7.tgz#1f7bfa28947661afea06365db9b1135bbc903ec4" + dependencies: + "@types/glob" "*" + "@types/node" "*" + "@types/shelljs@^0.8.0": version "0.8.0" resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.8.0.tgz#0caa56b68baae4f68f44e0dd666ab30b098e3632" @@ -3810,6 +3839,17 @@ copy-webpack-plugin@^4.0.1: p-limit "^1.0.0" serialize-javascript "^1.4.0" +copyfiles@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-1.2.0.tgz#a8da3ac41aa2220ae29bd3c58b6984294f2c593c" + dependencies: + glob "^7.0.5" + ltcdr "^2.2.1" + minimatch "^3.0.3" + mkdirp "^0.5.1" + noms "0.0.0" + through2 "^2.0.1" + copyfiles@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.0.0.tgz#bbd78bb78e8fd6db5c67adf54249317b24560f2a" @@ -8631,6 +8671,10 @@ lru-cache@~2.2.1: version "2.2.4" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.2.4.tgz#6c658619becf14031d0d0b594b16042ce4dc063d" +ltcdr@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ltcdr/-/ltcdr-2.2.1.tgz#5ab87ad1d4c1dab8e8c08bbf037ee0c1902287cf" + ltgt@^2.1.2, ltgt@~2.2.0: version "2.2.1" resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.2.1.tgz#f35ca91c493f7b73da0e07495304f17b31f87ee5" @@ -8707,6 +8751,10 @@ marked@0.3.18: version "0.3.18" resolved "https://registry.npmjs.org/marked/-/marked-0.3.18.tgz#3ef058cd926101849b92a7a7c15db18c7fc76b2f" +marked@^0.3.12: + version "0.3.19" + resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.19.tgz#5d47f709c4c9fc3c216b6d46127280f40b39d790" + marked@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/marked/-/marked-0.4.0.tgz#9ad2c2a7a1791f10a852e0112f77b571dce10c66" @@ -12469,7 +12517,7 @@ shelljs@^0.7.3: interpret "^1.0.0" rechoir "^0.6.2" -shelljs@^0.8.0, shelljs@^0.8.2: +shelljs@^0.8.0, shelljs@^0.8.1, shelljs@^0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.2.tgz#345b7df7763f4c2340d584abb532c5f752ca9e35" dependencies: @@ -13852,6 +13900,28 @@ typedoc@0.12.0: typedoc-default-themes "^0.5.0" typescript "3.0.x" +typedoc@0xProject/typedoc: + version "0.10.0" + resolved "https://codeload.github.com/0xProject/typedoc/tar.gz/a9970a52f0924fec2df608abe30ff81153b3def2" + dependencies: + "@types/fs-extra" "5.0.0" + "@types/handlebars" "4.0.36" + "@types/highlight.js" "9.12.2" + "@types/lodash" "4.14.99" + "@types/marked" "0.3.0" + "@types/minimatch" "3.0.3" + "@types/shelljs" "0.7.7" + fs-extra "^5.0.0" + handlebars "^4.0.6" + highlight.js "^9.0.0" + lodash "^4.13.1" + marked "^0.3.12" + minimatch "^3.0.0" + progress "^2.0.0" + shelljs "^0.8.1" + typedoc-default-themes "^0.5.0" + typescript "2.7.1" + types-bn@^0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/types-bn/-/types-bn-0.0.1.tgz#4253c7c7251b14e1d77cdca6f58800e5e2b82c4b" |