File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -233,14 +233,36 @@ function force_truffle_compiler_settings
233
233
function name_hardhat_default_export
234
234
{
235
235
local config_file=" $1 "
236
- local config_var_name=" $2 "
237
236
238
237
local import=" import {HardhatUserConfig} from 'hardhat/types';"
239
238
local config=" const config: HardhatUserConfig = {"
240
239
sed -i " s|^\s*export\s*default\s*{|${import} \n${config} |g" " $config_file "
241
240
echo " export default config;" >> " $config_file "
242
241
}
243
242
243
+ function force_hardhat_timeout
244
+ {
245
+ local config_file=" $1 "
246
+ local config_var_name=" $2 "
247
+ local new_timeout=" $3 "
248
+
249
+ printLog " Configuring Hardhat..."
250
+ echo " -------------------------------------"
251
+ echo " Timeout: ${new_timeout} "
252
+ echo " -------------------------------------"
253
+
254
+ if [[ $config_file == * \. js ]]; then
255
+ [[ $config_var_name == " " ]] || assertFail
256
+ echo " module.exports.mocha = module.exports.mocha || {timeout: ${new_timeout} }"
257
+ echo " module.exports.mocha.timeout = ${new_timeout} "
258
+ else
259
+ [[ $config_file == * \. ts ]] || assertFail
260
+ [[ $config_var_name != " " ]] || assertFail
261
+ echo " ${config_var_name} .mocha = ${config_var_name} .mocha ?? {timeout: ${new_timeout} };"
262
+ echo " ${config_var_name} .mocha!.timeout = ${new_timeout} "
263
+ fi >> " $config_file "
264
+ }
265
+
244
266
function force_hardhat_compiler_binary
245
267
{
246
268
local config_file=" $1 "
Original file line number Diff line number Diff line change @@ -63,6 +63,8 @@ function euler_test
63
63
force_hardhat_compiler_binary " $config_file " " $BINARY_TYPE " " $BINARY_PATH "
64
64
force_hardhat_compiler_settings " $config_file " " $( first_word " $SELECTED_PRESETS " ) "
65
65
force_hardhat_unlimited_contract_size " $config_file "
66
+ # Workaround for the timeout that's too short for unoptimized code (https://github.com/ethereum/solidity/pull/12765)
67
+ force_hardhat_timeout " $config_file " " " 100000
66
68
npm install
67
69
68
70
replace_version_pragmas
You can’t perform that action at this time.
0 commit comments