diff --git a/.gitignore b/.gitignore index 4f1717181..773f09be6 100644 --- a/.gitignore +++ b/.gitignore @@ -38,6 +38,7 @@ emscripten_build/ /docs/_build /docs/_static/robots.txt /deps +/reports # vim stuff [._]*.sw[a-p] diff --git a/test/externalTests/chainlink.sh b/test/externalTests/chainlink.sh index 9f50e1486..249a1254c 100755 --- a/test/externalTests/chainlink.sh +++ b/test/externalTests/chainlink.sh @@ -64,7 +64,7 @@ function chainlink_test # Disable tests that won't pass on the ir presets due to Hardhat heuristics. Note that this also disables # them for other presets but that's fine - we want same code run for benchmarks to be comparable. - # TODO: Remove this when Hardhat adjusts heuristics for IR (https://github.com/nomiclabs/hardhat/issues/2115). + # TODO: Remove this when Hardhat adjusts heuristics for IR (https://github.com/nomiclabs/hardhat/issues/3365). sed -i "s|\(it\)\(('reverts'\)|\1.skip\2|g" test/v0.6/BasicConsumer.test.ts sed -i "s|\(it\)\(('has a reasonable gas cost \[ @skip-coverage \]'\)|\1.skip\2|g" test/v0.6/BasicConsumer.test.ts sed -i "s|\(describe\)\(('#add[^']*'\)|\1.skip\2|g" test/v0.6/Chainlink.test.ts @@ -78,7 +78,7 @@ function chainlink_test sed -i "s|\(context\)\(('when permissions are not set'\)|\1.skip\2|g" test/v0.8/KeeperRegistry.test.ts # In some cases Hardhat does not detect revert reasons properly via IR. - # TODO: Remove this when https://github.com/NomicFoundation/hardhat/issues/2453 gets fixed. + # TODO: Remove this when https://github.com/NomicFoundation/hardhat/issues/3365 gets fixed. sed -i "s|\(it\)\(('does not allow the specified address to start new rounds'\)|\1.skip\2|g" test/v0.6/FluxAggregator.test.ts sed -i "s|\(describe\)\(('when called by a stranger'\)|\1.skip\2|g" test/v0.6/FluxAggregator.test.ts sed -i "s|\(describe\)\(('if the access control is turned on'\)|\1.skip\2|g" test/v0.*/Flags.test.ts diff --git a/test/externalTests/elementfi.sh b/test/externalTests/elementfi.sh index bf68b9adf..b667a4bbc 100755 --- a/test/externalTests/elementfi.sh +++ b/test/externalTests/elementfi.sh @@ -89,7 +89,7 @@ function elementfi_test # Disable tests that won't pass on the ir presets due to Hardhat heuristics. Note that this also disables # them for other presets but that's fine - we want same code run for benchmarks to be comparable. - # TODO: Remove this when Hardhat adjusts heuristics for IR (https://github.com/nomiclabs/hardhat/issues/2115). + # TODO: Remove this when Hardhat adjusts heuristics for IR (https://github.com/nomiclabs/hardhat/issues/3365). sed -i 's|it(\("fails to withdraw more shares than in balance"\)|it.skip(\1|g' test/compoundAssetProxyTest.ts sed -i 's|it(\("should prevent withdrawal of Principal Tokens and Interest Tokens before the tranche expires "\)|it.skip(\1|g' test/trancheTest.ts sed -i 's|it(\("should prevent withdrawal of more Principal Tokens and Interest Tokens than the user has"\)|it.skip(\1|g' test/trancheTest.ts diff --git a/test/externalTests/ens.sh b/test/externalTests/ens.sh index 5cc2a574d..123308538 100755 --- a/test/externalTests/ens.sh +++ b/test/externalTests/ens.sh @@ -69,9 +69,9 @@ function ens_test neutralize_packaged_contracts # In some cases Hardhat does not detect revert reasons properly via IR. - # TODO: Remove this when https://github.com/NomicFoundation/hardhat/issues/2115 gets fixed. + # TODO: Remove this when https://github.com/NomicFoundation/hardhat/issues/3365 gets fixed. sed -i "s|it\(('Does not allow wrapping a name you do not own',\)|it.skip\1|g" test/wrapper/NameWrapper.js - # TODO: Remove this when https://github.com/NomicFoundation/hardhat/issues/2453 gets fixed. + # TODO: Remove this when https://github.com/NomicFoundation/hardhat/issues/3365 gets fixed. sed -i "s|it\(('can set fuses and then burn ability to burn fuses',\)|it.skip\1|g" test/wrapper/NameWrapper.js sed -i "s|it\(('can set fuses and burn canSetResolver and canSetTTL',\)|it.skip\1|g" test/wrapper/NameWrapper.js sed -i "s|it\(('Cannot be called if CANNOT_TRANSFER is burned\.',\)|it.skip\1|g" test/wrapper/NameWrapper.js diff --git a/test/externalTests/euler.sh b/test/externalTests/euler.sh index e26b89248..78e89d147 100755 --- a/test/externalTests/euler.sh +++ b/test/externalTests/euler.sh @@ -63,7 +63,7 @@ function euler_test # Disable tests that won't pass on the ir presets due to Hardhat heuristics. Note that this also disables # them for other presets but that's fine - we want same code run for benchmarks to be comparable. - # TODO: Remove this when https://github.com/NomicFoundation/hardhat/issues/2453 gets fixed. + # TODO: Remove this when https://github.com/NomicFoundation/hardhat/issues/3365 gets fixed. sed -i "/expectError: 'JUNK_UPGRADE_TEST_FAILURE'/d" test/moduleUpgrade.js sed -i "/et\.expect(errMsg)\.to\.contain('e\/collateral-violation');/d" test/flashLoanNative.js @@ -73,10 +73,6 @@ function euler_test force_hardhat_compiler_settings "$config_file" "$(first_word "$SELECTED_PRESETS")" force_hardhat_unlimited_contract_size "$config_file" npm install - - # TODO: Remove this when https://github.com/Uniswap/v3-periphery/issues/313 gets fixed. - npm install @uniswap/v3-periphery@1.4.1 - replace_version_pragmas neutralize_packaged_contracts diff --git a/test/externalTests/gnosis.sh b/test/externalTests/gnosis.sh index 81e5180c6..a6ded27e1 100755 --- a/test/externalTests/gnosis.sh +++ b/test/externalTests/gnosis.sh @@ -71,9 +71,9 @@ function gnosis_safe_test # Disable tests that won't pass on the ir presets due to Hardhat heuristics. Note that this also disables # them for other presets but that's fine - we want same code run for benchmarks to be comparable. - # TODO: Remove this when Hardhat adjusts heuristics for IR (https://github.com/nomiclabs/hardhat/issues/2115). + # TODO: Remove this when Hardhat adjusts heuristics for IR (https://github.com/nomiclabs/hardhat/issues/3365). sed -i "s|\(it\)\(('should not allow to call setup on singleton'\)|\1.skip\2|g" test/core/GnosisSafe.Setup.spec.ts - # TODO: Remove this when https://github.com/NomicFoundation/hardhat/issues/2453 gets fixed. + # TODO: Remove this when https://github.com/NomicFoundation/hardhat/issues/3365 gets fixed. sed -i 's|\(it\)\(("changes the expected storage slot without touching the most important ones"\)|\1.skip\2|g' test/libraries/SignMessageLib.spec.ts sed -i "s|\(it\)\(('can be used only via DELEGATECALL opcode'\)|\1.skip\2|g" test/libraries/SignMessageLib.spec.ts sed -i 's|\(describe\)\(("Upgrade from Safe 1.1.1"\)|\1.skip\2|g' test/migration/UpgradeFromSafe111.spec.ts @@ -82,7 +82,7 @@ function gnosis_safe_test # TODO: Remove this when Gnosis merges https://github.com/gnosis/safe-contracts/pull/394 sed -i "s|\(function isValidSignature(bytes \)calldata\( _data, bytes \)calldata\( _signature)\)|\1memory\2memory\3|g" contracts/handler/CompatibilityFallbackHandler.sol - # TODO: Remove this when https://github.com/NomicFoundation/hardhat/issues/2453 gets fixed. + # TODO: Remove this when https://github.com/NomicFoundation/hardhat/issues/3365 gets fixed. sed -i "s|it\(('should enforce delegatecall'\)|it.skip\1|g" test/accessors/SimulateTxAccessor.spec.ts sed -i "s|it\(('can only be called from Safe itself'\)|it.skip\1|g" test/libraries/Migration.spec.ts sed -i "s|it\(('should enforce delegatecall to MultiSend'\)|it.skip\1|g" test/libraries/MultiSend.spec.ts @@ -122,10 +122,6 @@ function gnosis_safe_test # TODO: Remove when https://github.com/safe-global/safe-contracts/issues/436 is resolved. npx npm install @nomiclabs/hardhat-ethers@2.1.0 - # Hardhat 2.9.5 introduced a bug with handling padded arguments to getStorageAt(). - # TODO: Remove when https://github.com/NomicFoundation/hardhat/issues/2709 is fixed. - npx npm install hardhat@2.9.4 - replace_version_pragmas [[ $BINARY_TYPE == solcjs ]] && force_solc_modules "${DIR}/solc/dist" diff --git a/test/externalTests/gp2.sh b/test/externalTests/gp2.sh index ad75f83bd..9e9ee72af 100755 --- a/test/externalTests/gp2.sh +++ b/test/externalTests/gp2.sh @@ -99,7 +99,7 @@ function gp2_test # Disable tests that won't pass on the ir presets due to Hardhat heuristics. Note that this also disables # them for other presets but that's fine - we want same code run for benchmarks to be comparable. - # TODO: Remove this when Hardhat adjusts heuristics for IR (https://github.com/nomiclabs/hardhat/issues/2115). + # TODO: Remove this when Hardhat adjusts heuristics for IR (https://github.com/nomiclabs/hardhat/issues/3365). sed -i 's|it\(("should revert when encoding invalid flags"\)|it.skip\1|g' test/GPv2Trade.test.ts replace_version_pragmas diff --git a/test/externalTests/perpetual-pools.sh b/test/externalTests/perpetual-pools.sh index a389e833f..18fb308af 100755 --- a/test/externalTests/perpetual-pools.sh +++ b/test/externalTests/perpetual-pools.sh @@ -61,7 +61,7 @@ function perpetual_pools_test # Disable tests that won't pass on the ir presets due to Hardhat heuristics. Note that this also disables # them for other presets but that's fine - we want same code run for benchmarks to be comparable. - # TODO: Remove this when Hardhat adjusts heuristics for IR (https://github.com/nomiclabs/hardhat/issues/2115). + # TODO: Remove this when Hardhat adjusts heuristics for IR (https://github.com/nomiclabs/hardhat/issues/3365). sed -i 's|\(it\)\(("Should not allow commits that are too large"\)|\1.skip\2|g' test/PoolCommitter/commit.spec.ts sed -i 's|\(it\)\(("Should not allow for too many commitments (that bring amount over a user'\''s balance)"\)|\1.skip\2|g' test/PoolCommitter/commit.spec.ts diff --git a/test/externalTests/pool-together.sh b/test/externalTests/pool-together.sh index 80a8f4ad0..14c7853f4 100755 --- a/test/externalTests/pool-together.sh +++ b/test/externalTests/pool-together.sh @@ -59,7 +59,7 @@ function pool_together_test setup_solc "$DIR" "$BINARY_TYPE" "$BINARY_PATH" download_project "$repo" "$ref_type" "$ref" "$DIR" - # TODO: Remove this when https://github.com/NomicFoundation/hardhat/issues/2453 gets fixed. + # TODO: Remove this when https://github.com/NomicFoundation/hardhat/issues/3365 gets fixed. sed -i "s|it\(('should fail to return value if value passed does not fit in [0-9]\+ bits'\)|it.skip\1|g" test/libraries/ExtendedSafeCast.test.ts sed -i "s|it\(('should require an rng to be requested'\)|it.skip\1|g" test/DrawBeacon.test.ts diff --git a/test/externalTests/prb-math.sh b/test/externalTests/prb-math.sh index 98a73627f..78a39519e 100755 --- a/test/externalTests/prb-math.sh +++ b/test/externalTests/prb-math.sh @@ -71,7 +71,7 @@ function prb_math_test # Disable tests that won't pass on the ir presets due to Hardhat heuristics. Note that this also disables # them for other presets but that's fine - we want same code run for benchmarks to be comparable. - # TODO: Remove this when Hardhat adjusts heuristics for IR (https://github.com/nomiclabs/hardhat/issues/2115). + # TODO: Remove this when Hardhat adjusts heuristics for IR (https://github.com/nomiclabs/hardhat/issues/3365). pushd test/contracts/prbMathUd60x18/pure/ sed -i 's|context(\("when the sum overflows"\)|context.skip(\1|g' add.test.ts sed -i 's|context(\("when the sum does not overflow"\)|context.skip(\1|g' add.test.ts diff --git a/test/externalTests/trident.sh b/test/externalTests/trident.sh index 401446f99..b5d48b500 100755 --- a/test/externalTests/trident.sh +++ b/test/externalTests/trident.sh @@ -89,7 +89,7 @@ function trident_test sed -i 's|IStrategy(0)|IStrategy(address(0))|g' contracts/flat/BentoBoxV1Flat.sol find contracts -name "*.sol" -exec sed -i -e 's/^\(\s*\)\(assembly\)/\1\/\/\/ @solidity memory-safe-assembly\n\1\2/' '{}' \; - # TODO: Remove this when https://github.com/NomicFoundation/hardhat/issues/2453 gets fixed. + # TODO: Remove this when https://github.com/NomicFoundation/hardhat/issues/3365 gets fixed. sed -i 's|it\(("Reverts on direct deployment via factory"\)|it.skip\1|g' test/MasterDeployer.test.ts # @sushiswap/core package contains contracts that get built with 0.6.12 and fail our compiler diff --git a/test/externalTests/uniswap.sh b/test/externalTests/uniswap.sh index 5da068df8..8b07aee84 100755 --- a/test/externalTests/uniswap.sh +++ b/test/externalTests/uniswap.sh @@ -61,7 +61,7 @@ function uniswap_test # Disable tests that won't pass on the ir presets due to Hardhat heuristics. Note that this also disables # them for other presets but that's fine - we want same code run for benchmarks to be comparable. - # TODO: Remove this when https://github.com/NomicFoundation/hardhat/issues/2115 gets fixed. + # TODO: Remove this when https://github.com/NomicFoundation/hardhat/issues/3365 gets fixed. sed -i "s|it\(('underpay zero for one and exact in',\)|it.skip\1|g" test/UniswapV3Pool.spec.ts sed -i "s|it\(('pay in the wrong token zero for one and exact in',\)|it.skip\1|g" test/UniswapV3Pool.spec.ts sed -i "s|it\(('underpay zero for one and exact out',\)|it.skip\1|g" test/UniswapV3Pool.spec.ts diff --git a/test/externalTests/zeppelin.sh b/test/externalTests/zeppelin.sh index fafa23ffb..27198a8f0 100755 --- a/test/externalTests/zeppelin.sh +++ b/test/externalTests/zeppelin.sh @@ -63,7 +63,7 @@ function zeppelin_test # Disable tests that won't pass on the ir presets due to Hardhat heuristics. Note that this also disables # them for other presets but that's fine - we want same code run for benchmarks to be comparable. - # TODO: Remove this when Hardhat adjusts heuristics for IR (https://github.com/nomiclabs/hardhat/issues/2115). + # TODO: Remove this when Hardhat adjusts heuristics for IR (https://github.com/nomiclabs/hardhat/issues/3365). pushd test/utils/ sed -i "s|it(\('reverts \)|it.skip(\1|g" math/SafeMath.test.js sed -i "s|it(\('reverts \)|it.skip(\1|g" math/SignedSafeMath.test.js @@ -75,7 +75,7 @@ function zeppelin_test # In some cases Hardhat does not detect revert reasons properly via IR. - # TODO: Remove this when https://github.com/NomicFoundation/hardhat/issues/2453 gets fixed. + # TODO: Remove this when https://github.com/NomicFoundation/hardhat/issues/3365 gets fixed. sed -i "s|it(\('reverts if the current value is 0'\)|it.skip(\1|g" test/utils/Counters.test.js sed -i "s|it(\('prevent unauthorized maintenance'\)|it.skip(\1|g" test/governance/TimelockController.test.js sed -i "s|it(\('cannot cancel invalid operation'\)|it.skip(\1|g" test/governance/TimelockController.test.js @@ -123,7 +123,7 @@ function zeppelin_test - # TODO: Remove this when https://github.com/NomicFoundation/hardhat/issues/2115 gets fixed. + # TODO: Remove this when https://github.com/NomicFoundation/hardhat/issues/3365 gets fixed. sed -i "s|describe\(('Polygon-Child'\)|describe.skip\1|g" test/crosschain/CrossChainEnabled.test.js sed -i "s|it(\('revert with invalid multi proof #2'\)|it.skip(\1|g" test/utils/cryptography/MerkleProof.test.js sed -i "s|describe(\('to a receiver contract that panics'\)|describe.skip(\1|g" test/token/ERC721/ERC721.behavior.js