Skip to content

Commit 25ec75c

Browse files
nikola-maticmatheusaaguiar
authored andcommitted
Set blockGasLimit to 2^24 for external tests
1 parent cd1f865 commit 25ec75c

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

scripts/externalTests/common.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,12 @@ function force_hardhat_compiler_settings
334334
echo "module.exports.solidity = ${compiler_settings};"
335335
echo "module.exports.networks.hardhat = module.exports.networks.hardhat || { hardfork: '${evm_version}' }"
336336
echo "module.exports.networks.hardhat.hardfork = '${evm_version}'"
337+
if [[ $evm_version == "osaka" ]]; then
338+
# Transaction gas limit introduced by EIP-7825; the default value is 30_000_000
339+
# and should be automatically handled by EDR - however, EDR with the relevant change
340+
# was not released in time.
341+
echo "module.exports.networks.hardhat.blockGasLimit = 16_777_216"
342+
fi
337343
else
338344
[[ $config_file == *\.ts ]] || assertFail
339345
[[ $config_var_name != "" ]] || assertFail
@@ -342,6 +348,12 @@ function force_hardhat_compiler_settings
342348
echo "${config_var_name}.solidity = {compilers: [${compiler_settings}]};"
343349
echo "${config_var_name}.networks!.hardhat = ${config_var_name}.networks!.hardhat ?? { hardfork: '${evm_version}' };"
344350
echo "${config_var_name}.networks!.hardhat!.hardfork = '${evm_version}'"
351+
if [[ $evm_version == "osaka" ]]; then
352+
# Transaction gas limit introduced by EIP-7825; the default value is 30_000_000
353+
# and should be automatically handled by EDR - however, EDR with the relevant change
354+
# was not released in time.
355+
echo "${config_var_name}.networks!.hardhat!.blockGasLimit = 16_777_216"
356+
fi
345357
fi >> "$config_file"
346358
}
347359

test/externalTests/gp2.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ function gp2_test
6767
force_hardhat_unlimited_contract_size "$config_file" "$config_var"
6868
yarn
6969
# Hardhat 3.0+ breaks the test suite
70-
70+
# v2.27.1 is the last v2 Hardhat (introduces Osaka support)
71+
7172

7273
# Ignore bench directory which fails to compile with current hardhat and ethers versions.
7374
# bench/trace/gas.ts:123:19 - error TS2339: Property 'equals' does not exist on type 'Uint8Array'.

test/externalTests/pool-together.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ function pool_together_test
6767
force_hardhat_compiler_settings "$config_file" "$(first_word "$SELECTED_PRESETS")" "$config_var"
6868
yarn install
6969
# Hardhat 3.0+ breaks the test suite
70-
70+
# v2.27.1 is the last v2 Hardhat (introduces Osaka support)
71+
7172

7273
# These come with already compiled artifacts. We want them recompiled with latest compiler.
7374
rm -r node_modules/@pooltogether/yield-source-interface/artifacts/

0 commit comments

Comments
 (0)