diff --git a/.gitignore b/.gitignore index 1a6a88ce3b..7624fc61f5 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,6 @@ package-lock.json # echidna litters crytic-export corpus + +/broadcast +/.direnv diff --git a/README.md b/README.md index 7373672bea..ec3b0ab29e 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ For technical document, references and tutorials, etc, refer to the Version - + diff --git a/flake.nix b/flake.nix index 4e6f328d99..bc7fd21e11 100644 --- a/flake.nix +++ b/flake.nix @@ -92,7 +92,7 @@ gnupg ]; - # minimem development shell + # minimum development shell minimumDevInputs = commonDevInputs ++ ethDevInputs ++ defaultNodeDevInputs; # additional tooling for whitehat hackers diff --git a/package.json b/package.json index 9cdea83ffc..7967a812d9 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "nyc": "^17.0.0", "prettier": "^3.3.3", "prettier-eslint": "^16.3.0", - "solhint": "^5.0.3", + "solhint": "^6.0.2", "syncpack": "^13.0.0", "truffle": "^5.11.5", "ts-node": "^10.9.2", diff --git a/packages/automation-contracts/autowrap/.solhint.json b/packages/automation-contracts/autowrap/.solhint.json index 80a876d2e9..1e31b8ca30 100644 --- a/packages/automation-contracts/autowrap/.solhint.json +++ b/packages/automation-contracts/autowrap/.solhint.json @@ -14,6 +14,16 @@ "constructor-syntax": "error", "func-visibility": ["error", { "ignoreConstructors": true }], "quotes": ["error", "double"], - "max-line-length": ["error", 120] + "max-line-length": ["error", 120], + "use-natspec": "off", + "import-path-check": "off", + "gas-indexed-events": "off", + "gas-struct-packing": "off", + "gas-small-strings": "off", + "gas-increment-by-one": "off", + "gas-strict-inequalities": "off", + "gas-calldata-parameters": "off", + "function-max-lines": "off", + "contract-name-capwords": "off" } } diff --git a/packages/automation-contracts/scheduler/.solhint.json b/packages/automation-contracts/scheduler/.solhint.json index 80a876d2e9..1e31b8ca30 100644 --- a/packages/automation-contracts/scheduler/.solhint.json +++ b/packages/automation-contracts/scheduler/.solhint.json @@ -14,6 +14,16 @@ "constructor-syntax": "error", "func-visibility": ["error", { "ignoreConstructors": true }], "quotes": ["error", "double"], - "max-line-length": ["error", 120] + "max-line-length": ["error", 120], + "use-natspec": "off", + "import-path-check": "off", + "gas-indexed-events": "off", + "gas-struct-packing": "off", + "gas-small-strings": "off", + "gas-increment-by-one": "off", + "gas-strict-inequalities": "off", + "gas-calldata-parameters": "off", + "function-max-lines": "off", + "contract-name-capwords": "off" } } diff --git a/packages/ethereum-contracts/.gitignore b/packages/ethereum-contracts/.gitignore index d5791612ca..1a08887d6c 100644 --- a/packages/ethereum-contracts/.gitignore +++ b/packages/ethereum-contracts/.gitignore @@ -13,3 +13,5 @@ /packages /testing-benchmark.json /broadcast + +/addrs diff --git a/packages/ethereum-contracts/.solhint.json b/packages/ethereum-contracts/.solhint.json index 86c3f4d7b6..e24930910b 100644 --- a/packages/ethereum-contracts/.solhint.json +++ b/packages/ethereum-contracts/.solhint.json @@ -16,6 +16,16 @@ "constructor-syntax": "error", "func-visibility": ["error", { "ignoreConstructors": true }], "quotes": ["error", "double"], - "max-line-length": ["error", 120] + "max-line-length": ["error", 120], + "use-natspec": "off", + "import-path-check": "off", + "gas-indexed-events": "off", + "gas-struct-packing": "off", + "gas-small-strings": "off", + "gas-increment-by-one": "off", + "gas-strict-inequalities": "off", + "gas-calldata-parameters": "off", + "function-max-lines": "off", + "contract-name-capwords": "off" } } diff --git a/packages/ethereum-contracts/CHANGELOG.md b/packages/ethereum-contracts/CHANGELOG.md index 71058b745b..e38a847b62 100644 --- a/packages/ethereum-contracts/CHANGELOG.md +++ b/packages/ethereum-contracts/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to the ethereum-contracts will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [UNRELEASED] + +### Changed + +- Update solhint to v6. + ## [v1.14.1] ### Added diff --git a/packages/ethereum-contracts/contracts/agreements/AgreementLibrary.sol b/packages/ethereum-contracts/contracts/agreements/AgreementLibrary.sol index 22d4e66ddb..90c257e615 100644 --- a/packages/ethereum-contracts/contracts/agreements/AgreementLibrary.sol +++ b/packages/ethereum-contracts/contracts/agreements/AgreementLibrary.sol @@ -7,7 +7,6 @@ import { ISuperApp, SuperAppDefinitions } from "../interfaces/superfluid/ISuperfluid.sol"; -import { ISuperfluidToken } from "../interfaces/superfluid/ISuperfluidToken.sol"; import { SafeCast } from "@openzeppelin-v5/contracts/utils/math/SafeCast.sol"; diff --git a/packages/ethereum-contracts/test/test-solc-compatibility.sh b/packages/ethereum-contracts/test/test-solc-compatibility.sh index c4a397d019..11917a6766 100755 --- a/packages/ethereum-contracts/test/test-solc-compatibility.sh +++ b/packages/ethereum-contracts/test/test-solc-compatibility.sh @@ -31,7 +31,7 @@ fi # from here - don't forget to add 0x to our generated sha256 # workaround to make solc to find OZ library -ln -s ../../lib/openzeppelin-contracts @openzeppelin-v5 +ln -sf ../../lib/openzeppelin-contracts @openzeppelin-v5 # verify they are compatible with the minimum version of the SOLC we support find contracts/{interfaces/,apps/} -name '*.sol' | while read i;do diff --git a/packages/hot-fuzz/.solhint.json b/packages/hot-fuzz/.solhint.json index f127ecd0bb..2887187566 100644 --- a/packages/hot-fuzz/.solhint.json +++ b/packages/hot-fuzz/.solhint.json @@ -8,7 +8,6 @@ "no-unused-import": "off", "max-states-count": "off", "no-inline-assembly": "off", - "mark-callable-contracts": "off", "gas-custom-errors": "off", "one-contract-per-file": "off", "max-line-length": ["error", 120], @@ -17,6 +16,16 @@ "private-vars-leading-underscore": "off", "reason-string": ["error", { "maxLength": 64 } ], "compiler-version": ["off"], - "func-visibility" : ["error", { "ignoreConstructors": true }] + "func-visibility" : ["error", { "ignoreConstructors": true }], + "use-natspec": "off", + "import-path-check": "off", + "gas-indexed-events": "off", + "gas-struct-packing": "off", + "gas-small-strings": "off", + "gas-increment-by-one": "off", + "gas-strict-inequalities": "off", + "gas-calldata-parameters": "off", + "function-max-lines": "off", + "contract-name-capwords": "off" } } diff --git a/packages/solidity-semantic-money/.solhint.json b/packages/solidity-semantic-money/.solhint.json index f4923a5b6f..3c6c582d2a 100644 --- a/packages/solidity-semantic-money/.solhint.json +++ b/packages/solidity-semantic-money/.solhint.json @@ -16,6 +16,16 @@ "constructor-syntax": "error", "func-visibility": ["error", { "ignoreConstructors": true }], "quotes": ["error", "double"], - "max-line-length": ["error", 120] + "max-line-length": ["error", 120], + "use-natspec": "off", + "import-path-check": "off", + "gas-indexed-events": "off", + "gas-struct-packing": "off", + "gas-small-strings": "off", + "gas-increment-by-one": "off", + "gas-strict-inequalities": "off", + "gas-calldata-parameters": "off", + "function-max-lines": "off", + "contract-name-capwords": "off" } } diff --git a/yarn.lock b/yarn.lock index 009d9d1715..293ddb8ca6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1879,6 +1879,11 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== +"@humanwhocodes/momoa@^2.0.4": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@humanwhocodes/momoa/-/momoa-2.0.4.tgz#8b9e7a629651d15009c3587d07a222deeb829385" + integrity sha512-RE815I4arJFtt+FVeU1Tgp9/Xvecacji8w/V6XtXsWWH/wz/eNkNbhb+ny/+PlVZjV0rxQpRSQKNKE3lcktHEA== + "@humanwhocodes/object-schema@^2.0.2": version "2.0.3" resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" @@ -3672,6 +3677,11 @@ resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.18.0.tgz#8e77a02a09ecce957255a2f48c9a7178ec191908" integrity sha512-yfORGUIPgLck41qyN7nbwJRAx17/jAIXCTanHOJZhB6PJ1iAk/84b/xlsVKFSyNyLXIj0dhppoE0+CRws7wlzA== +"@solidity-parser/parser@^0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.20.2.tgz#e07053488ed60dae1b54f6fe37bb6d2c5fe146a7" + integrity sha512-rbu0bzwNvMcwAjH86hiEAcOeRI2EeK8zCkHDrFykh/Al8mvJeFmjy3UrE7GYQjNwOgbGUUtCn5/k8CB8zIu7QA== + "@standard-schema/spec@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@standard-schema/spec/-/spec-1.0.0.tgz#f193b73dc316c4170f2e82a881da0f550d551b9c" @@ -5086,6 +5096,11 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" +ajv-errors@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" + integrity sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ== + ajv-formats@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520" @@ -5828,6 +5843,17 @@ better-ajv-errors@^0.8.2: jsonpointer "^5.0.0" leven "^3.1.0" +better-ajv-errors@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/better-ajv-errors/-/better-ajv-errors-2.0.3.tgz#effc8d80b5b9777447159bfec7492daedeb75ecb" + integrity sha512-t1vxUP+vYKsaYi/BbKo2K98nEAZmfi4sjwvmRT8aOPDzPJeAtLurfoIDazVkLILxO4K+Sw4YrLYnBQ46l6pePg== + dependencies: + "@babel/code-frame" "^7.27.1" + "@humanwhocodes/momoa" "^2.0.4" + chalk "^4.1.2" + jsonpointer "^5.0.1" + leven "^3.1.0 < 4" + big-integer@1.6.36: version "1.6.36" resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.36.tgz#78631076265d4ae3555c04f85e7d9d2f3a071a36" @@ -11913,7 +11939,7 @@ jsonparse@^1.2.0, jsonparse@^1.3.1: resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== -jsonpointer@^5.0.0: +jsonpointer@^5.0.0, jsonpointer@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-5.0.1.tgz#2110e0af0900fd37467b5907ecd13a7884a1b559" integrity sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ== @@ -12314,7 +12340,7 @@ levelup@^1.2.1: semver "~5.4.1" xtend "~4.0.0" -leven@^3.1.0: +leven@^3.1.0, "leven@^3.1.0 < 4": version "3.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== @@ -16518,15 +16544,17 @@ solc@^0.4.20: semver "^5.3.0" yargs "^4.7.1" -solhint@^5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/solhint/-/solhint-5.0.3.tgz#b57f6d2534fe09a60f9db1b92e834363edd1cbde" - integrity sha512-OLCH6qm/mZTCpplTXzXTJGId1zrtNuDYP5c2e6snIv/hdRVxPfBBz/bAlL91bY/Accavkayp2Zp2BaDSrLVXTQ== +solhint@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/solhint/-/solhint-6.0.2.tgz#9c78abf3a9d3be10d9886ee058845956dea83915" + integrity sha512-RInN0tz9FVR4eYlyLS0Pk8iJP3WdfVmmMJR9FIUxe9bKHgAPE8OYUXcMd5PGi5fO5BnZw32e0qMYcJZgH9MiBg== dependencies: - "@solidity-parser/parser" "^0.18.0" + "@solidity-parser/parser" "^0.20.2" ajv "^6.12.6" + ajv-errors "^1.0.1" antlr4 "^4.13.1-patch-1" ast-parents "^0.0.1" + better-ajv-errors "^2.0.2" chalk "^4.1.2" commander "^10.0.0" cosmiconfig "^8.0.0" @@ -16538,7 +16566,6 @@ solhint@^5.0.3: lodash "^4.17.21" pluralize "^8.0.0" semver "^7.5.2" - strip-ansi "^6.0.1" table "^6.8.1" text-table "^0.2.0" optionalDependencies: