mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Remove the option for forcing ABIv2 from external tests
This commit is contained in:
@@ -180,20 +180,6 @@ function force_solc_settings
|
||||
echo "module.exports['compilers']['solc']['settings'] = { optimizer: $settings, evmVersion: \"$evmVersion\" };" >> "$config_file"
|
||||
}
|
||||
|
||||
function force_abi_v2
|
||||
{
|
||||
# Add "pragma abi coder v2" to all files.
|
||||
printLog "Forcibly enabling abi coder v2..."
|
||||
find contracts test -name '*.sol' -type f -print0 | \
|
||||
while IFS= read -r -d '' file
|
||||
do
|
||||
# Only add the pragma if it is not already there.
|
||||
if grep -q -v 'pragma abicoder v2' "$file"; then
|
||||
sed -i -e '1 i pragma abicoder v2;' "$file"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
function verify_compiler_version
|
||||
{
|
||||
local solc_version="$1"
|
||||
@@ -238,9 +224,6 @@ function truffle_run_test
|
||||
local soljson="$1"
|
||||
local compile_fn="$2"
|
||||
local test_fn="$3"
|
||||
local force_abi_v2_flag="$4"
|
||||
|
||||
test "$force_abi_v2_flag" = "FORCE-ABI-V2" || test "$force_abi_v2_flag" = "NO-FORCE-ABI-V2"
|
||||
|
||||
replace_version_pragmas
|
||||
force_solc "$CONFIG" "$DIR" "$soljson"
|
||||
@@ -264,10 +247,6 @@ function truffle_run_test
|
||||
do
|
||||
clean
|
||||
force_solc_settings "$CONFIG" "$optimize" "istanbul"
|
||||
# Force abi coder v2 in the last step. Has to be the last because code is modified.
|
||||
if [ "$force_abi_v2_flag" = "FORCE-ABI-V2" ]; then
|
||||
[[ "$optimize" =~ yul ]] && force_abi_v2
|
||||
fi
|
||||
|
||||
printLog "Running compile function..."
|
||||
$compile_fn
|
||||
|
||||
Reference in New Issue
Block a user