From 139c3ce339c351a358c56669ddf0da8487f544ad Mon Sep 17 00:00:00 2001 From: zava Date: Sun, 12 Nov 2017 20:07:50 -0300 Subject: [PATCH 1/9] updated soliumrc - Solium v1 compatible --- .soliumrc.json | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/.soliumrc.json b/.soliumrc.json index 81876bcd69f..1fe9127bdcc 100644 --- a/.soliumrc.json +++ b/.soliumrc.json @@ -1,22 +1,10 @@ { - "custom-rules-filename": null, + "extends": "solium:all", + "plugins": ["security"], "rules": { - "imports-on-top": true, - "variable-declarations": true, - "array-declarations": true, - "operator-whitespace": true, - "lbrace": true, - "mixedcase": false, - "camelcase": true, - "uppercase": true, - "no-with": true, - "no-empty-blocks": true, - "no-unused-vars": true, - "double-quotes": true, - "blank-lines": true, - "indentation": true, - "whitespace": true, - "deprecated-suicide": true, - "pragma-on-top": true + "indentation": ["error", 2], + "quotes": ["error", "double"], + "security/enforce-explicit-visibility": ["error"], + "security/no-block-members": ["warning", ["timestamp"]] } } From 0024d6559c7ab1f440799505c2b53cd41e958f8a Mon Sep 17 00:00:00 2001 From: Matt Condon Date: Mon, 15 Jan 2018 14:52:05 -0500 Subject: [PATCH 2/9] fix: remove warning on timestamp usage --- .soliumrc.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.soliumrc.json b/.soliumrc.json index 1fe9127bdcc..c065f3f79be 100644 --- a/.soliumrc.json +++ b/.soliumrc.json @@ -2,9 +2,9 @@ "extends": "solium:all", "plugins": ["security"], "rules": { - "indentation": ["error", 2], "quotes": ["error", "double"], - "security/enforce-explicit-visibility": ["error"], - "security/no-block-members": ["warning", ["timestamp"]] + "indentation": ["error", 2], + "arg-overflow": ["warning", 3], + "security/enforce-explicit-visibility": ["error"] } } From 0a7a43d8e0bc8f366389f9f90b9e29cba7cd9fc0 Mon Sep 17 00:00:00 2001 From: Matt Condon Date: Mon, 15 Jan 2018 14:45:04 -0500 Subject: [PATCH 3/9] feat: add solium linting to travis, npm script --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- .travis.yml | 1 + package-lock.json | 1200 +++++++++++++++++++++++++++++- package.json | 5 + 4 files changed, 1169 insertions(+), 39 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 094c94ca1b5..7f77aedf491 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -3,7 +3,7 @@ - [ ] 📘 I've reviewed the [OpenZeppelin Contributor Guidelines](/docs/CONTRIBUTING.md) - [ ] ✅ I've added tests where applicable to test my new functionality. - [ ] 📖 I've made sure that my contracts are well-documented. -- [ ] 🎨 I've run the JavaScript linter (`npm run lint:fix`) and fixed all issues. +- [ ] 🎨 I've run the JS/Solidity linters (`npm run lint:all:fix`) and fixed any issues. diff --git a/.travis.yml b/.travis.yml index af2f3985661..37c47181e64 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,6 +18,7 @@ before_script: - truffle version script: - npm run lint + - npm run lint:sol - npm run test notifications: slack: diff --git a/package-lock.json b/package-lock.json index b3c6f256341..293b8a79598 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "zeppelin-solidity", - "version": "1.4.0", + "version": "1.5.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -121,7 +121,7 @@ "anymatch": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", - "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "integrity": "sha1-VT3Lj5HjyImEXf26NMd3IbkLnXo=", "dev": true, "requires": { "micromatch": "2.3.11", @@ -165,7 +165,7 @@ "arr-flatten": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=", "dev": true }, "array-union": { @@ -1058,7 +1058,7 @@ "base64-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.1.tgz", - "integrity": "sha512-dwVUVIXsBZXwTuwnXI9RK8sBmgq09NDHzyR9SAph9eqk76gKK2JSQmZARC2zRC81JC2QTtxD0ARU5qTS25gIGw==", + "integrity": "sha1-qRlH2h9KUW6jjltOwOw3c2deCIY=", "dev": true }, "bcrypt-pbkdf": { @@ -1090,7 +1090,7 @@ "bindings": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.3.0.tgz", - "integrity": "sha512-DpLh5EzMR2kzvX1KIlVC0VkC3iZtHKTgdtZ0a3pglBZdaQFjt5S9g9xd1lE+YvXyfd6mtCeRnrUfOLYiTMlNSw==", + "integrity": "sha1-s0b27PapX1qBXFg5/HzbIlAvHtc=", "dev": true }, "bip39": { @@ -1126,7 +1126,7 @@ "bn.js": { "version": "4.11.8", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "integrity": "sha1-LN4J617jQfSEdGuwMJsyU7GxRC8=", "dev": true }, "boom": { @@ -1351,7 +1351,7 @@ "chai-as-promised": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz", - "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==", + "integrity": "sha1-CGRdgl3rhpbuYXJdv1kMAS6wDKA=", "dev": true, "requires": { "check-error": "1.0.2" @@ -1405,6 +1405,7 @@ "requires": { "anymatch": "1.3.2", "async-each": "1.0.1", + "fsevents": "1.1.3", "glob-parent": "2.0.0", "inherits": "2.0.3", "is-binary-path": "1.0.1", @@ -1422,7 +1423,7 @@ "cipher-base": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "integrity": "sha1-h2Dk7MJy9MNjUy+SbYdKriwTl94=", "dev": true, "requires": { "inherits": "2.0.3", @@ -1512,6 +1513,12 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, + "colors": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", + "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", + "dev": true + }, "combined-stream": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", @@ -1793,7 +1800,7 @@ "deferred-leveldown": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz", - "integrity": "sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA==", + "integrity": "sha1-Os0uC3XRZpkkvApLZChRExFz4es=", "dev": true, "requires": { "abstract-leveldown": "2.6.2" @@ -2993,12 +3000,916 @@ "rimraf": "2.6.1" } }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz", + "integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==", + "dev": true, + "optional": true, + "requires": { + "nan": "2.6.2", + "node-pre-gyp": "0.6.39" + }, + "dependencies": { + "abbrev": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "ajv": { + "version": "4.11.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "co": "4.6.0", + "json-stable-stringify": "1.0.1" + } + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "aproba": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "1.0.0", + "readable-stream": "2.2.9" + } + }, + "asn1": { + "version": "0.2.3", + "bundled": true, + "dev": true, + "optional": true + }, + "assert-plus": { + "version": "0.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "asynckit": { + "version": "0.4.0", + "bundled": true, + "dev": true, + "optional": true + }, + "aws-sign2": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "aws4": { + "version": "1.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "balanced-match": { + "version": "0.4.2", + "bundled": true, + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "block-stream": { + "version": "0.0.9", + "bundled": true, + "dev": true, + "requires": { + "inherits": "2.0.3" + } + }, + "boom": { + "version": "2.10.1", + "bundled": true, + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, + "brace-expansion": { + "version": "1.1.7", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "0.4.2", + "concat-map": "0.0.1" + } + }, + "buffer-shims": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "caseless": { + "version": "0.12.0", + "bundled": true, + "dev": true, + "optional": true + }, + "co": { + "version": "4.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "combined-stream": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "requires": { + "delayed-stream": "1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "cryptiles": { + "version": "2.0.5", + "bundled": true, + "dev": true, + "requires": { + "boom": "2.10.1" + } + }, + "dashdash": { + "version": "1.14.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "debug": { + "version": "2.6.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.4.2", + "bundled": true, + "dev": true, + "optional": true + }, + "delayed-stream": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "ecc-jsbn": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "extend": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "extsprintf": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "bundled": true, + "dev": true, + "optional": true + }, + "form-data": { + "version": "2.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.15" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "fstream": { + "version": "1.0.11", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.1" + } + }, + "fstream-ignore": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fstream": "1.0.11", + "inherits": "2.0.3", + "minimatch": "3.0.4" + } + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "1.1.1", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" + } + }, + "getpass": { + "version": "0.1.7", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "bundled": true, + "dev": true + }, + "har-schema": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "optional": true + }, + "har-validator": { + "version": "4.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ajv": "4.11.8", + "har-schema": "1.0.5" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "hawk": { + "version": "3.1.3", + "bundled": true, + "dev": true, + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } + }, + "hoek": { + "version": "2.16.3", + "bundled": true, + "dev": true + }, + "http-signature": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.4.0", + "sshpk": "1.13.0" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.4", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "isstream": { + "version": "0.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "jodid25519": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "jsbn": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "bundled": true, + "dev": true, + "optional": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsonify": "0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "jsonify": { + "version": "0.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "jsprim": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.0.2", + "json-schema": "0.2.3", + "verror": "1.3.6" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "mime-db": { + "version": "1.27.0", + "bundled": true, + "dev": true + }, + "mime-types": { + "version": "2.1.15", + "bundled": true, + "dev": true, + "requires": { + "mime-db": "1.27.0" + } + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "node-pre-gyp": { + "version": "0.6.39", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "1.0.2", + "hawk": "3.1.3", + "mkdirp": "0.5.1", + "nopt": "4.0.1", + "npmlog": "4.1.0", + "rc": "1.2.1", + "request": "2.81.0", + "rimraf": "2.6.1", + "semver": "5.3.0", + "tar": "2.2.1", + "tar-pack": "3.4.0" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1.1.0", + "osenv": "0.1.4" + } + }, + "npmlog": { + "version": "4.1.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "oauth-sign": { + "version": "0.8.2", + "bundled": true, + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "performance-now": { + "version": "0.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "1.0.7", + "bundled": true, + "dev": true + }, + "punycode": { + "version": "1.4.1", + "bundled": true, + "dev": true, + "optional": true + }, + "qs": { + "version": "6.4.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.4", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.2.9", + "bundled": true, + "dev": true, + "requires": { + "buffer-shims": "1.0.0", + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "string_decoder": "1.0.1", + "util-deprecate": "1.0.2" + } + }, + "request": { + "version": "2.81.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "4.2.1", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.15", + "oauth-sign": "0.8.2", + "performance-now": "0.2.0", + "qs": "6.4.0", + "safe-buffer": "5.0.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.2", + "tunnel-agent": "0.6.0", + "uuid": "3.0.1" + } + }, + "rimraf": { + "version": "2.6.1", + "bundled": true, + "dev": true, + "requires": { + "glob": "7.1.2" + } + }, + "safe-buffer": { + "version": "5.0.1", + "bundled": true, + "dev": true + }, + "semver": { + "version": "5.3.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sntp": { + "version": "1.0.9", + "bundled": true, + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, + "sshpk": { + "version": "1.13.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jodid25519": "1.0.2", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "5.0.1" + } + }, + "stringstream": { + "version": "0.0.5", + "bundled": true, + "dev": true, + "optional": true + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "2.2.1", + "bundled": true, + "dev": true, + "requires": { + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "2.0.3" + } + }, + "tar-pack": { + "version": "3.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "2.6.8", + "fstream": "1.0.11", + "fstream-ignore": "1.0.5", + "once": "1.4.0", + "readable-stream": "2.2.9", + "rimraf": "2.6.1", + "tar": "2.2.1", + "uid-number": "0.0.6" + } + }, + "tough-cookie": { + "version": "2.3.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "punycode": "1.4.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "bundled": true, + "dev": true, + "optional": true + }, + "uid-number": { + "version": "0.0.6", + "bundled": true, + "dev": true, + "optional": true + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "uuid": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "verror": { + "version": "1.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "extsprintf": "1.0.2" + } + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + } + } + }, "function-bind": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.0.tgz", @@ -3129,7 +4040,7 @@ "globals": { "version": "9.18.0", "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "integrity": "sha1-qjiWs+abSH8X4x7SFD1pqOMMLYo=", "dev": true }, "globby": { @@ -3241,7 +4152,7 @@ "hash.js": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "integrity": "sha1-NA3tvmKQGHFRweodd3o0SJNd+EY=", "dev": true, "requires": { "inherits": "2.0.3", @@ -3306,7 +4217,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==", + "integrity": "sha1-bWDjSzq7yDEwYsO3mO+NkBoHrzw=", "dev": true }, "http-signature": { @@ -3833,6 +4744,12 @@ "integrity": "sha1-hhIoAhQvCChQKg0d7h2V4lO7AkM=", "dev": true }, + "js-string-escape": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz", + "integrity": "sha1-4mJbrbwNZ8dTPp7cEGjFh65BN+8=", + "dev": true + }, "js-tokens": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", @@ -3865,7 +4782,7 @@ "json-loader": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/json-loader/-/json-loader-0.5.7.tgz", - "integrity": "sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w==", + "integrity": "sha1-3KFKcCNf+C8KyaOr62DTN6NlGF0=", "dev": true }, "json-schema": { @@ -3957,7 +4874,7 @@ "keccak": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/keccak/-/keccak-1.3.0.tgz", - "integrity": "sha512-JgsKPxYhcJxKrV+TrCyg/GwZbOjhpRPrz2kG8xbAsUaIDelUlKjm08YcwBO9Fm8sqf/Kg8ZWkk6nWujhLykfvw==", + "integrity": "sha1-NoG9ma09A1TdspuQQMG2VgzOCKw=", "dev": true, "requires": { "bindings": "1.3.0", @@ -4117,7 +5034,7 @@ "levelup": { "version": "1.3.9", "resolved": "https://registry.npmjs.org/levelup/-/levelup-1.3.9.tgz", - "integrity": "sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ==", + "integrity": "sha1-LbyuhFsrsra+qE3zNMR1Uzu9gqs=", "dev": true, "requires": { "deferred-leveldown": "1.2.2", @@ -4462,7 +5379,7 @@ "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", "dev": true, "requires": { "brace-expansion": "1.1.8" @@ -4665,7 +5582,7 @@ "normalize-package-data": { "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==", + "integrity": "sha1-EvlaMH1YNSB1oEkHuErIvpisAS8=", "dev": true, "requires": { "hosted-git-info": "2.5.0", @@ -4695,7 +5612,7 @@ "npmlog": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "integrity": "sha1-CKfyqL9zRgR3mp76StXMcXq7lUs=", "dev": true, "requires": { "are-we-there-yet": "1.1.4", @@ -4725,7 +5642,7 @@ "object-inspect": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.3.0.tgz", - "integrity": "sha512-OHHnLgLNXpM++GnJRyyhbr2bwl3pPVm4YvaraHrRvDt/N3r+s/gDVHciA7EJBTkijKXj61ssgSAikq1fb0IBRg==", + "integrity": "sha1-Wx645nQuLugzQqY3A02ESSi6L20=", "dev": true }, "object-keys": { @@ -5146,7 +6063,7 @@ "randomatic": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", - "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", + "integrity": "sha1-x6vpzIuHwLqodrGf3oP9RkeX44w=", "dev": true, "requires": { "is-number": "3.0.0", @@ -5187,7 +6104,7 @@ "randombytes": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.5.tgz", - "integrity": "sha512-8T7Zn1AhMsQ/HI1SjcCfT/t4ii3eAqco3yOcSzS4mozsOz69lHLsoMXmF9nZgnFanYscnSlUSgs8uZyKzpE6kg==", + "integrity": "sha1-3ACaJGuNCaF3tLegrne8Vw9LG3k=", "dev": true, "requires": { "safe-buffer": "5.1.1" @@ -5237,7 +6154,7 @@ "readable-stream": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "integrity": "sha1-No8lEtefnUb9/HE0mueHi7weuVw=", "dev": true, "requires": { "core-util-is": "1.0.2", @@ -5533,7 +6450,7 @@ "safe-buffer": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "integrity": "sha1-iTMSr2myEj3vcfV4iQAWce6yyFM=", "dev": true }, "scrypt": { @@ -5584,13 +6501,13 @@ "semaphore": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/semaphore/-/semaphore-1.1.0.tgz", - "integrity": "sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA==", + "integrity": "sha1-qq2LhrIP6OmzKxbcLuaCqM0mqKo=", "dev": true }, "semver": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "integrity": "sha1-4FnAnYVx8FQII3M0M1BdOi8AsY4=", "dev": true }, "set-blocking": { @@ -5710,6 +6627,12 @@ "hoek": "2.16.3" } }, + "sol-digger": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/sol-digger/-/sol-digger-0.0.2.tgz", + "integrity": "sha1-QGxKnTHiaef4jrHC6hATGOXgkCU=", + "dev": true + }, "sol-explore": { "version": "1.6.2", "resolved": "https://registry.npmjs.org/sol-explore/-/sol-explore-1.6.2.tgz", @@ -5781,10 +6704,211 @@ "yargs": "4.8.1" } }, + "solium": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/solium/-/solium-1.1.2.tgz", + "integrity": "sha512-2CvpbiU0msntDkK+X6y3qCcRqg+W7Bf237BrHPTP32zufK7OCaINK4ci7UEMnusbEW41njJwLitN0h32C3rVKA==", + "dev": true, + "requires": { + "ajv": "5.2.2", + "chokidar": "1.7.0", + "colors": "1.1.2", + "commander": "2.11.0", + "js-string-escape": "1.0.1", + "lodash": "4.17.4", + "sol-digger": "0.0.2", + "sol-explore": "1.6.1", + "solium-plugin-security": "0.1.1", + "solparse": "2.2.2", + "text-table": "0.2.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.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.0.0.tgz", + "integrity": "sha512-nY3W5Gu2racvdDk//ELReY+dHjb9PlIcVDFXP72nVIhq2Gy3LuVXYwJoPVudwQnv1shtohpgkdCKT2YaKY0CKw==", + "dev": true, + "requires": { + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "wrap-ansi": "2.1.0" + } + }, + "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 + }, + "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" + } + }, + "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 + }, + "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 + }, + "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" + } + }, + "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" + } + }, + "sol-explore": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/sol-explore/-/sol-explore-1.6.1.tgz", + "integrity": "sha1-tZ8HPGn+MyVg1aEMMrqMp/KYbPs=", + "dev": true + }, + "solparse": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/solparse/-/solparse-2.2.2.tgz", + "integrity": "sha512-TKX0Foi/N73nKco65+boo0YTtifFVEEXEPQkN4b1GkkEsXLXyV1TnvvIeT0qg9lEPLdi4Ri5WUWYVJipnSny+Q==", + "dev": true, + "requires": { + "mocha": "4.1.0", + "pegjs": "0.10.0", + "yargs": "10.1.1" + } + }, + "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": "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" + } + }, + "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": "10.1.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-10.1.1.tgz", + "integrity": "sha512-7uRL1HZdCbc1QTP+X8mehOPuCYKC/XTaqAPj7gABLfTt6pgLyVRn3QVte4qhtilZouWCvqd1kipgMKl5tKsFiw==", + "dev": true, + "requires": { + "cliui": "4.0.0", + "decamelize": "1.2.0", + "find-up": "2.1.0", + "get-caller-file": "1.0.2", + "os-locale": "2.1.0", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "2.1.1", + "which-module": "2.0.0", + "y18n": "3.2.1", + "yargs-parser": "8.1.0" + } + }, + "yargs-parser": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-8.1.0.tgz", + "integrity": "sha512-yP+6QqN8BmrgW2ggLtTbdrOyBNSI7zBa4IykmiV5R1wl1JWNxQvWhMfMdmzIYtKU7oP3OOInY/tl2ov3BDjnJQ==", + "dev": true, + "requires": { + "camelcase": "4.1.0" + } + } + } + }, + "solium-plugin-security": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/solium-plugin-security/-/solium-plugin-security-0.1.1.tgz", + "integrity": "sha512-kpLirBwIq4mhxk0Y/nn5cQ6qdJTI+U1LO3gpoNIcqNaW+sI058moXBe2UiHs+9wvF9IzYD49jcKhFTxcR9u9SQ==", + "dev": true + }, "source-list-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", - "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==", + "integrity": "sha1-qqR0A/eyRakvvJfqCPJQ1gh+0IU=", "dev": true }, "source-map": { @@ -5866,7 +6990,7 @@ "stream-http": { "version": "2.7.2", "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.7.2.tgz", - "integrity": "sha512-c0yTD2rbQzXtSsFSVhtpvY/vS6u066PcXOX9kBB3mSO76RiUQzL340uJkGBWnlBg4/HZzqiUXtaVA7wcRcJgEw==", + "integrity": "sha1-QKBQ7I3DtTsz2ZCUFcAsC/Gr+60=", "dev": true, "requires": { "builtin-status-codes": "3.0.0", @@ -5901,7 +7025,7 @@ "string_decoder": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=", "dev": true, "requires": { "safe-buffer": "5.1.1" @@ -6061,7 +7185,7 @@ "tape": { "version": "4.8.0", "resolved": "https://registry.npmjs.org/tape/-/tape-4.8.0.tgz", - "integrity": "sha512-TWILfEnvO7I8mFe35d98F6T5fbLaEtbFTG/lxWvid8qDfFTxt19EBijWmB4j3+Hoh5TfHE2faWs73ua+EphuBA==", + "integrity": "sha1-9qn+xBzFCh3lD6M2A6tYCZH2Bo4=", "dev": true, "requires": { "deep-equal": "1.0.1", @@ -6541,7 +7665,7 @@ "uuid": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", - "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==", + "integrity": "sha1-PdPT55Crwk17DToDT/q6vijrvAQ=", "dev": true }, "validate-npm-package-license": { @@ -6833,7 +7957,7 @@ "which": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", - "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", + "integrity": "sha1-/wS9/AEO5UfXgL7DjhrBwnd9JTo=", "dev": true, "requires": { "isexe": "2.0.0" @@ -6848,7 +7972,7 @@ "wide-align": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", - "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", + "integrity": "sha1-Vx4PGwYEY268DfwhsDObvjE0FxA=", "dev": true, "requires": { "string-width": "1.0.2" diff --git a/package.json b/package.json index c79c109d119..f15f6397b2b 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,10 @@ "test": "scripts/test.sh", "lint": "eslint .", "lint:fix": "eslint . --fix", + "lint:sol": "solium -d .", + "lint:sol:fix": "solium -d . --fix", + "lint:all": "npm run lint && npm run lint:sol", + "lint:all:fix": "npm run lint:fix && npm run lint:sol:fix", "console": "truffle console", "coverage": "scripts/coverage.sh" }, @@ -47,6 +51,7 @@ "ethereumjs-util": "^5.1.2", "mocha-lcov-reporter": "^1.3.0", "solidity-coverage": "^0.4.3", + "solium": "^1.1.2", "truffle": "^4.0.0", "truffle-hdwallet-provider": "0.0.3" }, From 367d924e72438fbaaa18dc5921b22ac1d5f2ea85 Mon Sep 17 00:00:00 2001 From: Matt Condon Date: Mon, 15 Jan 2018 15:28:51 -0500 Subject: [PATCH 4/9] fix: the result of 'npm run lint:sol:fix' --- contracts/Bounty.sol | 4 ++-- contracts/crowdsale/CappedCrowdsale.sol | 4 ++-- contracts/crowdsale/Crowdsale.sol | 4 ++-- contracts/crowdsale/FinalizableCrowdsale.sol | 6 +++--- contracts/crowdsale/RefundVault.sol | 4 ++-- contracts/crowdsale/RefundableCrowdsale.sol | 6 +++--- contracts/lifecycle/Migrations.sol | 2 +- contracts/mocks/BasicTokenMock.sol | 2 +- contracts/mocks/BurnableTokenMock.sol | 2 +- contracts/mocks/CappedCrowdsaleImpl.sol | 2 +- contracts/mocks/DetailedERC20Mock.sol | 4 ++-- contracts/mocks/ECRecoveryMock.sol | 2 +- contracts/mocks/ERC23TokenMock.sol | 2 +- contracts/mocks/FinalizableCrowdsaleImpl.sol | 2 +- contracts/mocks/LimitBalanceMock.sol | 2 +- contracts/mocks/PausableMock.sol | 2 +- contracts/mocks/PausableTokenMock.sol | 2 +- contracts/mocks/PullPaymentMock.sol | 2 +- contracts/mocks/RBACMock.sol | 2 +- contracts/mocks/ReentrancyMock.sol | 4 ++-- contracts/mocks/RefundableCrowdsaleImpl.sol | 2 +- contracts/mocks/SafeERC20Helper.sol | 4 ++-- contracts/mocks/SafeMathMock.sol | 2 +- contracts/mocks/StandardTokenMock.sol | 2 +- contracts/ownership/Claimable.sol | 2 +- contracts/ownership/Contactable.sol | 2 +- contracts/ownership/DelayedClaimable.sol | 2 +- contracts/ownership/rbac/RBAC.sol | 2 +- contracts/payment/PullPayment.sol | 2 +- contracts/payment/SplitPayment.sol | 2 +- contracts/token/BasicToken.sol | 4 ++-- contracts/token/BurnableToken.sol | 2 +- contracts/token/CappedToken.sol | 2 +- contracts/token/DetailedERC20.sol | 2 +- contracts/token/ERC20.sol | 2 +- contracts/token/MintableToken.sol | 4 ++-- contracts/token/PausableToken.sol | 4 ++-- contracts/token/SafeERC20.sol | 4 ++-- contracts/token/StandardToken.sol | 4 ++-- contracts/token/TokenTimelock.sol | 2 +- contracts/token/TokenVesting.sol | 8 ++++---- test/mocks/MathMock.sol | 2 +- 42 files changed, 61 insertions(+), 61 deletions(-) diff --git a/contracts/Bounty.sol b/contracts/Bounty.sol index e1a5acb7c30..459352ab5f3 100644 --- a/contracts/Bounty.sol +++ b/contracts/Bounty.sol @@ -1,8 +1,8 @@ pragma solidity ^0.4.18; -import './payment/PullPayment.sol'; -import './lifecycle/Destructible.sol'; +import "./payment/PullPayment.sol"; +import "./lifecycle/Destructible.sol"; /** diff --git a/contracts/crowdsale/CappedCrowdsale.sol b/contracts/crowdsale/CappedCrowdsale.sol index c894cdbf55c..cd250df60e3 100644 --- a/contracts/crowdsale/CappedCrowdsale.sol +++ b/contracts/crowdsale/CappedCrowdsale.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.18; -import '../math/SafeMath.sol'; -import './Crowdsale.sol'; +import "../math/SafeMath.sol"; +import "./Crowdsale.sol"; /** * @title CappedCrowdsale diff --git a/contracts/crowdsale/Crowdsale.sol b/contracts/crowdsale/Crowdsale.sol index 90da148bb6b..e9e2f248932 100644 --- a/contracts/crowdsale/Crowdsale.sol +++ b/contracts/crowdsale/Crowdsale.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.18; -import '../token/MintableToken.sol'; -import '../math/SafeMath.sol'; +import "../token/MintableToken.sol"; +import "../math/SafeMath.sol"; /** * @title Crowdsale diff --git a/contracts/crowdsale/FinalizableCrowdsale.sol b/contracts/crowdsale/FinalizableCrowdsale.sol index c8501dadd1e..cf94aa033ca 100644 --- a/contracts/crowdsale/FinalizableCrowdsale.sol +++ b/contracts/crowdsale/FinalizableCrowdsale.sol @@ -1,8 +1,8 @@ pragma solidity ^0.4.18; -import '../math/SafeMath.sol'; -import '../ownership/Ownable.sol'; -import './Crowdsale.sol'; +import "../math/SafeMath.sol"; +import "../ownership/Ownable.sol"; +import "./Crowdsale.sol"; /** * @title FinalizableCrowdsale diff --git a/contracts/crowdsale/RefundVault.sol b/contracts/crowdsale/RefundVault.sol index a5de66bdb26..0657e8e42c7 100644 --- a/contracts/crowdsale/RefundVault.sol +++ b/contracts/crowdsale/RefundVault.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.18; -import '../math/SafeMath.sol'; -import '../ownership/Ownable.sol'; +import "../math/SafeMath.sol"; +import "../ownership/Ownable.sol"; /** * @title RefundVault diff --git a/contracts/crowdsale/RefundableCrowdsale.sol b/contracts/crowdsale/RefundableCrowdsale.sol index 9b683b12ea5..d089f09f119 100644 --- a/contracts/crowdsale/RefundableCrowdsale.sol +++ b/contracts/crowdsale/RefundableCrowdsale.sol @@ -1,9 +1,9 @@ pragma solidity ^0.4.18; -import '../math/SafeMath.sol'; -import './FinalizableCrowdsale.sol'; -import './RefundVault.sol'; +import "../math/SafeMath.sol"; +import "./FinalizableCrowdsale.sol"; +import "./RefundVault.sol"; /** diff --git a/contracts/lifecycle/Migrations.sol b/contracts/lifecycle/Migrations.sol index 59d1f0bf3e5..c8f93085544 100644 --- a/contracts/lifecycle/Migrations.sol +++ b/contracts/lifecycle/Migrations.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.18; -import '../ownership/Ownable.sol'; +import "../ownership/Ownable.sol"; /** * @title Migrations diff --git a/contracts/mocks/BasicTokenMock.sol b/contracts/mocks/BasicTokenMock.sol index 292982af1fa..dc0d74a9119 100644 --- a/contracts/mocks/BasicTokenMock.sol +++ b/contracts/mocks/BasicTokenMock.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.18; -import '../token/BasicToken.sol'; +import "../token/BasicToken.sol"; // mock class using BasicToken diff --git a/contracts/mocks/BurnableTokenMock.sol b/contracts/mocks/BurnableTokenMock.sol index 3969e33d49f..c6ae40502bd 100644 --- a/contracts/mocks/BurnableTokenMock.sol +++ b/contracts/mocks/BurnableTokenMock.sol @@ -1,6 +1,6 @@ pragma solidity ^0.4.18; -import '../token/BurnableToken.sol'; +import "../token/BurnableToken.sol"; contract BurnableTokenMock is BurnableToken { diff --git a/contracts/mocks/CappedCrowdsaleImpl.sol b/contracts/mocks/CappedCrowdsaleImpl.sol index 9e2014799d0..4e3620f1375 100644 --- a/contracts/mocks/CappedCrowdsaleImpl.sol +++ b/contracts/mocks/CappedCrowdsaleImpl.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.18; -import '../crowdsale/CappedCrowdsale.sol'; +import "../crowdsale/CappedCrowdsale.sol"; contract CappedCrowdsaleImpl is CappedCrowdsale { diff --git a/contracts/mocks/DetailedERC20Mock.sol b/contracts/mocks/DetailedERC20Mock.sol index 9687cad2617..96548df06d2 100644 --- a/contracts/mocks/DetailedERC20Mock.sol +++ b/contracts/mocks/DetailedERC20Mock.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.18; -import '../token/StandardToken.sol'; -import '../token/DetailedERC20.sol'; +import "../token/StandardToken.sol"; +import "../token/DetailedERC20.sol"; contract DetailedERC20Mock is StandardToken, DetailedERC20 { function DetailedERC20Mock(string _name, string _symbol, uint8 _decimals) DetailedERC20(_name, _symbol, _decimals) public {} diff --git a/contracts/mocks/ECRecoveryMock.sol b/contracts/mocks/ECRecoveryMock.sol index 8c776cd97aa..6db0b198497 100644 --- a/contracts/mocks/ECRecoveryMock.sol +++ b/contracts/mocks/ECRecoveryMock.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.18; -import '../ECRecovery.sol'; +import "../ECRecovery.sol"; contract ECRecoveryMock { diff --git a/contracts/mocks/ERC23TokenMock.sol b/contracts/mocks/ERC23TokenMock.sol index 45666389d11..f7bd273e5bf 100644 --- a/contracts/mocks/ERC23TokenMock.sol +++ b/contracts/mocks/ERC23TokenMock.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.18; -import '../token/BasicToken.sol'; +import "../token/BasicToken.sol"; contract ERC23ContractInterface { diff --git a/contracts/mocks/FinalizableCrowdsaleImpl.sol b/contracts/mocks/FinalizableCrowdsaleImpl.sol index 7783f7e8b54..1e07fb25423 100644 --- a/contracts/mocks/FinalizableCrowdsaleImpl.sol +++ b/contracts/mocks/FinalizableCrowdsaleImpl.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.18; -import '../crowdsale/FinalizableCrowdsale.sol'; +import "../crowdsale/FinalizableCrowdsale.sol"; contract FinalizableCrowdsaleImpl is FinalizableCrowdsale { diff --git a/contracts/mocks/LimitBalanceMock.sol b/contracts/mocks/LimitBalanceMock.sol index 8343d25d947..edcd95e0433 100644 --- a/contracts/mocks/LimitBalanceMock.sol +++ b/contracts/mocks/LimitBalanceMock.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.18; -import '../LimitBalance.sol'; +import "../LimitBalance.sol"; // mock class using LimitBalance diff --git a/contracts/mocks/PausableMock.sol b/contracts/mocks/PausableMock.sol index 908f60a1f4d..9f372e487c9 100644 --- a/contracts/mocks/PausableMock.sol +++ b/contracts/mocks/PausableMock.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.18; -import '../lifecycle/Pausable.sol'; +import "../lifecycle/Pausable.sol"; // mock class using Pausable diff --git a/contracts/mocks/PausableTokenMock.sol b/contracts/mocks/PausableTokenMock.sol index 1f110c9c3f9..416498e9e6b 100644 --- a/contracts/mocks/PausableTokenMock.sol +++ b/contracts/mocks/PausableTokenMock.sol @@ -1,6 +1,6 @@ pragma solidity ^0.4.18; -import '../token/PausableToken.sol'; +import "../token/PausableToken.sol"; // mock class using PausableToken contract PausableTokenMock is PausableToken { diff --git a/contracts/mocks/PullPaymentMock.sol b/contracts/mocks/PullPaymentMock.sol index 42efa55cde1..0008e72c918 100644 --- a/contracts/mocks/PullPaymentMock.sol +++ b/contracts/mocks/PullPaymentMock.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.18; -import '../payment/PullPayment.sol'; +import "../payment/PullPayment.sol"; // mock class using PullPayment diff --git a/contracts/mocks/RBACMock.sol b/contracts/mocks/RBACMock.sol index 263f8285609..02600ba7278 100644 --- a/contracts/mocks/RBACMock.sol +++ b/contracts/mocks/RBACMock.sol @@ -1,6 +1,6 @@ pragma solidity ^0.4.8; -import '../ownership/rbac/RBAC.sol'; +import "../ownership/rbac/RBAC.sol"; contract RBACMock is RBAC { diff --git a/contracts/mocks/ReentrancyMock.sol b/contracts/mocks/ReentrancyMock.sol index 12f1434e8ca..396e17fbf98 100644 --- a/contracts/mocks/ReentrancyMock.sol +++ b/contracts/mocks/ReentrancyMock.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.18; -import '../ReentrancyGuard.sol'; -import './ReentrancyAttack.sol'; +import "../ReentrancyGuard.sol"; +import "./ReentrancyAttack.sol"; contract ReentrancyMock is ReentrancyGuard { diff --git a/contracts/mocks/RefundableCrowdsaleImpl.sol b/contracts/mocks/RefundableCrowdsaleImpl.sol index ea9d4edbc9c..e4285620127 100644 --- a/contracts/mocks/RefundableCrowdsaleImpl.sol +++ b/contracts/mocks/RefundableCrowdsaleImpl.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.18; -import '../crowdsale/RefundableCrowdsale.sol'; +import "../crowdsale/RefundableCrowdsale.sol"; contract RefundableCrowdsaleImpl is RefundableCrowdsale { diff --git a/contracts/mocks/SafeERC20Helper.sol b/contracts/mocks/SafeERC20Helper.sol index c050c4fb62f..ccfe63cead9 100644 --- a/contracts/mocks/SafeERC20Helper.sol +++ b/contracts/mocks/SafeERC20Helper.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.18; -import '../token/ERC20.sol'; -import '../token/SafeERC20.sol'; +import "../token/ERC20.sol"; +import "../token/SafeERC20.sol"; contract ERC20FailingMock is ERC20 { function transfer(address, uint256) public returns (bool) { diff --git a/contracts/mocks/SafeMathMock.sol b/contracts/mocks/SafeMathMock.sol index f7b33117355..702fa3e383c 100644 --- a/contracts/mocks/SafeMathMock.sol +++ b/contracts/mocks/SafeMathMock.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.18; -import '../math/SafeMath.sol'; +import "../math/SafeMath.sol"; contract SafeMathMock { diff --git a/contracts/mocks/StandardTokenMock.sol b/contracts/mocks/StandardTokenMock.sol index 5aaacc478a5..1d7546c9bec 100644 --- a/contracts/mocks/StandardTokenMock.sol +++ b/contracts/mocks/StandardTokenMock.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.18; -import '../token/StandardToken.sol'; +import "../token/StandardToken.sol"; // mock class using StandardToken diff --git a/contracts/ownership/Claimable.sol b/contracts/ownership/Claimable.sol index 556a353cfdd..3698405ec28 100644 --- a/contracts/ownership/Claimable.sol +++ b/contracts/ownership/Claimable.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.18; -import './Ownable.sol'; +import "./Ownable.sol"; /** diff --git a/contracts/ownership/Contactable.sol b/contracts/ownership/Contactable.sol index 2b6898f615d..8322f9bf51e 100644 --- a/contracts/ownership/Contactable.sol +++ b/contracts/ownership/Contactable.sol @@ -1,6 +1,6 @@ pragma solidity ^0.4.18; -import './Ownable.sol'; +import "./Ownable.sol"; /** * @title Contactable token diff --git a/contracts/ownership/DelayedClaimable.sol b/contracts/ownership/DelayedClaimable.sol index 0091fa68e80..d42481a5df8 100644 --- a/contracts/ownership/DelayedClaimable.sol +++ b/contracts/ownership/DelayedClaimable.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.18; -import './Claimable.sol'; +import "./Claimable.sol"; /** diff --git a/contracts/ownership/rbac/RBAC.sol b/contracts/ownership/rbac/RBAC.sol index 4c175c65bf1..838539720df 100644 --- a/contracts/ownership/rbac/RBAC.sol +++ b/contracts/ownership/rbac/RBAC.sol @@ -1,6 +1,6 @@ pragma solidity ^0.4.18; -import './Roles.sol'; +import "./Roles.sol"; /** diff --git a/contracts/payment/PullPayment.sol b/contracts/payment/PullPayment.sol index 5e7cbf740b1..df979d0ecb9 100644 --- a/contracts/payment/PullPayment.sol +++ b/contracts/payment/PullPayment.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.18; -import '../math/SafeMath.sol'; +import "../math/SafeMath.sol"; /** diff --git a/contracts/payment/SplitPayment.sol b/contracts/payment/SplitPayment.sol index 33910695c9c..e052c1553ed 100644 --- a/contracts/payment/SplitPayment.sol +++ b/contracts/payment/SplitPayment.sol @@ -1,6 +1,6 @@ pragma solidity ^0.4.18; -import '../math/SafeMath.sol'; +import "../math/SafeMath.sol"; /** * @title SplitPayment diff --git a/contracts/token/BasicToken.sol b/contracts/token/BasicToken.sol index 0bd7603fbec..469fedbccaf 100644 --- a/contracts/token/BasicToken.sol +++ b/contracts/token/BasicToken.sol @@ -1,8 +1,8 @@ pragma solidity ^0.4.18; -import './ERC20Basic.sol'; -import '../math/SafeMath.sol'; +import "./ERC20Basic.sol"; +import "../math/SafeMath.sol"; /** diff --git a/contracts/token/BurnableToken.sol b/contracts/token/BurnableToken.sol index 672e32ecac0..9abee592599 100644 --- a/contracts/token/BurnableToken.sol +++ b/contracts/token/BurnableToken.sol @@ -1,6 +1,6 @@ pragma solidity ^0.4.18; -import './BasicToken.sol'; +import "./BasicToken.sol"; /** * @title Burnable Token diff --git a/contracts/token/CappedToken.sol b/contracts/token/CappedToken.sol index c0c2e6fa884..cc35b95d638 100644 --- a/contracts/token/CappedToken.sol +++ b/contracts/token/CappedToken.sol @@ -1,6 +1,6 @@ pragma solidity ^0.4.11; -import './MintableToken.sol'; +import "./MintableToken.sol"; /** * @title Capped token diff --git a/contracts/token/DetailedERC20.sol b/contracts/token/DetailedERC20.sol index 28bcbaeefba..477cd4a6650 100644 --- a/contracts/token/DetailedERC20.sol +++ b/contracts/token/DetailedERC20.sol @@ -1,6 +1,6 @@ pragma solidity ^0.4.18; -import './ERC20.sol'; +import "./ERC20.sol"; contract DetailedERC20 is ERC20 { string public name; diff --git a/contracts/token/ERC20.sol b/contracts/token/ERC20.sol index 28ffc01658a..770a9689ee0 100644 --- a/contracts/token/ERC20.sol +++ b/contracts/token/ERC20.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.18; -import './ERC20Basic.sol'; +import "./ERC20Basic.sol"; /** diff --git a/contracts/token/MintableToken.sol b/contracts/token/MintableToken.sol index 53f577d46c3..fa9f43b9c29 100644 --- a/contracts/token/MintableToken.sol +++ b/contracts/token/MintableToken.sol @@ -1,8 +1,8 @@ pragma solidity ^0.4.18; -import './StandardToken.sol'; -import '../ownership/Ownable.sol'; +import "./StandardToken.sol"; +import "../ownership/Ownable.sol"; diff --git a/contracts/token/PausableToken.sol b/contracts/token/PausableToken.sol index 0af9971c0ff..1b83f80e47f 100644 --- a/contracts/token/PausableToken.sol +++ b/contracts/token/PausableToken.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.18; -import './StandardToken.sol'; -import '../lifecycle/Pausable.sol'; +import "./StandardToken.sol"; +import "../lifecycle/Pausable.sol"; /** * @title Pausable token diff --git a/contracts/token/SafeERC20.sol b/contracts/token/SafeERC20.sol index 64d10039145..81b76cd4f9e 100644 --- a/contracts/token/SafeERC20.sol +++ b/contracts/token/SafeERC20.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.18; -import './ERC20Basic.sol'; -import './ERC20.sol'; +import "./ERC20Basic.sol"; +import "./ERC20.sol"; /** * @title SafeERC20 diff --git a/contracts/token/StandardToken.sol b/contracts/token/StandardToken.sol index 213989655fa..1aa10d3f912 100644 --- a/contracts/token/StandardToken.sol +++ b/contracts/token/StandardToken.sol @@ -1,8 +1,8 @@ pragma solidity ^0.4.18; -import './BasicToken.sol'; -import './ERC20.sol'; +import "./BasicToken.sol"; +import "./ERC20.sol"; /** diff --git a/contracts/token/TokenTimelock.sol b/contracts/token/TokenTimelock.sol index fec0b6083fc..267319386d6 100644 --- a/contracts/token/TokenTimelock.sol +++ b/contracts/token/TokenTimelock.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.18; -import './ERC20Basic.sol'; +import "./ERC20Basic.sol"; import "../token/SafeERC20.sol"; /** diff --git a/contracts/token/TokenVesting.sol b/contracts/token/TokenVesting.sol index f311dfad51c..65bd67ea27e 100644 --- a/contracts/token/TokenVesting.sol +++ b/contracts/token/TokenVesting.sol @@ -1,9 +1,9 @@ pragma solidity ^0.4.18; -import './ERC20Basic.sol'; -import './SafeERC20.sol'; -import '../ownership/Ownable.sol'; -import '../math/SafeMath.sol'; +import "./ERC20Basic.sol"; +import "./SafeERC20.sol"; +import "../ownership/Ownable.sol"; +import "../math/SafeMath.sol"; /** * @title TokenVesting diff --git a/test/mocks/MathMock.sol b/test/mocks/MathMock.sol index 8b6401e5756..9e6aa9d18c4 100644 --- a/test/mocks/MathMock.sol +++ b/test/mocks/MathMock.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.18; -import '../../contracts/math/Math.sol'; +import "../../contracts/math/Math.sol"; contract MathMock { From d10558b997e5bc420409b0d4d811ff4d99351bc3 Mon Sep 17 00:00:00 2001 From: Matt Condon Date: Mon, 15 Jan 2018 15:33:17 -0500 Subject: [PATCH 5/9] fix: solium errors - indentation only --- contracts/mocks/RBACMock.sol | 102 +++++----- contracts/ownership/Contactable.sol | 16 +- contracts/ownership/rbac/RBAC.sol | 278 ++++++++++++++-------------- contracts/ownership/rbac/Roles.sol | 80 ++++---- contracts/token/BurnableToken.sol | 28 +-- 5 files changed, 252 insertions(+), 252 deletions(-) diff --git a/contracts/mocks/RBACMock.sol b/contracts/mocks/RBACMock.sol index 02600ba7278..f81e5ffc6f5 100644 --- a/contracts/mocks/RBACMock.sol +++ b/contracts/mocks/RBACMock.sol @@ -5,65 +5,65 @@ import "../ownership/rbac/RBAC.sol"; contract RBACMock is RBAC { - string constant ROLE_ADVISOR = "advisor"; + string constant ROLE_ADVISOR = "advisor"; - modifier onlyAdminOrAdvisor() - { - require( - hasRole(msg.sender, ROLE_ADMIN) || - hasRole(msg.sender, ROLE_ADVISOR) - ); - _; - } + modifier onlyAdminOrAdvisor() + { + require( + hasRole(msg.sender, ROLE_ADMIN) || + hasRole(msg.sender, ROLE_ADVISOR) + ); + _; + } - function RBACMock(address[] _advisors) - public - { - addRole(msg.sender, ROLE_ADVISOR); + function RBACMock(address[] _advisors) + public + { + addRole(msg.sender, ROLE_ADVISOR); - for (uint256 i = 0; i < _advisors.length; i++) { - addRole(_advisors[i], ROLE_ADVISOR); - } + for (uint256 i = 0; i < _advisors.length; i++) { + addRole(_advisors[i], ROLE_ADVISOR); } + } - function onlyAdminsCanDoThis() - onlyAdmin - view - external - { - } + function onlyAdminsCanDoThis() + onlyAdmin + view + external + { + } - function onlyAdvisorsCanDoThis() - onlyRole(ROLE_ADVISOR) - view - external - { - } + function onlyAdvisorsCanDoThis() + onlyRole(ROLE_ADVISOR) + view + external + { + } - function eitherAdminOrAdvisorCanDoThis() - onlyAdminOrAdvisor - view - external - { - } + function eitherAdminOrAdvisorCanDoThis() + onlyAdminOrAdvisor + view + external + { + } - function nobodyCanDoThis() - onlyRole("unknown") - view - external - { - } + function nobodyCanDoThis() + onlyRole("unknown") + view + external + { + } - // admins can remove advisor's role - function removeAdvisor(address _addr) - onlyAdmin - public - { - // revert if the user isn't an advisor - // (perhaps you want to soft-fail here instead?) - checkRole(_addr, ROLE_ADVISOR); + // admins can remove advisor's role + function removeAdvisor(address _addr) + onlyAdmin + public + { + // revert if the user isn't an advisor + // (perhaps you want to soft-fail here instead?) + checkRole(_addr, ROLE_ADVISOR); - // remove the advisor's role - removeRole(_addr, ROLE_ADVISOR); - } + // remove the advisor's role + removeRole(_addr, ROLE_ADVISOR); + } } diff --git a/contracts/ownership/Contactable.sol b/contracts/ownership/Contactable.sol index 8322f9bf51e..293904a14bc 100644 --- a/contracts/ownership/Contactable.sol +++ b/contracts/ownership/Contactable.sol @@ -9,13 +9,13 @@ import "./Ownable.sol"; */ contract Contactable is Ownable{ - string public contactInformation; + string public contactInformation; - /** - * @dev Allows the owner to set a string with their contact information. - * @param info The contact information to attach to the contract. - */ - function setContactInformation(string info) onlyOwner public { - contactInformation = info; - } + /** + * @dev Allows the owner to set a string with their contact information. + * @param info The contact information to attach to the contract. + */ + function setContactInformation(string info) onlyOwner public { + contactInformation = info; + } } diff --git a/contracts/ownership/rbac/RBAC.sol b/contracts/ownership/rbac/RBAC.sol index 838539720df..3a25737b82f 100644 --- a/contracts/ownership/rbac/RBAC.sol +++ b/contracts/ownership/rbac/RBAC.sol @@ -15,143 +15,143 @@ import "./Roles.sol"; * to avoid typos. */ contract RBAC { - using Roles for Roles.Role; - - mapping (string => Roles.Role) private roles; - - event RoleAdded(address addr, string roleName); - event RoleRemoved(address addr, string roleName); - - /** - * A constant role name for indicating admins. - */ - string public constant ROLE_ADMIN = "admin"; - - /** - * @dev constructor. Sets msg.sender as admin by default - */ - function RBAC() - public - { - addRole(msg.sender, ROLE_ADMIN); - } - - /** - * @dev add a role to an address - * @param addr address - * @param roleName the name of the role - */ - function addRole(address addr, string roleName) - internal - { - roles[roleName].add(addr); - RoleAdded(addr, roleName); - } - - /** - * @dev remove a role from an address - * @param addr address - * @param roleName the name of the role - */ - function removeRole(address addr, string roleName) - internal - { - roles[roleName].remove(addr); - RoleRemoved(addr, roleName); - } - - /** - * @dev reverts if addr does not have role - * @param addr address - * @param roleName the name of the role - * // reverts - */ - function checkRole(address addr, string roleName) - view - public - { - roles[roleName].check(addr); - } - - /** - * @dev determine if addr has role - * @param addr address - * @param roleName the name of the role - * @return bool - */ - function hasRole(address addr, string roleName) - view - public - returns (bool) - { - return roles[roleName].has(addr); - } - - /** - * @dev add a role to an address - * @param addr address - * @param roleName the name of the role - */ - function adminAddRole(address addr, string roleName) - onlyAdmin - public - { - addRole(addr, roleName); - } - - /** - * @dev remove a role from an address - * @param addr address - * @param roleName the name of the role - */ - function adminRemoveRole(address addr, string roleName) - onlyAdmin - public - { - removeRole(addr, roleName); - } - - - /** - * @dev modifier to scope access to a single role (uses msg.sender as addr) - * @param roleName the name of the role - * // reverts - */ - modifier onlyRole(string roleName) - { - checkRole(msg.sender, roleName); - _; - } - - /** - * @dev modifier to scope access to admins - * // reverts - */ - modifier onlyAdmin() - { - checkRole(msg.sender, ROLE_ADMIN); - _; - } - - /** - * @dev modifier to scope access to a set of roles (uses msg.sender as addr) - * @param roleNames the names of the roles to scope access to - * // reverts - * - * @TODO - when solidity supports dynamic arrays as arguments to modifiers, provide this - * see: https://github.com/ethereum/solidity/issues/2467 - */ - // modifier onlyRoles(string[] roleNames) { - // bool hasAnyRole = false; - // for (uint8 i = 0; i < roleNames.length; i++) { - // if (hasRole(msg.sender, roleNames[i])) { - // hasAnyRole = true; - // break; - // } - // } - - // require(hasAnyRole); - - // _; - // } + using Roles for Roles.Role; + + mapping (string => Roles.Role) private roles; + + event RoleAdded(address addr, string roleName); + event RoleRemoved(address addr, string roleName); + + /** + * A constant role name for indicating admins. + */ + string public constant ROLE_ADMIN = "admin"; + + /** + * @dev constructor. Sets msg.sender as admin by default + */ + function RBAC() + public + { + addRole(msg.sender, ROLE_ADMIN); + } + + /** + * @dev add a role to an address + * @param addr address + * @param roleName the name of the role + */ + function addRole(address addr, string roleName) + internal + { + roles[roleName].add(addr); + RoleAdded(addr, roleName); + } + + /** + * @dev remove a role from an address + * @param addr address + * @param roleName the name of the role + */ + function removeRole(address addr, string roleName) + internal + { + roles[roleName].remove(addr); + RoleRemoved(addr, roleName); + } + + /** + * @dev reverts if addr does not have role + * @param addr address + * @param roleName the name of the role + * // reverts + */ + function checkRole(address addr, string roleName) + view + public + { + roles[roleName].check(addr); + } + + /** + * @dev determine if addr has role + * @param addr address + * @param roleName the name of the role + * @return bool + */ + function hasRole(address addr, string roleName) + view + public + returns (bool) + { + return roles[roleName].has(addr); + } + + /** + * @dev add a role to an address + * @param addr address + * @param roleName the name of the role + */ + function adminAddRole(address addr, string roleName) + onlyAdmin + public + { + addRole(addr, roleName); + } + + /** + * @dev remove a role from an address + * @param addr address + * @param roleName the name of the role + */ + function adminRemoveRole(address addr, string roleName) + onlyAdmin + public + { + removeRole(addr, roleName); + } + + + /** + * @dev modifier to scope access to a single role (uses msg.sender as addr) + * @param roleName the name of the role + * // reverts + */ + modifier onlyRole(string roleName) + { + checkRole(msg.sender, roleName); + _; + } + + /** + * @dev modifier to scope access to admins + * // reverts + */ + modifier onlyAdmin() + { + checkRole(msg.sender, ROLE_ADMIN); + _; + } + + /** + * @dev modifier to scope access to a set of roles (uses msg.sender as addr) + * @param roleNames the names of the roles to scope access to + * // reverts + * + * @TODO - when solidity supports dynamic arrays as arguments to modifiers, provide this + * see: https://github.com/ethereum/solidity/issues/2467 + */ + // modifier onlyRoles(string[] roleNames) { + // bool hasAnyRole = false; + // for (uint8 i = 0; i < roleNames.length; i++) { + // if (hasRole(msg.sender, roleNames[i])) { + // hasAnyRole = true; + // break; + // } + // } + + // require(hasAnyRole); + + // _; + // } } diff --git a/contracts/ownership/rbac/Roles.sol b/contracts/ownership/rbac/Roles.sol index 3ef7e27164a..7651f095d4d 100644 --- a/contracts/ownership/rbac/Roles.sol +++ b/contracts/ownership/rbac/Roles.sol @@ -8,48 +8,48 @@ pragma solidity ^0.4.18; * See RBAC.sol for example usage. */ library Roles { - struct Role { - mapping (address => bool) bearer; - } + struct Role { + mapping (address => bool) bearer; + } - /** - * @dev give an address access to this role - */ - function add(Role storage role, address addr) - internal - { - role.bearer[addr] = true; - } + /** + * @dev give an address access to this role + */ + function add(Role storage role, address addr) + internal + { + role.bearer[addr] = true; + } - /** - * @dev remove an address' access to this role - */ - function remove(Role storage role, address addr) - internal - { - role.bearer[addr] = false; - } + /** + * @dev remove an address' access to this role + */ + function remove(Role storage role, address addr) + internal + { + role.bearer[addr] = false; + } - /** - * @dev check if an address has this role - * // reverts - */ - function check(Role storage role, address addr) - view - internal - { - require(has(role, addr)); - } + /** + * @dev check if an address has this role + * // reverts + */ + function check(Role storage role, address addr) + view + internal + { + require(has(role, addr)); + } - /** - * @dev check if an address has this role - * @return bool - */ - function has(Role storage role, address addr) - view - internal - returns (bool) - { - return role.bearer[addr]; - } + /** + * @dev check if an address has this role + * @return bool + */ + function has(Role storage role, address addr) + view + internal + returns (bool) + { + return role.bearer[addr]; + } } diff --git a/contracts/token/BurnableToken.sol b/contracts/token/BurnableToken.sol index 9abee592599..ea915761adb 100644 --- a/contracts/token/BurnableToken.sol +++ b/contracts/token/BurnableToken.sol @@ -8,20 +8,20 @@ import "./BasicToken.sol"; */ contract BurnableToken is BasicToken { - event Burn(address indexed burner, uint256 value); + event Burn(address indexed burner, uint256 value); - /** - * @dev Burns a specific amount of tokens. - * @param _value The amount of token to be burned. - */ - function burn(uint256 _value) public { - require(_value <= balances[msg.sender]); - // no need to require value <= totalSupply, since that would imply the - // sender's balance is greater than the totalSupply, which *should* be an assertion failure + /** + * @dev Burns a specific amount of tokens. + * @param _value The amount of token to be burned. + */ + function burn(uint256 _value) public { + require(_value <= balances[msg.sender]); + // no need to require value <= totalSupply, since that would imply the + // sender's balance is greater than the totalSupply, which *should* be an assertion failure - address burner = msg.sender; - balances[burner] = balances[burner].sub(_value); - totalSupply = totalSupply.sub(_value); - Burn(burner, _value); - } + address burner = msg.sender; + balances[burner] = balances[burner].sub(_value); + totalSupply = totalSupply.sub(_value); + Burn(burner, _value); + } } From 9c5fec903021528f81243af8494837e7ebc3ce60 Mon Sep 17 00:00:00 2001 From: Matt Condon Date: Mon, 15 Jan 2018 15:44:03 -0500 Subject: [PATCH 6/9] fix: solium errors - blank-line only --- contracts/DayLimit.sol | 1 + contracts/MerkleProof.sol | 1 + contracts/ReentrancyGuard.sol | 1 + contracts/crowdsale/CappedCrowdsale.sol | 1 + contracts/crowdsale/Crowdsale.sol | 1 + contracts/crowdsale/FinalizableCrowdsale.sol | 1 + contracts/crowdsale/RefundVault.sol | 1 + contracts/examples/SampleCrowdsale.sol | 2 ++ contracts/lifecycle/Migrations.sol | 2 +- contracts/lifecycle/TokenDestructible.sol | 2 +- contracts/math/Math.sol | 2 +- contracts/mocks/BurnableTokenMock.sol | 1 + contracts/mocks/DayLimitMock.sol | 2 ++ contracts/mocks/DetailedERC20Mock.sol | 1 + contracts/mocks/ERC23TokenMock.sol | 1 + contracts/mocks/ForceEther.sol | 1 + contracts/mocks/HasNoEtherTest.sol | 1 + contracts/mocks/InsecureTargetBounty.sol | 2 +- contracts/mocks/PausableTokenMock.sol | 1 + contracts/mocks/ReentrancyAttack.sol | 1 + contracts/mocks/ReentrancyMock.sol | 1 + contracts/mocks/SafeERC20Helper.sol | 3 +++ contracts/mocks/SecureTargetBounty.sol | 2 +- contracts/ownership/CanReclaimToken.sol | 1 + contracts/ownership/Contactable.sol | 1 + contracts/ownership/DelayedClaimable.sol | 2 -- contracts/ownership/HasNoContracts.sol | 1 + contracts/ownership/HasNoEther.sol | 1 + contracts/ownership/HasNoTokens.sol | 1 + contracts/ownership/NoOwner.sol | 1 + contracts/ownership/Ownable.sol | 2 -- contracts/ownership/rbac/RBAC.sol | 1 - contracts/payment/SplitPayment.sol | 1 + contracts/token/BurnableToken.sol | 1 + contracts/token/CappedToken.sol | 1 + contracts/token/DetailedERC20.sol | 1 + contracts/token/PausableToken.sol | 2 +- contracts/token/SafeERC20.sol | 1 + contracts/token/TokenTimelock.sol | 2 +- contracts/token/TokenVesting.sol | 1 + 40 files changed, 41 insertions(+), 12 deletions(-) diff --git a/contracts/DayLimit.sol b/contracts/DayLimit.sol index bf3f3cbf037..adacd7a62f5 100644 --- a/contracts/DayLimit.sol +++ b/contracts/DayLimit.sol @@ -1,5 +1,6 @@ pragma solidity ^0.4.18; + /** * @title DayLimit * @dev Base contract that enables methods to be protected by placing a linear limit (specifiable) diff --git a/contracts/MerkleProof.sol b/contracts/MerkleProof.sol index d8ab7179525..78c33d6b95f 100644 --- a/contracts/MerkleProof.sol +++ b/contracts/MerkleProof.sol @@ -1,5 +1,6 @@ pragma solidity ^0.4.18; + /* * @title MerkleProof * @dev Merkle proof verification diff --git a/contracts/ReentrancyGuard.sol b/contracts/ReentrancyGuard.sol index 00daf58328d..0fc99f7a46d 100644 --- a/contracts/ReentrancyGuard.sol +++ b/contracts/ReentrancyGuard.sol @@ -1,5 +1,6 @@ pragma solidity ^0.4.18; + /** * @title Helps contracts guard agains reentrancy attacks. * @author Remco Bloemen diff --git a/contracts/crowdsale/CappedCrowdsale.sol b/contracts/crowdsale/CappedCrowdsale.sol index cd250df60e3..cbcbfac454c 100644 --- a/contracts/crowdsale/CappedCrowdsale.sol +++ b/contracts/crowdsale/CappedCrowdsale.sol @@ -3,6 +3,7 @@ pragma solidity ^0.4.18; import "../math/SafeMath.sol"; import "./Crowdsale.sol"; + /** * @title CappedCrowdsale * @dev Extension of Crowdsale with a max amount of funds raised diff --git a/contracts/crowdsale/Crowdsale.sol b/contracts/crowdsale/Crowdsale.sol index e9e2f248932..6618f9bfc1d 100644 --- a/contracts/crowdsale/Crowdsale.sol +++ b/contracts/crowdsale/Crowdsale.sol @@ -3,6 +3,7 @@ pragma solidity ^0.4.18; import "../token/MintableToken.sol"; import "../math/SafeMath.sol"; + /** * @title Crowdsale * @dev Crowdsale is a base contract for managing a token crowdsale. diff --git a/contracts/crowdsale/FinalizableCrowdsale.sol b/contracts/crowdsale/FinalizableCrowdsale.sol index cf94aa033ca..f75e9de3936 100644 --- a/contracts/crowdsale/FinalizableCrowdsale.sol +++ b/contracts/crowdsale/FinalizableCrowdsale.sol @@ -4,6 +4,7 @@ import "../math/SafeMath.sol"; import "../ownership/Ownable.sol"; import "./Crowdsale.sol"; + /** * @title FinalizableCrowdsale * @dev Extension of Crowdsale where an owner can do extra work diff --git a/contracts/crowdsale/RefundVault.sol b/contracts/crowdsale/RefundVault.sol index 0657e8e42c7..bf600000047 100644 --- a/contracts/crowdsale/RefundVault.sol +++ b/contracts/crowdsale/RefundVault.sol @@ -3,6 +3,7 @@ pragma solidity ^0.4.18; import "../math/SafeMath.sol"; import "../ownership/Ownable.sol"; + /** * @title RefundVault * @dev This contract is used for storing funds while a crowdsale diff --git a/contracts/examples/SampleCrowdsale.sol b/contracts/examples/SampleCrowdsale.sol index 3c7672219c2..1ffeec2dc6d 100644 --- a/contracts/examples/SampleCrowdsale.sol +++ b/contracts/examples/SampleCrowdsale.sol @@ -4,6 +4,7 @@ import "../crowdsale/CappedCrowdsale.sol"; import "../crowdsale/RefundableCrowdsale.sol"; import "../token/MintableToken.sol"; + /** * @title SampleCrowdsaleToken * @dev Very simple ERC20 Token that can be minted. @@ -17,6 +18,7 @@ contract SampleCrowdsaleToken is MintableToken { } + /** * @title SampleCrowdsale * @dev This is an example of a fully fledged crowdsale. diff --git a/contracts/lifecycle/Migrations.sol b/contracts/lifecycle/Migrations.sol index c8f93085544..72314f2f7fd 100644 --- a/contracts/lifecycle/Migrations.sol +++ b/contracts/lifecycle/Migrations.sol @@ -1,8 +1,8 @@ pragma solidity ^0.4.18; - import "../ownership/Ownable.sol"; + /** * @title Migrations * @dev This is a truffle contract, needed for truffle integration, not meant for use by Zeppelin users. diff --git a/contracts/lifecycle/TokenDestructible.sol b/contracts/lifecycle/TokenDestructible.sol index 8eaad04fd44..fa13c9241c8 100644 --- a/contracts/lifecycle/TokenDestructible.sol +++ b/contracts/lifecycle/TokenDestructible.sol @@ -1,9 +1,9 @@ pragma solidity ^0.4.18; - import "../ownership/Ownable.sol"; import "../token/ERC20Basic.sol"; + /** * @title TokenDestructible: * @author Remco Bloemen diff --git a/contracts/math/Math.sol b/contracts/math/Math.sol index 5d09ee6ff31..943953266ad 100644 --- a/contracts/math/Math.sol +++ b/contracts/math/Math.sol @@ -1,10 +1,10 @@ pragma solidity ^0.4.18; + /** * @title Math * @dev Assorted math operations */ - library Math { function max64(uint64 a, uint64 b) internal pure returns (uint64) { return a >= b ? a : b; diff --git a/contracts/mocks/BurnableTokenMock.sol b/contracts/mocks/BurnableTokenMock.sol index c6ae40502bd..07b5bf02ea4 100644 --- a/contracts/mocks/BurnableTokenMock.sol +++ b/contracts/mocks/BurnableTokenMock.sol @@ -2,6 +2,7 @@ pragma solidity ^0.4.18; import "../token/BurnableToken.sol"; + contract BurnableTokenMock is BurnableToken { function BurnableTokenMock(address initialAccount, uint initialBalance) public { diff --git a/contracts/mocks/DayLimitMock.sol b/contracts/mocks/DayLimitMock.sol index e40ab1221d0..78139ccdf9d 100644 --- a/contracts/mocks/DayLimitMock.sol +++ b/contracts/mocks/DayLimitMock.sol @@ -1,6 +1,8 @@ pragma solidity ^0.4.18; + import "../../contracts/DayLimit.sol"; + contract DayLimitMock is DayLimit { uint256 public totalSpending; diff --git a/contracts/mocks/DetailedERC20Mock.sol b/contracts/mocks/DetailedERC20Mock.sol index 96548df06d2..83fc96b3802 100644 --- a/contracts/mocks/DetailedERC20Mock.sol +++ b/contracts/mocks/DetailedERC20Mock.sol @@ -3,6 +3,7 @@ pragma solidity ^0.4.18; import "../token/StandardToken.sol"; import "../token/DetailedERC20.sol"; + contract DetailedERC20Mock is StandardToken, DetailedERC20 { function DetailedERC20Mock(string _name, string _symbol, uint8 _decimals) DetailedERC20(_name, _symbol, _decimals) public {} } diff --git a/contracts/mocks/ERC23TokenMock.sol b/contracts/mocks/ERC23TokenMock.sol index f7bd273e5bf..8c826c2b09f 100644 --- a/contracts/mocks/ERC23TokenMock.sol +++ b/contracts/mocks/ERC23TokenMock.sol @@ -8,6 +8,7 @@ contract ERC23ContractInterface { function tokenFallback(address _from, uint256 _value, bytes _data) external; } + contract ERC23TokenMock is BasicToken { function ERC23TokenMock(address initialAccount, uint256 initialBalance) public { diff --git a/contracts/mocks/ForceEther.sol b/contracts/mocks/ForceEther.sol index 0206b19dab1..9ab4a887b68 100644 --- a/contracts/mocks/ForceEther.sol +++ b/contracts/mocks/ForceEther.sol @@ -1,5 +1,6 @@ pragma solidity ^0.4.18; + // @title Force Ether into a contract. // @notice even // if the contract is not payable. diff --git a/contracts/mocks/HasNoEtherTest.sol b/contracts/mocks/HasNoEtherTest.sol index 5a51c185577..6bb40325399 100644 --- a/contracts/mocks/HasNoEtherTest.sol +++ b/contracts/mocks/HasNoEtherTest.sol @@ -2,6 +2,7 @@ pragma solidity ^0.4.18; import "../../contracts/ownership/HasNoEther.sol"; + contract HasNoEtherTest is HasNoEther { // Constructor with explicit payable — should still fail diff --git a/contracts/mocks/InsecureTargetBounty.sol b/contracts/mocks/InsecureTargetBounty.sol index 87e3bf8b68a..5907aa1e12a 100644 --- a/contracts/mocks/InsecureTargetBounty.sol +++ b/contracts/mocks/InsecureTargetBounty.sol @@ -1,6 +1,5 @@ pragma solidity ^0.4.18; - import {Bounty, Target} from "../../contracts/Bounty.sol"; @@ -10,6 +9,7 @@ contract InsecureTargetMock is Target { } } + contract InsecureTargetBounty is Bounty { function deployContract() internal returns (address) { return new InsecureTargetMock(); diff --git a/contracts/mocks/PausableTokenMock.sol b/contracts/mocks/PausableTokenMock.sol index 416498e9e6b..447577bcdbb 100644 --- a/contracts/mocks/PausableTokenMock.sol +++ b/contracts/mocks/PausableTokenMock.sol @@ -2,6 +2,7 @@ pragma solidity ^0.4.18; import "../token/PausableToken.sol"; + // mock class using PausableToken contract PausableTokenMock is PausableToken { diff --git a/contracts/mocks/ReentrancyAttack.sol b/contracts/mocks/ReentrancyAttack.sol index 870bcf78e43..cbed1356649 100644 --- a/contracts/mocks/ReentrancyAttack.sol +++ b/contracts/mocks/ReentrancyAttack.sol @@ -1,5 +1,6 @@ pragma solidity ^0.4.18; + contract ReentrancyAttack { function callSender(bytes4 data) public { diff --git a/contracts/mocks/ReentrancyMock.sol b/contracts/mocks/ReentrancyMock.sol index 396e17fbf98..970586cdf41 100644 --- a/contracts/mocks/ReentrancyMock.sol +++ b/contracts/mocks/ReentrancyMock.sol @@ -3,6 +3,7 @@ pragma solidity ^0.4.18; import "../ReentrancyGuard.sol"; import "./ReentrancyAttack.sol"; + contract ReentrancyMock is ReentrancyGuard { uint256 public counter; diff --git a/contracts/mocks/SafeERC20Helper.sol b/contracts/mocks/SafeERC20Helper.sol index ccfe63cead9..d41e7a5e1aa 100644 --- a/contracts/mocks/SafeERC20Helper.sol +++ b/contracts/mocks/SafeERC20Helper.sol @@ -3,6 +3,7 @@ pragma solidity ^0.4.18; import "../token/ERC20.sol"; import "../token/SafeERC20.sol"; + contract ERC20FailingMock is ERC20 { function transfer(address, uint256) public returns (bool) { return false; @@ -25,6 +26,7 @@ contract ERC20FailingMock is ERC20 { } } + contract ERC20SucceedingMock is ERC20 { function transfer(address, uint256) public returns (bool) { return true; @@ -47,6 +49,7 @@ contract ERC20SucceedingMock is ERC20 { } } + contract SafeERC20Helper { using SafeERC20 for ERC20; diff --git a/contracts/mocks/SecureTargetBounty.sol b/contracts/mocks/SecureTargetBounty.sol index aed4639492d..066f44882e1 100644 --- a/contracts/mocks/SecureTargetBounty.sol +++ b/contracts/mocks/SecureTargetBounty.sol @@ -1,6 +1,5 @@ pragma solidity ^0.4.18; - import {Bounty, Target} from "../../contracts/Bounty.sol"; @@ -10,6 +9,7 @@ contract SecureTargetMock is Target { } } + contract SecureTargetBounty is Bounty { function deployContract() internal returns (address) { return new SecureTargetMock(); diff --git a/contracts/ownership/CanReclaimToken.sol b/contracts/ownership/CanReclaimToken.sol index d948393ac38..ab85e173652 100644 --- a/contracts/ownership/CanReclaimToken.sol +++ b/contracts/ownership/CanReclaimToken.sol @@ -4,6 +4,7 @@ import "./Ownable.sol"; import "../token/ERC20Basic.sol"; import "../token/SafeERC20.sol"; + /** * @title Contracts that should be able to recover tokens * @author SylTi diff --git a/contracts/ownership/Contactable.sol b/contracts/ownership/Contactable.sol index 293904a14bc..4aa1e13a3e9 100644 --- a/contracts/ownership/Contactable.sol +++ b/contracts/ownership/Contactable.sol @@ -2,6 +2,7 @@ pragma solidity ^0.4.18; import "./Ownable.sol"; + /** * @title Contactable token * @dev Basic version of a contactable contract, allowing the owner to provide a string with their diff --git a/contracts/ownership/DelayedClaimable.sol b/contracts/ownership/DelayedClaimable.sol index d42481a5df8..857ea39bbcc 100644 --- a/contracts/ownership/DelayedClaimable.sol +++ b/contracts/ownership/DelayedClaimable.sol @@ -1,6 +1,5 @@ pragma solidity ^0.4.18; - import "./Claimable.sol"; @@ -26,7 +25,6 @@ contract DelayedClaimable is Claimable { start = _start; } - /** * @dev Allows the pendingOwner address to finalize the transfer, as long as it is called within * the specified start and end time. diff --git a/contracts/ownership/HasNoContracts.sol b/contracts/ownership/HasNoContracts.sol index 1b7387530b7..7cc87b524de 100644 --- a/contracts/ownership/HasNoContracts.sol +++ b/contracts/ownership/HasNoContracts.sol @@ -2,6 +2,7 @@ pragma solidity ^0.4.18; import "./Ownable.sol"; + /** * @title Contracts that should not own Contracts * @author Remco Bloemen diff --git a/contracts/ownership/HasNoEther.sol b/contracts/ownership/HasNoEther.sol index 238424ad93f..8c2f490a987 100644 --- a/contracts/ownership/HasNoEther.sol +++ b/contracts/ownership/HasNoEther.sol @@ -2,6 +2,7 @@ pragma solidity ^0.4.18; import "./Ownable.sol"; + /** * @title Contracts that should not own Ether * @author Remco Bloemen diff --git a/contracts/ownership/HasNoTokens.sol b/contracts/ownership/HasNoTokens.sol index f7f7e348a30..9a4e7aabe67 100644 --- a/contracts/ownership/HasNoTokens.sol +++ b/contracts/ownership/HasNoTokens.sol @@ -2,6 +2,7 @@ pragma solidity ^0.4.18; import "./CanReclaimToken.sol"; + /** * @title Contracts that should not own Tokens * @author Remco Bloemen diff --git a/contracts/ownership/NoOwner.sol b/contracts/ownership/NoOwner.sol index 160d5b57de2..6206e8998b6 100644 --- a/contracts/ownership/NoOwner.sol +++ b/contracts/ownership/NoOwner.sol @@ -4,6 +4,7 @@ import "./HasNoEther.sol"; import "./HasNoTokens.sol"; import "./HasNoContracts.sol"; + /** * @title Base contract for contracts that should not own things. * @author Remco Bloemen diff --git a/contracts/ownership/Ownable.sol b/contracts/ownership/Ownable.sol index 0e274491455..54158a2a3f7 100644 --- a/contracts/ownership/Ownable.sol +++ b/contracts/ownership/Ownable.sol @@ -21,7 +21,6 @@ contract Ownable { owner = msg.sender; } - /** * @dev Throws if called by any account other than the owner. */ @@ -30,7 +29,6 @@ contract Ownable { _; } - /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. diff --git a/contracts/ownership/rbac/RBAC.sol b/contracts/ownership/rbac/RBAC.sol index 3a25737b82f..51a8a0550f1 100644 --- a/contracts/ownership/rbac/RBAC.sol +++ b/contracts/ownership/rbac/RBAC.sol @@ -111,7 +111,6 @@ contract RBAC { removeRole(addr, roleName); } - /** * @dev modifier to scope access to a single role (uses msg.sender as addr) * @param roleName the name of the role diff --git a/contracts/payment/SplitPayment.sol b/contracts/payment/SplitPayment.sol index e052c1553ed..e9326f9c307 100644 --- a/contracts/payment/SplitPayment.sol +++ b/contracts/payment/SplitPayment.sol @@ -2,6 +2,7 @@ pragma solidity ^0.4.18; import "../math/SafeMath.sol"; + /** * @title SplitPayment * @dev Base contract that supports multiple payees claiming funds sent to this contract diff --git a/contracts/token/BurnableToken.sol b/contracts/token/BurnableToken.sol index ea915761adb..9cbc2be056c 100644 --- a/contracts/token/BurnableToken.sol +++ b/contracts/token/BurnableToken.sol @@ -2,6 +2,7 @@ pragma solidity ^0.4.18; import "./BasicToken.sol"; + /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). diff --git a/contracts/token/CappedToken.sol b/contracts/token/CappedToken.sol index cc35b95d638..ee55e202d98 100644 --- a/contracts/token/CappedToken.sol +++ b/contracts/token/CappedToken.sol @@ -2,6 +2,7 @@ pragma solidity ^0.4.11; import "./MintableToken.sol"; + /** * @title Capped token * @dev Mintable token with a token cap. diff --git a/contracts/token/DetailedERC20.sol b/contracts/token/DetailedERC20.sol index 477cd4a6650..21897a43bd9 100644 --- a/contracts/token/DetailedERC20.sol +++ b/contracts/token/DetailedERC20.sol @@ -2,6 +2,7 @@ pragma solidity ^0.4.18; import "./ERC20.sol"; + contract DetailedERC20 is ERC20 { string public name; string public symbol; diff --git a/contracts/token/PausableToken.sol b/contracts/token/PausableToken.sol index 1b83f80e47f..4ba35112665 100644 --- a/contracts/token/PausableToken.sol +++ b/contracts/token/PausableToken.sol @@ -3,12 +3,12 @@ pragma solidity ^0.4.18; import "./StandardToken.sol"; import "../lifecycle/Pausable.sol"; + /** * @title Pausable token * * @dev StandardToken modified with pausable transfers. **/ - contract PausableToken is StandardToken, Pausable { function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) { diff --git a/contracts/token/SafeERC20.sol b/contracts/token/SafeERC20.sol index 81b76cd4f9e..1cf3adfab0c 100644 --- a/contracts/token/SafeERC20.sol +++ b/contracts/token/SafeERC20.sol @@ -3,6 +3,7 @@ pragma solidity ^0.4.18; import "./ERC20Basic.sol"; import "./ERC20.sol"; + /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure. diff --git a/contracts/token/TokenTimelock.sol b/contracts/token/TokenTimelock.sol index 267319386d6..3fd0103a518 100644 --- a/contracts/token/TokenTimelock.sol +++ b/contracts/token/TokenTimelock.sol @@ -1,9 +1,9 @@ pragma solidity ^0.4.18; - import "./ERC20Basic.sol"; import "../token/SafeERC20.sol"; + /** * @title TokenTimelock * @dev TokenTimelock is a token holder contract that will allow a diff --git a/contracts/token/TokenVesting.sol b/contracts/token/TokenVesting.sol index 65bd67ea27e..01bdff34e7c 100644 --- a/contracts/token/TokenVesting.sol +++ b/contracts/token/TokenVesting.sol @@ -5,6 +5,7 @@ import "./SafeERC20.sol"; import "../ownership/Ownable.sol"; import "../math/SafeMath.sol"; + /** * @title TokenVesting * @dev A token holder contract that can release its token balance gradually like a From 8d39a6a2484ac5866cb2aa0a6feb0fb6e913aa9c Mon Sep 17 00:00:00 2001 From: Matt Condon Date: Mon, 15 Jan 2018 15:52:50 -0500 Subject: [PATCH 7/9] fix: solium errors - function-order only --- contracts/Bounty.sol | 12 +++--- contracts/crowdsale/CappedCrowdsale.sol | 14 +++--- contracts/crowdsale/Crowdsale.sol | 33 +++++++------- contracts/crowdsale/RefundableCrowdsale.sol | 18 ++++---- contracts/mocks/ReentrancyMock.sol | 8 ++-- contracts/ownership/rbac/RBAC.sol | 48 ++++++++++----------- contracts/payment/PullPayment.sol | 20 ++++----- contracts/payment/SplitPayment.sol | 28 ++++++------ 8 files changed, 90 insertions(+), 91 deletions(-) diff --git a/contracts/Bounty.sol b/contracts/Bounty.sol index 459352ab5f3..4a59431e5c9 100644 --- a/contracts/Bounty.sol +++ b/contracts/Bounty.sol @@ -34,12 +34,6 @@ contract Bounty is PullPayment, Destructible { return target; } - /** - * @dev Internal function to deploy the target contract. - * @return A target contract address - */ - function deployContract() internal returns(address); - /** * @dev Sends the contract funds to the researcher that proved the contract is broken. * @param target contract @@ -53,6 +47,12 @@ contract Bounty is PullPayment, Destructible { claimed = true; } + /** + * @dev Internal function to deploy the target contract. + * @return A target contract address + */ + function deployContract() internal returns(address); + } diff --git a/contracts/crowdsale/CappedCrowdsale.sol b/contracts/crowdsale/CappedCrowdsale.sol index cbcbfac454c..622000ffdd4 100644 --- a/contracts/crowdsale/CappedCrowdsale.sol +++ b/contracts/crowdsale/CappedCrowdsale.sol @@ -18,13 +18,6 @@ contract CappedCrowdsale is Crowdsale { cap = _cap; } - // overriding Crowdsale#validPurchase to add extra cap logic - // @return true if investors can buy at the moment - function validPurchase() internal view returns (bool) { - bool withinCap = weiRaised.add(msg.value) <= cap; - return super.validPurchase() && withinCap; - } - // overriding Crowdsale#hasEnded to add cap logic // @return true if crowdsale event has ended function hasEnded() public view returns (bool) { @@ -32,4 +25,11 @@ contract CappedCrowdsale is Crowdsale { return super.hasEnded() || capReached; } + // overriding Crowdsale#validPurchase to add extra cap logic + // @return true if investors can buy at the moment + function validPurchase() internal view returns (bool) { + bool withinCap = weiRaised.add(msg.value) <= cap; + return super.validPurchase() && withinCap; + } + } diff --git a/contracts/crowdsale/Crowdsale.sol b/contracts/crowdsale/Crowdsale.sol index 6618f9bfc1d..012ee4eedc6 100644 --- a/contracts/crowdsale/Crowdsale.sol +++ b/contracts/crowdsale/Crowdsale.sol @@ -54,22 +54,11 @@ contract Crowdsale { wallet = _wallet; } - // creates the token to be sold. - // override this method to have crowdsale of a specific mintable token. - function createTokenContract() internal returns (MintableToken) { - return new MintableToken(); - } - // fallback function can be used to buy tokens function () external payable { buyTokens(msg.sender); } - // Override this method to have a way to add business logic to your crowdsale when buying - function getTokenAmount(uint256 weiAmount) internal view returns(uint256) { - return weiAmount.mul(rate); - } - // low level token purchase function function buyTokens(address beneficiary) public payable { require(beneficiary != address(0)); @@ -89,6 +78,22 @@ contract Crowdsale { forwardFunds(); } + // @return true if crowdsale event has ended + function hasEnded() public view returns (bool) { + return now > endTime; + } + + // creates the token to be sold. + // override this method to have crowdsale of a specific mintable token. + function createTokenContract() internal returns (MintableToken) { + return new MintableToken(); + } + + // Override this method to have a way to add business logic to your crowdsale when buying + function getTokenAmount(uint256 weiAmount) internal view returns(uint256) { + return weiAmount.mul(rate); + } + // send ether to the fund collection wallet // override to create custom fund forwarding mechanisms function forwardFunds() internal { @@ -102,10 +107,4 @@ contract Crowdsale { return withinPeriod && nonZeroPurchase; } - // @return true if crowdsale event has ended - function hasEnded() public view returns (bool) { - return now > endTime; - } - - } diff --git a/contracts/crowdsale/RefundableCrowdsale.sol b/contracts/crowdsale/RefundableCrowdsale.sol index d089f09f119..12f523b233f 100644 --- a/contracts/crowdsale/RefundableCrowdsale.sol +++ b/contracts/crowdsale/RefundableCrowdsale.sol @@ -27,13 +27,6 @@ contract RefundableCrowdsale is FinalizableCrowdsale { goal = _goal; } - // We're overriding the fund forwarding from Crowdsale. - // In addition to sending the funds, we want to call - // the RefundVault deposit function - function forwardFunds() internal { - vault.deposit.value(msg.value)(msg.sender); - } - // if crowdsale is unsuccessful, investors can claim refunds here function claimRefund() public { require(isFinalized); @@ -42,6 +35,10 @@ contract RefundableCrowdsale is FinalizableCrowdsale { vault.refund(msg.sender); } + function goalReached() public view returns (bool) { + return weiRaised >= goal; + } + // vault finalization task, called when owner calls finalize() function finalization() internal { if (goalReached()) { @@ -53,8 +50,11 @@ contract RefundableCrowdsale is FinalizableCrowdsale { super.finalization(); } - function goalReached() public view returns (bool) { - return weiRaised >= goal; + // We're overriding the fund forwarding from Crowdsale. + // In addition to sending the funds, we want to call + // the RefundVault deposit function + function forwardFunds() internal { + vault.deposit.value(msg.value)(msg.sender); } } diff --git a/contracts/mocks/ReentrancyMock.sol b/contracts/mocks/ReentrancyMock.sol index 970586cdf41..3708395b9ca 100644 --- a/contracts/mocks/ReentrancyMock.sol +++ b/contracts/mocks/ReentrancyMock.sol @@ -12,8 +12,8 @@ contract ReentrancyMock is ReentrancyGuard { counter = 0; } - function count() private { - counter += 1; + function callback() external nonReentrant { + count(); } function countLocalRecursive(uint256 n) public nonReentrant { @@ -38,8 +38,8 @@ contract ReentrancyMock is ReentrancyGuard { attacker.callSender(func); } - function callback() external nonReentrant { - count(); + function count() private { + counter += 1; } } diff --git a/contracts/ownership/rbac/RBAC.sol b/contracts/ownership/rbac/RBAC.sol index 51a8a0550f1..d664e66fa86 100644 --- a/contracts/ownership/rbac/RBAC.sol +++ b/contracts/ownership/rbac/RBAC.sol @@ -36,30 +36,6 @@ contract RBAC { addRole(msg.sender, ROLE_ADMIN); } - /** - * @dev add a role to an address - * @param addr address - * @param roleName the name of the role - */ - function addRole(address addr, string roleName) - internal - { - roles[roleName].add(addr); - RoleAdded(addr, roleName); - } - - /** - * @dev remove a role from an address - * @param addr address - * @param roleName the name of the role - */ - function removeRole(address addr, string roleName) - internal - { - roles[roleName].remove(addr); - RoleRemoved(addr, roleName); - } - /** * @dev reverts if addr does not have role * @param addr address @@ -111,6 +87,30 @@ contract RBAC { removeRole(addr, roleName); } + /** + * @dev add a role to an address + * @param addr address + * @param roleName the name of the role + */ + function addRole(address addr, string roleName) + internal + { + roles[roleName].add(addr); + RoleAdded(addr, roleName); + } + + /** + * @dev remove a role from an address + * @param addr address + * @param roleName the name of the role + */ + function removeRole(address addr, string roleName) + internal + { + roles[roleName].remove(addr); + RoleRemoved(addr, roleName); + } + /** * @dev modifier to scope access to a single role (uses msg.sender as addr) * @param roleName the name of the role diff --git a/contracts/payment/PullPayment.sol b/contracts/payment/PullPayment.sol index df979d0ecb9..7fc6c000c00 100644 --- a/contracts/payment/PullPayment.sol +++ b/contracts/payment/PullPayment.sol @@ -15,16 +15,6 @@ contract PullPayment { mapping(address => uint256) public payments; uint256 public totalPayments; - /** - * @dev Called by the payer to store the sent amount as credit to be pulled. - * @param dest The destination address of the funds. - * @param amount The amount to transfer. - */ - function asyncSend(address dest, uint256 amount) internal { - payments[dest] = payments[dest].add(amount); - totalPayments = totalPayments.add(amount); - } - /** * @dev withdraw accumulated balance, called by payee. */ @@ -40,4 +30,14 @@ contract PullPayment { assert(payee.send(payment)); } + + /** + * @dev Called by the payer to store the sent amount as credit to be pulled. + * @param dest The destination address of the funds. + * @param amount The amount to transfer. + */ + function asyncSend(address dest, uint256 amount) internal { + payments[dest] = payments[dest].add(amount); + totalPayments = totalPayments.add(amount); + } } diff --git a/contracts/payment/SplitPayment.sol b/contracts/payment/SplitPayment.sol index e9326f9c307..2b0180454ff 100644 --- a/contracts/payment/SplitPayment.sol +++ b/contracts/payment/SplitPayment.sol @@ -30,19 +30,9 @@ contract SplitPayment { } /** - * @dev Add a new payee to the contract. - * @param _payee The address of the payee to add. - * @param _shares The number of shares owned by the payee. + * @dev payable fallback */ - function addPayee(address _payee, uint256 _shares) internal { - require(_payee != address(0)); - require(_shares > 0); - require(shares[_payee] == 0); - - payees.push(_payee); - shares[_payee] = _shares; - totalShares = totalShares.add(_shares); - } + function () public payable {} /** * @dev Claim your share of the balance. @@ -65,7 +55,17 @@ contract SplitPayment { } /** - * @dev payable fallback + * @dev Add a new payee to the contract. + * @param _payee The address of the payee to add. + * @param _shares The number of shares owned by the payee. */ - function () public payable {} + function addPayee(address _payee, uint256 _shares) internal { + require(_payee != address(0)); + require(_shares > 0); + require(shares[_payee] == 0); + + payees.push(_payee); + shares[_payee] = _shares; + totalShares = totalShares.add(_shares); + } } From b876da990f333a749ef97afb5cf93f2e7b7e7156 Mon Sep 17 00:00:00 2001 From: Matt Condon Date: Mon, 15 Jan 2018 15:57:34 -0500 Subject: [PATCH 8/9] fix: solium errors - whitespace related --- .soliumrc.json | 4 +++- contracts/MerkleProof.sol | 4 +++- contracts/lifecycle/TokenDestructible.sol | 2 +- contracts/mocks/ERC23TokenMock.sol | 2 +- contracts/mocks/ForceEther.sol | 2 +- contracts/mocks/InsecureTargetBounty.sol | 2 +- contracts/mocks/ReentrancyMock.sol | 4 ++-- contracts/ownership/Contactable.sol | 2 +- 8 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.soliumrc.json b/.soliumrc.json index c065f3f79be..681b33f27ff 100644 --- a/.soliumrc.json +++ b/.soliumrc.json @@ -5,6 +5,8 @@ "quotes": ["error", "double"], "indentation": ["error", 2], "arg-overflow": ["warning", 3], - "security/enforce-explicit-visibility": ["error"] + "security/enforce-explicit-visibility": ["error"], + "security/no-block-members": ["warning"], + "security/no-inline-assembly": ["warning"] } } diff --git a/contracts/MerkleProof.sol b/contracts/MerkleProof.sol index 78c33d6b95f..e0e2ce88b7b 100644 --- a/contracts/MerkleProof.sol +++ b/contracts/MerkleProof.sol @@ -16,7 +16,9 @@ library MerkleProof { */ function verifyProof(bytes _proof, bytes32 _root, bytes32 _leaf) public pure returns (bool) { // Check if proof length is a multiple of 32 - if (_proof.length % 32 != 0) return false; + if (_proof.length % 32 != 0) { + return false; + } bytes32 proofElement; bytes32 computedHash = _leaf; diff --git a/contracts/lifecycle/TokenDestructible.sol b/contracts/lifecycle/TokenDestructible.sol index fa13c9241c8..0bca30e7b82 100644 --- a/contracts/lifecycle/TokenDestructible.sol +++ b/contracts/lifecycle/TokenDestructible.sol @@ -24,7 +24,7 @@ contract TokenDestructible is Ownable { function destroy(address[] tokens) onlyOwner public { // Transfer tokens to owner - for(uint256 i = 0; i < tokens.length; i++) { + for (uint256 i = 0; i < tokens.length; i++) { ERC20Basic token = ERC20Basic(tokens[i]); uint256 balance = token.balanceOf(this); token.transfer(owner, balance); diff --git a/contracts/mocks/ERC23TokenMock.sol b/contracts/mocks/ERC23TokenMock.sol index 8c826c2b09f..d785a72d987 100644 --- a/contracts/mocks/ERC23TokenMock.sol +++ b/contracts/mocks/ERC23TokenMock.sol @@ -25,7 +25,7 @@ contract ERC23TokenMock is BasicToken { assembly { is_contract := not(iszero(extcodesize(_to))) } - if(is_contract) { + if (is_contract) { ERC23ContractInterface receiver = ERC23ContractInterface(_to); receiver.tokenFallback(msg.sender, _value, _data); } diff --git a/contracts/mocks/ForceEther.sol b/contracts/mocks/ForceEther.sol index 9ab4a887b68..fd127da8489 100644 --- a/contracts/mocks/ForceEther.sol +++ b/contracts/mocks/ForceEther.sol @@ -6,7 +6,7 @@ pragma solidity ^0.4.18; // if the contract is not payable. // @notice To use, construct the contract with the target as argument. // @author Remco Bloemen -contract ForceEther { +contract ForceEther { function ForceEther() public payable { } diff --git a/contracts/mocks/InsecureTargetBounty.sol b/contracts/mocks/InsecureTargetBounty.sol index 5907aa1e12a..5344fc2f2e8 100644 --- a/contracts/mocks/InsecureTargetBounty.sol +++ b/contracts/mocks/InsecureTargetBounty.sol @@ -4,7 +4,7 @@ import {Bounty, Target} from "../../contracts/Bounty.sol"; contract InsecureTargetMock is Target { - function checkInvariant() public returns(bool){ + function checkInvariant() public returns(bool) { return false; } } diff --git a/contracts/mocks/ReentrancyMock.sol b/contracts/mocks/ReentrancyMock.sol index 3708395b9ca..55320761b6d 100644 --- a/contracts/mocks/ReentrancyMock.sol +++ b/contracts/mocks/ReentrancyMock.sol @@ -17,7 +17,7 @@ contract ReentrancyMock is ReentrancyGuard { } function countLocalRecursive(uint256 n) public nonReentrant { - if(n > 0) { + if (n > 0) { count(); countLocalRecursive(n - 1); } @@ -25,7 +25,7 @@ contract ReentrancyMock is ReentrancyGuard { function countThisRecursive(uint256 n) public nonReentrant { bytes4 func = bytes4(keccak256("countThisRecursive(uint256)")); - if(n > 0) { + if (n > 0) { count(); bool result = this.call(func, n - 1); require(result == true); diff --git a/contracts/ownership/Contactable.sol b/contracts/ownership/Contactable.sol index 4aa1e13a3e9..882777b15d2 100644 --- a/contracts/ownership/Contactable.sol +++ b/contracts/ownership/Contactable.sol @@ -8,7 +8,7 @@ import "./Ownable.sol"; * @dev Basic version of a contactable contract, allowing the owner to provide a string with their * contact information. */ -contract Contactable is Ownable{ +contract Contactable is Ownable { string public contactInformation; From 1cfebbd01efbf98de48a398255a6a710355f63fd Mon Sep 17 00:00:00 2001 From: Matt Condon Date: Mon, 15 Jan 2018 16:06:40 -0500 Subject: [PATCH 9/9] fix: add ignore directives to SampleCrowdsale and SimpleToken --- contracts/examples/SampleCrowdsale.sol | 6 +++--- contracts/examples/SimpleToken.sol | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/contracts/examples/SampleCrowdsale.sol b/contracts/examples/SampleCrowdsale.sol index 1ffeec2dc6d..9b506695f68 100644 --- a/contracts/examples/SampleCrowdsale.sol +++ b/contracts/examples/SampleCrowdsale.sol @@ -12,9 +12,9 @@ import "../token/MintableToken.sol"; */ contract SampleCrowdsaleToken is MintableToken { - string public constant name = "Sample Crowdsale Token"; - string public constant symbol = "SCT"; - uint8 public constant decimals = 18; + string public constant name = "Sample Crowdsale Token"; // solium-disable-line uppercase + string public constant symbol = "SCT"; // solium-disable-line uppercase + uint8 public constant decimals = 18; // solium-disable-line uppercase } diff --git a/contracts/examples/SimpleToken.sol b/contracts/examples/SimpleToken.sol index f7cf6241304..cdc29479a66 100644 --- a/contracts/examples/SimpleToken.sol +++ b/contracts/examples/SimpleToken.sol @@ -12,9 +12,9 @@ import "../token/StandardToken.sol"; */ contract SimpleToken is StandardToken { - string public constant name = "SimpleToken"; - string public constant symbol = "SIM"; - uint8 public constant decimals = 18; + string public constant name = "SimpleToken"; // solium-disable-line uppercase + string public constant symbol = "SIM"; // solium-disable-line uppercase + uint8 public constant decimals = 18; // solium-disable-line uppercase uint256 public constant INITIAL_SUPPLY = 10000 * (10 ** uint256(decimals));