Fixes forced optimizer settings in external tests.

This commit is contained in:
Erik Kundt 2019-04-01 14:41:27 +02:00
parent a3a60b8eb9
commit c72686b343

View File

@ -150,11 +150,15 @@ function force_solc_settings
local evmVersion="$3"
printLog "Forcing solc settings..."
echo "-------------------------------------"
echo "Config file: $config_file"
echo "Optimizer settings: $settings"
echo "EVM version: $evmVersion"
echo ""
echo "-------------------------------------"
# Forcing the settings should always work by just overwriting the solc object. Forcing them by using a
# dedicated settings objects should only be the fallback.
echo "module.exports['solc'] = { optimizer: $settings, evmVersion: \"$evmVersion\" };" >> "$config_file"
echo "module.exports['compilers']['solc']['settings'] = { optimizer: $settings, evmVersion: \"$evmVersion\" };" >> "$config_file"
}