diff --git a/.gitignore b/.gitignore index 9ec02fdd5..658655f76 100644 --- a/.gitignore +++ b/.gitignore @@ -38,9 +38,4 @@ build/ # truffle .node-xmlhttprequest-* -<<<<<<< HEAD .zos.session -======= -# Temporary directory for 0.5.x compilation -solc-0.5 ->>>>>>> 8fc0a3af313d9372fc9b8d3e5dc57b804df0588e diff --git a/.travis.yml b/.travis.yml index fc6fc14cf..9f313d1f5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,10 +25,11 @@ jobs: name: "Unit tests" script: npm run test - - stage: tests - name: "Unit tests with coverage report" - script: npm run test - env: SOLIDITY_COVERAGE=true +# solidity-coverage fails at parsing 0.5.x code +# - stage: tests +# name: "Unit tests with coverage report" +# script: npm run test +# env: SOLIDITY_COVERAGE=true - stage: tests name: "Unit tests using solc nightly" diff --git a/CHANGELOG.md b/CHANGELOG.md index da3a89043..566293548 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 2.2.0 (unreleased) + +## 2.1.2 (2019-17-01) + * Removed most of the test suite from the npm package, except `PublicRole.behavior.js`, which may be useful to users testing their own `Roles`. + ## 2.1.1 (2019-04-01) * Version bump to avoid conflict in the npm registry. diff --git a/ethpm.json b/ethpm.json index 03149be3d..d1234541f 100644 --- a/ethpm.json +++ b/ethpm.json @@ -1,6 +1,6 @@ { "package_name": "zeppelin", - "version": "2.1.1", + "version": "2.1.2", "description": "Secure Smart Contract library for Solidity", "authors": [ "OpenZeppelin Community " diff --git a/package-lock.json b/package-lock.json index 7f1929853..364c9e20a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "openzeppelin-eth", - "version": "2.1.1", + "version": "2.1.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -139,6 +139,16 @@ "integrity": "sha512-3TUHC3jsBAB7qVRGxT6lWyYo2v96BMmD2PTcl47H25Lu7UXtFH/2qqmKiVrnel6Ne//0TFYf6uvNX+HW2FRkLQ==", "dev": true }, + "JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "dev": true, + "requires": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + } + }, "abab": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/abab/-/abab-1.0.4.tgz", @@ -152,6 +162,15 @@ "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", "dev": true }, + "abi-decoder": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/abi-decoder/-/abi-decoder-1.2.0.tgz", + "integrity": "sha512-y2OKSEW4gf2838Eavc56vQY9V46zaXkf3Jl1WpTfUBbzAVrXSr4JRZAAWv55Tv9s5WNz1rVgBgz5d2aJIL1QCg==", + "dev": true, + "requires": { + "web3": "^0.18.4" + } + }, "abstract-leveldown": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz", @@ -168,21 +187,6 @@ "requires": { "mime-types": "~2.1.18", "negotiator": "0.6.1" - }, - "dependencies": { - "mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" - }, - "mime-types": { - "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", - "requires": { - "mime-db": "~1.33.0" - } - } } }, "acorn": { @@ -239,6 +243,24 @@ "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=", "dev": true }, + "agent-base": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", + "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", + "dev": true, + "requires": { + "es6-promisify": "^5.0.0" + } + }, + "agentkeepalive": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.5.2.tgz", + "integrity": "sha512-e0L/HNe6qkQ7H19kTlRRqUibEAwDK5AFk6y3PtMsuut2VAH6+Q4xZml1tNDJD7kSAyqmbG/K08K5WEJYtUrSlQ==", + "dev": true, + "requires": { + "humanize-ms": "^1.2.1" + } + }, "ajv": { "version": "5.5.2", "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", @@ -261,6 +283,7 @@ "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -273,6 +296,48 @@ "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", "dev": true }, + "ansi-align": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", + "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", + "dev": true, + "requires": { + "string-width": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, "ansi-escapes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.0.0.tgz", @@ -282,8 +347,7 @@ "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" }, "ansi-styles": { "version": "2.2.1", @@ -291,6 +355,12 @@ "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", "dev": true }, + "ansistyles": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ansistyles/-/ansistyles-0.1.3.tgz", + "integrity": "sha1-XeYEFb2gcbs3EnhUyGT0GyMlRTk=", + "dev": true + }, "antlr4": { "version": "4.7.1", "resolved": "https://registry.npmjs.org/antlr4/-/antlr4-4.7.1.tgz", @@ -313,19 +383,29 @@ "normalize-path": "^2.0.0" } }, + "app-module-path": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/app-module-path/-/app-module-path-2.2.0.tgz", + "integrity": "sha1-ZBqlXft9am8KgUHEucCqULbCTdU=", + "dev": true + }, "aproba": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", - "dev": true, - "optional": true + "dev": true + }, + "archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "dev": true }, "are-we-there-yet": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", "dev": true, - "optional": true, "requires": { "delegates": "^1.0.0", "readable-stream": "^2.0.6" @@ -399,6 +479,12 @@ "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", + "dev": true + }, "asn1": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", @@ -431,6 +517,12 @@ "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" }, + "ast-types": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.10.1.tgz", + "integrity": "sha512-UY7+9DPzlJ9VM8eY0b2TUZcZvF+1pO0hzMtAyjBYKhOmnvRlqYNYnWdtsMj0V16CGaMlpL0G1jnLbLo4AyotuQ==", + "dev": true + }, "astral-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", @@ -1869,6 +1961,32 @@ "from": "bignumber.js@git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2", "dev": true }, + "bin-links": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/bin-links/-/bin-links-1.1.2.tgz", + "integrity": "sha512-8eEHVgYP03nILphilltWjeIjMbKyJo3wvp9K816pHbhP301ismzw15mxAAEVQ/USUwcP++1uNrbERbp8lOA6Fg==", + "dev": true, + "requires": { + "bluebird": "^3.5.0", + "cmd-shim": "^2.0.2", + "gentle-fs": "^2.0.0", + "graceful-fs": "^4.1.11", + "write-file-atomic": "^2.3.0" + }, + "dependencies": { + "write-file-atomic": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", + "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } + } + } + }, "binary-extensions": { "version": "1.12.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.12.0.tgz", @@ -1974,14 +2092,6 @@ "type-is": "~1.6.16" }, "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, "iconv-lite": { "version": "0.4.23", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", @@ -1989,11 +2099,6 @@ "requires": { "safer-buffer": ">= 2.1.2 < 3" } - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" } } }, @@ -2003,6 +2108,89 @@ "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", "dev": true }, + "boxen": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", + "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", + "dev": true, + "requires": { + "ansi-align": "^2.0.0", + "camelcase": "^4.0.0", + "chalk": "^2.0.1", + "cli-boxes": "^1.0.0", + "string-width": "^2.0.0", + "term-size": "^1.2.0", + "widest-line": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, "brace-expansion": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", @@ -2180,7 +2368,24 @@ "builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=" + }, + "builtins": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", + "integrity": "sha1-y5T662HIaWRR2zZTThQi+U8K7og=", + "dev": true + }, + "byline": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/byline/-/byline-5.0.0.tgz", + "integrity": "sha1-dBxSFkaOrcRXsDQQEYrXfejB3bE=", + "dev": true + }, + "byte-size": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/byte-size/-/byte-size-4.0.4.tgz", + "integrity": "sha512-82RPeneC6nqCdSwCX2hZUz3JPOvN5at/nTEw/CMf05Smu3Hrpo9Psb7LjN+k+XndNArG1EY8L4+BM3aTM4BCvw==", "dev": true }, "bytes": { @@ -2188,6 +2393,80 @@ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" }, + "cacache": { + "version": "11.3.2", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.2.tgz", + "integrity": "sha512-E0zP4EPGDOaT2chM08Als91eYnf8Z+eH1awwwVsngUmgppfM5jjJ8l3z5vO5p5w/I3LsiXawb1sW0VY65pQABg==", + "dev": true, + "requires": { + "bluebird": "^3.5.3", + "chownr": "^1.1.1", + "figgy-pudding": "^3.5.1", + "glob": "^7.1.3", + "graceful-fs": "^4.1.15", + "lru-cache": "^5.1.1", + "mississippi": "^3.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.2", + "ssri": "^6.0.1", + "unique-filename": "^1.1.1", + "y18n": "^4.0.0" + }, + "dependencies": { + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", + "dev": true + }, + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "yallist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", + "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", + "dev": true + } + } + }, "cache-base": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", @@ -2234,6 +2513,12 @@ } } }, + "call-limit": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/call-limit/-/call-limit-1.1.0.tgz", + "integrity": "sha1-b9YbA/PaQqLNDsK2DwK9DnGZH+o=", + "dev": true + }, "call-me-maybe": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", @@ -2257,8 +2542,7 @@ "camelcase": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=" }, "caniuse-lite": { "version": "1.0.30000929", @@ -2266,6 +2550,12 @@ "integrity": "sha512-n2w1gPQSsYyorSVYqPMqbSaz1w7o9ZC8VhOEGI9T5MfGDzp7sbopQxG6GaQmYsaq13Xfx/mkxJUWC1Dz3oZfzw==", "dev": true }, + "capture-stack-trace": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz", + "integrity": "sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw==", + "dev": true + }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -2296,10 +2586,10 @@ "type-detect": "^4.0.0" } }, - "chai-bignumber": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/chai-bignumber/-/chai-bignumber-2.0.2.tgz", - "integrity": "sha512-BIdRNjRaoRj4bMsZLKbIZPMNKqmwnzNiyxqBYDSs6dFOCs9w8OHPuUE8e1bH60i1IhOzT0NjLtCD+lKEWB1KTQ==", + "chai-bn": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/chai-bn/-/chai-bn-0.1.0.tgz", + "integrity": "sha512-5HFepJrMEzJM/yz/bhLXAZP/jvHqtwKiTlqjv+kt8FsNGZ0eEh8zsmiVxVoVZI7ZRi8BqtJcSu5jzErHM6npaA==", "dev": true }, "chalk": { @@ -2371,8 +2661,22 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", + "dev": true + }, + "ci-info": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz", + "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==", + "dev": true + }, + "cidr-regex": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/cidr-regex/-/cidr-regex-2.0.10.tgz", + "integrity": "sha512-sB3ogMQXWvreNPbJUZMRApxuRYd+KoIo4RGQ81VatjmMW6WJPo+IJZ2846FGItr9VzKo5w7DXzijPLGtSd0N3Q==", "dev": true, - "optional": true + "requires": { + "ip-regex": "^2.1.0" + } }, "cipher-base": { "version": "1.0.4", @@ -2416,6 +2720,57 @@ } } }, + "cli-boxes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", + "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=", + "dev": true + }, + "cli-columns": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/cli-columns/-/cli-columns-3.1.2.tgz", + "integrity": "sha1-ZzLZcpee/CrkRKHwjgj6E5yWoY4=", + "dev": true, + "requires": { + "string-width": "^2.0.0", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + } + } + }, "cli-cursor": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", @@ -2446,6 +2801,50 @@ } } }, + "cli-table3": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.1.tgz", + "integrity": "sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw==", + "dev": true, + "requires": { + "colors": "^1.1.2", + "object-assign": "^4.1.0", + "string-width": "^2.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, "cli-truncate": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-0.2.1.tgz", @@ -2485,7 +2884,6 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "dev": true, "requires": { "string-width": "^1.0.1", "strip-ansi": "^3.0.1", @@ -2496,7 +2894,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -2568,6 +2965,16 @@ } } }, + "cmd-shim": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-2.0.2.tgz", + "integrity": "sha1-b8vamUg6j9FdfTChlspp1oii79s=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "mkdirp": "~0.5.0" + } + }, "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -2576,8 +2983,7 @@ "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, "collection-visit": { "version": "1.0.0", @@ -2613,6 +3019,16 @@ "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", "dev": true }, + "columnify": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/columnify/-/columnify-1.5.4.tgz", + "integrity": "sha1-Rzfd8ce2mop8NAVweC6UfuyOeLs=", + "dev": true, + "requires": { + "strip-ansi": "^3.0.0", + "wcwidth": "^1.0.0" + } + }, "combined-stream": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", @@ -2654,6 +3070,16 @@ "typedarray": "^0.0.6" } }, + "config-chain": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.12.tgz", + "integrity": "sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA==", + "dev": true, + "requires": { + "ini": "^1.3.4", + "proto-list": "~1.2.1" + } + }, "configstore": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/configstore/-/configstore-4.0.0.tgz", @@ -2725,6 +3151,28 @@ "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==", "dev": true }, + "copy-concurrently": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", + "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", + "dev": true, + "requires": { + "aproba": "^1.1.1", + "fs-write-stream-atomic": "^1.0.8", + "iferr": "^0.1.5", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.0" + }, + "dependencies": { + "iferr": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", + "dev": true + } + } + }, "copy-descriptor": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", @@ -2742,9 +3190,9 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "cors": { - "version": "2.8.4", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.4.tgz", - "integrity": "sha1-K9OB8usgECAQXNUOpZ2mMJBpRoY=", + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", "requires": { "object-assign": "^4", "vary": "^1" @@ -2816,6 +3264,15 @@ "elliptic": "^6.0.0" } }, + "create-error-class": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", + "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", + "dev": true, + "requires": { + "capture-stack-trace": "^1.0.0" + } + }, "create-hash": { "version": "1.2.0", "resolved": "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", @@ -2898,8 +3355,7 @@ "crypto-js": { "version": "3.1.8", "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.8.tgz", - "integrity": "sha1-cV8HC/YBTyrpkqmLOSkli3E/CNU=", - "dev": true + "integrity": "sha1-cV8HC/YBTyrpkqmLOSkli3E/CNU=" }, "crypto-random-string": { "version": "1.0.0", @@ -2929,7 +3385,8 @@ "version": "0.3.4", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.4.tgz", "integrity": "sha512-+7prCSORpXNeR4/fUP3rL+TzqtiFfhMvTd7uEqMdgPvLPt4+uzFUeufx5RHjGTACCargg/DiEt/moMQmvnfkog==", - "dev": true + "dev": true, + "optional": true }, "cssstyle": { "version": "0.2.37", @@ -2941,6 +3398,12 @@ "cssom": "0.3.x" } }, + "cyclist": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", + "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=", + "dev": true + }, "dargs": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/dargs/-/dargs-5.1.0.tgz", @@ -2979,6 +3442,12 @@ "ms": "2.0.0" } }, + "debuglog": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz", + "integrity": "sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=", + "dev": true + }, "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", @@ -3246,8 +3715,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", - "dev": true, - "optional": true + "dev": true }, "depd": { "version": "1.1.2", @@ -3290,6 +3758,22 @@ "dev": true, "optional": true }, + "detect-newline": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz", + "integrity": "sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=", + "dev": true + }, + "dezalgo": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.3.tgz", + "integrity": "sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY=", + "dev": true, + "requires": { + "asap": "^2.0.0", + "wrappy": "1" + } + }, "diff": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/diff/-/diff-3.3.1.tgz", @@ -3396,6 +3880,12 @@ "is-obj": "^1.0.0" } }, + "dotenv": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-5.0.1.tgz", + "integrity": "sha512-4As8uPrjfwb7VXC+WnLCbXK7y+Ueb2B3zgNCePYfhxS1PYeaO1YTeplffTEcbfLhvFNGLAz90VvJs9yomG7bow==", + "dev": true + }, "drbg.js": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz", @@ -3412,6 +3902,18 @@ "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" }, + "duplexify": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.1.tgz", + "integrity": "sha512-vM58DwdnKmty+FSPzT14K9JXb90H+j5emaR4KYbr2KTIz00WHGbWOe5ghQTx233ZCLZtrGDALzKwcjEtSt35mA==", + "dev": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, "easy-stack": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/easy-stack/-/easy-stack-1.0.0.tgz", @@ -3431,6 +3933,12 @@ "resolved": "https://registry.npmjs.org/editions/-/editions-1.3.4.tgz", "integrity": "sha512-gzao+mxnYDzIysXKMQi/+M1mjy/rjestjg6OPoYTtI+3Izp23oiGZitsl9lPDPiTGXbcSIk1iJWhliSaglxnUg==" }, + "editor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/editor/-/editor-1.0.0.tgz", + "integrity": "sha1-YMf4e9YrzGqJT6jM1q+3gjok90I=", + "dev": true + }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -3520,6 +4028,12 @@ "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", "dev": true }, + "err-code": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-1.1.2.tgz", + "integrity": "sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA=", + "dev": true + }, "errno": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.4.tgz", @@ -3596,6 +4110,19 @@ "is-symbol": "^1.0.2" } }, + "es6-promise": { + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.5.tgz", + "integrity": "sha512-n6wvpdE43VFtJq+lUDYDBFUwV8TZbuGXLV4D6wKafg13ldznKsyEvatubnmUe31zcvelSzOHF+XbaT+Bl9ObDg==" + }, + "es6-promisify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", + "requires": { + "es6-promise": "^4.0.3" + } + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -4250,7 +4777,7 @@ "integrity": "sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA=", "dev": true, "requires": { - "ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git#2863c40e0982acfc0b7163f0285d4c56427c7799", + "ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git", "ethereumjs-util": "^5.1.1" }, "dependencies": { @@ -4373,6 +4900,25 @@ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, + "require-from-string": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz", + "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=", + "dev": true + }, + "solc": { + "version": "0.4.25", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.4.25.tgz", + "integrity": "sha512-jU1YygRVy6zatgXrLY2rRm7HW1d7a8CkkEgNJwvH2VLpWhMFsMdWcJn6kUqZwcSz/Vm+w89dy7Z/aB5p6AFTrg==", + "dev": true, + "requires": { + "fs-extra": "^0.30.0", + "memorystream": "^0.3.1", + "require-from-string": "^1.1.0", + "semver": "^5.3.0", + "yargs": "^4.7.1" + } + }, "web3-provider-engine": { "version": "13.8.0", "resolved": "https://registry.npmjs.org/web3-provider-engine/-/web3-provider-engine-13.8.0.tgz", @@ -4399,6 +4945,40 @@ "xhr": "^2.2.0", "xtend": "^4.0.1" } + }, + "which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", + "dev": true + }, + "window-size": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz", + "integrity": "sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU=", + "dev": true + }, + "yargs": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", + "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=", + "dev": true, + "requires": { + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "lodash.assign": "^4.0.3", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.1", + "which-module": "^1.0.0", + "window-size": "^0.2.0", + "y18n": "^3.2.1", + "yargs-parser": "^2.4.1" + } } } }, @@ -4409,8 +4989,8 @@ "dev": true }, "ethereumjs-abi": { - "version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#2863c40e0982acfc0b7163f0285d4c56427c7799", - "from": "ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git#2863c40e0982acfc0b7163f0285d4c56427c7799", + "version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#d84a96796079c8595a0c78accd1e7709f2277215", + "from": "git+https://github.com/ethereumjs/ethereumjs-abi.git", "dev": true, "requires": { "bn.js": "^4.10.0", @@ -4900,7 +5480,7 @@ "integrity": "sha512-VU6/DSUX93d1fCzBz7WP/SGCQizO1rKZi4Px9j/3yRyfssHyFcZamMw2/sj4E8TlfMXONvZLoforR8B4bRoyTQ==", "dev": true, "requires": { - "bignumber.js": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934", + "bignumber.js": "git+https://github.com/frozeman/bignumber.js-nolookahead.git", "crypto-js": "^3.1.4", "utf8": "^2.1.1", "xhr2-cookies": "^1.1.0", @@ -4963,7 +5543,7 @@ "integrity": "sha1-pFVBdc1GKUMDWx8dOUMvdBxrYBk=", "dev": true, "requires": { - "bignumber.js": "git+https://github.com/debris/bignumber.js.git#c7a38de919ed75e6fb6ba38051986e294b328df9", + "bignumber.js": "git+https://github.com/debris/bignumber.js.git#master", "crypto-js": "^3.1.4", "utf8": "^2.1.1", "xmlhttprequest": "*" @@ -5066,13 +5646,13 @@ } }, "express": { - "version": "4.16.3", - "resolved": "https://registry.npmjs.org/express/-/express-4.16.3.tgz", - "integrity": "sha1-avilAjUNsyRuzEvs9rWjTSL37VM=", + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", + "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", "requires": { "accepts": "~1.3.5", "array-flatten": "1.1.1", - "body-parser": "1.18.2", + "body-parser": "1.18.3", "content-disposition": "0.5.2", "content-type": "~1.0.4", "cookie": "0.3.1", @@ -5089,10 +5669,10 @@ "on-finished": "~2.3.0", "parseurl": "~1.3.2", "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.3", - "qs": "6.5.1", + "proxy-addr": "~2.0.4", + "qs": "6.5.2", "range-parser": "~1.2.0", - "safe-buffer": "5.1.1", + "safe-buffer": "5.1.2", "send": "0.16.2", "serve-static": "1.13.2", "setprototypeof": "1.1.0", @@ -5102,74 +5682,19 @@ "vary": "~1.1.2" }, "dependencies": { - "body-parser": { - "version": "1.18.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz", - "integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=", + "proxy-addr": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz", + "integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==", "requires": { - "bytes": "3.0.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.1", - "http-errors": "~1.6.2", - "iconv-lite": "0.4.19", - "on-finished": "~2.3.0", - "qs": "6.5.1", - "raw-body": "2.3.2", - "type-is": "~1.6.15" + "forwarded": "~0.1.2", + "ipaddr.js": "1.8.0" } }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "iconv-lite": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" - }, - "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" - }, - "raw-body": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", - "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", - "requires": { - "bytes": "3.0.0", - "http-errors": "1.6.2", - "iconv-lite": "0.4.19", - "unpipe": "1.0.0" - }, - "dependencies": { - "depd": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", - "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=" - }, - "http-errors": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", - "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", - "requires": { - "depd": "1.1.1", - "inherits": "2.0.3", - "setprototypeof": "1.0.3", - "statuses": ">= 1.3.1 < 2" - } - }, - "setprototypeof": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", - "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" - } - } + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "statuses": { "version": "1.4.0", @@ -5594,6 +6119,12 @@ } } }, + "figgy-pudding": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.1.tgz", + "integrity": "sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w==", + "dev": true + }, "figures": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", @@ -5679,14 +6210,6 @@ "unpipe": "~1.0.0" }, "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, "statuses": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", @@ -5694,11 +6217,16 @@ } } }, + "find-npm-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/find-npm-prefix/-/find-npm-prefix-1.0.2.tgz", + "integrity": "sha512-KEftzJ+H90x6pcKtdXZEPsQse8/y/UnvzRKrOSQFprnrGaFuJ62fVkP34Iu2IYuMvyauCyoLTNkJZgrrGA2wkA==", + "dev": true + }, "find-up": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, "requires": { "path-exists": "^2.0.0", "pinkie-promise": "^2.0.0" @@ -5730,10 +6258,20 @@ "integrity": "sha1-N4tRKNbQtVSosvFqTKPhq5ZJ8A4=", "dev": true }, + "flush-write-stream": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.3.tgz", + "integrity": "sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.4" + } + }, "follow-redirects": { - "version": "1.5.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.9.tgz", - "integrity": "sha512-Bh65EZI/RU8nx0wbYF9shkFZlqLP+6WT/5FnA3cE/djNSuKNHJEinGGZgu/cQEkeeb2GdFOgenAmn8qaqYke2w==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.6.1.tgz", + "integrity": "sha512-t2JCjbzxQpWvbhts3l6SH1DKzSrx8a+SsaVf4h6bG4kOXUuPYS/kg2Lr4gQSb7eemaHqJkOThF1BGyjlUkO1GQ==", "dev": true, "requires": { "debug": "=3.1.0" @@ -5751,11 +6289,11 @@ } }, "for-each": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.2.tgz", - "integrity": "sha1-LEBFC5NI6X8oEyJZO6lnBLmr1NQ=", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", "requires": { - "is-function": "~1.0.0" + "is-callable": "^1.1.3" } }, "for-in": { @@ -5880,6 +6418,37 @@ "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", "dev": true }, + "fs-vacuum": { + "version": "1.2.10", + "resolved": "https://registry.npmjs.org/fs-vacuum/-/fs-vacuum-1.2.10.tgz", + "integrity": "sha1-t2Kb7AekAxolSP35n17PHMizHjY=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "path-is-inside": "^1.0.1", + "rimraf": "^2.5.2" + } + }, + "fs-write-stream-atomic": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", + "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "iferr": "^0.1.5", + "imurmurhash": "^0.1.4", + "readable-stream": "1 || 2" + }, + "dependencies": { + "iferr": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", + "dev": true + } + } + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -5952,7 +6521,6 @@ "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", "dev": true, - "optional": true, "requires": { "aproba": "^1.0.3", "console-control-strings": "^1.0.0", @@ -5969,7 +6537,6 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -5978,6 +6545,36 @@ } } }, + "genfun": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/genfun/-/genfun-5.0.0.tgz", + "integrity": "sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA==", + "dev": true + }, + "gentle-fs": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/gentle-fs/-/gentle-fs-2.0.1.tgz", + "integrity": "sha512-cEng5+3fuARewXktTEGbwsktcldA+YsnUEaXZwcK/3pjSE1X9ObnTs+/8rYf8s+RnIcQm2D5x3rwpN7Zom8Bew==", + "dev": true, + "requires": { + "aproba": "^1.1.2", + "fs-vacuum": "^1.2.10", + "graceful-fs": "^4.1.11", + "iferr": "^0.1.5", + "mkdirp": "^0.5.1", + "path-is-inside": "^1.0.2", + "read-cmd-shim": "^1.0.1", + "slide": "^1.1.6" + }, + "dependencies": { + "iferr": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", + "dev": true + } + } + }, "get-caller-file": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", @@ -6178,6 +6775,15 @@ "process": "~0.5.1" } }, + "global-dirs": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", + "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", + "dev": true, + "requires": { + "ini": "^1.3.4" + } + }, "global-modules": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", @@ -6407,8 +7013,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", - "dev": true, - "optional": true + "dev": true }, "has-value": { "version": "1.0.0", @@ -6521,8 +7126,7 @@ "hosted-git-info": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", - "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==", - "dev": true + "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==" }, "htmlparser2": { "version": "3.9.2", @@ -6561,6 +7165,27 @@ "integrity": "sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs=", "dev": true }, + "http-proxy-agent": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz", + "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==", + "dev": true, + "requires": { + "agent-base": "4", + "debug": "3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, "http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -6571,6 +7196,41 @@ "sshpk": "^1.7.0" } }, + "https-proxy-agent": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz", + "integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==", + "dev": true, + "requires": { + "agent-base": "^4.1.0", + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + } + } + }, + "humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=", + "requires": { + "ms": "^2.0.0" + } + }, "ice-cap": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/ice-cap/-/ice-cap-0.0.4.tgz", @@ -6686,6 +7346,12 @@ "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==", "dev": true }, + "iferr": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/iferr/-/iferr-1.0.2.tgz", + "integrity": "sha512-9AfeLfji44r5TKInjhz3W9DyZI1zR1JAf2hVBMGhddAKPqBsupb89jGfbCTHIGZd6fGZl9WlHdn4AObygyMKwg==", + "dev": true + }, "ignore": { "version": "3.3.7", "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz", @@ -6707,6 +7373,12 @@ "integrity": "sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw=", "dev": true }, + "import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "dev": true + }, "import-local": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz", @@ -6772,6 +7444,22 @@ "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=", "dev": true }, + "init-package-json": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-1.10.3.tgz", + "integrity": "sha512-zKSiXKhQveNteyhcj1CoOP8tqp1QuxPIPBl8Bid99DGLFqA1p87M6lNgfjJHSBoWJJlidGOv5rWjyYKEB3g2Jw==", + "dev": true, + "requires": { + "glob": "^7.1.1", + "npm-package-arg": "^4.0.0 || ^5.0.0 || ^6.0.0", + "promzard": "^0.3.0", + "read": "~1.0.1", + "read-package-json": "1 || 2", + "semver": "2.x || 3.x || 4 || 5", + "validate-npm-package-license": "^3.0.1", + "validate-npm-package-name": "^3.0.0" + } + }, "inquirer": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", @@ -6889,18 +7577,29 @@ "invert-kv": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" + }, + "ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", + "dev": true + }, + "ip-regex": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", + "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=", "dev": true }, "ipaddr.js": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.6.0.tgz", - "integrity": "sha1-4/o1e3c9phnybpXwSdBVxyeW+Gs=" + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz", + "integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4=" }, "ipfs-mini": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/ipfs-mini/-/ipfs-mini-1.1.2.tgz", - "integrity": "sha1-nA+tP6AKgsgsrtGuBLO5ntOz6V0=", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ipfs-mini/-/ipfs-mini-1.1.5.tgz", + "integrity": "sha512-BzsoCa3V/gxN2eEHnyqggOdreAwnvbddj4jUvp6Q7jXuzXx9q5XakXe8mG8qV0bn4bMKdH/7BUDbiWBCEMuYBg==", "dev": true, "requires": { "xmlhttprequest": "^1.8.0" @@ -6937,7 +7636,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "dev": true, "requires": { "builtin-modules": "^1.0.0" } @@ -6945,8 +7643,25 @@ "is-callable": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", - "dev": true + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==" + }, + "is-ci": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz", + "integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==", + "dev": true, + "requires": { + "ci-info": "^1.5.0" + } + }, + "is-cidr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/is-cidr/-/is-cidr-2.0.7.tgz", + "integrity": "sha512-YfOm5liUO1RoYfFh+lhiGNYtbLzem7IXzFqvfjXh+zLCEuAiznTBlQ2QcMWxsgYeOFmjzljOxJfmZID4/cRBAQ==", + "dev": true, + "requires": { + "cidr-regex": "^2.0.10" + } }, "is-data-descriptor": { "version": "0.1.4", @@ -7024,7 +7739,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, "requires": { "number-is-nan": "^1.0.0" } @@ -7048,12 +7762,28 @@ "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=" }, + "is-installed-globally": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", + "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", + "dev": true, + "requires": { + "global-dirs": "^0.1.0", + "is-path-inside": "^1.0.0" + } + }, "is-natural-number": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz", "integrity": "sha1-q5124dtM7VHjXeDHLr7PCfc0zeg=", "dev": true }, + "is-npm": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", + "integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ=", + "dev": true + }, "is-number": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", @@ -7135,6 +7865,12 @@ "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" }, + "is-redirect": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", + "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", + "dev": true + }, "is-regex": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", @@ -7205,8 +7941,7 @@ "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, "isobject": { "version": "2.1.0", @@ -7570,6 +8305,12 @@ "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", "dev": true }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", + "dev": true + }, "jsonschema": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.2.4.tgz", @@ -7634,6 +8375,15 @@ "graceful-fs": "^4.1.9" } }, + "latest-version": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", + "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", + "dev": true, + "requires": { + "package-json": "^4.0.0" + } + }, "lazy-cache": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", @@ -7641,11 +8391,16 @@ "dev": true, "optional": true }, + "lazy-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lazy-property/-/lazy-property-1.0.0.tgz", + "integrity": "sha1-hN3Es3Bnm6i9TNz6TAa0PVcREUc=", + "dev": true + }, "lcid": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "dev": true, "requires": { "invert-kv": "^1.0.0" } @@ -7791,6 +8546,231 @@ "type-check": "~0.3.2" } }, + "libcipm": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/libcipm/-/libcipm-2.0.2.tgz", + "integrity": "sha512-9uZ6/LAflVEijksTRq/RX0e+pGA4mr8tND9Cmk2JMg7j2fFUBrs8PpFX2DOAJR/XoxPzz+5h8bkWmtIYLunKAg==", + "dev": true, + "requires": { + "bin-links": "^1.1.2", + "bluebird": "^3.5.1", + "find-npm-prefix": "^1.0.2", + "graceful-fs": "^4.1.11", + "lock-verify": "^2.0.2", + "mkdirp": "^0.5.1", + "npm-lifecycle": "^2.0.3", + "npm-logical-tree": "^1.2.1", + "npm-package-arg": "^6.1.0", + "pacote": "^8.1.6", + "protoduck": "^5.0.0", + "read-package-json": "^2.0.13", + "rimraf": "^2.6.2", + "worker-farm": "^1.6.0" + }, + "dependencies": { + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + }, + "libnpmhook": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/libnpmhook/-/libnpmhook-4.0.1.tgz", + "integrity": "sha512-3qqpfqvBD1712WA6iGe0stkG40WwAeoWcujA6BlC0Be1JArQbqwabnEnZ0CRcD05Tf1fPYJYdCbSfcfedEJCOg==", + "dev": true, + "requires": { + "figgy-pudding": "^3.1.0", + "npm-registry-fetch": "^3.0.0" + }, + "dependencies": { + "npm-registry-fetch": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-3.8.0.tgz", + "integrity": "sha512-hrw8UMD+Nob3Kl3h8Z/YjmKamb1gf7D1ZZch2otrIXM3uFLB5vjEY6DhMlq80z/zZet6eETLbOXcuQudCB3Zpw==", + "dev": true, + "requires": { + "JSONStream": "^1.3.4", + "bluebird": "^3.5.1", + "figgy-pudding": "^3.4.1", + "lru-cache": "^4.1.3", + "make-fetch-happen": "^4.0.1", + "npm-package-arg": "^6.1.0" + } + } + } + }, + "libnpx": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/libnpx/-/libnpx-10.2.0.tgz", + "integrity": "sha512-X28coei8/XRCt15cYStbLBph+KGhFra4VQhRBPuH/HHMkC5dxM8v24RVgUsvODKCrUZ0eTgiTqJp6zbl0sskQQ==", + "dev": true, + "requires": { + "dotenv": "^5.0.1", + "npm-package-arg": "^6.0.0", + "rimraf": "^2.6.2", + "safe-buffer": "^5.1.0", + "update-notifier": "^2.3.0", + "which": "^1.3.0", + "y18n": "^4.0.0", + "yargs": "^11.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "dev": true, + "requires": { + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "yargs": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.1.0.tgz", + "integrity": "sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^9.0.2" + }, + "dependencies": { + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + } + } + }, + "yargs-parser": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", + "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } + } + } + }, "linked-list": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/linked-list/-/linked-list-0.1.0.tgz", @@ -7899,7 +8879,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, "requires": { "graceful-fs": "^4.1.2", "parse-json": "^2.2.0", @@ -7911,8 +8890,7 @@ "pify": { "version": "2.3.0", "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" } } }, @@ -7931,7 +8909,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, "requires": { "p-locate": "^2.0.0", "path-exists": "^3.0.0" @@ -7940,11 +8917,20 @@ "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" } } }, + "lock-verify": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lock-verify/-/lock-verify-2.0.2.tgz", + "integrity": "sha512-QNVwK0EGZBS4R3YQ7F1Ox8p41Po9VGl2QG/2GsuvTbkJZYSsPeWHKMbbH6iZMCHWSMww5nrJroZYnGzI4cePuw==", + "dev": true, + "requires": { + "npm-package-arg": "^5.1.2 || 6", + "semver": "^5.4.1" + } + }, "lockfile": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/lockfile/-/lockfile-1.0.4.tgz", @@ -7965,10 +8951,70 @@ "integrity": "sha512-DHb1ub+rMjjrxqlB3H56/6MXtm1lSksDp2rA2cNWjG8mlDUYFhUj3Di2Zn5IwSU87xLv8tNIQ7sSwE/YOX/D/Q==", "dev": true }, + "lodash._baseindexof": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz", + "integrity": "sha1-/lK1OhxnYeQmGNZU5KJXie1hgiw=", + "dev": true + }, + "lodash._baseuniq": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz", + "integrity": "sha1-DrtE5FaBSveQXGIS+iybLVG4Qeg=", + "dev": true, + "requires": { + "lodash._createset": "~4.0.0", + "lodash._root": "~3.0.0" + } + }, + "lodash._bindcallback": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz", + "integrity": "sha1-5THCdkTPi1epnhftlbNcdIeJOS4=", + "dev": true + }, + "lodash._cacheindexof": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz", + "integrity": "sha1-PcaayCSY0u5ePOVgkbr9Ktx73pI=", + "dev": true + }, + "lodash._createcache": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lodash._createcache/-/lodash._createcache-3.1.2.tgz", + "integrity": "sha1-VtagZAF2JeeevKa4AY4XRAvc8JM=", + "dev": true, + "requires": { + "lodash._getnative": "^3.0.0" + } + }, + "lodash._createset": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/lodash._createset/-/lodash._createset-4.0.3.tgz", + "integrity": "sha1-D0ZZ+7CddRlPqeK4imZE02PJ/iY=", + "dev": true + }, + "lodash._getnative": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", + "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", + "dev": true + }, + "lodash._root": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", + "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=", + "dev": true + }, "lodash.assign": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", - "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", + "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=" + }, + "lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", "dev": true }, "lodash.get": { @@ -7977,12 +9023,42 @@ "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", "dev": true }, + "lodash.merge": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.1.tgz", + "integrity": "sha512-AOYza4+Hf5z1/0Hztxpm2/xiPZgi/cjMqdnKTUWTBSKchJlxXXuUSxCCl8rJlf4g6yww/j6mA8nC8Hw/EZWxKQ==", + "dev": true + }, + "lodash.restparam": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", + "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", + "dev": true + }, "lodash.toarray": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.toarray/-/lodash.toarray-4.4.0.tgz", "integrity": "sha1-JMS/zWsvuji/0FlNsRedjptlZWE=", "dev": true }, + "lodash.union": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz", + "integrity": "sha1-SLtQiECfFvGCFmZkHETdGqrjzYg=", + "dev": true + }, + "lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "dev": true + }, + "lodash.without": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.without/-/lodash.without-4.4.0.tgz", + "integrity": "sha1-PNRXSgC2e643OpS3SHcmQFB7eqw=", + "dev": true + }, "log-driver": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", @@ -8083,7 +9159,8 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true + "dev": true, + "optional": true }, "loose-envify": { "version": "1.3.1", @@ -8099,6 +9176,16 @@ "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" }, + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, "ltgt": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", @@ -8120,6 +9207,25 @@ } } }, + "make-fetch-happen": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-4.0.1.tgz", + "integrity": "sha512-7R5ivfy9ilRJ1EMKIOziwrns9fGeAD4bAha8EB7BIiBBLHm2KeTUGCrICFt2rbHfzheTLynv50GnNTK1zDTrcQ==", + "dev": true, + "requires": { + "agentkeepalive": "^3.4.1", + "cacache": "^11.0.1", + "http-cache-semantics": "^3.8.1", + "http-proxy-agent": "^2.1.0", + "https-proxy-agent": "^2.2.1", + "lru-cache": "^4.1.2", + "mississippi": "^3.0.0", + "node-fetch-npm": "^2.0.2", + "promise-retry": "^1.1.1", + "socks-proxy-agent": "^4.0.0", + "ssri": "^6.0.0" + } + }, "map-cache": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", @@ -8164,6 +9270,12 @@ } } }, + "meant": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/meant/-/meant-1.0.1.tgz", + "integrity": "sha512-UakVLFjKkbbUwNWJ2frVLnnAtbb7D7DsloxRd3s/gDpI8rdv8W5Hp3NaDb+POBI1fQdeussER6NB8vpcRURvlg==", + "dev": true + }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -8463,6 +9575,24 @@ "minipass": "^2.2.1" } }, + "mississippi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", + "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", + "dev": true, + "requires": { + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^3.0.0", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" + } + }, "mixin-deep": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", @@ -8555,6 +9685,20 @@ "integrity": "sha1-ujYR318OWx/7/QEWa48C0fX6K5k=", "dev": true }, + "move-concurrently": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", + "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", + "dev": true, + "requires": { + "aproba": "^1.1.1", + "copy-concurrently": "^1.0.0", + "fs-write-stream-atomic": "^1.0.8", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.3" + } + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -8599,9 +9743,9 @@ "integrity": "sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18=" }, "nanoid": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-1.3.0.tgz", - "integrity": "sha512-OP8SoC91Kyjl1sdSTEnM1xYh4gUEOSkUl6wRBUklWOPyfPRbeJbhvdhQYXEjVtZ1LI9amVMkIWQI2nO8O7DL9A==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-1.3.4.tgz", + "integrity": "sha512-4ug4BsuHxiVHoRUe1ud6rUFT3WUMmjXt1W0quL0CviZQANdan7D8kqN5/maw53hmAApY/jfzMRkC57BNNs60ZQ==", "dev": true }, "nanomatch": { @@ -8671,8 +9815,7 @@ "nice-try": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.4.tgz", - "integrity": "sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA==", - "dev": true + "integrity": "sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA==" }, "nise": { "version": "1.4.8", @@ -8740,6 +9883,56 @@ "integrity": "sha1-q4hOjn5X44qUR1POxwb3iNF2i7U=", "dev": true }, + "node-fetch-npm": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.2.tgz", + "integrity": "sha512-nJIxm1QmAj4v3nfCvEeCrYSoVwXyxLnaPBK5W1W5DGEJwjlKuC2VEUycGw5oxk+4zZahRrB84PUJJgEmhFTDFw==", + "dev": true, + "requires": { + "encoding": "^0.1.11", + "json-parse-better-errors": "^1.0.0", + "safe-buffer": "^5.1.1" + } + }, + "node-gyp": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.8.0.tgz", + "integrity": "sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==", + "dev": true, + "requires": { + "fstream": "^1.0.0", + "glob": "^7.0.3", + "graceful-fs": "^4.1.2", + "mkdirp": "^0.5.0", + "nopt": "2 || 3", + "npmlog": "0 || 1 || 2 || 3 || 4", + "osenv": "0", + "request": "^2.87.0", + "rimraf": "2", + "semver": "~5.3.0", + "tar": "^2.0.0", + "which": "1" + }, + "dependencies": { + "semver": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", + "dev": true + }, + "tar": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", + "dev": true, + "requires": { + "block-stream": "*", + "fstream": "^1.0.2", + "inherits": "2" + } + } + } + }, "node-ipc": { "version": "9.1.1", "resolved": "https://registry.npmjs.org/node-ipc/-/node-ipc-9.1.1.tgz", @@ -8831,7 +10024,6 @@ "version": "2.4.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "dev": true, "requires": { "hosted-git-info": "^2.1.4", "is-builtin-module": "^1.0.0", @@ -9002,7 +10194,6 @@ "agent-base": { "version": "4.2.0", "bundled": true, - "dev": true, "requires": { "es6-promisify": "^5.0.0" } @@ -9010,7 +10201,6 @@ "agentkeepalive": { "version": "3.4.1", "bundled": true, - "dev": true, "requires": { "humanize-ms": "^1.2.1" } @@ -9018,7 +10208,6 @@ "ajv": { "version": "5.5.2", "bundled": true, - "dev": true, "requires": { "co": "^4.6.0", "fast-deep-equal": "^1.0.0", @@ -9028,21 +10217,15 @@ }, "ansi-align": { "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "string-width": "^2.0.0" - } + "bundled": true }, "ansi-regex": { "version": "2.1.1", - "bundled": true, - "dev": true + "bundled": true }, "ansi-styles": { "version": "3.2.1", "bundled": true, - "dev": true, "requires": { "color-convert": "^1.9.0" } @@ -9052,807 +10235,34 @@ "bundled": true, "dev": true }, - "ansistyles": { - "version": "0.1.3", - "bundled": true, - "dev": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true - }, - "archy": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "dev": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "asap": { - "version": "2.0.6", - "bundled": true, - "dev": true - }, - "asn1": { - "version": "0.2.4", - "bundled": true, - "dev": true, - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "bundled": true, - "dev": true - }, - "aws-sign2": { - "version": "0.7.0", - "bundled": true, - "dev": true - }, "aws4": { "version": "1.8.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", "dev": true }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "bin-links": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "requires": { - "bluebird": "^3.5.0", - "cmd-shim": "^2.0.2", - "gentle-fs": "^2.0.0", - "graceful-fs": "^4.1.11", - "write-file-atomic": "^2.3.0" - } - }, - "block-stream": { - "version": "0.0.9", - "bundled": true, - "dev": true, - "requires": { - "inherits": "~2.0.0" - } - }, - "bluebird": { - "version": "3.5.3", - "bundled": true, - "dev": true - }, - "boxen": { - "version": "1.3.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-align": "^2.0.0", - "camelcase": "^4.0.0", - "chalk": "^2.0.1", - "cli-boxes": "^1.0.0", - "string-width": "^2.0.0", - "term-size": "^1.2.0", - "widest-line": "^2.0.0" - } - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "buffer-from": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "builtin-modules": { - "version": "1.1.1", - "bundled": true, - "dev": true - }, - "builtins": { - "version": "1.0.3", - "bundled": true, - "dev": true - }, - "byline": { - "version": "5.0.0", - "bundled": true, - "dev": true - }, - "byte-size": { - "version": "4.0.3", - "bundled": true, - "dev": true - }, - "cacache": { - "version": "11.2.0", - "bundled": true, - "dev": true, - "requires": { - "bluebird": "^3.5.1", - "chownr": "^1.0.1", - "figgy-pudding": "^3.1.0", - "glob": "^7.1.2", - "graceful-fs": "^4.1.11", - "lru-cache": "^4.1.3", - "mississippi": "^3.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", - "ssri": "^6.0.0", - "unique-filename": "^1.1.0", - "y18n": "^4.0.0" - } - }, - "call-limit": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "camelcase": { - "version": "4.1.0", - "bundled": true, - "dev": true - }, - "capture-stack-trace": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "caseless": { - "version": "0.12.0", - "bundled": true, - "dev": true - }, - "chalk": { - "version": "2.4.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, "chownr": { "version": "1.0.1", - "bundled": true, - "dev": true - }, - "ci-info": { - "version": "1.6.0", - "bundled": true, - "dev": true - }, - "cidr-regex": { - "version": "2.0.9", - "bundled": true, - "dev": true, - "requires": { - "ip-regex": "^2.1.0" - } - }, - "cli-boxes": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "cli-columns": { - "version": "3.1.2", - "bundled": true, - "dev": true, - "requires": { - "string-width": "^2.0.0", - "strip-ansi": "^3.0.1" - } - }, - "cli-table3": { - "version": "0.5.0", - "bundled": true, - "dev": true, - "requires": { - "colors": "^1.1.2", - "object-assign": "^4.1.0", - "string-width": "^2.1.1" - } - }, - "cliui": { - "version": "4.1.0", - "bundled": true, - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "clone": { - "version": "1.0.4", - "bundled": true, - "dev": true - }, - "cmd-shim": { - "version": "2.0.2", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "mkdirp": "~0.5.0" - } - }, - "co": { - "version": "4.6.0", - "bundled": true, - "dev": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "color-convert": { - "version": "1.9.1", - "bundled": true, - "dev": true, - "requires": { - "color-name": "^1.1.1" - } - }, - "color-name": { - "version": "1.1.3", - "bundled": true, - "dev": true - }, - "colors": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "columnify": { - "version": "1.5.4", - "bundled": true, - "dev": true, - "requires": { - "strip-ansi": "^3.0.0", - "wcwidth": "^1.0.0" - } - }, - "combined-stream": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "concat-stream": { - "version": "1.6.2", - "bundled": true, - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "config-chain": { - "version": "1.1.12", - "bundled": true, - "dev": true, - "requires": { - "ini": "^1.3.4", - "proto-list": "~1.2.1" - } - }, - "configstore": { - "version": "3.1.2", - "bundled": true, - "dev": true, - "requires": { - "dot-prop": "^4.1.0", - "graceful-fs": "^4.1.2", - "make-dir": "^1.0.0", - "unique-string": "^1.0.0", - "write-file-atomic": "^2.0.0", - "xdg-basedir": "^3.0.0" - } - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "copy-concurrently": { - "version": "1.0.5", - "bundled": true, - "dev": true, - "requires": { - "aproba": "^1.1.1", - "fs-write-stream-atomic": "^1.0.8", - "iferr": "^0.1.5", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.0" - }, - "dependencies": { - "iferr": { - "version": "0.1.5", - "bundled": true, - "dev": true - } - } - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "create-error-class": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "requires": { - "capture-stack-trace": "^1.0.0" - } - }, - "cross-spawn": { - "version": "5.1.0", - "bundled": true, - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "crypto-random-string": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "cyclist": { - "version": "0.2.2", - "bundled": true, - "dev": true - }, - "dashdash": { - "version": "1.14.1", - "bundled": true, - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "debug": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "ms": "2.0.0" - }, - "dependencies": { - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true - } - } - }, - "debuglog": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "decamelize": { - "version": "1.2.0", - "bundled": true, - "dev": true - }, - "decode-uri-component": { - "version": "0.2.0", - "bundled": true, - "dev": true - }, - "deep-extend": { - "version": "0.5.1", - "bundled": true, - "dev": true - }, - "defaults": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "requires": { - "clone": "^1.0.2" - } - }, - "delayed-stream": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", + "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=", "dev": true }, "detect-indent": { "version": "5.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", + "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=", "dev": true }, - "detect-newline": { - "version": "2.1.0", - "bundled": true, - "dev": true - }, - "dezalgo": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "requires": { - "asap": "^2.0.0", - "wrappy": "1" - } - }, - "dot-prop": { - "version": "4.2.0", - "bundled": true, - "dev": true, - "requires": { - "is-obj": "^1.0.0" - } - }, - "dotenv": { - "version": "5.0.1", - "bundled": true, - "dev": true - }, - "duplexer3": { - "version": "0.1.4", - "bundled": true, - "dev": true - }, - "duplexify": { - "version": "3.6.0", - "bundled": true, - "dev": true, - "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" - } - }, - "ecc-jsbn": { - "version": "0.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "editor": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "encoding": { - "version": "0.1.12", - "bundled": true, - "dev": true, - "requires": { - "iconv-lite": "~0.4.13" - } - }, - "end-of-stream": { - "version": "1.4.1", - "bundled": true, - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "err-code": { - "version": "1.1.2", - "bundled": true, - "dev": true - }, - "errno": { - "version": "0.1.7", - "bundled": true, - "dev": true, - "requires": { - "prr": "~1.0.1" - } - }, - "es6-promise": { - "version": "4.2.4", - "bundled": true, - "dev": true - }, - "es6-promisify": { - "version": "5.0.0", - "bundled": true, - "dev": true, - "requires": { - "es6-promise": "^4.0.3" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "bundled": true, - "dev": true - }, - "execa": { - "version": "0.7.0", - "bundled": true, - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, "extend": { "version": "3.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "dev": true }, - "extsprintf": { - "version": "1.3.0", - "bundled": true, - "dev": true - }, - "fast-deep-equal": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "figgy-pudding": { - "version": "3.5.1", - "bundled": true, - "dev": true - }, - "find-npm-prefix": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "find-up": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "flush-write-stream": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.4" - } - }, - "forever-agent": { - "version": "0.6.1", - "bundled": true, - "dev": true - }, - "form-data": { - "version": "2.3.2", - "bundled": true, - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "1.0.6", - "mime-types": "^2.1.12" - } - }, - "from2": { - "version": "2.3.0", - "bundled": true, - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" - } - }, - "fs-minipass": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs-vacuum": { - "version": "1.2.10", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "path-is-inside": "^1.0.1", - "rimraf": "^2.5.2" - } - }, - "fs-write-stream-atomic": { - "version": "1.0.10", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "iferr": "^0.1.5", - "imurmurhash": "^0.1.4", - "readable-stream": "1 || 2" - }, - "dependencies": { - "iferr": { - "version": "0.1.5", - "bundled": true, - "dev": true - } - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "fstream": { - "version": "1.0.11", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "inherits": "~2.0.0", - "mkdirp": ">=0.5 0", - "rimraf": "2" - } - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - }, - "dependencies": { - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - } - } - }, - "genfun": { - "version": "4.0.1", - "bundled": true, - "dev": true - }, - "gentle-fs": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "aproba": "^1.1.2", - "fs-vacuum": "^1.2.10", - "graceful-fs": "^4.1.11", - "iferr": "^0.1.5", - "mkdirp": "^0.5.1", - "path-is-inside": "^1.0.2", - "read-cmd-shim": "^1.0.1", - "slide": "^1.1.6" - }, - "dependencies": { - "iferr": { - "version": "0.1.5", - "bundled": true, - "dev": true - } - } - }, - "get-caller-file": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "get-stream": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "getpass": { - "version": "0.1.7", - "bundled": true, - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, "glob": { "version": "7.1.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -9863,1358 +10273,111 @@ "path-is-absolute": "^1.0.0" } }, - "global-dirs": { - "version": "0.1.1", - "bundled": true, - "dev": true, - "requires": { - "ini": "^1.3.4" - } - }, - "got": { - "version": "6.7.1", - "bundled": true, - "dev": true, - "requires": { - "create-error-class": "^3.0.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "is-redirect": "^1.0.0", - "is-retry-allowed": "^1.0.0", - "is-stream": "^1.0.0", - "lowercase-keys": "^1.0.0", - "safe-buffer": "^5.0.1", - "timed-out": "^4.0.0", - "unzip-response": "^2.0.1", - "url-parse-lax": "^1.0.0" - } - }, "graceful-fs": { "version": "4.1.15", - "bundled": true, - "dev": true - }, - "har-schema": { - "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", "dev": true }, "har-validator": { - "version": "5.1.0", - "bundled": true, + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", + "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", "dev": true, "requires": { - "ajv": "^5.3.0", + "ajv": "^6.5.5", "har-schema": "^2.0.0" + }, + "dependencies": { + "ajv": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.7.0.tgz", + "integrity": "sha512-RZXPviBTtfmtka9n9sy1N5M5b82CbxWIR6HIis4s3WQTXDJamc/0gpCWNGz6EWdWp4DOfjzJfhz/AS9zVPjjWg==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + } } }, - "has-flag": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true - }, "hosted-git-info": { "version": "2.7.1", - "bundled": true, - "dev": true - }, - "http-cache-semantics": { - "version": "3.8.1", - "bundled": true, - "dev": true - }, - "http-proxy-agent": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "agent-base": "4", - "debug": "3.1.0" - } - }, - "http-signature": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "https-proxy-agent": { - "version": "2.2.1", - "bundled": true, - "dev": true, - "requires": { - "agent-base": "^4.1.0", - "debug": "^3.1.0" - } - }, - "humanize-ms": { - "version": "1.2.1", - "bundled": true, - "dev": true, - "requires": { - "ms": "^2.0.0" - } - }, - "iconv-lite": { - "version": "0.4.23", - "bundled": true, - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "iferr": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "import-lazy": { - "version": "2.1.0", - "bundled": true, - "dev": true - }, - "imurmurhash": { - "version": "0.1.4", - "bundled": true, - "dev": true - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", "dev": true }, "ini": { "version": "1.3.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "dev": true }, - "init-package-json": { - "version": "1.10.3", - "bundled": true, - "dev": true, - "requires": { - "glob": "^7.1.1", - "npm-package-arg": "^4.0.0 || ^5.0.0 || ^6.0.0", - "promzard": "^0.3.0", - "read": "~1.0.1", - "read-package-json": "1 || 2", - "semver": "2.x || 3.x || 4 || 5", - "validate-npm-package-license": "^3.0.1", - "validate-npm-package-name": "^3.0.0" - } - }, - "invert-kv": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "ip": { - "version": "1.1.5", - "bundled": true, - "dev": true - }, - "ip-regex": { - "version": "2.1.0", - "bundled": true, - "dev": true - }, - "is-builtin-module": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "builtin-modules": "^1.0.0" - } - }, - "is-ci": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "ci-info": "^1.0.0" - } - }, - "is-cidr": { - "version": "2.0.6", - "bundled": true, - "dev": true, - "requires": { - "cidr-regex": "^2.0.8" - } - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-installed-globally": { - "version": "0.1.0", - "bundled": true, - "dev": true, - "requires": { - "global-dirs": "^0.1.0", - "is-path-inside": "^1.0.0" - } - }, - "is-npm": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "is-obj": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "is-path-inside": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "path-is-inside": "^1.0.1" - } - }, - "is-redirect": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "is-retry-allowed": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "is-typedarray": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "isexe": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "isstream": { - "version": "0.1.2", - "bundled": true, - "dev": true - }, - "jsbn": { - "version": "0.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "json-parse-better-errors": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "json-schema": { - "version": "0.2.3", - "bundled": true, - "dev": true - }, - "json-schema-traverse": { - "version": "0.3.1", - "bundled": true, - "dev": true - }, - "json-stringify-safe": { - "version": "5.0.1", - "bundled": true, - "dev": true - }, - "jsonparse": { - "version": "1.3.1", - "bundled": true, - "dev": true - }, - "jsprim": { - "version": "1.4.1", - "bundled": true, - "dev": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "latest-version": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "package-json": "^4.0.0" - } - }, - "lazy-property": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "lcid": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "invert-kv": "^1.0.0" - } - }, - "libcipm": { - "version": "2.0.2", - "bundled": true, - "dev": true, - "requires": { - "bin-links": "^1.1.2", - "bluebird": "^3.5.1", - "find-npm-prefix": "^1.0.2", - "graceful-fs": "^4.1.11", - "lock-verify": "^2.0.2", - "mkdirp": "^0.5.1", - "npm-lifecycle": "^2.0.3", - "npm-logical-tree": "^1.2.1", - "npm-package-arg": "^6.1.0", - "pacote": "^8.1.6", - "protoduck": "^5.0.0", - "read-package-json": "^2.0.13", - "rimraf": "^2.6.2", - "worker-farm": "^1.6.0" - } - }, - "libnpmhook": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "requires": { - "figgy-pudding": "^3.1.0", - "npm-registry-fetch": "^3.0.0" - }, - "dependencies": { - "npm-registry-fetch": { - "version": "3.1.1", - "bundled": true, - "dev": true, - "requires": { - "bluebird": "^3.5.1", - "figgy-pudding": "^3.1.0", - "lru-cache": "^4.1.2", - "make-fetch-happen": "^4.0.0", - "npm-package-arg": "^6.0.0" - } - } - } - }, - "libnpx": { - "version": "10.2.0", - "bundled": true, - "dev": true, - "requires": { - "dotenv": "^5.0.1", - "npm-package-arg": "^6.0.0", - "rimraf": "^2.6.2", - "safe-buffer": "^5.1.0", - "update-notifier": "^2.3.0", - "which": "^1.3.0", - "y18n": "^4.0.0", - "yargs": "^11.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "lock-verify": { - "version": "2.0.2", - "bundled": true, - "dev": true, - "requires": { - "npm-package-arg": "^5.1.2 || 6", - "semver": "^5.4.1" - } - }, - "lockfile": { - "version": "1.0.4", - "bundled": true, - "dev": true, - "requires": { - "signal-exit": "^3.0.2" - } - }, - "lodash._baseindexof": { - "version": "3.1.0", - "bundled": true, - "dev": true - }, - "lodash._baseuniq": { - "version": "4.6.0", - "bundled": true, - "dev": true, - "requires": { - "lodash._createset": "~4.0.0", - "lodash._root": "~3.0.0" - } - }, - "lodash._bindcallback": { - "version": "3.0.1", - "bundled": true, - "dev": true - }, - "lodash._cacheindexof": { - "version": "3.0.2", - "bundled": true, - "dev": true - }, - "lodash._createcache": { - "version": "3.1.2", - "bundled": true, - "dev": true, - "requires": { - "lodash._getnative": "^3.0.0" - } - }, - "lodash._createset": { - "version": "4.0.3", - "bundled": true, - "dev": true - }, - "lodash._getnative": { - "version": "3.9.1", - "bundled": true, - "dev": true - }, - "lodash._root": { - "version": "3.0.1", - "bundled": true, - "dev": true - }, - "lodash.clonedeep": { - "version": "4.5.0", - "bundled": true, - "dev": true - }, - "lodash.restparam": { - "version": "3.6.1", - "bundled": true, - "dev": true - }, - "lodash.union": { - "version": "4.6.0", - "bundled": true, - "dev": true - }, - "lodash.uniq": { - "version": "4.5.0", - "bundled": true, - "dev": true - }, - "lodash.without": { - "version": "4.4.0", - "bundled": true, - "dev": true - }, - "lowercase-keys": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "lru-cache": { - "version": "4.1.3", - "bundled": true, - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "make-dir": { - "version": "1.3.0", - "bundled": true, - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "make-fetch-happen": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "requires": { - "agentkeepalive": "^3.4.1", - "cacache": "^11.0.1", - "http-cache-semantics": "^3.8.1", - "http-proxy-agent": "^2.1.0", - "https-proxy-agent": "^2.2.1", - "lru-cache": "^4.1.2", - "mississippi": "^3.0.0", - "node-fetch-npm": "^2.0.2", - "promise-retry": "^1.1.1", - "socks-proxy-agent": "^4.0.0", - "ssri": "^6.0.0" - } - }, - "meant": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "mem": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, "mime-db": { - "version": "1.35.0", - "bundled": true, + "version": "1.37.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", + "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==", "dev": true }, "mime-types": { - "version": "2.1.19", - "bundled": true, + "version": "2.1.21", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz", + "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==", "dev": true, "requires": { - "mime-db": "~1.35.0" - } - }, - "mimic-fn": { - "version": "1.2.0", - "bundled": true, - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, - "minipass": { - "version": "2.3.3", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - }, - "dependencies": { - "yallist": { - "version": "3.0.2", - "bundled": true, - "dev": true - } - } - }, - "minizlib": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mississippi": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^3.0.0", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "move-concurrently": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "aproba": "^1.1.1", - "copy-concurrently": "^1.0.0", - "fs-write-stream-atomic": "^1.0.8", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.3" - } - }, - "ms": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "mute-stream": { - "version": "0.0.7", - "bundled": true, - "dev": true - }, - "node-fetch-npm": { - "version": "2.0.2", - "bundled": true, - "dev": true, - "requires": { - "encoding": "^0.1.11", - "json-parse-better-errors": "^1.0.0", - "safe-buffer": "^5.1.1" - } - }, - "node-gyp": { - "version": "3.8.0", - "bundled": true, - "dev": true, - "requires": { - "fstream": "^1.0.0", - "glob": "^7.0.3", - "graceful-fs": "^4.1.2", - "mkdirp": "^0.5.0", - "nopt": "2 || 3", - "npmlog": "0 || 1 || 2 || 3 || 4", - "osenv": "0", - "request": "^2.87.0", - "rimraf": "2", - "semver": "~5.3.0", - "tar": "^2.0.0", - "which": "1" - }, - "dependencies": { - "nopt": { - "version": "3.0.6", - "bundled": true, - "dev": true, - "requires": { - "abbrev": "1" - } - }, - "semver": { - "version": "5.3.0", - "bundled": true, - "dev": true - }, - "tar": { - "version": "2.2.1", - "bundled": true, - "dev": true, - "requires": { - "block-stream": "*", - "fstream": "^1.0.2", - "inherits": "2" - } - } + "mime-db": "~1.37.0" } }, "nopt": { "version": "4.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", + "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", "dev": true, "requires": { "abbrev": "1", "osenv": "^0.1.4" } }, - "normalize-package-data": { - "version": "2.4.0", - "bundled": true, - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "npm-audit-report": { - "version": "1.3.1", - "bundled": true, - "dev": true, - "requires": { - "cli-table3": "^0.5.0", - "console-control-strings": "^1.1.0" - } - }, - "npm-bundled": { - "version": "1.0.5", - "bundled": true, - "dev": true - }, - "npm-cache-filename": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "npm-install-checks": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "semver": "^2.3.0 || 3.x || 4 || 5" - } - }, - "npm-lifecycle": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "byline": "^5.0.0", - "graceful-fs": "^4.1.11", - "node-gyp": "^3.8.0", - "resolve-from": "^4.0.0", - "slide": "^1.1.6", - "uid-number": "0.0.6", - "umask": "^1.1.0", - "which": "^1.3.1" - } - }, - "npm-logical-tree": { - "version": "1.2.1", - "bundled": true, - "dev": true - }, - "npm-package-arg": { - "version": "6.1.0", - "bundled": true, - "dev": true, - "requires": { - "hosted-git-info": "^2.6.0", - "osenv": "^0.1.5", - "semver": "^5.5.0", - "validate-npm-package-name": "^3.0.0" - } - }, - "npm-packlist": { - "version": "1.1.12", - "bundled": true, - "dev": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npm-pick-manifest": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "npm-package-arg": "^6.0.0", - "semver": "^5.4.1" - } - }, - "npm-profile": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "requires": { - "aproba": "^1.1.2 || 2", - "make-fetch-happen": "^2.5.0 || 3 || 4" - } - }, - "npm-registry-client": { - "version": "8.6.0", - "bundled": true, - "dev": true, - "requires": { - "concat-stream": "^1.5.2", - "graceful-fs": "^4.1.6", - "normalize-package-data": "~1.0.1 || ^2.0.0", - "npm-package-arg": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0", - "npmlog": "2 || ^3.1.0 || ^4.0.0", - "once": "^1.3.3", - "request": "^2.74.0", - "retry": "^0.10.0", - "safe-buffer": "^5.1.1", - "semver": "2 >=2.2.1 || 3.x || 4 || 5", - "slide": "^1.1.3", - "ssri": "^5.2.4" - }, - "dependencies": { - "retry": { - "version": "0.10.1", - "bundled": true, - "dev": true - }, - "ssri": { - "version": "5.3.0", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "^5.1.1" - } - } - } - }, - "npm-registry-fetch": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "bluebird": "^3.5.1", - "figgy-pudding": "^2.0.1", - "lru-cache": "^4.1.2", - "make-fetch-happen": "^3.0.0", - "npm-package-arg": "^6.0.0", - "safe-buffer": "^5.1.1" - }, - "dependencies": { - "cacache": { - "version": "10.0.4", - "bundled": true, - "dev": true, - "requires": { - "bluebird": "^3.5.1", - "chownr": "^1.0.1", - "glob": "^7.1.2", - "graceful-fs": "^4.1.11", - "lru-cache": "^4.1.1", - "mississippi": "^2.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", - "ssri": "^5.2.4", - "unique-filename": "^1.1.0", - "y18n": "^4.0.0" - }, - "dependencies": { - "mississippi": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^2.0.1", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" - } - } - } - }, - "figgy-pudding": { - "version": "2.0.1", - "bundled": true, - "dev": true - }, - "make-fetch-happen": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "agentkeepalive": "^3.4.1", - "cacache": "^10.0.4", - "http-cache-semantics": "^3.8.1", - "http-proxy-agent": "^2.1.0", - "https-proxy-agent": "^2.2.0", - "lru-cache": "^4.1.2", - "mississippi": "^3.0.0", - "node-fetch-npm": "^2.0.2", - "promise-retry": "^1.1.1", - "socks-proxy-agent": "^3.0.1", - "ssri": "^5.2.4" - } - }, - "pump": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "smart-buffer": { - "version": "1.1.15", - "bundled": true, - "dev": true - }, - "socks": { - "version": "1.1.10", - "bundled": true, - "dev": true, - "requires": { - "ip": "^1.1.4", - "smart-buffer": "^1.0.13" - } - }, - "socks-proxy-agent": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "agent-base": "^4.1.0", - "socks": "^1.1.10" - } - }, - "ssri": { - "version": "5.3.0", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "^5.1.1" - } - } - } - }, - "npm-run-path": { - "version": "2.0.2", - "bundled": true, - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "npm-user-validate": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, "oauth-sign": { "version": "0.9.0", - "bundled": true, - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "opener": { - "version": "1.5.1", - "bundled": true, - "dev": true - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "os-locale": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" - } - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "p-finally": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "p-limit": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "package-json": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "requires": { - "got": "^6.7.1", - "registry-auth-token": "^3.0.1", - "registry-url": "^3.0.3", - "semver": "^5.1.0" - } - }, - "pacote": { - "version": "8.1.6", - "bundled": true, - "dev": true, - "requires": { - "bluebird": "^3.5.1", - "cacache": "^11.0.2", - "get-stream": "^3.0.0", - "glob": "^7.1.2", - "lru-cache": "^4.1.3", - "make-fetch-happen": "^4.0.1", - "minimatch": "^3.0.4", - "minipass": "^2.3.3", - "mississippi": "^3.0.0", - "mkdirp": "^0.5.1", - "normalize-package-data": "^2.4.0", - "npm-package-arg": "^6.1.0", - "npm-packlist": "^1.1.10", - "npm-pick-manifest": "^2.1.0", - "osenv": "^0.1.5", - "promise-inflight": "^1.0.1", - "promise-retry": "^1.1.1", - "protoduck": "^5.0.0", - "rimraf": "^2.6.2", - "safe-buffer": "^5.1.2", - "semver": "^5.5.0", - "ssri": "^6.0.0", - "tar": "^4.4.3", - "unique-filename": "^1.1.0", - "which": "^1.3.0" - } - }, - "parallel-transform": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "cyclist": "~0.2.2", - "inherits": "^2.0.3", - "readable-stream": "^2.1.5" - } - }, - "path-exists": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "path-is-inside": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "path-key": { - "version": "2.0.1", - "bundled": true, - "dev": true - }, - "performance-now": { - "version": "2.1.0", - "bundled": true, - "dev": true - }, - "pify": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "prepend-http": { - "version": "1.0.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", "dev": true }, "process-nextick-args": { "version": "2.0.0", - "bundled": true, - "dev": true - }, - "promise-inflight": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "promise-retry": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "requires": { - "err-code": "^1.0.0", - "retry": "^0.10.0" - }, - "dependencies": { - "retry": { - "version": "0.10.1", - "bundled": true, - "dev": true - } - } - }, - "promzard": { - "version": "0.3.0", - "bundled": true, - "dev": true, - "requires": { - "read": "1" - } - }, - "proto-list": { - "version": "1.2.4", - "bundled": true, - "dev": true - }, - "protoduck": { - "version": "5.0.0", - "bundled": true, - "dev": true, - "requires": { - "genfun": "^4.0.1" - } - }, - "prr": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "pseudomap": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "psl": { - "version": "1.1.29", - "bundled": true, - "dev": true - }, - "pump": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "pumpify": { - "version": "1.5.1", - "bundled": true, - "dev": true, - "requires": { - "duplexify": "^3.6.0", - "inherits": "^2.0.3", - "pump": "^2.0.0" - }, - "dependencies": { - "pump": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - } - } - }, - "punycode": { - "version": "1.4.1", - "bundled": true, - "dev": true - }, - "qrcode-terminal": { - "version": "0.12.0", - "bundled": true, - "dev": true - }, - "qs": { - "version": "6.5.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "dev": true }, "query-string": { - "version": "6.1.0", - "bundled": true, + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-6.2.0.tgz", + "integrity": "sha512-5wupExkIt8RYL4h/FE+WTg3JHk62e6fFPWtAZA9J5IWK1PfTfKkMS93HBUHcFpeYi9KsY5pFbh+ldvEyaz5MyA==", "dev": true, "requires": { "decode-uri-component": "^0.2.0", "strict-uri-encode": "^2.0.0" } }, - "qw": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "rc": { - "version": "1.2.7", - "bundled": true, - "dev": true, - "requires": { - "deep-extend": "^0.5.1", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true - } - } - }, - "read": { - "version": "1.0.7", - "bundled": true, - "dev": true, - "requires": { - "mute-stream": "~0.0.4" - } - }, - "read-cmd-shim": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "^4.1.2" - } - }, - "read-installed": { - "version": "4.0.3", - "bundled": true, - "dev": true, - "requires": { - "debuglog": "^1.0.1", - "graceful-fs": "^4.1.2", - "read-package-json": "^2.0.0", - "readdir-scoped-modules": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "slide": "~1.1.3", - "util-extend": "^1.0.1" - } - }, - "read-package-json": { - "version": "2.0.13", - "bundled": true, - "dev": true, - "requires": { - "glob": "^7.1.1", - "graceful-fs": "^4.1.2", - "json-parse-better-errors": "^1.0.1", - "normalize-package-data": "^2.0.0", - "slash": "^1.0.0" - } - }, - "read-package-tree": { - "version": "5.2.1", - "bundled": true, - "dev": true, - "requires": { - "debuglog": "^1.0.1", - "dezalgo": "^1.0.0", - "once": "^1.3.0", - "read-package-json": "^2.0.0", - "readdir-scoped-modules": "^1.0.0" - } - }, "readable-stream": { "version": "2.3.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { "core-util-is": "~1.0.0", @@ -11226,37 +10389,10 @@ "util-deprecate": "~1.0.1" } }, - "readdir-scoped-modules": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "debuglog": "^1.0.1", - "dezalgo": "^1.0.0", - "graceful-fs": "^4.1.2", - "once": "^1.3.0" - } - }, - "registry-auth-token": { - "version": "3.3.2", - "bundled": true, - "dev": true, - "requires": { - "rc": "^1.1.6", - "safe-buffer": "^5.0.1" - } - }, - "registry-url": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "rc": "^1.0.1" - } - }, "request": { "version": "2.88.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", "dev": true, "requires": { "aws-sign2": "~0.7.0", @@ -11281,193 +10417,41 @@ "uuid": "^3.3.2" } }, - "require-directory": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "resolve-from": { - "version": "4.0.0", - "bundled": true, - "dev": true - }, - "retry": { - "version": "0.12.0", - "bundled": true, - "dev": true - }, "rimraf": { - "version": "2.6.2", - "bundled": true, + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "dev": true, "requires": { - "glob": "^7.0.5" - } - }, - "run-queue": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "requires": { - "aproba": "^1.1.1" + "glob": "^7.1.3" } }, "safe-buffer": { "version": "5.1.2", - "bundled": true, - "dev": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, "semver": { - "version": "5.5.1", - "bundled": true, + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", "dev": true }, - "semver-diff": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "semver": "^5.0.3" - } - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "sha": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "readable-stream": "^2.0.2" - } - }, - "shebang-command": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true - }, - "slash": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "slide": { - "version": "1.1.6", - "bundled": true, - "dev": true - }, - "smart-buffer": { - "version": "4.0.1", - "bundled": true, - "dev": true - }, - "socks": { - "version": "2.2.0", - "bundled": true, - "dev": true, - "requires": { - "ip": "^1.1.5", - "smart-buffer": "^4.0.1" - } - }, - "socks-proxy-agent": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "requires": { - "agent-base": "~4.2.0", - "socks": "~2.2.0" - } - }, - "sorted-object": { - "version": "2.0.1", - "bundled": true, - "dev": true - }, - "sorted-union-stream": { - "version": "2.1.3", - "bundled": true, - "dev": true, - "requires": { - "from2": "^1.3.0", - "stream-iterate": "^1.1.0" - }, - "dependencies": { - "from2": { - "version": "1.3.0", - "bundled": true, - "dev": true, - "requires": { - "inherits": "~2.0.1", - "readable-stream": "~1.1.10" - } - }, - "isarray": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "readable-stream": { - "version": "1.1.14", - "bundled": true, - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "bundled": true, - "dev": true - } - } - }, "spdx-correct": { - "version": "3.0.0", - "bundled": true, + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", "dev": true, "requires": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" } }, - "spdx-exceptions": { - "version": "2.1.0", - "bundled": true, - "dev": true - }, "spdx-expression-parse": { "version": "3.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", "dev": true, "requires": { "spdx-exceptions": "^2.1.0", @@ -11475,490 +10459,75 @@ } }, "spdx-license-ids": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "sshpk": { - "version": "1.14.2", - "bundled": true, - "dev": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "ssri": { - "version": "6.0.1", - "bundled": true, - "dev": true, - "requires": { - "figgy-pudding": "^3.5.1" - } - }, - "stream-each": { - "version": "1.2.2", - "bundled": true, - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "stream-shift": "^1.0.0" - } - }, - "stream-iterate": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "requires": { - "readable-stream": "^2.1.5", - "stream-shift": "^1.0.0" - } - }, - "stream-shift": { - "version": "1.0.0", - "bundled": true, + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz", + "integrity": "sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g==", "dev": true }, "strict-uri-encode": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", + "integrity": "sha1-ucczDHBChi9rFC3CdLvMWGbONUY=", "dev": true }, - "string-width": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, "string_decoder": { "version": "1.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { "safe-buffer": "~5.1.0" } }, - "stringify-package": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-eof": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true - }, - "supports-color": { - "version": "5.4.0", - "bundled": true, - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "tar": { - "version": "4.4.8", - "bundled": true, - "dev": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" - }, - "dependencies": { - "chownr": { - "version": "1.1.1", - "bundled": true, - "dev": true - }, - "minipass": { - "version": "2.3.5", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "yallist": { - "version": "3.0.3", - "bundled": true, - "dev": true - } - } - }, - "term-size": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "requires": { - "execa": "^0.7.0" - } - }, - "text-table": { - "version": "0.2.0", - "bundled": true, - "dev": true - }, - "through": { - "version": "2.3.8", - "bundled": true, - "dev": true - }, - "through2": { - "version": "2.0.3", - "bundled": true, - "dev": true, - "requires": { - "readable-stream": "^2.1.5", - "xtend": "~4.0.1" - } - }, - "timed-out": { - "version": "4.0.1", - "bundled": true, - "dev": true - }, - "tiny-relative-date": { - "version": "1.3.0", - "bundled": true, - "dev": true - }, "tough-cookie": { "version": "2.4.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", "dev": true, "requires": { "psl": "^1.1.24", "punycode": "^1.4.1" } }, - "tunnel-agent": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "bundled": true, - "dev": true, - "optional": true - }, - "typedarray": { - "version": "0.0.6", - "bundled": true, - "dev": true - }, - "uid-number": { - "version": "0.0.6", - "bundled": true, - "dev": true - }, - "umask": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "unique-filename": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "unique-slug": "^2.0.0" - } - }, - "unique-slug": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "imurmurhash": "^0.1.4" - } - }, - "unique-string": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "crypto-random-string": "^1.0.0" - } - }, - "unpipe": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "unzip-response": { - "version": "2.0.1", - "bundled": true, - "dev": true - }, - "update-notifier": { - "version": "2.5.0", - "bundled": true, - "dev": true, - "requires": { - "boxen": "^1.2.1", - "chalk": "^2.0.1", - "configstore": "^3.0.0", - "import-lazy": "^2.1.0", - "is-ci": "^1.0.10", - "is-installed-globally": "^0.1.0", - "is-npm": "^1.0.0", - "latest-version": "^3.0.0", - "semver-diff": "^2.0.0", - "xdg-basedir": "^3.0.0" - } - }, - "url-parse-lax": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "prepend-http": "^1.0.1" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "util-extend": { - "version": "1.0.3", - "bundled": true, - "dev": true - }, "uuid": { "version": "3.3.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", "dev": true }, "validate-npm-package-license": { "version": "3.0.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, "requires": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" } }, - "validate-npm-package-name": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "builtins": "^1.0.3" - } - }, - "verror": { - "version": "1.10.0", - "bundled": true, - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "wcwidth": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "defaults": "^1.0.3" - } - }, - "which": { - "version": "1.3.1", - "bundled": true, - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "wide-align": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "requires": { - "string-width": "^1.0.2" - }, - "dependencies": { - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - } - } - }, - "widest-line": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "string-width": "^2.1.1" - } - }, - "worker-farm": { - "version": "1.6.0", - "bundled": true, - "dev": true, - "requires": { - "errno": "~0.1.7" - } - }, - "wrap-ansi": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - } - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, "write-file-atomic": { "version": "2.3.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", + "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", "dev": true, "requires": { "graceful-fs": "^4.1.11", "imurmurhash": "^0.1.4", "signal-exit": "^3.0.2" } - }, - "xdg-basedir": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "xtend": { - "version": "4.0.1", - "bundled": true, - "dev": true - }, - "y18n": { - "version": "4.0.0", - "bundled": true, - "dev": true - }, - "yallist": { - "version": "2.1.2", - "bundled": true, - "dev": true - }, - "yargs": { - "version": "11.0.0", - "bundled": true, - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^9.0.2" - }, - "dependencies": { - "y18n": { - "version": "3.2.1", - "bundled": true, - "dev": true - } - } - }, - "yargs-parser": { - "version": "9.0.2", - "bundled": true, - "dev": true, - "requires": { - "camelcase": "^4.1.0" - } } } }, + "npm-audit-report": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/npm-audit-report/-/npm-audit-report-1.3.2.tgz", + "integrity": "sha512-abeqS5ONyXNaZJPGAf6TOUMNdSe1Y6cpc9MLBRn+CuUoYbfdca6AxOyXVlfIv9OgKX+cacblbG5w7A6ccwoTPw==", + "dev": true, + "requires": { + "cli-table3": "^0.5.0", + "console-control-strings": "^1.1.0" + } + }, "npm-bundled": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.5.tgz", @@ -11966,6 +10535,21 @@ "dev": true, "optional": true }, + "npm-cache-filename": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/npm-cache-filename/-/npm-cache-filename-1.0.2.tgz", + "integrity": "sha1-3tMGxbC/yHCp6fr4I7xfKD4FrhE=", + "dev": true + }, + "npm-install-checks": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-3.0.0.tgz", + "integrity": "sha1-1K7N/VGlPjcjt7L5Oy7ijjB7wNc=", + "dev": true, + "requires": { + "semver": "^2.3.0 || 3.x || 4 || 5" + } + }, "npm-install-peers": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/npm-install-peers/-/npm-install-peers-1.2.1.tgz", @@ -11976,17 +10560,93 @@ "npm": "*" } }, + "npm-lifecycle": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/npm-lifecycle/-/npm-lifecycle-2.1.0.tgz", + "integrity": "sha512-QbBfLlGBKsktwBZLj6AviHC6Q9Y3R/AY4a2PYSIRhSKSS0/CxRyD/PfxEX6tPeOCXQgMSNdwGeECacstgptc+g==", + "dev": true, + "requires": { + "byline": "^5.0.0", + "graceful-fs": "^4.1.11", + "node-gyp": "^3.8.0", + "resolve-from": "^4.0.0", + "slide": "^1.1.6", + "uid-number": "0.0.6", + "umask": "^1.1.0", + "which": "^1.3.1" + }, + "dependencies": { + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + } + } + }, + "npm-logical-tree": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/npm-logical-tree/-/npm-logical-tree-1.2.1.tgz", + "integrity": "sha512-AJI/qxDB2PWI4LG1CYN579AY1vCiNyWfkiquCsJWqntRu/WwimVrC8yXeILBFHDwxfOejxewlmnvW9XXjMlYIg==", + "dev": true + }, + "npm-package-arg": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.0.tgz", + "integrity": "sha512-zYbhP2k9DbJhA0Z3HKUePUgdB1x7MfIfKssC+WLPFMKTBZKpZh5m13PgexJjCq6KW7j17r0jHWcCpxEqnnncSA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.6.0", + "osenv": "^0.1.5", + "semver": "^5.5.0", + "validate-npm-package-name": "^3.0.0" + }, + "dependencies": { + "hosted-git-info": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "dev": true + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "dev": true + } + } + }, "npm-packlist": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.2.0.tgz", "integrity": "sha512-7Mni4Z8Xkx0/oegoqlcao/JpPCPEMtUvsmB0q7mgvlMinykJLSRTYuFqoQLYgGY8biuxIeiHO+QNJKbCfljewQ==", "dev": true, - "optional": true, "requires": { "ignore-walk": "^3.0.1", "npm-bundled": "^1.0.1" } }, + "npm-pick-manifest": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-2.2.3.tgz", + "integrity": "sha512-+IluBC5K201+gRU85vFlUwX3PFShZAbAgDNp2ewJdWMVSppdo/Zih0ul2Ecky/X7b51J7LrrUAP+XOmOCvYZqA==", + "dev": true, + "requires": { + "figgy-pudding": "^3.5.1", + "npm-package-arg": "^6.0.0", + "semver": "^5.4.1" + } + }, + "npm-profile": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/npm-profile/-/npm-profile-3.0.2.tgz", + "integrity": "sha512-rEJOFR6PbwOvvhGa2YTNOJQKNuc6RovJ6T50xPU7pS9h/zKPNCJ+VHZY2OFXyZvEi+UQYtHRTp8O/YM3tUD20A==", + "dev": true, + "requires": { + "aproba": "^1.1.2 || 2", + "make-fetch-happen": "^2.5.0 || 3 || 4" + } + }, "npm-programmatic": { "version": "0.0.10", "resolved": "https://registry.npmjs.org/npm-programmatic/-/npm-programmatic-0.0.10.tgz", @@ -11996,6 +10656,201 @@ "bluebird": "^3.4.1" } }, + "npm-registry-client": { + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-8.6.0.tgz", + "integrity": "sha512-Qs6P6nnopig+Y8gbzpeN/dkt+n7IyVd8f45NTMotGk6Qo7GfBmzwYx6jRLoOOgKiMnaQfYxsuyQlD8Mc3guBhg==", + "dev": true, + "requires": { + "concat-stream": "^1.5.2", + "graceful-fs": "^4.1.6", + "normalize-package-data": "~1.0.1 || ^2.0.0", + "npm-package-arg": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0", + "npmlog": "2 || ^3.1.0 || ^4.0.0", + "once": "^1.3.3", + "request": "^2.74.0", + "retry": "^0.10.0", + "safe-buffer": "^5.1.1", + "semver": "2 >=2.2.1 || 3.x || 4 || 5", + "slide": "^1.1.3", + "ssri": "^5.2.4" + }, + "dependencies": { + "retry": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz", + "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=", + "dev": true + }, + "ssri": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz", + "integrity": "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.1" + } + } + } + }, + "npm-registry-fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-1.1.0.tgz", + "integrity": "sha512-XJPIBfMtgaooRtZmuA42xCeLf3tkxdIX0xqRsGWwNrcVvJ9UYFccD7Ho7QWCzvkM3i/QrkUC37Hu0a+vDBmt5g==", + "dev": true, + "requires": { + "bluebird": "^3.5.1", + "figgy-pudding": "^2.0.1", + "lru-cache": "^4.1.2", + "make-fetch-happen": "^3.0.0", + "npm-package-arg": "^6.0.0", + "safe-buffer": "^5.1.1" + }, + "dependencies": { + "cacache": { + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz", + "integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==", + "dev": true, + "requires": { + "bluebird": "^3.5.1", + "chownr": "^1.0.1", + "glob": "^7.1.2", + "graceful-fs": "^4.1.11", + "lru-cache": "^4.1.1", + "mississippi": "^2.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.2", + "ssri": "^5.2.4", + "unique-filename": "^1.1.0", + "y18n": "^4.0.0" + }, + "dependencies": { + "mississippi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz", + "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==", + "dev": true, + "requires": { + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^2.0.1", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" + } + } + } + }, + "figgy-pudding": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-2.0.1.tgz", + "integrity": "sha512-yIJPhIBi/oFdU/P+GSXjmk/rmGjuZkm7A5LTXZxNrEprXJXRK012FiI1BR1Pga+0d/d6taWWD+B5d2ozqaxHig==", + "dev": true + }, + "make-fetch-happen": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-3.0.0.tgz", + "integrity": "sha512-FmWY7gC0mL6Z4N86vE14+m719JKE4H0A+pyiOH18B025gF/C113pyfb4gHDDYP5cqnRMHOz06JGdmffC/SES+w==", + "dev": true, + "requires": { + "agentkeepalive": "^3.4.1", + "cacache": "^10.0.4", + "http-cache-semantics": "^3.8.1", + "http-proxy-agent": "^2.1.0", + "https-proxy-agent": "^2.2.0", + "lru-cache": "^4.1.2", + "mississippi": "^3.0.0", + "node-fetch-npm": "^2.0.2", + "promise-retry": "^1.1.1", + "socks-proxy-agent": "^3.0.1", + "ssri": "^5.2.4" + } + }, + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + }, + "dependencies": { + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "smart-buffer": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz", + "integrity": "sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY=", + "dev": true + }, + "socks": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/socks/-/socks-1.1.10.tgz", + "integrity": "sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o=", + "dev": true, + "requires": { + "ip": "^1.1.4", + "smart-buffer": "^1.0.13" + } + }, + "socks-proxy-agent": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-3.0.1.tgz", + "integrity": "sha512-ZwEDymm204mTzvdqyUqOdovVr2YRd2NYskrYrF2LXyZ9qDiMAoFESGK8CRphiO7rtbo2Y757k2Nia3x2hGtalA==", + "dev": true, + "requires": { + "agent-base": "^4.1.0", + "socks": "^1.1.10" + } + }, + "ssri": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz", + "integrity": "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.1" + } + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + } + } + }, "npm-run-path": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", @@ -12005,12 +10860,17 @@ "path-key": "^2.0.0" } }, + "npm-user-validate": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/npm-user-validate/-/npm-user-validate-1.0.0.tgz", + "integrity": "sha1-jOyg9c6gTU6TUZ73LQVXp1Ei6VE=", + "dev": true + }, "npmlog": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "dev": true, - "optional": true, "requires": { "are-we-there-yet": "~1.1.2", "console-control-strings": "~1.1.0", @@ -12030,8 +10890,7 @@ "number-is-nan": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, "number-to-bn": { "version": "1.7.0", @@ -12172,12 +11031,39 @@ "mimic-fn": "^1.0.0" } }, - "openzeppelin-solidity": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/openzeppelin-solidity/-/openzeppelin-solidity-1.10.0.tgz", - "integrity": "sha512-igkrumQQ2lrN2zjeQV4Dnb0GpTBj1fzMcd8HPyBUqwI0hhuscX/HzXiqKT6gFQl1j9Wy/ppVVs9fqL/foF7Gmg==", + "opener": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.1.tgz", + "integrity": "sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA==", "dev": true }, + "openzeppelin-test-helpers": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/openzeppelin-test-helpers/-/openzeppelin-test-helpers-0.1.1.tgz", + "integrity": "sha512-mz6cJkCT90vjtrv9OXJggqn+zElSoF+/wk4u+GRg3JfrfafF+FvHTLBpoe5J8Lzs6O9xvy9PhFu5yEoj3OCypA==", + "dev": true, + "requires": { + "chai": "^4.2.0", + "chai-bn": "^0.1.0", + "ethjs-abi": "^0.2.1" + }, + "dependencies": { + "chai": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", + "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", + "dev": true, + "requires": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "pathval": "^1.1.0", + "type-detect": "^4.0.5" + } + } + } + }, "optimist": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", @@ -12265,7 +11151,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "dev": true, "requires": { "lcid": "^1.0.0" } @@ -12281,7 +11166,6 @@ "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "dev": true, - "optional": true, "requires": { "os-homedir": "^1.0.0", "os-tmpdir": "^1.0.0" @@ -12333,14 +11217,12 @@ "p-limit": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.1.0.tgz", - "integrity": "sha1-sH/y2aXYi+yAYDWJWiurZqJ5iLw=", - "dev": true + "integrity": "sha1-sH/y2aXYi+yAYDWJWiurZqJ5iLw=" }, "p-locate": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, "requires": { "p-limit": "^1.1.0" } @@ -12366,6 +11248,137 @@ "p-finally": "^1.0.0" } }, + "package-json": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", + "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", + "dev": true, + "requires": { + "got": "^6.7.1", + "registry-auth-token": "^3.0.1", + "registry-url": "^3.0.3", + "semver": "^5.1.0" + }, + "dependencies": { + "got": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", + "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", + "dev": true, + "requires": { + "create-error-class": "^3.0.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-redirect": "^1.0.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "lowercase-keys": "^1.0.0", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "unzip-response": "^2.0.1", + "url-parse-lax": "^1.0.0" + } + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "dev": true, + "requires": { + "prepend-http": "^1.0.1" + } + } + } + }, + "pacote": { + "version": "8.1.6", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-8.1.6.tgz", + "integrity": "sha512-wTOOfpaAQNEQNtPEx92x9Y9kRWVu45v583XT8x2oEV2xRB74+xdqMZIeGW4uFvAyZdmSBtye+wKdyyLaT8pcmw==", + "dev": true, + "requires": { + "bluebird": "^3.5.1", + "cacache": "^11.0.2", + "get-stream": "^3.0.0", + "glob": "^7.1.2", + "lru-cache": "^4.1.3", + "make-fetch-happen": "^4.0.1", + "minimatch": "^3.0.4", + "minipass": "^2.3.3", + "mississippi": "^3.0.0", + "mkdirp": "^0.5.1", + "normalize-package-data": "^2.4.0", + "npm-package-arg": "^6.1.0", + "npm-packlist": "^1.1.10", + "npm-pick-manifest": "^2.1.0", + "osenv": "^0.1.5", + "promise-inflight": "^1.0.1", + "promise-retry": "^1.1.1", + "protoduck": "^5.0.0", + "rimraf": "^2.6.2", + "safe-buffer": "^5.1.2", + "semver": "^5.5.0", + "ssri": "^6.0.0", + "tar": "^4.4.3", + "unique-filename": "^1.1.0", + "which": "^1.3.0" + }, + "dependencies": { + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + }, + "dependencies": { + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "dev": true + } + } + }, + "parallel-transform": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz", + "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", + "dev": true, + "requires": { + "cyclist": "~0.2.2", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" + } + }, "parse-asn1": { "version": "5.1.3", "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.3.tgz", @@ -12427,9 +11440,15 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, "requires": { "error-ex": "^1.2.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + } } }, "parse-passwd": { @@ -12466,7 +11485,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, "requires": { "pinkie-promise": "^2.0.0" } @@ -12485,8 +11503,7 @@ "path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" }, "path-parse": { "version": "1.0.5", @@ -12502,7 +11519,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, "requires": { "graceful-fs": "^4.1.2", "pify": "^2.0.0", @@ -12512,8 +11528,36 @@ "pify": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "yargs": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", + "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=", + "requires": { + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "lodash.assign": "^4.0.3", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.1", + "y18n": "^3.2.1", + "yargs-parser": "^2.4.1" + } } } }, @@ -12710,6 +11754,30 @@ "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=", "dev": true }, + "promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", + "dev": true + }, + "promise-retry": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-1.1.1.tgz", + "integrity": "sha1-ZznpaOMFHaIM5kl/srUPaRHfPW0=", + "dev": true, + "requires": { + "err-code": "^1.0.0", + "retry": "^0.10.0" + }, + "dependencies": { + "retry": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz", + "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=", + "dev": true + } + } + }, "promise-to-callback": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/promise-to-callback/-/promise-to-callback-1.0.0.tgz", @@ -12720,13 +11788,28 @@ "set-immediate-shim": "^1.0.1" } }, - "proxy-addr": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.3.tgz", - "integrity": "sha512-jQTChiCJteusULxjBp8+jftSQE5Obdl3k4cnmLA6WXtK6XFuWRnvVL7aCiBqaLPM8c4ph0S4tKna8XvmIwEnXQ==", + "promzard": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/promzard/-/promzard-0.3.0.tgz", + "integrity": "sha1-JqXW7ox97kyxIggwWs+5O6OCqe4=", + "dev": true, "requires": { - "forwarded": "~0.1.2", - "ipaddr.js": "1.6.0" + "read": "1" + } + }, + "proto-list": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", + "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", + "dev": true + }, + "protoduck": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/protoduck/-/protoduck-5.0.1.tgz", + "integrity": "sha512-WxoCeDCoCBY55BMvj4cAEjdVUFGRWed9ZxPlqTKYyw1nDDTQ4pqmnIMAGfJlg7Dx35uB/M+PHJPTmGOvaCaPTg==", + "dev": true, + "requires": { + "genfun": "^5.0.0" } }, "prr": { @@ -12741,6 +11824,12 @@ "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", "dev": true }, + "psl": { + "version": "1.1.31", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", + "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==", + "dev": true + }, "public-encrypt": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", @@ -12763,11 +11852,50 @@ } } }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "dev": true, + "requires": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + }, + "dependencies": { + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, "punycode": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" }, + "qrcode-terminal": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/qrcode-terminal/-/qrcode-terminal-0.12.0.tgz", + "integrity": "sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ==", + "dev": true + }, "qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", @@ -12789,6 +11917,12 @@ "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", "dev": true }, + "qw": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/qw/-/qw-1.0.1.tgz", + "integrity": "sha1-77/cdA+a0FQwRCassYNBLMi5ltQ=", + "dev": true + }, "randombytes": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", @@ -12852,7 +11986,6 @@ "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, - "optional": true, "requires": { "deep-extend": "^0.6.0", "ini": "~1.3.0", @@ -12864,18 +11997,25 @@ "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true, - "optional": true + "dev": true }, "minimist": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true, - "optional": true + "dev": true } } }, + "read": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", + "integrity": "sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ=", + "dev": true, + "requires": { + "mute-stream": "~0.0.4" + } + }, "read-chunk": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/read-chunk/-/read-chunk-2.1.0.tgz", @@ -12885,18 +12025,85 @@ "safe-buffer": "^5.1.1" }, "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "^3.0.0" + } } } }, + "read-cmd-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-1.0.1.tgz", + "integrity": "sha1-LV0Vd4ajfAVdIgd8MsU/gynpHHs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2" + } + }, + "read-installed": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/read-installed/-/read-installed-4.0.3.tgz", + "integrity": "sha1-/5uLZ/GH0eTCm5/rMfayI6zRkGc=", + "dev": true, + "requires": { + "debuglog": "^1.0.1", + "graceful-fs": "^4.1.2", + "read-package-json": "^2.0.0", + "readdir-scoped-modules": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "slide": "~1.1.3", + "util-extend": "^1.0.1" + } + }, + "read-package-json": { + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.0.13.tgz", + "integrity": "sha512-/1dZ7TRZvGrYqE0UAfN6qQb5GYBsNcqS1C0tNK601CFOJmtHI7NIGXwetEPU/OtoFHZL3hDxm4rolFFVE9Bnmg==", + "dev": true, + "requires": { + "glob": "^7.1.1", + "graceful-fs": "^4.1.2", + "json-parse-better-errors": "^1.0.1", + "normalize-package-data": "^2.0.0", + "slash": "^1.0.0" + } + }, + "read-package-tree": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/read-package-tree/-/read-package-tree-5.2.1.tgz", + "integrity": "sha512-2CNoRoh95LxY47LvqrehIAfUVda2JbuFE/HaGYs42bNrGG+ojbw1h3zOcPcQ+1GQ3+rkzNndZn85u1XyZ3UsIA==", + "dev": true, + "requires": { + "debuglog": "^1.0.1", + "dezalgo": "^1.0.0", + "once": "^1.3.0", + "read-package-json": "^2.0.0", + "readdir-scoped-modules": "^1.0.0" + } + }, "read-pkg": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, "requires": { "load-json-file": "^1.0.0", "normalize-package-data": "^2.3.2", @@ -12907,7 +12114,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, "requires": { "find-up": "^1.0.0", "read-pkg": "^1.0.0" @@ -12927,6 +12133,18 @@ "util-deprecate": "~1.0.1" } }, + "readdir-scoped-modules": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz", + "integrity": "sha1-n6+jfShr5dksuuve4DDcm19AZ0c=", + "dev": true, + "requires": { + "debuglog": "^1.0.1", + "dezalgo": "^1.0.0", + "graceful-fs": "^4.1.2", + "once": "^1.3.0" + } + }, "readdirp": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", @@ -12939,6 +12157,33 @@ "set-immediate-shim": "^1.0.1" } }, + "recast": { + "version": "0.12.9", + "resolved": "https://registry.npmjs.org/recast/-/recast-0.12.9.tgz", + "integrity": "sha512-y7ANxCWmMW8xLOaiopiRDlyjQ9ajKRENBH+2wjntIbk3A6ZR1+BLQttkmSHMY7Arl+AAZFwJ10grg2T6f1WI8A==", + "dev": true, + "requires": { + "ast-types": "0.10.1", + "core-js": "^2.4.1", + "esprima": "~4.0.0", + "private": "~0.1.5", + "source-map": "~0.6.1" + }, + "dependencies": { + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, "rechoir": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", @@ -13059,6 +12304,25 @@ "regjsparser": "^0.1.4" } }, + "registry-auth-token": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", + "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", + "dev": true, + "requires": { + "rc": "^1.1.6", + "safe-buffer": "^5.0.1" + } + }, + "registry-url": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", + "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", + "dev": true, + "requires": { + "rc": "^1.0.1" + } + }, "regjsgen": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", @@ -13198,9 +12462,9 @@ "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, "require-from-string": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz", - "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true }, "require-main-filename": { @@ -13355,6 +12619,12 @@ "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" }, + "retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", + "dev": true + }, "right-align": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", @@ -13406,6 +12676,15 @@ "is-promise": "^2.1.0" } }, + "run-queue": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", + "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", + "dev": true, + "requires": { + "aproba": "^1.1.1" + } + }, "rustbn.js": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/rustbn.js/-/rustbn.js-0.1.2.tgz", @@ -13591,8 +12870,16 @@ "semver": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", - "dev": true + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==" + }, + "semver-diff": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", + "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", + "dev": true, + "requires": { + "semver": "^5.0.3" + } }, "send": { "version": "0.16.2", @@ -13674,6 +12961,22 @@ "split-string": "^3.0.1" }, "dependencies": { + "async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "requires": { + "lodash": "^4.17.10" + } + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "requires": { + "ms": "^2.1.1" + } + }, "extend-shallow": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", @@ -13682,6 +12985,11 @@ "is-extendable": "^0.1.0" } }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + }, "node-dir": { "version": "0.1.17", "resolved": "https://registry.npmjs.org/node-dir/-/node-dir-0.1.17.tgz", @@ -13703,6 +13011,16 @@ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" }, + "sha": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/sha/-/sha-2.0.1.tgz", + "integrity": "sha1-YDCCL70smCOUn49y7WQR7lzyWq4=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "readable-stream": "^2.0.2" + } + }, "sha.js": { "version": "2.4.11", "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", @@ -13719,15 +13037,20 @@ "integrity": "sha1-pmxQmN5MJbyIM27ItIF9AFvKe6k=", "requires": { "nan": "2.10.0" + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "requires": { + "shebang-regex": "^1.0.0" }, "dependencies": { - "async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", - "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", - "requires": { - "lodash": "^4.17.10" - } + "bignumber.js": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-7.2.1.tgz", + "integrity": "sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ==" }, "debug": { "version": "3.2.6", @@ -13742,30 +13065,30 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" }, - "node-dir": { - "version": "0.1.17", - "resolved": "https://registry.npmjs.org/node-dir/-/node-dir-0.1.17.tgz", - "integrity": "sha1-X1Zl2TNRM1yqvvjxxVRRbPXx5OU=", + "web3": { + "version": "0.20.6", + "resolved": "http://registry.npmjs.org/web3/-/web3-0.20.6.tgz", + "integrity": "sha1-PpcwauAk+yThCj11yIQwJWIhUSA=", "requires": { - "minimatch": "^3.0.2" + "bignumber.js": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934", + "crypto-js": "^3.1.4", + "utf8": "^2.1.1", + "xhr2": "*", + "xmlhttprequest": "*" + }, + "dependencies": { + "bignumber.js": { + "version": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934", + "from": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934" + } } } } }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, "shebang-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" }, "shelljs": { "version": "0.7.8", @@ -13860,6 +13183,12 @@ "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", "dev": true }, + "smart-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.0.1.tgz", + "integrity": "sha512-RFqinRVJVcCAL9Uh1oVqE6FZkqsyLiVOYEZ20TqIOjuX7iFVJ+zsbs4RIghnw/pTs7mZvt8ZHhvm1ZUrR4fykg==", + "dev": true + }, "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", @@ -13992,6 +13321,26 @@ } } }, + "socks": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.2.2.tgz", + "integrity": "sha512-g6wjBnnMOZpE0ym6e0uHSddz9p3a+WsBaaYQaBaSCJYvrC4IXykQR9MNGjLQf38e9iIIhp3b1/Zk8YZI3KGJ0Q==", + "dev": true, + "requires": { + "ip": "^1.1.5", + "smart-buffer": "^4.0.1" + } + }, + "socks-proxy-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-4.0.1.tgz", + "integrity": "sha512-Kezx6/VBguXOsEe5oU3lXYyKMi4+gva72TwJ7pQY5JfqUx2nMk7NXA6z/mpNqIlfQjWYVfeuNvQjexiTaTn6Nw==", + "dev": true, + "requires": { + "agent-base": "~4.2.0", + "socks": "~2.2.0" + } + }, "sol-explore": { "version": "1.6.2", "resolved": "https://registry.npmjs.org/sol-explore/-/sol-explore-1.6.2.tgz", @@ -13999,54 +13348,126 @@ "dev": true }, "solc": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/solc/-/solc-0.4.24.tgz", - "integrity": "sha512-2xd7Cf1HeVwrIb6Bu1cwY2/TaLRodrppCq3l7rhLimFQgmxptXhTC3+/wesVLpB09F1A2kZgvbMOgH7wvhFnBQ==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.5.0.tgz", + "integrity": "sha512-mdLHDl9WeYrN+FIKcMc9PlPfnA9DG9ur5QpCDKcv6VC4RINAsTF4EMuXMZMKoQTvZhtLyJIVH/BZ+KU830Z8Xg==", "dev": true, "requires": { "fs-extra": "^0.30.0", + "keccak": "^1.0.2", "memorystream": "^0.3.1", - "require-from-string": "^1.1.0", - "semver": "^5.3.0", - "yargs": "^4.7.1" + "require-from-string": "^2.0.0", + "semver": "^5.5.0", + "yargs": "^11.0.0" }, "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" } }, - "yargs": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", - "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=", + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { - "cliui": "^3.2.0", + "locate-path": "^2.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "dev": true, + "requires": { + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" + } + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "yargs": { + "version": "11.1.0", + "resolved": "http://registry.npmjs.org/yargs/-/yargs-11.1.0.tgz", + "integrity": "sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A==", + "dev": true, + "requires": { + "cliui": "^4.0.0", "decamelize": "^1.1.1", + "find-up": "^2.1.0", "get-caller-file": "^1.0.1", - "lodash.assign": "^4.0.3", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", + "os-locale": "^2.0.0", "require-directory": "^2.1.1", "require-main-filename": "^1.0.1", "set-blocking": "^2.0.0", - "string-width": "^1.0.1", - "which-module": "^1.0.0", - "window-size": "^0.2.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", "y18n": "^3.2.1", - "yargs-parser": "^2.4.1" + "yargs-parser": "^9.0.2" + } + }, + "yargs-parser": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", + "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "dev": true, + "requires": { + "camelcase": "^4.1.0" } } } @@ -14439,7 +13860,8 @@ "version": "0.3.3", "resolved": "https://registry.npmjs.org/solidity-parser-antlr/-/solidity-parser-antlr-0.3.3.tgz", "integrity": "sha512-RNUc18pjf7DLWs//WF+V+VnvrbetEbNFUYxm2JFbXU62G9WSu+nVyDxV5r+FG4wu8jom17vLdM/3I7bMBGfZ9g==", - "dev": true + "dev": true, + "optional": true }, "solidity-parser-sc": { "version": "0.4.10", @@ -14463,6 +13885,18 @@ "strip-ansi": "^3.0.0" } }, + "which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", + "dev": true + }, + "window-size": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz", + "integrity": "sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU=", + "dev": true + }, "yargs": { "version": "4.8.1", "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", @@ -14534,6 +13968,58 @@ "is-plain-obj": "^1.0.0" } }, + "sorted-object": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/sorted-object/-/sorted-object-2.0.1.tgz", + "integrity": "sha1-fWMfS9OnmKJK8d/8+/6DM3pd9fw=", + "dev": true + }, + "sorted-union-stream": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/sorted-union-stream/-/sorted-union-stream-2.1.3.tgz", + "integrity": "sha1-x3lMfgd4gAUv9xqNSi27Sppjisc=", + "dev": true, + "requires": { + "from2": "^1.3.0", + "stream-iterate": "^1.1.0" + }, + "dependencies": { + "from2": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-1.3.0.tgz", + "integrity": "sha1-iEE7qqX5pZfP3pIh2GmGzTwGHf0=", + "dev": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "~1.1.10" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", @@ -14575,22 +14061,25 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", - "dev": true, "requires": { "spdx-license-ids": "^1.0.2" } }, + "spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "dev": true + }, "spdx-expression-parse": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", - "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=", - "dev": true + "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=" }, "spdx-license-ids": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", - "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=", - "dev": true + "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=" }, "split-string": { "version": "3.1.0", @@ -14622,6 +14111,15 @@ "tweetnacl": "~0.14.0" } }, + "ssri": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", + "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", + "dev": true, + "requires": { + "figgy-pudding": "^3.5.1" + } + }, "static-extend": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", @@ -14646,6 +14144,32 @@ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" }, + "stream-each": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", + "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" + } + }, + "stream-iterate": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/stream-iterate/-/stream-iterate-1.2.0.tgz", + "integrity": "sha1-K9fHcpbBcCpGSIuK1B95hl7s1OE=", + "dev": true, + "requires": { + "readable-stream": "^2.1.5", + "stream-shift": "^1.0.0" + } + }, + "stream-shift": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", + "dev": true + }, "strict-uri-encode": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", @@ -14657,32 +14181,14 @@ "integrity": "sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0=" }, "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "^3.0.0" - } - } + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } }, "string.prototype.trim": { @@ -14735,11 +14241,16 @@ } } }, + "stringify-package": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stringify-package/-/stringify-package-1.0.0.tgz", + "integrity": "sha512-JIQqiWmLiEozOC0b0BtxZ/AOUtdUZHCBPgqIZ2kSJJqGwgb9neo44XdTHUC4HZSGqi03hOeB7W/E8rAlKnGe9g==", + "dev": true + }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, "requires": { "ansi-regex": "^2.0.0" } @@ -15003,7 +14514,6 @@ "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz", "integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==", "dev": true, - "optional": true, "requires": { "chownr": "^1.1.1", "fs-minipass": "^1.2.5", @@ -15131,6 +14641,15 @@ } } }, + "term-size": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", + "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", + "dev": true, + "requires": { + "execa": "^0.7.0" + } + }, "text-encoding": { "version": "0.6.4", "resolved": "http://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", @@ -15214,6 +14733,12 @@ "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" }, + "tiny-relative-date": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/tiny-relative-date/-/tiny-relative-date-1.3.0.tgz", + "integrity": "sha512-MOQHpzllWxDCHHaDno30hhLfbouoYlOI8YlMNtvKe1zXbjEVhbcEovQxvZrPvtiYW630GQDoMMarCnjfyfHA+A==", + "dev": true + }, "tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", @@ -15312,14 +14837,15 @@ "dev": true }, "truffle": { - "version": "4.1.13", - "resolved": "https://registry.npmjs.org/truffle/-/truffle-4.1.13.tgz", - "integrity": "sha1-vydYaYi0/4RWPt+/MrR5QUCKdq0=", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/truffle/-/truffle-5.0.0.tgz", + "integrity": "sha512-la0TJu+E59Ut62i6cGY0sugeubglDqH5w49a7IrpxZ1nnsDqv6qWB3ibiyYiCp/jr+iI0bLtcr3DKkfQjVDd+g==", "dev": true, "requires": { + "app-module-path": "^2.2.0", "mocha": "^4.1.0", "original-require": "1.0.1", - "solc": "0.4.24" + "solc": "0.5.0" } }, "truffle-artifactor": { @@ -15456,7 +14982,7 @@ "integrity": "sha1-PpcwauAk+yThCj11yIQwJWIhUSA=", "dev": true, "requires": { - "bignumber.js": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934", + "bignumber.js": "git+https://github.com/frozeman/bignumber.js-nolookahead.git", "crypto-js": "^3.1.4", "utf8": "^2.1.1", "xhr2": "*", @@ -15497,7 +15023,7 @@ "integrity": "sha512-VU6/DSUX93d1fCzBz7WP/SGCQizO1rKZi4Px9j/3yRyfssHyFcZamMw2/sj4E8TlfMXONvZLoforR8B4bRoyTQ==", "dev": true, "requires": { - "bignumber.js": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934", + "bignumber.js": "git+https://github.com/frozeman/bignumber.js-nolookahead.git", "crypto-js": "^3.1.4", "utf8": "^2.1.1", "xhr2-cookies": "^1.1.0", @@ -15675,6 +15201,12 @@ "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "dev": true }, + "require-from-string": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz", + "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=", + "dev": true + }, "solc": { "version": "0.4.25", "resolved": "https://registry.npmjs.org/solc/-/solc-0.4.25.tgz", @@ -15773,6 +15305,18 @@ "utf8": "2.1.1" } }, + "which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", + "dev": true + }, + "window-size": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz", + "integrity": "sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU=", + "dev": true + }, "yargs": { "version": "4.8.1", "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", @@ -15828,21 +15372,22 @@ } }, "truffle-contract": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/truffle-contract/-/truffle-contract-3.0.6.tgz", - "integrity": "sha1-Lvb8Mtf6r6n0rtjlAAGp/eo0IZI=", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/truffle-contract/-/truffle-contract-3.0.7.tgz", + "integrity": "sha512-av4MTJDP29PI3oVh8TrvRzRHt+nZJH8ODSiil/TfcXrKMSes52DTA5LHj00siLvcadkxUgoEZfEZ04qqhNGoiA==", "dev": true, "requires": { "ethjs-abi": "0.1.8", "truffle-blockchain-utils": "^0.0.5", - "truffle-contract-schema": "^2.0.1", + "truffle-contract-schema": "^2.0.2", "truffle-error": "^0.0.3", "web3": "0.20.6" }, "dependencies": { "bignumber.js": { "version": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934", - "from": "git+https://github.com/frozeman/bignumber.js-nolookahead.git" + "from": "git+https://github.com/frozeman/bignumber.js-nolookahead.git", + "dev": true }, "bn.js": { "version": "4.11.6", @@ -15895,9 +15440,9 @@ "dev": true }, "truffle-contract-schema": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/truffle-contract-schema/-/truffle-contract-schema-2.0.1.tgz", - "integrity": "sha1-m/gh0y4m5nS6FetdQPlrELHJ1Wg=", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/truffle-contract-schema/-/truffle-contract-schema-2.0.2.tgz", + "integrity": "sha512-8mYAu0Y7wgMqcIa612dxiN9pzr6rq2YxZCzPizvqyDq+/rGWy8s0irl/T7i92a/4ME1V5ddNFf3+86uIlYbPUg==", "dev": true, "requires": { "ajv": "^5.1.1", @@ -15907,22 +15452,17 @@ }, "web3": { "version": "0.20.6", - "resolved": "http://registry.npmjs.org/web3/-/web3-0.20.6.tgz", + "resolved": "https://registry.npmjs.org/web3/-/web3-0.20.6.tgz", "integrity": "sha1-PpcwauAk+yThCj11yIQwJWIhUSA=", "dev": true, "requires": { - "bignumber.js": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934", + "bignumber.js": "git+https://github.com/frozeman/bignumber.js-nolookahead.git", "crypto-js": "^3.1.4", "utf8": "^2.1.1", "xhr2": "*", "xmlhttprequest": "*" }, "dependencies": { - "bignumber.js": { - "version": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934", - "from": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934", - "dev": true - }, "crypto-js": { "version": "3.1.8", "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.8.tgz", @@ -16017,36 +15557,33 @@ } }, "truffle-debugger": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/truffle-debugger/-/truffle-debugger-4.0.3.tgz", - "integrity": "sha512-VEPInVFtsZgPDA48Zb0Ulm7HYQ82kBCDRL+U3KmiGnvYP0bX1P1mCv5CTvrxA6a0e9Yc+l/+smoaJqM2XZbtdg==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/truffle-debugger/-/truffle-debugger-4.1.2.tgz", + "integrity": "sha512-/degEidbzjWs9Us9bdvJqqqFV027RoOpL32pV+40F+RsZp51inGHfm76DYrfZSiC9AGB2+gmzOhHwJ4ArmBbfg==", "dev": true, "requires": { - "bignumber.js": "^7.2.1", - "debug": "^3.1.0", + "bn.js": "^4.11.8", + "debug": "^4.1.0", + "fast-levenshtein": "^2.0.6", "json-pointer": "^0.6.0", "redux": "^3.7.2", "redux-cli-logger": "^2.0.1", "redux-saga": "^0.16.0", "remote-redux-devtools": "^0.5.12", "reselect-tree": "^1.2.0", - "truffle-code-utils": "^1.1.1", - "truffle-expect": "^0.0.4", - "truffle-solidity-utils": "^1.1.2", - "web3": "0.20.6", - "web3-eth-abi": "^1.0.0-beta.29" + "truffle-code-utils": "^1.1.3", + "truffle-decode-utils": "^1.0.1", + "truffle-decoder": "^1.0.2", + "truffle-expect": "^0.0.6", + "truffle-solidity-utils": "^1.2.1", + "web3": "^1.0.0-beta.37", + "web3-eth-abi": "^1.0.0-beta.37" }, "dependencies": { - "bignumber.js": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-7.2.1.tgz", - "integrity": "sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ==", - "dev": true - }, "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "requires": { "ms": "^2.1.1" @@ -16058,22 +15595,204 @@ "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "dev": true }, + "truffle-expect": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/truffle-expect/-/truffle-expect-0.0.6.tgz", + "integrity": "sha512-dD8jxrGgnN5NEvHZfC1vSBaNUTT9dsw4Ar026uFQmzYDNuBaIrM6rqgyKKSqYdyWracC0WBZhNqrWTIgeUT+Ng==", + "dev": true + }, + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=", + "dev": true + }, + "utf8": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-2.1.1.tgz", + "integrity": "sha1-LgHbAvfY0JRPdxBPFgnrDDBM92g=", + "dev": true + }, "web3": { - "version": "0.20.6", - "resolved": "http://registry.npmjs.org/web3/-/web3-0.20.6.tgz", - "integrity": "sha1-PpcwauAk+yThCj11yIQwJWIhUSA=", + "version": "1.0.0-beta.37", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.0.0-beta.37.tgz", + "integrity": "sha512-8XLgUspdzicC/xHG82TLrcF/Fxzj2XYNJ1KTYnepOI77bj5rvpsxxwHYBWQ6/JOjk0HkZqoBfnXWgcIHCDhZhQ==", "dev": true, "requires": { - "bignumber.js": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934", - "crypto-js": "^3.1.4", - "utf8": "^2.1.1", - "xhr2": "*", - "xmlhttprequest": "*" + "web3-bzz": "1.0.0-beta.37", + "web3-core": "1.0.0-beta.37", + "web3-eth": "1.0.0-beta.37", + "web3-eth-personal": "1.0.0-beta.37", + "web3-net": "1.0.0-beta.37", + "web3-shh": "1.0.0-beta.37", + "web3-utils": "1.0.0-beta.37" + } + }, + "web3-utils": { + "version": "1.0.0-beta.37", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.0.0-beta.37.tgz", + "integrity": "sha512-kA1fyhO8nKgU21wi30oJQ/ssvu+9srMdjOTKbHYbQe4ATPcr5YNwwrxG3Bcpbu1bEwRUVKHCkqi+wTvcAWBdlQ==", + "dev": true, + "requires": { + "bn.js": "4.11.6", + "eth-lib": "0.1.27", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randomhex": "0.1.5", + "underscore": "1.8.3", + "utf8": "2.1.1" }, "dependencies": { - "bignumber.js": { - "version": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934", - "from": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934", + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=", + "dev": true + } + } + } + } + }, + "truffle-decode-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/truffle-decode-utils/-/truffle-decode-utils-1.0.1.tgz", + "integrity": "sha512-SgAu7C72vy+4J1vG6+OnKSJ7RXjE6ALsJ3JB69HYXciMQKqZJO1SPTaAoyH9vCLXXZAwRtWOUDGguNw3FKEPCQ==", + "dev": true, + "requires": { + "bn.js": "^4.11.8", + "lodash.clonedeep": "^4.5.0", + "web3": "^1.0.0-beta.37" + }, + "dependencies": { + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=", + "dev": true + }, + "utf8": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-2.1.1.tgz", + "integrity": "sha1-LgHbAvfY0JRPdxBPFgnrDDBM92g=", + "dev": true + }, + "web3": { + "version": "1.0.0-beta.37", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.0.0-beta.37.tgz", + "integrity": "sha512-8XLgUspdzicC/xHG82TLrcF/Fxzj2XYNJ1KTYnepOI77bj5rvpsxxwHYBWQ6/JOjk0HkZqoBfnXWgcIHCDhZhQ==", + "dev": true, + "requires": { + "web3-bzz": "1.0.0-beta.37", + "web3-core": "1.0.0-beta.37", + "web3-eth": "1.0.0-beta.37", + "web3-eth-personal": "1.0.0-beta.37", + "web3-net": "1.0.0-beta.37", + "web3-shh": "1.0.0-beta.37", + "web3-utils": "1.0.0-beta.37" + } + }, + "web3-utils": { + "version": "1.0.0-beta.37", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.0.0-beta.37.tgz", + "integrity": "sha512-kA1fyhO8nKgU21wi30oJQ/ssvu+9srMdjOTKbHYbQe4ATPcr5YNwwrxG3Bcpbu1bEwRUVKHCkqi+wTvcAWBdlQ==", + "dev": true, + "requires": { + "bn.js": "4.11.6", + "eth-lib": "0.1.27", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randomhex": "0.1.5", + "underscore": "1.8.3", + "utf8": "2.1.1" + }, + "dependencies": { + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=", + "dev": true + } + } + } + } + }, + "truffle-decoder": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/truffle-decoder/-/truffle-decoder-1.0.2.tgz", + "integrity": "sha512-bQiwi0am2oixFMIH2ADGKhY0t9yiNt7DGeu1Gqg7JLkUtikxLIRnfEYlCeh5AAkT9NyBHHWM2UAjgB55GUSM4A==", + "dev": true, + "requires": { + "abi-decoder": "^1.2.0", + "async-eventemitter": "^0.2.4", + "bn.js": "^4.11.8", + "debug": "^4.1.0", + "lodash.clonedeep": "^4.5.0", + "lodash.merge": "^4.6.1", + "truffle-decode-utils": "^1.0.1", + "web3": "^1.0.0-beta.37" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=", + "dev": true + }, + "utf8": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-2.1.1.tgz", + "integrity": "sha1-LgHbAvfY0JRPdxBPFgnrDDBM92g=", + "dev": true + }, + "web3": { + "version": "1.0.0-beta.37", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.0.0-beta.37.tgz", + "integrity": "sha512-8XLgUspdzicC/xHG82TLrcF/Fxzj2XYNJ1KTYnepOI77bj5rvpsxxwHYBWQ6/JOjk0HkZqoBfnXWgcIHCDhZhQ==", + "dev": true, + "requires": { + "web3-bzz": "1.0.0-beta.37", + "web3-core": "1.0.0-beta.37", + "web3-eth": "1.0.0-beta.37", + "web3-eth-personal": "1.0.0-beta.37", + "web3-net": "1.0.0-beta.37", + "web3-shh": "1.0.0-beta.37", + "web3-utils": "1.0.0-beta.37" + } + }, + "web3-utils": { + "version": "1.0.0-beta.37", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.0.0-beta.37.tgz", + "integrity": "sha512-kA1fyhO8nKgU21wi30oJQ/ssvu+9srMdjOTKbHYbQe4ATPcr5YNwwrxG3Bcpbu1bEwRUVKHCkqi+wTvcAWBdlQ==", + "dev": true, + "requires": { + "bn.js": "4.11.6", + "eth-lib": "0.1.27", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randomhex": "0.1.5", + "underscore": "1.8.3", + "utf8": "2.1.1" + }, + "dependencies": { + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=", "dev": true } } @@ -16102,62 +15821,6 @@ "integrity": "sha1-1bJ63qTFUvQ7cNwAh3I2t7aMdcg=", "dev": true }, - "truffle-flattener": { - "version": "1.2.10", - "resolved": "https://registry.npmjs.org/truffle-flattener/-/truffle-flattener-1.2.10.tgz", - "integrity": "sha512-YZTez8gghcI/87tALjR4tLEX5wztZ6ycazIOJlMerGrcep1I5vOCqwgSYI4HZOyRbBUGLMOnuGckX+oIVhaTaw==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "find-up": "^2.1.0", - "mkdirp": "^0.5.1", - "semver": "^5.4.1", - "solidity-parser-antlr": "^0.3.1", - "truffle-config": "^1.0.6", - "truffle-resolver": "^4.0.4", - "tsort": "0.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, "truffle-init": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/truffle-init/-/truffle-init-1.0.7.tgz", @@ -16294,51 +15957,134 @@ "dev": true }, "truffle-require": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/truffle-require/-/truffle-require-1.0.7.tgz", - "integrity": "sha1-1g1UlUUXh/fIRlb0JWeX0qpsf3w=", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/truffle-require/-/truffle-require-1.0.8.tgz", + "integrity": "sha512-popJo9mCzPta+S3+iD4GDbgFYBDP7o2q7oA26o67ljs0rGdI+XV4SrBSiSa9QWreGeFftafZp9YlkJeQIgkzMg==", "dev": true, "requires": { "original-require": "1.0.1", - "truffle-config": "^1.0.6", + "truffle-config": "^1.0.7", "truffle-expect": "^0.0.4", "web3": "0.20.6" }, "dependencies": { "bignumber.js": { "version": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934", - "from": "git+https://github.com/frozeman/bignumber.js-nolookahead.git" + "from": "git+https://github.com/frozeman/bignumber.js-nolookahead.git", + "dev": true + }, + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=", + "dev": true + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "lodash": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", + "dev": true + }, + "truffle-config": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/truffle-config/-/truffle-config-1.1.2.tgz", + "integrity": "sha512-TfvE5KCTZSXPfEZ8xgs25sOY7uR1xnE52dYPj+arLlaMw1UmMWcIts97HqqK+jVGeKlMPQu2/PwN5m18c+91Fg==", + "dev": true, + "requires": { + "configstore": "^4.0.0", + "find-up": "^2.1.0", + "lodash": "4.17.10", + "original-require": "1.0.1", + "truffle-error": "^0.0.3", + "truffle-provider": "^0.1.2" + } + }, + "truffle-provider": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/truffle-provider/-/truffle-provider-0.1.2.tgz", + "integrity": "sha512-UcHfKydFzZsVyX7uedbNduEU3Po0BlFUI4Sg4jpuLUQUkPZiY8UZkRLAdhBgwjP0W0AEDFtK8VCoffwUxNicQw==", + "dev": true, + "requires": { + "truffle-error": "^0.0.3", + "web3": "^1.0.0-beta.37" + }, + "dependencies": { + "web3": { + "version": "1.0.0-beta.37", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.0.0-beta.37.tgz", + "integrity": "sha512-8XLgUspdzicC/xHG82TLrcF/Fxzj2XYNJ1KTYnepOI77bj5rvpsxxwHYBWQ6/JOjk0HkZqoBfnXWgcIHCDhZhQ==", + "dev": true, + "requires": { + "web3-bzz": "1.0.0-beta.37", + "web3-core": "1.0.0-beta.37", + "web3-eth": "1.0.0-beta.37", + "web3-eth-personal": "1.0.0-beta.37", + "web3-net": "1.0.0-beta.37", + "web3-shh": "1.0.0-beta.37", + "web3-utils": "1.0.0-beta.37" + } + } + } + }, + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=", + "dev": true + }, + "utf8": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-2.1.1.tgz", + "integrity": "sha1-LgHbAvfY0JRPdxBPFgnrDDBM92g=", + "dev": true }, "web3": { "version": "0.20.6", - "resolved": "http://registry.npmjs.org/web3/-/web3-0.20.6.tgz", + "resolved": "https://registry.npmjs.org/web3/-/web3-0.20.6.tgz", "integrity": "sha1-PpcwauAk+yThCj11yIQwJWIhUSA=", "dev": true, "requires": { - "bignumber.js": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934", + "bignumber.js": "git+https://github.com/frozeman/bignumber.js-nolookahead.git", "crypto-js": "^3.1.4", "utf8": "^2.1.1", "xhr2": "*", "xmlhttprequest": "*" - }, - "dependencies": { - "bignumber.js": { - "version": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934", - "from": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934", - "dev": true - } + } + }, + "web3-utils": { + "version": "1.0.0-beta.37", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.0.0-beta.37.tgz", + "integrity": "sha512-kA1fyhO8nKgU21wi30oJQ/ssvu+9srMdjOTKbHYbQe4ATPcr5YNwwrxG3Bcpbu1bEwRUVKHCkqi+wTvcAWBdlQ==", + "dev": true, + "requires": { + "bn.js": "4.11.6", + "eth-lib": "0.1.27", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randomhex": "0.1.5", + "underscore": "1.8.3", + "utf8": "2.1.1" } } } }, "truffle-resolver": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/truffle-resolver/-/truffle-resolver-4.0.4.tgz", - "integrity": "sha1-39mo28pcWHPXeS0UREc9B3Csl9Q=", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/truffle-resolver/-/truffle-resolver-4.0.5.tgz", + "integrity": "sha512-aqPxo+bpL9yjfpSptvkV35WmkceBY4HbQGiUT2Rhx9cttNi0dQnPWL89inpQnBEqr1aLP9LxbZ+sai0PHKAD0w==", "dev": true, "requires": { "async": "2.6.1", - "truffle-contract": "^3.0.6", + "truffle-contract": "^3.0.7", "truffle-expect": "^0.0.4", "truffle-provisioner": "^0.1.1" }, @@ -16497,7 +16243,7 @@ "integrity": "sha1-PpcwauAk+yThCj11yIQwJWIhUSA=", "dev": true, "requires": { - "bignumber.js": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934", + "bignumber.js": "git+https://github.com/frozeman/bignumber.js-nolookahead.git", "crypto-js": "^3.1.4", "utf8": "^2.1.1", "xhr2": "*", @@ -16596,12 +16342,6 @@ "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", "dev": true }, - "tsort": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/tsort/-/tsort-0.0.1.tgz", - "integrity": "sha1-4igPXoF/i/QnVlf9D5rr1E9aJ4Y=", - "dev": true - }, "tunnel": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.2.tgz", @@ -16681,7 +16421,6 @@ "require-directory": "^2.1.1", "require-main-filename": "^1.0.1", "set-blocking": "^2.0.0", - "string-width": "^2.0.0", "which-module": "^2.0.0", "y18n": "^3.2.1", "yargs-parser": "^9.0.2" @@ -16704,7 +16443,8 @@ "lodash": "^4.17.10", "log-symbols": "^2.1.0", "mem-fs": "^1.1.0", - "text-table": "^0.2.0" + "text-table": "^0.2.0", + "untildify": "^3.0.2" } }, "yeoman-generator": { @@ -16766,11 +16506,23 @@ "dev": true, "optional": true }, + "uid-number": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", + "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=", + "dev": true + }, "ultron": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==" }, + "umask": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/umask/-/umask-1.1.0.tgz", + "integrity": "sha1-8pzr8B31F5ErtY/5xOUP3o4zMg0=", + "dev": true + }, "unbzip2-stream": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.3.1.tgz", @@ -16838,6 +16590,24 @@ } } }, + "unique-filename": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", + "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", + "dev": true, + "requires": { + "unique-slug": "^2.0.0" + } + }, + "unique-slug": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.1.tgz", + "integrity": "sha512-n9cU6+gITaVu7VGj1Z8feKMmfAjEAQGhwD9fE3zvpRRa0wEIx8ODYkVGfSc94M2OX00tUFV8wH3zYbm1I8mxFg==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4" + } + }, "unique-string": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", @@ -16860,47 +16630,91 @@ }, "unset-value": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" + }, + "untildify": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-3.0.3.tgz", + "integrity": "sha512-iSk/J8efr8uPT/Z4eSUywnqyrQU7DSdMfdqK4iWEaUVVmcP5JcnpRqmVMwcwcnmI1ATFNgC5V90u09tBynNFKA==" + }, + "unzip-response": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", + "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=", + "dev": true + }, + "update-notifier": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz", + "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", + "dev": true, "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" + "boxen": "^1.2.1", + "chalk": "^2.0.1", + "configstore": "^3.0.0", + "import-lazy": "^2.1.0", + "is-ci": "^1.0.10", + "is-installed-globally": "^0.1.0", + "is-npm": "^1.0.0", + "latest-version": "^3.0.0", + "semver-diff": "^2.0.0", + "xdg-basedir": "^3.0.0" }, "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "requires": { - "isarray": "1.0.0" - } - } + "color-convert": "^1.9.0" } }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + "configstore": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz", + "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", + "dev": true, + "requires": { + "dot-prop": "^4.1.0", + "graceful-fs": "^4.1.2", + "make-dir": "^1.0.0", + "unique-string": "^1.0.0", + "write-file-atomic": "^2.0.0", + "xdg-basedir": "^3.0.0" + } }, - "minimist": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "write-file-atomic": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", + "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } } } }, @@ -16969,14 +16783,19 @@ "utf8": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/utf8/-/utf8-2.1.2.tgz", - "integrity": "sha1-H6DZJw6b6FDZsFAn9jUZv0ZFfZY=", - "dev": true + "integrity": "sha1-H6DZJw6b6FDZsFAn9jUZv0ZFfZY=" }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, + "util-extend": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/util-extend/-/util-extend-1.0.3.tgz", + "integrity": "sha1-p8IW0mdUUWljeztu3GypEZ4v+T8=", + "dev": true + }, "utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", @@ -17006,12 +16825,20 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", - "dev": true, "requires": { "spdx-correct": "~1.0.0", "spdx-expression-parse": "~1.0.0" } }, + "validate-npm-package-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", + "integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=", + "dev": true, + "requires": { + "builtins": "^1.0.3" + } + }, "vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -17085,7 +16912,7 @@ "integrity": "sha1-gewXhBRUkfLqqJVbMcBgSeB8Xn0=", "dev": true, "requires": { - "bignumber.js": "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2", + "bignumber.js": "bignumber.js@git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2", "crypto-js": "^3.1.4", "utf8": "^2.1.1", "xhr2": "*", @@ -17786,9 +17613,9 @@ } }, "ws": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.1.tgz", - "integrity": "sha512-2NkHdPKjDBj3CHdnAGNpmlliryKqF+n9MYXX7/wsVC4yqYocKreKNjydPDvT3wShAZnndlM0RytEfTALCDvz7A==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", + "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==", "dev": true, "requires": { "async-limiter": "~1.0.0" @@ -17833,7 +17660,7 @@ "requires": { "underscore": "1.8.3", "web3-core-helpers": "1.0.0-beta.37", - "websocket": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2" + "websocket": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible" }, "dependencies": { "underscore": { @@ -17856,41 +17683,6 @@ "web3-net": "1.0.0-beta.37" } }, - "web3-utils": { - "version": "1.0.0-beta.34", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.0.0-beta.34.tgz", - "integrity": "sha1-lBH8OarvOcpOBhafdiKX2f8CCXA=", - "dev": true, - "requires": { - "bn.js": "4.11.6", - "eth-lib": "0.1.27", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randomhex": "0.1.5", - "underscore": "1.8.3", - "utf8": "2.1.1" - }, - "dependencies": { - "bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=", - "dev": true - }, - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=", - "dev": true - }, - "utf8": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/utf8/-/utf8-2.1.1.tgz", - "integrity": "sha1-LgHbAvfY0JRPdxBPFgnrDDBM92g=", - "dev": true - } - } - }, "webidl-conversions": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-2.0.1.tgz", @@ -17907,17 +17699,72 @@ "jscodeshift": "^0.4.0" }, "dependencies": { - "ast-types": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.10.1.tgz", - "integrity": "sha512-UY7+9DPzlJ9VM8eY0b2TUZcZvF+1pO0hzMtAyjBYKhOmnvRlqYNYnWdtsMj0V16CGaMlpL0G1jnLbLo4AyotuQ==", - "dev": true + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } }, - "esprima": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", - "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", - "dev": true + "async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "requires": { + "lodash": "^4.17.10" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "requires": { + "locate-path": "^2.0.0" + } + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } }, "jscodeshift": { "version": "0.4.1", @@ -17940,26 +17787,113 @@ "recast": "^0.12.5", "temp": "^0.8.1", "write-file-atomic": "^1.2.0" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + } } }, - "recast": { - "version": "0.12.9", - "resolved": "https://registry.npmjs.org/recast/-/recast-0.12.9.tgz", - "integrity": "sha512-y7ANxCWmMW8xLOaiopiRDlyjQ9ajKRENBH+2wjntIbk3A6ZR1+BLQttkmSHMY7Arl+AAZFwJ10grg2T6f1WI8A==", - "dev": true, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", "requires": { - "ast-types": "0.10.1", - "core-js": "^2.4.1", - "esprima": "~4.0.0", - "private": "~0.1.5", - "source-map": "~0.6.1" + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" } }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "read-pkg-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^3.0.0" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "requires": { + "glob": "^7.1.3" + } + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" + }, + "shelljs": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz", + "integrity": "sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==", + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } } } }, @@ -18174,7 +18108,8 @@ "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true }, "is-observable": { "version": "1.1.0", @@ -18350,6 +18285,16 @@ "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", "dev": true }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -18457,18 +18402,17 @@ } }, "which": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", - "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", - "dev": true, + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "requires": { "isexe": "^2.0.0" } }, "which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, "wide-align": { @@ -18476,7 +18420,6 @@ "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", "dev": true, - "optional": true, "requires": { "string-width": "^1.0.2" }, @@ -18486,7 +18429,6 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -18495,11 +18437,54 @@ } } }, + "widest-line": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.1.tgz", + "integrity": "sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA==", + "dev": true, + "requires": { + "string-width": "^2.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, "window-size": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz", - "integrity": "sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU=", - "dev": true + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "dev": true, + "optional": true }, "wordwrap": { "version": "1.0.0", @@ -18507,11 +18492,30 @@ "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", "dev": true }, + "worker-farm": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.6.0.tgz", + "integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==", + "dev": true, + "requires": { + "errno": "~0.1.7" + }, + "dependencies": { + "errno": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", + "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "dev": true, + "requires": { + "prr": "~1.0.1" + } + } + } + }, "wrap-ansi": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "dev": true, "requires": { "string-width": "^1.0.1", "strip-ansi": "^3.0.1" @@ -18521,7 +18525,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -18619,8 +18622,7 @@ "xhr2": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/xhr2/-/xhr2-0.1.4.tgz", - "integrity": "sha1-f4dliEdxbbUCYyOBL4GMras4el8=", - "dev": true + "integrity": "sha1-f4dliEdxbbUCYyOBL4GMras4el8=" }, "xhr2-cookies": { "version": "1.1.0", @@ -18641,8 +18643,7 @@ "xmlhttprequest": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", - "integrity": "sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw=", - "dev": true + "integrity": "sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw=" }, "xtend": { "version": "4.0.1", @@ -18679,6 +18680,11 @@ "window-size": "0.1.0" }, "dependencies": { + "bignumber.js": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-7.2.1.tgz", + "integrity": "sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ==" + }, "camelcase": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", @@ -18686,6 +18692,15 @@ "dev": true, "optional": true }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, "cliui": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", @@ -18698,12 +18713,31 @@ "wordwrap": "0.0.2" } }, - "window-size": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", - "dev": true, - "optional": true + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } }, "wordwrap": { "version": "0.0.2", @@ -18718,7 +18752,6 @@ "version": "2.4.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=", - "dev": true, "requires": { "camelcase": "^3.0.0", "lodash.assign": "^4.0.6" @@ -18758,9 +18791,9 @@ }, "dependencies": { "ansi-regex": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.0.0.tgz", - "integrity": "sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, "ansi-styles": { @@ -18873,6 +18906,12 @@ "through": "^2.3.6" }, "dependencies": { + "ansi-regex": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.0.0.tgz", + "integrity": "sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w==", + "dev": true + }, "strip-ansi": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.0.0.tgz", @@ -18884,6 +18923,12 @@ } } }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, "ms": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", @@ -18911,6 +18956,16 @@ "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", "dev": true }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -18918,14 +18973,6 @@ "dev": true, "requires": { "ansi-regex": "^3.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - } } }, "supports-color": { @@ -18936,12 +18983,6 @@ "requires": { "has-flag": "^3.0.0" } - }, - "untildify": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/untildify/-/untildify-3.0.3.tgz", - "integrity": "sha512-iSk/J8efr8uPT/Z4eSUywnqyrQU7DSdMfdqK4iWEaUVVmcP5JcnpRqmVMwcwcnmI1ATFNgC5V90u09tBynNFKA==", - "dev": true } } }, @@ -19471,12 +19512,207 @@ "read-pkg": "^2.0.0" } }, + "require-from-string": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz", + "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=", + "dev": true + }, "semver": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", "dev": true }, + "solc": { + "version": "0.4.25", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.4.25.tgz", + "integrity": "sha512-jU1YygRVy6zatgXrLY2rRm7HW1d7a8CkkEgNJwvH2VLpWhMFsMdWcJn6kUqZwcSz/Vm+w89dy7Z/aB5p6AFTrg==", + "dev": true, + "requires": { + "fs-extra": "^0.30.0", + "memorystream": "^0.3.1", + "require-from-string": "^1.1.0", + "semver": "^5.3.0", + "yargs": "^4.7.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "fs-extra": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0", + "klaw": "^1.0.0", + "path-is-absolute": "^1.0.0", + "rimraf": "^2.2.8" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "jsonfile": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "dev": true, + "requires": { + "lcid": "^1.0.0" + } + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + }, + "which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", + "dev": true + }, + "yargs": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", + "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=", + "dev": true, + "requires": { + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "lodash.assign": "^4.0.3", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.1", + "which-module": "^1.0.0", + "window-size": "^0.2.0", + "y18n": "^3.2.1", + "yargs-parser": "^2.4.1" + } + }, + "yargs-parser": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", + "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=", + "dev": true, + "requires": { + "camelcase": "^3.0.0", + "lodash.assign": "^4.0.6" + } + } + } + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -19527,6 +19763,91 @@ "has-flag": "^3.0.0" } }, + "truffle": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/truffle/-/truffle-4.1.15.tgz", + "integrity": "sha512-6gaNn9ZjvNjdalJMF/qEDUDoRdieKfdYcyFVpVxd+ogAta5kgJxI3XlEmS79Ih0vBhb00tKa9rBweVJ5892sYg==", + "dev": true, + "requires": { + "mocha": "^4.1.0", + "original-require": "1.0.1", + "solc": "0.4.25" + }, + "dependencies": { + "browser-stdout": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz", + "integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=", + "dev": true + }, + "commander": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", + "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", + "dev": true + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "diff": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.3.1.tgz", + "integrity": "sha512-MKPHZDMB0o6yHyDryUOScqZibp914ksXwAMYMTHj6KO8UeKsRYNJD3oNCKjTqZon+V488P7N/HzXF8t7ZR95ww==", + "dev": true + }, + "growl": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.3.tgz", + "integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==", + "dev": true + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "mocha": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-4.1.0.tgz", + "integrity": "sha512-0RVnjg1HJsXY2YFDoTNzcc1NKhYuXKRrBAG2gDygmJJA136Cs2QlRliZG1mA0ap7cuaT30mw16luAeln+4RiNA==", + "dev": true, + "requires": { + "browser-stdout": "1.3.0", + "commander": "2.11.0", + "debug": "3.1.0", + "diff": "3.3.1", + "escape-string-regexp": "1.0.5", + "glob": "7.1.2", + "growl": "1.10.3", + "he": "1.1.1", + "mkdirp": "0.5.1", + "supports-color": "4.4.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "supports-color": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", + "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "dev": true, + "requires": { + "has-flag": "^2.0.0" + } + } + } + }, "truffle-core": { "version": "4.1.14", "resolved": "https://registry.npmjs.org/truffle-core/-/truffle-core-4.1.14.tgz", @@ -19615,6 +19936,12 @@ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, + "window-size": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz", + "integrity": "sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU=", + "dev": true + }, "yargs": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz", @@ -19649,80 +19976,12 @@ }, "zos-lib": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/zos-lib/-/zos-lib-2.1.0.tgz", - "integrity": "sha512-HLjo31UKwjj1hbdyXuG7JM/UKVx/cmUh5BG9usguIrpueVDUWS60x/+k8JtVPv6214TLQTfZ/UJRReuDmMrnGQ==", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { - "axios": "^0.18.0", - "bignumber.js": "^7.2.0", - "chalk": "^2.4.1", - "ethereumjs-abi": "^0.6.5", - "glob": "^7.1.3", - "openzeppelin-solidity": "~1.10.0", - "semver": "^5.5.1", - "truffle-config": "1.0.6", - "truffle-contract": "3.0.6", - "truffle-flattener": "^1.2.8", - "truffle-provider": "0.0.6", - "truffle-provisioner": "0.1.1", - "web3": "^0.18.4" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "bignumber.js": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-7.2.1.tgz", - "integrity": "sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ==", - "dev": true - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "semver": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", - "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" } } } diff --git a/package.json b/package.json index 0870a7577..2caf727cd 100644 --- a/package.json +++ b/package.json @@ -1,17 +1,17 @@ { "name": "openzeppelin-eth", - "version": "2.1.1", + "version": "2.1.2", "description": "Secure Smart Contract library for Solidity", "files": [ "build", "contracts", - "test", + "test/behaviors", "zos.json", "zos.*.json" ], "scripts": { "build": "scripts/build.sh", - "compile": "scripts/compile.sh", + "compile": "truffle compile", "console": "truffle console", "coverage": "scripts/coverage.sh", "lint": "npm run lint:js && npm run lint:sol", @@ -43,7 +43,6 @@ "homepage": "https://github.com/OpenZeppelin/openzeppelin-eth", "devDependencies": { "chai": "^4.1.2", - "chai-bignumber": "^2.0.2", "coveralls": "^3.0.1", "eslint": "^4.19.1", "eslint-config-standard": "^10.2.1", @@ -56,11 +55,11 @@ "ethjs-abi": "^0.2.1", "ganache-cli": "6.1.8", "npm-install-peers": "^1.2.1", + "openzeppelin-test-helpers": "^0.1.1", "pify": "^4.0.1", "solhint": "^1.5.0", "solidity-coverage": "^0.5.4", - "truffle": "^4.1.13", - "web3-utils": "^1.0.0-beta.34", + "truffle": "^5.0.0", "zos": "^2.0.0", "zos-lib": "^2.1.0" }, diff --git a/scripts/compile.sh b/scripts/compile.sh deleted file mode 100755 index d037daac5..000000000 --- a/scripts/compile.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env bash - -# Configure to exit script as soon as a command fails. -set -o errexit - -SOLC_05_DIR=solc-0.5 - -# Delete any previous build artifacts -rm -rf build/ - -# Create a subproject where 0.5.x compilation will take place -mkdir -p "$SOLC_05_DIR" - -cd "$SOLC_05_DIR" -echo '{ "private": true }' > package.json -npm install --save-dev truffle@5.0.0 - -rm -rf contracts -ln --symbolic ../contracts contracts - -# Delete any previous build artifacts -rm -rf build/ - -# Compile -echo " -module.exports = { - compilers: { - solc: { - version: \"0.5.0\", - }, - }, -}; -" > truffle-config.js - -npx truffle compile - -# Modify the paths in the artifacts to make it look as if they were built in the root -sed --in-place --expression "s/\/$SOLC_05_DIR//g" build/contracts/*.json - -# Copy them back into the root -cd .. -cp --recursive "$SOLC_05_DIR"/build build diff --git a/test/access/Roles.test.js b/test/access/Roles.test.js index 15fffec34..1f97cd02b 100644 --- a/test/access/Roles.test.js +++ b/test/access/Roles.test.js @@ -1,10 +1,8 @@ -const shouldFail = require('../helpers/shouldFail'); -const { ZERO_ADDRESS } = require('../helpers/constants'); +const { shouldFail, constants } = require('openzeppelin-test-helpers'); +const { ZERO_ADDRESS } = constants; const RolesMock = artifacts.require('RolesMock'); -require('./../helpers/setup'); - contract('Roles', function ([_, authorized, otherAuthorized, anyone]) { beforeEach(async function () { this.roles = await RolesMock.new(); diff --git a/test/access/roles/CapperRole.test.js b/test/access/roles/CapperRole.test.js index a79944a27..66722fe50 100644 --- a/test/access/roles/CapperRole.test.js +++ b/test/access/roles/CapperRole.test.js @@ -1,4 +1,4 @@ -const { shouldBehaveLikePublicRole } = require('../../access/roles/PublicRole.behavior'); +const { shouldBehaveLikePublicRole } = require('../../behaviors/access/roles/PublicRole.behavior'); const CapperRoleMock = artifacts.require('CapperRoleMock'); contract('CapperRole', function ([_, capper, otherCapper, ...otherAccounts]) { diff --git a/test/access/roles/MinterRole.test.js b/test/access/roles/MinterRole.test.js index b2e70b53a..54d1c0fe5 100644 --- a/test/access/roles/MinterRole.test.js +++ b/test/access/roles/MinterRole.test.js @@ -1,4 +1,4 @@ -const { shouldBehaveLikePublicRole } = require('../../access/roles/PublicRole.behavior'); +const { shouldBehaveLikePublicRole } = require('../../behaviors/access/roles/PublicRole.behavior'); const MinterRoleMock = artifacts.require('MinterRoleMock'); contract('MinterRole', function ([_, minter, otherMinter, ...otherAccounts]) { diff --git a/test/access/roles/PauserRole.test.js b/test/access/roles/PauserRole.test.js index 927e46c0b..275bf9fce 100644 --- a/test/access/roles/PauserRole.test.js +++ b/test/access/roles/PauserRole.test.js @@ -1,4 +1,4 @@ -const { shouldBehaveLikePublicRole } = require('../../access/roles/PublicRole.behavior'); +const { shouldBehaveLikePublicRole } = require('../../behaviors/access/roles/PublicRole.behavior'); const PauserRoleMock = artifacts.require('PauserRoleMock'); contract('PauserRole', function ([_, pauser, otherPauser, ...otherAccounts]) { diff --git a/test/access/roles/SignerRole.test.js b/test/access/roles/SignerRole.test.js index 317c100d7..184929453 100644 --- a/test/access/roles/SignerRole.test.js +++ b/test/access/roles/SignerRole.test.js @@ -1,4 +1,4 @@ -const { shouldBehaveLikePublicRole } = require('../../access/roles/PublicRole.behavior'); +const { shouldBehaveLikePublicRole } = require('../../behaviors/access/roles/PublicRole.behavior'); const SignerRoleMock = artifacts.require('SignerRoleMock'); contract('SignerRole', function ([_, signer, otherSigner, ...otherAccounts]) { diff --git a/test/access/roles/WhitelistAdminRole.test.js b/test/access/roles/WhitelistAdminRole.test.js index e59dcd895..d757262f2 100644 --- a/test/access/roles/WhitelistAdminRole.test.js +++ b/test/access/roles/WhitelistAdminRole.test.js @@ -1,4 +1,4 @@ -const { shouldBehaveLikePublicRole } = require('../../access/roles/PublicRole.behavior'); +const { shouldBehaveLikePublicRole } = require('../../behaviors/access/roles/PublicRole.behavior'); const WhitelistAdminRoleMock = artifacts.require('WhitelistAdminRoleMock'); contract('WhitelistAdminRole', function ([_, whitelistAdmin, otherWhitelistAdmin, ...otherAccounts]) { diff --git a/test/access/roles/WhitelistedRole.test.js b/test/access/roles/WhitelistedRole.test.js index e578f6fa2..ee566ff44 100644 --- a/test/access/roles/WhitelistedRole.test.js +++ b/test/access/roles/WhitelistedRole.test.js @@ -1,4 +1,4 @@ -const { shouldBehaveLikePublicRole } = require('../../access/roles/PublicRole.behavior'); +const { shouldBehaveLikePublicRole } = require('../../behaviors/access/roles/PublicRole.behavior'); const WhitelistedRoleMock = artifacts.require('WhitelistedRoleMock'); contract('WhitelistedRole', function ([_, whitelisted, otherWhitelisted, whitelistAdmin, ...otherAccounts]) { diff --git a/test/access/roles/PublicRole.behavior.js b/test/behaviors/access/roles/PublicRole.behavior.js similarity index 82% rename from test/access/roles/PublicRole.behavior.js rename to test/behaviors/access/roles/PublicRole.behavior.js index d558c1300..3a673e6a0 100644 --- a/test/access/roles/PublicRole.behavior.js +++ b/test/behaviors/access/roles/PublicRole.behavior.js @@ -1,13 +1,25 @@ -const shouldFail = require('../../helpers/shouldFail'); -const { ZERO_ADDRESS } = require('../../helpers/constants'); -const expectEvent = require('../../helpers/expectEvent'); - -require('../../helpers/setup'); +const { shouldFail, constants, expectEvent } = require('openzeppelin-test-helpers'); +const { ZERO_ADDRESS } = constants; function capitalize (str) { return str.replace(/\b\w/g, l => l.toUpperCase()); } +// Tests that a role complies with the standard role interface, that is: +// * an onlyRole modifier +// * an isRole function +// * an addRole function, accessible to role havers +// * a renounceRole function +// * roleAdded and roleRemoved events +// Both the modifier and an additional internal remove function are tested through a mock contract that exposes them. +// This mock contract should be stored in this.contract. +// +// @param authorized an account that has the role +// @param otherAuthorized another account that also has the role +// @param anyone an account that doesn't have the role, passed inside an array for ergonomics +// @param rolename a string with the name of the role +// @param manager undefined for regular roles, or a manager account for managed roles. In these, only the manager +// account can create and remove new role bearers. function shouldBehaveLikePublicRole (authorized, otherAuthorized, [anyone], rolename, manager) { rolename = capitalize(rolename); diff --git a/test/crowdsale/AllowanceCrowdsale.test.js b/test/crowdsale/AllowanceCrowdsale.test.js index 70276fe7a..ca8f79cdc 100644 --- a/test/crowdsale/AllowanceCrowdsale.test.js +++ b/test/crowdsale/AllowanceCrowdsale.test.js @@ -1,19 +1,14 @@ -const expectEvent = require('../helpers/expectEvent'); -const { ether } = require('../helpers/ether'); -const shouldFail = require('../helpers/shouldFail'); -const { balanceDifference } = require('../helpers/balanceDifference'); -const { ZERO_ADDRESS } = require('../helpers/constants'); - -const { BigNumber } = require('../helpers/setup'); +const { balance, BN, constants, ether, expectEvent, shouldFail } = require('openzeppelin-test-helpers'); +const { ZERO_ADDRESS } = constants; const AllowanceCrowdsaleImpl = artifacts.require('AllowanceCrowdsaleImpl'); const SimpleToken = artifacts.require('SimpleTokenMock'); contract('AllowanceCrowdsale', function ([_, investor, wallet, purchaser, tokenWallet]) { - const rate = new BigNumber(1); - const value = ether(0.42); + const rate = new BN('1'); + const value = ether('0.42'); const expectedTokenAmount = rate.mul(value); - const tokenAllowance = new BigNumber('1e22'); + const tokenAllowance = new BN('10').pow(new BN('22')); beforeEach(async function () { this.token = await SimpleToken.new({ from: tokenWallet }); @@ -52,7 +47,7 @@ contract('AllowanceCrowdsale', function ([_, investor, wallet, purchaser, tokenW }); it('should forward funds to wallet', async function () { - (await balanceDifference(wallet, () => + (await balance.difference(wallet, () => this.crowdsale.sendTransaction({ value, from: investor })) ).should.be.bignumber.equal(value); }); @@ -60,7 +55,7 @@ contract('AllowanceCrowdsale', function ([_, investor, wallet, purchaser, tokenW describe('check remaining allowance', function () { it('should report correct allowace left', async function () { - const remainingAllowance = tokenAllowance - expectedTokenAmount; + const remainingAllowance = tokenAllowance.sub(expectedTokenAmount); await this.crowdsale.buyTokens(investor, { value: value, from: purchaser }); (await this.crowdsale.remainingTokens()).should.be.bignumber.equal(remainingAllowance); }); @@ -68,7 +63,7 @@ contract('AllowanceCrowdsale', function ([_, investor, wallet, purchaser, tokenW context('when the allowance is larger than the token amount', function () { beforeEach(async function () { const amount = await this.token.balanceOf(tokenWallet); - await this.token.approve(this.crowdsale.address, amount.plus(1), { from: tokenWallet }); + await this.token.approve(this.crowdsale.address, amount.addn(1), { from: tokenWallet }); }); it('should report the amount instead of the allowance', async function () { diff --git a/test/crowdsale/CappedCrowdsale.test.js b/test/crowdsale/CappedCrowdsale.test.js index 92480b513..dcae269f4 100644 --- a/test/crowdsale/CappedCrowdsale.test.js +++ b/test/crowdsale/CappedCrowdsale.test.js @@ -1,16 +1,13 @@ -const { ether } = require('../helpers/ether'); -const shouldFail = require('../helpers/shouldFail'); - -const { BigNumber } = require('../helpers/setup'); +const { BN, ether, shouldFail } = require('openzeppelin-test-helpers'); const CappedCrowdsaleImpl = artifacts.require('CappedCrowdsaleImpl'); const SimpleToken = artifacts.require('SimpleTokenMock'); contract('CappedCrowdsale', function ([_, wallet]) { - const rate = new BigNumber(1); - const cap = ether(100); - const lessThanCap = ether(60); - const tokenSupply = new BigNumber('1e22'); + const rate = new BN('1'); + const cap = ether('100'); + const lessThanCap = ether('60'); + const tokenSupply = new BN('10').pow(new BN('22')); beforeEach(async function () { this.token = await SimpleToken.new(); @@ -28,7 +25,7 @@ contract('CappedCrowdsale', function ([_, wallet]) { describe('accepting payments', function () { it('should accept payments within cap', async function () { - await this.crowdsale.send(cap.minus(lessThanCap)); + await this.crowdsale.send(cap.sub(lessThanCap)); await this.crowdsale.send(lessThanCap); }); @@ -38,7 +35,7 @@ contract('CappedCrowdsale', function ([_, wallet]) { }); it('should reject payments that exceed cap', async function () { - await shouldFail.reverting(this.crowdsale.send(cap.plus(1))); + await shouldFail.reverting(this.crowdsale.send(cap.addn(1))); }); }); @@ -49,7 +46,7 @@ contract('CappedCrowdsale', function ([_, wallet]) { }); it('should not reach cap if sent just under cap', async function () { - await this.crowdsale.send(cap.minus(1)); + await this.crowdsale.send(cap.subn(1)); (await this.crowdsale.capReached()).should.equal(false); }); diff --git a/test/crowdsale/Crowdsale.test.js b/test/crowdsale/Crowdsale.test.js index 307939071..12ffe7950 100644 --- a/test/crowdsale/Crowdsale.test.js +++ b/test/crowdsale/Crowdsale.test.js @@ -1,18 +1,13 @@ -const expectEvent = require('../helpers/expectEvent'); -const shouldFail = require('../helpers/shouldFail'); -const { balanceDifference } = require('../helpers/balanceDifference'); -const { ether } = require('../helpers/ether'); -const { ZERO_ADDRESS } = require('../helpers/constants'); - -const { BigNumber } = require('../helpers/setup'); +const { balance, BN, constants, ether, expectEvent, shouldFail } = require('openzeppelin-test-helpers'); +const { ZERO_ADDRESS } = constants; const Crowdsale = artifacts.require('CrowdsaleMock'); const SimpleToken = artifacts.require('SimpleTokenMock'); contract('Crowdsale', function ([_, investor, wallet, purchaser]) { - const rate = new BigNumber(1); - const value = ether(42); - const tokenSupply = new BigNumber('1e22'); + const rate = new BN(1); + const value = ether('42'); + const tokenSupply = new BN('10').pow(new BN('22')); const expectedTokenAmount = rate.mul(value); it('requires a non-null token', async function () { @@ -93,7 +88,7 @@ contract('Crowdsale', function ([_, investor, wallet, purchaser]) { }); it('should forward funds to wallet', async function () { - (await balanceDifference(wallet, () => + (await balance.difference(wallet, () => this.crowdsale.sendTransaction({ value, from: investor })) ).should.be.bignumber.equal(value); }); @@ -116,7 +111,7 @@ contract('Crowdsale', function ([_, investor, wallet, purchaser]) { }); it('should forward funds to wallet', async function () { - (await balanceDifference(wallet, () => + (await balance.difference(wallet, () => this.crowdsale.buyTokens(investor, { value, from: purchaser })) ).should.be.bignumber.equal(value); }); diff --git a/test/crowdsale/FinalizableCrowdsale.test.js b/test/crowdsale/FinalizableCrowdsale.test.js index 778dbcb98..8a0786bc4 100644 --- a/test/crowdsale/FinalizableCrowdsale.test.js +++ b/test/crowdsale/FinalizableCrowdsale.test.js @@ -1,14 +1,10 @@ -const expectEvent = require('../helpers/expectEvent'); -const time = require('../helpers/time'); -const shouldFail = require('../helpers/shouldFail'); - -const { BigNumber } = require('../helpers/setup'); +const { BN, expectEvent, shouldFail, time } = require('openzeppelin-test-helpers'); const FinalizableCrowdsaleImpl = artifacts.require('FinalizableCrowdsaleImpl'); const ERC20 = artifacts.require('ERC20'); contract('FinalizableCrowdsale', function ([_, wallet, anyone]) { - const rate = new BigNumber(1000); + const rate = new BN('1000'); before(async function () { // Advance to the next block to correctly read time in the solidity "now" function interpreted by ganache @@ -16,9 +12,9 @@ contract('FinalizableCrowdsale', function ([_, wallet, anyone]) { }); beforeEach(async function () { - this.openingTime = (await time.latest()) + time.duration.weeks(1); - this.closingTime = this.openingTime + time.duration.weeks(1); - this.afterClosingTime = this.closingTime + time.duration.seconds(1); + this.openingTime = (await time.latest()).add(time.duration.weeks(1)); + this.closingTime = this.openingTime.add(time.duration.weeks(1)); + this.afterClosingTime = this.closingTime.add(time.duration.seconds(1)); this.token = await ERC20.new(); this.crowdsale = await FinalizableCrowdsaleImpl.new( diff --git a/test/crowdsale/IncreasingPriceCrowdsale.test.js b/test/crowdsale/IncreasingPriceCrowdsale.test.js index 1c70465c5..baae4a77f 100644 --- a/test/crowdsale/IncreasingPriceCrowdsale.test.js +++ b/test/crowdsale/IncreasingPriceCrowdsale.test.js @@ -1,37 +1,33 @@ -const { ether } = require('../helpers/ether'); -const time = require('../helpers/time'); -const shouldFail = require('../helpers/shouldFail'); - -const { BigNumber } = require('../helpers/setup'); +const { BN, ether, shouldFail, time } = require('openzeppelin-test-helpers'); const IncreasingPriceCrowdsaleImpl = artifacts.require('IncreasingPriceCrowdsaleImpl'); const SimpleToken = artifacts.require('SimpleTokenMock'); contract('IncreasingPriceCrowdsale', function ([_, investor, wallet, purchaser]) { - const value = ether(1); - const tokenSupply = new BigNumber('1e22'); + const value = ether('1'); + const tokenSupply = new BN('10').pow(new BN('22')); describe('rate during crowdsale should change at a fixed step every block', async function () { - const initialRate = new BigNumber(9166); - const finalRate = new BigNumber(5500); - const rateAtTime150 = new BigNumber(9166); - const rateAtTime300 = new BigNumber(9165); - const rateAtTime1500 = new BigNumber(9157); - const rateAtTime30 = new BigNumber(9166); - const rateAtTime150000 = new BigNumber(8257); - const rateAtTime450000 = new BigNumber(6439); + const initialRate = new BN('9166'); + const finalRate = new BN('5500'); + const rateAtTime150 = new BN('9166'); + const rateAtTime300 = new BN('9165'); + const rateAtTime1500 = new BN('9157'); + const rateAtTime30 = new BN('9166'); + const rateAtTime150000 = new BN('8257'); + const rateAtTime450000 = new BN('6439'); beforeEach(async function () { await time.advanceBlock(); - this.startTime = (await time.latest()) + time.duration.weeks(1); - this.closingTime = this.startTime + time.duration.weeks(1); - this.afterClosingTime = this.closingTime + time.duration.seconds(1); + this.startTime = (await time.latest()).add(time.duration.weeks(1)); + this.closingTime = this.startTime.add(time.duration.weeks(1)); + this.afterClosingTime = this.closingTime.add(time.duration.seconds(1)); this.token = await SimpleToken.new(); }); it('reverts with a final rate larger than the initial rate', async function () { await shouldFail.reverting(IncreasingPriceCrowdsaleImpl.new( - this.startTime, this.closingTime, wallet, this.token.address, initialRate, initialRate.plus(1) + this.startTime, this.closingTime, wallet, this.token.address, initialRate, initialRate.addn(1) )); }); @@ -65,12 +61,12 @@ contract('IncreasingPriceCrowdsale', function ([_, investor, wallet, purchaser]) }); it('returns a rate of 0 before the crowdsale starts', async function () { - (await this.crowdsale.getCurrentRate()).should.be.bignumber.equal(0); + (await this.crowdsale.getCurrentRate()).should.be.bignumber.equal('0'); }); it('returns a rate of 0 after the crowdsale ends', async function () { await time.increaseTo(this.afterClosingTime); - (await this.crowdsale.getCurrentRate()).should.be.bignumber.equal(0); + (await this.crowdsale.getCurrentRate()).should.be.bignumber.equal('0'); }); it('at start', async function () { @@ -80,37 +76,37 @@ contract('IncreasingPriceCrowdsale', function ([_, investor, wallet, purchaser]) }); it('at time 150', async function () { - await time.increaseTo(this.startTime + 150); + await time.increaseTo(this.startTime.addn(150)); await this.crowdsale.buyTokens(investor, { value, from: purchaser }); (await this.token.balanceOf(investor)).should.be.bignumber.equal(value.mul(rateAtTime150)); }); it('at time 300', async function () { - await time.increaseTo(this.startTime + 300); + await time.increaseTo(this.startTime.addn(300)); await this.crowdsale.buyTokens(investor, { value, from: purchaser }); (await this.token.balanceOf(investor)).should.be.bignumber.equal(value.mul(rateAtTime300)); }); it('at time 1500', async function () { - await time.increaseTo(this.startTime + 1500); + await time.increaseTo(this.startTime.addn(1500)); await this.crowdsale.buyTokens(investor, { value, from: purchaser }); (await this.token.balanceOf(investor)).should.be.bignumber.equal(value.mul(rateAtTime1500)); }); it('at time 30', async function () { - await time.increaseTo(this.startTime + 30); + await time.increaseTo(this.startTime.addn(30)); await this.crowdsale.buyTokens(investor, { value, from: purchaser }); (await this.token.balanceOf(investor)).should.be.bignumber.equal(value.mul(rateAtTime30)); }); it('at time 150000', async function () { - await time.increaseTo(this.startTime + 150000); + await time.increaseTo(this.startTime.addn(150000)); await this.crowdsale.buyTokens(investor, { value, from: purchaser }); (await this.token.balanceOf(investor)).should.be.bignumber.equal(value.mul(rateAtTime150000)); }); it('at time 450000', async function () { - await time.increaseTo(this.startTime + 450000); + await time.increaseTo(this.startTime.addn(450000)); await this.crowdsale.buyTokens(investor, { value, from: purchaser }); (await this.token.balanceOf(investor)).should.be.bignumber.equal(value.mul(rateAtTime450000)); }); diff --git a/test/crowdsale/IndividuallyCappedCrowdsale.test.js b/test/crowdsale/IndividuallyCappedCrowdsale.test.js index c3e772cc3..9a82fa82a 100644 --- a/test/crowdsale/IndividuallyCappedCrowdsale.test.js +++ b/test/crowdsale/IndividuallyCappedCrowdsale.test.js @@ -1,20 +1,17 @@ -const { ether } = require('../helpers/ether'); -const shouldFail = require('../helpers/shouldFail'); - -const { BigNumber } = require('../helpers/setup'); +const { BN, ether, shouldFail } = require('openzeppelin-test-helpers'); const IndividuallyCappedCrowdsaleImpl = artifacts.require('IndividuallyCappedCrowdsaleImpl'); const SimpleToken = artifacts.require('SimpleTokenMock'); -const { shouldBehaveLikePublicRole } = require('../access/roles/PublicRole.behavior'); +const { shouldBehaveLikePublicRole } = require('../behaviors/access/roles/PublicRole.behavior'); contract('IndividuallyCappedCrowdsale', function ( [_, capper, otherCapper, wallet, alice, bob, charlie, anyone, ...otherAccounts]) { - const rate = new BigNumber(1); - const capAlice = ether(10); - const capBob = ether(2); - const lessThanCapAlice = ether(6); - const lessThanCapBoth = ether(1); - const tokenSupply = new BigNumber('1e22'); + const rate = new BN(1); + const capAlice = ether('10'); + const capBob = ether('2'); + const lessThanCapAlice = ether('6'); + const lessThanCapBoth = ether('1'); + const tokenSupply = new BN('10').pow(new BN('22')); beforeEach(async function () { this.token = await SimpleToken.new(); @@ -59,8 +56,8 @@ contract('IndividuallyCappedCrowdsale', function ( }); it('should reject payments that exceed cap', async function () { - await shouldFail.reverting(this.crowdsale.buyTokens(alice, { value: capAlice.plus(1) })); - await shouldFail.reverting(this.crowdsale.buyTokens(bob, { value: capBob.plus(1) })); + await shouldFail.reverting(this.crowdsale.buyTokens(alice, { value: capAlice.addn(1) })); + await shouldFail.reverting(this.crowdsale.buyTokens(bob, { value: capBob.addn(1) })); }); it('should manage independent caps', async function () { diff --git a/test/crowdsale/MintedCrowdsale.behavior.js b/test/crowdsale/MintedCrowdsale.behavior.js index ec41e4948..75bceb3f5 100644 --- a/test/crowdsale/MintedCrowdsale.behavior.js +++ b/test/crowdsale/MintedCrowdsale.behavior.js @@ -1,7 +1,4 @@ -const expectEvent = require('../helpers/expectEvent'); -const { balanceDifference } = require('../helpers/balanceDifference'); - -require('../helpers/setup'); +const { balance, expectEvent } = require('openzeppelin-test-helpers'); function shouldBehaveLikeMintedCrowdsale ([_, investor, wallet, purchaser], rate, value) { const expectedTokenAmount = rate.mul(value); @@ -31,7 +28,7 @@ function shouldBehaveLikeMintedCrowdsale ([_, investor, wallet, purchaser], rate }); it('should forward funds to wallet', async function () { - (await balanceDifference(wallet, () => + (await balance.difference(wallet, () => this.crowdsale.sendTransaction({ value, from: investor })) ).should.be.bignumber.equal(value); }); diff --git a/test/crowdsale/MintedCrowdsale.test.js b/test/crowdsale/MintedCrowdsale.test.js index 9676f6dea..4737f5979 100644 --- a/test/crowdsale/MintedCrowdsale.test.js +++ b/test/crowdsale/MintedCrowdsale.test.js @@ -1,16 +1,13 @@ +const { BN, ether, shouldFail } = require('openzeppelin-test-helpers'); const { shouldBehaveLikeMintedCrowdsale } = require('./MintedCrowdsale.behavior'); -const { ether } = require('../helpers/ether'); -const shouldFail = require('../helpers/shouldFail'); - -const { BigNumber } = require('../helpers/setup'); const MintedCrowdsaleImpl = artifacts.require('MintedCrowdsaleImpl'); const ERC20Mintable = artifacts.require('ERC20MintableMock'); const ERC20 = artifacts.require('ERC20'); contract('MintedCrowdsale', function ([_, deployer, investor, wallet, purchaser]) { - const rate = new BigNumber(1000); - const value = ether(5); + const rate = new BN('1000'); + const value = ether('5'); describe('using ERC20Mintable', function () { beforeEach(async function () { diff --git a/test/crowdsale/PausableCrowdsale.test.js b/test/crowdsale/PausableCrowdsale.test.js index f99a14a4c..f3a5bb99b 100644 --- a/test/crowdsale/PausableCrowdsale.test.js +++ b/test/crowdsale/PausableCrowdsale.test.js @@ -1,20 +1,18 @@ -const shouldFail = require('../helpers/shouldFail'); +const { BN, shouldFail } = require('openzeppelin-test-helpers'); const PausableCrowdsale = artifacts.require('PausableCrowdsaleImpl'); const SimpleToken = artifacts.require('SimpleTokenMock'); -require('../helpers/setup'); - contract('PausableCrowdsale', function ([_, pauser, wallet, anyone]) { - const rate = 1; - const value = 1; + const rate = new BN(1); + const value = new BN(1); beforeEach(async function () { const from = pauser; this.token = await SimpleToken.new({ from }); this.crowdsale = await PausableCrowdsale.new(rate, wallet, this.token.address, { from }); - await this.token.transfer(this.crowdsale.address, 2 * value, { from }); + await this.token.transfer(this.crowdsale.address, value.muln(2), { from }); }); it('purchases work', async function () { diff --git a/test/crowdsale/PostDeliveryCrowdsale.test.js b/test/crowdsale/PostDeliveryCrowdsale.test.js index 9eaaf12af..5e3285372 100644 --- a/test/crowdsale/PostDeliveryCrowdsale.test.js +++ b/test/crowdsale/PostDeliveryCrowdsale.test.js @@ -1,15 +1,11 @@ -const time = require('../helpers/time'); -const shouldFail = require('../helpers/shouldFail'); -const { ether } = require('../helpers/ether'); - -const { BigNumber } = require('../helpers/setup'); +const { BN, ether, shouldFail, time } = require('openzeppelin-test-helpers'); const PostDeliveryCrowdsaleImpl = artifacts.require('PostDeliveryCrowdsaleImpl'); const SimpleToken = artifacts.require('SimpleTokenMock'); contract('PostDeliveryCrowdsale', function ([_, investor, wallet, purchaser]) { - const rate = new BigNumber(1); - const tokenSupply = new BigNumber('1e22'); + const rate = new BN(1); + const tokenSupply = new BN('10').pow(new BN('22')); before(async function () { // Advance to the next block to correctly read time in the solidity "now" function interpreted by ganache @@ -17,9 +13,9 @@ contract('PostDeliveryCrowdsale', function ([_, investor, wallet, purchaser]) { }); beforeEach(async function () { - this.openingTime = (await time.latest()) + time.duration.weeks(1); - this.closingTime = this.openingTime + time.duration.weeks(1); - this.afterClosingTime = this.closingTime + time.duration.seconds(1); + this.openingTime = (await time.latest()).add(time.duration.weeks(1)); + this.closingTime = this.openingTime.add(time.duration.weeks(1)); + this.afterClosingTime = this.closingTime.add(time.duration.seconds(1)); this.token = await SimpleToken.new(); this.crowdsale = await PostDeliveryCrowdsaleImpl.new( this.openingTime, this.closingTime, rate, wallet, this.token.address @@ -33,7 +29,7 @@ contract('PostDeliveryCrowdsale', function ([_, investor, wallet, purchaser]) { }); context('with bought tokens', function () { - const value = ether(42); + const value = ether('42'); beforeEach(async function () { await this.crowdsale.buyTokens(investor, { value: value, from: purchaser }); @@ -41,7 +37,7 @@ contract('PostDeliveryCrowdsale', function ([_, investor, wallet, purchaser]) { it('does not immediately assign tokens to beneficiaries', async function () { (await this.crowdsale.balanceOf(investor)).should.be.bignumber.equal(value); - (await this.token.balanceOf(investor)).should.be.bignumber.equal(0); + (await this.token.balanceOf(investor)).should.be.bignumber.equal('0'); }); it('does not allow beneficiaries to withdraw tokens before crowdsale ends', async function () { @@ -55,7 +51,7 @@ contract('PostDeliveryCrowdsale', function ([_, investor, wallet, purchaser]) { it('allows beneficiaries to withdraw tokens', async function () { await this.crowdsale.withdrawTokens(investor); - (await this.crowdsale.balanceOf(investor)).should.be.bignumber.equal(0); + (await this.crowdsale.balanceOf(investor)).should.be.bignumber.equal('0'); (await this.token.balanceOf(investor)).should.be.bignumber.equal(value); }); diff --git a/test/crowdsale/RefundableCrowdsale.test.js b/test/crowdsale/RefundableCrowdsale.test.js index 5fb4e4f5d..a9ec32a1c 100644 --- a/test/crowdsale/RefundableCrowdsale.test.js +++ b/test/crowdsale/RefundableCrowdsale.test.js @@ -1,19 +1,13 @@ -const { ether } = require('../helpers/ether'); -const { balanceDifference } = require('../helpers/balanceDifference'); -const shouldFail = require('../helpers/shouldFail'); -const time = require('../helpers/time'); -const { ethGetBalance } = require('../helpers/web3'); - -const { BigNumber } = require('../helpers/setup'); +const { balance, BN, ether, shouldFail, time } = require('openzeppelin-test-helpers'); const RefundableCrowdsaleImpl = artifacts.require('RefundableCrowdsaleImpl'); const SimpleToken = artifacts.require('SimpleTokenMock'); contract('RefundableCrowdsale', function ([_, wallet, investor, purchaser, anyone]) { - const rate = new BigNumber(1); - const goal = ether(50); - const lessThanGoal = ether(45); - const tokenSupply = new BigNumber('1e22'); + const rate = new BN(1); + const goal = ether('50'); + const lessThanGoal = ether('45'); + const tokenSupply = new BN('10').pow(new BN('22')); before(async function () { // Advance to the next block to correctly read time in the solidity "now" function interpreted by ganache @@ -21,10 +15,10 @@ contract('RefundableCrowdsale', function ([_, wallet, investor, purchaser, anyon }); beforeEach(async function () { - this.openingTime = (await time.latest()) + time.duration.weeks(1); - this.closingTime = this.openingTime + time.duration.weeks(1); - this.afterClosingTime = this.closingTime + time.duration.seconds(1); - this.preWalletBalance = await ethGetBalance(wallet); + this.openingTime = (await time.latest()).add(time.duration.weeks(1)); + this.closingTime = this.openingTime.add(time.duration.weeks(1)); + this.afterClosingTime = this.closingTime.add(time.duration.seconds(1)); + this.preWalletBalance = await balance.current(wallet); this.token = await SimpleToken.new(); }); @@ -71,7 +65,7 @@ contract('RefundableCrowdsale', function ([_, wallet, investor, purchaser, anyon }); it('refunds', async function () { - (await balanceDifference(investor, () => + (await balance.difference(investor, () => this.crowdsale.claimRefund(investor, { gasPrice: 0 })) ).should.be.bignumber.equal(lessThanGoal); }); @@ -94,8 +88,8 @@ contract('RefundableCrowdsale', function ([_, wallet, investor, purchaser, anyon }); it('forwards funds to wallet', async function () { - const postWalletBalance = await ethGetBalance(wallet); - postWalletBalance.minus(this.preWalletBalance).should.be.bignumber.equal(goal); + const postWalletBalance = await balance.current(wallet); + postWalletBalance.sub(this.preWalletBalance).should.be.bignumber.equal(goal); }); }); }); diff --git a/test/crowdsale/RefundablePostDeliveryCrowdsale.test.js b/test/crowdsale/RefundablePostDeliveryCrowdsale.test.js index 293d78674..8f0d28f04 100644 --- a/test/crowdsale/RefundablePostDeliveryCrowdsale.test.js +++ b/test/crowdsale/RefundablePostDeliveryCrowdsale.test.js @@ -1,20 +1,12 @@ -const time = require('../helpers/time'); -const shouldFail = require('../helpers/shouldFail'); -const { ether } = require('../helpers/ether'); - -const BigNumber = web3.BigNumber; - -require('chai') - .use(require('chai-bignumber')(BigNumber)) - .should(); +const { BN, ether, shouldFail, time } = require('openzeppelin-test-helpers'); const RefundablePostDeliveryCrowdsaleImpl = artifacts.require('RefundablePostDeliveryCrowdsaleImpl'); const SimpleToken = artifacts.require('SimpleTokenMock'); contract('RefundablePostDeliveryCrowdsale', function ([_, investor, wallet, purchaser]) { - const rate = new BigNumber(1); - const tokenSupply = new BigNumber('1e22'); - const goal = ether(100); + const rate = new BN(1); + const tokenSupply = new BN('10').pow(new BN('22')); + const goal = ether('100'); before(async function () { // Advance to the next block to correctly read time in the solidity "now" function interpreted by ganache @@ -22,9 +14,9 @@ contract('RefundablePostDeliveryCrowdsale', function ([_, investor, wallet, purc }); beforeEach(async function () { - this.openingTime = (await time.latest()) + time.duration.weeks(1); - this.closingTime = this.openingTime + time.duration.weeks(1); - this.afterClosingTime = this.closingTime + time.duration.seconds(1); + this.openingTime = (await time.latest()).add(time.duration.weeks(1)); + this.closingTime = this.openingTime.add(time.duration.weeks(1)); + this.afterClosingTime = this.closingTime.add(time.duration.seconds(1)); this.token = await SimpleToken.new(); this.crowdsale = await RefundablePostDeliveryCrowdsaleImpl.new( this.openingTime, this.closingTime, rate, wallet, this.token.address, goal @@ -38,7 +30,7 @@ contract('RefundablePostDeliveryCrowdsale', function ([_, investor, wallet, purc }); context('with bought tokens below the goal', function () { - const value = goal.sub(1); + const value = goal.subn(1); beforeEach(async function () { await this.crowdsale.buyTokens(investor, { value: value, from: purchaser }); @@ -46,7 +38,7 @@ contract('RefundablePostDeliveryCrowdsale', function ([_, investor, wallet, purc it('does not immediately deliver tokens to beneficiaries', async function () { (await this.crowdsale.balanceOf(investor)).should.be.bignumber.equal(value); - (await this.token.balanceOf(investor)).should.be.bignumber.equal(0); + (await this.token.balanceOf(investor)).should.be.bignumber.equal('0'); }); it('does not allow beneficiaries to withdraw tokens before crowdsale ends', async function () { @@ -74,7 +66,7 @@ contract('RefundablePostDeliveryCrowdsale', function ([_, investor, wallet, purc it('does not immediately deliver tokens to beneficiaries', async function () { (await this.crowdsale.balanceOf(investor)).should.be.bignumber.equal(value); - (await this.token.balanceOf(investor)).should.be.bignumber.equal(0); + (await this.token.balanceOf(investor)).should.be.bignumber.equal('0'); }); it('does not allow beneficiaries to withdraw tokens before crowdsale ends', async function () { @@ -89,7 +81,7 @@ contract('RefundablePostDeliveryCrowdsale', function ([_, investor, wallet, purc it('allows beneficiaries to withdraw tokens', async function () { await this.crowdsale.withdrawTokens(investor); - (await this.crowdsale.balanceOf(investor)).should.be.bignumber.equal(0); + (await this.crowdsale.balanceOf(investor)).should.be.bignumber.equal('0'); (await this.token.balanceOf(investor)).should.be.bignumber.equal(value); }); diff --git a/test/crowdsale/TimedCrowdsale.test.js b/test/crowdsale/TimedCrowdsale.test.js index f118c2085..df6d908d1 100644 --- a/test/crowdsale/TimedCrowdsale.test.js +++ b/test/crowdsale/TimedCrowdsale.test.js @@ -1,16 +1,12 @@ -const { ether } = require('../helpers/ether'); -const shouldFail = require('../helpers/shouldFail'); -const time = require('../helpers/time'); - -const { BigNumber } = require('../helpers/setup'); +const { BN, ether, shouldFail, time } = require('openzeppelin-test-helpers'); const TimedCrowdsaleImpl = artifacts.require('TimedCrowdsaleImpl'); const SimpleToken = artifacts.require('SimpleTokenMock'); contract('TimedCrowdsale', function ([_, investor, wallet, purchaser]) { - const rate = new BigNumber(1); - const value = ether(42); - const tokenSupply = new BigNumber('1e22'); + const rate = new BN(1); + const value = ether('42'); + const tokenSupply = new BN('10').pow(new BN('22')); before(async function () { // Advance to the next block to correctly read time in the solidity "now" function interpreted by ganache @@ -18,21 +14,21 @@ contract('TimedCrowdsale', function ([_, investor, wallet, purchaser]) { }); beforeEach(async function () { - this.openingTime = (await time.latest()) + time.duration.weeks(1); - this.closingTime = this.openingTime + time.duration.weeks(1); - this.afterClosingTime = this.closingTime + time.duration.seconds(1); + this.openingTime = (await time.latest()).add(time.duration.weeks(1)); + this.closingTime = this.openingTime.add(time.duration.weeks(1)); + this.afterClosingTime = this.closingTime.add(time.duration.seconds(1)); this.token = await SimpleToken.new(); }); it('reverts if the opening time is in the past', async function () { await shouldFail.reverting(TimedCrowdsaleImpl.new( - (await time.latest()) - time.duration.days(1), this.closingTime, rate, wallet, this.token.address + (await time.latest()).sub(time.duration.days(1)), this.closingTime, rate, wallet, this.token.address )); }); it('reverts if the closing time is before the opening time', async function () { await shouldFail.reverting(TimedCrowdsaleImpl.new( - this.openingTime, this.openingTime - time.duration.seconds(1), rate, wallet, this.token.address + this.openingTime, this.openingTime.sub(time.duration.seconds(1)), rate, wallet, this.token.address )); }); diff --git a/test/crowdsale/WhitelistCrowdsale.test.js b/test/crowdsale/WhitelistCrowdsale.test.js index 21720973e..9b6a60794 100644 --- a/test/crowdsale/WhitelistCrowdsale.test.js +++ b/test/crowdsale/WhitelistCrowdsale.test.js @@ -1,16 +1,12 @@ -require('../helpers/setup'); -const { ether } = require('../helpers/ether'); -const shouldFail = require('../helpers/shouldFail'); - -const BigNumber = web3.BigNumber; +const { BN, ether, shouldFail } = require('openzeppelin-test-helpers'); const WhitelistCrowdsale = artifacts.require('WhitelistCrowdsaleImpl'); const SimpleToken = artifacts.require('SimpleTokenMock'); contract('WhitelistCrowdsale', function ([_, wallet, whitelister, whitelisted, otherWhitelisted, anyone]) { - const rate = 1; - const value = ether(42); - const tokenSupply = new BigNumber('1e22'); + const rate = new BN(1); + const value = ether('42'); + const tokenSupply = new BN('10').pow(new BN('22')); beforeEach(async function () { this.token = await SimpleToken.new({ from: whitelister }); diff --git a/test/cryptography/ECDSA.test.js b/test/cryptography/ECDSA.test.js index 1909b848d..c37f405bd 100644 --- a/test/cryptography/ECDSA.test.js +++ b/test/cryptography/ECDSA.test.js @@ -1,12 +1,10 @@ +const { shouldFail } = require('openzeppelin-test-helpers'); const { signMessage, toEthSignedMessageHash } = require('../helpers/sign'); -const shouldFail = require('../helpers/shouldFail'); const ECDSAMock = artifacts.require('ECDSAMock'); -require('../helpers/setup'); - -const TEST_MESSAGE = web3.sha3('OpenZeppelin'); -const WRONG_MESSAGE = web3.sha3('Nope'); +const TEST_MESSAGE = web3.utils.sha3('OpenZeppelin'); +const WRONG_MESSAGE = web3.utils.sha3('Nope'); contract('ECDSA', function ([_, anyone]) { beforeEach(async function () { @@ -16,7 +14,7 @@ contract('ECDSA', function ([_, anyone]) { context('recover with valid signature', function () { context('with v0 signature', function () { // Signature generated outside ganache with method web3.eth.sign(signer, message) - const signer = '0x2cc1166f6212628a0deef2b33befb2187d35b86c'; + const signer = '0x2cc1166f6212628A0deEf2B33BEFB2187D35b86c'; // eslint-disable-next-line max-len const signatureWithoutVersion = '0x5d99b6f7f6d1f73d1a26497f2b1c89b24c0993913f86e9a2d02cd69887d9c94f3c880358579d811b21dd1b7fd9bb01c1d81d10e69f0384e675c32b39643be892'; @@ -49,7 +47,7 @@ contract('ECDSA', function ([_, anyone]) { }); context('with v1 signature', function () { - const signer = '0x1e318623ab09fe6de3c9b8672098464aeda9100e'; + const signer = '0x1E318623aB09Fe6de3C9b8672098464Aeda9100E'; // eslint-disable-next-line max-len const signatureWithoutVersion = '0x331fe75a821c982f9127538858900d87d3ec1f9f737338ad67cad133fa48feff48e6fa0c18abc62e42820f05943e47af3e9fbe306ce74d64094bdf1691ee53e0'; @@ -85,7 +83,7 @@ contract('ECDSA', function ([_, anyone]) { context('with correct signature', function () { it('returns signer address', async function () { // Create the signature - const signature = signMessage(anyone, TEST_MESSAGE); + const signature = await signMessage(anyone, TEST_MESSAGE); // Recover the signer address from the generated message and signature. (await this.ecdsa.recover( @@ -98,7 +96,7 @@ contract('ECDSA', function ([_, anyone]) { context('with wrong signature', function () { it('does not return signer address', async function () { // Create the signature - const signature = signMessage(anyone, TEST_MESSAGE); + const signature = await signMessage(anyone, TEST_MESSAGE); // Recover the signer address from the generated message and wrong signature. (await this.ecdsa.recover(WRONG_MESSAGE, signature)).should.not.equal(anyone); @@ -111,7 +109,7 @@ contract('ECDSA', function ([_, anyone]) { // @TODO - remove `skip` once we upgrade to solc^0.5 it.skip('reverts', async function () { // Create the signature - const signature = signMessage(anyone, TEST_MESSAGE); + const signature = await signMessage(anyone, TEST_MESSAGE); await shouldFail.reverting( this.ecdsa.recover(TEST_MESSAGE.substring(2), signature) ); diff --git a/test/cryptography/MerkleProof.test.js b/test/cryptography/MerkleProof.test.js index 869423048..b3b14d89b 100644 --- a/test/cryptography/MerkleProof.test.js +++ b/test/cryptography/MerkleProof.test.js @@ -1,10 +1,10 @@ +require('openzeppelin-test-helpers'); + const { MerkleTree } = require('../helpers/merkleTree.js'); const { keccak256, bufferToHex } = require('ethereumjs-util'); const MerkleProofWrapper = artifacts.require('MerkleProofWrapper'); -require('../helpers/setup'); - contract('MerkleProof', function () { beforeEach(async function () { this.merkleProof = await MerkleProofWrapper.new(); diff --git a/test/drafts/Counter.test.js b/test/drafts/Counter.test.js index 008e76778..e486ed1e8 100644 --- a/test/drafts/Counter.test.js +++ b/test/drafts/Counter.test.js @@ -1,11 +1,10 @@ +const { BN } = require('openzeppelin-test-helpers'); const CounterImpl = artifacts.require('CounterImpl'); -require('../helpers/setup'); - -const EXPECTED = [1, 2, 3, 4]; -const KEY1 = web3.sha3('key1'); -const KEY2 = web3.sha3('key2'); +const EXPECTED = [new BN(1), new BN(2), new BN(3), new BN(4)]; +const KEY1 = web3.utils.sha3('key1'); +const KEY2 = web3.utils.sha3('key2'); contract('Counter', function ([_, owner]) { beforeEach(async function () { diff --git a/test/drafts/ERC1046/TokenMetadata.test.js b/test/drafts/ERC1046/TokenMetadata.test.js index 58aaa3a33..83eca7038 100644 --- a/test/drafts/ERC1046/TokenMetadata.test.js +++ b/test/drafts/ERC1046/TokenMetadata.test.js @@ -1,6 +1,6 @@ -const ERC20WithMetadataMock = artifacts.require('ERC20WithMetadataMock'); +require('openzeppelin-test-helpers'); -require('../../helpers/setup'); +const ERC20WithMetadataMock = artifacts.require('ERC20WithMetadataMock'); const metadataURI = 'https://example.com'; diff --git a/test/drafts/ERC20Migrator.test.js b/test/drafts/ERC20Migrator.test.js index 90a466f8f..2cb3f03dd 100644 --- a/test/drafts/ERC20Migrator.test.js +++ b/test/drafts/ERC20Migrator.test.js @@ -1,14 +1,12 @@ -const shouldFail = require('../helpers/shouldFail'); -const { ZERO_ADDRESS } = require('../helpers/constants'); +const { BN, constants, shouldFail } = require('openzeppelin-test-helpers'); +const { ZERO_ADDRESS } = constants; const ERC20Mock = artifacts.require('ERC20Mock'); const ERC20Mintable = artifacts.require('ERC20MintableMock'); const ERC20Migrator = artifacts.require('ERC20MigratorMock'); -require('../helpers/setup'); - contract('ERC20Migrator', function ([_, owner, recipient, anotherAccount]) { - const totalSupply = 200; + const totalSupply = new BN('200'); it('reverts with a null legacy token address', async function () { await shouldFail.reverting(ERC20Migrator.new(ZERO_ADDRESS)); @@ -81,7 +79,7 @@ contract('ERC20Migrator', function ([_, owner, recipient, anotherAccount]) { currentBurnedBalance.should.be.bignumber.equal(amount); const currentLegacyTokenBalance = await this.legacyToken.balanceOf(owner); - currentLegacyTokenBalance.should.be.bignumber.equal(0); + currentLegacyTokenBalance.should.be.bignumber.equal('0'); }); it('updates the total supply', async function () { @@ -91,7 +89,7 @@ contract('ERC20Migrator', function ([_, owner, recipient, anotherAccount]) { }); describe('when the approved balance is lower than the owned balance', function () { - const amount = baseAmount - 1; + const amount = baseAmount.subn(1); beforeEach('approving part of the balance to the new contract', async function () { await this.legacyToken.approve(this.migrator.address, amount, { from: owner }); @@ -106,7 +104,7 @@ contract('ERC20Migrator', function ([_, owner, recipient, anotherAccount]) { }); describe('migrate', function () { - const baseAmount = 50; + const baseAmount = new BN(50); beforeEach('approving tokens to the new contract', async function () { await this.legacyToken.approve(this.migrator.address, baseAmount, { from: owner }); @@ -129,7 +127,7 @@ contract('ERC20Migrator', function ([_, owner, recipient, anotherAccount]) { currentBurnedBalance.should.be.bignumber.equal(amount); const currentLegacyTokenBalance = await this.legacyToken.balanceOf(owner); - currentLegacyTokenBalance.should.be.bignumber.equal(totalSupply - amount); + currentLegacyTokenBalance.should.be.bignumber.equal(totalSupply.sub(amount)); }); it('updates the total supply', async function () { @@ -139,7 +137,7 @@ contract('ERC20Migrator', function ([_, owner, recipient, anotherAccount]) { }); describe('when the given amount is higher than the one approved', function () { - const amount = baseAmount + 1; + const amount = baseAmount.addn(1); it('reverts', async function () { await shouldFail.reverting(this.migrator.migrate(owner, amount)); diff --git a/test/drafts/SignatureBouncer.test.js b/test/drafts/SignatureBouncer.test.js index 4e204011a..32866378e 100644 --- a/test/drafts/SignatureBouncer.test.js +++ b/test/drafts/SignatureBouncer.test.js @@ -1,13 +1,11 @@ -const shouldFail = require('../helpers/shouldFail'); +const { shouldFail } = require('openzeppelin-test-helpers'); const { getSignFor } = require('../helpers/sign'); -const { shouldBehaveLikePublicRole } = require('../access/roles/PublicRole.behavior'); +const { shouldBehaveLikePublicRole } = require('../behaviors/access/roles/PublicRole.behavior'); const SignatureBouncerMock = artifacts.require('SignatureBouncerMock'); -require('../helpers/setup'); - const UINT_VALUE = 23; -const BYTES_VALUE = web3.toHex('test'); +const BYTES_VALUE = web3.utils.toHex('test'); const INVALID_SIGNATURE = '0xabcd'; contract('SignatureBouncer', function ([_, signer, otherSigner, anyone, authorizedUser, ...otherAccounts]) { @@ -28,7 +26,7 @@ contract('SignatureBouncer', function ([_, signer, otherSigner, anyone, authoriz describe('modifiers', function () { context('plain signature', function () { it('allows valid signature for sender', async function () { - await this.sigBouncer.onlyWithValidSignature(this.signFor(authorizedUser), { from: authorizedUser }); + await this.sigBouncer.onlyWithValidSignature(await this.signFor(authorizedUser), { from: authorizedUser }); }); it('does not allow invalid signature for sender', async function () { @@ -39,13 +37,13 @@ contract('SignatureBouncer', function ([_, signer, otherSigner, anyone, authoriz it('does not allow valid signature for other sender', async function () { await shouldFail.reverting( - this.sigBouncer.onlyWithValidSignature(this.signFor(authorizedUser), { from: anyone }) + this.sigBouncer.onlyWithValidSignature(await this.signFor(authorizedUser), { from: anyone }) ); }); it('does not allow valid signature for method for sender', async function () { await shouldFail.reverting( - this.sigBouncer.onlyWithValidSignature(this.signFor(authorizedUser, 'onlyWithValidSignature'), + this.sigBouncer.onlyWithValidSignature(await this.signFor(authorizedUser, 'onlyWithValidSignature'), { from: authorizedUser }) ); }); @@ -54,7 +52,7 @@ contract('SignatureBouncer', function ([_, signer, otherSigner, anyone, authoriz context('method signature', function () { it('allows valid signature with correct method for sender', async function () { await this.sigBouncer.onlyWithValidSignatureAndMethod( - this.signFor(authorizedUser, 'onlyWithValidSignatureAndMethod'), { from: authorizedUser } + await this.signFor(authorizedUser, 'onlyWithValidSignatureAndMethod'), { from: authorizedUser } ); }); @@ -67,21 +65,21 @@ contract('SignatureBouncer', function ([_, signer, otherSigner, anyone, authoriz it('does not allow valid signature with correct method for other sender', async function () { await shouldFail.reverting( this.sigBouncer.onlyWithValidSignatureAndMethod( - this.signFor(authorizedUser, 'onlyWithValidSignatureAndMethod'), { from: anyone } + await this.signFor(authorizedUser, 'onlyWithValidSignatureAndMethod'), { from: anyone } ) ); }); it('does not allow valid method signature with incorrect method for sender', async function () { await shouldFail.reverting( - this.sigBouncer.onlyWithValidSignatureAndMethod(this.signFor(authorizedUser, 'theWrongMethod'), + this.sigBouncer.onlyWithValidSignatureAndMethod(await this.signFor(authorizedUser, 'theWrongMethod'), { from: authorizedUser }) ); }); it('does not allow valid non-method signature method for sender', async function () { await shouldFail.reverting( - this.sigBouncer.onlyWithValidSignatureAndMethod(this.signFor(authorizedUser), { from: authorizedUser }) + this.sigBouncer.onlyWithValidSignatureAndMethod(await this.signFor(authorizedUser), { from: authorizedUser }) ); }); }); @@ -89,7 +87,7 @@ contract('SignatureBouncer', function ([_, signer, otherSigner, anyone, authoriz context('method and data signature', function () { it('allows valid signature with correct method and data for sender', async function () { await this.sigBouncer.onlyWithValidSignatureAndData(UINT_VALUE, - this.signFor(authorizedUser, 'onlyWithValidSignatureAndData', [UINT_VALUE]), { from: authorizedUser } + await this.signFor(authorizedUser, 'onlyWithValidSignatureAndData', [UINT_VALUE]), { from: authorizedUser } ); }); @@ -102,7 +100,7 @@ contract('SignatureBouncer', function ([_, signer, otherSigner, anyone, authoriz it('does not allow valid signature with correct method and incorrect data for sender', async function () { await shouldFail.reverting( this.sigBouncer.onlyWithValidSignatureAndData(UINT_VALUE + 10, - this.signFor(authorizedUser, 'onlyWithValidSignatureAndData', [UINT_VALUE]), + await this.signFor(authorizedUser, 'onlyWithValidSignatureAndData', [UINT_VALUE]), { from: authorizedUser } ) ); @@ -111,7 +109,7 @@ contract('SignatureBouncer', function ([_, signer, otherSigner, anyone, authoriz it('does not allow valid signature with correct method and data for other sender', async function () { await shouldFail.reverting( this.sigBouncer.onlyWithValidSignatureAndData(UINT_VALUE, - this.signFor(authorizedUser, 'onlyWithValidSignatureAndData', [UINT_VALUE]), + await this.signFor(authorizedUser, 'onlyWithValidSignatureAndData', [UINT_VALUE]), { from: anyone } ) ); @@ -120,7 +118,7 @@ contract('SignatureBouncer', function ([_, signer, otherSigner, anyone, authoriz it('does not allow valid non-method signature for sender', async function () { await shouldFail.reverting( this.sigBouncer.onlyWithValidSignatureAndData(UINT_VALUE, - this.signFor(authorizedUser), { from: authorizedUser } + await this.signFor(authorizedUser), { from: authorizedUser } ) ); }); @@ -136,7 +134,8 @@ contract('SignatureBouncer', function ([_, signer, otherSigner, anyone, authoriz context('signature validation', function () { context('plain signature', function () { it('validates valid signature for valid user', async function () { - (await this.sigBouncer.checkValidSignature(authorizedUser, this.signFor(authorizedUser))).should.equal(true); + (await this.sigBouncer.checkValidSignature(authorizedUser, await this.signFor(authorizedUser))) + .should.equal(true); }); it('does not validate invalid signature for valid user', async function () { @@ -144,11 +143,12 @@ contract('SignatureBouncer', function ([_, signer, otherSigner, anyone, authoriz }); it('does not validate valid signature for anyone', async function () { - (await this.sigBouncer.checkValidSignature(anyone, this.signFor(authorizedUser))).should.equal(false); + (await this.sigBouncer.checkValidSignature(anyone, await this.signFor(authorizedUser))).should.equal(false); }); it('does not validate valid signature for method for valid user', async function () { - (await this.sigBouncer.checkValidSignature(authorizedUser, this.signFor(authorizedUser, 'checkValidSignature')) + (await this.sigBouncer.checkValidSignature( + authorizedUser, await this.signFor(authorizedUser, 'checkValidSignature')) ).should.equal(false); }); }); @@ -156,7 +156,7 @@ contract('SignatureBouncer', function ([_, signer, otherSigner, anyone, authoriz context('method signature', function () { it('validates valid signature with correct method for valid user', async function () { (await this.sigBouncer.checkValidSignatureAndMethod(authorizedUser, - this.signFor(authorizedUser, 'checkValidSignatureAndMethod')) + await this.signFor(authorizedUser, 'checkValidSignatureAndMethod')) ).should.equal(true); }); @@ -166,12 +166,12 @@ contract('SignatureBouncer', function ([_, signer, otherSigner, anyone, authoriz it('does not validate valid signature with correct method for anyone', async function () { (await this.sigBouncer.checkValidSignatureAndMethod(anyone, - this.signFor(authorizedUser, 'checkValidSignatureAndMethod')) + await this.signFor(authorizedUser, 'checkValidSignatureAndMethod')) ).should.equal(false); }); it('does not validate valid non-method signature with correct method for valid user', async function () { - (await this.sigBouncer.checkValidSignatureAndMethod(authorizedUser, this.signFor(authorizedUser)) + (await this.sigBouncer.checkValidSignatureAndMethod(authorizedUser, await this.signFor(authorizedUser)) ).should.equal(false); }); }); @@ -179,7 +179,7 @@ contract('SignatureBouncer', function ([_, signer, otherSigner, anyone, authoriz context('method and data signature', function () { it('validates valid signature with correct method and data for valid user', async function () { (await this.sigBouncer.checkValidSignatureAndData(authorizedUser, BYTES_VALUE, UINT_VALUE, - this.signFor(authorizedUser, 'checkValidSignatureAndData', [authorizedUser, BYTES_VALUE, UINT_VALUE])) + await this.signFor(authorizedUser, 'checkValidSignatureAndData', [authorizedUser, BYTES_VALUE, UINT_VALUE])) ).should.equal(true); }); @@ -191,21 +191,21 @@ contract('SignatureBouncer', function ([_, signer, otherSigner, anyone, authoriz it('does not validate valid signature with correct method and incorrect data for valid user', async function () { (await this.sigBouncer.checkValidSignatureAndData(authorizedUser, BYTES_VALUE, UINT_VALUE + 10, - this.signFor(authorizedUser, 'checkValidSignatureAndData', [authorizedUser, BYTES_VALUE, UINT_VALUE])) + await this.signFor(authorizedUser, 'checkValidSignatureAndData', [authorizedUser, BYTES_VALUE, UINT_VALUE])) ).should.equal(false); } ); it('does not validate valid signature with correct method and data for anyone', async function () { (await this.sigBouncer.checkValidSignatureAndData(anyone, BYTES_VALUE, UINT_VALUE, - this.signFor(authorizedUser, 'checkValidSignatureAndData', [authorizedUser, BYTES_VALUE, UINT_VALUE])) + await this.signFor(authorizedUser, 'checkValidSignatureAndData', [authorizedUser, BYTES_VALUE, UINT_VALUE])) ).should.equal(false); }); it('does not validate valid non-method-data signature with correct method and data for valid user', async function () { (await this.sigBouncer.checkValidSignatureAndData(authorizedUser, BYTES_VALUE, UINT_VALUE, - this.signFor(authorizedUser, 'checkValidSignatureAndData')) + await this.signFor(authorizedUser, 'checkValidSignatureAndData')) ).should.equal(false); } ); diff --git a/test/drafts/SignedSafeMath.test.js b/test/drafts/SignedSafeMath.test.js index e144d39f6..04d42fdee 100644 --- a/test/drafts/SignedSafeMath.test.js +++ b/test/drafts/SignedSafeMath.test.js @@ -1,10 +1,8 @@ -const shouldFail = require('../helpers/shouldFail'); -const { MIN_INT256, MAX_INT256 } = require('../helpers/constants'); +const { BN, constants, shouldFail } = require('openzeppelin-test-helpers'); +const { MAX_INT256, MIN_INT256 } = constants; const SignedSafeMathMock = artifacts.require('SignedSafeMathMock'); -const { BigNumber } = require('../helpers/setup'); - contract('SignedSafeMath', function () { beforeEach(async function () { this.safeMath = await SignedSafeMathMock.new(); @@ -12,10 +10,10 @@ contract('SignedSafeMath', function () { describe('add', function () { it('adds correctly if it does not overflow and the result is positve', async function () { - const a = new BigNumber(1234); - const b = new BigNumber(5678); + const a = new BN('1234'); + const b = new BN('5678'); - (await this.safeMath.add(a, b)).should.be.bignumber.equal(a.plus(b)); + (await this.safeMath.add(a, b)).should.be.bignumber.equal(a.add(b)); }); it('adds correctly if it does not overflow and the result is negative', async function () { @@ -23,19 +21,19 @@ contract('SignedSafeMath', function () { const b = MIN_INT256; const result = await this.safeMath.add(a, b); - result.should.be.bignumber.equal(a.plus(b)); + result.should.be.bignumber.equal(a.add(b)); }); it('reverts on positive addition overflow', async function () { const a = MAX_INT256; - const b = new BigNumber(1); + const b = new BN('1'); await shouldFail.reverting(this.safeMath.add(a, b)); }); it('reverts on negative addition overflow', async function () { const a = MIN_INT256; - const b = new BigNumber(-1); + const b = new BN('-1'); await shouldFail.reverting(this.safeMath.add(a, b)); }); @@ -43,31 +41,31 @@ contract('SignedSafeMath', function () { describe('sub', function () { it('subtracts correctly if it does not overflow and the result is positive', async function () { - const a = new BigNumber(5678); - const b = new BigNumber(1234); + const a = new BN('5678'); + const b = new BN('1234'); const result = await this.safeMath.sub(a, b); - result.should.be.bignumber.equal(a.minus(b)); + result.should.be.bignumber.equal(a.sub(b)); }); it('subtracts correctly if it does not overflow and the result is negative', async function () { - const a = new BigNumber(1234); - const b = new BigNumber(5678); + const a = new BN('1234'); + const b = new BN('5678'); const result = await this.safeMath.sub(a, b); - result.should.be.bignumber.equal(a.minus(b)); + result.should.be.bignumber.equal(a.sub(b)); }); it('reverts on positive subtraction overflow', async function () { const a = MAX_INT256; - const b = new BigNumber(-1); + const b = new BN('-1'); await shouldFail.reverting(this.safeMath.sub(a, b)); }); it('reverts on negative subtraction overflow', async function () { const a = MIN_INT256; - const b = new BigNumber(1); + const b = new BN('1'); await shouldFail.reverting(this.safeMath.sub(a, b)); }); @@ -75,37 +73,37 @@ contract('SignedSafeMath', function () { describe('mul', function () { it('multiplies correctly', async function () { - const a = new BigNumber(5678); - const b = new BigNumber(-1234); + const a = new BN('5678'); + const b = new BN('-1234'); const result = await this.safeMath.mul(a, b); - result.should.be.bignumber.equal(a.times(b)); + result.should.be.bignumber.equal(a.mul(b)); }); it('handles a zero product correctly', async function () { - const a = new BigNumber(0); - const b = new BigNumber(5678); + const a = new BN('0'); + const b = new BN('5678'); const result = await this.safeMath.mul(a, b); - result.should.be.bignumber.equal(a.times(b)); + result.should.be.bignumber.equal(a.mul(b)); }); it('reverts on multiplication overflow, positive operands', async function () { const a = MAX_INT256; - const b = new BigNumber(2); + const b = new BN('2'); await shouldFail.reverting(this.safeMath.mul(a, b)); }); it('reverts when minimum integer is multiplied by -1', async function () { const a = MIN_INT256; - const b = new BigNumber(-1); + const b = new BN('-1'); await shouldFail.reverting(this.safeMath.mul(a, b)); }); it('reverts when -1 is multiplied by minimum integer', async function () { - const a = new BigNumber(-1); + const a = new BN('-1'); const b = MIN_INT256; await shouldFail.reverting(this.safeMath.mul(a, b)); @@ -114,23 +112,23 @@ contract('SignedSafeMath', function () { describe('div', function () { it('divides correctly', async function () { - const a = new BigNumber(-5678); - const b = new BigNumber(5678); + const a = new BN('-5678'); + const b = new BN('5678'); const result = await this.safeMath.div(a, b); result.should.be.bignumber.equal(a.div(b)); }); it('reverts on zero division', async function () { - const a = new BigNumber(-5678); - const b = new BigNumber(0); + const a = new BN('-5678'); + const b = new BN('0'); await shouldFail.reverting(this.safeMath.div(a, b)); }); it('reverts on overflow, negative second', async function () { - const a = new BigNumber(MIN_INT256); - const b = new BigNumber(-1); + const a = new BN(MIN_INT256); + const b = new BN('-1'); await shouldFail.reverting(this.safeMath.div(a, b)); }); diff --git a/test/drafts/TokenVesting.test.js b/test/drafts/TokenVesting.test.js index 6bca11e05..417703cf1 100644 --- a/test/drafts/TokenVesting.test.js +++ b/test/drafts/TokenVesting.test.js @@ -1,20 +1,15 @@ -const shouldFail = require('../helpers/shouldFail'); -const expectEvent = require('../helpers/expectEvent'); -const time = require('../helpers/time'); -const { ethGetBlock } = require('../helpers/web3'); -const { ZERO_ADDRESS } = require('../helpers/constants'); - -const { BigNumber } = require('../helpers/setup'); +const { BN, constants, expectEvent, shouldFail, time } = require('openzeppelin-test-helpers'); +const { ZERO_ADDRESS } = constants; const ERC20Mintable = artifacts.require('ERC20MintableMock'); const TokenVesting = artifacts.require('TokenVestingMock'); contract('TokenVesting', function ([_, owner, beneficiary]) { - const amount = new BigNumber(1000); + const amount = new BN('1000'); beforeEach(async function () { // +1 minute so it starts after contract instantiation - this.start = (await time.latest()) + time.duration.minutes(1); + this.start = (await time.latest()).add(time.duration.minutes(1)); this.cliffDuration = time.duration.years(1); this.duration = time.duration.years(2); }); @@ -23,7 +18,7 @@ contract('TokenVesting', function ([_, owner, beneficiary]) { const cliffDuration = this.duration; const duration = this.cliffDuration; - cliffDuration.should.be.gt(duration); + cliffDuration.should.be.bignumber.that.is.at.least(duration); await shouldFail.reverting( TokenVesting.new(beneficiary, this.start, cliffDuration, duration, true, { from: owner }) @@ -46,7 +41,7 @@ contract('TokenVesting', function ([_, owner, beneficiary]) { it('reverts if the end time is in the past', async function () { const now = await time.latest(); - this.start = now - this.duration - time.duration.minutes(1); + this.start = now.sub(this.duration).sub(time.duration.minutes(1)); await shouldFail.reverting( TokenVesting.new(beneficiary, this.start, this.cliffDuration, this.duration, true, { from: owner }) ); @@ -63,7 +58,7 @@ contract('TokenVesting', function ([_, owner, beneficiary]) { it('can get state', async function () { (await this.vesting.beneficiary()).should.be.equal(beneficiary); - (await this.vesting.cliff()).should.be.bignumber.equal(this.start + this.cliffDuration); + (await this.vesting.cliff()).should.be.bignumber.equal(this.start.add(this.cliffDuration)); (await this.vesting.start()).should.be.bignumber.equal(this.start); (await this.vesting.duration()).should.be.bignumber.equal(this.duration); (await this.vesting.revocable()).should.be.equal(true); @@ -74,7 +69,7 @@ contract('TokenVesting', function ([_, owner, beneficiary]) { }); it('can be released after cliff', async function () { - await time.increaseTo(this.start + this.cliffDuration + time.duration.weeks(1)); + await time.increaseTo(this.start.add(this.cliffDuration).add(time.duration.weeks(1))); const { logs } = await this.vesting.release(this.token.address); expectEvent.inLogs(logs, 'TokensReleased', { token: this.token.address, @@ -83,34 +78,33 @@ contract('TokenVesting', function ([_, owner, beneficiary]) { }); it('should release proper amount after cliff', async function () { - await time.increaseTo(this.start + this.cliffDuration); + await time.increaseTo(this.start.add(this.cliffDuration)); - const { receipt } = await this.vesting.release(this.token.address); - const block = await ethGetBlock(receipt.blockNumber); - const releaseTime = block.timestamp; + await this.vesting.release(this.token.address); + const releaseTime = await time.latest(); - const releasedAmount = amount.mul(releaseTime - this.start).div(this.duration).floor(); + const releasedAmount = amount.mul(releaseTime.sub(this.start)).div(this.duration); (await this.token.balanceOf(beneficiary)).should.bignumber.equal(releasedAmount); (await this.vesting.released(this.token.address)).should.bignumber.equal(releasedAmount); }); it('should linearly release tokens during vesting period', async function () { - const vestingPeriod = this.duration - this.cliffDuration; + const vestingPeriod = this.duration.sub(this.cliffDuration); const checkpoints = 4; for (let i = 1; i <= checkpoints; i++) { - const now = this.start + this.cliffDuration + i * (vestingPeriod / checkpoints); + const now = this.start.add(this.cliffDuration).add((vestingPeriod.muln(i).divn(checkpoints))); await time.increaseTo(now); await this.vesting.release(this.token.address); - const expectedVesting = amount.mul(now - this.start).div(this.duration).floor(); + const expectedVesting = amount.mul(now.sub(this.start)).div(this.duration); (await this.token.balanceOf(beneficiary)).should.bignumber.equal(expectedVesting); (await this.vesting.released(this.token.address)).should.bignumber.equal(expectedVesting); } }); it('should have released all after end', async function () { - await time.increaseTo(this.start + this.duration); + await time.increaseTo(this.start.add(this.duration)); await this.vesting.release(this.token.address); (await this.token.balanceOf(beneficiary)).should.bignumber.equal(amount); (await this.vesting.released(this.token.address)).should.bignumber.equal(amount); @@ -131,7 +125,7 @@ contract('TokenVesting', function ([_, owner, beneficiary]) { }); it('should return the non-vested tokens when revoked by owner', async function () { - await time.increaseTo(this.start + this.cliffDuration + time.duration.weeks(12)); + await time.increaseTo(this.start.add(this.cliffDuration).add(time.duration.weeks(12))); const vested = vestedAmount(amount, await time.latest(), this.start, this.cliffDuration, this.duration); @@ -141,7 +135,7 @@ contract('TokenVesting', function ([_, owner, beneficiary]) { }); it('should keep the vested tokens when revoked by owner', async function () { - await time.increaseTo(this.start + this.cliffDuration + time.duration.weeks(12)); + await time.increaseTo(this.start.add(this.cliffDuration).add(time.duration.weeks(12))); const vestedPre = vestedAmount(amount, await time.latest(), this.start, this.cliffDuration, this.duration); @@ -158,7 +152,7 @@ contract('TokenVesting', function ([_, owner, beneficiary]) { }); function vestedAmount (total, now, start, cliffDuration, duration) { - return (now < start + cliffDuration) ? 0 : Math.round(total * (now - start) / duration); + return (now.lt(start.add(cliffDuration))) ? new BN(0) : total.mul((now.sub(start))).div(duration); } }); }); diff --git a/test/examples/SampleCrowdsale.test.js b/test/examples/SampleCrowdsale.test.js index 9df145aea..a27f0b9a2 100644 --- a/test/examples/SampleCrowdsale.test.js +++ b/test/examples/SampleCrowdsale.test.js @@ -1,17 +1,12 @@ -const { ether } = require('../helpers/ether'); -const shouldFail = require('../helpers/shouldFail'); -const time = require('../helpers/time'); -const { balanceDifference } = require('../helpers/balanceDifference'); - -const { should, BigNumber } = require('../helpers/setup'); +const { BN, balance, ether, should, shouldFail, time } = require('openzeppelin-test-helpers'); const SampleCrowdsale = artifacts.require('SampleCrowdsaleMock'); const SampleCrowdsaleToken = artifacts.require('SampleCrowdsaleTokenMock'); contract('SampleCrowdsale', function ([_, deployer, owner, wallet, investor]) { - const RATE = new BigNumber(10); - const GOAL = ether(10); - const CAP = ether(20); + const RATE = new BN(10); + const GOAL = ether('10'); + const CAP = ether('20'); before(async function () { // Advance to the next block to correctly read time in the solidity "now" function interpreted by ganache @@ -19,9 +14,9 @@ contract('SampleCrowdsale', function ([_, deployer, owner, wallet, investor]) { }); beforeEach(async function () { - this.openingTime = (await time.latest()) + time.duration.weeks(1); - this.closingTime = this.openingTime + time.duration.weeks(1); - this.afterClosingTime = this.closingTime + time.duration.seconds(1); + this.openingTime = (await time.latest()).add(time.duration.weeks(1)); + this.closingTime = this.openingTime.add(time.duration.weeks(1)); + this.afterClosingTime = this.closingTime.add(time.duration.seconds(1)); this.token = await SampleCrowdsaleToken.new({ from: deployer }); this.crowdsale = await SampleCrowdsale.new( @@ -46,12 +41,12 @@ contract('SampleCrowdsale', function ([_, deployer, owner, wallet, investor]) { }); it('should not accept payments before start', async function () { - await shouldFail.reverting(this.crowdsale.send(ether(1))); - await shouldFail.reverting(this.crowdsale.buyTokens(investor, { from: investor, value: ether(1) })); + await shouldFail.reverting(this.crowdsale.send(ether('1'))); + await shouldFail.reverting(this.crowdsale.buyTokens(investor, { from: investor, value: ether('1') })); }); it('should accept payments during the sale', async function () { - const investmentAmount = ether(1); + const investmentAmount = ether('1'); const expectedTokenAmount = RATE.mul(investmentAmount); await time.increaseTo(this.openingTime); @@ -63,8 +58,8 @@ contract('SampleCrowdsale', function ([_, deployer, owner, wallet, investor]) { it('should reject payments after end', async function () { await time.increaseTo(this.afterClosingTime); - await shouldFail.reverting(this.crowdsale.send(ether(1))); - await shouldFail.reverting(this.crowdsale.buyTokens(investor, { value: ether(1), from: investor })); + await shouldFail.reverting(this.crowdsale.send(ether('1'))); + await shouldFail.reverting(this.crowdsale.buyTokens(investor, { value: ether('1'), from: investor })); }); it('should reject payments over cap', async function () { @@ -77,26 +72,26 @@ contract('SampleCrowdsale', function ([_, deployer, owner, wallet, investor]) { await time.increaseTo(this.openingTime); await this.crowdsale.send(GOAL); - (await balanceDifference(wallet, async () => { + (await balance.difference(wallet, async () => { await time.increaseTo(this.afterClosingTime); await this.crowdsale.finalize({ from: owner }); })).should.be.bignumber.equal(GOAL); }); it('should allow refunds if the goal is not reached', async function () { - (await balanceDifference(investor, async () => { + (await balance.difference(investor, async () => { await time.increaseTo(this.openingTime); - await this.crowdsale.sendTransaction({ value: ether(1), from: investor, gasPrice: 0 }); + await this.crowdsale.sendTransaction({ value: ether('1'), from: investor, gasPrice: 0 }); await time.increaseTo(this.afterClosingTime); await this.crowdsale.finalize({ from: owner }); await this.crowdsale.claimRefund(investor, { gasPrice: 0 }); - })).should.be.bignumber.equal(0); + })).should.be.bignumber.equal('0'); }); describe('when goal > cap', function () { // goal > cap - const HIGH_GOAL = ether(30); + const HIGH_GOAL = ether('30'); it('creation reverts', async function () { await shouldFail.reverting(SampleCrowdsale.new( diff --git a/test/examples/SimpleToken.test.js b/test/examples/SimpleToken.test.js index 568943f03..1ec65ee07 100644 --- a/test/examples/SimpleToken.test.js +++ b/test/examples/SimpleToken.test.js @@ -1,8 +1,7 @@ -const expectEvent = require('../helpers/expectEvent'); -const { ZERO_ADDRESS } = require('../helpers/constants'); -const SimpleToken = artifacts.require('SimpleTokenMock'); +const { constants, expectEvent } = require('openzeppelin-test-helpers'); +const { ZERO_ADDRESS } = constants; -require('../helpers/setup'); +const SimpleToken = artifacts.require('SimpleToken'); contract('SimpleToken', function ([_, creator]) { beforeEach(async function () { @@ -18,7 +17,7 @@ contract('SimpleToken', function ([_, creator]) { }); it('has 18 decimals', async function () { - (await this.token.decimals()).should.be.bignumber.equal(18); + (await this.token.decimals()).should.be.bignumber.equal('18'); }); it('assigns the initial total supply to the creator', async function () { diff --git a/test/helpers/balanceDifference.js b/test/helpers/balanceDifference.js deleted file mode 100644 index e514b0160..000000000 --- a/test/helpers/balanceDifference.js +++ /dev/null @@ -1,12 +0,0 @@ -const { ethGetBalance } = require('./web3'); - -async function balanceDifference (account, promiseFunc) { - const balanceBefore = await ethGetBalance(account); - await promiseFunc(); - const balanceAfter = await ethGetBalance(account); - return balanceAfter.minus(balanceBefore); -} - -module.exports = { - balanceDifference, -}; diff --git a/test/helpers/constants.js b/test/helpers/constants.js deleted file mode 100644 index 4c75c6de2..000000000 --- a/test/helpers/constants.js +++ /dev/null @@ -1,8 +0,0 @@ -const BigNumber = web3.BigNumber; - -module.exports = { - ZERO_ADDRESS: '0x0000000000000000000000000000000000000000', - MAX_UINT256: new BigNumber(2).pow(256).minus(1), - MAX_INT256: new BigNumber(2).pow(255).minus(1), - MIN_INT256: new BigNumber(2).pow(255).times(-1), -}; diff --git a/test/helpers/ether.js b/test/helpers/ether.js deleted file mode 100644 index 6e11a112a..000000000 --- a/test/helpers/ether.js +++ /dev/null @@ -1,7 +0,0 @@ -function ether (n) { - return new web3.BigNumber(web3.toWei(n, 'ether')); -} - -module.exports = { - ether, -}; diff --git a/test/helpers/expectEvent.js b/test/helpers/expectEvent.js deleted file mode 100644 index 29d1027c3..000000000 --- a/test/helpers/expectEvent.js +++ /dev/null @@ -1,57 +0,0 @@ -const { should, BigNumber } = require('./setup'); - -const SolidityEvent = require('web3/lib/web3/event.js'); -const { ethGetTransactionReceipt } = require('./web3'); - -function inLogs (logs, eventName, eventArgs = {}) { - const event = logs.find(function (e) { - if (e.event === eventName) { - for (const [k, v] of Object.entries(eventArgs)) { - contains(e.args, k, v); - } - return true; - } - }); - should.exist(event); - return event; -} - -async function inConstruction (contract, eventName, eventArgs = {}) { - return inTransaction(contract.transactionHash, contract.constructor, eventName, eventArgs); -} - -async function inTransaction (txHash, emitter, eventName, eventArgs = {}) { - const receipt = await ethGetTransactionReceipt(txHash); - const logs = decodeLogs(receipt.logs, emitter.events); - - return inLogs(logs, eventName, eventArgs); -} - -function contains (args, key, value) { - if (isBigNumber(args[key])) { - args[key].should.be.bignumber.equal(value); - } else { - args[key].should.be.equal(value); - } -} - -function isBigNumber (object) { - return object.isBigNumber || - object instanceof BigNumber || - (object.constructor && object.constructor.name === 'BigNumber'); -} - -function decodeLogs (logs, events) { - return Array.prototype.concat(...logs.map(log => - log.topics.filter(topic => topic in events).map(topic => { - const event = new SolidityEvent(null, events[topic], 0); - return event.decode(log); - }) - )); -} - -module.exports = { - inLogs, - inConstruction, - inTransaction, -}; diff --git a/test/helpers/makeInterfaceId.js b/test/helpers/makeInterfaceId.js deleted file mode 100644 index c9963468a..000000000 --- a/test/helpers/makeInterfaceId.js +++ /dev/null @@ -1,25 +0,0 @@ -const { soliditySha3 } = require('web3-utils'); - -const INTERFACE_ID_LENGTH = 4; - -function makeInterfaceId (interfaces = []) { - const interfaceIdBuffer = interfaces - .map(methodSignature => soliditySha3(methodSignature)) // keccak256 - .map(h => - Buffer - .from(h.substring(2), 'hex') - .slice(0, 4) // bytes4() - ) - .reduce((memo, bytes) => { - for (let i = 0; i < INTERFACE_ID_LENGTH; i++) { - memo[i] = memo[i] ^ bytes[i]; // xor - } - return memo; - }, Buffer.alloc(INTERFACE_ID_LENGTH)); - - return `0x${interfaceIdBuffer.toString('hex')}`; -} - -module.exports = { - makeInterfaceId, -}; diff --git a/test/helpers/send.js b/test/helpers/send.js deleted file mode 100644 index a01fd6bcf..000000000 --- a/test/helpers/send.js +++ /dev/null @@ -1,26 +0,0 @@ -const ethjsABI = require('ethjs-abi'); -const { ethSendTransaction } = require('./web3'); - -function findMethod (abi, name, args) { - for (let i = 0; i < abi.length; i++) { - const methodArgs = abi[i].inputs.map(input => input.type).join(','); - if ((abi[i].name === name) && (methodArgs === args)) { - return abi[i]; - } - } -} - -async function transaction (target, name, argsTypes, argsValues, opts) { - const abiMethod = findMethod(target.abi, name, argsTypes); - const encodedData = ethjsABI.encodeMethod(abiMethod, argsValues); - return target.sendTransaction(Object.assign({ data: encodedData }, opts)); -} - -function ether (from, to, value) { - return ethSendTransaction({ from, to, value, gasPrice: 0 }); -} - -module.exports = { - ether, - transaction, -}; diff --git a/test/helpers/setup.js b/test/helpers/setup.js deleted file mode 100644 index d27794d5e..000000000 --- a/test/helpers/setup.js +++ /dev/null @@ -1,9 +0,0 @@ -const chai = require('chai'); - -const BigNumber = web3.BigNumber; -const should = chai.use(require('chai-bignumber')(BigNumber)).should(); - -module.exports = { - BigNumber, - should, -}; diff --git a/test/helpers/shouldFail.js b/test/helpers/shouldFail.js deleted file mode 100644 index 139339c7e..000000000 --- a/test/helpers/shouldFail.js +++ /dev/null @@ -1,36 +0,0 @@ -const { should } = require('./setup'); - -async function shouldFailWithMessage (promise, message) { - try { - await promise; - } catch (error) { - if (message) { - error.message.should.include(message, `Wrong failure type, expected '${message}'`); - } - return; - } - - should.fail('Expected failure not received'); -} - -async function reverting (promise) { - await shouldFailWithMessage(promise, 'revert'); -} - -async function throwing (promise) { - await shouldFailWithMessage(promise, 'invalid opcode'); -} - -async function outOfGas (promise) { - await shouldFailWithMessage(promise, 'out of gas'); -} - -async function shouldFail (promise) { - await shouldFailWithMessage(promise); -} - -shouldFail.reverting = reverting; -shouldFail.throwing = throwing; -shouldFail.outOfGas = outOfGas; - -module.exports = shouldFail; diff --git a/test/helpers/sign.js b/test/helpers/sign.js index 9164a9cd1..1c60b6484 100644 --- a/test/helpers/sign.js +++ b/test/helpers/sign.js @@ -1,38 +1,22 @@ -const { sha3, soliditySha3 } = require('web3-utils'); - const REAL_SIGNATURE_SIZE = 2 * 65; // 65 bytes in hexadecimal string legnth const PADDED_SIGNATURE_SIZE = 2 * 96; // 96 bytes in hexadecimal string length -const DUMMY_SIGNATURE = `0x${web3.padLeft('', REAL_SIGNATURE_SIZE)}`; +const DUMMY_SIGNATURE = `0x${web3.utils.padLeft('', REAL_SIGNATURE_SIZE)}`; -// messageHex = '0xdeadbeef' function toEthSignedMessageHash (messageHex) { const messageBuffer = Buffer.from(messageHex.substring(2), 'hex'); const prefix = Buffer.from(`\u0019Ethereum Signed Message:\n${messageBuffer.length}`); - return sha3(Buffer.concat([prefix, messageBuffer])); + return web3.utils.sha3(Buffer.concat([prefix, messageBuffer])); } // signs message in node (ganache auto-applies "Ethereum Signed Message" prefix) -// messageHex = '0xdeadbeef' const signMessage = (signer, messageHex = '0x') => { - return web3.eth.sign(signer, messageHex); // actually personal_sign -}; - -// @TODO - remove this when we migrate to web3-1.0.0 -const transformToFullName = function (json) { - if (json.name.indexOf('(') !== -1) { - return json.name; - } - - const typeName = json.inputs.map(function (i) { return i.type; }).join(); - return json.name + '(' + typeName + ')'; + return web3.eth.sign(messageHex, signer); }; /** * Create a signer between a contract and a signer for a voucher of method, args, and redeemer * Note that `method` is the web3 method, not the truffle-contract method - * Well truffle is terrible, but luckily (?) so is web3 < 1.0, so we get to make our own method id - * fetcher because the method on the contract isn't actually the SolidityFunction object ಠ_ಠ * @param contract TruffleContract * @param signer address * @param redeemer address @@ -49,21 +33,17 @@ const getSignFor = (contract, signer) => (redeemer, methodName, methodArgs = []) if (methodName) { if (methodArgs.length > 0) { parts.push( - contract.contract[methodName].getData(...methodArgs.concat([DUMMY_SIGNATURE])).slice( - 0, - -1 * PADDED_SIGNATURE_SIZE - ) + contract.contract.methods[methodName](...methodArgs.concat([DUMMY_SIGNATURE])).encodeABI() + .slice(0, -1 * PADDED_SIGNATURE_SIZE) ); } else { const abi = contract.abi.find(abi => abi.name === methodName); - const name = transformToFullName(abi); - const signature = sha3(name).slice(0, 10); - parts.push(signature); + parts.push(abi.signature); } } // return the signature of the "Ethereum Signed Message" hash of the hash of `parts` - const messageHex = soliditySha3(...parts); + const messageHex = web3.utils.soliditySha3(...parts); return signMessage(signer, messageHex); }; diff --git a/test/helpers/test/balanceDifference.test.js b/test/helpers/test/balanceDifference.test.js deleted file mode 100644 index 98846db9d..000000000 --- a/test/helpers/test/balanceDifference.test.js +++ /dev/null @@ -1,22 +0,0 @@ -const { balanceDifference } = require('../balanceDifference'); -const send = require('../send'); -const { ether } = require('../ether'); - -const BigNumber = web3.BigNumber; -require('chai') - .use(require('chai-bignumber')(BigNumber)) - .should(); - -contract('balanceDifference', function ([sender, receiver]) { - it('returns balance increments', async function () { - (await balanceDifference(receiver, () => - send.ether(sender, receiver, ether(1))) - ).should.be.bignumber.equal(ether(1)); - }); - - it('returns balance decrements', async function () { - (await balanceDifference(sender, () => - send.ether(sender, receiver, ether(1))) - ).should.be.bignumber.equal(ether(-1)); - }); -}); diff --git a/test/helpers/test/ether.test.js b/test/helpers/test/ether.test.js deleted file mode 100644 index c06161571..000000000 --- a/test/helpers/test/ether.test.js +++ /dev/null @@ -1,16 +0,0 @@ -const { ether } = require('../ether'); - -const BigNumber = web3.BigNumber; -require('chai') - .use(require('chai-bignumber')(BigNumber)) - .should(); - -describe('ether', function () { - it('returns a BigNumber', function () { - ether(1, 'ether').should.be.bignumber.equal(new BigNumber(1000000000000000000)); - }); - - it('works with negative amounts', function () { - ether(-1, 'ether').should.be.bignumber.equal(new BigNumber(-1000000000000000000)); - }); -}); diff --git a/test/helpers/test/expectEvent.test.js b/test/helpers/test/expectEvent.test.js deleted file mode 100644 index 4dd81560f..000000000 --- a/test/helpers/test/expectEvent.test.js +++ /dev/null @@ -1,375 +0,0 @@ -const expectEvent = require('../expectEvent'); -const shouldFail = require('../shouldFail'); - -const EventEmitter = artifacts.require('EventEmitter'); -const IndirectEventEmitter = artifacts.require('IndirectEventEmitter'); - -const { should, BigNumber } = require('../../helpers/setup'); - -describe('expectEvent', function () { - beforeEach(async function () { - this.constructionValues = { - uint: 42, - boolean: true, - string: 'OpenZeppelin', - }; - - this.emitter = await EventEmitter.new( - this.constructionValues.uint, - this.constructionValues.boolean, - this.constructionValues.string - ); - }); - - describe('inConstructor', function () { - context('short uint value', function () { - it('accepts emitted events with correct number', async function () { - await expectEvent.inConstruction(this.emitter, 'ShortUint', - { value: this.constructionValues.uint } - ); - }); - - it('throws if an incorrect value is passed', async function () { - await shouldFail(expectEvent.inConstruction(this.emitter, 'ShortUint', { value: 23 })); - }); - }); - - context('boolean value', function () { - it('accepts emitted events with correct value', async function () { - await expectEvent.inConstruction(this.emitter, 'Boolean', { value: this.constructionValues.boolean }); - }); - - it('throws if an incorrect value is passed', async function () { - await shouldFail(expectEvent.inConstruction(this.emitter, 'Boolean', - { value: !this.constructionValues.boolean } - )); - }); - }); - - context('string value', function () { - it('accepts emitted events with correct string', async function () { - await expectEvent.inConstruction(this.emitter, 'String', { value: this.constructionValues.string }); - }); - - it('throws if an incorrect string is passed', async function () { - await shouldFail(expectEvent.inConstruction(this.emitter, 'String', { value: 'ClosedZeppelin' })); - }); - }); - - it('throws if an unemitted event is requested', async function () { - await shouldFail(expectEvent.inConstruction(this.emitter, 'UnemittedEvent')); - }); - }); - - describe('inLogs', function () { - describe('with no arguments', function () { - beforeEach(async function () { - ({ logs: this.logs } = await this.emitter.emitArgumentless()); - }); - - it('accepts emitted events', function () { - expectEvent.inLogs(this.logs, 'Argumentless'); - }); - - it('throws if an unemitted event is requested', function () { - should.Throw(() => expectEvent.inLogs(this.logs, 'UnemittedEvent')); - }); - }); - - describe('with single argument', function () { - context('short uint value', function () { - beforeEach(async function () { - this.value = 42; - ({ logs: this.logs } = await this.emitter.emitShortUint(this.value)); - }); - - it('accepts emitted events with correct JavaScript number', function () { - expectEvent.inLogs(this.logs, 'ShortUint', { value: this.value }); - }); - - it('accepts emitted events with correct BigNumber', function () { - expectEvent.inLogs(this.logs, 'ShortUint', { value: new BigNumber(this.value) }); - }); - - it('throws if an unemitted event is requested', function () { - should.Throw(() => expectEvent.inLogs(this.logs, 'UnemittedEvent', { value: this.value })); - }); - - it('throws if an incorrect value is passed', function () { - should.Throw(() => expectEvent.inLogs(this.logs, 'ShortUint', { value: 23 })); - }); - }); - - context('short int value', function () { - beforeEach(async function () { - this.value = -42; - ({ logs: this.logs } = await this.emitter.emitShortInt(this.value)); - }); - - it('accepts emitted events with correct JavaScript number', function () { - expectEvent.inLogs(this.logs, 'ShortInt', { value: this.value }); - }); - - it('accepts emitted events with correct BigNumber', function () { - expectEvent.inLogs(this.logs, 'ShortInt', { value: new BigNumber(this.value) }); - }); - - it('throws if an unemitted event is requested', function () { - should.Throw(() => expectEvent.inLogs(this.logs, 'UnemittedEvent', { value: this.value })); - }); - - it('throws if an incorrect value is passed', function () { - should.Throw(() => expectEvent.inLogs(this.logs, 'ShortInt', { value: -23 })); - }); - }); - - context('long uint value', function () { - beforeEach(async function () { - this.bigNumValue = new BigNumber('123456789012345678901234567890'); - ({ logs: this.logs } = await this.emitter.emitLongUint(this.bigNumValue)); - }); - - it('accepts emitted events with correct BigNumber', function () { - expectEvent.inLogs(this.logs, 'LongUint', { value: this.bigNumValue }); - }); - - it('throws if an unemitted event is requested', function () { - should.Throw(() => expectEvent.inLogs(this.logs, 'UnemittedEvent', { value: this.bigNumValue })); - }); - - it('throws if an incorrect value is passed', function () { - should.Throw(() => expectEvent.inLogs(this.logs, 'LongUint', { value: 2300 })); - }); - }); - - context('long int value', function () { - beforeEach(async function () { - this.bigNumValue = new BigNumber('-123456789012345678901234567890'); - ({ logs: this.logs } = await this.emitter.emitLongInt(this.bigNumValue)); - }); - - it('accepts emitted events with correct BigNumber', function () { - expectEvent.inLogs(this.logs, 'LongInt', { value: this.bigNumValue }); - }); - - it('throws if an unemitted event is requested', function () { - should.Throw(() => expectEvent.inLogs(this.logs, 'UnemittedEvent', { value: this.bigNumValue })); - }); - - it('throws if an incorrect value is passed', function () { - should.Throw(() => expectEvent.inLogs(this.logs, 'LongInt', { value: -2300 })); - }); - }); - - context('address value', function () { - beforeEach(async function () { - this.value = '0x811412068e9fbf25dc300a29e5e316f7122b282c'; - ({ logs: this.logs } = await this.emitter.emitAddress(this.value)); - }); - - it('accepts emitted events with correct address', function () { - expectEvent.inLogs(this.logs, 'Address', { value: this.value }); - }); - - it('throws if an unemitted event is requested', function () { - should.Throw(() => expectEvent.inLogs(this.logs, 'UnemittedEvent', { value: this.value })); - }); - - it('throws if an incorrect value is passed', function () { - should.Throw(() => - expectEvent.inLogs(this.logs, 'Address', { value: '0x21d04e022e0b52b5d5bcf90b7f1aabf406be002d' }) - ); - }); - }); - - context('boolean value', function () { - beforeEach(async function () { - this.value = true; - ({ logs: this.logs } = await this.emitter.emitBoolean(this.value)); - }); - - it('accepts emitted events with correct address', function () { - expectEvent.inLogs(this.logs, 'Boolean', { value: this.value }); - }); - - it('throws if an unemitted event is requested', function () { - should.Throw(() => expectEvent.inLogs(this.logs, 'UnemittedEvent', { value: this.value })); - }); - - it('throws if an incorrect value is passed', function () { - should.Throw(() => expectEvent.inLogs(this.logs, 'Boolean', { value: false })); - }); - }); - - context('string value', function () { - beforeEach(async function () { - this.value = 'OpenZeppelin'; - ({ logs: this.logs } = await this.emitter.emitString(this.value)); - }); - - it('accepts emitted events with correct string', function () { - expectEvent.inLogs(this.logs, 'String', { value: this.value }); - }); - - it('throws if an unemitted event is requested', function () { - should.Throw(() => expectEvent.inLogs(this.logs, 'UnemittedEvent', { value: this.value })); - }); - - it('throws if an incorrect value is passed', function () { - should.Throw(() => expectEvent.inLogs(this.logs, 'String', { value: 'ClosedZeppelin' })); - }); - }); - }); - - describe('with multiple arguments', function () { - beforeEach(async function () { - this.uintValue = new BigNumber('123456789012345678901234567890'); - this.booleanValue = true; - this.stringValue = 'OpenZeppelin'; - ({ logs: this.logs } = - await this.emitter.emitLongUintBooleanString(this.uintValue, this.booleanValue, this.stringValue)); - }); - - it('accepts correct values', function () { - expectEvent.inLogs(this.logs, 'LongUintBooleanString', { - uintValue: this.uintValue, booleanValue: this.booleanValue, stringValue: this.stringValue, - }); - }); - - it('throws with correct values assigned to wrong arguments', function () { - should.Throw(() => expectEvent.inLogs(this.logs, 'LongUintBooleanString', { - uintValue: this.booleanValue, booleanValue: this.uintValue, stringValue: this.stringValue, - })); - }); - - it('throws when any of the values is incorrect', function () { - should.Throw(() => expectEvent.inLogs(this.logs, 'LongUintBooleanString', { - uintValue: 23, booleanValue: this.booleanValue, stringValue: this.stringValue, - })); - - should.Throw(() => expectEvent.inLogs(this.logs, 'LongUintBooleanString', { - uintValue: this.uintValue, booleanValue: false, stringValue: this.stringValue, - })); - - should.Throw(() => expectEvent.inLogs(this.logs, 'LongUintBooleanString', { - uintValue: this.uintValue, booleanValue: this.booleanValue, stringValue: 'ClosedZeppelin', - })); - }); - }); - - describe('with multiple events', function () { - beforeEach(async function () { - this.uintValue = 42; - this.booleanValue = true; - ({ logs: this.logs } = await this.emitter.emitLongUintAndBoolean(this.uintValue, this.booleanValue)); - }); - - it('accepts all emitted events with correct values', function () { - expectEvent.inLogs(this.logs, 'LongUint', { value: this.uintValue }); - expectEvent.inLogs(this.logs, 'Boolean', { value: this.booleanValue }); - }); - - it('throws if an unemitted event is requested', function () { - should.Throw(() => expectEvent.inLogs(this.logs, 'UnemittedEvent', { value: this.uintValue })); - }); - - it('throws if incorrect values are passed', function () { - should.Throw(() => expectEvent.inLogs(this.logs, 'LongUint', { value: 23 })); - should.Throw(() => expectEvent.inLogs(this.logs, 'Boolean', { value: false })); - }); - }); - - describe('with events emitted by an indirectly called contract', function () { - beforeEach(async function () { - this.secondEmitter = await IndirectEventEmitter.new(); - - this.value = 'OpenZeppelin'; - ({ logs: this.logs } = await this.emitter.emitStringAndEmitIndirectly(this.value, this.secondEmitter.address)); - }); - - it('accepts events emitted by the directly called contract', function () { - expectEvent.inLogs(this.logs, 'String', { value: this.value }); - }); - - it('throws when passing events emitted by the indirectly called contract', function () { - should.Throw(() => expectEvent.inLogs(this.logs, 'IndirectString', { value: this.value })); - }); - }); - }); - - describe('inTransaction', function () { - describe('when emitting from called contract and indirect calls', function () { - context('string value', function () { - beforeEach(async function () { - this.secondEmitter = await IndirectEventEmitter.new(); - - this.value = 'OpenZeppelin'; - const receipt = await this.emitter.emitStringAndEmitIndirectly(this.value, this.secondEmitter.address); - this.txHash = receipt.tx; - }); - - context('with directly called contract', function () { - it('accepts emitted events with correct string', async function () { - await expectEvent.inTransaction(this.txHash, EventEmitter, 'String', { value: this.value }); - }); - - it('throws if an unemitted event is requested', async function () { - await shouldFail(expectEvent.inTransaction(this.txHash, EventEmitter, 'UnemittedEvent', - { value: this.value } - )); - }); - - it('throws if an incorrect string is passed', async function () { - await shouldFail(expectEvent.inTransaction(this.txHash, EventEmitter, 'String', - { value: 'ClosedZeppelin' } - )); - }); - - it('throws if an event emitted from other contract is passed', async function () { - await shouldFail(expectEvent.inTransaction(this.txHash, EventEmitter, 'IndirectString', - { value: this.value } - )); - }); - - it('throws if an incorrect emitter is passed', async function () { - await shouldFail(expectEvent.inTransaction(this.txHash, IndirectEventEmitter, 'String', - { value: this.value } - )); - }); - }); - - context('with indirectly called contract', function () { - it('accepts events emitted from other contracts', async function () { - await expectEvent.inTransaction(this.txHash, IndirectEventEmitter, 'IndirectString', - { value: this.value } - ); - }); - - it('throws if an unemitted event is requested', async function () { - await shouldFail(expectEvent.inTransaction(this.txHash, IndirectEventEmitter, 'UnemittedEvent', - { value: this.value } - )); - }); - - it('throws if an incorrect string is passed', async function () { - await shouldFail(expectEvent.inTransaction(this.txHash, IndirectEventEmitter, 'IndirectString', - { value: 'ClosedZeppelin' } - )); - }); - - it('throws if an event emitted from other contract is passed', async function () { - await shouldFail(expectEvent.inTransaction(this.txHash, IndirectEventEmitter, 'String', - { value: this.value } - )); - }); - - it('throws if an incorrect emitter is passed', async function () { - await shouldFail(expectEvent.inTransaction(this.txHash, EventEmitter, 'IndirectString', - { value: this.value } - )); - }); - }); - }); - }); - }); -}); diff --git a/test/helpers/test/makeInterfaceId.test.js b/test/helpers/test/makeInterfaceId.test.js deleted file mode 100644 index fd4920438..000000000 --- a/test/helpers/test/makeInterfaceId.test.js +++ /dev/null @@ -1,20 +0,0 @@ -const { makeInterfaceId } = require('../makeInterfaceId'); - -const OwnableInterfaceId = artifacts.require('OwnableInterfaceId'); - -require('chai') - .should(); - -describe('makeInterfaceId', function () { - it('calculates the EIP165 interface id from function signatures', async function () { - const calculator = await OwnableInterfaceId.new(); - const ownableId = await calculator.getInterfaceId(); - - makeInterfaceId([ - 'owner()', - 'isOwner()', - 'renounceOwnership()', - 'transferOwnership(address)', - ]).should.equal(ownableId); - }); -}); diff --git a/test/helpers/test/send.test.js b/test/helpers/test/send.test.js deleted file mode 100644 index c868626a1..000000000 --- a/test/helpers/test/send.test.js +++ /dev/null @@ -1,70 +0,0 @@ -const send = require('../send'); -const shouldFail = require('../shouldFail'); -const expectEvent = require('../expectEvent'); -const { ether } = require('../ether'); -const { ethGetBalance } = require('../web3'); - -const Acknowledger = artifacts.require('Acknowledger'); - -const BigNumber = web3.BigNumber; -require('chai') - .use(require('chai-bignumber')(BigNumber)) - .should(); - -contract('send', function ([sender, receiver]) { - describe('ether', function () { - it('sends ether with no gas cost', async function () { - const value = ether(1); - - const initialSenderBalance = await ethGetBalance(sender); - const initialReceiverBalance = await ethGetBalance(receiver); - - await send.ether(sender, receiver, value); - - const finalSenderBalance = await ethGetBalance(sender); - const finalReceiverBalance = await ethGetBalance(receiver); - - finalSenderBalance.sub(initialSenderBalance).should.be.bignumber.equal(-value); - finalReceiverBalance.sub(initialReceiverBalance).should.be.bignumber.equal(value); - }); - - it('throws if the sender balance is insufficient', async function () { - const value = (await ethGetBalance(sender)).plus(1); - - await shouldFail(send.ether(sender, receiver, value)); - }); - }); - - describe('transaction', function () { - beforeEach(async function () { - this.acknowledger = await Acknowledger.new(); - }); - - it('calls a function from its signature ', async function () { - const { logs } = await send.transaction(this.acknowledger, 'foo', 'uint256', [3]); - expectEvent.inLogs(logs, 'AcknowledgeFoo', { a: 3 }); - }); - - it('calls overloaded functions with less arguments', async function () { - const { logs } = await send.transaction(this.acknowledger, 'bar', 'uint256', [3]); - expectEvent.inLogs(logs, 'AcknowledgeBarSingle', { a: 3 }); - }); - - it('calls overloaded functions with more arguments', async function () { - const { logs } = await send.transaction(this.acknowledger, 'bar', 'uint256,uint256', [3, 5]); - expectEvent.inLogs(logs, 'AcknowledgeBarDouble', { a: 3, b: 5 }); - }); - - it('throws if the number of arguments does not match', async function () { - await shouldFail(send.transaction(this.acknowledger, 'foo', 'uint256, uint256', [3, 5])); - }); - - it('throws if the method does not exist', async function () { - await shouldFail(send.transaction(this.acknowledger, 'baz', 'uint256', [3])); - }); - - it('throws if there is a mismatch in the number of types and values', async function () { - await shouldFail(send.transaction(this.acknowledger, 'foo', 'uint256', [3, 3])); - }); - }); -}); diff --git a/test/helpers/test/shouldFail.test.js b/test/helpers/test/shouldFail.test.js deleted file mode 100644 index 8f99efe30..000000000 --- a/test/helpers/test/shouldFail.test.js +++ /dev/null @@ -1,95 +0,0 @@ -const shouldFail = require('../shouldFail'); - -const BigNumber = web3.BigNumber; -const should = require('chai') - .use(require('chai-bignumber')(BigNumber)) - .should(); - -const Failer = artifacts.require('Failer'); - -async function assertFailure (promise) { - try { - await promise; - } catch (error) { - return; - } - should.fail(); -} - -describe('shouldFail', function () { - beforeEach(async function () { - this.failer = await Failer.new(); - }); - - describe('shouldFail', function () { - it('rejects if no failure occurs', async function () { - await assertFailure(shouldFail(this.failer.dontFail())); - }); - - it('accepts a revert', async function () { - await shouldFail(this.failer.failWithRevert()); - }); - - it('accepts a throw', async function () { - await shouldFail(this.failer.failWithThrow()); - }); - - it('accepts an out of gas', async function () { - await shouldFail(this.failer.failWithOutOfGas({ gas: 2000000 })); - }); - }); - - describe('reverting', function () { - it('rejects if no failure occurs', async function () { - await assertFailure(shouldFail.reverting(this.failer.dontFail())); - }); - - it('accepts a revert', async function () { - await shouldFail.reverting(this.failer.failWithRevert()); - }); - - it('rejects a throw', async function () { - await assertFailure(shouldFail.reverting(this.failer.failWithThrow())); - }); - - it('rejects an outOfGas', async function () { - await assertFailure(shouldFail.reverting(this.failer.failWithOutOfGas({ gas: 2000000 }))); - }); - }); - - describe('throwing', function () { - it('rejects if no failure occurs', async function () { - await assertFailure(shouldFail.throwing(this.failer.dontFail())); - }); - - it('accepts a throw', async function () { - await shouldFail.throwing(this.failer.failWithThrow()); - }); - - it('rejects a throw', async function () { - await assertFailure(shouldFail.throwing(this.failer.failWithRevert())); - }); - - it('rejects an outOfGas', async function () { - await assertFailure(shouldFail.throwing(this.failer.failWithOutOfGas({ gas: 2000000 }))); - }); - }); - - describe('outOfGas', function () { - it('rejects if no failure occurs', async function () { - await assertFailure(shouldFail.outOfGas(this.failer.dontFail())); - }); - - it('accepts an out of gas', async function () { - await shouldFail.outOfGas(this.failer.failWithOutOfGas({ gas: 2000000 })); - }); - - it('rejects a revert', async function () { - await assertFailure(shouldFail.outOfGas(this.failer.failWithRevert())); - }); - - it('rejects a throw', async function () { - await assertFailure(shouldFail.outOfGas(this.failer.failWithThrow())); - }); - }); -}); diff --git a/test/helpers/test/time.test.js b/test/helpers/test/time.test.js deleted file mode 100644 index 556ae92f8..000000000 --- a/test/helpers/test/time.test.js +++ /dev/null @@ -1,77 +0,0 @@ -const time = require('../time'); -const shouldFail = require('../shouldFail'); - -const BigNumber = web3.BigNumber; -require('chai') - .use(require('chai-bignumber')(BigNumber)) - .should(); - -describe('time', function () { - const TOLERANCE_SECONDS = 1; - - describe('duration', function () { - it('converts seconds to seconds', function () { - time.duration.seconds(1).should.equal(1); - }); - - it('converts minutes to seconds', function () { - time.duration.minutes(1).should.equal(60); - }); - - it('converts hours to seconds', function () { - time.duration.hours(1).should.equal(60 * 60); - }); - - it('converts days to seconds', function () { - time.duration.days(1).should.equal(60 * 60 * 24); - }); - - it('converts weeks to seconds', function () { - time.duration.weeks(1).should.equal(60 * 60 * 24 * 7); - }); - - it('converts years to seconds', function () { - time.duration.years(1).should.equal(60 * 60 * 24 * 365); - }); - }); - - describe('advanceBlock', function () { - it('increases the block number by one', async function () { - const startingBlock = web3.eth.blockNumber; - await time.advanceBlock(); - web3.eth.blockNumber.should.be.bignumber.equal(startingBlock + 1); - }); - }); - - context('with starting time', function () { - beforeEach(async function () { - await time.advanceBlock(); - this.start = await time.latest(); - }); - - describe('increase', function () { - it('increases time by a duration', async function () { - await time.increase(time.duration.hours(1)); - - const end = this.start + time.duration.hours(1); - (await time.latest()).should.be.closeTo(end, TOLERANCE_SECONDS); - }); - - it('throws with negative durations', async function () { - await shouldFail(time.increase(-1)); - }); - }); - - describe('increaseTo', function () { - it('increases time to a time in the future', async function () { - const end = this.start + time.duration.hours(1); - await time.increaseTo(end); - (await time.latest()).should.be.closeTo(end, TOLERANCE_SECONDS); - }); - - it('throws with a time in the past', async function () { - await shouldFail(time.increaseTo(this.start - 30)); - }); - }); - }); -}); diff --git a/test/helpers/time.js b/test/helpers/time.js deleted file mode 100644 index c8c844079..000000000 --- a/test/helpers/time.js +++ /dev/null @@ -1,60 +0,0 @@ -const { ethGetBlock } = require('./web3'); -const pify = require('pify'); - -function advanceBlock () { - return pify(web3.currentProvider.sendAsync)({ - jsonrpc: '2.0', - method: 'evm_mine', - }); -} - -// Returns the time of the last mined block in seconds -async function latest () { - const block = await ethGetBlock('latest'); - return block.timestamp; -} - -// Increases ganache time by the passed duration in seconds -async function increase (duration) { - if (duration < 0) throw Error(`Cannot increase time by a negative amount (${duration})`); - - await pify(web3.currentProvider.sendAsync)({ - jsonrpc: '2.0', - method: 'evm_increaseTime', - params: [duration], - }); - - await advanceBlock(); -} - -/** - * Beware that due to the need of calling two separate ganache methods and rpc calls overhead - * it's hard to increase time precisely to a target point so design your test to tolerate - * small fluctuations from time to time. - * - * @param target time in seconds - */ -async function increaseTo (target) { - const now = (await latest()); - - if (target < now) throw Error(`Cannot increase current time (${now}) to a moment in the past (${target})`); - const diff = target - now; - return increase(diff); -} - -const duration = { - seconds: function (val) { return val; }, - minutes: function (val) { return val * this.seconds(60); }, - hours: function (val) { return val * this.minutes(60); }, - days: function (val) { return val * this.hours(24); }, - weeks: function (val) { return val * this.days(7); }, - years: function (val) { return val * this.days(365); }, -}; - -module.exports = { - advanceBlock, - latest, - increase, - increaseTo, - duration, -}; diff --git a/test/helpers/web3.js b/test/helpers/web3.js deleted file mode 100644 index b6cd493e1..000000000 --- a/test/helpers/web3.js +++ /dev/null @@ -1,10 +0,0 @@ -const pify = require('pify'); - -const ethAsync = pify(web3.eth); - -module.exports = { - ethGetBalance: ethAsync.getBalance, - ethGetBlock: ethAsync.getBlock, - ethGetTransactionReceipt: ethAsync.getTransactionReceipt, - ethSendTransaction: ethAsync.sendTransaction, -}; diff --git a/test/introspection/ERC165.test.js b/test/introspection/ERC165.test.js index 0dc2f8471..64ca89eb7 100644 --- a/test/introspection/ERC165.test.js +++ b/test/introspection/ERC165.test.js @@ -1,20 +1,15 @@ +const { shouldFail } = require('openzeppelin-test-helpers'); const { shouldSupportInterfaces } = require('./SupportsInterface.behavior'); -const shouldFail = require('../helpers/shouldFail'); const ERC165Mock = artifacts.require('ERC165Mock'); -require('chai') - .should(); - contract('ERC165', function () { beforeEach(async function () { this.mock = await ERC165Mock.new(); }); it('does not allow 0xffffffff', async function () { - await shouldFail.reverting( - this.mock.registerInterface(0xffffffff) - ); + await shouldFail.reverting(this.mock.registerInterface('0xffffffff')); }); shouldSupportInterfaces([ diff --git a/test/introspection/ERC165Checker.test.js b/test/introspection/ERC165Checker.test.js index c339c78ab..881d19dcf 100644 --- a/test/introspection/ERC165Checker.test.js +++ b/test/introspection/ERC165Checker.test.js @@ -1,3 +1,5 @@ +require('openzeppelin-test-helpers'); + const ERC165CheckerMock = artifacts.require('ERC165CheckerMock'); const ERC165NotSupported = artifacts.require('ERC165NotSupported'); const ERC165InterfacesSupported = artifacts.require('ERC165InterfacesSupported'); @@ -9,8 +11,6 @@ const DUMMY_UNSUPPORTED_ID = '0xbaddcafe'; const DUMMY_UNSUPPORTED_ID_2 = '0xbaadcafe'; const DUMMY_ACCOUNT = '0x1111111111111111111111111111111111111111'; -require('../helpers/setup'); - contract('ERC165Checker', function () { beforeEach(async function () { this.mock = await ERC165CheckerMock.new(); diff --git a/test/introspection/SupportsInterface.behavior.js b/test/introspection/SupportsInterface.behavior.js index 838787f72..fde7f5cc6 100644 --- a/test/introspection/SupportsInterface.behavior.js +++ b/test/introspection/SupportsInterface.behavior.js @@ -1,4 +1,4 @@ -const { makeInterfaceId } = require('../helpers/makeInterfaceId'); +const { makeInterfaceId } = require('openzeppelin-test-helpers'); const INTERFACE_IDS = { ERC165: makeInterfaceId([ diff --git a/test/lifecycle/Pausable.test.js b/test/lifecycle/Pausable.test.js index 7b8d3e8cb..337adcfc7 100644 --- a/test/lifecycle/Pausable.test.js +++ b/test/lifecycle/Pausable.test.js @@ -1,10 +1,7 @@ -const shouldFail = require('../helpers/shouldFail'); -const expectEvent = require('../helpers/expectEvent'); +const { expectEvent, shouldFail } = require('openzeppelin-test-helpers'); +const { shouldBehaveLikePublicRole } = require('../behaviors/access/roles/PublicRole.behavior'); const PausableMock = artifacts.require('PausableMock'); -const { shouldBehaveLikePublicRole } = require('../access/roles/PublicRole.behavior'); - -require('../helpers/setup'); contract('Pausable', function ([_, pauser, otherPauser, anyone, ...otherAccounts]) { beforeEach(async function () { @@ -26,10 +23,10 @@ contract('Pausable', function ([_, pauser, otherPauser, anyone, ...otherAccounts }); it('can perform normal process in non-pause', async function () { - (await this.pausable.count()).should.be.bignumber.equal(0); + (await this.pausable.count()).should.be.bignumber.equal('0'); await this.pausable.normalProcess({ from: anyone }); - (await this.pausable.count()).should.be.bignumber.equal(1); + (await this.pausable.count()).should.be.bignumber.equal('1'); }); it('cannot take drastic measure in non-pause', async function () { @@ -89,9 +86,9 @@ contract('Pausable', function ([_, pauser, otherPauser, anyone, ...otherAccounts }); it('should resume allowing normal process', async function () { - (await this.pausable.count()).should.be.bignumber.equal(0); + (await this.pausable.count()).should.be.bignumber.equal('0'); await this.pausable.normalProcess({ from: anyone }); - (await this.pausable.count()).should.be.bignumber.equal(1); + (await this.pausable.count()).should.be.bignumber.equal('1'); }); it('should prevent drastic measure', async function () { diff --git a/test/math/Math.test.js b/test/math/Math.test.js index 99ab04531..d28d66ef5 100644 --- a/test/math/Math.test.js +++ b/test/math/Math.test.js @@ -1,10 +1,10 @@ +const { BN } = require('openzeppelin-test-helpers'); + const MathMock = artifacts.require('MathMock'); -const { BigNumber } = require('../helpers/setup'); - contract('Math', function () { - const min = 1234; - const max = 5678; + const min = new BN('1234'); + const max = new BN('5678'); beforeEach(async function () { this.math = await MathMock.new(); @@ -32,24 +32,24 @@ contract('Math', function () { describe('average', function () { function bnAverage (a, b) { - return a.plus(b).div(2).truncated(); + return a.add(b).divn(2); } it('is correctly calculated with two odd numbers', async function () { - const a = new BigNumber(57417); - const b = new BigNumber(95431); + const a = new BN('57417'); + const b = new BN('95431'); (await this.math.average(a, b)).should.be.bignumber.equal(bnAverage(a, b)); }); it('is correctly calculated with two even numbers', async function () { - const a = new BigNumber(42304); - const b = new BigNumber(84346); + const a = new BN('42304'); + const b = new BN('84346'); (await this.math.average(a, b)).should.be.bignumber.equal(bnAverage(a, b)); }); it('is correctly calculated with one even and one odd number', async function () { - const a = new BigNumber(57417); - const b = new BigNumber(84346); + const a = new BN('57417'); + const b = new BN('84346'); (await this.math.average(a, b)).should.be.bignumber.equal(bnAverage(a, b)); }); }); diff --git a/test/math/SafeMath.test.js b/test/math/SafeMath.test.js index 221c998ff..3869d5c1e 100644 --- a/test/math/SafeMath.test.js +++ b/test/math/SafeMath.test.js @@ -1,10 +1,8 @@ -const shouldFail = require('../helpers/shouldFail'); -const { MAX_UINT256 } = require('../helpers/constants'); +const { BN, constants, shouldFail } = require('openzeppelin-test-helpers'); +const { MAX_UINT256 } = constants; const SafeMathMock = artifacts.require('SafeMathMock'); -const { BigNumber } = require('../helpers/setup'); - contract('SafeMath', function () { beforeEach(async function () { this.safeMath = await SafeMathMock.new(); @@ -12,15 +10,15 @@ contract('SafeMath', function () { describe('add', function () { it('adds correctly', async function () { - const a = new BigNumber(5678); - const b = new BigNumber(1234); + const a = new BN('5678'); + const b = new BN('1234'); - (await this.safeMath.add(a, b)).should.be.bignumber.equal(a.plus(b)); + (await this.safeMath.add(a, b)).should.be.bignumber.equal(a.add(b)); }); it('reverts on addition overflow', async function () { const a = MAX_UINT256; - const b = new BigNumber(1); + const b = new BN('1'); await shouldFail.reverting(this.safeMath.add(a, b)); }); @@ -28,15 +26,15 @@ contract('SafeMath', function () { describe('sub', function () { it('subtracts correctly', async function () { - const a = new BigNumber(5678); - const b = new BigNumber(1234); + const a = new BN('5678'); + const b = new BN('1234'); - (await this.safeMath.sub(a, b)).should.be.bignumber.equal(a.minus(b)); + (await this.safeMath.sub(a, b)).should.be.bignumber.equal(a.sub(b)); }); it('reverts if subtraction result would be negative', async function () { - const a = new BigNumber(1234); - const b = new BigNumber(5678); + const a = new BN('1234'); + const b = new BN('5678'); await shouldFail.reverting(this.safeMath.sub(a, b)); }); @@ -44,29 +42,29 @@ contract('SafeMath', function () { describe('mul', function () { it('multiplies correctly', async function () { - const a = new BigNumber(1234); - const b = new BigNumber(5678); + const a = new BN('1234'); + const b = new BN('5678'); - (await this.safeMath.mul(a, b)).should.be.bignumber.equal(a.times(b)); + (await this.safeMath.mul(a, b)).should.be.bignumber.equal(a.mul(b)); }); it('handles a zero product correctly (first number as zero)', async function () { - const a = new BigNumber(0); - const b = new BigNumber(5678); + const a = new BN('0'); + const b = new BN('5678'); - (await this.safeMath.mul(a, b)).should.be.bignumber.equal(a.times(b)); + (await this.safeMath.mul(a, b)).should.be.bignumber.equal(a.mul(b)); }); it('handles a zero product correctly (second number as zero)', async function () { - const a = new BigNumber(5678); - const b = new BigNumber(0); + const a = new BN('5678'); + const b = new BN('0'); - (await this.safeMath.mul(a, b)).should.be.bignumber.equal(a.times(b)); + (await this.safeMath.mul(a, b)).should.be.bignumber.equal(a.mul(b)); }); it('reverts on multiplication overflow', async function () { const a = MAX_UINT256; - const b = new BigNumber(2); + const b = new BN('2'); await shouldFail.reverting(this.safeMath.mul(a, b)); }); @@ -74,29 +72,29 @@ contract('SafeMath', function () { describe('div', function () { it('divides correctly', async function () { - const a = new BigNumber(5678); - const b = new BigNumber(5678); + const a = new BN('5678'); + const b = new BN('5678'); (await this.safeMath.div(a, b)).should.be.bignumber.equal(a.div(b)); }); it('divides zero correctly', async function () { - const a = new BigNumber(0); - const b = new BigNumber(5678); + const a = new BN('0'); + const b = new BN('5678'); - (await this.safeMath.div(a, b)).should.be.bignumber.equal(0); + (await this.safeMath.div(a, b)).should.be.bignumber.equal('0'); }); it('returns complete number result on non-even division', async function () { - const a = new BigNumber(7000); - const b = new BigNumber(5678); + const a = new BN('7000'); + const b = new BN('5678'); - (await this.safeMath.div(a, b)).should.be.bignumber.equal(1); + (await this.safeMath.div(a, b)).should.be.bignumber.equal('1'); }); it('reverts on zero division', async function () { - const a = new BigNumber(5678); - const b = new BigNumber(0); + const a = new BN('5678'); + const b = new BN('0'); await shouldFail.reverting(this.safeMath.div(a, b)); }); @@ -105,37 +103,37 @@ contract('SafeMath', function () { describe('mod', function () { describe('modulos correctly', async function () { it('when the dividend is smaller than the divisor', async function () { - const a = new BigNumber(284); - const b = new BigNumber(5678); + const a = new BN('284'); + const b = new BN('5678'); (await this.safeMath.mod(a, b)).should.be.bignumber.equal(a.mod(b)); }); it('when the dividend is equal to the divisor', async function () { - const a = new BigNumber(5678); - const b = new BigNumber(5678); + const a = new BN('5678'); + const b = new BN('5678'); (await this.safeMath.mod(a, b)).should.be.bignumber.equal(a.mod(b)); }); it('when the dividend is larger than the divisor', async function () { - const a = new BigNumber(7000); - const b = new BigNumber(5678); + const a = new BN('7000'); + const b = new BN('5678'); (await this.safeMath.mod(a, b)).should.be.bignumber.equal(a.mod(b)); }); it('when the dividend is a multiple of the divisor', async function () { - const a = new BigNumber(17034); // 17034 == 5678 * 3 - const b = new BigNumber(5678); + const a = new BN('17034'); // 17034 == 5678 * 3 + const b = new BN('5678'); (await this.safeMath.mod(a, b)).should.be.bignumber.equal(a.mod(b)); }); }); it('reverts with a 0 divisor', async function () { - const a = new BigNumber(5678); - const b = new BigNumber(0); + const a = new BN('5678'); + const b = new BN('0'); await shouldFail.reverting(this.safeMath.mod(a, b)); }); diff --git a/test/ownership/Ownable.behavior.js b/test/ownership/Ownable.behavior.js index a23030d0b..5e90222f2 100644 --- a/test/ownership/Ownable.behavior.js +++ b/test/ownership/Ownable.behavior.js @@ -1,7 +1,5 @@ -const shouldFail = require('../helpers/shouldFail'); -const expectEvent = require('../helpers/expectEvent'); -const { ZERO_ADDRESS } = require('../helpers/constants'); -require('./../helpers/setup'); +const { constants, expectEvent, shouldFail } = require('openzeppelin-test-helpers'); +const { ZERO_ADDRESS } = constants; function shouldBehaveLikeOwnable (owner, [anyone]) { describe('as an ownable', function () { @@ -23,7 +21,7 @@ function shouldBehaveLikeOwnable (owner, [anyone]) { }); it('should guard ownership against stuck state', async function () { - await shouldFail.reverting(this.ownable.transferOwnership(null, { from: owner })); + await shouldFail.reverting(this.ownable.transferOwnership(ZERO_ADDRESS, { from: owner })); }); it('loses owner after renouncement', async function () { diff --git a/test/ownership/Ownable.test.js b/test/ownership/Ownable.test.js index e1a504b99..bd3c9d8c2 100644 --- a/test/ownership/Ownable.test.js +++ b/test/ownership/Ownable.test.js @@ -1,7 +1,4 @@ -const shouldFail = require('../helpers/shouldFail'); - -require('../helpers/setup'); - +require('openzeppelin-test-helpers'); const { shouldBehaveLikeOwnable } = require('./Ownable.behavior'); const Ownable = artifacts.require('OwnableMock'); diff --git a/test/ownership/Secondary.test.js b/test/ownership/Secondary.test.js index cbc96320a..e46784a15 100644 --- a/test/ownership/Secondary.test.js +++ b/test/ownership/Secondary.test.js @@ -1,11 +1,8 @@ -const shouldFail = require('../helpers/shouldFail'); -const expectEvent = require('../helpers/expectEvent'); -const { ZERO_ADDRESS } = require('../helpers/constants'); +const { constants, expectEvent, shouldFail } = require('openzeppelin-test-helpers'); +const { ZERO_ADDRESS } = constants; const SecondaryMock = artifacts.require('SecondaryMock'); -require('../helpers/setup'); - contract('Secondary', function ([_, primary, newPrimary, anyone]) { beforeEach(async function () { this.secondary = await SecondaryMock.new({ from: primary }); diff --git a/test/payment/PaymentSplitter.test.js b/test/payment/PaymentSplitter.test.js index 90391c793..da955d7da 100644 --- a/test/payment/PaymentSplitter.test.js +++ b/test/payment/PaymentSplitter.test.js @@ -1,16 +1,10 @@ -const { ethGetBalance } = require('../helpers/web3'); -const expectEvent = require('../helpers/expectEvent'); -const send = require('./../helpers/send'); -const { ether } = require('../helpers/ether'); -const { ZERO_ADDRESS } = require('./../helpers/constants'); +const { balance, constants, ether, expectEvent, send, shouldFail } = require('openzeppelin-test-helpers'); +const { ZERO_ADDRESS } = constants; -require('../helpers/setup'); - -const shouldFail = require('../helpers/shouldFail'); const PaymentSplitter = artifacts.require('PaymentSplitterMock'); contract('PaymentSplitter', function ([_, owner, payee1, payee2, payee3, nonpayee1, payer1]) { - const amount = ether(1.0); + const amount = ether('1'); it('rejects an empty set of payees', async function () { await shouldFail.reverting(PaymentSplitter.new([], [])); @@ -45,28 +39,28 @@ contract('PaymentSplitter', function ([_, owner, payee1, payee2, payee3, nonpaye }); it('should have total shares', async function () { - (await this.contract.totalShares()).should.be.bignumber.equal(20 + 10 + 70); + (await this.contract.totalShares()).should.be.bignumber.equal('100'); }); it('should have payees', async function () { await Promise.all(this.payees.map(async (payee, index) => { (await this.contract.payee(index)).should.be.equal(payee); - (await this.contract.released(payee)).should.be.bignumber.equal(0); + (await this.contract.released(payee)).should.be.bignumber.equal('0'); })); }); it('should accept payments', async function () { await send.ether(owner, this.contract.address, amount); - (await ethGetBalance(this.contract.address)).should.be.bignumber.equal(amount); + (await balance.current(this.contract.address)).should.be.bignumber.equal(amount); }); it('should store shares if address is payee', async function () { - (await this.contract.shares(payee1)).should.be.bignumber.not.equal(0); + (await this.contract.shares(payee1)).should.be.bignumber.not.equal('0'); }); it('should not store shares if address is not payee', async function () { - (await this.contract.shares(nonpayee1)).should.be.bignumber.equal(0); + (await this.contract.shares(nonpayee1)).should.be.bignumber.equal('0'); }); it('should throw if no funds to claim', async function () { @@ -82,30 +76,31 @@ contract('PaymentSplitter', function ([_, owner, payee1, payee2, payee3, nonpaye await send.ether(payer1, this.contract.address, amount); // receive funds - const initBalance = await ethGetBalance(this.contract.address); + const initBalance = await balance.current(this.contract.address); initBalance.should.be.bignumber.equal(amount); // distribute to payees - const initAmount1 = await ethGetBalance(payee1); - const { logs: logs1 } = await this.contract.release(payee1); - const profit1 = (await ethGetBalance(payee1)).sub(initAmount1); - profit1.sub(web3.toWei(0.20, 'ether')).abs().should.be.bignumber.lt(1e16); + + const initAmount1 = await balance.current(payee1); + const { logs: logs1 } = await this.contract.release(payee1, { gasPrice: 0 }); + const profit1 = (await balance.current(payee1)).sub(initAmount1); + profit1.should.be.bignumber.equal(ether('0.20', 'ether')); expectEvent.inLogs(logs1, 'PaymentReleased', { to: payee1, amount: profit1 }); - const initAmount2 = await ethGetBalance(payee2); - const { logs: logs2 } = await this.contract.release(payee2); - const profit2 = (await ethGetBalance(payee2)).sub(initAmount2); - profit2.sub(web3.toWei(0.10, 'ether')).abs().should.be.bignumber.lt(1e16); + const initAmount2 = await balance.current(payee2); + const { logs: logs2 } = await this.contract.release(payee2, { gasPrice: 0 }); + const profit2 = (await balance.current(payee2)).sub(initAmount2); + profit2.should.be.bignumber.equal(ether('0.10', 'ether')); expectEvent.inLogs(logs2, 'PaymentReleased', { to: payee2, amount: profit2 }); - const initAmount3 = await ethGetBalance(payee3); - const { logs: logs3 } = await this.contract.release(payee3); - const profit3 = (await ethGetBalance(payee3)).sub(initAmount3); - profit3.sub(web3.toWei(0.70, 'ether')).abs().should.be.bignumber.lt(1e16); + const initAmount3 = await balance.current(payee3); + const { logs: logs3 } = await this.contract.release(payee3, { gasPrice: 0 }); + const profit3 = (await balance.current(payee3)).sub(initAmount3); + profit3.should.be.bignumber.equal(ether('0.70', 'ether')); expectEvent.inLogs(logs3, 'PaymentReleased', { to: payee3, amount: profit3 }); // end balance should be zero - (await ethGetBalance(this.contract.address)).should.be.bignumber.equal(0); + (await balance.current(this.contract.address)).should.be.bignumber.equal('0'); // check correct funds released accounting (await this.contract.totalReleased()).should.be.bignumber.equal(initBalance); diff --git a/test/payment/PullPayment.test.js b/test/payment/PullPayment.test.js index f82712ef3..2443adcb8 100644 --- a/test/payment/PullPayment.test.js +++ b/test/payment/PullPayment.test.js @@ -1,12 +1,9 @@ -const { balanceDifference } = require('../helpers/balanceDifference'); -const { ether } = require('../helpers/ether'); - -require('../helpers/setup'); +const { balance, ether } = require('openzeppelin-test-helpers'); const PullPaymentMock = artifacts.require('PullPaymentMock'); contract('PullPayment', function ([_, payer, payee1, payee2]) { - const amount = ether(17.0); + const amount = ether('17'); beforeEach(async function () { this.contract = await PullPaymentMock.new({ value: amount }); @@ -14,32 +11,32 @@ contract('PullPayment', function ([_, payer, payee1, payee2]) { it('can record an async payment correctly', async function () { await this.contract.callTransfer(payee1, 100, { from: payer }); - (await this.contract.payments(payee1)).should.be.bignumber.equal(100); + (await this.contract.payments(payee1)).should.be.bignumber.equal('100'); }); it('can add multiple balances on one account', async function () { await this.contract.callTransfer(payee1, 200, { from: payer }); await this.contract.callTransfer(payee1, 300, { from: payer }); - (await this.contract.payments(payee1)).should.be.bignumber.equal(500); + (await this.contract.payments(payee1)).should.be.bignumber.equal('500'); }); it('can add balances on multiple accounts', async function () { await this.contract.callTransfer(payee1, 200, { from: payer }); await this.contract.callTransfer(payee2, 300, { from: payer }); - (await this.contract.payments(payee1)).should.be.bignumber.equal(200); + (await this.contract.payments(payee1)).should.be.bignumber.equal('200'); - (await this.contract.payments(payee2)).should.be.bignumber.equal(300); + (await this.contract.payments(payee2)).should.be.bignumber.equal('300'); }); it('can withdraw payment', async function () { - (await balanceDifference(payee1, async () => { + (await balance.difference(payee1, async () => { await this.contract.callTransfer(payee1, amount, { from: payer }); (await this.contract.payments(payee1)).should.be.bignumber.equal(amount); await this.contract.withdrawPayments(payee1); })).should.be.bignumber.equal(amount); - (await this.contract.payments(payee1)).should.be.bignumber.equal(0); + (await this.contract.payments(payee1)).should.be.bignumber.equal('0'); }); }); diff --git a/test/payment/escrow/ConditionalEscrow.test.js b/test/payment/escrow/ConditionalEscrow.test.js index bb5b5cf98..eeb39e5ff 100644 --- a/test/payment/escrow/ConditionalEscrow.test.js +++ b/test/payment/escrow/ConditionalEscrow.test.js @@ -1,10 +1,6 @@ +const { ether, shouldFail } = require('openzeppelin-test-helpers'); const { shouldBehaveLikeEscrow } = require('./Escrow.behavior'); -const shouldFail = require('../../helpers/shouldFail'); -const { ether } = require('../../helpers/ether'); - -require('../../helpers/setup'); - const ConditionalEscrowMock = artifacts.require('ConditionalEscrowMock'); contract('ConditionalEscrow', function ([_, owner, payee, ...otherAccounts]) { @@ -21,7 +17,7 @@ contract('ConditionalEscrow', function ([_, owner, payee, ...otherAccounts]) { }); context('when withdrawal is disallowed', function () { - const amount = ether(23.0); + const amount = ether('23'); beforeEach(async function () { await this.escrow.setAllowed(payee, false); diff --git a/test/payment/escrow/Escrow.behavior.js b/test/payment/escrow/Escrow.behavior.js index 80bde2f5c..4f6fc3d6b 100644 --- a/test/payment/escrow/Escrow.behavior.js +++ b/test/payment/escrow/Escrow.behavior.js @@ -1,20 +1,14 @@ -const expectEvent = require('../../helpers/expectEvent'); -const shouldFail = require('../../helpers/shouldFail'); -const { ethGetBalance } = require('../../helpers/web3'); -const { balanceDifference } = require('../../helpers/balanceDifference'); -const { ether } = require('../../helpers/ether'); - -require('../../helpers/setup'); +const { balance, ether, expectEvent, shouldFail } = require('openzeppelin-test-helpers'); function shouldBehaveLikeEscrow (primary, [payee1, payee2]) { - const amount = ether(42.0); + const amount = ether('42'); describe('as an escrow', function () { describe('deposits', function () { it('can accept a single deposit', async function () { await this.escrow.deposit(payee1, { from: primary, value: amount }); - (await ethGetBalance(this.escrow.address)).should.be.bignumber.equal(amount); + (await balance.current(this.escrow.address)).should.be.bignumber.equal(amount); (await this.escrow.depositsOf(payee1)).should.be.bignumber.equal(amount); }); @@ -37,34 +31,34 @@ function shouldBehaveLikeEscrow (primary, [payee1, payee2]) { it('can add multiple deposits on a single account', async function () { await this.escrow.deposit(payee1, { from: primary, value: amount }); - await this.escrow.deposit(payee1, { from: primary, value: amount * 2 }); + await this.escrow.deposit(payee1, { from: primary, value: amount.muln(2) }); - (await ethGetBalance(this.escrow.address)).should.be.bignumber.equal(amount * 3); + (await balance.current(this.escrow.address)).should.be.bignumber.equal(amount.muln(3)); - (await this.escrow.depositsOf(payee1)).should.be.bignumber.equal(amount * 3); + (await this.escrow.depositsOf(payee1)).should.be.bignumber.equal(amount.muln(3)); }); it('can track deposits to multiple accounts', async function () { await this.escrow.deposit(payee1, { from: primary, value: amount }); - await this.escrow.deposit(payee2, { from: primary, value: amount * 2 }); + await this.escrow.deposit(payee2, { from: primary, value: amount.muln(2) }); - (await ethGetBalance(this.escrow.address)).should.be.bignumber.equal(amount * 3); + (await balance.current(this.escrow.address)).should.be.bignumber.equal(amount.muln(3)); (await this.escrow.depositsOf(payee1)).should.be.bignumber.equal(amount); - (await this.escrow.depositsOf(payee2)).should.be.bignumber.equal(amount * 2); + (await this.escrow.depositsOf(payee2)).should.be.bignumber.equal(amount.muln(2)); }); }); describe('withdrawals', async function () { it('can withdraw payments', async function () { - (await balanceDifference(payee1, async () => { + (await balance.difference(payee1, async () => { await this.escrow.deposit(payee1, { from: primary, value: amount }); await this.escrow.withdraw(payee1, { from: primary }); })).should.be.bignumber.equal(amount); - (await ethGetBalance(this.escrow.address)).should.be.bignumber.equal(0); - (await this.escrow.depositsOf(payee1)).should.be.bignumber.equal(0); + (await balance.current(this.escrow.address)).should.be.bignumber.equal('0'); + (await this.escrow.depositsOf(payee1)).should.be.bignumber.equal('0'); }); it('can do an empty withdrawal', async function () { diff --git a/test/payment/escrow/Escrow.test.js b/test/payment/escrow/Escrow.test.js index e5c64fffd..029436436 100644 --- a/test/payment/escrow/Escrow.test.js +++ b/test/payment/escrow/Escrow.test.js @@ -1,3 +1,4 @@ +require('openzeppelin-test-helpers'); const { shouldBehaveLikeEscrow } = require('./Escrow.behavior'); const Escrow = artifacts.require('EscrowMock'); diff --git a/test/payment/escrow/RefundEscrow.test.js b/test/payment/escrow/RefundEscrow.test.js index cd9f7e412..8b06577a4 100644 --- a/test/payment/escrow/RefundEscrow.test.js +++ b/test/payment/escrow/RefundEscrow.test.js @@ -1,15 +1,10 @@ -const shouldFail = require('../../helpers/shouldFail'); -const expectEvent = require('../../helpers/expectEvent'); -const { balanceDifference } = require('../../helpers/balanceDifference'); -const { ether } = require('../../helpers/ether'); -const { ZERO_ADDRESS } = require('../../helpers/constants'); - -require('../../helpers/setup'); +const { balance, constants, ether, expectEvent, shouldFail } = require('openzeppelin-test-helpers'); +const { ZERO_ADDRESS } = constants; const RefundEscrow = artifacts.require('RefundEscrowMock'); contract('RefundEscrow', function ([_, primary, beneficiary, refundee1, refundee2]) { - const amount = ether(54.0); + const amount = ether('54'); const refundees = [refundee1, refundee2]; it('requires a non-null beneficiary', async function () { @@ -26,7 +21,7 @@ contract('RefundEscrow', function ([_, primary, beneficiary, refundee1, refundee context('active state', function () { it('has beneficiary and state', async function () { (await this.escrow.beneficiary()).should.be.equal(beneficiary); - (await this.escrow.state()).should.be.bignumber.equal(0); + (await this.escrow.state()).should.be.bignumber.equal('0'); }); it('accepts deposits', async function () { @@ -69,9 +64,9 @@ contract('RefundEscrow', function ([_, primary, beneficiary, refundee1, refundee }); it('allows beneficiary withdrawal', async function () { - (await balanceDifference(beneficiary, () => + (await balance.difference(beneficiary, () => this.escrow.beneficiaryWithdraw() - )).should.be.bignumber.equal(amount * refundees.length); + )).should.be.bignumber.equal(amount.muln(refundees.length)); }); it('prevents entering the refund state', async function () { @@ -103,7 +98,7 @@ contract('RefundEscrow', function ([_, primary, beneficiary, refundee1, refundee it('refunds refundees', async function () { for (const refundee of [refundee1, refundee2]) { - (await balanceDifference(refundee, () => + (await balance.difference(refundee, () => this.escrow.withdraw(refundee, { from: primary })) ).should.be.bignumber.equal(amount); } diff --git a/test/token/ERC20/ERC20.test.js b/test/token/ERC20/ERC20.test.js index 16d2cab75..1c71cd21f 100644 --- a/test/token/ERC20/ERC20.test.js +++ b/test/token/ERC20/ERC20.test.js @@ -1,32 +1,30 @@ -const shouldFail = require('../../helpers/shouldFail'); -const expectEvent = require('../../helpers/expectEvent'); -const { ZERO_ADDRESS } = require('../../helpers/constants'); +const { BN, constants, expectEvent, shouldFail } = require('openzeppelin-test-helpers'); +const { ZERO_ADDRESS } = constants; const ERC20Mock = artifacts.require('ERC20Mock'); -const { BigNumber } = require('../../helpers/setup'); - -contract('ERC20', function ([_, owner, recipient, anotherAccount]) { +contract('ERC20', function ([_, initialHolder, recipient, anotherAccount]) { + const initialSupply = new BN(100); beforeEach(async function () { - this.token = await ERC20Mock.new(owner, 100); + this.token = await ERC20Mock.new(initialHolder, initialSupply); }); describe('total supply', function () { it('returns the total amount of tokens', async function () { - (await this.token.totalSupply()).should.be.bignumber.equal(100); + (await this.token.totalSupply()).should.be.bignumber.equal(initialSupply); }); }); describe('balanceOf', function () { describe('when the requested account has no tokens', function () { it('returns zero', async function () { - (await this.token.balanceOf(anotherAccount)).should.be.bignumber.equal(0); + (await this.token.balanceOf(anotherAccount)).should.be.bignumber.equal('0'); }); }); describe('when the requested account has some tokens', function () { it('returns the total amount of tokens', async function () { - (await this.token.balanceOf(owner)).should.be.bignumber.equal(100); + (await this.token.balanceOf(initialHolder)).should.be.bignumber.equal(initialSupply); }); }); }); @@ -36,29 +34,29 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) { const to = recipient; describe('when the sender does not have enough balance', function () { - const amount = 101; + const amount = initialSupply.addn(1); it('reverts', async function () { - await shouldFail.reverting(this.token.transfer(to, amount, { from: owner })); + await shouldFail.reverting(this.token.transfer(to, amount, { from: initialHolder })); }); }); describe('when the sender has enough balance', function () { - const amount = 100; + const amount = initialSupply; it('transfers the requested amount', async function () { - await this.token.transfer(to, amount, { from: owner }); + await this.token.transfer(to, amount, { from: initialHolder }); - (await this.token.balanceOf(owner)).should.be.bignumber.equal(0); + (await this.token.balanceOf(initialHolder)).should.be.bignumber.equal('0'); (await this.token.balanceOf(to)).should.be.bignumber.equal(amount); }); it('emits a transfer event', async function () { - const { logs } = await this.token.transfer(to, amount, { from: owner }); + const { logs } = await this.token.transfer(to, amount, { from: initialHolder }); expectEvent.inLogs(logs, 'Transfer', { - from: owner, + from: initialHolder, to: to, value: amount, }); @@ -70,7 +68,7 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) { const to = ZERO_ADDRESS; it('reverts', async function () { - await shouldFail.reverting(this.token.transfer(to, 100, { from: owner })); + await shouldFail.reverting(this.token.transfer(to, initialSupply, { from: initialHolder })); }); }); }); @@ -80,13 +78,13 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) { const spender = recipient; describe('when the sender has enough balance', function () { - const amount = 100; + const amount = initialSupply; it('emits an approval event', async function () { - const { logs } = await this.token.approve(spender, amount, { from: owner }); + const { logs } = await this.token.approve(spender, amount, { from: initialHolder }); expectEvent.inLogs(logs, 'Approval', { - owner: owner, + owner: initialHolder, spender: spender, value: amount, }); @@ -94,33 +92,33 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) { describe('when there was no approved amount before', function () { it('approves the requested amount', async function () { - await this.token.approve(spender, amount, { from: owner }); + await this.token.approve(spender, amount, { from: initialHolder }); - (await this.token.allowance(owner, spender)).should.be.bignumber.equal(amount); + (await this.token.allowance(initialHolder, spender)).should.be.bignumber.equal(amount); }); }); describe('when the spender had an approved amount', function () { beforeEach(async function () { - await this.token.approve(spender, 1, { from: owner }); + await this.token.approve(spender, new BN(1), { from: initialHolder }); }); it('approves the requested amount and replaces the previous one', async function () { - await this.token.approve(spender, amount, { from: owner }); + await this.token.approve(spender, amount, { from: initialHolder }); - (await this.token.allowance(owner, spender)).should.be.bignumber.equal(amount); + (await this.token.allowance(initialHolder, spender)).should.be.bignumber.equal(amount); }); }); }); describe('when the sender does not have enough balance', function () { - const amount = 101; + const amount = initialSupply.addn(1); it('emits an approval event', async function () { - const { logs } = await this.token.approve(spender, amount, { from: owner }); + const { logs } = await this.token.approve(spender, amount, { from: initialHolder }); expectEvent.inLogs(logs, 'Approval', { - owner: owner, + owner: initialHolder, spender: spender, value: amount, }); @@ -128,32 +126,32 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) { describe('when there was no approved amount before', function () { it('approves the requested amount', async function () { - await this.token.approve(spender, amount, { from: owner }); + await this.token.approve(spender, amount, { from: initialHolder }); - (await this.token.allowance(owner, spender)).should.be.bignumber.equal(amount); + (await this.token.allowance(initialHolder, spender)).should.be.bignumber.equal(amount); }); }); describe('when the spender had an approved amount', function () { beforeEach(async function () { - await this.token.approve(spender, 1, { from: owner }); + await this.token.approve(spender, new BN(1), { from: initialHolder }); }); it('approves the requested amount and replaces the previous one', async function () { - await this.token.approve(spender, amount, { from: owner }); + await this.token.approve(spender, amount, { from: initialHolder }); - (await this.token.allowance(owner, spender)).should.be.bignumber.equal(amount); + (await this.token.allowance(initialHolder, spender)).should.be.bignumber.equal(amount); }); }); }); }); describe('when the spender is the zero address', function () { - const amount = 100; + const amount = initialSupply; const spender = ZERO_ADDRESS; it('reverts', async function () { - await shouldFail.reverting(this.token.approve(spender, amount, { from: owner })); + await shouldFail.reverting(this.token.approve(spender, amount, { from: initialHolder })); }); }); }); @@ -166,89 +164,89 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) { describe('when the spender has enough approved balance', function () { beforeEach(async function () { - await this.token.approve(spender, 100, { from: owner }); + await this.token.approve(spender, initialSupply, { from: initialHolder }); }); - describe('when the owner has enough balance', function () { - const amount = 100; + describe('when the initial holder has enough balance', function () { + const amount = initialSupply; it('transfers the requested amount', async function () { - await this.token.transferFrom(owner, to, amount, { from: spender }); + await this.token.transferFrom(initialHolder, to, amount, { from: spender }); - (await this.token.balanceOf(owner)).should.be.bignumber.equal(0); + (await this.token.balanceOf(initialHolder)).should.be.bignumber.equal('0'); (await this.token.balanceOf(to)).should.be.bignumber.equal(amount); }); it('decreases the spender allowance', async function () { - await this.token.transferFrom(owner, to, amount, { from: spender }); + await this.token.transferFrom(initialHolder, to, amount, { from: spender }); - (await this.token.allowance(owner, spender)).should.be.bignumber.equal(0); + (await this.token.allowance(initialHolder, spender)).should.be.bignumber.equal('0'); }); it('emits a transfer event', async function () { - const { logs } = await this.token.transferFrom(owner, to, amount, { from: spender }); + const { logs } = await this.token.transferFrom(initialHolder, to, amount, { from: spender }); expectEvent.inLogs(logs, 'Transfer', { - from: owner, + from: initialHolder, to: to, value: amount, }); }); it('emits an approval event', async function () { - const { logs } = await this.token.transferFrom(owner, to, amount, { from: spender }); + const { logs } = await this.token.transferFrom(initialHolder, to, amount, { from: spender }); expectEvent.inLogs(logs, 'Approval', { - owner: owner, + owner: initialHolder, spender: spender, - value: await this.token.allowance(owner, spender), + value: await this.token.allowance(initialHolder, spender), }); }); }); - describe('when the owner does not have enough balance', function () { - const amount = 101; + describe('when the initial holder does not have enough balance', function () { + const amount = initialSupply.addn(1); it('reverts', async function () { - await shouldFail.reverting(this.token.transferFrom(owner, to, amount, { from: spender })); + await shouldFail.reverting(this.token.transferFrom(initialHolder, to, amount, { from: spender })); }); }); }); describe('when the spender does not have enough approved balance', function () { beforeEach(async function () { - await this.token.approve(spender, 99, { from: owner }); + await this.token.approve(spender, initialSupply.subn(1), { from: initialHolder }); }); - describe('when the owner has enough balance', function () { - const amount = 100; + describe('when the initial holder has enough balance', function () { + const amount = initialSupply; it('reverts', async function () { - await shouldFail.reverting(this.token.transferFrom(owner, to, amount, { from: spender })); + await shouldFail.reverting(this.token.transferFrom(initialHolder, to, amount, { from: spender })); }); }); - describe('when the owner does not have enough balance', function () { - const amount = 101; + describe('when the initial holder does not have enough balance', function () { + const amount = initialSupply.addn(1); it('reverts', async function () { - await shouldFail.reverting(this.token.transferFrom(owner, to, amount, { from: spender })); + await shouldFail.reverting(this.token.transferFrom(initialHolder, to, amount, { from: spender })); }); }); }); }); describe('when the recipient is the zero address', function () { - const amount = 100; + const amount = initialSupply; const to = ZERO_ADDRESS; beforeEach(async function () { - await this.token.approve(spender, amount, { from: owner }); + await this.token.approve(spender, amount, { from: initialHolder }); }); it('reverts', async function () { - await shouldFail.reverting(this.token.transferFrom(owner, to, amount, { from: spender })); + await shouldFail.reverting(this.token.transferFrom(initialHolder, to, amount, { from: spender })); }); }); }); @@ -260,7 +258,7 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) { function shouldDecreaseApproval (amount) { describe('when there was no approved amount before', function () { it('reverts', async function () { - await shouldFail.reverting(this.token.decreaseAllowance(spender, amount, { from: owner })); + await shouldFail.reverting(this.token.decreaseAllowance(spender, amount, { from: initialHolder })); }); }); @@ -268,71 +266,73 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) { const approvedAmount = amount; beforeEach(async function () { - ({ logs: this.logs } = await this.token.approve(spender, approvedAmount, { from: owner })); + ({ logs: this.logs } = await this.token.approve(spender, approvedAmount, { from: initialHolder })); }); it('emits an approval event', async function () { - const { logs } = await this.token.decreaseAllowance(spender, approvedAmount, { from: owner }); + const { logs } = await this.token.decreaseAllowance(spender, approvedAmount, { from: initialHolder }); expectEvent.inLogs(logs, 'Approval', { - owner: owner, + owner: initialHolder, spender: spender, - value: 0, + value: new BN(0), }); }); it('decreases the spender allowance subtracting the requested amount', async function () { - await this.token.decreaseAllowance(spender, approvedAmount - 1, { from: owner }); + await this.token.decreaseAllowance(spender, approvedAmount.subn(1), { from: initialHolder }); - (await this.token.allowance(owner, spender)).should.be.bignumber.equal(1); + (await this.token.allowance(initialHolder, spender)).should.be.bignumber.equal('1'); }); it('sets the allowance to zero when all allowance is removed', async function () { - await this.token.decreaseAllowance(spender, approvedAmount, { from: owner }); - (await this.token.allowance(owner, spender)).should.be.bignumber.equal(0); + await this.token.decreaseAllowance(spender, approvedAmount, { from: initialHolder }); + (await this.token.allowance(initialHolder, spender)).should.be.bignumber.equal('0'); }); it('reverts when more than the full allowance is removed', async function () { - await shouldFail.reverting(this.token.decreaseAllowance(spender, approvedAmount + 1, { from: owner })); + await shouldFail.reverting( + this.token.decreaseAllowance(spender, approvedAmount.addn(1), { from: initialHolder }) + ); }); }); } describe('when the sender has enough balance', function () { - const amount = 100; + const amount = initialSupply; shouldDecreaseApproval(amount); }); describe('when the sender does not have enough balance', function () { - const amount = 101; + const amount = initialSupply.addn(1); shouldDecreaseApproval(amount); }); }); describe('when the spender is the zero address', function () { - const amount = 100; + const amount = initialSupply; const spender = ZERO_ADDRESS; it('reverts', async function () { - await shouldFail.reverting(this.token.decreaseAllowance(spender, amount, { from: owner })); + await shouldFail.reverting(this.token.decreaseAllowance(spender, amount, { from: initialHolder })); }); }); }); describe('increase allowance', function () { - const amount = 100; + const amount = initialSupply; describe('when the spender is not the zero address', function () { const spender = recipient; describe('when the sender has enough balance', function () { it('emits an approval event', async function () { - const { logs } = await this.token.increaseAllowance(spender, amount, { from: owner }); + const { logs } = await this.token.increaseAllowance(spender, amount, { from: initialHolder }); expectEvent.inLogs(logs, 'Approval', { - owner: owner, + owner: initialHolder, spender: spender, value: amount, }); @@ -340,33 +340,33 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) { describe('when there was no approved amount before', function () { it('approves the requested amount', async function () { - await this.token.increaseAllowance(spender, amount, { from: owner }); + await this.token.increaseAllowance(spender, amount, { from: initialHolder }); - (await this.token.allowance(owner, spender)).should.be.bignumber.equal(amount); + (await this.token.allowance(initialHolder, spender)).should.be.bignumber.equal(amount); }); }); describe('when the spender had an approved amount', function () { beforeEach(async function () { - await this.token.approve(spender, 1, { from: owner }); + await this.token.approve(spender, new BN(1), { from: initialHolder }); }); it('increases the spender allowance adding the requested amount', async function () { - await this.token.increaseAllowance(spender, amount, { from: owner }); + await this.token.increaseAllowance(spender, amount, { from: initialHolder }); - (await this.token.allowance(owner, spender)).should.be.bignumber.equal(amount + 1); + (await this.token.allowance(initialHolder, spender)).should.be.bignumber.equal(amount.addn(1)); }); }); }); describe('when the sender does not have enough balance', function () { - const amount = 101; + const amount = initialSupply.addn(1); it('emits an approval event', async function () { - const { logs } = await this.token.increaseAllowance(spender, amount, { from: owner }); + const { logs } = await this.token.increaseAllowance(spender, amount, { from: initialHolder }); expectEvent.inLogs(logs, 'Approval', { - owner: owner, + owner: initialHolder, spender: spender, value: amount, }); @@ -374,21 +374,21 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) { describe('when there was no approved amount before', function () { it('approves the requested amount', async function () { - await this.token.increaseAllowance(spender, amount, { from: owner }); + await this.token.increaseAllowance(spender, amount, { from: initialHolder }); - (await this.token.allowance(owner, spender)).should.be.bignumber.equal(amount); + (await this.token.allowance(initialHolder, spender)).should.be.bignumber.equal(amount); }); }); describe('when the spender had an approved amount', function () { beforeEach(async function () { - await this.token.approve(spender, 1, { from: owner }); + await this.token.approve(spender, new BN(1), { from: initialHolder }); }); it('increases the spender allowance adding the requested amount', async function () { - await this.token.increaseAllowance(spender, amount, { from: owner }); + await this.token.increaseAllowance(spender, amount, { from: initialHolder }); - (await this.token.allowance(owner, spender)).should.be.bignumber.equal(amount + 1); + (await this.token.allowance(initialHolder, spender)).should.be.bignumber.equal(amount.addn(1)); }); }); }); @@ -398,14 +398,13 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) { const spender = ZERO_ADDRESS; it('reverts', async function () { - await shouldFail.reverting(this.token.increaseAllowance(spender, amount, { from: owner })); + await shouldFail.reverting(this.token.increaseAllowance(spender, amount, { from: initialHolder })); }); }); }); describe('_mint', function () { - const initialSupply = new BigNumber(100); - const amount = new BigNumber(50); + const amount = new BN(50); it('rejects a null account', async function () { await shouldFail.reverting(this.token.mint(ZERO_ADDRESS, amount)); @@ -418,7 +417,7 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) { }); it('increments totalSupply', async function () { - const expectedSupply = initialSupply.plus(amount); + const expectedSupply = initialSupply.add(amount); (await this.token.totalSupply()).should.be.bignumber.equal(expectedSupply); }); @@ -438,37 +437,35 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) { }); describe('_burn', function () { - const initialSupply = new BigNumber(100); - it('rejects a null account', async function () { - await shouldFail.reverting(this.token.burn(ZERO_ADDRESS, 1)); + await shouldFail.reverting(this.token.burn(ZERO_ADDRESS, new BN(1))); }); describe('for a non null account', function () { it('rejects burning more than balance', async function () { - await shouldFail.reverting(this.token.burn(owner, initialSupply.plus(1))); + await shouldFail.reverting(this.token.burn(initialHolder, initialSupply.addn(1))); }); const describeBurn = function (description, amount) { describe(description, function () { beforeEach('burning', async function () { - const { logs } = await this.token.burn(owner, amount); + const { logs } = await this.token.burn(initialHolder, amount); this.logs = logs; }); it('decrements totalSupply', async function () { - const expectedSupply = initialSupply.minus(amount); + const expectedSupply = initialSupply.sub(amount); (await this.token.totalSupply()).should.be.bignumber.equal(expectedSupply); }); - it('decrements owner balance', async function () { - const expectedBalance = initialSupply.minus(amount); - (await this.token.balanceOf(owner)).should.be.bignumber.equal(expectedBalance); + it('decrements initialHolder balance', async function () { + const expectedBalance = initialSupply.sub(amount); + (await this.token.balanceOf(initialHolder)).should.be.bignumber.equal(expectedBalance); }); it('emits Transfer event', async function () { const event = expectEvent.inLogs(this.logs, 'Transfer', { - from: owner, + from: initialHolder, to: ZERO_ADDRESS, }); @@ -478,58 +475,57 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) { }; describeBurn('for entire balance', initialSupply); - describeBurn('for less amount than balance', initialSupply.sub(1)); + describeBurn('for less amount than balance', initialSupply.subn(1)); }); }); describe('_burnFrom', function () { - const initialSupply = new BigNumber(100); - const allowance = new BigNumber(70); + const allowance = new BN(70); const spender = anotherAccount; beforeEach('approving', async function () { - await this.token.approve(spender, allowance, { from: owner }); + await this.token.approve(spender, allowance, { from: initialHolder }); }); it('rejects a null account', async function () { - await shouldFail.reverting(this.token.burnFrom(ZERO_ADDRESS, 1)); + await shouldFail.reverting(this.token.burnFrom(ZERO_ADDRESS, new BN(1))); }); describe('for a non null account', function () { it('rejects burning more than allowance', async function () { - await shouldFail.reverting(this.token.burnFrom(owner, allowance.plus(1))); + await shouldFail.reverting(this.token.burnFrom(initialHolder, allowance.addn(1))); }); it('rejects burning more than balance', async function () { - await shouldFail.reverting(this.token.burnFrom(owner, initialSupply.plus(1))); + await shouldFail.reverting(this.token.burnFrom(initialHolder, initialSupply.addn(1))); }); const describeBurnFrom = function (description, amount) { describe(description, function () { beforeEach('burning', async function () { - const { logs } = await this.token.burnFrom(owner, amount, { from: spender }); + const { logs } = await this.token.burnFrom(initialHolder, amount, { from: spender }); this.logs = logs; }); it('decrements totalSupply', async function () { - const expectedSupply = initialSupply.minus(amount); + const expectedSupply = initialSupply.sub(amount); (await this.token.totalSupply()).should.be.bignumber.equal(expectedSupply); }); - it('decrements owner balance', async function () { - const expectedBalance = initialSupply.minus(amount); - (await this.token.balanceOf(owner)).should.be.bignumber.equal(expectedBalance); + it('decrements initialHolder balance', async function () { + const expectedBalance = initialSupply.sub(amount); + (await this.token.balanceOf(initialHolder)).should.be.bignumber.equal(expectedBalance); }); it('decrements spender allowance', async function () { - const expectedAllowance = allowance.minus(amount); - (await this.token.allowance(owner, spender)).should.be.bignumber.equal(expectedAllowance); + const expectedAllowance = allowance.sub(amount); + (await this.token.allowance(initialHolder, spender)).should.be.bignumber.equal(expectedAllowance); }); it('emits a Transfer event', async function () { const event = expectEvent.inLogs(this.logs, 'Transfer', { - from: owner, + from: initialHolder, to: ZERO_ADDRESS, }); @@ -538,16 +534,16 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) { it('emits an Approval event', async function () { expectEvent.inLogs(this.logs, 'Approval', { - owner: owner, + owner: initialHolder, spender: spender, - value: await this.token.allowance(owner, spender), + value: await this.token.allowance(initialHolder, spender), }); }); }); }; describeBurnFrom('for entire allowance', allowance); - describeBurnFrom('for less amount than allowance', allowance.sub(1)); + describeBurnFrom('for less amount than allowance', allowance.subn(1)); }); }); }); diff --git a/test/token/ERC20/ERC20Burnable.test.js b/test/token/ERC20/ERC20Burnable.test.js index 6c912a534..624991838 100644 --- a/test/token/ERC20/ERC20Burnable.test.js +++ b/test/token/ERC20/ERC20Burnable.test.js @@ -1,8 +1,10 @@ +const { BN } = require('openzeppelin-test-helpers'); + const { shouldBehaveLikeERC20Burnable } = require('./behaviors/ERC20Burnable.behavior'); const ERC20BurnableMock = artifacts.require('ERC20BurnableMock'); contract('ERC20Burnable', function ([_, owner, ...otherAccounts]) { - const initialBalance = 1000; + const initialBalance = new BN(1000); beforeEach(async function () { this.token = await ERC20BurnableMock.new(owner, initialBalance, { from: owner }); diff --git a/test/token/ERC20/ERC20Capped.test.js b/test/token/ERC20/ERC20Capped.test.js index dd8f7a850..50aab0013 100644 --- a/test/token/ERC20/ERC20Capped.test.js +++ b/test/token/ERC20/ERC20Capped.test.js @@ -1,16 +1,15 @@ -const shouldFail = require('../../helpers/shouldFail'); -const { ether } = require('../../helpers/ether'); +const { BN, ether, shouldFail } = require('openzeppelin-test-helpers'); const { shouldBehaveLikeERC20Mintable } = require('./behaviors/ERC20Mintable.behavior'); const { shouldBehaveLikeERC20Capped } = require('./behaviors/ERC20Capped.behavior'); const ERC20Capped = artifacts.require('ERC20CappedMock'); contract('ERC20Capped', function ([_, minter, ...otherAccounts]) { - const cap = ether(1000); + const cap = ether('1000'); it('requires a non-zero cap', async function () { await shouldFail.reverting( - ERC20Capped.new(0, { from: minter }) + ERC20Capped.new(new BN(0), { from: minter }) ); }); diff --git a/test/token/ERC20/ERC20Detailed.test.js b/test/token/ERC20/ERC20Detailed.test.js index 448487acd..1978350b2 100644 --- a/test/token/ERC20/ERC20Detailed.test.js +++ b/test/token/ERC20/ERC20Detailed.test.js @@ -1,11 +1,11 @@ -require('../../helpers/setup'); +const { BN } = require('openzeppelin-test-helpers'); const ERC20DetailedMock = artifacts.require('ERC20DetailedMock'); contract('ERC20Detailed', function () { const _name = 'My Detailed ERC20'; const _symbol = 'MDT'; - const _decimals = 18; + const _decimals = new BN(18); beforeEach(async function () { this.detailedERC20 = await ERC20DetailedMock.new(_name, _symbol, _decimals); diff --git a/test/token/ERC20/ERC20Mintable.test.js b/test/token/ERC20/ERC20Mintable.test.js index 083565d87..659276ddd 100644 --- a/test/token/ERC20/ERC20Mintable.test.js +++ b/test/token/ERC20/ERC20Mintable.test.js @@ -1,6 +1,6 @@ const { shouldBehaveLikeERC20Mintable } = require('./behaviors/ERC20Mintable.behavior'); const ERC20MintableMock = artifacts.require('ERC20MintableMock'); -const { shouldBehaveLikePublicRole } = require('../../access/roles/PublicRole.behavior'); +const { shouldBehaveLikePublicRole } = require('../../behaviors/access/roles/PublicRole.behavior'); contract('ERC20Mintable', function ([_, minter, otherMinter, ...otherAccounts]) { beforeEach(async function () { diff --git a/test/token/ERC20/ERC20Pausable.test.js b/test/token/ERC20/ERC20Pausable.test.js index f89d20e25..cee627ab3 100644 --- a/test/token/ERC20/ERC20Pausable.test.js +++ b/test/token/ERC20/ERC20Pausable.test.js @@ -1,12 +1,13 @@ -const expectEvent = require('../../helpers/expectEvent'); -const shouldFail = require('../../helpers/shouldFail'); +const { BN, expectEvent, shouldFail } = require('openzeppelin-test-helpers'); const ERC20PausableMock = artifacts.require('ERC20PausableMock'); -const { shouldBehaveLikePublicRole } = require('../../access/roles/PublicRole.behavior'); +const { shouldBehaveLikePublicRole } = require('../../behaviors/access/roles/PublicRole.behavior'); contract('ERC20Pausable', function ([_, pauser, otherPauser, recipient, anotherAccount, ...otherAccounts]) { + const initialSupply = new BN(100); + beforeEach(async function () { - this.token = await ERC20PausableMock.new(pauser, 100, { from: pauser }); + this.token = await ERC20PausableMock.new(pauser, initialSupply, { from: pauser }); }); describe('pauser role', function () { @@ -114,132 +115,142 @@ contract('ERC20Pausable', function ([_, pauser, otherPauser, recipient, anotherA describe('transfer', function () { it('allows to transfer when unpaused', async function () { - await this.token.transfer(recipient, 100, { from: pauser }); + await this.token.transfer(recipient, initialSupply, { from: pauser }); - (await this.token.balanceOf(pauser)).should.be.bignumber.equal(0); - (await this.token.balanceOf(recipient)).should.be.bignumber.equal(100); + (await this.token.balanceOf(pauser)).should.be.bignumber.equal('0'); + (await this.token.balanceOf(recipient)).should.be.bignumber.equal(initialSupply); }); it('allows to transfer when paused and then unpaused', async function () { await this.token.pause({ from: pauser }); await this.token.unpause({ from: pauser }); - await this.token.transfer(recipient, 100, { from: pauser }); + await this.token.transfer(recipient, initialSupply, { from: pauser }); - (await this.token.balanceOf(pauser)).should.be.bignumber.equal(0); - (await this.token.balanceOf(recipient)).should.be.bignumber.equal(100); + (await this.token.balanceOf(pauser)).should.be.bignumber.equal('0'); + (await this.token.balanceOf(recipient)).should.be.bignumber.equal(initialSupply); }); it('reverts when trying to transfer when paused', async function () { await this.token.pause({ from: pauser }); - await shouldFail.reverting(this.token.transfer(recipient, 100, { from: pauser })); + await shouldFail.reverting(this.token.transfer(recipient, initialSupply, { from: pauser })); }); }); describe('approve', function () { - it('allows to approve when unpaused', async function () { - await this.token.approve(anotherAccount, 40, { from: pauser }); + const allowance = new BN(40); - (await this.token.allowance(pauser, anotherAccount)).should.be.bignumber.equal(40); + it('allows to approve when unpaused', async function () { + await this.token.approve(anotherAccount, allowance, { from: pauser }); + + (await this.token.allowance(pauser, anotherAccount)).should.be.bignumber.equal(allowance); }); it('allows to approve when paused and then unpaused', async function () { await this.token.pause({ from: pauser }); await this.token.unpause({ from: pauser }); - await this.token.approve(anotherAccount, 40, { from: pauser }); + await this.token.approve(anotherAccount, allowance, { from: pauser }); - (await this.token.allowance(pauser, anotherAccount)).should.be.bignumber.equal(40); + (await this.token.allowance(pauser, anotherAccount)).should.be.bignumber.equal(allowance); }); it('reverts when trying to approve when paused', async function () { await this.token.pause({ from: pauser }); - await shouldFail.reverting(this.token.approve(anotherAccount, 40, { from: pauser })); + await shouldFail.reverting(this.token.approve(anotherAccount, allowance, { from: pauser })); }); }); describe('transfer from', function () { + const allowance = new BN(40); + beforeEach(async function () { - await this.token.approve(anotherAccount, 50, { from: pauser }); + await this.token.approve(anotherAccount, allowance, { from: pauser }); }); it('allows to transfer from when unpaused', async function () { - await this.token.transferFrom(pauser, recipient, 40, { from: anotherAccount }); + await this.token.transferFrom(pauser, recipient, allowance, { from: anotherAccount }); - (await this.token.balanceOf(pauser)).should.be.bignumber.equal(60); - (await this.token.balanceOf(recipient)).should.be.bignumber.equal(40); + (await this.token.balanceOf(recipient)).should.be.bignumber.equal(allowance); + (await this.token.balanceOf(pauser)).should.be.bignumber.equal(initialSupply.sub(allowance)); }); it('allows to transfer when paused and then unpaused', async function () { await this.token.pause({ from: pauser }); await this.token.unpause({ from: pauser }); - await this.token.transferFrom(pauser, recipient, 40, { from: anotherAccount }); + await this.token.transferFrom(pauser, recipient, allowance, { from: anotherAccount }); - (await this.token.balanceOf(pauser)).should.be.bignumber.equal(60); - (await this.token.balanceOf(recipient)).should.be.bignumber.equal(40); + (await this.token.balanceOf(recipient)).should.be.bignumber.equal(allowance); + (await this.token.balanceOf(pauser)).should.be.bignumber.equal(initialSupply.sub(allowance)); }); it('reverts when trying to transfer from when paused', async function () { await this.token.pause({ from: pauser }); - await shouldFail.reverting(this.token.transferFrom(pauser, recipient, 40, { from: anotherAccount })); + await shouldFail.reverting(this.token.transferFrom(pauser, recipient, allowance, { from: anotherAccount })); }); }); describe('decrease approval', function () { + const allowance = new BN(40); + const decrement = new BN(10); + beforeEach(async function () { - await this.token.approve(anotherAccount, 100, { from: pauser }); + await this.token.approve(anotherAccount, allowance, { from: pauser }); }); it('allows to decrease approval when unpaused', async function () { - await this.token.decreaseAllowance(anotherAccount, 40, { from: pauser }); + await this.token.decreaseAllowance(anotherAccount, decrement, { from: pauser }); - (await this.token.allowance(pauser, anotherAccount)).should.be.bignumber.equal(60); + (await this.token.allowance(pauser, anotherAccount)).should.be.bignumber.equal(allowance.sub(decrement)); }); it('allows to decrease approval when paused and then unpaused', async function () { await this.token.pause({ from: pauser }); await this.token.unpause({ from: pauser }); - await this.token.decreaseAllowance(anotherAccount, 40, { from: pauser }); + await this.token.decreaseAllowance(anotherAccount, decrement, { from: pauser }); - (await this.token.allowance(pauser, anotherAccount)).should.be.bignumber.equal(60); + (await this.token.allowance(pauser, anotherAccount)).should.be.bignumber.equal(allowance.sub(decrement)); }); it('reverts when trying to transfer when paused', async function () { await this.token.pause({ from: pauser }); - await shouldFail.reverting(this.token.decreaseAllowance(anotherAccount, 40, { from: pauser })); + await shouldFail.reverting(this.token.decreaseAllowance(anotherAccount, decrement, { from: pauser })); }); }); describe('increase approval', function () { + const allowance = new BN(40); + const increment = new BN(30); + beforeEach(async function () { - await this.token.approve(anotherAccount, 100, { from: pauser }); + await this.token.approve(anotherAccount, allowance, { from: pauser }); }); it('allows to increase approval when unpaused', async function () { - await this.token.increaseAllowance(anotherAccount, 40, { from: pauser }); + await this.token.increaseAllowance(anotherAccount, increment, { from: pauser }); - (await this.token.allowance(pauser, anotherAccount)).should.be.bignumber.equal(140); + (await this.token.allowance(pauser, anotherAccount)).should.be.bignumber.equal(allowance.add(increment)); }); it('allows to increase approval when paused and then unpaused', async function () { await this.token.pause({ from: pauser }); await this.token.unpause({ from: pauser }); - await this.token.increaseAllowance(anotherAccount, 40, { from: pauser }); + await this.token.increaseAllowance(anotherAccount, increment, { from: pauser }); - (await this.token.allowance(pauser, anotherAccount)).should.be.bignumber.equal(140); + (await this.token.allowance(pauser, anotherAccount)).should.be.bignumber.equal(allowance.add(increment)); }); it('reverts when trying to increase approval when paused', async function () { await this.token.pause({ from: pauser }); - await shouldFail.reverting(this.token.increaseAllowance(anotherAccount, 40, { from: pauser })); + await shouldFail.reverting(this.token.increaseAllowance(anotherAccount, increment, { from: pauser })); }); }); }); diff --git a/test/token/ERC20/SafeERC20.test.js b/test/token/ERC20/SafeERC20.test.js index 4be44cf38..cc3d35fb1 100644 --- a/test/token/ERC20/SafeERC20.test.js +++ b/test/token/ERC20/SafeERC20.test.js @@ -1,6 +1,4 @@ -const shouldFail = require('../../helpers/shouldFail'); - -require('../../helpers/setup'); +const { shouldFail } = require('openzeppelin-test-helpers'); const SafeERC20Helper = artifacts.require('SafeERC20Helper'); diff --git a/test/token/ERC20/TokenTimelock.test.js b/test/token/ERC20/TokenTimelock.test.js index 6796f6ada..8934d9c70 100644 --- a/test/token/ERC20/TokenTimelock.test.js +++ b/test/token/ERC20/TokenTimelock.test.js @@ -1,13 +1,10 @@ -const shouldFail = require('../../helpers/shouldFail'); -const time = require('../../helpers/time'); - -const { BigNumber } = require('../../helpers/setup'); +const { BN, shouldFail, time } = require('openzeppelin-test-helpers'); const ERC20Mintable = artifacts.require('ERC20MintableMock'); const TokenTimelock = artifacts.require('TokenTimelockMock'); contract('TokenTimelock', function ([_, minter, beneficiary]) { - const amount = new BigNumber(100); + const amount = new BN(100); context('with token', function () { beforeEach(async function () { @@ -15,7 +12,7 @@ contract('TokenTimelock', function ([_, minter, beneficiary]) { }); it('rejects a release time in the past', async function () { - const pastReleaseTime = (await time.latest()) - time.duration.years(1); + const pastReleaseTime = (await time.latest()).sub(time.duration.years(1)); await shouldFail.reverting( TokenTimelock.new(this.token.address, beneficiary, pastReleaseTime) ); @@ -23,7 +20,7 @@ contract('TokenTimelock', function ([_, minter, beneficiary]) { context('once deployed', function () { beforeEach(async function () { - this.releaseTime = (await time.latest()) + time.duration.years(1); + this.releaseTime = (await time.latest()).add(time.duration.years(1)); this.timelock = await TokenTimelock.new(this.token.address, beneficiary, this.releaseTime); await this.token.mint(this.timelock.address, amount, { from: minter }); }); @@ -39,24 +36,24 @@ contract('TokenTimelock', function ([_, minter, beneficiary]) { }); it('cannot be released just before time limit', async function () { - await time.increaseTo(this.releaseTime - time.duration.seconds(3)); + await time.increaseTo(this.releaseTime.sub(time.duration.seconds(3))); await shouldFail.reverting(this.timelock.release()); }); it('can be released just after limit', async function () { - await time.increaseTo(this.releaseTime + time.duration.seconds(1)); + await time.increaseTo(this.releaseTime.add(time.duration.seconds(1))); await this.timelock.release(); (await this.token.balanceOf(beneficiary)).should.be.bignumber.equal(amount); }); it('can be released after time limit', async function () { - await time.increaseTo(this.releaseTime + time.duration.years(1)); + await time.increaseTo(this.releaseTime.add(time.duration.years(1))); await this.timelock.release(); (await this.token.balanceOf(beneficiary)).should.be.bignumber.equal(amount); }); it('cannot be released twice', async function () { - await time.increaseTo(this.releaseTime + time.duration.years(1)); + await time.increaseTo(this.releaseTime.add(time.duration.years(1))); await this.timelock.release(); await shouldFail.reverting(this.timelock.release()); (await this.token.balanceOf(beneficiary)).should.be.bignumber.equal(amount); diff --git a/test/token/ERC20/behaviors/ERC20Burnable.behavior.js b/test/token/ERC20/behaviors/ERC20Burnable.behavior.js index 6d1c7195b..1c60d81ed 100644 --- a/test/token/ERC20/behaviors/ERC20Burnable.behavior.js +++ b/test/token/ERC20/behaviors/ERC20Burnable.behavior.js @@ -1,18 +1,15 @@ -const shouldFail = require('../../../helpers/shouldFail'); -const expectEvent = require('../../../helpers/expectEvent'); -const { ZERO_ADDRESS } = require('../../../helpers/constants'); - -require('../../../helpers/setup'); +const { BN, constants, expectEvent, shouldFail } = require('openzeppelin-test-helpers'); +const { ZERO_ADDRESS } = constants; function shouldBehaveLikeERC20Burnable (owner, initialBalance, [burner]) { describe('burn', function () { describe('when the given amount is not greater than balance of the sender', function () { context('for a zero amount', function () { - shouldBurn(0); + shouldBurn(new BN(0)); }); context('for a non-zero amount', function () { - shouldBurn(100); + shouldBurn(new BN(100)); }); function shouldBurn (amount) { @@ -21,7 +18,7 @@ function shouldBehaveLikeERC20Burnable (owner, initialBalance, [burner]) { }); it('burns the requested amount', async function () { - (await this.token.balanceOf(owner)).should.be.bignumber.equal(initialBalance - amount); + (await this.token.balanceOf(owner)).should.be.bignumber.equal(initialBalance.sub(amount)); }); it('emits a transfer event', async function () { @@ -35,7 +32,7 @@ function shouldBehaveLikeERC20Burnable (owner, initialBalance, [burner]) { }); describe('when the given amount is greater than the balance of the sender', function () { - const amount = initialBalance + 1; + const amount = initialBalance.addn(1); it('reverts', async function () { await shouldFail.reverting(this.token.burn(amount, { from: owner })); @@ -46,15 +43,15 @@ function shouldBehaveLikeERC20Burnable (owner, initialBalance, [burner]) { describe('burnFrom', function () { describe('on success', function () { context('for a zero amount', function () { - shouldBurnFrom(0); + shouldBurnFrom(new BN(0)); }); context('for a non-zero amount', function () { - shouldBurnFrom(100); + shouldBurnFrom(new BN(100)); }); function shouldBurnFrom (amount) { - const originalAllowance = amount * 3; + const originalAllowance = amount.muln(3); beforeEach(async function () { await this.token.approve(burner, originalAllowance, { from: owner }); @@ -63,11 +60,11 @@ function shouldBehaveLikeERC20Burnable (owner, initialBalance, [burner]) { }); it('burns the requested amount', async function () { - (await this.token.balanceOf(owner)).should.be.bignumber.equal(initialBalance - amount); + (await this.token.balanceOf(owner)).should.be.bignumber.equal(initialBalance.sub(amount)); }); it('decrements allowance', async function () { - (await this.token.allowance(owner, burner)).should.be.bignumber.equal(originalAllowance - amount); + (await this.token.allowance(owner, burner)).should.be.bignumber.equal(originalAllowance.sub(amount)); }); it('emits a transfer event', async function () { @@ -81,7 +78,8 @@ function shouldBehaveLikeERC20Burnable (owner, initialBalance, [burner]) { }); describe('when the given amount is greater than the balance of the sender', function () { - const amount = initialBalance + 1; + const amount = initialBalance.addn(1); + it('reverts', async function () { await this.token.approve(burner, amount, { from: owner }); await shouldFail.reverting(this.token.burnFrom(owner, amount, { from: burner })); @@ -89,10 +87,11 @@ function shouldBehaveLikeERC20Burnable (owner, initialBalance, [burner]) { }); describe('when the given amount is greater than the allowance', function () { - const amount = 100; + const allowance = new BN(100); + it('reverts', async function () { - await this.token.approve(burner, amount - 1, { from: owner }); - await shouldFail.reverting(this.token.burnFrom(owner, amount, { from: burner })); + await this.token.approve(burner, allowance, { from: owner }); + await shouldFail.reverting(this.token.burnFrom(owner, allowance.addn(1), { from: burner })); }); }); }); diff --git a/test/token/ERC20/behaviors/ERC20Capped.behavior.js b/test/token/ERC20/behaviors/ERC20Capped.behavior.js index 876dbd329..c7711d52a 100644 --- a/test/token/ERC20/behaviors/ERC20Capped.behavior.js +++ b/test/token/ERC20/behaviors/ERC20Capped.behavior.js @@ -1,6 +1,4 @@ -const shouldFail = require('../../../helpers/shouldFail'); - -require('../../../helpers/setup'); +const { shouldFail } = require('openzeppelin-test-helpers'); function shouldBehaveLikeERC20Capped (minter, [anyone], cap) { describe('capped token', function () { @@ -11,13 +9,13 @@ function shouldBehaveLikeERC20Capped (minter, [anyone], cap) { }); it('should mint when amount is less than cap', async function () { - await this.token.mint(anyone, cap.sub(1), { from }); - (await this.token.totalSupply()).should.be.bignumber.equal(cap.sub(1)); + await this.token.mint(anyone, cap.subn(1), { from }); + (await this.token.totalSupply()).should.be.bignumber.equal(cap.subn(1)); }); - it('should fail to mint if the ammount exceeds the cap', async function () { - await this.token.mint(anyone, cap.sub(1), { from }); - await shouldFail.reverting(this.token.mint(anyone, 100, { from })); + it('should fail to mint if the amount exceeds the cap', async function () { + await this.token.mint(anyone, cap.subn(1), { from }); + await shouldFail.reverting(this.token.mint(anyone, 2, { from })); }); it('should fail to mint after cap is reached', async function () { diff --git a/test/token/ERC20/behaviors/ERC20Mintable.behavior.js b/test/token/ERC20/behaviors/ERC20Mintable.behavior.js index 987b67752..08de77864 100644 --- a/test/token/ERC20/behaviors/ERC20Mintable.behavior.js +++ b/test/token/ERC20/behaviors/ERC20Mintable.behavior.js @@ -1,19 +1,16 @@ -const shouldFail = require('../../../helpers/shouldFail'); -const expectEvent = require('../../../helpers/expectEvent'); -const { ZERO_ADDRESS } = require('../../../helpers/constants'); - -require('../../../helpers/setup'); +const { BN, constants, expectEvent, shouldFail } = require('openzeppelin-test-helpers'); +const { ZERO_ADDRESS } = constants; function shouldBehaveLikeERC20Mintable (minter, [anyone]) { describe('as a mintable token', function () { describe('mint', function () { - const amount = 100; + const amount = new BN(100); context('when the sender has minting permission', function () { const from = minter; context('for a zero amount', function () { - shouldMint(0); + shouldMint(new BN(0)); }); context('for a non-zero amount', function () { diff --git a/test/token/ERC721/ERC721.behavior.js b/test/token/ERC721/ERC721.behavior.js index b7600872c..188706762 100644 --- a/test/token/ERC721/ERC721.behavior.js +++ b/test/token/ERC721/ERC721.behavior.js @@ -1,20 +1,17 @@ -const expectEvent = require('../../helpers/expectEvent'); +const { BN, constants, expectEvent, shouldFail } = require('openzeppelin-test-helpers'); +const { ZERO_ADDRESS } = constants; const { shouldSupportInterfaces } = require('../../introspection/SupportsInterface.behavior'); -const shouldFail = require('../../helpers/shouldFail'); -const { ZERO_ADDRESS } = require('../../helpers/constants'); -const send = require('../../helpers/send'); const ERC721ReceiverMock = artifacts.require('ERC721ReceiverMock.sol'); -require('../../helpers/setup'); function shouldBehaveLikeERC721 ( creator, minter, [owner, approved, anotherApproved, operator, anyone] ) { - const firstTokenId = 1; - const secondTokenId = 2; - const unknownTokenId = 3; + const firstTokenId = new BN(1); + const secondTokenId = new BN(2); + const unknownTokenId = new BN(3); const RECEIVER_MAGIC_VALUE = '0x150b7a02'; describe('like an ERC721', function () { @@ -27,19 +24,19 @@ function shouldBehaveLikeERC721 ( describe('balanceOf', function () { context('when the given address owns some tokens', function () { it('returns the amount of tokens owned by the given address', async function () { - (await this.token.balanceOf(owner)).should.be.bignumber.equal(2); + (await this.token.balanceOf(owner)).should.be.bignumber.equal('2'); }); }); context('when the given address does not own any tokens', function () { it('returns 0', async function () { - (await this.token.balanceOf(anyone)).should.be.bignumber.equal(0); + (await this.token.balanceOf(anyone)).should.be.bignumber.equal('0'); }); }); context('when querying the zero address', function () { it('throws', async function () { - await shouldFail.reverting(this.token.balanceOf(0)); + await shouldFail.reverting(this.token.balanceOf(ZERO_ADDRESS)); }); }); }); @@ -101,15 +98,15 @@ function shouldBehaveLikeERC721 ( } it('adjusts owners balances', async function () { - (await this.token.balanceOf(owner)).should.be.bignumber.equal(1); + (await this.token.balanceOf(owner)).should.be.bignumber.equal('1'); }); it('adjusts owners tokens by index', async function () { if (!this.token.tokenOfOwnerByIndex) return; - (await this.token.tokenOfOwnerByIndex(this.toWhom, 0)).toNumber().should.be.equal(tokenId); + (await this.token.tokenOfOwnerByIndex(this.toWhom, 0)).should.be.bignumber.equal(tokenId); - (await this.token.tokenOfOwnerByIndex(owner, 0)).toNumber().should.not.be.equal(tokenId); + (await this.token.tokenOfOwnerByIndex(owner, 0)).should.be.bignumber.not.equal(tokenId); }); }; @@ -165,7 +162,7 @@ function shouldBehaveLikeERC721 ( }); it('keeps the owner balance', async function () { - (await this.token.balanceOf(owner)).should.be.bignumber.equal(2); + (await this.token.balanceOf(owner)).should.be.bignumber.equal('2'); }); it('keeps same tokens by index', async function () { @@ -173,7 +170,9 @@ function shouldBehaveLikeERC721 ( const tokensListed = await Promise.all( [0, 1].map(i => this.token.tokenOfOwnerByIndex(owner, i)) ); - tokensListed.map(t => t.toNumber()).should.have.members([firstTokenId, secondTokenId]); + tokensListed.map(t => t.toNumber()).should.have.members( + [firstTokenId.toNumber(), secondTokenId.toNumber()] + ); }); }); @@ -200,7 +199,9 @@ function shouldBehaveLikeERC721 ( context('when the address to transfer the token to is the zero address', function () { it('reverts', async function () { - await shouldFail.reverting(transferFunction.call(this, owner, ZERO_ADDRESS, tokenId, { from: owner })); + await shouldFail.reverting( + transferFunction.call(this, owner, ZERO_ADDRESS, tokenId, { from: owner }) + ); }); }); }; @@ -213,17 +214,11 @@ function shouldBehaveLikeERC721 ( describe('via safeTransferFrom', function () { const safeTransferFromWithData = function (from, to, tokenId, opts) { - return send.transaction( - this.token, - 'safeTransferFrom', - 'address,address,uint256,bytes', - [from, to, tokenId, data], - opts - ); + return this.token.methods['safeTransferFrom(address,address,uint256,bytes)'](from, to, tokenId, data, opts); }; const safeTransferFromWithoutData = function (from, to, tokenId, opts) { - return this.token.safeTransferFrom(from, to, tokenId, opts); + return this.token.methods['safeTransferFrom(address,address,uint256)'](from, to, tokenId, opts); }; const shouldTransferSafely = function (transferFun, data) { @@ -282,7 +277,7 @@ function shouldBehaveLikeERC721 ( }); describe('without data', function () { - shouldTransferSafely(safeTransferFromWithoutData, '0x'); + shouldTransferSafely(safeTransferFromWithoutData, null); }); describe('to a receiver contract returning unexpected value', function () { diff --git a/test/token/ERC721/ERC721.test.js b/test/token/ERC721/ERC721.test.js index 8ae1c05eb..428f313fc 100644 --- a/test/token/ERC721/ERC721.test.js +++ b/test/token/ERC721/ERC721.test.js @@ -1,8 +1,5 @@ -require('../../helpers/setup'); -const { ZERO_ADDRESS } = require('../../helpers/constants'); -const expectEvent = require('../../helpers/expectEvent'); -const send = require('../../helpers/send'); -const shouldFail = require('../../helpers/shouldFail'); +const { BN, constants, expectEvent, shouldFail } = require('openzeppelin-test-helpers'); +const { ZERO_ADDRESS } = constants; const { shouldBehaveLikeERC721 } = require('./ERC721.behavior'); const ERC721Mock = artifacts.require('ERC721Mock.sol'); @@ -15,7 +12,7 @@ contract('ERC721', function ([_, creator, tokenOwner, anyone, ...accounts]) { shouldBehaveLikeERC721(creator, creator, accounts); describe('internal functions', function () { - const tokenId = 5042; + const tokenId = new BN('5042'); describe('_mint(address, uint256)', function () { it('reverts with a null destination address', async function () { @@ -32,7 +29,7 @@ contract('ERC721', function ([_, creator, tokenOwner, anyone, ...accounts]) { }); it('creates the token', async function () { - (await this.token.balanceOf(tokenOwner)).should.be.bignumber.equal(1); + (await this.token.balanceOf(tokenOwner)).should.be.bignumber.equal('1'); (await this.token.ownerOf(tokenId)).should.equal(tokenOwner); }); @@ -44,7 +41,7 @@ contract('ERC721', function ([_, creator, tokenOwner, anyone, ...accounts]) { describe('_burn(address, uint256)', function () { it('reverts when burning a non-existent token id', async function () { - await shouldFail.reverting(send.transaction(this.token, 'burn', 'address,uint256', [tokenOwner, tokenId])); + await shouldFail.reverting(this.token.methods['burn(address,uint256)'](tokenOwner, tokenId)); }); context('with minted token', function () { @@ -53,13 +50,12 @@ contract('ERC721', function ([_, creator, tokenOwner, anyone, ...accounts]) { }); it('reverts when the account is not the owner', async function () { - await shouldFail.reverting(send.transaction(this.token, 'burn', 'address,uint256', [anyone, tokenId])); + await shouldFail.reverting(this.token.methods['burn(address,uint256)'](anyone, tokenId)); }); context('with burnt token', function () { beforeEach(async function () { - ({ logs: this.logs } = - await send.transaction(this.token, 'burn', 'address,uint256', [tokenOwner, tokenId])); + ({ logs: this.logs } = await this.token.methods['burn(address,uint256)'](tokenOwner, tokenId)); }); it('emits a Transfer event', function () { @@ -67,12 +63,12 @@ contract('ERC721', function ([_, creator, tokenOwner, anyone, ...accounts]) { }); it('deletes the token', async function () { - (await this.token.balanceOf(tokenOwner)).should.be.bignumber.equal(0); + (await this.token.balanceOf(tokenOwner)).should.be.bignumber.equal('0'); await shouldFail.reverting(this.token.ownerOf(tokenId)); }); it('reverts when burning a token id that has been deleted', async function () { - await shouldFail.reverting(send.transaction(this.token, 'burn', 'address,uint256', [tokenOwner, tokenId])); + await shouldFail.reverting(this.token.methods['burn(address,uint256)'](tokenOwner, tokenId)); }); }); }); @@ -80,7 +76,7 @@ contract('ERC721', function ([_, creator, tokenOwner, anyone, ...accounts]) { describe('_burn(uint256)', function () { it('reverts when burning a non-existent token id', async function () { - await shouldFail.reverting(send.transaction(this.token, 'burn', 'uint256', [tokenId])); + await shouldFail.reverting(this.token.methods['burn(uint256)'](tokenId)); }); context('with minted token', function () { @@ -90,7 +86,7 @@ contract('ERC721', function ([_, creator, tokenOwner, anyone, ...accounts]) { context('with burnt token', function () { beforeEach(async function () { - ({ logs: this.logs } = await send.transaction(this.token, 'burn', 'uint256', [tokenId])); + ({ logs: this.logs } = await this.token.methods['burn(uint256)'](tokenId)); }); it('emits a Transfer event', function () { @@ -98,12 +94,12 @@ contract('ERC721', function ([_, creator, tokenOwner, anyone, ...accounts]) { }); it('deletes the token', async function () { - (await this.token.balanceOf(tokenOwner)).should.be.bignumber.equal(0); + (await this.token.balanceOf(tokenOwner)).should.be.bignumber.equal('0'); await shouldFail.reverting(this.token.ownerOf(tokenId)); }); it('reverts when burning a token id that has been deleted', async function () { - await shouldFail.reverting(send.transaction(this.token, 'burn', 'uint256', [tokenId])); + await shouldFail.reverting(this.token.methods['burn(uint256)'](tokenId)); }); }); }); diff --git a/test/token/ERC721/ERC721Burnable.test.js b/test/token/ERC721/ERC721Burnable.test.js index a75e60ff8..e273d1aa6 100644 --- a/test/token/ERC721/ERC721Burnable.test.js +++ b/test/token/ERC721/ERC721Burnable.test.js @@ -1,3 +1,5 @@ +require('openzeppelin-test-helpers'); + const { shouldBehaveLikeERC721 } = require('./ERC721.behavior'); const { shouldBehaveLikeMintAndBurnERC721, @@ -5,8 +7,6 @@ const { const ERC721BurnableImpl = artifacts.require('ERC721MintableBurnableImpl.sol'); -require('../../helpers/setup'); - contract('ERC721Burnable', function ([_, creator, ...accounts]) { const minter = creator; diff --git a/test/token/ERC721/ERC721Full.test.js b/test/token/ERC721/ERC721Full.test.js index a7642184f..975d1c0a5 100644 --- a/test/token/ERC721/ERC721Full.test.js +++ b/test/token/ERC721/ERC721Full.test.js @@ -1,21 +1,20 @@ -const shouldFail = require('../../helpers/shouldFail'); +const { BN, shouldFail } = require('openzeppelin-test-helpers'); + const { shouldBehaveLikeERC721 } = require('./ERC721.behavior'); const { shouldSupportInterfaces } = require('../../introspection/SupportsInterface.behavior'); const ERC721FullMock = artifacts.require('ERC721FullMock.sol'); -require('../../helpers/setup'); - contract('ERC721Full', function ([ creator, ...accounts ]) { const name = 'Non Fungible Token'; const symbol = 'NFT'; - const firstTokenId = 100; - const secondTokenId = 200; - const thirdTokenId = 300; - const nonExistentTokenId = 999; + const firstTokenId = new BN(100); + const secondTokenId = new BN(200); + const thirdTokenId = new BN(300); + const nonExistentTokenId = new BN(999); const minter = creator; @@ -41,11 +40,11 @@ contract('ERC721Full', function ([ }); it('adjusts owner tokens by index', async function () { - (await this.token.tokenOfOwnerByIndex(newOwner, 0)).toNumber().should.be.equal(thirdTokenId); + (await this.token.tokenOfOwnerByIndex(newOwner, 0)).should.be.bignumber.equal(thirdTokenId); }); it('adjusts all tokens list', async function () { - (await this.token.tokenByIndex(2)).toNumber().should.be.equal(thirdTokenId); + (await this.token.tokenByIndex(2)).should.be.bignumber.equal(thirdTokenId); }); }); @@ -55,16 +54,16 @@ contract('ERC721Full', function ([ }); it('removes that token from the token list of the owner', async function () { - (await this.token.tokenOfOwnerByIndex(owner, 0)).toNumber().should.be.equal(secondTokenId); + (await this.token.tokenOfOwnerByIndex(owner, 0)).should.be.bignumber.equal(secondTokenId); }); it('adjusts all tokens list', async function () { - (await this.token.tokenByIndex(0)).toNumber().should.be.equal(secondTokenId); + (await this.token.tokenByIndex(0)).should.be.bignumber.equal(secondTokenId); }); it('burns all tokens', async function () { await this.token.burn(secondTokenId, { from: owner }); - (await this.token.totalSupply()).toNumber().should.be.equal(0); + (await this.token.totalSupply()).should.be.bignumber.equal('0'); await shouldFail.reverting(this.token.tokenByIndex(0)); }); }); @@ -115,7 +114,7 @@ contract('ERC721Full', function ([ describe('totalSupply', function () { it('returns total token supply', async function () { - (await this.token.totalSupply()).should.be.bignumber.equal(2); + (await this.token.totalSupply()).should.be.bignumber.equal('2'); }); }); @@ -145,15 +144,15 @@ contract('ERC721Full', function ([ }); it('returns correct token IDs for target', async function () { - (await this.token.balanceOf(another)).toNumber().should.be.equal(2); + (await this.token.balanceOf(another)).should.be.bignumber.equal('2'); const tokensListed = await Promise.all( [0, 1].map(i => this.token.tokenOfOwnerByIndex(another, i)) ); - tokensListed.map(t => t.toNumber()).should.have.members([firstTokenId, secondTokenId]); + tokensListed.map(t => t.toNumber()).should.have.members([firstTokenId.toNumber(), secondTokenId.toNumber()]); }); it('returns empty collection for original owner', async function () { - (await this.token.balanceOf(owner)).toNumber().should.be.equal(0); + (await this.token.balanceOf(owner)).should.be.bignumber.equal('0'); await shouldFail.reverting(this.token.tokenOfOwnerByIndex(owner, 0)); }); }); @@ -164,7 +163,7 @@ contract('ERC721Full', function ([ const tokensListed = await Promise.all( [0, 1].map(i => this.token.tokenByIndex(i)) ); - tokensListed.map(t => t.toNumber()).should.have.members([firstTokenId, secondTokenId]); + tokensListed.map(t => t.toNumber()).should.have.members([firstTokenId.toNumber(), secondTokenId.toNumber()]); }); it('should revert if index is greater than supply', async function () { @@ -173,14 +172,14 @@ contract('ERC721Full', function ([ [firstTokenId, secondTokenId].forEach(function (tokenId) { it(`should return all tokens after burning token ${tokenId} and minting new tokens`, async function () { - const newTokenId = 300; - const anotherNewTokenId = 400; + const newTokenId = new BN(300); + const anotherNewTokenId = new BN(400); await this.token.burn(tokenId, { from: owner }); await this.token.mint(newOwner, newTokenId, { from: minter }); await this.token.mint(newOwner, anotherNewTokenId, { from: minter }); - (await this.token.totalSupply()).toNumber().should.be.equal(3); + (await this.token.totalSupply()).should.be.bignumber.equal('3'); const tokensListed = await Promise.all( [0, 1, 2].map(i => this.token.tokenByIndex(i)) @@ -188,7 +187,7 @@ contract('ERC721Full', function ([ const expectedTokens = [firstTokenId, secondTokenId, newTokenId, anotherNewTokenId].filter( x => (x !== tokenId) ); - tokensListed.map(t => t.toNumber()).should.have.members(expectedTokens); + tokensListed.map(t => t.toNumber()).should.have.members(expectedTokens.map(t => t.toNumber())); }); }); }); diff --git a/test/token/ERC721/ERC721Holder.test.js b/test/token/ERC721/ERC721Holder.test.js index 1c0b0dcdf..c37e112b0 100644 --- a/test/token/ERC721/ERC721Holder.test.js +++ b/test/token/ERC721/ERC721Holder.test.js @@ -1,12 +1,12 @@ +const { BN } = require('openzeppelin-test-helpers'); + const ERC721Holder = artifacts.require('ERC721Holder.sol'); const ERC721Mintable = artifacts.require('ERC721MintableBurnableImpl.sol'); -require('../../helpers/setup'); - contract('ERC721Holder', function ([creator]) { it('receives an ERC721 token', async function () { const token = await ERC721Mintable.new({ from: creator }); - const tokenId = 1; + const tokenId = new BN(1); await token.mint(creator, tokenId, { from: creator }); const receiver = await ERC721Holder.new(); diff --git a/test/token/ERC721/ERC721MintBurn.behavior.js b/test/token/ERC721/ERC721MintBurn.behavior.js index 97c33ae36..5850faecd 100644 --- a/test/token/ERC721/ERC721MintBurn.behavior.js +++ b/test/token/ERC721/ERC721MintBurn.behavior.js @@ -1,17 +1,15 @@ -const shouldFail = require('../../helpers/shouldFail'); -const expectEvent = require('../../helpers/expectEvent'); -const { ZERO_ADDRESS } = require('../../helpers/constants'); -require('../../helpers/setup'); +const { BN, constants, expectEvent, shouldFail } = require('openzeppelin-test-helpers'); +const { ZERO_ADDRESS } = constants; function shouldBehaveLikeMintAndBurnERC721 ( creator, minter, [owner, newOwner, approved, anyone] ) { - const firstTokenId = 1; - const secondTokenId = 2; - const thirdTokenId = 3; - const unknownTokenId = 4; + const firstTokenId = new BN(1); + const secondTokenId = new BN(2); + const thirdTokenId = new BN(3); + const unknownTokenId = new BN(4); const MOCK_URI = 'https://example.com'; describe('like a mintable and burnable ERC721', function () { @@ -34,7 +32,7 @@ function shouldBehaveLikeMintAndBurnERC721 ( }); it('increases the balance of its owner', async function () { - (await this.token.balanceOf(newOwner)).should.be.bignumber.equal(1); + (await this.token.balanceOf(newOwner)).should.be.bignumber.equal('1'); }); it('emits a transfer and minted event', async function () { @@ -79,7 +77,7 @@ function shouldBehaveLikeMintAndBurnERC721 ( it('burns the given token ID and adjusts the balance of the owner', async function () { await shouldFail.reverting(this.token.ownerOf(tokenId)); - (await this.token.balanceOf(owner)).should.be.bignumber.equal(1); + (await this.token.balanceOf(owner)).should.be.bignumber.equal('1'); }); it('emits a burn event', async function () { diff --git a/test/token/ERC721/ERC721Mintable.test.js b/test/token/ERC721/ERC721Mintable.test.js index 97a129efb..0c5743a27 100644 --- a/test/token/ERC721/ERC721Mintable.test.js +++ b/test/token/ERC721/ERC721Mintable.test.js @@ -1,12 +1,9 @@ +require('openzeppelin-test-helpers'); const { shouldBehaveLikeERC721 } = require('./ERC721.behavior'); -const { - shouldBehaveLikeMintAndBurnERC721, -} = require('./ERC721MintBurn.behavior'); +const { shouldBehaveLikeMintAndBurnERC721 } = require('./ERC721MintBurn.behavior'); const ERC721MintableImpl = artifacts.require('ERC721MintableBurnableImpl.sol'); -require('../../helpers/setup'); - contract('ERC721Mintable', function ([_, creator, ...accounts]) { const minter = creator; diff --git a/test/token/ERC721/ERC721Pausable.test.js b/test/token/ERC721/ERC721Pausable.test.js index ca728001d..840e1a905 100644 --- a/test/token/ERC721/ERC721Pausable.test.js +++ b/test/token/ERC721/ERC721Pausable.test.js @@ -1,11 +1,10 @@ +require('openzeppelin-test-helpers'); const { shouldBehaveLikeERC721PausedToken } = require('./ERC721PausedToken.behavior'); const { shouldBehaveLikeERC721 } = require('./ERC721.behavior'); -const { shouldBehaveLikePublicRole } = require('../../access/roles/PublicRole.behavior'); +const { shouldBehaveLikePublicRole } = require('../../behaviors/access/roles/PublicRole.behavior'); const ERC721PausableMock = artifacts.require('ERC721PausableMock.sol'); -require('../../helpers/setup'); - contract('ERC721Pausable', function ([ _, creator, diff --git a/test/token/ERC721/ERC721PausedToken.behavior.js b/test/token/ERC721/ERC721PausedToken.behavior.js index 6df4b0cc4..59ed060c1 100644 --- a/test/token/ERC721/ERC721PausedToken.behavior.js +++ b/test/token/ERC721/ERC721PausedToken.behavior.js @@ -1,12 +1,9 @@ -const shouldFail = require('../../helpers/shouldFail'); -const send = require('../../helpers/send'); -const { ZERO_ADDRESS } = require('../../helpers/constants'); - -require('../../helpers/setup'); +const { BN, constants, shouldFail } = require('openzeppelin-test-helpers'); +const { ZERO_ADDRESS } = constants; function shouldBehaveLikeERC721PausedToken (owner, [recipient, operator]) { - const firstTokenId = 1; - const mintedTokens = 1; + const firstTokenId = new BN(1); + const mintedTokens = new BN(1); const mockData = '0x42'; describe('like a paused ERC721', function () { @@ -31,14 +28,8 @@ function shouldBehaveLikeERC721PausedToken (owner, [recipient, operator]) { }); it('reverts when trying to safeTransferFrom with data', async function () { - await shouldFail.reverting( - send.transaction( - this.token, - 'safeTransferFrom', - 'address,address,uint256,bytes', - [owner, recipient, firstTokenId, mockData], - { from: owner } - ) + await shouldFail.reverting(this.token.methods['safeTransferFrom(address,address,uint256,bytes)']( + owner, recipient, firstTokenId, mockData, { from: owner }) ); }); @@ -65,15 +56,13 @@ function shouldBehaveLikeERC721PausedToken (owner, [recipient, operator]) { describe('exists', function () { it('should return token existance', async function () { - const result = await this.token.exists(firstTokenId); - result.should.eq(true); + (await this.token.exists(firstTokenId)).should.equal(true); }); }); describe('isApprovedForAll', function () { it('returns the approval of the operator', async function () { - const isApproved = await this.token.isApprovedForAll(owner, operator); - isApproved.should.eq(false); + (await this.token.isApprovedForAll(owner, operator)).should.equal(false); }); }); }); diff --git a/test/utils/Address.test.js b/test/utils/Address.test.js index 190a5f5d8..f0fce40b3 100644 --- a/test/utils/Address.test.js +++ b/test/utils/Address.test.js @@ -1,8 +1,8 @@ +require('openzeppelin-test-helpers'); + const AddressImpl = artifacts.require('AddressImpl'); const SimpleToken = artifacts.require('SimpleTokenMock'); -require('../helpers/setup'); - contract('Address', function ([_, anyone]) { beforeEach(async function () { this.mock = await AddressImpl.new(); diff --git a/test/utils/Arrays.test.js b/test/utils/Arrays.test.js index 1c9bfdfc0..8a1125e33 100644 --- a/test/utils/Arrays.test.js +++ b/test/utils/Arrays.test.js @@ -1,6 +1,6 @@ -const ArraysImpl = artifacts.require('ArraysImpl'); +require('openzeppelin-test-helpers'); -require('../helpers/setup'); +const ArraysImpl = artifacts.require('ArraysImpl'); contract('Arrays', function () { context('Even number of elements', function () { @@ -11,23 +11,23 @@ contract('Arrays', function () { }); it('should return correct index for the basic case', async function () { - (await this.arrays.findUpperBound(16)).should.be.bignumber.equal(5); + (await this.arrays.findUpperBound(16)).should.be.bignumber.equal('5'); }); it('should return 0 for the first element', async function () { - (await this.arrays.findUpperBound(11)).should.be.bignumber.equal(0); + (await this.arrays.findUpperBound(11)).should.be.bignumber.equal('0'); }); it('should return index of the last element', async function () { - (await this.arrays.findUpperBound(20)).should.be.bignumber.equal(9); + (await this.arrays.findUpperBound(20)).should.be.bignumber.equal('9'); }); it('should return first index after last element if searched value is over the upper boundary', async function () { - (await this.arrays.findUpperBound(32)).should.be.bignumber.equal(10); + (await this.arrays.findUpperBound(32)).should.be.bignumber.equal('10'); }); it('should return 0 for the element under the lower boundary', async function () { - (await this.arrays.findUpperBound(2)).should.be.bignumber.equal(0); + (await this.arrays.findUpperBound(2)).should.be.bignumber.equal('0'); }); }); @@ -39,23 +39,23 @@ contract('Arrays', function () { }); it('should return correct index for the basic case', async function () { - (await this.arrays.findUpperBound(16)).should.be.bignumber.equal(5); + (await this.arrays.findUpperBound(16)).should.be.bignumber.equal('5'); }); it('should return 0 for the first element', async function () { - (await this.arrays.findUpperBound(11)).should.be.bignumber.equal(0); + (await this.arrays.findUpperBound(11)).should.be.bignumber.equal('0'); }); it('should return index of the last element', async function () { - (await this.arrays.findUpperBound(21)).should.be.bignumber.equal(10); + (await this.arrays.findUpperBound(21)).should.be.bignumber.equal('10'); }); it('should return first index after last element if searched value is over the upper boundary', async function () { - (await this.arrays.findUpperBound(32)).should.be.bignumber.equal(11); + (await this.arrays.findUpperBound(32)).should.be.bignumber.equal('11'); }); it('should return 0 for the element under the lower boundary', async function () { - (await this.arrays.findUpperBound(2)).should.be.bignumber.equal(0); + (await this.arrays.findUpperBound(2)).should.be.bignumber.equal('0'); }); }); @@ -67,7 +67,7 @@ contract('Arrays', function () { }); it('should return index of first element in next filled range', async function () { - (await this.arrays.findUpperBound(17)).should.be.bignumber.equal(5); + (await this.arrays.findUpperBound(17)).should.be.bignumber.equal('5'); }); }); @@ -77,7 +77,7 @@ contract('Arrays', function () { }); it('should always return 0 for empty array', async function () { - (await this.arrays.findUpperBound(10)).should.be.bignumber.equal(0); + (await this.arrays.findUpperBound(10)).should.be.bignumber.equal('0'); }); }); }); diff --git a/test/utils/ReentrancyGuard.test.js b/test/utils/ReentrancyGuard.test.js index c6da57a95..987066560 100644 --- a/test/utils/ReentrancyGuard.test.js +++ b/test/utils/ReentrancyGuard.test.js @@ -1,13 +1,12 @@ -const shouldFail = require('../helpers/shouldFail'); +const { shouldFail } = require('openzeppelin-test-helpers'); + const ReentrancyMock = artifacts.require('ReentrancyMock'); const ReentrancyAttack = artifacts.require('ReentrancyAttack'); -require('../helpers/setup'); - contract('ReentrancyGuard', function () { beforeEach(async function () { this.reentrancyMock = await ReentrancyMock.new(); - (await this.reentrancyMock.counter()).should.be.bignumber.equal(0); + (await this.reentrancyMock.counter()).should.be.bignumber.equal('0'); }); it('should not allow remote callback', async function () { diff --git a/truffle-config.js b/truffle-config.js index eab1846c7..efd7997ad 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -13,4 +13,10 @@ module.exports = { gasPrice: 0x01, }, }, + + compilers: { + solc: { + version: '0.5.0', + }, + }, };