Compare commits

...

43 Commits

Author SHA1 Message Date
Francesco Agosti
48e538f5c7 Merge pull request #910 from 0xProject/feature/website/upgrade-allowance-toggles-to-locks-and-checks
[website] Use new designs with tooltips for allowance toggles
2018-07-27 12:02:29 -07:00
fragosti
c851c37630 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/website/upgrade-allowance-toggles-to-locks-and-checks 2018-07-27 11:51:30 -07:00
fragosti
a0d7b1efa5 Remove unused variable 2018-07-27 11:49:06 -07:00
fragosti
1a06e6b305 Add loading state for initial load and other PR feedback 2018-07-27 11:48:04 -07:00
Fabio Berger
44d1be27e6 Add note about needing Yarn 1.6 to README 2018-07-27 12:22:43 +02:00
Alex Browne
554d5f97df Add combinatorial tests for internal Exchange functions (#807)
* WIP add combinatorial tests for internal Exchange functions

* Change combinitorial testing strategy based on feedback

* Check value of filled[orderHash] in updateFilledState tests

* Add combinatorial tests for addFillResults

* Add combinatorial tests for getPartialAmount

* Implement generic `testWithReferenceFuncAsync`

* Implement generic `testCombinatoriallyWithReferenceFuncAsync`

* Add combinatorial tests for isRoundingError

* Add combinatorial tests for calculateFillResults

* Add support for Geth in internal contract tests

* Fix contract artifacts

* Change DECIMAL_PLACES to 78 and add a note.

* Document new functions in utils

* Optimize tests by only reseting state when needed

* Rename/move some files

* Print parameter names on failure in testWithReferenceFuncAsync

* Add to changelog for utils package

* Appease various linters

* Rename some more things related to FillOrderCombinatorialUtils

* Remove .only from test/exchange/internal.ts

* Remove old test for isRoundingError and getPartialAmount

* Appease linters again

* Remove old todos

* Fix typos, add comments, rename some things

* Re-add some LibMath tests

* Update contract internal tests to use new SafeMath revert reasons

* Apply PR feedback from Amir

* Apply PR feedback from Remco

* Re-add networks to ZRXToken artifact

* Remove duplicate Whitelist in compiler.json
2018-07-26 22:09:55 -07:00
Fabio Berger
95c627f581 Publish
- 0x.js@1.0.1-rc.2
 - @0xproject/abi-gen@1.0.4
 - @0xproject/assert@1.0.4
 - @0xproject/base-contract@1.0.4
 - @0xproject/connect@1.0.4
 - @0xproject/contract-wrappers@1.0.1-rc.2
 - contracts@2.1.39
 - @0xproject/dev-utils@1.0.3
 - @0xproject/fill-scenarios@1.0.1-rc.2
 - @0xproject/json-schemas@1.0.1-rc.3
 - @0xproject/metacoin@0.0.14
 - @0xproject/migrations@1.0.3
 - @0xproject/order-utils@1.0.1-rc.2
 - @0xproject/order-watcher@1.0.1-rc.2
 - @0xproject/react-docs@1.0.4
 - @0xproject/react-docs-example@0.0.19
 - @0xproject/react-shared@1.0.5
 - @0xproject/sol-compiler@1.0.4
 - @0xproject/sol-cov@1.0.3
 - @0xproject/sol-resolver@1.0.4
 - @0xproject/sra-report@1.0.4
 - @0xproject/subproviders@1.0.4
 - @0xproject/testnet-faucets@1.0.40
 - @0xproject/types@1.0.1-rc.3
 - @0xproject/utils@1.0.4
 - @0xproject/web3-wrapper@1.1.2
 - @0xproject/website@0.0.43
2018-07-26 17:42:30 +02:00
Fabio Berger
512dbb448b Updated CHANGELOGS 2018-07-26 17:42:22 +02:00
Fabio Berger
b793c1cc73 Update yarn.lock 2018-07-26 17:20:48 +02:00
Fabio Berger
aea048ecc7 Point to actual current version 2018-07-26 17:19:26 +02:00
Fabio Berger
d0e6413fcf Add changelog entries for other RCs that did publish 2018-07-26 17:12:17 +02:00
Fabio Berger
3b7ad1688b Fix changelogs and package versions for ones that weren't published 2018-07-26 17:10:59 +02:00
Fabio Berger
e907b99314 Fix circle.yml 2018-07-26 16:57:08 +02:00
Fabio Berger
973bcb0483 Publish
- 0x.js@1.0.1-rc.2
 - @0xproject/abi-gen@1.0.3
 - @0xproject/assert@1.0.3
 - @0xproject/base-contract@1.0.3
 - @0xproject/connect@1.0.3
 - @0xproject/contract-wrappers@1.0.1-rc.2
 - contracts@2.1.38
 - @0xproject/dev-utils@1.0.3
 - ethereum-types@1.0.3
 - @0xproject/fill-scenarios@1.0.1-rc.2
 - @0xproject/json-schemas@1.0.1-rc.2
 - @0xproject/metacoin@0.0.13
 - @0xproject/migrations@1.0.3
 - @0xproject/monorepo-scripts@1.0.4
 - @0xproject/order-utils@1.0.1-rc.2
 - @0xproject/order-watcher@1.0.1-rc.2
 - @0xproject/react-docs@1.0.3
 - @0xproject/react-docs-example@0.0.18
 - @0xproject/react-shared@1.0.4
 - @0xproject/sol-compiler@1.0.3
 - @0xproject/sol-cov@1.0.3
 - @0xproject/sol-resolver@1.0.3
 - @0xproject/sra-report@1.0.3
 - @0xproject/subproviders@1.0.3
 - @0xproject/testnet-faucets@1.0.39
 - @0xproject/tslint-config@1.0.4
 - @0xproject/types@1.0.1-rc.2
 - @0xproject/typescript-typings@1.0.3
 - @0xproject/utils@1.0.3
 - @0xproject/web3-wrapper@1.1.1
 - @0xproject/website@0.0.42
2018-07-26 16:27:08 +02:00
Fabio Berger
87fb9a76ce Updated CHANGELOGS 2018-07-26 16:26:57 +02:00
Fabio Berger
0187e0c47d Still test unrunnable packages for compilation issues 2018-07-26 16:20:20 +02:00
Fabio Berger
8732d8ece8 Add changelog entries for next RC publish 2018-07-26 16:02:49 +02:00
Fabio Berger
2e7c130f62 Expose lerna dep 2018-07-26 16:00:46 +02:00
Fabio Berger
a90f434df5 Split running packages that cannot be run in a node.js script 2018-07-26 15:58:35 +02:00
Fabio Berger
3b005ad47c Fix accidental import from test folder 2018-07-26 15:34:00 +02:00
Fabio Berger
735bc2f178 Re-enable deleted the dir after test runs 2018-07-26 15:32:53 +02:00
Fabio Berger
e3cfa6363d Change test:installation so it also causes run-time errors to appear 2018-07-26 15:32:30 +02:00
Fabio Berger
331b1cb9a0 Fix lint issue 2018-07-26 15:27:50 +02:00
Fabio Berger
55dbb0ece0 Always append monorepo root path so script can be called from anywhere 2018-07-26 14:42:07 +02:00
Fabio Berger
af4071e119 Delete any remenants of test-env dir before creating a new one 2018-07-26 14:23:45 +02:00
Fabio Berger
9947e643d0 Print version that will be tested 2018-07-26 14:23:07 +02:00
Fabio Berger
d3be4f2852 Add ending slash 2018-07-26 14:22:51 +02:00
Fabio Berger
e320f343f8 Add support for testing installations post-publish as well 2018-07-26 14:14:14 +02:00
Fabio Berger
f6cc7d9c3c Fix asset path 2018-07-26 14:04:47 +02:00
fragosti
490fed6228 Make a non-jank Spinner component and use it 2018-07-24 19:09:02 -07:00
fragosti
9c81692d48 Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into feature/website/upgrade-allowance-toggles-to-locks-and-checks 2018-07-24 16:02:21 -07:00
fragosti
c505ba6f3e Center allowance toggles in account page 2018-07-24 15:58:33 -07:00
fragosti
ee71f57453 Increase allowance toggle loading spinner size by 1 2018-07-24 15:51:07 -07:00
fragosti
88556d31e2 Add unlocking and locking token copy 2018-07-24 15:32:12 -07:00
fragosti
c0d75c6476 Hide tooltip after allowance toggle click 2018-07-24 15:19:06 -07:00
fragosti
5b6cf447e5 Make tooltip appear to the left of the toggle when onboarding in progress 2018-07-24 15:11:46 -07:00
fragosti
3890f8224d Fix tooltip wrapping issue in onboardin 2018-07-24 14:44:31 -07:00
fragosti
b9f5c93830 Fix wrap button alignment issue 2018-07-24 14:19:19 -07:00
fragosti
0f8e6b395e WIP for allowance toggle redesign working 2018-07-20 10:44:59 -07:00
fragosti
b28cc6d7d3 Show token name dynamically in tooltip 2018-07-20 10:14:17 -07:00
fragosti
3bf12a98a7 Implement tooltips 2018-07-20 09:55:08 -07:00
fragosti
f27084ced4 Add loading state 2018-07-20 09:16:55 -07:00
fragosti
cdcf624e9e Have basic lock and check working in walelt 2018-07-20 08:52:14 -07:00
125 changed files with 2012 additions and 1718 deletions

View File

@@ -153,7 +153,7 @@ jobs:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run: yarn prettier:ci
- run: yarn lerna:run lint
- run: yarn lerna run lint
submit-coverage:
docker:
- image: circleci/node:9

View File

@@ -82,10 +82,12 @@ We strongly recommend that the community help us make improvements and determine
### Install dependencies
If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:
Make sure you are using Yarn v1.6. To install using brew:
```bash
yarn config set workspaces-experimental true
```
brew unlink yarn
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/76215230de5f7f7bee2cfcdd7185cf49d949862d/Formula/yarn.rb
brew switch yarn 1.6.0_1
```
Then install dependencies

View File

@@ -13,13 +13,14 @@
"prettier:ci": "prettier --list-different '**/*.{ts,tsx,json,md}' --config .prettierrc",
"report_coverage": "lcov-result-merger 'packages/*/coverage/lcov.info' | coveralls",
"test:installation": "node ./packages/monorepo-scripts/lib/test_installation.js",
"test:installation:local": "IS_LOCAL_PUBLISH=true node ./packages/monorepo-scripts/lib/test_installation.js",
"run:publish": "run-s install:all build:monorepo_scripts script:prepublish_checks rebuild:no_website script:publish",
"run:publish:local": "IS_LOCAL_PUBLISH=true yarn run:publish",
"script:prepublish_checks": "node ./packages/monorepo-scripts/lib/prepublish_checks.js",
"script:publish": "node ./packages/monorepo-scripts/lib/publish.js",
"install:all": "yarn install",
"wsrun": "wsrun",
"lerna:run": "lerna run",
"lerna": "lerna",
"watch": "wsrun watch_without_deps $PKG --fast-exit -r --stages --done-criteria='complete|successfully'",
"build": "wsrun build $PKG --fast-exit -r --stages",
"build:no_website": "wsrun build $PKG --fast-exit -r --stages --exclude @0xproject/website",

View File

@@ -1,4 +1,13 @@
[
{
"version": "1.0.1-rc.2",
"changes": [
{
"note": "Fixed bug caused by importing non-existent dep"
}
],
"timestamp": 1532619515
},
{
"version": "1.0.1-rc.1",
"changes": [

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.1-rc.2 - _July 26, 2018_
* Fixed bug caused by importing non-existent dep
## v1.0.1-rc.1 - _July 26, 2018_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "0x.js",
"version": "1.0.1-rc.1",
"version": "1.0.1-rc.2",
"engines": {
"node": ">=6.12"
},
@@ -41,8 +41,8 @@
"contracts": "ZRXToken",
"postpublish": {
"assets": [
"_bundles/index.js",
"_bundles/index.min.js"
"packages/0x.js/_bundles/index.js",
"packages/0x.js/_bundles/index.min.js"
],
"docPublishConfigs": {
"extraFileIncludes": [
@@ -68,11 +68,11 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@0xproject/abi-gen": "^1.0.2",
"@0xproject/dev-utils": "^1.0.2",
"@0xproject/migrations": "^1.0.2",
"@0xproject/monorepo-scripts": "^1.0.3",
"@0xproject/tslint-config": "^1.0.3",
"@0xproject/abi-gen": "^1.0.4",
"@0xproject/dev-utils": "^1.0.3",
"@0xproject/migrations": "^1.0.3",
"@0xproject/monorepo-scripts": "^1.0.4",
"@0xproject/tslint-config": "^1.0.4",
"@types/lodash": "4.14.104",
"@types/mocha": "^2.2.42",
"@types/node": "^8.0.53",
@@ -98,17 +98,17 @@
"webpack": "^3.1.0"
},
"dependencies": {
"@0xproject/assert": "^1.0.2",
"@0xproject/base-contract": "^1.0.2",
"@0xproject/contract-wrappers": "^1.0.1-rc.1",
"@0xproject/order-utils": "^1.0.1-rc.1",
"@0xproject/sol-compiler": "^1.0.2",
"@0xproject/subproviders": "^1.0.2",
"@0xproject/types": "^1.0.1-rc.1",
"@0xproject/typescript-typings": "^1.0.2",
"@0xproject/utils": "^1.0.2",
"@0xproject/web3-wrapper": "^1.1.0",
"ethereum-types": "^1.0.2",
"@0xproject/assert": "^1.0.4",
"@0xproject/base-contract": "^1.0.4",
"@0xproject/contract-wrappers": "^1.0.1-rc.2",
"@0xproject/order-utils": "^1.0.1-rc.2",
"@0xproject/sol-compiler": "^1.0.4",
"@0xproject/subproviders": "^1.0.4",
"@0xproject/types": "^1.0.1-rc.3",
"@0xproject/typescript-typings": "^1.0.3",
"@0xproject/utils": "^1.0.4",
"@0xproject/web3-wrapper": "^1.1.2",
"ethereum-types": "^1.0.3",
"ethers": "3.0.22",
"lodash": "^4.17.4"
},

View File

@@ -1,4 +1,22 @@
[
{
"timestamp": 1532619515,
"version": "1.0.4",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532614997,
"version": "1.0.3",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532605697,
"version": "1.0.2",

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.4 - _July 26, 2018_
* Dependencies updated
## v1.0.3 - _July 26, 2018_
* Dependencies updated
## v1.0.2 - _July 26, 2018_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0xproject/abi-gen",
"version": "1.0.2",
"version": "1.0.4",
"engines": {
"node": ">=6.12"
},
@@ -32,10 +32,10 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen/README.md",
"dependencies": {
"@0xproject/typescript-typings": "^1.0.2",
"@0xproject/utils": "^1.0.2",
"@0xproject/typescript-typings": "^1.0.3",
"@0xproject/utils": "^1.0.4",
"chalk": "^2.3.0",
"ethereum-types": "^1.0.2",
"ethereum-types": "^1.0.3",
"glob": "^7.1.2",
"handlebars": "^4.0.11",
"lodash": "^4.17.4",
@@ -46,8 +46,8 @@
"yargs": "^10.0.3"
},
"devDependencies": {
"@0xproject/monorepo-scripts": "^1.0.3",
"@0xproject/tslint-config": "^1.0.3",
"@0xproject/monorepo-scripts": "^1.0.4",
"@0xproject/tslint-config": "^1.0.4",
"@types/glob": "5.0.35",
"@types/handlebars": "^4.0.36",
"@types/mkdirp": "^0.5.1",

View File

@@ -1,4 +1,22 @@
[
{
"timestamp": 1532619515,
"version": "1.0.4",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532614997,
"version": "1.0.3",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532605697,
"version": "1.0.2",

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.4 - _July 26, 2018_
* Dependencies updated
## v1.0.3 - _July 26, 2018_
* Dependencies updated
## v1.0.2 - _July 26, 2018_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0xproject/assert",
"version": "1.0.2",
"version": "1.0.4",
"engines": {
"node": ">=6.12"
},
@@ -30,8 +30,8 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/assert/README.md",
"devDependencies": {
"@0xproject/monorepo-scripts": "^1.0.3",
"@0xproject/tslint-config": "^1.0.3",
"@0xproject/monorepo-scripts": "^1.0.4",
"@0xproject/tslint-config": "^1.0.4",
"@types/lodash": "4.14.104",
"@types/mocha": "^2.2.42",
"@types/valid-url": "^1.0.2",
@@ -47,9 +47,9 @@
"typescript": "2.7.1"
},
"dependencies": {
"@0xproject/json-schemas": "^1.0.1-rc.1",
"@0xproject/typescript-typings": "^1.0.2",
"@0xproject/utils": "^1.0.2",
"@0xproject/json-schemas": "^1.0.1-rc.3",
"@0xproject/typescript-typings": "^1.0.3",
"@0xproject/utils": "^1.0.4",
"lodash": "^4.17.4",
"valid-url": "^1.0.9"
},

View File

@@ -1,4 +1,22 @@
[
{
"timestamp": 1532619515,
"version": "1.0.4",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532614997,
"version": "1.0.3",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532605697,
"version": "1.0.2",

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.4 - _July 26, 2018_
* Dependencies updated
## v1.0.3 - _July 26, 2018_
* Dependencies updated
## v1.0.2 - _July 26, 2018_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0xproject/base-contract",
"version": "1.0.2",
"version": "1.0.4",
"engines": {
"node": ">=6.12"
},
@@ -30,8 +30,8 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/base-contract/README.md",
"devDependencies": {
"@0xproject/monorepo-scripts": "^1.0.3",
"@0xproject/tslint-config": "^1.0.3",
"@0xproject/monorepo-scripts": "^1.0.4",
"@0xproject/tslint-config": "^1.0.4",
"@types/lodash": "4.14.104",
"chai": "^4.0.1",
"copyfiles": "^1.2.0",
@@ -43,10 +43,10 @@
"typescript": "2.7.1"
},
"dependencies": {
"@0xproject/typescript-typings": "^1.0.2",
"@0xproject/utils": "^1.0.2",
"@0xproject/web3-wrapper": "^1.1.0",
"ethereum-types": "^1.0.2",
"@0xproject/typescript-typings": "^1.0.3",
"@0xproject/utils": "^1.0.4",
"@0xproject/web3-wrapper": "^1.1.2",
"ethereum-types": "^1.0.3",
"ethers": "3.0.22",
"lodash": "^4.17.4"
},

View File

@@ -1,4 +1,22 @@
[
{
"timestamp": 1532619515,
"version": "1.0.4",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532614997,
"version": "1.0.3",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532605697,
"version": "1.0.2",

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.4 - _July 26, 2018_
* Dependencies updated
## v1.0.3 - _July 26, 2018_
* Dependencies updated
## v1.0.2 - _July 26, 2018_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0xproject/connect",
"version": "1.0.2",
"version": "1.0.4",
"engines": {
"node": ">=6.12"
},
@@ -54,16 +54,16 @@
"@0xproject/assert": "^0.2.14",
"@0xproject/json-schemas": "^0.8.3",
"@0xproject/types": "^0.8.2",
"@0xproject/typescript-typings": "^1.0.2",
"@0xproject/utils": "^1.0.2",
"@0xproject/typescript-typings": "^1.0.3",
"@0xproject/utils": "^1.0.4",
"lodash": "^4.17.4",
"query-string": "^5.0.1",
"sinon": "^4.0.0",
"websocket": "^1.0.25"
},
"devDependencies": {
"@0xproject/monorepo-scripts": "^1.0.3",
"@0xproject/tslint-config": "^1.0.3",
"@0xproject/monorepo-scripts": "^1.0.4",
"@0xproject/tslint-config": "^1.0.4",
"@types/fetch-mock": "^5.12.2",
"@types/lodash": "4.14.104",
"@types/mocha": "^2.2.42",

View File

@@ -1,4 +1,13 @@
[
{
"version": "1.0.1-rc.2",
"changes": [
{
"note": "Fixed bug caused by importing non-existent dep"
}
],
"timestamp": 1532619515
},
{
"version": "1.0.1-rc.1",
"changes": [

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.1-rc.2 - _July 26, 2018_
* Fixed bug caused by importing non-existent dep
## v1.0.1-rc.1 - _July 26, 2018_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0xproject/contract-wrappers",
"version": "1.0.1-rc.1",
"version": "1.0.1-rc.2",
"description": "Smart TS wrappers for 0x smart contracts",
"keywords": [
"0xproject",
@@ -41,13 +41,13 @@
"node": ">=6.0.0"
},
"devDependencies": {
"@0xproject/abi-gen": "^1.0.2",
"@0xproject/dev-utils": "^1.0.2",
"@0xproject/migrations": "^1.0.2",
"@0xproject/monorepo-scripts": "^1.0.3",
"@0xproject/sol-compiler": "^1.0.2",
"@0xproject/subproviders": "^1.0.2",
"@0xproject/tslint-config": "^1.0.3",
"@0xproject/abi-gen": "^1.0.4",
"@0xproject/dev-utils": "^1.0.3",
"@0xproject/migrations": "^1.0.3",
"@0xproject/monorepo-scripts": "^1.0.4",
"@0xproject/sol-compiler": "^1.0.4",
"@0xproject/subproviders": "^1.0.4",
"@0xproject/tslint-config": "^1.0.4",
"@types/lodash": "4.14.104",
"@types/mocha": "^2.2.42",
"@types/node": "^8.0.53",
@@ -72,16 +72,16 @@
"web3-provider-engine": "14.0.6"
},
"dependencies": {
"@0xproject/assert": "^1.0.2",
"@0xproject/base-contract": "^1.0.2",
"@0xproject/fill-scenarios": "^1.0.1-rc.1",
"@0xproject/json-schemas": "^1.0.1-rc.1",
"@0xproject/order-utils": "^1.0.1-rc.1",
"@0xproject/types": "^1.0.1-rc.1",
"@0xproject/typescript-typings": "^1.0.2",
"@0xproject/utils": "^1.0.2",
"@0xproject/web3-wrapper": "^1.1.0",
"ethereum-types": "^1.0.2",
"@0xproject/assert": "^1.0.4",
"@0xproject/base-contract": "^1.0.4",
"@0xproject/fill-scenarios": "^1.0.1-rc.2",
"@0xproject/json-schemas": "^1.0.1-rc.3",
"@0xproject/order-utils": "^1.0.1-rc.2",
"@0xproject/types": "^1.0.1-rc.3",
"@0xproject/typescript-typings": "^1.0.3",
"@0xproject/utils": "^1.0.4",
"@0xproject/web3-wrapper": "^1.1.2",
"ethereum-types": "^1.0.3",
"ethereumjs-blockstream": "5.0.0",
"ethereumjs-util": "^5.1.1",
"ethers": "3.0.22",

View File

@@ -4,7 +4,6 @@ import { Web3Wrapper } from '@0xproject/web3-wrapper';
import { ContractAbi, LogWithDecodedArgs } from 'ethereum-types';
import * as _ from 'lodash';
import { constants } from '../../test/utils/constants';
import { artifacts } from '../artifacts';
import { methodOptsSchema } from '../schemas/method_opts_schema';
import { txOptsSchema } from '../schemas/tx_opts_schema';
@@ -17,6 +16,7 @@ import {
TransactionOpts,
} from '../types';
import { assert } from '../utils/assert';
import { constants } from '../utils/constants';
import { ContractWrapper } from './contract_wrapper';
import { ERC721ProxyWrapper } from './erc721_proxy_wrapper';

View File

@@ -42,12 +42,13 @@
"TestConstants",
"TestLibBytes",
"TestLibs",
"TestExchangeInternals",
"TestSignatureValidator",
"TokenRegistry",
"Validator",
"Wallet",
"Whitelist",
"WETH9",
"Whitelist",
"ZRXToken"
]
}

View File

@@ -1,7 +1,7 @@
{
"private": true,
"name": "contracts",
"version": "2.1.37",
"version": "2.1.39",
"engines": {
"node": ">=6.12"
},
@@ -33,7 +33,7 @@
"lint-contracts": "solhint src/2.0.0/**/**/**/**/*.sol"
},
"config": {
"abis": "../migrations/artifacts/2.0.0/@(AssetProxyOwner|DummyERC20Token|DummyERC721Receiver|DummyERC721Token|ERC20Proxy|ERC721Proxy|Forwarder|Exchange|ExchangeWrapper|IAssetData|IAssetProxy|MixinAuthorizable|MultiSigWallet|MultiSigWalletWithTimeLock|TestAssetProxyOwner|TestAssetProxyDispatcher|TestConstants|TestLibBytes|TestLibs|TestSignatureValidator|Validator|Wallet|TokenRegistry|Whitelist|WETH9|ZRXToken).json"
"abis": "../migrations/artifacts/2.0.0/@(AssetProxyOwner|DummyERC20Token|DummyERC721Receiver|DummyERC721Token|ERC20Proxy|ERC721Proxy|Forwarder|Exchange|ExchangeWrapper|IAssetData|IAssetProxy|MixinAuthorizable|MultiSigWallet|MultiSigWalletWithTimeLock|TestAssetProxyOwner|TestAssetProxyDispatcher|TestConstants|TestExchangeInternals|TestLibBytes|TestLibs|TestSignatureValidator|Validator|Wallet|TokenRegistry|Whitelist|WETH9|ZRXToken).json"
},
"repository": {
"type": "git",
@@ -46,11 +46,11 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/contracts/README.md",
"devDependencies": {
"@0xproject/abi-gen": "^1.0.2",
"@0xproject/dev-utils": "^1.0.2",
"@0xproject/sol-cov": "^1.0.2",
"@0xproject/subproviders": "^1.0.2",
"@0xproject/tslint-config": "^1.0.3",
"@0xproject/abi-gen": "^1.0.4",
"@0xproject/dev-utils": "^1.0.3",
"@0xproject/sol-cov": "^1.0.3",
"@0xproject/subproviders": "^1.0.4",
"@0xproject/tslint-config": "^1.0.4",
"@types/bn.js": "^4.11.0",
"@types/ethereumjs-abi": "^0.6.0",
"@types/lodash": "4.14.104",
@@ -72,18 +72,20 @@
"yargs": "^10.0.3"
},
"dependencies": {
"@0xproject/base-contract": "^1.0.2",
"@0xproject/order-utils": "^1.0.1-rc.1",
"@0xproject/sol-compiler": "^1.0.2",
"@0xproject/types": "^1.0.1-rc.1",
"@0xproject/typescript-typings": "^1.0.2",
"@0xproject/utils": "^1.0.2",
"@0xproject/web3-wrapper": "^1.1.0",
"@0xproject/base-contract": "^1.0.4",
"@0xproject/order-utils": "^1.0.1-rc.2",
"@0xproject/sol-compiler": "^1.0.4",
"@0xproject/types": "^1.0.1-rc.3",
"@0xproject/typescript-typings": "^1.0.3",
"@0xproject/utils": "^1.0.4",
"@0xproject/web3-wrapper": "^1.1.2",
"@types/js-combinatorics": "^0.5.29",
"bn.js": "^4.11.8",
"ethereum-types": "^1.0.2",
"ethereum-types": "^1.0.3",
"ethereumjs-abi": "0.6.5",
"ethereumjs-util": "^5.1.1",
"ethers": "3.0.22",
"js-combinatorics": "^0.5.3",
"lodash": "^4.17.4"
}
}

View File

@@ -207,7 +207,6 @@ contract MixinExchangeCore is
/// @param order that was filled.
/// @param takerAddress Address of taker who filled the order.
/// @param orderTakerAssetFilledAmount Amount of order already filled.
/// @return fillResults Amounts filled and fees paid by maker and taker.
function updateFilledState(
Order memory order,
address takerAddress,

View File

@@ -0,0 +1,120 @@
/*
Copyright 2018 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity 0.4.24;
pragma experimental ABIEncoderV2;
import "../../protocol/Exchange/Exchange.sol";
contract TestExchangeInternals is
Exchange
{
constructor ()
public
Exchange("")
{}
/// @dev Adds properties of both FillResults instances.
/// Modifies the first FillResults instance specified.
/// Note that this function has been modified from the original
// internal version to return the FillResults.
/// @param totalFillResults Fill results instance that will be added onto.
/// @param singleFillResults Fill results instance that will be added to totalFillResults.
/// @return newTotalFillResults The result of adding singleFillResults to totalFilResults.
function publicAddFillResults(FillResults memory totalFillResults, FillResults memory singleFillResults)
public
pure
returns (FillResults memory)
{
addFillResults(totalFillResults, singleFillResults);
return totalFillResults;
}
/// @dev Calculates amounts filled and fees paid by maker and taker.
/// @param order to be filled.
/// @param takerAssetFilledAmount Amount of takerAsset that will be filled.
/// @return fillResults Amounts filled and fees paid by maker and taker.
function publicCalculateFillResults(
Order memory order,
uint256 takerAssetFilledAmount
)
public
pure
returns (FillResults memory fillResults)
{
return calculateFillResults(order, takerAssetFilledAmount);
}
/// @dev Calculates partial value given a numerator and denominator.
/// @param numerator Numerator.
/// @param denominator Denominator.
/// @param target Value to calculate partial of.
/// @return Partial value of target.
function publicGetPartialAmount(
uint256 numerator,
uint256 denominator,
uint256 target
)
public
pure
returns (uint256 partialAmount)
{
return getPartialAmount(numerator, denominator, target);
}
/// @dev Checks if rounding error > 0.1%.
/// @param numerator Numerator.
/// @param denominator Denominator.
/// @param target Value to multiply with numerator/denominator.
/// @return Rounding error is present.
function publicIsRoundingError(
uint256 numerator,
uint256 denominator,
uint256 target
)
public
pure
returns (bool isError)
{
return isRoundingError(numerator, denominator, target);
}
/// @dev Updates state with results of a fill order.
/// @param order that was filled.
/// @param takerAddress Address of taker who filled the order.
/// @param orderTakerAssetFilledAmount Amount of order already filled.
/// @return fillResults Amounts filled and fees paid by maker and taker.
function publicUpdateFilledState(
Order memory order,
address takerAddress,
bytes32 orderHash,
uint256 orderTakerAssetFilledAmount,
FillResults memory fillResults
)
public
{
updateFilledState(
order,
takerAddress,
orderHash,
orderTakerAssetFilledAmount,
fillResults
);
}
}

View File

@@ -2,7 +2,10 @@ import { BlockchainLifecycle } from '@0xproject/dev-utils';
import * as _ from 'lodash';
import { chaiSetup } from '../utils/chai_setup';
import { CoreCombinatorialUtils, coreCombinatorialUtilsFactoryAsync } from '../utils/core_combinatorial_utils';
import {
FillOrderCombinatorialUtils,
fillOrderCombinatorialUtilsFactoryAsync,
} from '../utils/fill_order_combinatorial_utils';
import {
AllowanceAmountScenario,
AssetDataScenario,
@@ -47,11 +50,11 @@ const defaultFillScenario = {
};
describe('FillOrder Tests', () => {
let coreCombinatorialUtils: CoreCombinatorialUtils;
let fillOrderCombinatorialUtils: FillOrderCombinatorialUtils;
before(async () => {
await blockchainLifecycle.startAsync();
coreCombinatorialUtils = await coreCombinatorialUtilsFactoryAsync(web3Wrapper, txDefaults);
fillOrderCombinatorialUtils = await fillOrderCombinatorialUtilsFactoryAsync(web3Wrapper, txDefaults);
});
after(async () => {
await blockchainLifecycle.revertAsync();
@@ -67,19 +70,19 @@ describe('FillOrder Tests', () => {
_.forEach(fillScenarios, fillScenario => {
const description = `Combinatorial OrderFill: ${JSON.stringify(fillScenario)}`;
it(description, async () => {
await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
});
});
};
const allFillScenarios = CoreCombinatorialUtils.generateFillOrderCombinations();
const allFillScenarios = FillOrderCombinatorialUtils.generateFillOrderCombinations();
describe('Combinatorially generated fills orders', () => test(allFillScenarios));
it('should transfer the correct amounts when makerAssetAmount === takerAssetAmount', async () => {
const fillScenario = {
...defaultFillScenario,
};
await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
});
it('should transfer the correct amounts when makerAssetAmount > takerAssetAmount', async () => {
const fillScenario = {
@@ -89,7 +92,7 @@ describe('FillOrder Tests', () => {
takerAssetAmountScenario: OrderAssetAmountScenario.Small,
},
};
await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
});
it('should transfer the correct amounts when makerAssetAmount < takerAssetAmount', async () => {
const fillScenario = {
@@ -99,7 +102,7 @@ describe('FillOrder Tests', () => {
makerAssetAmountScenario: OrderAssetAmountScenario.Small,
},
};
await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
});
it('should transfer the correct amounts when taker is specified and order is claimed by taker', async () => {
const fillScenario = {
@@ -109,14 +112,14 @@ describe('FillOrder Tests', () => {
takerScenario: TakerScenario.CorrectlySpecified,
},
};
await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
});
it('should fill remaining value if takerAssetFillAmount > remaining takerAssetAmount', async () => {
const fillScenario = {
...defaultFillScenario,
takerAssetFillAmountScenario: TakerAssetFillAmountScenario.GreaterThanRemainingFillableTakerAssetAmount,
};
await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
});
it('should throw when taker is specified and order is claimed by other', async () => {
const fillScenario = {
@@ -126,7 +129,7 @@ describe('FillOrder Tests', () => {
takerScenario: TakerScenario.IncorrectlySpecified,
},
};
await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
});
it('should throw if makerAssetAmount is 0', async () => {
@@ -138,7 +141,7 @@ describe('FillOrder Tests', () => {
},
takerAssetFillAmountScenario: TakerAssetFillAmountScenario.GreaterThanRemainingFillableTakerAssetAmount,
};
await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
});
it('should throw if takerAssetAmount is 0', async () => {
@@ -150,7 +153,7 @@ describe('FillOrder Tests', () => {
},
takerAssetFillAmountScenario: TakerAssetFillAmountScenario.GreaterThanRemainingFillableTakerAssetAmount,
};
await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
});
it('should throw if takerAssetFillAmount is 0', async () => {
@@ -158,7 +161,7 @@ describe('FillOrder Tests', () => {
...defaultFillScenario,
takerAssetFillAmountScenario: TakerAssetFillAmountScenario.Zero,
};
await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
});
it('should throw if an order is expired', async () => {
@@ -169,7 +172,7 @@ describe('FillOrder Tests', () => {
expirationTimeSecondsScenario: ExpirationTimeSecondsScenario.InPast,
},
};
await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
});
it('should throw if maker erc20Balances are too low to fill order', async () => {
@@ -180,7 +183,7 @@ describe('FillOrder Tests', () => {
traderAssetBalance: BalanceAmountScenario.TooLow,
},
};
await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
});
it('should throw if taker erc20Balances are too low to fill order', async () => {
@@ -191,7 +194,7 @@ describe('FillOrder Tests', () => {
traderAssetBalance: BalanceAmountScenario.TooLow,
},
};
await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
});
it('should throw if maker allowances are too low to fill order', async () => {
@@ -202,7 +205,7 @@ describe('FillOrder Tests', () => {
traderAssetAllowance: AllowanceAmountScenario.TooLow,
},
};
await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
});
it('should throw if taker allowances are too low to fill order', async () => {
@@ -213,7 +216,7 @@ describe('FillOrder Tests', () => {
traderAssetAllowance: AllowanceAmountScenario.TooLow,
},
};
await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
});
});
@@ -228,7 +231,7 @@ describe('FillOrder Tests', () => {
},
takerAssetFillAmountScenario: TakerAssetFillAmountScenario.ExactlyRemainingFillableTakerAssetAmount,
};
await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
});
it('should successfully fill order when makerAsset is ERC721 and takerAsset is ERC20', async () => {
@@ -241,7 +244,7 @@ describe('FillOrder Tests', () => {
},
takerAssetFillAmountScenario: TakerAssetFillAmountScenario.ExactlyRemainingFillableTakerAssetAmount,
};
await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario, true);
await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario, true);
});
it('should successfully fill order when makerAsset is ERC20 and takerAsset is ERC721', async () => {
@@ -254,7 +257,7 @@ describe('FillOrder Tests', () => {
},
takerAssetFillAmountScenario: TakerAssetFillAmountScenario.ExactlyRemainingFillableTakerAssetAmount,
};
await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
});
it('should successfully fill order when makerAsset is ERC721 and approveAll is set for it', async () => {
@@ -271,7 +274,7 @@ describe('FillOrder Tests', () => {
traderAssetAllowance: AllowanceAmountScenario.Unlimited,
},
};
await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
});
it('should successfully fill order when makerAsset and takerAsset are ERC721 and approveAll is set for them', async () => {
@@ -292,7 +295,7 @@ describe('FillOrder Tests', () => {
traderAssetAllowance: AllowanceAmountScenario.Unlimited,
},
};
await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
});
});
});

View File

@@ -0,0 +1,305 @@
import { BlockchainLifecycle } from '@0xproject/dev-utils';
import { Order, RevertReason, SignedOrder } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import * as _ from 'lodash';
import { TestExchangeInternalsContract } from '../../generated_contract_wrappers/test_exchange_internals';
import { artifacts } from '../utils/artifacts';
import {
getInvalidOpcodeErrorMessageForCallAsync,
getRevertReasonOrErrorMessageForSendTransactionAsync,
} from '../utils/assertions';
import { chaiSetup } from '../utils/chai_setup';
import { bytes32Values, testCombinatoriallyWithReferenceFuncAsync, uint256Values } from '../utils/combinatorial_utils';
import { constants } from '../utils/constants';
import { FillResults } from '../utils/types';
import { provider, txDefaults, web3Wrapper } from '../utils/web3_wrapper';
chaiSetup.configure();
const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
const MAX_UINT256 = new BigNumber(2).pow(256).minus(1);
const emptyOrder: Order = {
senderAddress: constants.NULL_ADDRESS,
makerAddress: constants.NULL_ADDRESS,
takerAddress: constants.NULL_ADDRESS,
makerFee: new BigNumber(0),
takerFee: new BigNumber(0),
makerAssetAmount: new BigNumber(0),
takerAssetAmount: new BigNumber(0),
makerAssetData: '0x',
takerAssetData: '0x',
salt: new BigNumber(0),
exchangeAddress: constants.NULL_ADDRESS,
feeRecipientAddress: constants.NULL_ADDRESS,
expirationTimeSeconds: new BigNumber(0),
};
const emptySignedOrder: SignedOrder = {
...emptyOrder,
signature: '',
};
const overflowErrorForCall = new Error(RevertReason.Uint256Overflow);
async function referenceGetPartialAmountAsync(
numerator: BigNumber,
denominator: BigNumber,
target: BigNumber,
): Promise<BigNumber> {
const invalidOpcodeErrorForCall = new Error(await getInvalidOpcodeErrorMessageForCallAsync());
const product = numerator.mul(target);
if (product.greaterThan(MAX_UINT256)) {
throw overflowErrorForCall;
}
if (denominator.eq(0)) {
throw invalidOpcodeErrorForCall;
}
return product.dividedToIntegerBy(denominator);
}
describe('Exchange core internal functions', () => {
let testExchange: TestExchangeInternalsContract;
let invalidOpcodeErrorForCall: Error | undefined;
let overflowErrorForSendTransaction: Error | undefined;
before(async () => {
await blockchainLifecycle.startAsync();
});
after(async () => {
await blockchainLifecycle.revertAsync();
});
before(async () => {
testExchange = await TestExchangeInternalsContract.deployFrom0xArtifactAsync(
artifacts.TestExchangeInternals,
provider,
txDefaults,
);
overflowErrorForSendTransaction = new Error(
await getRevertReasonOrErrorMessageForSendTransactionAsync(RevertReason.Uint256Overflow),
);
invalidOpcodeErrorForCall = new Error(await getInvalidOpcodeErrorMessageForCallAsync());
});
// Note(albrow): Don't forget to add beforeEach and afterEach calls to reset
// the blockchain state for any tests which modify it!
describe('addFillResults', async () => {
function makeFillResults(value: BigNumber): FillResults {
return {
makerAssetFilledAmount: value,
takerAssetFilledAmount: value,
makerFeePaid: value,
takerFeePaid: value,
};
}
async function referenceAddFillResultsAsync(
totalValue: BigNumber,
singleValue: BigNumber,
): Promise<FillResults> {
// Note(albrow): Here, each of totalFillResults and
// singleFillResults will consist of fields with the same values.
// This should be safe because none of the fields in a given
// FillResults are ever used together in a mathemetical operation.
// They are only used with the corresponding field from *the other*
// FillResults, which are different.
const totalFillResults = makeFillResults(totalValue);
const singleFillResults = makeFillResults(singleValue);
// HACK(albrow): _.mergeWith mutates the first argument! To
// workaround this we use _.cloneDeep.
return _.mergeWith(
_.cloneDeep(totalFillResults),
singleFillResults,
(totalVal: BigNumber, singleVal: BigNumber) => {
const newTotal = totalVal.add(singleVal);
if (newTotal.greaterThan(MAX_UINT256)) {
throw overflowErrorForCall;
}
return newTotal;
},
);
}
async function testAddFillResultsAsync(totalValue: BigNumber, singleValue: BigNumber): Promise<FillResults> {
const totalFillResults = makeFillResults(totalValue);
const singleFillResults = makeFillResults(singleValue);
return testExchange.publicAddFillResults.callAsync(totalFillResults, singleFillResults);
}
await testCombinatoriallyWithReferenceFuncAsync(
'addFillResults',
referenceAddFillResultsAsync,
testAddFillResultsAsync,
[uint256Values, uint256Values],
);
});
describe('calculateFillResults', async () => {
function makeOrder(
makerAssetAmount: BigNumber,
takerAssetAmount: BigNumber,
makerFee: BigNumber,
takerFee: BigNumber,
): Order {
return {
...emptyOrder,
makerAssetAmount,
takerAssetAmount,
makerFee,
takerFee,
};
}
async function referenceCalculateFillResultsAsync(
orderTakerAssetAmount: BigNumber,
takerAssetFilledAmount: BigNumber,
otherAmount: BigNumber,
): Promise<FillResults> {
// Note(albrow): Here we are re-using the same value (otherAmount)
// for order.makerAssetAmount, order.makerFee, and order.takerFee.
// This should be safe because they are never used with each other
// in any mathematical operation in either the reference TypeScript
// implementation or the Solidity implementation of
// calculateFillResults.
return {
makerAssetFilledAmount: await referenceGetPartialAmountAsync(
takerAssetFilledAmount,
orderTakerAssetAmount,
otherAmount,
),
takerAssetFilledAmount,
makerFeePaid: await referenceGetPartialAmountAsync(
takerAssetFilledAmount,
orderTakerAssetAmount,
otherAmount,
),
takerFeePaid: await referenceGetPartialAmountAsync(
takerAssetFilledAmount,
orderTakerAssetAmount,
otherAmount,
),
};
}
async function testCalculateFillResultsAsync(
orderTakerAssetAmount: BigNumber,
takerAssetFilledAmount: BigNumber,
otherAmount: BigNumber,
): Promise<FillResults> {
const order = makeOrder(otherAmount, orderTakerAssetAmount, otherAmount, otherAmount);
return testExchange.publicCalculateFillResults.callAsync(order, takerAssetFilledAmount);
}
await testCombinatoriallyWithReferenceFuncAsync(
'calculateFillResults',
referenceCalculateFillResultsAsync,
testCalculateFillResultsAsync,
[uint256Values, uint256Values, uint256Values],
);
});
describe('getPartialAmount', async () => {
async function testGetPartialAmountAsync(
numerator: BigNumber,
denominator: BigNumber,
target: BigNumber,
): Promise<BigNumber> {
return testExchange.publicGetPartialAmount.callAsync(numerator, denominator, target);
}
await testCombinatoriallyWithReferenceFuncAsync(
'getPartialAmount',
referenceGetPartialAmountAsync,
testGetPartialAmountAsync,
[uint256Values, uint256Values, uint256Values],
);
});
describe('isRoundingError', async () => {
async function referenceIsRoundingErrorAsync(
numerator: BigNumber,
denominator: BigNumber,
target: BigNumber,
): Promise<boolean> {
const product = numerator.mul(target);
if (denominator.eq(0)) {
throw invalidOpcodeErrorForCall;
}
const remainder = product.mod(denominator);
if (remainder.eq(0)) {
return false;
}
if (product.greaterThan(MAX_UINT256)) {
throw overflowErrorForCall;
}
if (product.eq(0)) {
throw invalidOpcodeErrorForCall;
}
const remainderTimes1000000 = remainder.mul('1000000');
if (remainderTimes1000000.greaterThan(MAX_UINT256)) {
throw overflowErrorForCall;
}
const errPercentageTimes1000000 = remainderTimes1000000.dividedToIntegerBy(product);
return errPercentageTimes1000000.greaterThan('1000');
}
async function testIsRoundingErrorAsync(
numerator: BigNumber,
denominator: BigNumber,
target: BigNumber,
): Promise<boolean> {
return testExchange.publicIsRoundingError.callAsync(numerator, denominator, target);
}
await testCombinatoriallyWithReferenceFuncAsync(
'isRoundingError',
referenceIsRoundingErrorAsync,
testIsRoundingErrorAsync,
[uint256Values, uint256Values, uint256Values],
);
});
describe('updateFilledState', async () => {
// Note(albrow): Since updateFilledState modifies the state by calling
// sendTransaction, we must reset the state after each test.
beforeEach(async () => {
await blockchainLifecycle.startAsync();
});
afterEach(async () => {
await blockchainLifecycle.revertAsync();
});
async function referenceUpdateFilledStateAsync(
takerAssetFilledAmount: BigNumber,
orderTakerAssetFilledAmount: BigNumber,
// tslint:disable-next-line:no-unused-variable
orderHash: string,
): Promise<BigNumber> {
const totalFilledAmount = takerAssetFilledAmount.add(orderTakerAssetFilledAmount);
if (totalFilledAmount.greaterThan(MAX_UINT256)) {
throw overflowErrorForSendTransaction;
}
return totalFilledAmount;
}
async function testUpdateFilledStateAsync(
takerAssetFilledAmount: BigNumber,
orderTakerAssetFilledAmount: BigNumber,
orderHash: string,
): Promise<BigNumber> {
const fillResults = {
makerAssetFilledAmount: new BigNumber(0),
takerAssetFilledAmount,
makerFeePaid: new BigNumber(0),
takerFeePaid: new BigNumber(0),
};
await web3Wrapper.awaitTransactionSuccessAsync(
await testExchange.publicUpdateFilledState.sendTransactionAsync(
emptySignedOrder,
constants.NULL_ADDRESS,
orderHash,
orderTakerAssetFilledAmount,
fillResults,
),
constants.AWAIT_TRANSACTION_MINED_MS,
);
return testExchange.filled.callAsync(orderHash);
}
await testCombinatoriallyWithReferenceFuncAsync(
'updateFilledState',
referenceUpdateFilledStateAsync,
testUpdateFilledStateAsync,
[uint256Values, uint256Values, bytes32Values],
);
});
});

View File

@@ -67,6 +67,35 @@ describe('Exchange libs', () => {
});
});
});
// Note(albrow): These tests are designed to be supplemental to the
// combinatorial tests in test/exchange/internal. They test specific edge
// cases that are not covered by the combinatorial tests.
describe('LibMath', () => {
it('should return false if there is a rounding error of 0.1%', async () => {
const numerator = new BigNumber(20);
const denominator = new BigNumber(999);
const target = new BigNumber(50);
// rounding error = ((20*50/999) - floor(20*50/999)) / (20*50/999) = 0.1%
const isRoundingError = await libs.publicIsRoundingError.callAsync(numerator, denominator, target);
expect(isRoundingError).to.be.false();
});
it('should return false if there is a rounding of 0.09%', async () => {
const numerator = new BigNumber(20);
const denominator = new BigNumber(9991);
const target = new BigNumber(500);
// rounding error = ((20*500/9991) - floor(20*500/9991)) / (20*500/9991) = 0.09%
const isRoundingError = await libs.publicIsRoundingError.callAsync(numerator, denominator, target);
expect(isRoundingError).to.be.false();
});
it('should return true if there is a rounding error of 0.11%', async () => {
const numerator = new BigNumber(20);
const denominator = new BigNumber(9989);
const target = new BigNumber(500);
// rounding error = ((20*500/9989) - floor(20*500/9989)) / (20*500/9989) = 0.011%
const isRoundingError = await libs.publicIsRoundingError.callAsync(numerator, denominator, target);
expect(isRoundingError).to.be.true();
});
});
describe('LibOrder', () => {
describe('getOrderSchema', () => {
@@ -93,96 +122,4 @@ describe('Exchange libs', () => {
});
});
});
describe('LibMath', () => {
describe('isRoundingError', () => {
it('should return false if there is a rounding error of 0.1%', async () => {
const numerator = new BigNumber(20);
const denominator = new BigNumber(999);
const target = new BigNumber(50);
// rounding error = ((20*50/999) - floor(20*50/999)) / (20*50/999) = 0.1%
const isRoundingError = await libs.publicIsRoundingError.callAsync(numerator, denominator, target);
expect(isRoundingError).to.be.false();
});
it('should return false if there is a rounding of 0.09%', async () => {
const numerator = new BigNumber(20);
const denominator = new BigNumber(9991);
const target = new BigNumber(500);
// rounding error = ((20*500/9991) - floor(20*500/9991)) / (20*500/9991) = 0.09%
const isRoundingError = await libs.publicIsRoundingError.callAsync(numerator, denominator, target);
expect(isRoundingError).to.be.false();
});
it('should return true if there is a rounding error of 0.11%', async () => {
const numerator = new BigNumber(20);
const denominator = new BigNumber(9989);
const target = new BigNumber(500);
// rounding error = ((20*500/9989) - floor(20*500/9989)) / (20*500/9989) = 0.011%
const isRoundingError = await libs.publicIsRoundingError.callAsync(numerator, denominator, target);
expect(isRoundingError).to.be.true();
});
it('should return true if there is a rounding error > 0.1%', async () => {
const numerator = new BigNumber(3);
const denominator = new BigNumber(7);
const target = new BigNumber(10);
// rounding error = ((3*10/7) - floor(3*10/7)) / (3*10/7) = 6.67%
const isRoundingError = await libs.publicIsRoundingError.callAsync(numerator, denominator, target);
expect(isRoundingError).to.be.true();
});
it('should return false when there is no rounding error', async () => {
const numerator = new BigNumber(1);
const denominator = new BigNumber(2);
const target = new BigNumber(10);
const isRoundingError = await libs.publicIsRoundingError.callAsync(numerator, denominator, target);
expect(isRoundingError).to.be.false();
});
it('should return false when there is rounding error <= 0.1%', async () => {
// randomly generated numbers
const numerator = new BigNumber(76564);
const denominator = new BigNumber(676373677);
const target = new BigNumber(105762562);
// rounding error = ((76564*105762562/676373677) - floor(76564*105762562/676373677)) /
// (76564*105762562/676373677) = 0.0007%
const isRoundingError = await libs.publicIsRoundingError.callAsync(numerator, denominator, target);
expect(isRoundingError).to.be.false();
});
});
describe('getPartialAmount', () => {
it('should return the numerator/denominator*target', async () => {
const numerator = new BigNumber(1);
const denominator = new BigNumber(2);
const target = new BigNumber(10);
const partialAmount = await libs.publicGetPartialAmount.callAsync(numerator, denominator, target);
const expectedPartialAmount = 5;
expect(partialAmount).to.be.bignumber.equal(expectedPartialAmount);
});
it('should round down', async () => {
const numerator = new BigNumber(2);
const denominator = new BigNumber(3);
const target = new BigNumber(10);
const partialAmount = await libs.publicGetPartialAmount.callAsync(numerator, denominator, target);
const expectedPartialAmount = 6;
expect(partialAmount).to.be.bignumber.equal(expectedPartialAmount);
});
it('should round .5 down', async () => {
const numerator = new BigNumber(1);
const denominator = new BigNumber(20);
const target = new BigNumber(10);
const partialAmount = await libs.publicGetPartialAmount.callAsync(numerator, denominator, target);
const expectedPartialAmount = 0;
expect(partialAmount).to.be.bignumber.equal(expectedPartialAmount);
});
});
});
});

View File

@@ -16,6 +16,7 @@ import * as MultiSigWalletWithTimeLock from '../../artifacts/MultiSigWalletWithT
import * as TestAssetProxyDispatcher from '../../artifacts/TestAssetProxyDispatcher.json';
import * as TestAssetProxyOwner from '../../artifacts/TestAssetProxyOwner.json';
import * as TestConstants from '../../artifacts/TestConstants.json';
import * as TestExchangeInternals from '../../artifacts/TestExchangeInternals.json';
import * as TestLibBytes from '../../artifacts/TestLibBytes.json';
import * as TestLibs from '../../artifacts/TestLibs.json';
import * as TestSignatureValidator from '../../artifacts/TestSignatureValidator.json';
@@ -46,6 +47,7 @@ export const artifacts = {
TestConstants: (TestConstants as any) as ContractArtifact,
TestLibBytes: (TestLibBytes as any) as ContractArtifact,
TestLibs: (TestLibs as any) as ContractArtifact,
TestExchangeInternals: (TestExchangeInternals as any) as ContractArtifact,
TestSignatureValidator: (TestSignatureValidator as any) as ContractArtifact,
Validator: (Validator as any) as ContractArtifact,
Wallet: (Wallet as any) as ContractArtifact,

View File

@@ -15,6 +15,14 @@ let nodeType: NodeType | undefined;
// resolve with either a transaction receipt or a transaction hash.
export type sendTransactionResult = Promise<TransactionReceipt | TransactionReceiptWithDecodedLogs | string>;
/**
* Returns ganacheError if the backing Ethereum node is Ganache and gethError
* if it is Geth.
* @param ganacheError the error to be returned if the backing node is Ganache.
* @param gethError the error to be returned if the backing node is Geth.
* @returns either the given ganacheError or gethError depending on the backing
* node.
*/
async function _getGanacheOrGethError(ganacheError: string, gethError: string): Promise<string> {
if (_.isUndefined(nodeType)) {
nodeType = await web3Wrapper.getNodeTypeAsync();
@@ -41,6 +49,25 @@ async function _getContractCallFailedErrorMessageAsync(): Promise<string> {
return _getGanacheOrGethError('revert', 'Contract call failed');
}
/**
* Returns the expected error message for an 'invalid opcode' resulting from a
* contract call. The exact error message depends on the backing Ethereum node.
*/
export async function getInvalidOpcodeErrorMessageForCallAsync(): Promise<string> {
return _getGanacheOrGethError('invalid opcode', 'Contract call failed');
}
/**
* Returns the expected error message for the given revert reason resulting from
* a sendTransaction call. The exact error message depends on the backing
* Ethereum node and whether it supports revert reasons.
* @param reason a specific revert reason.
* @returns the expected error message.
*/
export async function getRevertReasonOrErrorMessageForSendTransactionAsync(reason: RevertReason): Promise<string> {
return _getGanacheOrGethError(reason, 'always failing transaction');
}
/**
* Rejects if the given Promise does not reject with an error indicating
* insufficient funds.

View File

@@ -0,0 +1,113 @@
import { BigNumber } from '@0xproject/utils';
import * as combinatorics from 'js-combinatorics';
import { testWithReferenceFuncAsync } from './test_with_reference';
// A set of values corresponding to the uint256 type in Solidity. This set
// contains some notable edge cases, including some values which will overflow
// the uint256 type when used in different mathematical operations.
export const uint256Values = [
new BigNumber(0),
new BigNumber(1),
new BigNumber(2),
// Non-trivial big number.
new BigNumber(2).pow(64),
// Max that does not overflow when squared.
new BigNumber(2).pow(128).minus(1),
// Min that does overflow when squared.
new BigNumber(2).pow(128),
// Max that does not overflow when doubled.
new BigNumber(2).pow(255).minus(1),
// Min that does overflow when doubled.
new BigNumber(2).pow(255),
// Max that does not overflow.
new BigNumber(2).pow(256).minus(1),
];
// A set of values corresponding to the bytes32 type in Solidity.
export const bytes32Values = [
// Min
'0x0000000000000000000000000000000000000000000000000000000000000000',
'0x0000000000000000000000000000000000000000000000000000000000000001',
'0x0000000000000000000000000000000000000000000000000000000000000002',
// Non-trivial big number.
'0x000000000000f000000000000000000000000000000000000000000000000000',
// Max
'0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff',
];
export async function testCombinatoriallyWithReferenceFuncAsync<P0, P1, R>(
name: string,
referenceFunc: (p0: P0, p1: P1) => Promise<R>,
testFunc: (p0: P0, p1: P1) => Promise<R>,
allValues: [P0[], P1[]],
): Promise<void>;
export async function testCombinatoriallyWithReferenceFuncAsync<P0, P1, P2, R>(
name: string,
referenceFunc: (p0: P0, p1: P1, p2: P2) => Promise<R>,
testFunc: (p0: P0, p1: P1, p2: P2) => Promise<R>,
allValues: [P0[], P1[], P2[]],
): Promise<void>;
export async function testCombinatoriallyWithReferenceFuncAsync<P0, P1, P2, P3, R>(
name: string,
referenceFunc: (p0: P0, p1: P1, p2: P2, p3: P3) => Promise<R>,
testFunc: (p0: P0, p1: P1, p2: P2, p3: P3) => Promise<R>,
allValues: [P0[], P1[], P2[], P3[]],
): Promise<void>;
export async function testCombinatoriallyWithReferenceFuncAsync<P0, P1, P2, P3, P4, R>(
name: string,
referenceFunc: (p0: P0, p1: P1, p2: P2, p3: P3, p4: P4) => Promise<R>,
testFunc: (p0: P0, p1: P1, p2: P2, p3: P3, p4: P4) => Promise<R>,
allValues: [P0[], P1[], P2[], P3[], P4[]],
): Promise<void>;
/**
* Uses combinatorics to test the behavior of a test function by comparing it to
* the expected behavior (defined by a reference function) for a large number of
* possible input values.
*
* First generates test cases by taking the cartesian product of the given
* values. Each test case is a set of N values corresponding to the N arguments
* for the test func and the reference func. For each test case, first the
* reference function will be called to obtain an "expected result", or if the
* reference function throws/rejects, an "expected error". Next, the test
* function will be called to obtain an "actual result", or if the test function
* throws/rejects, an "actual error". Each test case passes if at least one of
* the following conditions is met:
*
* 1) Neither the reference function or the test function throw and the
* "expected result" equals the "actual result".
*
* 2) Both the reference function and the test function throw and the "actual
* error" message *contains* the "expected error" message.
*
* The first test case which does not meet one of these conditions will cause
* the entire test to fail and this function will throw/reject.
*
* @param referenceFuncAsync a reference function implemented in pure
* JavaScript/TypeScript which accepts N arguments and returns the "expected
* result" or "expected error" for a given test case.
* @param testFuncAsync a test function which, e.g., makes a call or sends a
* transaction to a contract. It accepts the same N arguments returns the
* "actual result" or "actual error" for a given test case.
* @param values an array of N arrays. Each inner array is a set of possible
* values which are passed into both the reference function and the test
* function.
* @return A Promise that resolves if the test passes and rejects if the test
* fails, according to the rules described above.
*/
export async function testCombinatoriallyWithReferenceFuncAsync(
name: string,
referenceFuncAsync: (...args: any[]) => Promise<any>,
testFuncAsync: (...args: any[]) => Promise<any>,
allValues: any[],
): Promise<void> {
const testCases = combinatorics.cartesianProduct(...allValues);
let counter = 0;
testCases.forEach(async testCase => {
counter += 1;
it(`${name} ${counter}/${testCases.length}`, async () => {
await testWithReferenceFuncAsync(referenceFuncAsync, testFuncAsync, testCase as any);
});
});
}

View File

@@ -46,16 +46,16 @@ chaiSetup.configure();
const expect = chai.expect;
/**
* Instantiates a new instance of CoreCombinatorialUtils. Since this method has some
* Instantiates a new instance of FillOrderCombinatorialUtils. Since this method has some
* required async setup, a factory method is required.
* @param web3Wrapper Web3Wrapper instance
* @param txDefaults Default Ethereum tx options
* @return CoreCombinatorialUtils instance
* @return FillOrderCombinatorialUtils instance
*/
export async function coreCombinatorialUtilsFactoryAsync(
export async function fillOrderCombinatorialUtilsFactoryAsync(
web3Wrapper: Web3Wrapper,
txDefaults: Partial<TxData>,
): Promise<CoreCombinatorialUtils> {
): Promise<FillOrderCombinatorialUtils> {
const accounts = await web3Wrapper.getAvailableAddressesAsync();
const userAddresses = _.slice(accounts, 0, 5);
const [ownerAddress, makerAddress, takerAddress] = userAddresses;
@@ -123,7 +123,7 @@ export async function coreCombinatorialUtilsFactoryAsync(
exchangeContract.address,
);
const coreCombinatorialUtils = new CoreCombinatorialUtils(
const fillOrderCombinatorialUtils = new FillOrderCombinatorialUtils(
orderFactory,
ownerAddress,
makerAddress,
@@ -133,10 +133,10 @@ export async function coreCombinatorialUtilsFactoryAsync(
exchangeWrapper,
assetWrapper,
);
return coreCombinatorialUtils;
return fillOrderCombinatorialUtils;
}
export class CoreCombinatorialUtils {
export class FillOrderCombinatorialUtils {
public orderFactory: OrderFactoryFromScenario;
public ownerAddress: string;
public makerAddress: string;
@@ -240,7 +240,7 @@ export class CoreCombinatorialUtils {
// AllowanceAmountScenario.TooLow,
// AllowanceAmountScenario.Unlimited,
];
const fillScenarioArrays = CoreCombinatorialUtils._getAllCombinations([
const fillScenarioArrays = FillOrderCombinatorialUtils._getAllCombinations([
takerScenarios,
feeRecipientScenarios,
makerAssetAmountScenario,
@@ -309,7 +309,7 @@ export class CoreCombinatorialUtils {
} else {
const result = [];
const restOfArrays = arrays.slice(1);
const allCombinationsOfRemaining = CoreCombinatorialUtils._getAllCombinations(restOfArrays); // recur with the rest of array
const allCombinationsOfRemaining = FillOrderCombinatorialUtils._getAllCombinations(restOfArrays); // recur with the rest of array
// tslint:disable:prefer-for-of
for (let i = 0; i < allCombinationsOfRemaining.length; i++) {
for (let j = 0; j < arrays[0].length; j++) {

View File

@@ -0,0 +1,119 @@
import * as chai from 'chai';
import * as _ from 'lodash';
import { chaiSetup } from './chai_setup';
chaiSetup.configure();
const expect = chai.expect;
export async function testWithReferenceFuncAsync<P0, R>(
referenceFunc: (p0: P0) => Promise<R>,
testFunc: (p0: P0) => Promise<R>,
values: [P0],
): Promise<void>;
export async function testWithReferenceFuncAsync<P0, P1, R>(
referenceFunc: (p0: P0, p1: P1) => Promise<R>,
testFunc: (p0: P0, p1: P1) => Promise<R>,
values: [P0, P1],
): Promise<void>;
export async function testWithReferenceFuncAsync<P0, P1, P2, R>(
referenceFunc: (p0: P0, p1: P1, p2: P2) => Promise<R>,
testFunc: (p0: P0, p1: P1, p2: P2) => Promise<R>,
values: [P0, P1, P2],
): Promise<void>;
export async function testWithReferenceFuncAsync<P0, P1, P2, P3, R>(
referenceFunc: (p0: P0, p1: P1, p2: P2, p3: P3) => Promise<R>,
testFunc: (p0: P0, p1: P1, p2: P2, p3: P3) => Promise<R>,
values: [P0, P1, P2, P3],
): Promise<void>;
export async function testWithReferenceFuncAsync<P0, P1, P2, P3, P4, R>(
referenceFunc: (p0: P0, p1: P1, p2: P2, p3: P3, p4: P4) => Promise<R>,
testFunc: (p0: P0, p1: P1, p2: P2, p3: P3, p4: P4) => Promise<R>,
values: [P0, P1, P2, P3, P4],
): Promise<void>;
/**
* Tests the behavior of a test function by comparing it to the expected
* behavior (defined by a reference function).
*
* First the reference function will be called to obtain an "expected result",
* or if the reference function throws/rejects, an "expected error". Next, the
* test function will be called to obtain an "actual result", or if the test
* function throws/rejects, an "actual error". The test passes if at least one
* of the following conditions is met:
*
* 1) Neither the reference function or the test function throw and the
* "expected result" equals the "actual result".
*
* 2) Both the reference function and the test function throw and the "actual
* error" message *contains* the "expected error" message.
*
* @param referenceFuncAsync a reference function implemented in pure
* JavaScript/TypeScript which accepts N arguments and returns the "expected
* result" or throws/rejects with the "expected error".
* @param testFuncAsync a test function which, e.g., makes a call or sends a
* transaction to a contract. It accepts the same N arguments returns the
* "actual result" or throws/rejects with the "actual error".
* @param values an array of N values, where each value corresponds in-order to
* an argument to both the test function and the reference function.
* @return A Promise that resolves if the test passes and rejects if the test
* fails, according to the rules described above.
*/
export async function testWithReferenceFuncAsync(
referenceFuncAsync: (...args: any[]) => Promise<any>,
testFuncAsync: (...args: any[]) => Promise<any>,
values: any[],
): Promise<void> {
let expectedResult: any;
let expectedErr: string | undefined;
try {
expectedResult = await referenceFuncAsync(...values);
} catch (e) {
expectedErr = e.message;
}
let actualResult: any | undefined;
try {
actualResult = await testFuncAsync(...values);
if (!_.isUndefined(expectedErr)) {
throw new Error(
`Expected error containing ${expectedErr} but got no error\n\tTest case: ${_getTestCaseString(
referenceFuncAsync,
values,
)}`,
);
}
} catch (e) {
if (_.isUndefined(expectedErr)) {
throw new Error(`${e.message}\n\tTest case: ${_getTestCaseString(referenceFuncAsync, values)}`);
} else {
expect(e.message).to.contain(
expectedErr,
`${e.message}\n\tTest case: ${_getTestCaseString(referenceFuncAsync, values)}`,
);
}
}
if (!_.isUndefined(actualResult) && !_.isUndefined(expectedResult)) {
expect(actualResult).to.deep.equal(
expectedResult,
`Test case: ${_getTestCaseString(referenceFuncAsync, values)}`,
);
}
}
function _getTestCaseString(referenceFuncAsync: (...args: any[]) => Promise<any>, values: any[]): string {
const paramNames = _getParameterNames(referenceFuncAsync);
return JSON.stringify(_.zipObject(paramNames, values));
}
// Source: https://stackoverflow.com/questions/1007981/how-to-get-function-parameter-names-values-dynamically
function _getParameterNames(func: (...args: any[]) => any): string[] {
return _.toString(func)
.replace(/[/][/].*$/gm, '') // strip single-line comments
.replace(/\s+/g, '') // strip white space
.replace(/[/][*][^/*]*[*][/]/g, '') // strip multi-line comments
.split('){', 1)[0]
.replace(/^[^(]*[(]/, '') // extract the parameters
.replace(/=[^,]+/g, '') // strip any ES6 defaults
.split(',')
.filter(Boolean); // split & filter [""]
}

View File

@@ -1,4 +1,13 @@
[
{
"version": "1.0.3",
"changes": [
{
"note": "Dependencies updated"
}
],
"timestamp": 1532619515
},
{
"timestamp": 1532605697,
"version": "1.0.2",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.3 - _July 26, 2018_
* Dependencies updated
## v1.0.2 - _July 26, 2018_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0xproject/dev-utils",
"version": "1.0.2",
"version": "1.0.3",
"engines": {
"node": ">=6.12"
},
@@ -30,8 +30,8 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/dev-utils/README.md",
"devDependencies": {
"@0xproject/monorepo-scripts": "^1.0.3",
"@0xproject/tslint-config": "^1.0.3",
"@0xproject/monorepo-scripts": "^1.0.4",
"@0xproject/tslint-config": "^1.0.4",
"@types/lodash": "4.14.104",
"@types/mocha": "^2.2.42",
"chai": "^4.0.1",
@@ -45,12 +45,12 @@
"typescript": "2.7.1"
},
"dependencies": {
"@0xproject/subproviders": "^1.0.2",
"@0xproject/types": "^1.0.1-rc.1",
"@0xproject/typescript-typings": "^1.0.2",
"@0xproject/utils": "^1.0.2",
"@0xproject/web3-wrapper": "^1.1.0",
"ethereum-types": "^1.0.2",
"@0xproject/subproviders": "^1.0.4",
"@0xproject/types": "^1.0.1-rc.3",
"@0xproject/typescript-typings": "^1.0.3",
"@0xproject/utils": "^1.0.4",
"@0xproject/web3-wrapper": "^1.1.2",
"ethereum-types": "^1.0.3",
"lodash": "^4.17.4"
},
"publishConfig": {

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1532614997,
"version": "1.0.3",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532605697,
"version": "1.0.2",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.3 - _July 26, 2018_
* Dependencies updated
## v1.0.2 - _July 26, 2018_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "ethereum-types",
"version": "1.0.2",
"version": "1.0.3",
"engines": {
"node": ">=6.12"
},
@@ -35,8 +35,8 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/ethereum-types/README.md",
"devDependencies": {
"@0xproject/monorepo-scripts": "^1.0.3",
"@0xproject/tslint-config": "^1.0.3",
"@0xproject/monorepo-scripts": "^1.0.4",
"@0xproject/tslint-config": "^1.0.4",
"copyfiles": "^1.2.0",
"make-promises-safe": "^1.1.0",
"shx": "^0.2.2",

View File

@@ -1,4 +1,13 @@
[
{
"version": "1.0.1-rc.2",
"changes": [
{
"note": "Dependencies updated"
}
],
"timestamp": 1532619515
},
{
"version": "1.0.1-rc.1",
"changes": [

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.1-rc.2 - _July 26, 2018_
* Dependencies updated
## v1.0.1-rc.1 - _July 26, 2018_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0xproject/fill-scenarios",
"version": "1.0.1-rc.1",
"version": "1.0.1-rc.2",
"description": "0x order fill scenario generator",
"main": "lib/index.js",
"types": "lib/index.d.ts",
@@ -28,10 +28,10 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/fill-scenarios/README.md",
"devDependencies": {
"@0xproject/abi-gen": "^1.0.2",
"@0xproject/monorepo-scripts": "^1.0.3",
"@0xproject/sol-compiler": "^1.0.2",
"@0xproject/tslint-config": "^1.0.3",
"@0xproject/abi-gen": "^1.0.4",
"@0xproject/monorepo-scripts": "^1.0.4",
"@0xproject/sol-compiler": "^1.0.4",
"@0xproject/tslint-config": "^1.0.4",
"@types/lodash": "4.14.104",
"copyfiles": "^1.2.0",
"make-promises-safe": "^1.1.0",
@@ -41,13 +41,13 @@
"typescript": "2.7.1"
},
"dependencies": {
"@0xproject/base-contract": "^1.0.2",
"@0xproject/order-utils": "^1.0.1-rc.1",
"@0xproject/types": "^1.0.1-rc.1",
"@0xproject/typescript-typings": "^1.0.2",
"@0xproject/utils": "^1.0.2",
"@0xproject/web3-wrapper": "^1.1.0",
"ethereum-types": "^1.0.2",
"@0xproject/base-contract": "^1.0.4",
"@0xproject/order-utils": "^1.0.1-rc.2",
"@0xproject/types": "^1.0.1-rc.3",
"@0xproject/typescript-typings": "^1.0.3",
"@0xproject/utils": "^1.0.4",
"@0xproject/web3-wrapper": "^1.1.2",
"ethereum-types": "^1.0.3",
"ethers": "3.0.22",
"lodash": "^4.17.4"
},

View File

@@ -1,4 +1,22 @@
[
{
"version": "1.0.1-rc.3",
"changes": [
{
"note": "Dependencies updated"
}
],
"timestamp": 1532619515
},
{
"version": "1.0.1-rc.2",
"changes": [
{
"note": "Dependencies updated"
}
],
"timestamp": 1532614997
},
{
"version": "1.0.1-rc.1",
"changes": [

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.1-rc.3 - _July 26, 2018_
* Dependencies updated
## v1.0.1-rc.2 - _July 26, 2018_
* Dependencies updated
## v1.0.1-rc.1 - _July 26, 2018_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0xproject/json-schemas",
"version": "1.0.1-rc.1",
"version": "1.0.1-rc.3",
"engines": {
"node": ">=6.12"
},
@@ -47,15 +47,15 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/json-schemas/README.md",
"dependencies": {
"@0xproject/typescript-typings": "^1.0.2",
"@0xproject/typescript-typings": "^1.0.3",
"@types/node": "^8.0.53",
"jsonschema": "^1.2.0",
"lodash.values": "^4.3.0"
},
"devDependencies": {
"@0xproject/monorepo-scripts": "^1.0.3",
"@0xproject/tslint-config": "^1.0.3",
"@0xproject/utils": "^1.0.2",
"@0xproject/monorepo-scripts": "^1.0.4",
"@0xproject/tslint-config": "^1.0.4",
"@0xproject/utils": "^1.0.4",
"@types/lodash.foreach": "^4.5.3",
"@types/lodash.values": "^4.3.3",
"@types/mocha": "^2.2.42",

View File

@@ -1,6 +1,6 @@
{
"name": "@0xproject/metacoin",
"version": "0.0.12",
"version": "0.0.14",
"engines": {
"node": ">=6.12"
},
@@ -29,25 +29,25 @@
"author": "",
"license": "Apache-2.0",
"dependencies": {
"@0xproject/abi-gen": "^1.0.2",
"@0xproject/base-contract": "^1.0.2",
"@0xproject/sol-compiler": "^1.0.2",
"@0xproject/sol-cov": "^1.0.2",
"@0xproject/subproviders": "^1.0.2",
"@0xproject/tslint-config": "^1.0.3",
"@0xproject/types": "^1.0.1-rc.1",
"@0xproject/typescript-typings": "^1.0.2",
"@0xproject/utils": "^1.0.2",
"@0xproject/web3-wrapper": "^1.1.0",
"@0xproject/abi-gen": "^1.0.4",
"@0xproject/base-contract": "^1.0.4",
"@0xproject/sol-compiler": "^1.0.4",
"@0xproject/sol-cov": "^1.0.3",
"@0xproject/subproviders": "^1.0.4",
"@0xproject/tslint-config": "^1.0.4",
"@0xproject/types": "^1.0.1-rc.3",
"@0xproject/typescript-typings": "^1.0.3",
"@0xproject/utils": "^1.0.4",
"@0xproject/web3-wrapper": "^1.1.2",
"@types/mocha": "^5.2.2",
"copyfiles": "^2.0.0",
"ethereum-types": "^1.0.2",
"ethereum-types": "^1.0.3",
"ethers": "3.0.22",
"lodash": "^4.17.4",
"run-s": "^0.0.0"
},
"devDependencies": {
"@0xproject/dev-utils": "^1.0.2",
"@0xproject/dev-utils": "^1.0.3",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
"chai-bignumber": "^2.0.1",

View File

@@ -1,4 +1,13 @@
[
{
"version": "1.0.3",
"changes": [
{
"note": "Dependencies updated"
}
],
"timestamp": 1532619515
},
{
"timestamp": 1532605697,
"version": "1.0.2",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.3 - _July 26, 2018_
* Dependencies updated
## v1.0.2 - _July 26, 2018_
* Dependencies updated

View File

@@ -44468,11 +44468,5 @@
}
}
},
"networks": {
"50": {
"address": "0x34d402f14d58e001d8efbe6585051bf9706aa064",
"links": {},
"constructorArgs": "[[\"0x5409ed021d9299bf6814279a6a1411a7e866a631\",\"0x6ecbe1db9ef729cbe972c83fb886247691fb6beb\"],[\"0x1dc4c1cefef38a777b15aa20260a54e584b16c48\",\"0x1d7022f5b17d2f8b695918fb48fa1089c9f85401\"],\"2\",\"0\"]"
}
}
"networks": {}
}

View File

@@ -252,11 +252,5 @@
}
}
},
"networks": {
"50": {
"address": "0x1dc4c1cefef38a777b15aa20260a54e584b16c48",
"links": {},
"constructorArgs": "[]"
}
}
"networks": {}
}

View File

@@ -252,11 +252,5 @@
}
}
},
"networks": {
"50": {
"address": "0x1d7022f5b17d2f8b695918fb48fa1089c9f85401",
"links": {},
"constructorArgs": "[]"
}
}
"networks": {}
}

File diff suppressed because one or more lines are too long

View File

@@ -2229,11 +2229,5 @@
}
}
},
"networks": {
"50": {
"address": "0x48bacb9266a570d521063ef5dd96e61686dbe788",
"links": {},
"constructorArgs": "[\"0xf47261b0000000000000000000000000871dd7c2b4b25e1aa18728e9d5f2af4c4e431f5c\"]"
}
}
}
"networks": {}
}

File diff suppressed because one or more lines are too long

View File

@@ -326,11 +326,5 @@
}
}
},
"networks": {
"50": {
"address": "0x0b1ba0af832d7c05fd64161e0db78e85978e8082",
"links": {},
"constructorArgs": "[]"
}
}
"networks": {}
}

View File

@@ -10028,4 +10028,4 @@
"constructorArgs": "[]"
}
}
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@0xproject/migrations",
"version": "1.0.2",
"version": "1.0.3",
"engines": {
"node": ">=6.12"
},
@@ -38,11 +38,11 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@0xproject/abi-gen": "^1.0.2",
"@0xproject/dev-utils": "^1.0.2",
"@0xproject/monorepo-scripts": "^1.0.3",
"@0xproject/tslint-config": "^1.0.3",
"@0xproject/types": "^1.0.1-rc.1",
"@0xproject/abi-gen": "^1.0.4",
"@0xproject/dev-utils": "^1.0.3",
"@0xproject/monorepo-scripts": "^1.0.4",
"@0xproject/tslint-config": "^1.0.4",
"@0xproject/types": "^1.0.1-rc.3",
"@types/yargs": "^10.0.0",
"copyfiles": "^1.2.0",
"make-promises-safe": "^1.1.0",
@@ -53,15 +53,15 @@
"yargs": "^10.0.3"
},
"dependencies": {
"@0xproject/base-contract": "^1.0.2",
"@0xproject/order-utils": "^1.0.1-rc.1",
"@0xproject/sol-compiler": "^1.0.2",
"@0xproject/subproviders": "^1.0.2",
"@0xproject/typescript-typings": "^1.0.2",
"@0xproject/utils": "^1.0.2",
"@0xproject/web3-wrapper": "^1.1.0",
"@0xproject/base-contract": "^1.0.4",
"@0xproject/order-utils": "^1.0.1-rc.2",
"@0xproject/sol-compiler": "^1.0.4",
"@0xproject/subproviders": "^1.0.4",
"@0xproject/typescript-typings": "^1.0.3",
"@0xproject/utils": "^1.0.4",
"@0xproject/web3-wrapper": "^1.1.2",
"@ledgerhq/hw-app-eth": "^4.3.0",
"ethereum-types": "^1.0.2",
"ethereum-types": "^1.0.3",
"ethers": "3.0.22",
"lodash": "^4.17.4"
},

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1532614997,
"version": "1.0.4",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532605697,
"version": "1.0.3",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.4 - _July 26, 2018_
* Dependencies updated
## v1.0.3 - _July 26, 2018_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0xproject/monorepo-scripts",
"version": "1.0.3",
"version": "1.0.4",
"engines": {
"node": ">=6.12"
},

View File

@@ -57,7 +57,6 @@ export const postpublishUtils = {
}
const postpublishConfigs = postpublishUtils.generateConfig(packageJSON, tsConfigJSON, cwd);
await postpublishUtils.publishReleaseNotesAsync(
postpublishConfigs.cwd,
postpublishConfigs.packageName,
postpublishConfigs.version,
postpublishConfigs.assets,
@@ -92,11 +91,11 @@ export const postpublishUtils = {
postpublishConfigs.docPublishConfigs.s3StagingBucketPath,
);
},
async publishReleaseNotesAsync(cwd: string, packageName: string, version: string, assets: string[]): Promise<void> {
async publishReleaseNotesAsync(packageName: string, version: string, assets: string[]): Promise<void> {
const notes = postpublishUtils.getReleaseNotes(packageName, version);
const releaseName = postpublishUtils.getReleaseName(packageName, version);
const tag = postpublishUtils.getTag(packageName, version);
postpublishUtils.adjustAssetPaths(cwd, assets);
postpublishUtils.adjustAssetPaths(assets);
utils.log('POSTPUBLISH: Releasing ', releaseName, '...');
await publishReleaseAsync({
token: constants.githubPersonalAccessToken,
@@ -145,10 +144,12 @@ export const postpublishUtils = {
const releaseName = `${subPackageName} v${version}`;
return releaseName;
},
adjustAssetPaths(cwd: string, assets: string[]): string[] {
// Asset paths should described from the monorepo root. This method prefixes
// the supplied path with the absolute path to the monorepo root.
adjustAssetPaths(assets: string[]): string[] {
const finalAssets: string[] = [];
_.each(assets, (asset: string) => {
finalAssets.push(`${cwd}/${asset}`);
finalAssets.push(`${constants.monorepoRootPath}/${asset}`);
});
return finalAssets;
},

View File

@@ -8,7 +8,17 @@ import * as rimraf from 'rimraf';
import { utils } from './utils/utils';
// Packages might not be runnable if they are command-line tools or only run in browsers.
const UNRUNNABLE_PACKAGES = [
'@0xproject/abi-gen',
'@0xproject/sra-report',
'@0xproject/react-shared',
'@0xproject/react-docs',
];
(async () => {
const IS_LOCAL_PUBLISH = process.env.IS_LOCAL_PUBLISH === 'true';
const registry = IS_LOCAL_PUBLISH ? 'http://localhost:4873/' : 'https://registry.npmjs.org/';
const monorepoRootPath = path.join(__dirname, '../../..');
const packages = utils.getTopologicallySortedPackages(monorepoRootPath);
const installablePackages = _.filter(
@@ -21,18 +31,19 @@ import { utils } from './utils/utils';
const changelogPath = path.join(installablePackage.location, 'CHANGELOG.json');
const lastChangelogVersion = JSON.parse(fs.readFileSync(changelogPath).toString())[0].version;
const packageName = installablePackage.packageJson.name;
utils.log(`Testing ${packageName}`);
utils.log(`Testing ${packageName}@${lastChangelogVersion}`);
const testDirectory = path.join(monorepoRootPath, '../test-env');
rimraf.sync(testDirectory);
fs.mkdirSync(testDirectory);
await execAsync('yarn init --yes', { cwd: testDirectory });
const npmrcFilePath = path.join(testDirectory, '.npmrc');
fs.writeFileSync(npmrcFilePath, `registry=http://localhost:4873`);
fs.writeFileSync(npmrcFilePath, `registry=${registry}`);
utils.log(`Installing ${packageName}@${lastChangelogVersion}`);
await execAsync(`npm install --save ${packageName}@${lastChangelogVersion} --registry=http://localhost:4873`, {
await execAsync(`npm install --save ${packageName}@${lastChangelogVersion} --registry=${registry}`, {
cwd: testDirectory,
});
const indexFilePath = path.join(testDirectory, 'index.ts');
fs.writeFileSync(indexFilePath, `import * as Package from '${packageName}';\n`);
fs.writeFileSync(indexFilePath, `import * as Package from '${packageName}';\nconsole.log(Package);\n`);
const tsConfig = {
compilerOptions: {
typeRoots: ['node_modules/@0xproject/typescript-typings/types', 'node_modules/@types'],
@@ -52,6 +63,13 @@ import { utils } from './utils/utils';
const tscBinaryPath = path.join(monorepoRootPath, './node_modules/typescript/bin/tsc');
await execAsync(tscBinaryPath, { cwd: testDirectory });
utils.log(`Successfully compiled with ${packageName} as a dependency`);
const isUnrunnablePkg = _.includes(UNRUNNABLE_PACKAGES, packageName);
if (!isUnrunnablePkg) {
const transpiledIndexFilePath = path.join(testDirectory, 'index.js');
utils.log(`Running test script with ${packageName} imported`);
await execAsync(`node ${transpiledIndexFilePath}`);
utils.log(`Successfilly ran test script with ${packageName} imported`);
}
rimraf.sync(testDirectory);
}
})().catch(err => {

View File

@@ -1,4 +1,13 @@
[
{
"version": "1.0.1-rc.2",
"changes": [
{
"note": "Dependencies updated"
}
],
"timestamp": 1532619515
},
{
"version": "1.0.1-rc.1",
"changes": [

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.1-rc.2 - _July 26, 2018_
* Dependencies updated
## v1.0.1-rc.1 - _July 26, 2018_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0xproject/order-utils",
"version": "1.0.1-rc.1",
"version": "1.0.1-rc.2",
"engines": {
"node": ">=6.12"
},
@@ -53,9 +53,9 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/order-utils/README.md",
"devDependencies": {
"@0xproject/dev-utils": "^1.0.2",
"@0xproject/monorepo-scripts": "^1.0.3",
"@0xproject/tslint-config": "^1.0.3",
"@0xproject/dev-utils": "^1.0.3",
"@0xproject/monorepo-scripts": "^1.0.4",
"@0xproject/tslint-config": "^1.0.4",
"@types/bn.js": "^4.11.0",
"@types/lodash": "4.14.104",
"chai": "^4.0.1",
@@ -73,17 +73,17 @@
"typescript": "2.7.1"
},
"dependencies": {
"@0xproject/assert": "^1.0.2",
"@0xproject/base-contract": "^1.0.2",
"@0xproject/json-schemas": "^1.0.1-rc.1",
"@0xproject/sol-compiler": "^1.0.2",
"@0xproject/types": "^1.0.1-rc.1",
"@0xproject/typescript-typings": "^1.0.2",
"@0xproject/utils": "^1.0.2",
"@0xproject/web3-wrapper": "^1.1.0",
"@0xproject/assert": "^1.0.4",
"@0xproject/base-contract": "^1.0.4",
"@0xproject/json-schemas": "^1.0.1-rc.3",
"@0xproject/sol-compiler": "^1.0.4",
"@0xproject/types": "^1.0.1-rc.3",
"@0xproject/typescript-typings": "^1.0.3",
"@0xproject/utils": "^1.0.4",
"@0xproject/web3-wrapper": "^1.1.2",
"@types/node": "^8.0.53",
"bn.js": "^4.11.8",
"ethereum-types": "^1.0.2",
"ethereum-types": "^1.0.3",
"ethereumjs-abi": "0.6.5",
"ethereumjs-util": "^5.1.1",
"ethers": "3.0.22",

View File

@@ -1,4 +1,13 @@
[
{
"version": "1.0.1-rc.2",
"changes": [
{
"note": "Fixed bug caused by importing non-existent dep"
}
],
"timestamp": 1532619515
},
{
"version": "1.0.1-rc.1",
"changes": [

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.1-rc.2 - _July 26, 2018_
* Fixed bug caused by importing non-existent dep
## v1.0.1-rc.1 - _July 26, 2018_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0xproject/order-watcher",
"version": "1.0.1-rc.1",
"version": "1.0.1-rc.2",
"description": "An order watcher daemon that watches for order validity",
"keywords": [
"0x",
@@ -40,12 +40,12 @@
"node": ">=6.0.0"
},
"devDependencies": {
"@0xproject/abi-gen": "^1.0.2",
"@0xproject/dev-utils": "^1.0.2",
"@0xproject/migrations": "^1.0.2",
"@0xproject/monorepo-scripts": "^1.0.3",
"@0xproject/sol-compiler": "^1.0.2",
"@0xproject/tslint-config": "^1.0.3",
"@0xproject/abi-gen": "^1.0.4",
"@0xproject/dev-utils": "^1.0.3",
"@0xproject/migrations": "^1.0.3",
"@0xproject/monorepo-scripts": "^1.0.4",
"@0xproject/sol-compiler": "^1.0.4",
"@0xproject/tslint-config": "^1.0.4",
"@types/bintrees": "^1.0.2",
"@types/lodash": "4.14.104",
"@types/mocha": "^2.2.42",
@@ -70,18 +70,18 @@
"typescript": "2.7.1"
},
"dependencies": {
"@0xproject/assert": "^1.0.2",
"@0xproject/base-contract": "^1.0.2",
"@0xproject/contract-wrappers": "^1.0.1-rc.1",
"@0xproject/fill-scenarios": "^1.0.1-rc.1",
"@0xproject/json-schemas": "^1.0.1-rc.1",
"@0xproject/order-utils": "^1.0.1-rc.1",
"@0xproject/types": "^1.0.1-rc.1",
"@0xproject/typescript-typings": "^1.0.2",
"@0xproject/utils": "^1.0.2",
"@0xproject/web3-wrapper": "^1.1.0",
"@0xproject/assert": "^1.0.4",
"@0xproject/base-contract": "^1.0.4",
"@0xproject/contract-wrappers": "^1.0.1-rc.2",
"@0xproject/fill-scenarios": "^1.0.1-rc.2",
"@0xproject/json-schemas": "^1.0.1-rc.3",
"@0xproject/order-utils": "^1.0.1-rc.2",
"@0xproject/types": "^1.0.1-rc.3",
"@0xproject/typescript-typings": "^1.0.3",
"@0xproject/utils": "^1.0.4",
"@0xproject/web3-wrapper": "^1.1.2",
"bintrees": "^1.0.2",
"ethereum-types": "^1.0.2",
"ethereum-types": "^1.0.3",
"ethereumjs-blockstream": "5.0.0",
"ethers": "3.0.22",
"lodash": "^4.17.4"

View File

@@ -1,7 +1,7 @@
{
"private": true,
"name": "@0xproject/react-docs-example",
"version": "0.0.17",
"version": "0.0.19",
"engines": {
"node": ">=6.12"
},
@@ -26,7 +26,7 @@
"url": "https://github.com/0xProject/0x-monorepo.git"
},
"devDependencies": {
"@0xproject/tslint-config": "^1.0.3",
"@0xproject/tslint-config": "^1.0.4",
"@types/lodash": "4.14.104",
"@types/material-ui": "0.18.0",
"@types/node": "^8.0.53",
@@ -50,7 +50,7 @@
"webpack-dev-server": "^2.11.1"
},
"dependencies": {
"@0xproject/react-docs": "^1.0.2",
"@0xproject/react-docs": "^1.0.4",
"basscss": "^8.0.3",
"lodash": "^4.17.4",
"material-ui": "^0.17.1",

View File

@@ -1,4 +1,22 @@
[
{
"timestamp": 1532619515,
"version": "1.0.4",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532614997,
"version": "1.0.3",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532605697,
"version": "1.0.2",

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.4 - _July 26, 2018_
* Dependencies updated
## v1.0.3 - _July 26, 2018_
* Dependencies updated
## v1.0.2 - _July 26, 2018_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0xproject/react-docs",
"version": "1.0.2",
"version": "1.0.4",
"engines": {
"node": ">=6.12"
},
@@ -25,9 +25,9 @@
"url": "https://github.com/0xProject/0x-monorepo.git"
},
"devDependencies": {
"@0xproject/dev-utils": "^1.0.2",
"@0xproject/monorepo-scripts": "^1.0.3",
"@0xproject/tslint-config": "^1.0.3",
"@0xproject/dev-utils": "^1.0.3",
"@0xproject/monorepo-scripts": "^1.0.4",
"@0xproject/tslint-config": "^1.0.4",
"@types/compare-versions": "^3.0.0",
"copyfiles": "^1.2.0",
"make-promises-safe": "^1.1.0",
@@ -36,8 +36,8 @@
"typescript": "2.7.1"
},
"dependencies": {
"@0xproject/react-shared": "^1.0.3",
"@0xproject/utils": "^1.0.2",
"@0xproject/react-shared": "^1.0.5",
"@0xproject/utils": "^1.0.4",
"@types/lodash": "4.14.104",
"@types/material-ui": "0.18.0",
"@types/node": "^8.0.53",

View File

@@ -1,4 +1,22 @@
[
{
"timestamp": 1532619515,
"version": "1.0.5",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532614997,
"version": "1.0.4",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532605697,
"version": "1.0.3",

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.5 - _July 26, 2018_
* Dependencies updated
## v1.0.4 - _July 26, 2018_
* Dependencies updated
## v1.0.3 - _July 26, 2018_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0xproject/react-shared",
"version": "1.0.3",
"version": "1.0.5",
"engines": {
"node": ">=6.12"
},
@@ -25,9 +25,9 @@
"url": "https://github.com/0xProject/0x-monorepo.git"
},
"devDependencies": {
"@0xproject/dev-utils": "^1.0.2",
"@0xproject/monorepo-scripts": "^1.0.3",
"@0xproject/tslint-config": "^1.0.3",
"@0xproject/dev-utils": "^1.0.3",
"@0xproject/monorepo-scripts": "^1.0.4",
"@0xproject/tslint-config": "^1.0.4",
"copyfiles": "^1.2.0",
"make-promises-safe": "^1.1.0",
"shx": "^0.2.2",

View File

@@ -1,4 +1,22 @@
[
{
"timestamp": 1532619515,
"version": "1.0.4",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532614997,
"version": "1.0.3",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532605697,
"version": "1.0.2",

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.4 - _July 26, 2018_
* Dependencies updated
## v1.0.3 - _July 26, 2018_
* Dependencies updated
## v1.0.2 - _July 26, 2018_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0xproject/sol-compiler",
"version": "1.0.2",
"version": "1.0.4",
"engines": {
"node": ">=6.12"
},
@@ -53,9 +53,9 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/sol-compiler/README.md",
"devDependencies": {
"@0xproject/dev-utils": "^1.0.2",
"@0xproject/monorepo-scripts": "^1.0.3",
"@0xproject/tslint-config": "^1.0.3",
"@0xproject/dev-utils": "^1.0.3",
"@0xproject/monorepo-scripts": "^1.0.4",
"@0xproject/tslint-config": "^1.0.4",
"@types/mkdirp": "^0.5.2",
"@types/require-from-string": "^1.2.0",
"@types/semver": "^5.5.0",
@@ -76,16 +76,16 @@
"zeppelin-solidity": "1.8.0"
},
"dependencies": {
"@0xproject/assert": "^1.0.2",
"@0xproject/json-schemas": "^1.0.1-rc.1",
"@0xproject/sol-resolver": "^1.0.2",
"@0xproject/types": "^1.0.1-rc.1",
"@0xproject/typescript-typings": "^1.0.2",
"@0xproject/utils": "^1.0.2",
"@0xproject/web3-wrapper": "^1.1.0",
"@0xproject/assert": "^1.0.4",
"@0xproject/json-schemas": "^1.0.1-rc.3",
"@0xproject/sol-resolver": "^1.0.4",
"@0xproject/types": "^1.0.1-rc.3",
"@0xproject/typescript-typings": "^1.0.3",
"@0xproject/utils": "^1.0.4",
"@0xproject/web3-wrapper": "^1.1.2",
"@types/yargs": "^11.0.0",
"chalk": "^2.3.0",
"ethereum-types": "^1.0.2",
"ethereum-types": "^1.0.3",
"ethereumjs-util": "^5.1.1",
"lodash": "^4.17.4",
"mkdirp": "^0.5.1",

View File

@@ -1,4 +1,13 @@
[
{
"version": "1.0.3",
"changes": [
{
"note": "Dependencies updated"
}
],
"timestamp": 1532619515
},
{
"timestamp": 1532605697,
"version": "1.0.2",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.3 - _July 26, 2018_
* Dependencies updated
## v1.0.2 - _July 26, 2018_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0xproject/sol-cov",
"version": "1.0.2",
"version": "1.0.3",
"engines": {
"node": ">=6.12"
},
@@ -50,14 +50,14 @@
},
"homepage": "https://github.com/0xProject/0x.js/packages/sol-cov/README.md",
"dependencies": {
"@0xproject/dev-utils": "^1.0.2",
"@0xproject/sol-compiler": "^1.0.2",
"@0xproject/subproviders": "^1.0.2",
"@0xproject/typescript-typings": "^1.0.2",
"@0xproject/utils": "^1.0.2",
"@0xproject/web3-wrapper": "^1.1.0",
"@0xproject/dev-utils": "^1.0.3",
"@0xproject/sol-compiler": "^1.0.4",
"@0xproject/subproviders": "^1.0.4",
"@0xproject/typescript-typings": "^1.0.3",
"@0xproject/utils": "^1.0.4",
"@0xproject/web3-wrapper": "^1.1.2",
"@types/solidity-parser-antlr": "^0.2.1",
"ethereum-types": "^1.0.2",
"ethereum-types": "^1.0.3",
"ethereumjs-util": "^5.1.1",
"glob": "^7.1.2",
"istanbul": "^0.4.5",
@@ -69,8 +69,8 @@
"solidity-parser-antlr": "^0.2.12"
},
"devDependencies": {
"@0xproject/monorepo-scripts": "^1.0.3",
"@0xproject/tslint-config": "^1.0.3",
"@0xproject/monorepo-scripts": "^1.0.4",
"@0xproject/tslint-config": "^1.0.4",
"@types/istanbul": "^0.4.30",
"@types/loglevel": "^1.5.3",
"@types/mkdirp": "^0.5.1",

View File

@@ -1,4 +1,22 @@
[
{
"timestamp": 1532619515,
"version": "1.0.4",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532614997,
"version": "1.0.3",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532605697,
"version": "1.0.2",

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.4 - _July 26, 2018_
* Dependencies updated
## v1.0.3 - _July 26, 2018_
* Dependencies updated
## v1.0.2 - _July 26, 2018_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0xproject/sol-resolver",
"version": "1.0.2",
"version": "1.0.4",
"engines": {
"node": ">=6.12"
},
@@ -24,8 +24,8 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/resolver/README.md",
"devDependencies": {
"@0xproject/monorepo-scripts": "^1.0.3",
"@0xproject/tslint-config": "^1.0.3",
"@0xproject/monorepo-scripts": "^1.0.4",
"@0xproject/tslint-config": "^1.0.4",
"copyfiles": "^1.2.0",
"make-promises-safe": "^1.1.0",
"shx": "^0.2.2",
@@ -33,8 +33,8 @@
"typescript": "2.7.1"
},
"dependencies": {
"@0xproject/types": "^1.0.1-rc.1",
"@0xproject/typescript-typings": "^1.0.2",
"@0xproject/types": "^1.0.1-rc.3",
"@0xproject/typescript-typings": "^1.0.3",
"lodash": "^4.17.4"
},
"publishConfig": {

View File

@@ -1,4 +1,22 @@
[
{
"timestamp": 1532619515,
"version": "1.0.4",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532614997,
"version": "1.0.3",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532605697,
"version": "1.0.2",

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.4 - _July 26, 2018_
* Dependencies updated
## v1.0.3 - _July 26, 2018_
* Dependencies updated
## v1.0.2 - _July 26, 2018_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0xproject/sra-report",
"version": "1.0.2",
"version": "1.0.4",
"engines": {
"node": ">=6.12"
},
@@ -35,21 +35,21 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/sra-report/README.md",
"dependencies": {
"@0xproject/assert": "^1.0.2",
"@0xproject/connect": "^1.0.2",
"@0xproject/assert": "^1.0.4",
"@0xproject/connect": "^1.0.4",
"@0xproject/json-schemas": "^0.8.3",
"@0xproject/order-utils": "^0.0.9",
"@0xproject/types": "^0.8.2",
"@0xproject/typescript-typings": "^1.0.2",
"@0xproject/utils": "^1.0.2",
"@0xproject/typescript-typings": "^1.0.3",
"@0xproject/utils": "^1.0.4",
"chalk": "^2.3.0",
"lodash": "^4.17.4",
"newman": "^3.9.3",
"yargs": "^10.0.3"
},
"devDependencies": {
"@0xproject/monorepo-scripts": "^1.0.3",
"@0xproject/tslint-config": "^1.0.3",
"@0xproject/monorepo-scripts": "^1.0.4",
"@0xproject/tslint-config": "^1.0.4",
"@types/lodash": "4.14.104",
"@types/mocha": "^2.2.48",
"@types/nock": "^9.1.2",

View File

@@ -1,4 +1,22 @@
[
{
"timestamp": 1532619515,
"version": "1.0.4",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532614997,
"version": "1.0.3",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532605697,
"version": "1.0.2",

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.4 - _July 26, 2018_
* Dependencies updated
## v1.0.3 - _July 26, 2018_
* Dependencies updated
## v1.0.2 - _July 26, 2018_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0xproject/subproviders",
"version": "1.0.2",
"version": "1.0.4",
"engines": {
"node": ">=6.12"
},
@@ -40,18 +40,18 @@
}
},
"dependencies": {
"@0xproject/assert": "^1.0.2",
"@0xproject/types": "^1.0.1-rc.1",
"@0xproject/typescript-typings": "^1.0.2",
"@0xproject/utils": "^1.0.2",
"@0xproject/web3-wrapper": "^1.1.0",
"@0xproject/assert": "^1.0.4",
"@0xproject/types": "^1.0.1-rc.3",
"@0xproject/typescript-typings": "^1.0.3",
"@0xproject/utils": "^1.0.4",
"@0xproject/web3-wrapper": "^1.1.2",
"@ledgerhq/hw-app-eth": "^4.3.0",
"@ledgerhq/hw-transport-u2f": "^4.3.0",
"@types/hdkey": "^0.7.0",
"bip39": "^2.5.0",
"bn.js": "^4.11.8",
"eth-lightwallet": "^3.0.1",
"ethereum-types": "^1.0.2",
"ethereum-types": "^1.0.3",
"ethereumjs-tx": "^1.3.5",
"ethereumjs-util": "^5.1.1",
"ganache-core": "0xProject/ganache-core",
@@ -62,8 +62,8 @@
"web3-provider-engine": "14.0.6"
},
"devDependencies": {
"@0xproject/monorepo-scripts": "^1.0.3",
"@0xproject/tslint-config": "^1.0.3",
"@0xproject/monorepo-scripts": "^1.0.4",
"@0xproject/tslint-config": "^1.0.4",
"@types/bip39": "^2.4.0",
"@types/bn.js": "^4.11.0",
"@types/ethereumjs-tx": "^1.0.0",

View File

@@ -1,7 +1,7 @@
{
"private": true,
"name": "@0xproject/testnet-faucets",
"version": "1.0.38",
"version": "1.0.40",
"engines": {
"node": ">=6.12"
},
@@ -19,10 +19,10 @@
"license": "Apache-2.0",
"dependencies": {
"0x.js": "0.38.5",
"@0xproject/subproviders": "^1.0.2",
"@0xproject/typescript-typings": "^1.0.2",
"@0xproject/utils": "^1.0.2",
"@0xproject/web3-wrapper": "^1.1.0",
"@0xproject/subproviders": "^1.0.4",
"@0xproject/typescript-typings": "^1.0.3",
"@0xproject/utils": "^1.0.4",
"@0xproject/web3-wrapper": "^1.1.2",
"body-parser": "^1.17.1",
"ethereumjs-tx": "^1.3.5",
"ethereumjs-util": "^5.1.1",
@@ -31,12 +31,12 @@
"rollbar": "^0.6.5"
},
"devDependencies": {
"@0xproject/tslint-config": "^1.0.3",
"@0xproject/tslint-config": "^1.0.4",
"@types/body-parser": "^1.16.1",
"@types/express": "^4.0.35",
"@types/lodash": "4.14.104",
"awesome-typescript-loader": "^3.1.3",
"ethereum-types": "^1.0.2",
"ethereum-types": "^1.0.3",
"gulp": "^3.9.1",
"make-promises-safe": "^1.1.0",
"nodemon": "^1.11.0",

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1532614997,
"version": "1.0.4",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532605697,
"version": "1.0.3",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.4 - _July 26, 2018_
* Dependencies updated
## v1.0.3 - _July 26, 2018_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0xproject/tslint-config",
"version": "1.0.3",
"version": "1.0.4",
"engines": {
"node": ">=6.12"
},
@@ -34,7 +34,7 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/tslint-config/README.md",
"devDependencies": {
"@0xproject/monorepo-scripts": "^1.0.3",
"@0xproject/monorepo-scripts": "^1.0.4",
"@types/lodash": "4.14.104",
"copyfiles": "^1.2.0",
"make-promises-safe": "^1.1.0",

View File

@@ -1,4 +1,22 @@
[
{
"version": "1.0.1-rc.3",
"changes": [
{
"note": "Dependencies updated"
}
],
"timestamp": 1532619515
},
{
"version": "1.0.1-rc.2",
"changes": [
{
"note": "Dependencies updated"
}
],
"timestamp": 1532614997
},
{
"version": "1.0.1-rc.1",
"changes": [

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.1-rc.3 - _July 26, 2018_
* Dependencies updated
## v1.0.1-rc.2 - _July 26, 2018_
* Dependencies updated
## v1.0.1-rc.1 - _July 26, 2018_
* Remove `ECSignatureBuffer`

View File

@@ -1,6 +1,6 @@
{
"name": "@0xproject/types",
"version": "1.0.1-rc.1",
"version": "1.0.1-rc.3",
"engines": {
"node": ">=6.12"
},
@@ -24,8 +24,8 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/types/README.md",
"devDependencies": {
"@0xproject/monorepo-scripts": "^1.0.3",
"@0xproject/tslint-config": "^1.0.3",
"@0xproject/monorepo-scripts": "^1.0.4",
"@0xproject/tslint-config": "^1.0.4",
"copyfiles": "^1.2.0",
"make-promises-safe": "^1.1.0",
"shx": "^0.2.2",
@@ -35,7 +35,7 @@
"dependencies": {
"@types/node": "^8.0.53",
"bignumber.js": "~4.1.0",
"ethereum-types": "^1.0.2"
"ethereum-types": "^1.0.3"
},
"publishConfig": {
"access": "public"

View File

@@ -213,6 +213,7 @@ export enum RevertReason {
ValueGreaterThanZero = 'VALUE_GREATER_THAN_ZERO',
InvalidMsgValue = 'INVALID_MSG_VALUE',
InsufficientEthRemaining = 'INSUFFICIENT_ETH_REMAINING',
Uint256Overflow = 'UINT256_OVERFLOW',
}
export enum StatusCodes {

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1532614997,
"version": "1.0.3",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532605697,
"version": "1.0.2",

Some files were not shown because too many files have changed in this diff Show More