mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	Merge pull request #10512 from ethereum/external-tests-remove-force-abi-v2
Remove the option for forcing ABIv2 from external tests
This commit is contained in:
		
						commit
						50d5c77197
					
				| @ -41,7 +41,7 @@ function colony_test | |||||||
|     git clone https://github.com/solidity-external-tests/dappsys-monolithic.git -b master_060 dappsys |     git clone https://github.com/solidity-external-tests/dappsys-monolithic.git -b master_060 dappsys | ||||||
|     cd .. |     cd .. | ||||||
| 
 | 
 | ||||||
|     truffle_run_test "$SOLJSON" compile_fn test_fn "NO-FORCE-ABI-V2" |     truffle_run_test "$SOLJSON" compile_fn test_fn | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| external_test ColonyNetworks colony_test | external_test ColonyNetworks colony_test | ||||||
|  | |||||||
| @ -180,20 +180,6 @@ function force_solc_settings | |||||||
|     echo "module.exports['compilers']['solc']['settings'] = { optimizer: $settings, evmVersion: \"$evmVersion\" };" >> "$config_file" |     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 | function verify_compiler_version | ||||||
| { | { | ||||||
|     local solc_version="$1" |     local solc_version="$1" | ||||||
| @ -238,9 +224,6 @@ function truffle_run_test | |||||||
|     local soljson="$1" |     local soljson="$1" | ||||||
|     local compile_fn="$2" |     local compile_fn="$2" | ||||||
|     local test_fn="$3" |     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 |     replace_version_pragmas | ||||||
|     force_solc "$CONFIG" "$DIR" "$soljson" |     force_solc "$CONFIG" "$DIR" "$soljson" | ||||||
| @ -264,10 +247,6 @@ function truffle_run_test | |||||||
|     do |     do | ||||||
|         clean |         clean | ||||||
|         force_solc_settings "$CONFIG" "$optimize" "istanbul" |         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..." |         printLog "Running compile function..." | ||||||
|         $compile_fn |         $compile_fn | ||||||
|  | |||||||
| @ -40,7 +40,7 @@ function ens_test | |||||||
| 
 | 
 | ||||||
|     run_install "$SOLJSON" install_fn |     run_install "$SOLJSON" install_fn | ||||||
| 
 | 
 | ||||||
|     truffle_run_test "$SOLJSON" compile_fn test_fn "NO-FORCE-ABI-V2" |     truffle_run_test "$SOLJSON" compile_fn test_fn | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| external_test Ens ens_test | external_test Ens ens_test | ||||||
|  | |||||||
| @ -43,7 +43,7 @@ function gnosis_safe_test | |||||||
|     run_install "$SOLJSON" install_fn |     run_install "$SOLJSON" install_fn | ||||||
|     replace_libsolc_call |     replace_libsolc_call | ||||||
| 
 | 
 | ||||||
|     truffle_run_test "$SOLJSON" compile_fn test_fn "NO-FORCE-ABI-V2" |     truffle_run_test "$SOLJSON" compile_fn test_fn | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| external_test Gnosis-Safe gnosis_safe_test | external_test Gnosis-Safe gnosis_safe_test | ||||||
|  | |||||||
| @ -36,7 +36,7 @@ function zeppelin_test | |||||||
|     truffle_setup "$SOLJSON" https://github.com/solidity-external-tests/openzeppelin-contracts.git upgrade-0.7.0 |     truffle_setup "$SOLJSON" https://github.com/solidity-external-tests/openzeppelin-contracts.git upgrade-0.7.0 | ||||||
|     run_install "$SOLJSON" install_fn |     run_install "$SOLJSON" install_fn | ||||||
| 
 | 
 | ||||||
|     truffle_run_test "$SOLJSON" compile_fn test_fn "NO-FORCE-ABI-V2" |     truffle_run_test "$SOLJSON" compile_fn test_fn | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| external_test Zeppelin zeppelin_test | external_test Zeppelin zeppelin_test | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user