-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use specific hardhat version on openzeppelin and gp2 external tests (#…
- Loading branch information
Showing
3 changed files
with
19 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,6 +66,15 @@ function gp2_test | |
force_hardhat_compiler_settings "$config_file" "$(first_word "$SELECTED_PRESETS")" "$config_var" | ||
force_hardhat_unlimited_contract_size "$config_file" "$config_var" | ||
yarn | ||
# We require to install hardhat 2.20.0 due to support for evm version cancun, otherwise we get the following error: | ||
# Invalid value {"blockGasLimit":12500000,"hardfork":"cancun","allowUnlimitedContractSize":true} for HardhatConfig.networks.hardhat - Expected a value of type HardhatNetworkConfig. | ||
# See: https://github.com/NomicFoundation/hardhat/issues/4176 | ||
yarn add [email protected] | ||
|
||
# Ignore bench directory which fails to compile with current hardhat and ethers versions. | ||
# bench/trace/gas.ts:123:19 - error TS2339: Property 'equals' does not exist on type 'Uint8Array'. | ||
jq '. + {"exclude": ["bench"]}' tsconfig.json > temp.json | ||
mv temp.json tsconfig.json | ||
|
||
# Remove the config section that requires an Etherscan key. We don't need it just to run tests. | ||
sed -i '/^ etherscan: {$/,/^ },$/d' hardhat.config.ts | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,6 +95,8 @@ function zeppelin_test | |
sed -i "s|it(\('calling upgradeToAndCall on the implementation reverts'\)|it.skip(\1|g" test/proxy/utils/UUPSUpgradeable.test.js | ||
sed -i "s|it(\('calling upgradeTo from a contract that is not an ERC1967 proxy\)|it.skip(\1|g" test/proxy/utils/UUPSUpgradeable.test.js | ||
sed -i "s|it(\('calling upgradeToAndCall from a contract that is not an ERC1967 proxy\)|it.skip(\1|g" test/proxy/utils/UUPSUpgradeable.test.js | ||
sed -i "s|it(\('rejects overflow'\)|it.skip(\1|g" test/token/ERC20/ERC20.test.js | ||
sed -i "s|it(\('decimals overflow'\)|it.skip(\1|g" test/token/ERC20/extensions/ERC4626.test.js | ||
|
||
# Here only the testToInt(248) and testToInt(256) cases fail so change the loop range to skip them | ||
sed -i "s|range(8, 256, 8)\(.forEach(bits => testToInt(bits));\)|range(8, 240, 8)\1|" test/utils/math/SafeCast.test.js | ||
|
@@ -103,6 +105,10 @@ function zeppelin_test | |
force_hardhat_compiler_binary "$config_file" "$BINARY_TYPE" "$BINARY_PATH" | ||
force_hardhat_compiler_settings "$config_file" "$(first_word "$SELECTED_PRESETS")" | ||
npm install | ||
# We require to install hardhat 2.20.0 due to support for evm version cancun, otherwise we get the following error: | ||
# Invalid value {"blockGasLimit":10000000,"allowUnlimitedContractSize":true,"hardfork":"cancun"} for HardhatConfig.networks.hardhat - Expected a value of type HardhatNetworkConfig. | ||
# See: https://github.com/NomicFoundation/hardhat/issues/4176 | ||
npm install [email protected] | ||
|
||
replace_version_pragmas | ||
for preset in $SELECTED_PRESETS; do | ||
|