├── cmake └── toolchains │ └── default.cmake ├── test ├── cmdlineTests │ ├── hashes │ │ └── args │ ├── stdin │ │ ├── args │ │ └── stdin │ ├── error_codes │ │ ├── exit │ │ ├── args │ │ └── input.sol │ ├── exp_base_literal │ │ ├── err │ │ └── args │ ├── too_long_line │ │ └── exit │ ├── dup_opt_peephole │ │ └── args │ ├── function_debug_info │ │ ├── err │ │ └── args │ ├── metadata │ │ ├── args │ │ └── input.sol │ ├── no_import_callback │ │ ├── exit │ │ ├── contract_2.sol │ │ ├── args │ │ └── contract_1.sol │ ├── require_overload │ │ └── exit │ ├── standard_file_not_found │ │ ├── exit │ │ ├── args │ │ └── err │ ├── strict_asm_jump │ │ ├── exit │ │ ├── args │ │ ├── input.yul │ │ └── err │ ├── strict_asm_only_cr │ │ ├── exit │ │ ├── input.yul │ │ ├── args │ │ └── err │ ├── abiencoderv2_no_warning │ │ ├── err │ │ ├── args │ │ └── output │ ├── constant_optimizer_yul │ │ ├── err │ │ └── args │ ├── import_asm_json_no_value │ │ ├── exit │ │ ├── args │ │ ├── stdin │ │ └── err │ ├── pretty_json_indent_only │ │ ├── output │ │ ├── no-pretty-print │ │ └── args │ ├── stop_after_parsing_abi │ │ ├── exit │ │ ├── args │ │ └── err │ ├── too_long_line_edge_in │ │ └── exit │ ├── too_long_line_edge_out │ │ └── exit │ ├── too_long_line_left_short │ │ └── exit │ ├── too_long_line_multiline │ │ └── exit │ ├── function_debug_info_via_yul │ │ ├── err │ │ └── args │ ├── import_asm_json_invalid_value │ │ ├── exit │ │ └── args │ ├── keccak_optimization_deploy_code │ │ ├── err │ │ └── args │ ├── keccak_optimization_low_runs │ │ ├── err │ │ └── args │ ├── model_checker_solvers_wrong │ │ ├── exit │ │ ├── args │ │ └── err │ ├── model_checker_solvers_wrong2 │ │ ├── exit │ │ ├── err │ │ └── args │ ├── model_checker_targets_error │ │ ├── exit │ │ ├── args │ │ └── err │ ├── pretty_json_standard │ │ ├── no-pretty-print │ │ ├── args │ │ └── output.json │ ├── too_long_line_right_short │ │ └── exit │ ├── yul_optimizer_steps_disabled │ │ ├── exit │ │ └── args │ ├── yul_verbatim │ │ └── args │ ├── asm_json │ │ └── args │ ├── asm_json_no_pretty_print │ │ └── args │ ├── ast_json_import_wrong_evmVersion │ │ ├── exit │ │ └── args │ ├── import_asm_json_non_unique_sources │ │ ├── exit │ │ ├── args │ │ └── err │ ├── import_asm_json_unrecognized_field │ │ ├── exit │ │ ├── args │ │ └── stdin │ ├── import_asm_json_untagged_jumpdest │ │ ├── exit │ │ ├── args │ │ └── err │ ├── linker_mode_invalid_option_optimize │ │ ├── input.bin │ │ ├── exit │ │ ├── err │ │ └── args │ ├── model_checker_ext_calls_empty_arg │ │ ├── exit │ │ ├── args │ │ └── err │ ├── model_checker_ext_calls_wrong_arg │ │ ├── exit │ │ ├── args │ │ └── err │ ├── model_checker_invariants_wrong │ │ ├── exit │ │ ├── args │ │ └── err │ ├── optimizer_user_yul │ │ └── args │ ├── pretty_json_standard_indent │ │ ├── no-pretty-print │ │ └── args │ ├── standard_invalid_option_optimize │ │ ├── exit │ │ ├── input.json │ │ ├── args │ │ └── err │ ├── standard_json_no_pretty_print │ │ ├── no-pretty-print │ │ └── output.json │ ├── standard_metadata │ │ ├── args │ │ └── in.sol │ ├── strict_asm_code_generation_error │ │ ├── exit │ │ ├── args │ │ └── err │ ├── strict_asm_options_in_non_asm_mode │ │ ├── exit │ │ ├── args │ │ └── err │ ├── strict_asm_output_selection_invalid │ │ ├── input.yul │ │ └── exit │ ├── too_long_line_both_sides_short │ │ └── exit │ ├── viair_abicoder_v1 │ │ └── args │ ├── import_asm_json_invalid_data_not_hex │ │ ├── exit │ │ ├── args │ │ └── err │ ├── import_asm_json_invalid_data_not_object │ │ ├── exit │ │ ├── args │ │ └── err │ ├── import_asm_json_optimize_not_supported │ │ ├── exit │ │ ├── args │ │ └── err │ ├── import_asm_json_out_of_range_data_index │ │ ├── exit │ │ └── args │ ├── linker_mode_invalid_option_optimize_runs │ │ ├── input.bin │ │ ├── exit │ │ ├── err │ │ └── args │ ├── linker_mode_invalid_option_optimize_yul │ │ ├── exit │ │ ├── input.bin │ │ ├── err │ │ └── args │ ├── linker_mode_output_selection_invalid │ │ ├── exit │ │ └── input.bin │ ├── model_checker_contracts_empty_contract │ │ ├── exit │ │ ├── args │ │ └── err │ ├── model_checker_contracts_empty_source │ │ ├── exit │ │ ├── err │ │ └── args │ ├── model_checker_contracts_source_missing │ │ ├── exit │ │ ├── args │ │ └── err │ ├── name_simplifier │ │ └── args │ ├── no_cbor_metadata_with_metadata_hash │ │ ├── exit │ │ ├── args │ │ └── err │ ├── optimizer_inliner_add │ │ └── args │ ├── optimizer_inliner_inc │ │ └── args │ ├── revert_strings │ │ └── args │ ├── standard_cli_output_selection_invalid │ │ ├── exit │ │ └── input.json │ ├── standard_invalid_option_no_optimize_yul │ │ ├── exit │ │ ├── input.json │ │ ├── args │ │ └── err │ ├── standard_invalid_option_optimize_runs │ │ ├── exit │ │ ├── input.json │ │ ├── args │ │ └── err │ ├── standard_invalid_option_optimize_yul │ │ ├── exit │ │ ├── input.json │ │ ├── args │ │ └── err │ ├── standard_wrong_type_root │ │ └── input.json │ ├── strict_asm_evm_version_byzantium │ │ ├── input.yul │ │ ├── args │ │ └── err │ ├── strict_asm_invalid_option_output_dir │ │ ├── exit │ │ ├── input.yul │ │ ├── args │ │ └── err │ ├── strict_asm_warning_and_error_optimize │ │ ├── exit │ │ └── args │ ├── yul_optimizer_steps_nesting_too_deep │ │ ├── exit │ │ └── err │ ├── evm_version_byzantium │ │ ├── args │ │ └── input.sol │ ├── import_asm_json_invalid_jumptype_instruction │ │ ├── exit │ │ └── args │ ├── import_asm_json_missing_subobject_indices │ │ ├── exit │ │ └── args │ ├── ir_compiler_subobjects │ │ └── args │ ├── linker_mode_invalid_option_no_optimize_yul │ │ ├── exit │ │ ├── input.bin │ │ ├── err │ │ └── args │ ├── linker_mode_invalid_option_yul_optimizations │ │ ├── exit │ │ ├── input.bin │ │ ├── err │ │ └── args │ ├── model_checker_bmc_loop_iterations_invalid_arg │ │ ├── exit │ │ ├── input.sol │ │ ├── args │ │ └── err │ ├── model_checker_bmc_loop_iterations_no_argument │ │ ├── exit │ │ ├── input.sol │ │ └── args │ ├── model_checker_contracts_contract_missing │ │ └── exit │ ├── model_checker_contracts_one_contract_missing │ │ └── exit │ ├── model_checker_print_query_superflous_solver │ │ ├── exit │ │ ├── err │ │ └── args │ ├── object_compiler │ │ └── args │ ├── optimize_full_storage_write │ │ └── args │ ├── optimizer_BlockDeDuplicator │ │ └── args │ ├── optimizer_inliner_multireturn │ │ └── args │ ├── require_with_error_ir │ │ └── args │ ├── require_with_string_ir │ │ └── args │ ├── standard_invalid_option_yul_optimizations │ │ ├── exit │ │ ├── input.json │ │ ├── args │ │ └── err │ ├── strict_asm_asm_json_arbitrary_source_index │ │ ├── exit │ │ └── args │ ├── strict_asm_debug_info_print_snippet_only │ │ ├── exit │ │ ├── args │ │ └── err │ ├── strict_asm_evm_version_constantinople │ │ ├── input.yul │ │ └── args │ ├── structured_documentation_source_location │ │ └── exit │ ├── yul_optimizer_steps_invalid_abbreviation │ │ ├── exit │ │ ├── args │ │ └── err │ ├── yul_verbatim_msize │ │ └── args │ ├── asm_json_import_sourcelist_with_null_elements │ │ ├── exit │ │ ├── args │ │ └── err │ ├── combined_json_no_pretty_print │ │ ├── args │ │ ├── input.sol │ │ └── output │ ├── debug_info_in_yul_and_evm_asm_print_all_and_none │ │ ├── exit │ │ ├── input.sol │ │ ├── err │ │ └── args │ ├── debug_info_in_yul_and_evm_asm_print_snippet_only │ │ ├── exit │ │ ├── args │ │ └── err │ ├── events_in_abi │ │ └── args │ ├── linking_strict_assembly_duplicate_library_name │ │ ├── exit │ │ └── err │ ├── model_checker_engine_all │ │ └── args │ ├── model_checker_engine_bmc │ │ └── args │ ├── model_checker_engine_chc │ │ └── args │ ├── model_checker_print_query_no_smtlib2_solver_bmc │ │ ├── exit │ │ ├── err │ │ └── args │ ├── model_checker_print_query_no_smtlib2_solver_chc │ │ ├── exit │ │ ├── err │ │ └── args │ ├── optimizer_array_sload │ │ └── args │ ├── standard_no_import_callback │ │ ├── args │ │ └── B.sol │ ├── standard_outputs_on_parsing_error │ │ └── args │ ├── standard_yul_code_generation_error │ │ └── args │ ├── standard_yul_debug_info_print_all │ │ └── args │ ├── standard_yul_debug_info_print_none │ │ └── args │ ├── standard_yul_embedded_object_name │ │ └── output.json │ ├── standard_yul_invalid_object_name │ │ └── output.json │ ├── standard_yul_single_file_via_urls │ │ ├── args │ │ └── input.json │ ├── strict_asm_warning │ │ └── args │ ├── yul_optimizer_steps_unbalanced_closing_bracket │ │ ├── exit │ │ ├── args │ │ └── err │ ├── yul_optimizer_steps_unbalanced_opening_bracket │ │ ├── exit │ │ ├── args │ │ └── err │ ├── abi_via_ir │ │ └── args │ ├── evm_version_constantinople │ │ ├── args │ │ ├── input.sol │ │ └── err │ ├── model_checker_contracts_all │ │ └── args │ ├── model_checker_engine_none │ │ └── args │ ├── optimizer_inliner_call_from_constructor │ │ └── args │ ├── optimizer_inliner_dynamic_reference │ │ └── args │ ├── standard_import_asm_json_no_output_selection │ │ └── output.json │ ├── standard_outputs_on_analysis_error_fatal │ │ └── args │ ├── standard_outputs_on_compilation_error │ │ └── args │ ├── standard_yul_evm_version_constantinople │ │ └── output.json │ ├── yul_function_name_clashes │ │ └── args │ ├── import_asm_json_verbatim │ │ └── args │ ├── import_asm_json_yul_subobjects │ │ └── args │ ├── ir_compiler_inheritance_nosubobjects │ │ └── args │ ├── ir_with_assembly_no_memoryguard_creation │ │ └── args │ ├── ir_with_assembly_no_memoryguard_runtime │ │ └── args │ ├── model_checker_solvers_z3_implicit │ │ └── args │ ├── no_cbor_metadata │ │ ├── args │ │ └── output │ ├── standard_outputs_on_analysis_error_non_fatal │ │ └── args │ ├── standard_stop_after_parsing_ast_requested │ │ ├── args │ │ └── in.sol │ ├── standard_yul_debug_info_print_location_only │ │ └── args │ ├── standard_yul_debug_info_print_snippet_only │ │ └── args │ ├── storage_layout_user_defined │ │ ├── args │ │ └── err │ ├── storage_layout_user_defined_no_pretty_print │ │ ├── args │ │ └── input.sol │ ├── yul_function_name_clashes_different_params │ │ └── args │ ├── ast_compact_json_no_pretty_json │ │ ├── args │ │ └── input.sol │ ├── debug_info_in_yul_snippet_escaping │ │ └── args │ ├── import_asm_json_yul_more_subobjects │ │ └── args │ ├── ir_subobject_order │ │ └── args │ ├── ir_unoptimized_with_optimize │ │ ├── args │ │ └── input.sol │ ├── model_checker_divModSlacks_default_all │ │ └── args │ ├── model_checker_divModSlacks_default_bmc │ │ └── args │ ├── model_checker_divModSlacks_default_chc │ │ └── args │ ├── model_checker_show_unproved_default_bmc │ │ └── args │ ├── model_checker_show_unproved_default_chc │ │ └── args │ ├── optimizer_enabled_invalid_yul_optimizer_enabled_and_disabled │ │ ├── exit │ │ ├── args │ │ ├── input.sol │ │ └── err │ ├── optimizer_inliner_dynamic_reference_constructor │ │ └── args │ ├── standard_debug_info_in_yul_and_evm_asm_print_all │ │ └── args │ ├── standard_debug_info_in_yul_and_evm_asm_print_none │ │ └── args │ ├── standard_stop_after_parsing_bytecode_requested │ │ └── args │ ├── strict_asm_debug_info_print_all │ │ └── args │ ├── strict_asm_optimizer_invalid_yul_optimizer_enabled_and_disabled │ │ ├── exit │ │ ├── input.yul │ │ ├── args │ │ └── err │ ├── viair_subobject_optimization │ │ └── args │ ├── viair_subobjects │ │ └── args │ ├── yul_optimizer_disabled_sequence_empty │ │ ├── args │ │ └── input.sol │ ├── combined_json_abi │ │ ├── args │ │ └── input.sol │ ├── ir_optimized_with_optimize │ │ ├── args │ │ └── input.sol │ ├── model_checker_show_proved_safe_default_bmc │ │ └── args │ ├── model_checker_show_proved_safe_default_chc │ │ └── args │ ├── model_checker_show_unsupported_default_bmc │ │ └── args │ ├── model_checker_show_unsupported_default_chc │ │ └── args │ ├── no_contract_combined_json │ │ ├── args │ │ └── input.sol │ ├── standard_stop_after_parsing_non_binary_output_requested │ │ └── args │ ├── strict_asm_debug_info_print_none │ │ └── args │ ├── strict_asm_msize_without_optimizer │ │ └── args │ ├── strict_asm_output_selection_asm_only │ │ ├── args │ │ └── input.yul │ ├── strict_asm_output_selection_bin_only │ │ ├── args │ │ └── input.yul │ ├── strict_asm_warning_optimize │ │ └── args │ ├── import_asm_json_difficulty_prevrandao │ │ ├── args │ │ ├── output │ │ └── stdin │ ├── import_asm_json_hex_subassembly_indices │ │ └── args │ ├── import_asm_json_random_order_data_index │ │ └── args │ ├── model_checker_show_unproved_default_all_engines │ │ └── args │ ├── standard_debug_info_in_yul_and_evm_asm_print_location_only │ │ └── args │ ├── standard_debug_info_in_yul_and_evm_asm_print_snippet_only │ │ └── args │ ├── standard_outputs_on_analysis_error_fatal_after_current_step │ │ └── args │ ├── transient_storage_layout │ │ └── args │ ├── combined_json_with_devdoc │ │ └── args │ ├── combined_json_with_userdoc │ │ └── args │ ├── ir_unoptimized_with_optimize_via_ir │ │ ├── args │ │ └── input.sol │ ├── model_checker_show_proved_safe_default_all_engines │ │ └── args │ ├── model_checker_show_unsupported_default_all_engines │ │ └── args │ ├── model_checker_solvers_eld │ │ └── args │ ├── model_checker_solvers_z3 │ │ └── args │ ├── model_checker_timeout_all │ │ └── args │ ├── model_checker_timeout_bmc │ │ └── args │ ├── model_checker_timeout_chc │ │ └── args │ ├── strict_asm_debug_info_print_location_only │ │ └── args │ ├── strict_asm_msize_with_optimizer │ │ └── args │ ├── viair_msize_without_optimizer │ │ └── args │ ├── ast_ir │ │ ├── args │ │ └── input.sol │ ├── model_checker_invariants_all │ │ └── args │ ├── model_checker_solvers_cvc5 │ │ └── args │ ├── model_checker_targets_all_bmc │ │ └── args │ ├── model_checker_targets_all_chc │ │ └── args │ ├── strict_asm_warning_optimize_unreachable │ │ └── args │ ├── yul_cfg_json_export │ │ └── args │ ├── yul_optimize_runs │ │ └── args │ ├── yul_optimizer_steps │ │ └── args │ ├── yul_optimizer_steps_short_sequence │ │ └── args │ ├── model_checker_solvers_cvc5_eld │ │ └── args │ ├── model_checker_solvers_smtlib2 │ │ └── args │ ├── model_checker_targets_assert_bmc │ │ └── args │ ├── model_checker_targets_assert_chc │ │ └── args │ ├── standard_urls_missing │ │ └── contract.sol │ ├── strict_asm_output_selection_ir_optimized_only │ │ ├── args │ │ └── input.yul │ ├── ast_compact_json_with_base_path │ │ ├── args │ │ ├── c.sol │ │ └── input.sol │ ├── combined_json_with_base_path │ │ ├── args │ │ ├── c.sol │ │ └── input.sol │ ├── debug_info_in_yul_and_evm_asm_print_all │ │ └── args │ ├── debug_info_in_yul_and_evm_asm_print_none │ │ └── args │ ├── evmasm_transient_storage_state_variable │ │ └── args │ ├── model_checker_bmc_loop_iterations │ │ └── args │ ├── model_checker_ext_calls_trusted_chc │ │ └── args │ ├── model_checker_invariants_contract │ │ └── args │ ├── model_checker_show_unproved_true_bmc │ │ └── args │ ├── model_checker_show_unproved_true_chc │ │ └── args │ ├── model_checker_solvers_z3_smtlib2 │ │ └── args │ ├── model_checker_targets_all_all_engines │ │ └── args │ ├── model_checker_targets_balance_bmc │ │ └── args │ ├── model_checker_targets_balance_chc │ │ └── args │ ├── model_checker_targets_default_bmc │ │ └── args │ ├── model_checker_targets_default_chc │ │ └── args │ ├── model_checker_targets_overflow_bmc │ │ └── args │ ├── model_checker_targets_overflow_chc │ │ └── args │ ├── model_checker_targets_underflow_bmc │ │ └── args │ ├── model_checker_targets_underflow_chc │ │ └── args │ ├── stop_after_parsing_ast │ │ ├── args │ │ └── input.sol │ ├── strict_asm_asm_json_yul_verbatim │ │ ├── args │ │ └── stdin │ ├── strict_asm_ast_compact_json │ │ └── args │ ├── strict_asm_optimizer_steps │ │ └── args │ ├── mcopy_bytes_array_abi_decode │ │ └── args │ ├── model_checker_divModSlacks_false_all │ │ └── args │ ├── model_checker_divModSlacks_false_bmc │ │ └── args │ ├── model_checker_divModSlacks_false_chc │ │ └── args │ ├── model_checker_ext_calls_untrusted_chc │ │ └── args │ ├── model_checker_invariants_reentrancy │ │ └── args │ ├── model_checker_show_proved_safe_true_bmc │ │ └── args │ ├── model_checker_show_proved_safe_true_chc │ │ └── args │ ├── model_checker_show_unproved_true_all_engines │ │ └── args │ ├── model_checker_show_unsupported_true_bmc │ │ └── args │ ├── model_checker_show_unsupported_true_chc │ │ └── args │ ├── model_checker_targets_default_all_engines │ │ └── args │ ├── model_checker_targets_div_by_zero_bmc │ │ └── args │ ├── model_checker_targets_div_by_zero_chc │ │ └── args │ ├── model_checker_targets_pop_empty_bmc │ │ └── args │ ├── model_checker_targets_pop_empty_chc │ │ └── args │ ├── standard_urls_existing_and_missing │ │ └── contract.sol │ ├── yul_optimizer_steps_with_empty_cleanup_sequence │ │ └── args │ ├── yul_optimizer_steps_without_optimize_empty_sequence │ │ └── args │ ├── combined_json_generated_sources │ │ └── args │ ├── evmasm_transient_storage_inline_assembly │ │ └── args │ ├── model_checker_targets_out_of_bounds_bmc │ │ └── args │ ├── model_checker_targets_out_of_bounds_chc │ │ └── args │ ├── strict_asm_asm_json_subobjects_with_debug │ │ └── args │ ├── strict_asm_yul_cfg_json_export │ │ └── args │ ├── yul_optimizer_steps_with_empty_optimization_sequence │ │ └── args │ ├── debug_info_in_yul_and_evm_asm_print_location_only │ │ └── args │ ├── evmasm_transient_storage_state_variable_via_ir │ │ └── args │ ├── inline_assembly_function_name_clash │ │ └── args │ ├── model_checker_show_proved_safe_true_all_engines │ │ └── args │ ├── model_checker_show_unsupported_true_all_engines │ │ └── args │ ├── standard_ir_ast_requested │ │ └── in.sol │ ├── strict_asm_asm_json_with_debug_info_annotations │ │ └── args │ ├── strict_asm_asm_json_without_debug_info_annotations │ │ └── args │ ├── ir_optimized_transient_storage_value_type │ │ └── args │ ├── linking_strict_assembly │ │ └── args │ ├── model_checker_print_query_bmc │ │ └── args │ ├── model_checker_targets_constant_condition_bmc │ │ └── args │ ├── model_checker_targets_constant_condition_chc │ │ └── args │ ├── model_checker_targets_underflow_overflow_bmc │ │ └── args │ ├── model_checker_targets_underflow_overflow_chc │ │ └── args │ ├── asm_json_yul_export_evm_asm_import │ │ └── args │ ├── combined_json_stop_after_parsing │ │ └── input.sol │ ├── evmasm_difficulty_post_paris │ │ └── args │ ├── evmasm_difficulty_pre_paris │ │ └── args │ ├── evmasm_prevrandao_post_paris │ │ └── args │ ├── evmasm_prevrandao_pre_paris │ │ └── args │ ├── evmasm_transient_storage_inline_assembly_via_ir │ │ └── args │ ├── linking_solidity │ │ └── args │ ├── model_checker_invariants_contract_reentrancy │ │ └── args │ ├── standard_irOptimized_ast_requested │ │ └── in.sol │ ├── standard_wrong_type_sources │ │ └── input.json │ ├── standard_optimizer_yul │ │ └── output.json │ ├── model_checker_contracts_only_one │ │ └── args │ ├── model_checker_invariants_contract_eld │ │ └── args │ ├── model_checker_targets_underflow_overflow_assert_bmc │ │ └── args │ ├── model_checker_targets_underflow_overflow_assert_chc │ │ └── args │ ├── standard_default_success │ │ └── output.json │ ├── standard_optimizer_no_yul │ │ └── output.json │ ├── yul_optimizer_steps_nested_brackets │ │ └── args │ ├── mcopy_bytes_array_returned_from_function │ │ └── args │ ├── mcopy_string_literal_returned_from_function │ │ └── args │ ├── model_checker_contracts_inexistent_source │ │ ├── err │ │ └── args │ ├── standard_non_utf8_filename │ │ └── input.json │ ├── standard_optimizer_yulDetails │ │ └── output.json │ ├── standard_output_selection_empty │ │ └── output.json │ ├── linking_strict_assembly_unresolved_references │ │ └── args │ ├── standard_model_checker_engine_none │ │ └── output.json │ ├── standard_non_utf8_filename2 │ │ └── input.json │ ├── standard_raw_utf16_filename │ │ └── input.json │ ├── model_checker_print_query_all │ │ └── args │ ├── model_checker_print_query_chc │ │ └── args │ ├── standard_evm_version_constantinople │ │ └── output.json │ ├── strict_asm_eof_container_prague │ │ └── args │ └── strict_asm_eof_dataloadn_prague │ │ └── args ├── .solhintignore ├── libyul │ ├── yulSyntaxTests │ │ ├── smoke.yul │ │ ├── smoke_test.yul │ │ ├── number_literal_1.yul │ │ ├── vardecl_empty.yul │ │ ├── variable_declaration.yul │ │ ├── variable_declaration_empty.yul │ │ ├── constants.yul │ │ ├── if_statement_1.yul │ │ ├── number_literals_1.yul │ │ ├── period_in_identifier.yul │ │ ├── hex_expression.yul │ │ ├── hex_assignment.yul │ │ ├── token_as_identifier.yul │ │ ├── assignment.yul │ │ ├── dot_middle_function.yul │ │ ├── objects │ │ │ ├── empty_code.yul │ │ │ ├── multiple_data.yul │ │ │ ├── code_without_object.yul │ │ │ ├── empty_object.yul │ │ │ ├── incomplete1.yul │ │ │ ├── basic_subobject.yul │ │ │ └── empty_data.yul │ │ ├── dot_middle_function_arg.yul │ │ ├── dot_middle_variabledeclaration.yul │ │ ├── functional_partial_success.yul │ │ ├── builtin_types.yul │ │ ├── dot_middle_function_ret.yul │ │ ├── for_loop_condition.yul │ │ ├── vardecl.yul │ │ ├── functional_assignment.yul │ │ ├── if_statement_2.yul │ │ ├── switch_case.yul │ │ ├── for_statement.yul │ │ ├── functional.yul │ │ ├── mcopy.yul │ │ ├── period_in_identifier_start.yul │ │ ├── push.yul │ │ ├── simple_instructions.yul │ │ ├── empty_call.yul │ │ ├── function_defined_in_init_block_1.yul │ │ ├── function_defined_in_init_block_2.yul │ │ ├── function_literal_valid.yul │ │ ├── vardecl_multi.yul │ │ ├── variable_declaration_bool.yul │ │ ├── function_definitions.yul │ │ ├── function_shadowing_outside_vars_1.yul │ │ ├── period_in_identifier_start_with_comment.yul │ │ ├── switch_case_different_literal.yul │ │ ├── tuple_assignment.yul │ │ ├── assign_from_stack.yul │ │ ├── call_literal.yul │ │ ├── functional_assign_complex.yul │ │ ├── number_literal_2.yul │ │ ├── number_literal_3.yul │ │ ├── surplus_input.yul │ │ ├── functions_in_parallel_scopes.yul │ │ ├── number_literal_4.yul │ │ ├── vardecl_complex.yul │ │ ├── for_statement_break_nested_body_in_init.yul │ │ ├── for_statement_break_nested_body_in_post.yul │ │ ├── function_def_multiple_args.yul │ │ ├── functions_multiple_args.yul │ │ ├── hex_switch_case.yul │ │ ├── if_statement_fail_1.yul │ │ ├── if_statement_scope_1.yul │ │ ├── loadimmutable.yul │ │ ├── number_literals_2.yul │ │ ├── number_literals_3.yul │ │ ├── string_literal_switch_case.yul │ │ ├── vardecl_bool.yul │ │ ├── for_statement_break.yul │ │ ├── for_statement_continue_nested_body_in_post.yul │ │ ├── for_visibility_1.yul │ │ ├── keywords.yul │ │ ├── number_literals_4.yul │ │ ├── period_in_identifier_spaced_1.yul │ │ ├── period_in_identifier_spaced_2.yul │ │ ├── period_not_as_identifier_start.yul │ │ ├── for_expr_invalid_2.yul │ │ ├── for_expr_invalid_3.yul │ │ ├── for_expr_invalid_4.yul │ │ ├── for_statement_continue.yul │ │ ├── for_statement_continue_nested_body_in_init.yul │ │ ├── functional_returndatacopy.yul │ │ ├── if_statement_3.yul │ │ ├── invalid │ │ │ ├── label_disallowed.yul │ │ │ ├── jump_disallowed.yul │ │ │ ├── literals_on_stack_disallowed.yul │ │ │ └── jumpi_disallowed.yul │ │ ├── period_in_identifier_spaced_3.yul │ │ ├── builtin_identifier_6.yul │ │ ├── for_expr_invalid_1.yul │ │ ├── function_defined_in_init_nested_1.yul │ │ ├── instructions.yul │ │ ├── linkersymbol_evm.yul │ │ ├── optional_types.yul │ │ ├── blobbasefee_identifier_pre_cancun.yul │ │ ├── dot_leading_function.yul │ │ ├── if_statement_fail_2.yul │ │ ├── invalid_type.yul │ │ ├── switch_case_string_literal_very_long.yul │ │ └── switch_statement_1.yul │ ├── yulOptimizerTests │ │ ├── splitJoin │ │ │ └── smoke.yul │ │ ├── disambiguator │ │ │ └── smoke.yul │ │ ├── fullSimplify │ │ │ └── smoke.yul │ │ ├── rematerialiser │ │ │ └── smoke.yul │ │ ├── unusedPruner │ │ │ ├── smoke.yul │ │ │ ├── multi_declarations.yul │ │ │ └── pop.yul │ │ ├── expressionJoiner │ │ │ └── smoke.yul │ │ ├── expressionSplitter │ │ │ └── smoke.yul │ │ ├── functionGrouper │ │ │ └── smoke.yul │ │ ├── functionHoister │ │ │ └── smoke.yul │ │ ├── functionSpecializer │ │ │ └── smoke.yul │ │ ├── conditionalSimplifier │ │ │ └── smoke.yul │ │ ├── conditionalUnsimplifier │ │ │ └── smoke.yul │ │ ├── expressionSimplifier │ │ │ └── smoke.yul │ │ ├── commonSubexpressionEliminator │ │ │ └── smoke.yul │ │ ├── unusedFunctionParameterPruner │ │ │ └── smoke.yul │ │ ├── varDeclInitializer │ │ │ └── simple.yul │ │ └── structuralSimplifier │ │ │ └── if_false_condition.yul │ ├── functionSideEffects │ │ ├── empty_with_sstore.yul │ │ └── empty.yul │ ├── yulInterpreterTests │ │ └── smoke.yul │ └── evmCodeTransform │ │ └── stackReuse │ │ └── smoke.yul ├── libsolidity │ ├── ASTJSON │ │ ├── smoke.sol │ │ ├── global_enum.sol │ │ ├── global_struct.sol │ │ ├── array_type_name.sol │ │ ├── enum_value.sol │ │ ├── event_definition.sol │ │ ├── constructor.sol │ │ ├── inheritance_specifier.sol │ │ ├── placeholder_statement.sol │ │ ├── fallback_payable.sol │ │ ├── license.sol │ │ ├── abstract_contract.sol │ │ ├── fallback.sol │ │ ├── short_type_name.sol │ │ ├── source_location.sol │ │ ├── receive_ether.sol │ │ ├── string.sol │ │ ├── short_type_name_ref.sol │ │ ├── unicode.sol │ │ ├── enum_value_declaration.sol │ │ ├── long_type_name_binary_operation.sol │ │ ├── modifier_definition.sol │ │ ├── modifier_invocation.sol │ │ ├── non_utf8.sol │ │ ├── event_with_variables_of_internal_types.sol │ │ ├── long_type_name_identifier.sol │ │ ├── base_constructor_call.sol │ │ ├── assembly │ │ │ ├── empty_block.sol │ │ │ ├── stringlit.sol │ │ │ └── leave.sol │ │ └── using_for_directive.sol │ ├── optimizedIRCaching │ │ ├── no_contracts.sol │ │ ├── single_contract.sol │ │ ├── multiple_contracts.sol │ │ └── bytecode_dependency_creation.sol │ ├── semanticTests │ │ ├── externalSource │ │ │ ├── _relative_imports │ │ │ │ ├── c.sol │ │ │ │ ├── h.sol │ │ │ │ ├── D │ │ │ │ │ └── d.sol │ │ │ │ └── dir │ │ │ │ │ ├── a.sol │ │ │ │ │ ├── B │ │ │ │ │ └── b.sol │ │ │ │ │ └── G │ │ │ │ │ └── g.sol │ │ │ ├── _external │ │ │ │ ├── external.sol │ │ │ │ ├── external.sol=sol │ │ │ │ ├── subdir │ │ │ │ │ ├── import.sol │ │ │ │ │ └── sub_external.sol │ │ │ │ ├── import_with_subdir.sol │ │ │ │ ├── other_external.sol │ │ │ │ └── import.sol │ │ │ ├── _non_normalized_paths │ │ │ │ ├── a.sol │ │ │ │ ├── c.sol │ │ │ │ └── d.sol │ │ │ └── _source_name_starting_with_dots │ │ │ │ ├── b.sol │ │ │ │ ├── dir │ │ │ │ ├── a.sol │ │ │ │ └── contract.sol │ │ │ │ ├── dot_a.sol │ │ │ │ └── dot_dot_b.sol │ │ ├── immutable │ │ │ └── getter.sol │ │ ├── isoltestTesting │ │ │ ├── builtins.sol │ │ │ └── storage │ │ │ │ └── storage_empty.sol │ │ ├── various │ │ │ └── super_alone.sol │ │ ├── viaYul │ │ │ └── smoke_test.sol │ │ ├── constructor │ │ ├── operators │ │ │ └── shifts │ │ │ │ ├── shift_constant_left.sol │ │ │ │ └── shift_constant_right.sol │ │ └── empty_contract.sol │ ├── syntaxTests │ │ ├── abiEncoder │ │ │ ├── select_v1.sol │ │ │ ├── select_v1_quoted_string.sol │ │ │ ├── select_v2_quoted_string.sol │ │ │ └── selected_twice_v2.sol │ │ ├── parsing │ │ │ ├── contract_named_transient.sol │ │ │ ├── empty_comment.sol │ │ │ ├── event.sol │ │ │ ├── library_simple.sol │ │ │ ├── smoke_test.sol │ │ │ ├── event_arguments.sol │ │ │ ├── external_function.sol │ │ │ ├── fallback_function.sol │ │ │ ├── interface_basic.sol │ │ │ ├── mapping.sol │ │ │ ├── comment_end_with_double_star.sol │ │ │ ├── import_empty.sol │ │ │ ├── mapping_with_names_2.sol │ │ │ ├── mapping_with_names_3.sol │ │ │ ├── multi_arrays.sol │ │ │ ├── address_payable_constant.sol │ │ │ ├── arrays_in_events.sol │ │ │ ├── function_type_state_variable.sol │ │ │ ├── mapping_with_names_1.sol │ │ │ ├── user_defined_value_type.sol │ │ │ ├── address_payable_library.sol │ │ │ ├── import_complex_without_from.sol │ │ │ ├── mapping_with_names_7.sol │ │ │ ├── modifier_arguments.sol │ │ │ ├── event_arguments_indexed.sol │ │ │ ├── no_function_params.sol │ │ │ ├── assembly_evmasm_type.sol │ │ │ └── mapping_with_names_8.sol │ │ ├── pragma │ │ │ ├── version_range.sol │ │ │ ├── invalid_pragma.sol │ │ │ ├── valid_range_disjunction_range_second.sol │ │ │ ├── valid_range_disjunction_two_ranges.sol │ │ │ ├── unknown_pragma.sol │ │ │ ├── empty_version.sol │ │ │ └── unterminated_pragma.sol │ │ ├── abstract │ │ │ ├── contract.sol │ │ │ └── library.sol │ │ ├── constructor │ │ ├── errors │ │ │ ├── error_address_payable.sol │ │ │ ├── error_in_library.sol │ │ │ ├── error_in_interface.sol │ │ │ ├── selector.sol │ │ │ ├── anonymous.sol │ │ │ ├── indexed_error.sol │ │ │ ├── error_location_memory.sol │ │ │ └── using_structs.sol │ │ ├── immutable │ │ │ ├── uninitialized.sol │ │ │ ├── immutable_basic.sol │ │ │ ├── variable_declaration_value.sol │ │ │ ├── reading_during_statevar_init.sol │ │ │ ├── decrement.sol │ │ │ ├── increment.sol │ │ │ └── immutable_state_var_named_transient.sol │ │ ├── imports │ │ │ ├── smoke_test.sol │ │ │ ├── library_name_clash_with_contract.sol │ │ │ └── regular_import.sol │ │ ├── nameAndTypeResolution │ │ │ ├── 414_interface.sol │ │ │ ├── 228_valid_library.sol │ │ │ ├── 417_interface_events.sol │ │ │ ├── 422_interface_enums.sol │ │ │ ├── 418_interface_inheritance.sol │ │ │ ├── 526_fallback_marked_external.sol │ │ │ ├── shadowsBuiltin │ │ │ │ └── ignores_constructor.sol │ │ │ ├── 191_negative_integers_to_signed_min.sol │ │ │ ├── 251_using_for_library.sol │ │ │ ├── 355_payable_external.sol │ │ │ ├── 104_empty_name_input_parameter.sol │ │ │ ├── 074_fallback_function.sol │ │ │ └── 419_interface_structs.sol │ │ ├── using │ │ │ ├── using_library_file_level.sol │ │ │ ├── using_for_enum.sol │ │ │ ├── using_lhs_asterisk.sol │ │ │ ├── undeclared_library.sol │ │ │ └── using_empty_list_file_level.sol │ │ ├── constants │ │ │ ├── constant_natspec.sol │ │ │ ├── constant_state_variable_named_transient.sol │ │ │ └── constant_unassigned.sol │ │ ├── events │ │ │ ├── event_nested_array_2.sol │ │ │ ├── overloading_in_contract.sol │ │ │ ├── events_with_same_name.sol │ │ │ ├── event_array_v2.sol │ │ │ ├── event_nested_array_v2.sol │ │ │ ├── events_with_same_name_different_types.sol │ │ │ └── event_array_indexed_v2.sol │ │ ├── types │ │ │ ├── event_with_rational_size_array.sol │ │ │ └── mapping │ │ │ │ ├── mapping_dynamic_key.sol │ │ │ │ └── mapping_dynamic_key_public.sol │ │ ├── freeFunctions │ │ │ └── free_storage.sol │ │ ├── largeTypes │ │ │ ├── large_storage_array_fine.sol │ │ │ └── large_storage_arrays_combined.sol │ │ ├── license │ │ │ ├── license_OR.sol │ │ │ ├── license_AND.sol │ │ │ ├── license_whitespace_after_colon.sol │ │ │ └── license_whitespace_before_spdx.sol │ │ ├── modifiers │ │ │ └── definition_in_library_virtual.sol │ │ ├── viewPureChecker │ │ │ └── suggest_pure.sol │ │ ├── string │ │ │ └── large_utf8_codepoint.sol │ │ ├── visibility │ │ │ └── interface │ │ │ │ └── function_external.sol │ │ ├── metaTypes │ │ │ └── name_constant.sol │ │ ├── array │ │ │ ├── length │ │ │ │ └── constant_var.sol │ │ │ └── bytes_pop.sol │ │ ├── inlineAssembly │ │ │ └── memory_safe_in_dialect_string.sol │ │ ├── literalOperations │ │ │ ├── mod_zero_nonliteral.sol │ │ │ ├── division_by_zero_nonliteral.sol │ │ │ └── mod_zero_compound.sol │ │ ├── revertStatement │ │ │ ├── at_file_level.sol │ │ │ └── in_global_function.sol │ │ ├── userDefinedValueType │ │ │ ├── forward_reference_array.sol │ │ │ ├── forward_reference_struct.sol │ │ │ ├── mapping_key.sol │ │ │ └── forward_reference_constant_variable_declaration.sol │ │ ├── literals │ │ │ └── hex_string_underscores_valid.sol │ │ ├── fallback │ │ │ ├── payable_fallback_without_receive_empty.sol │ │ │ └── returns.sol │ │ ├── duplicate_contract.sol │ │ └── experimental │ │ │ └── inference │ │ │ └── experimental_keywords.sol │ ├── ABIJson │ │ └── empty_contract.sol │ ├── memoryGuardTests │ │ ├── stub.sol │ │ └── dialectString │ │ │ └── stub.sol │ ├── smtCheckerTests │ │ ├── simple │ │ │ └── smoke_test.sol │ │ ├── file_level │ │ │ └── free_function_3.sol │ │ └── types │ │ │ └── event_with_rational_size_array.sol │ └── lsp │ │ ├── didChange_template.sol │ │ ├── analyze-full-project │ │ ├── C.sol │ │ ├── D.sol │ │ └── E.sol │ │ ├── include-paths-nested-2 │ │ ├── A │ │ │ ├── foo.sol │ │ │ └── B │ │ │ │ └── foo.sol │ │ └── foo.sol │ │ ├── include-paths-nested │ │ ├── A │ │ │ ├── B │ │ │ │ ├── foo.sol │ │ │ │ └── C │ │ │ │ │ └── foo.sol │ │ │ └── foo.sol │ │ └── foo.sol │ │ └── node_modules │ │ └── rootlib.sol ├── tools │ └── ossfuzz │ │ └── config │ │ ├── solc_noopt_ossfuzz.options │ │ ├── solc_opt_ossfuzz.options │ │ ├── strictasm_opt_ossfuzz.options │ │ └── strictasm_assembly_ossfuzz.options ├── scripts │ └── fixtures │ │ ├── smt_contract_with_cr_newlines.sol │ │ ├── smt_smoke_test.sol │ │ ├── smt_contract_with_lf_newlines.sol │ │ ├── smt_contract_with_mixed_newlines.sol │ │ └── smt_contract_with_crlf_newlines.sol └── compilationTests │ ├── corion │ └── README.md │ ├── gnosis │ └── README.md │ ├── MultiSigWallet │ └── README.md │ └── milestonetracker │ └── README.md ├── .circleci └── cln-asan.supp ├── .gitattributes ├── scripts ├── ci │ ├── buildpack-deps_test_ubuntu2404.sh │ ├── buildpack-deps_test_ubuntu2004.sh │ ├── buildpack-deps_test_ubuntu2404.clang.sh │ ├── buildpack-deps_test_emscripten.sh │ └── buildpack-deps_test_ubuntu.clang.ossfuzz.sh ├── codespell_whitelist.txt └── download_ossfuzz_corpus.sh ├── .github └── CODEOWNERS ├── docs └── _static │ ├── img │ ├── favicon.ico │ └── favicon.png │ └── css │ └── fonts.css ├── funding.json └── libstdlib └── src └── stub.sol /cmake/toolchains/default.cmake: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/cmdlineTests/hashes/args: -------------------------------------------------------------------------------- 1 | --hashes -------------------------------------------------------------------------------- /test/cmdlineTests/stdin/args: -------------------------------------------------------------------------------- 1 | - 2 | -------------------------------------------------------------------------------- /.circleci/cln-asan.supp: -------------------------------------------------------------------------------- 1 | leak:*libcln* 2 | -------------------------------------------------------------------------------- /test/.solhintignore: -------------------------------------------------------------------------------- 1 | *contributing_rst* 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/error_codes/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/exp_base_literal/err: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/too_long_line/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/dup_opt_peephole/args: -------------------------------------------------------------------------------- 1 | --asm -------------------------------------------------------------------------------- /test/cmdlineTests/exp_base_literal/args: -------------------------------------------------------------------------------- 1 | --ir 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/function_debug_info/err: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/metadata/args: -------------------------------------------------------------------------------- 1 | --metadata 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/no_import_callback/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/require_overload/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_file_not_found/exit: -------------------------------------------------------------------------------- 1 | 1 -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_jump/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_only_cr/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_only_cr/input.yul: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.sol linguist-language=Solidity 2 | -------------------------------------------------------------------------------- /scripts/ci/buildpack-deps_test_ubuntu2404.sh: -------------------------------------------------------------------------------- 1 | build.sh -------------------------------------------------------------------------------- /test/cmdlineTests/abiencoderv2_no_warning/err: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/constant_optimizer_yul/err: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/error_codes/args: -------------------------------------------------------------------------------- 1 | --error-codes 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_no_value/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/no_import_callback/contract_2.sol: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/cmdlineTests/pretty_json_indent_only/output: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/stop_after_parsing_abi/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/too_long_line_edge_in/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/too_long_line_edge_out/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/too_long_line_left_short/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/too_long_line_multiline/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | /docs/style-guide.rst @fulldecent 2 | -------------------------------------------------------------------------------- /scripts/ci/buildpack-deps_test_ubuntu2004.sh: -------------------------------------------------------------------------------- 1 | ./build.sh -------------------------------------------------------------------------------- /scripts/ci/buildpack-deps_test_ubuntu2404.clang.sh: -------------------------------------------------------------------------------- 1 | build.sh -------------------------------------------------------------------------------- /test/cmdlineTests/abiencoderv2_no_warning/args: -------------------------------------------------------------------------------- 1 | --hashes -------------------------------------------------------------------------------- /test/cmdlineTests/function_debug_info_via_yul/err: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_invalid_value/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/keccak_optimization_deploy_code/err: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/keccak_optimization_low_runs/err: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_solvers_wrong/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_solvers_wrong2/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_targets_error/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/pretty_json_indent_only/no-pretty-print: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/cmdlineTests/pretty_json_standard/no-pretty-print: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_jump/args: -------------------------------------------------------------------------------- 1 | --strict-assembly -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_jump/input.yul: -------------------------------------------------------------------------------- 1 | { jump(1) } -------------------------------------------------------------------------------- /test/cmdlineTests/too_long_line_right_short/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/yul_optimizer_steps_disabled/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/yul_verbatim/args: -------------------------------------------------------------------------------- 1 | --strict-assembly 2 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/smoke.yul: -------------------------------------------------------------------------------- 1 | {} 2 | // ---- 3 | -------------------------------------------------------------------------------- /scripts/ci/buildpack-deps_test_emscripten.sh: -------------------------------------------------------------------------------- 1 | build_emscripten.sh -------------------------------------------------------------------------------- /test/cmdlineTests/asm_json/args: -------------------------------------------------------------------------------- 1 | --asm-json --pretty-json 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/asm_json_no_pretty_print/args: -------------------------------------------------------------------------------- 1 | --asm-json 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/ast_json_import_wrong_evmVersion/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_non_unique_sources/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_unrecognized_field/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_untagged_jumpdest/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/linker_mode_invalid_option_optimize/input.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_ext_calls_empty_arg/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_ext_calls_wrong_arg/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_invariants_wrong/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/optimizer_user_yul/args: -------------------------------------------------------------------------------- 1 | --optimize --asm 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/pretty_json_standard/args: -------------------------------------------------------------------------------- 1 | --pretty-json 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/pretty_json_standard_indent/no-pretty-print: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_invalid_option_optimize/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_invalid_option_optimize/input.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_json_no_pretty_print/no-pretty-print: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_metadata/args: -------------------------------------------------------------------------------- 1 | --allow-paths . 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_code_generation_error/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_only_cr/args: -------------------------------------------------------------------------------- 1 | --strict-assembly 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_options_in_non_asm_mode/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_output_selection_invalid/input.yul: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/cmdlineTests/too_long_line_both_sides_short/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/viair_abicoder_v1/args: -------------------------------------------------------------------------------- 1 | --ir --error-codes 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_invalid_data_not_hex/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_invalid_data_not_object/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_optimize_not_supported/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_out_of_range_data_index/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/linker_mode_invalid_option_optimize/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/linker_mode_invalid_option_optimize_runs/input.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/cmdlineTests/linker_mode_invalid_option_optimize_yul/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/linker_mode_invalid_option_optimize_yul/input.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/cmdlineTests/linker_mode_output_selection_invalid/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/linker_mode_output_selection_invalid/input.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_contracts_empty_contract/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_contracts_empty_source/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_contracts_source_missing/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/name_simplifier/args: -------------------------------------------------------------------------------- 1 | --optimize --ir-optimized 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/no_cbor_metadata_with_metadata_hash/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/optimizer_inliner_add/args: -------------------------------------------------------------------------------- 1 | --optimize --asm 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/optimizer_inliner_inc/args: -------------------------------------------------------------------------------- 1 | --optimize --asm 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/pretty_json_indent_only/args: -------------------------------------------------------------------------------- 1 | --json-indent 7 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/revert_strings/args: -------------------------------------------------------------------------------- 1 | --revert-strings debug --ir -------------------------------------------------------------------------------- /test/cmdlineTests/standard_cli_output_selection_invalid/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_cli_output_selection_invalid/input.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_invalid_option_no_optimize_yul/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_invalid_option_no_optimize_yul/input.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_invalid_option_optimize_runs/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_invalid_option_optimize_runs/input.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_invalid_option_optimize_yul/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_invalid_option_optimize_yul/input.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_type_root/input.json: -------------------------------------------------------------------------------- 1 | ["abc"] 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_evm_version_byzantium/input.yul: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_invalid_option_output_dir/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_output_selection_invalid/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_warning_and_error_optimize/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/yul_optimizer_steps_nesting_too_deep/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/smoke_test.yul: -------------------------------------------------------------------------------- 1 | { { } } 2 | // ---- 3 | -------------------------------------------------------------------------------- /scripts/ci/buildpack-deps_test_ubuntu.clang.ossfuzz.sh: -------------------------------------------------------------------------------- 1 | build_ossfuzz.sh -------------------------------------------------------------------------------- /test/cmdlineTests/evm_version_byzantium/args: -------------------------------------------------------------------------------- 1 | --evm-version byzantium 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_invalid_jumptype_instruction/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_missing_subobject_indices/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/ir_compiler_subobjects/args: -------------------------------------------------------------------------------- 1 | --ir-optimized --optimize -------------------------------------------------------------------------------- /test/cmdlineTests/linker_mode_invalid_option_no_optimize_yul/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/linker_mode_invalid_option_no_optimize_yul/input.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/cmdlineTests/linker_mode_invalid_option_optimize_runs/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/linker_mode_invalid_option_yul_optimizations/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/linker_mode_invalid_option_yul_optimizations/input.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_bmc_loop_iterations_invalid_arg/exit: -------------------------------------------------------------------------------- 1 | 1 -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_bmc_loop_iterations_invalid_arg/input.sol: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_bmc_loop_iterations_no_argument/exit: -------------------------------------------------------------------------------- 1 | 1 -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_bmc_loop_iterations_no_argument/input.sol: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_contracts_contract_missing/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_contracts_one_contract_missing/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_print_query_superflous_solver/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/object_compiler/args: -------------------------------------------------------------------------------- 1 | --strict-assembly --optimize 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/optimize_full_storage_write/args: -------------------------------------------------------------------------------- 1 | --optimize --asm 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/optimizer_BlockDeDuplicator/args: -------------------------------------------------------------------------------- 1 | --optimize --asm 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/optimizer_inliner_multireturn/args: -------------------------------------------------------------------------------- 1 | --optimize --asm 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/require_with_error_ir/args: -------------------------------------------------------------------------------- 1 | --ir --debug-info none 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/require_with_string_ir/args: -------------------------------------------------------------------------------- 1 | --ir --debug-info none 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_invalid_option_optimize/args: -------------------------------------------------------------------------------- 1 | --optimize 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_invalid_option_yul_optimizations/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_invalid_option_yul_optimizations/input.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_asm_json_arbitrary_source_index/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_debug_info_print_snippet_only/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_evm_version_constantinople/input.yul: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/structured_documentation_source_location/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/yul_optimizer_steps_invalid_abbreviation/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/yul_verbatim_msize/args: -------------------------------------------------------------------------------- 1 | --strict-assembly --optimize -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/smoke.sol: -------------------------------------------------------------------------------- 1 | contract C {} 2 | 3 | // ---- 4 | -------------------------------------------------------------------------------- /scripts/codespell_whitelist.txt: -------------------------------------------------------------------------------- 1 | nd 2 | compilability 3 | keypair 4 | wast 5 | -------------------------------------------------------------------------------- /test/cmdlineTests/asm_json_import_sourcelist_with_null_elements/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/combined_json_no_pretty_print/args: -------------------------------------------------------------------------------- 1 | --combined-json abi 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_all_and_none/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_all_and_none/input.sol: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_snippet_only/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/events_in_abi/args: -------------------------------------------------------------------------------- 1 | --abi --pretty-json --json-indent 4 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/linking_strict_assembly_duplicate_library_name/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_engine_all/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine all 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_engine_bmc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine bmc 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_engine_chc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_print_query_no_smtlib2_solver_bmc/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_print_query_no_smtlib2_solver_chc/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/optimizer_array_sload/args: -------------------------------------------------------------------------------- 1 | --optimize --ir-optimized 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_file_not_found/args: -------------------------------------------------------------------------------- 1 | --standard-json input.sol 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_invalid_option_optimize_yul/args: -------------------------------------------------------------------------------- 1 | --optimize-yul 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_no_import_callback/args: -------------------------------------------------------------------------------- 1 | --no-import-callback 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_outputs_on_parsing_error/args: -------------------------------------------------------------------------------- 1 | --allow-paths . 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_yul_code_generation_error/args: -------------------------------------------------------------------------------- 1 | --allow-paths . 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_yul_debug_info_print_all/args: -------------------------------------------------------------------------------- 1 | --allow-paths . 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_yul_debug_info_print_none/args: -------------------------------------------------------------------------------- 1 | --allow-paths . 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_yul_embedded_object_name/output.json: -------------------------------------------------------------------------------- 1 | { 2 | } 3 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_yul_invalid_object_name/output.json: -------------------------------------------------------------------------------- 1 | { 2 | } 3 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_yul_single_file_via_urls/args: -------------------------------------------------------------------------------- 1 | --allow-paths . 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_warning/args: -------------------------------------------------------------------------------- 1 | --strict-assembly --ir-optimized 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/yul_optimizer_steps_unbalanced_closing_bracket/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/yul_optimizer_steps_unbalanced_opening_bracket/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/global_enum.sol: -------------------------------------------------------------------------------- 1 | enum E { A } 2 | 3 | // ---- 4 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/number_literal_1.yul: -------------------------------------------------------------------------------- 1 | { let x := 1 } 2 | // ---- 3 | -------------------------------------------------------------------------------- /test/cmdlineTests/abi_via_ir/args: -------------------------------------------------------------------------------- 1 | --abi --via-ir --pretty-json --json-indent 4 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/evm_version_constantinople/args: -------------------------------------------------------------------------------- 1 | --evm-version constantinople 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_contracts_all/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine all 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_engine_none/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine none 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/optimizer_inliner_call_from_constructor/args: -------------------------------------------------------------------------------- 1 | --optimize --asm 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/optimizer_inliner_dynamic_reference/args: -------------------------------------------------------------------------------- 1 | --optimize --asm 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_file_not_found/err: -------------------------------------------------------------------------------- 1 | Error: "input.sol" is not found. 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_import_asm_json_no_output_selection/output.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_outputs_on_analysis_error_fatal/args: -------------------------------------------------------------------------------- 1 | --allow-paths . 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_outputs_on_compilation_error/args: -------------------------------------------------------------------------------- 1 | --allow-paths . 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_yul_evm_version_constantinople/output.json: -------------------------------------------------------------------------------- 1 | { 2 | } 3 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_code_generation_error/args: -------------------------------------------------------------------------------- 1 | --strict-assembly --bin 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/yul_function_name_clashes/args: -------------------------------------------------------------------------------- 1 | --strict-assembly --debug-info none -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/vardecl_empty.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/variable_declaration.yul: -------------------------------------------------------------------------------- 1 | { let x := 7 } 2 | // ---- 3 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/variable_declaration_empty.yul: -------------------------------------------------------------------------------- 1 | { let x } 2 | // ---- 3 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_no_value/args: -------------------------------------------------------------------------------- 1 | --import-asm-json - --opcodes --asm 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_verbatim/args: -------------------------------------------------------------------------------- 1 | --import-asm-json - --opcodes --asm 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_yul_subobjects/args: -------------------------------------------------------------------------------- 1 | --import-asm-json - --opcodes 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/ir_compiler_inheritance_nosubobjects/args: -------------------------------------------------------------------------------- 1 | --ir-optimized --optimize -------------------------------------------------------------------------------- /test/cmdlineTests/ir_with_assembly_no_memoryguard_creation/args: -------------------------------------------------------------------------------- 1 | --ir-optimized --optimize -------------------------------------------------------------------------------- /test/cmdlineTests/ir_with_assembly_no_memoryguard_runtime/args: -------------------------------------------------------------------------------- 1 | --ir-optimized --optimize -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_solvers_wrong2/err: -------------------------------------------------------------------------------- 1 | Error: "smtlib2" is not found. 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_solvers_z3_implicit/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine all 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/no_cbor_metadata/args: -------------------------------------------------------------------------------- 1 | --no-cbor-metadata --bin --via-ir --optimize 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/pretty_json_standard_indent/args: -------------------------------------------------------------------------------- 1 | --pretty-json --json-indent 7 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_invalid_option_no_optimize_yul/args: -------------------------------------------------------------------------------- 1 | --no-optimize-yul 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_invalid_option_optimize_runs/args: -------------------------------------------------------------------------------- 1 | --optimize-runs 1000 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_outputs_on_analysis_error_non_fatal/args: -------------------------------------------------------------------------------- 1 | --allow-paths . 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_stop_after_parsing_ast_requested/args: -------------------------------------------------------------------------------- 1 | --allow-paths . 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_yul_debug_info_print_location_only/args: -------------------------------------------------------------------------------- 1 | --allow-paths . 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_yul_debug_info_print_snippet_only/args: -------------------------------------------------------------------------------- 1 | --allow-paths . 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/storage_layout_user_defined/args: -------------------------------------------------------------------------------- 1 | --storage-layout --pretty-json 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/storage_layout_user_defined_no_pretty_print/args: -------------------------------------------------------------------------------- 1 | --storage-layout 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/yul_function_name_clashes_different_params/args: -------------------------------------------------------------------------------- 1 | --strict-assembly 2 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/global_struct.sol: -------------------------------------------------------------------------------- 1 | struct S { uint256 a; } 2 | 3 | // ---- 4 | -------------------------------------------------------------------------------- /test/libsolidity/optimizedIRCaching/no_contracts.sol: -------------------------------------------------------------------------------- 1 | // ---- 2 | // cachedObjects: 0 3 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/constants.yul: -------------------------------------------------------------------------------- 1 | { 2 | pop(mul(7, 8)) 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/if_statement_1.yul: -------------------------------------------------------------------------------- 1 | { 2 | if true {} 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/number_literals_1.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x := 1 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/period_in_identifier.yul: -------------------------------------------------------------------------------- 1 | { let x.y := 2 } 2 | // ---- 3 | -------------------------------------------------------------------------------- /test/cmdlineTests/ast_compact_json_no_pretty_json/args: -------------------------------------------------------------------------------- 1 | --ast-compact-json --allow-paths . 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/debug_info_in_yul_snippet_escaping/args: -------------------------------------------------------------------------------- 1 | --ir-optimized --ir --optimize 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/evm_version_byzantium/input.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_invalid_value/args: -------------------------------------------------------------------------------- 1 | --import-asm-json - --opcodes --asm 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_non_unique_sources/args: -------------------------------------------------------------------------------- 1 | --asm-json --import-asm-json - 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_yul_more_subobjects/args: -------------------------------------------------------------------------------- 1 | --import-asm-json - --opcodes 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/ir_subobject_order/args: -------------------------------------------------------------------------------- 1 | --ir-optimized --optimize --debug-info none 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/ir_unoptimized_with_optimize/args: -------------------------------------------------------------------------------- 1 | --ir --optimize --debug-info none 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_divModSlacks_default_all/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine all 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_divModSlacks_default_bmc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine bmc 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_divModSlacks_default_chc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_show_unproved_default_bmc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine bmc 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_show_unproved_default_chc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/optimizer_enabled_invalid_yul_optimizer_enabled_and_disabled/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/optimizer_inliner_dynamic_reference_constructor/args: -------------------------------------------------------------------------------- 1 | --optimize --asm 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_debug_info_in_yul_and_evm_asm_print_all/args: -------------------------------------------------------------------------------- 1 | --allow-paths . 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_debug_info_in_yul_and_evm_asm_print_none/args: -------------------------------------------------------------------------------- 1 | --allow-paths . 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_invalid_option_yul_optimizations/args: -------------------------------------------------------------------------------- 1 | --yul-optimizations a 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_json_no_pretty_print/output.json: -------------------------------------------------------------------------------- 1 | {"sources":{"A":{"id":0}}} 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_stop_after_parsing_bytecode_requested/args: -------------------------------------------------------------------------------- 1 | --allow-paths . 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_debug_info_print_all/args: -------------------------------------------------------------------------------- 1 | --strict-assembly --debug-info all 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_optimizer_invalid_yul_optimizer_enabled_and_disabled/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_options_in_non_asm_mode/args: -------------------------------------------------------------------------------- 1 | --yul-dialect evm --machine evm 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/viair_subobject_optimization/args: -------------------------------------------------------------------------------- 1 | --experimental-via-ir --optimize --asm -------------------------------------------------------------------------------- /test/cmdlineTests/viair_subobjects/args: -------------------------------------------------------------------------------- 1 | --ir-optimized --via-ir --optimize --bin --bin-runtime -------------------------------------------------------------------------------- /test/cmdlineTests/yul_optimizer_disabled_sequence_empty/args: -------------------------------------------------------------------------------- 1 | --metadata --yul-optimizations : -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/array_type_name.sol: -------------------------------------------------------------------------------- 1 | contract C { uint[] i; } 2 | 3 | // ---- 4 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/enum_value.sol: -------------------------------------------------------------------------------- 1 | contract C { enum E { A, B } } 2 | 3 | // ---- 4 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/event_definition.sol: -------------------------------------------------------------------------------- 1 | contract C { event E(); } 2 | 3 | // ---- 4 | -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/externalSource/_relative_imports/c.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | } 3 | -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/externalSource/_relative_imports/h.sol: -------------------------------------------------------------------------------- 1 | contract H { 2 | } 3 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/abiEncoder/select_v1.sol: -------------------------------------------------------------------------------- 1 | pragma abicoder v1; 2 | // ---- 3 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/contract_named_transient.sol: -------------------------------------------------------------------------------- 1 | contract transient {} 2 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/hex_expression.yul: -------------------------------------------------------------------------------- 1 | { 2 | pop(hex"2233") 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/tools/ossfuzz/config/solc_noopt_ossfuzz.options: -------------------------------------------------------------------------------- 1 | [libfuzzer] 2 | dict = solidity.dict 3 | -------------------------------------------------------------------------------- /test/tools/ossfuzz/config/solc_opt_ossfuzz.options: -------------------------------------------------------------------------------- 1 | [libfuzzer] 2 | dict = solidity.dict 3 | -------------------------------------------------------------------------------- /test/cmdlineTests/combined_json_abi/args: -------------------------------------------------------------------------------- 1 | --combined-json abi --pretty-json --json-indent 3 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/evm_version_constantinople/input.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_unrecognized_field/args: -------------------------------------------------------------------------------- 1 | --import-asm-json - --opcodes --asm 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_untagged_jumpdest/args: -------------------------------------------------------------------------------- 1 | --import-asm-json - --opcodes --asm 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/ir_optimized_with_optimize/args: -------------------------------------------------------------------------------- 1 | --ir-optimized --optimize --debug-info none 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_show_proved_safe_default_bmc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine bmc 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_show_proved_safe_default_chc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_show_unsupported_default_bmc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine bmc 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_show_unsupported_default_chc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/no_contract_combined_json/args: -------------------------------------------------------------------------------- 1 | --combined-json ast --pretty-json --json-indent 4 -------------------------------------------------------------------------------- /test/cmdlineTests/standard_stop_after_parsing_non_binary_output_requested/args: -------------------------------------------------------------------------------- 1 | --allow-paths . 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_debug_info_print_none/args: -------------------------------------------------------------------------------- 1 | --strict-assembly --debug-info none 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_invalid_option_output_dir/input.yul: -------------------------------------------------------------------------------- 1 | { 2 | sstore(0, 1) 3 | } 4 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_msize_without_optimizer/args: -------------------------------------------------------------------------------- 1 | --strict-assembly --debug-info none 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_optimizer_invalid_yul_optimizer_enabled_and_disabled/input.yul: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_output_selection_asm_only/args: -------------------------------------------------------------------------------- 1 | --strict-assembly --optimize --asm 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_output_selection_bin_only/args: -------------------------------------------------------------------------------- 1 | --strict-assembly --optimize --bin 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_warning_optimize/args: -------------------------------------------------------------------------------- 1 | --strict-assembly --optimize --ir-optimized 2 | -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/externalSource/_external/external.sol: -------------------------------------------------------------------------------- 1 | contract External { 2 | } 3 | -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/externalSource/_non_normalized_paths/a.sol: -------------------------------------------------------------------------------- 1 | contract A { 2 | } 3 | -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/externalSource/_non_normalized_paths/c.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | } 3 | -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/externalSource/_non_normalized_paths/d.sol: -------------------------------------------------------------------------------- 1 | contract D { 2 | } 3 | -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/externalSource/_relative_imports/D/d.sol: -------------------------------------------------------------------------------- 1 | contract D { 2 | } 3 | -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/externalSource/_relative_imports/dir/a.sol: -------------------------------------------------------------------------------- 1 | contract A { 2 | } 3 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/empty_comment.sol: -------------------------------------------------------------------------------- 1 | // 2 | contract test 3 | {} 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/hex_assignment.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x := hex"0011" 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/token_as_identifier.yul: -------------------------------------------------------------------------------- 1 | { 2 | let bool := 1 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/cmdlineTests/constant_optimizer_yul/args: -------------------------------------------------------------------------------- 1 | --optimize --ir-optimized --optimize-runs 1000000 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_difficulty_prevrandao/args: -------------------------------------------------------------------------------- 1 | --import-asm-json - --opcodes --asm 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_hex_subassembly_indices/args: -------------------------------------------------------------------------------- 1 | --import-asm-json - --opcodes --asm 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_invalid_data_not_hex/args: -------------------------------------------------------------------------------- 1 | --import-asm-json - --opcodes --asm 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_invalid_data_not_object/args: -------------------------------------------------------------------------------- 1 | --import-asm-json - --opcodes --asm 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_out_of_range_data_index/args: -------------------------------------------------------------------------------- 1 | --import-asm-json - --opcodes --asm 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_random_order_data_index/args: -------------------------------------------------------------------------------- 1 | --import-asm-json - --opcodes --asm 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/keccak_optimization_low_runs/args: -------------------------------------------------------------------------------- 1 | --ir-optimized --optimize --optimize-runs 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_show_unproved_default_all_engines/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine all 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/no_cbor_metadata_with_metadata_hash/args: -------------------------------------------------------------------------------- 1 | --no-cbor-metadata --metadata-hash ipfs 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/no_import_callback/args: -------------------------------------------------------------------------------- 1 | --no-import-callback no_import_callback/contract_1.sol 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_debug_info_in_yul_and_evm_asm_print_location_only/args: -------------------------------------------------------------------------------- 1 | --allow-paths . 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_debug_info_in_yul_and_evm_asm_print_snippet_only/args: -------------------------------------------------------------------------------- 1 | --allow-paths . 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_outputs_on_analysis_error_fatal_after_current_step/args: -------------------------------------------------------------------------------- 1 | --allow-paths . 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_evm_version_byzantium/args: -------------------------------------------------------------------------------- 1 | --strict-assembly --evm-version byzantium 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_invalid_option_output_dir/args: -------------------------------------------------------------------------------- 1 | --strict-assembly --output-dir /tmp/ 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/transient_storage_layout/args: -------------------------------------------------------------------------------- 1 | --transient-storage-layout --pretty-json --json-indent 4 -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/externalSource/_external/external.sol=sol: -------------------------------------------------------------------------------- 1 | contract External { 2 | } 3 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/event.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | event e(); 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/pragma/version_range.sol: -------------------------------------------------------------------------------- 1 | pragma solidity >=0.4.0 <0.9.0; 2 | // ---- 3 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/assignment.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x := 2 3 | let y := x 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/dot_middle_function.yul: -------------------------------------------------------------------------------- 1 | { 2 | function x.y() {} 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/objects/empty_code.yul: -------------------------------------------------------------------------------- 1 | object "A" { 2 | code { } 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/scripts/fixtures/smt_contract_with_cr_newlines.sol: -------------------------------------------------------------------------------- 1 | pragma experimental SMTChecker; contract C { } -------------------------------------------------------------------------------- /test/scripts/fixtures/smt_smoke_test.sol: -------------------------------------------------------------------------------- 1 | pragma experimental SMTChecker; 2 | contract C { 3 | } 4 | -------------------------------------------------------------------------------- /test/tools/ossfuzz/config/strictasm_opt_ossfuzz.options: -------------------------------------------------------------------------------- 1 | [libfuzzer] 2 | dict = strict_assembly.dict 3 | -------------------------------------------------------------------------------- /test/cmdlineTests/combined_json_with_devdoc/args: -------------------------------------------------------------------------------- 1 | --combined-json devdoc --pretty-json --allow-paths . 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/combined_json_with_userdoc/args: -------------------------------------------------------------------------------- 1 | --combined-json userdoc --pretty-json --allow-paths . 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_invalid_jumptype_instruction/args: -------------------------------------------------------------------------------- 1 | --import-asm-json - --opcodes --asm 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_missing_subobject_indices/args: -------------------------------------------------------------------------------- 1 | --import-asm-json - --opcodes --asm 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/ir_unoptimized_with_optimize_via_ir/args: -------------------------------------------------------------------------------- 1 | --ir --optimize --via-ir --debug-info none 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/keccak_optimization_deploy_code/args: -------------------------------------------------------------------------------- 1 | --ir-optimized --optimize --optimize-runs 50000 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_show_proved_safe_default_all_engines/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine all 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_show_unsupported_default_all_engines/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine all 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_solvers_eld/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc --model-checker-solvers eld 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_solvers_z3/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine all --model-checker-solvers z3 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_timeout_all/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine all --model-checker-timeout 1000 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_timeout_bmc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine bmc --model-checker-timeout 1000 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_timeout_chc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc --model-checker-timeout 1000 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/stop_after_parsing_abi/args: -------------------------------------------------------------------------------- 1 | --pretty-json --json-indent 4 --stop-after parsing --abi 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_debug_info_print_location_only/args: -------------------------------------------------------------------------------- 1 | --strict-assembly --debug-info location 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_debug_info_print_snippet_only/args: -------------------------------------------------------------------------------- 1 | --strict-assembly --debug-info snippet 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_msize_with_optimizer/args: -------------------------------------------------------------------------------- 1 | --strict-assembly --debug-info none --optimize 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_warning_and_error_optimize/args: -------------------------------------------------------------------------------- 1 | --strict-assembly --optimize --ir-optimized 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/viair_msize_without_optimizer/args: -------------------------------------------------------------------------------- 1 | --via-ir --ir-optimized --asm --debug-info none 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/yul_optimizer_steps_disabled/args: -------------------------------------------------------------------------------- 1 | --ir-optimized --yul-optimizations dhfoDgvulfnTUtnIf 2 | -------------------------------------------------------------------------------- /test/libsolidity/ABIJson/empty_contract.sol: -------------------------------------------------------------------------------- 1 | contract test { } 2 | // ---- 3 | // :test 4 | // [] 5 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/constructor.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | constructor() { 3 | } 4 | } 5 | 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/inheritance_specifier.sol: -------------------------------------------------------------------------------- 1 | contract C1 {} contract C2 is C1 {} 2 | 3 | // ---- 4 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/placeholder_statement.sol: -------------------------------------------------------------------------------- 1 | contract C { modifier M { _; } } 2 | 3 | // ---- 4 | -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/externalSource/_external/subdir/import.sol: -------------------------------------------------------------------------------- 1 | import "sub_external.sol"; 2 | -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/externalSource/_source_name_starting_with_dots/b.sol: -------------------------------------------------------------------------------- 1 | contract B { 2 | } 3 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/abiEncoder/select_v1_quoted_string.sol: -------------------------------------------------------------------------------- 1 | pragma abicoder "v1"; 2 | // ---- 3 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/abiEncoder/select_v2_quoted_string.sol: -------------------------------------------------------------------------------- 1 | pragma abicoder "v2"; 2 | // ---- 3 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/abstract/contract.sol: -------------------------------------------------------------------------------- 1 | abstract contract A { constructor() {} } 2 | // ---- 3 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/constructor/constructor.sol: -------------------------------------------------------------------------------- 1 | contract A { constructor() {} } 2 | // ---- 3 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/errors/error_address_payable.sol: -------------------------------------------------------------------------------- 1 | error E(address payable x); 2 | // ---- 3 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/immutable/uninitialized.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint immutable x; 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/imports/smoke_test.sol: -------------------------------------------------------------------------------- 1 | ==== Source: a ==== 2 | contract C {} 3 | // ---- 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/414_interface.sol: -------------------------------------------------------------------------------- 1 | interface I { 2 | } 3 | // ---- 4 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/dot_middle_function_arg.yul: -------------------------------------------------------------------------------- 1 | { 2 | function x(a.b) {} 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/dot_middle_variabledeclaration.yul: -------------------------------------------------------------------------------- 1 | { 2 | let a.b := 1 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/functional_partial_success.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x := byte(1, 2) 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/tools/ossfuzz/config/strictasm_assembly_ossfuzz.options: -------------------------------------------------------------------------------- 1 | [libfuzzer] 2 | dict = strict_assembly.dict 3 | -------------------------------------------------------------------------------- /docs/_static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farichaa/solidity/HEAD/docs/_static/img/favicon.ico -------------------------------------------------------------------------------- /docs/_static/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farichaa/solidity/HEAD/docs/_static/img/favicon.png -------------------------------------------------------------------------------- /test/cmdlineTests/ast_ir/args: -------------------------------------------------------------------------------- 1 | --ir-ast-json --ir-optimized-ast-json --optimize --pretty-json --json-indent 4 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_optimize_not_supported/args: -------------------------------------------------------------------------------- 1 | --optimize --import-asm-json - --opcodes --asm 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_ext_calls_empty_arg/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc --model-checker-ext-calls 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_invariants_all/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc --model-checker-invariants all 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_solvers_cvc5/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine bmc --model-checker-solvers cvc5 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_targets_all_bmc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine bmc --model-checker-targets all 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_targets_all_chc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc --model-checker-targets all 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_targets_error/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine all --model-checker-targets aaa,bbb 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_targets_error/err: -------------------------------------------------------------------------------- 1 | Error: Invalid option for --model-checker-targets: aaa,bbb 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_evm_version_constantinople/args: -------------------------------------------------------------------------------- 1 | --strict-assembly --evm-version constantinople 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_warning_optimize_unreachable/args: -------------------------------------------------------------------------------- 1 | --strict-assembly --optimize --ir-optimized 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/yul_cfg_json_export/args: -------------------------------------------------------------------------------- 1 | --via-ir --optimize --yul-cfg-json --pretty-json --json-indent 4 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/yul_optimize_runs/args: -------------------------------------------------------------------------------- 1 | --strict-assembly --yul-dialect evm --optimize --optimize-runs 10000 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/yul_optimizer_steps/args: -------------------------------------------------------------------------------- 1 | --ir-optimized --optimize --yul-optimizations dhfoDgvulfnTUtnIf 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/yul_optimizer_steps_short_sequence/args: -------------------------------------------------------------------------------- 1 | --ir-optimized --optimize --yul-optimizations iDu 2 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/fallback_payable.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | fallback() external {} 3 | } 4 | 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/license.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | contract C {} 3 | 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/optimizedIRCaching/single_contract.sol: -------------------------------------------------------------------------------- 1 | contract C {} 2 | // ---- 3 | // cachedObjects: 2 4 | -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/externalSource/_external/import_with_subdir.sol: -------------------------------------------------------------------------------- 1 | import "subdir/import.sol"; 2 | -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/externalSource/_external/other_external.sol: -------------------------------------------------------------------------------- 1 | contract OtherExternal { 2 | } 3 | -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/externalSource/_external/subdir/sub_external.sol: -------------------------------------------------------------------------------- 1 | contract SubExternal { 2 | } 3 | -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/externalSource/_source_name_starting_with_dots/dir/a.sol: -------------------------------------------------------------------------------- 1 | contract A { 2 | } 3 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/errors/error_in_library.sol: -------------------------------------------------------------------------------- 1 | library L { 2 | error E(uint); 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/splitJoin/smoke.yul: -------------------------------------------------------------------------------- 1 | {} 2 | // ---- 3 | // step: splitJoin 4 | // 5 | // { { } } 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/builtin_types.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x1 := true 3 | let x2 := 1 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/dot_middle_function_ret.yul: -------------------------------------------------------------------------------- 1 | { 2 | function x() -> a.b {} 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/for_loop_condition.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x 3 | for {} x {} {} 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/vardecl.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x := 7 3 | } 4 | // ==== 5 | // dialect: evm 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_no_value/stdin: -------------------------------------------------------------------------------- 1 | { 2 | ".code": [ 3 | {"name": "PUSH"} 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_contracts_empty_source/err: -------------------------------------------------------------------------------- 1 | Error: Invalid option for --model-checker-contracts: :A 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_ext_calls_wrong_arg/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc --model-checker-ext-calls what 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_ext_calls_wrong_arg/err: -------------------------------------------------------------------------------- 1 | Error: Invalid option for --model-checker-ext-calls: what 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_invariants_wrong/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc --model-checker-invariants what 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_invariants_wrong/err: -------------------------------------------------------------------------------- 1 | Error: Invalid option for --model-checker-invariants: what 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_solvers_cvc5_eld/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine all --model-checker-solvers cvc5,eld 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_solvers_smtlib2/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine all --model-checker-solvers smtlib2 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_solvers_wrong/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine all --model-checker-solvers ultraSolver 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_solvers_wrong/err: -------------------------------------------------------------------------------- 1 | Error: Invalid option for --model-checker-solvers: ultraSolver 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_solvers_wrong2/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine all --model-checker-solvers z3, smtlib2 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_targets_assert_bmc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine bmc --model-checker-targets assert 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_targets_assert_chc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc --model-checker-targets assert 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/no_contract_combined_json/input.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | pragma solidity >=0.0; -------------------------------------------------------------------------------- /test/cmdlineTests/standard_no_import_callback/B.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | pragma solidity >=0.0; 3 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_urls_missing/contract.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | pragma solidity *; 3 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_output_selection_asm_only/input.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x := 42 3 | sstore(0, x) 4 | } 5 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_output_selection_bin_only/input.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x := 42 3 | sstore(0, x) 4 | } 5 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_output_selection_ir_optimized_only/args: -------------------------------------------------------------------------------- 1 | --strict-assembly --optimize --ir-optimized 2 | -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/externalSource/_source_name_starting_with_dots/dot_a.sol: -------------------------------------------------------------------------------- 1 | contract Dot_A { 2 | } 3 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/errors/error_in_interface.sol: -------------------------------------------------------------------------------- 1 | interface C { 2 | error E(uint); 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/using/using_library_file_level.sol: -------------------------------------------------------------------------------- 1 | library L { } 2 | using L for uint; 3 | // ---- 4 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/disambiguator/smoke.yul: -------------------------------------------------------------------------------- 1 | { } 2 | // ---- 3 | // step: disambiguator 4 | // 5 | // { } 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/functional_assignment.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x := 2 3 | x := 7 4 | } 5 | 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/if_statement_2.yul: -------------------------------------------------------------------------------- 1 | { 2 | if false 3 | { 4 | let x := 3 5 | } 6 | } 7 | // ---- 8 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/switch_case.yul: -------------------------------------------------------------------------------- 1 | { 2 | switch 0 3 | case 42 {} 4 | case 0x42 {} 5 | } 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/cmdlineTests/asm_json_import_sourcelist_with_null_elements/args: -------------------------------------------------------------------------------- 1 | --pretty-json --json-indent 4 --import-asm-json - 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/ast_compact_json_with_base_path/args: -------------------------------------------------------------------------------- 1 | --ast-compact-json --pretty-json --base-path . --allow-paths . 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/combined_json_with_base_path/args: -------------------------------------------------------------------------------- 1 | --combined-json ast --pretty-json --base-path . --allow-paths . 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_all/args: -------------------------------------------------------------------------------- 1 | --ir --ir-optimized --asm --optimize --debug-info all 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_none/args: -------------------------------------------------------------------------------- 1 | --ir --ir-optimized --asm --optimize --debug-info none 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/evmasm_transient_storage_state_variable/args: -------------------------------------------------------------------------------- 1 | --no-cbor-metadata --optimize --asm --debug-info none 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/metadata/input.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | pragma solidity *; 3 | 4 | contract C {} 5 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_bmc_loop_iterations/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine bmc --model-checker-bmc-loop-iterations 3 -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_contracts_empty_source/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine all --model-checker-contracts :A 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_contracts_source_missing/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine all --model-checker-contracts :C 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_contracts_source_missing/err: -------------------------------------------------------------------------------- 1 | Error: Invalid option for --model-checker-contracts: :C 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_ext_calls_trusted_chc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc --model-checker-ext-calls trusted 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_invariants_contract/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc --model-checker-invariants contract 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_show_unproved_true_bmc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine bmc --model-checker-show-unproved 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_show_unproved_true_chc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc --model-checker-show-unproved 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_solvers_z3_smtlib2/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine all --model-checker-solvers z3,smtlib2 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_targets_all_all_engines/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine all --model-checker-targets all 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_targets_balance_bmc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine bmc --model-checker-targets balance 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_targets_balance_chc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc --model-checker-targets balance 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_targets_default_bmc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine bmc --model-checker-targets default 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_targets_default_chc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc --model-checker-targets default 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_targets_overflow_bmc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine bmc --model-checker-targets overflow 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_targets_overflow_chc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc --model-checker-targets overflow 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_targets_underflow_bmc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine bmc --model-checker-targets underflow 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_targets_underflow_chc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc --model-checker-targets underflow 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/optimizer_enabled_invalid_yul_optimizer_enabled_and_disabled/args: -------------------------------------------------------------------------------- 1 | --optimize-yul --no-optimize-yul 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/stdin/stdin: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | pragma solidity >=0.0; 3 | 4 | contract C {} 5 | -------------------------------------------------------------------------------- /test/cmdlineTests/stop_after_parsing_ast/args: -------------------------------------------------------------------------------- 1 | --pretty-json --json-indent 4 --stop-after parsing --ast-compact-json 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_asm_json_yul_verbatim/args: -------------------------------------------------------------------------------- 1 | --strict-assembly - --asm-json --pretty-json --json-indent 4 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_ast_compact_json/args: -------------------------------------------------------------------------------- 1 | --strict-assembly --ast-compact-json --pretty-json --json-indent 4 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_optimizer_steps/args: -------------------------------------------------------------------------------- 1 | --strict-assembly --optimize --yul-optimizations dhfoDgvulfnTUtnIf 2 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/abstract_contract.sol: -------------------------------------------------------------------------------- 1 | abstract contract C { 2 | constructor() { 3 | } 4 | } 5 | 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/fallback.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | fallback() external payable { 3 | } 4 | } 5 | 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/short_type_name.sol: -------------------------------------------------------------------------------- 1 | contract c { function f() public { uint[] memory x; } } 2 | 3 | // ---- 4 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/source_location.sol: -------------------------------------------------------------------------------- 1 | contract C { function f() public { uint x = 2; x++; } } 2 | 3 | // ---- 4 | -------------------------------------------------------------------------------- /test/libsolidity/memoryGuardTests/stub.sol: -------------------------------------------------------------------------------- 1 | contract C {} 2 | // ---- 3 | // :C(creation) true 4 | // :C(runtime) true 5 | -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/externalSource/_source_name_starting_with_dots/dot_dot_b.sol: -------------------------------------------------------------------------------- 1 | contract Dot_Dot_B { 2 | } 3 | -------------------------------------------------------------------------------- /test/libsolidity/smtCheckerTests/simple/smoke_test.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | } 3 | // ==== 4 | // SMTEngine: all 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/constants/constant_natspec.sol: -------------------------------------------------------------------------------- 1 | /// @dev Documentation 2 | uint constant x = 8; 3 | // ---- 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/events/event_nested_array_2.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | event E(uint[2][]); 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/immutable/immutable_basic.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint immutable x = 0; 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/library_simple.sol: -------------------------------------------------------------------------------- 1 | library Lib { 2 | function f() public { } 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/smoke_test.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | uint256 stateVariable1; 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libyul/functionSideEffects/empty_with_sstore.yul: -------------------------------------------------------------------------------- 1 | { 2 | sstore(0, 1) 3 | } 4 | // ---- 5 | // : writes storage 6 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/fullSimplify/smoke.yul: -------------------------------------------------------------------------------- 1 | { } 2 | // ---- 3 | // step: fullSimplify 4 | // 5 | // { { } } 6 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/rematerialiser/smoke.yul: -------------------------------------------------------------------------------- 1 | {} 2 | // ---- 3 | // step: rematerialiser 4 | // 5 | // { } 6 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/unusedPruner/smoke.yul: -------------------------------------------------------------------------------- 1 | { } 2 | // ---- 3 | // step: unusedPruner 4 | // 5 | // { { } } 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/for_statement.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x 3 | for {let i := 0} x {i := add(i, 1)} {} 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/functional.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x := 2 x := add(add(7, mul(6, x)), mul(7, 8)) 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/mcopy.yul: -------------------------------------------------------------------------------- 1 | { 2 | mcopy(0x100, 0x200, 0x300) 3 | } 4 | // ==== 5 | // EVMVersion: >=cancun 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/period_in_identifier_start.yul: -------------------------------------------------------------------------------- 1 | { 2 | x.y(2) 3 | function x.y(a) {} 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/push.yul: -------------------------------------------------------------------------------- 1 | { 0x42 } 2 | // ---- 3 | // ParserError 6913: (7-8): Call or assignment expected. 4 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/simple_instructions.yul: -------------------------------------------------------------------------------- 1 | { 2 | let y := mul(0x10, mul(0x20, mload(0x40))) 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/scripts/fixtures/smt_contract_with_lf_newlines.sol: -------------------------------------------------------------------------------- 1 | pragma experimental SMTChecker; 2 | 3 | contract C { 4 | } 5 | -------------------------------------------------------------------------------- /test/scripts/fixtures/smt_contract_with_mixed_newlines.sol: -------------------------------------------------------------------------------- 1 | pragma experimental SMTChecker; 2 | 3 | contract C { } 4 | -------------------------------------------------------------------------------- /test/cmdlineTests/ast_ir/input.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | pragma solidity >=0.0; 3 | 4 | contract C {} 5 | -------------------------------------------------------------------------------- /test/cmdlineTests/function_debug_info/args: -------------------------------------------------------------------------------- 1 | --optimize --combined-json function-debug,function-debug-runtime --pretty-json 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_untagged_jumpdest/err: -------------------------------------------------------------------------------- 1 | Error: Assembly Import Error: JUMPDEST instruction without a tag 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/mcopy_bytes_array_abi_decode/args: -------------------------------------------------------------------------------- 1 | --evm-version cancun --no-cbor-metadata --via-ir --ir --debug-info none 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_contracts_empty_contract/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine all --model-checker-contracts a.sol: 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_contracts_empty_contract/err: -------------------------------------------------------------------------------- 1 | Error: Invalid option for --model-checker-contracts: a.sol: 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_divModSlacks_false_all/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine all --model-checker-div-mod-no-slacks 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_divModSlacks_false_bmc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine bmc --model-checker-div-mod-no-slacks 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_divModSlacks_false_chc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc --model-checker-div-mod-no-slacks 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_ext_calls_untrusted_chc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc --model-checker-ext-calls untrusted 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_invariants_reentrancy/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc --model-checker-invariants reentrancy 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_print_query_superflous_solver/err: -------------------------------------------------------------------------------- 1 | Error: Only SMTLib2 solver can be enabled to print queries 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_show_proved_safe_true_bmc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine bmc --model-checker-show-proved-safe 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_show_proved_safe_true_chc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc --model-checker-show-proved-safe 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_show_unproved_true_all_engines/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine all --model-checker-show-unproved 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_show_unsupported_true_bmc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine bmc --model-checker-show-unsupported 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_show_unsupported_true_chc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc --model-checker-show-unsupported 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_targets_default_all_engines/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine all --model-checker-targets default 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_targets_div_by_zero_bmc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine bmc --model-checker-targets divByZero 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_targets_div_by_zero_chc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc --model-checker-targets divByZero 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_targets_pop_empty_bmc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine bmc --model-checker-targets popEmptyArray 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_targets_pop_empty_chc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc --model-checker-targets popEmptyArray 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_metadata/in.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | pragma solidity *; 3 | 4 | contract C {} 5 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_urls_existing_and_missing/contract.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | pragma solidity *; 3 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_asm_json_yul_verbatim/stdin: -------------------------------------------------------------------------------- 1 | /// @use-src 0: "abc.sol" 2 | { 3 | verbatim_0i_0o("xyz") 4 | } 5 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_options_in_non_asm_mode/err: -------------------------------------------------------------------------------- 1 | Error: --yul-dialect and --machine are only valid in assembly mode. 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_output_selection_ir_optimized_only/input.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x := 42 3 | sstore(0, x) 4 | } 5 | -------------------------------------------------------------------------------- /test/cmdlineTests/yul_optimizer_steps_unbalanced_closing_bracket/args: -------------------------------------------------------------------------------- 1 | --ir-optimized --optimize --yul-optimizations a]a][ 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/yul_optimizer_steps_unbalanced_opening_bracket/args: -------------------------------------------------------------------------------- 1 | --ir-optimized --optimize --yul-optimizations a[a][ 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/yul_optimizer_steps_with_empty_cleanup_sequence/args: -------------------------------------------------------------------------------- 1 | --ir-optimized --optimize --yul-optimizations iDu: 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/yul_optimizer_steps_without_optimize_empty_sequence/args: -------------------------------------------------------------------------------- 1 | --ir-optimized --metadata --yul-optimizations : 2 | -------------------------------------------------------------------------------- /test/compilationTests/corion/README.md: -------------------------------------------------------------------------------- 1 | CORION contracts, originally from 2 | 3 | https://github.com/CORIONplatform/solidity 4 | -------------------------------------------------------------------------------- /test/compilationTests/gnosis/README.md: -------------------------------------------------------------------------------- 1 | Gnosis contracts, originally from 2 | 3 | https://github.com/gnosis/gnosis-contracts 4 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/receive_ether.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | receive() external payable { 3 | } 4 | } 5 | 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/string.sol: -------------------------------------------------------------------------------- 1 | contract C { function f() public { string memory x = "Hello World"; } } 2 | 3 | // ---- 4 | -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/externalSource/_external/import.sol: -------------------------------------------------------------------------------- 1 | import "external.sol"; 2 | import "other_external.sol"; 3 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/immutable/variable_declaration_value.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | int immutable x = x = 5; 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/228_valid_library.sol: -------------------------------------------------------------------------------- 1 | library Lib { uint constant x = 9; } 2 | // ---- 3 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/event_arguments.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | event e(uint a, bytes32 s); 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/external_function.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | function x() external {} 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/fallback_function.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | fallback() external { } 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/interface_basic.sol: -------------------------------------------------------------------------------- 1 | interface Interface { 2 | function f() external; 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/event_with_rational_size_array.sol: -------------------------------------------------------------------------------- 1 | contract a { event b(uint[(1 / 1)]); } 2 | // ---- 3 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/using/using_for_enum.sol: -------------------------------------------------------------------------------- 1 | enum E {A, B, C} 2 | 3 | function f(E) {} 4 | 5 | using {f} for E; 6 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/expressionJoiner/smoke.yul: -------------------------------------------------------------------------------- 1 | { } 2 | // ---- 3 | // step: expressionJoiner 4 | // 5 | // { { } } 6 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/expressionSplitter/smoke.yul: -------------------------------------------------------------------------------- 1 | { } 2 | // ---- 3 | // step: expressionSplitter 4 | // 5 | // { } 6 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/functionGrouper/smoke.yul: -------------------------------------------------------------------------------- 1 | { } 2 | // ---- 3 | // step: functionGrouper 4 | // 5 | // { { } } 6 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/functionHoister/smoke.yul: -------------------------------------------------------------------------------- 1 | { 2 | } 3 | // ---- 4 | // step: functionHoister 5 | // 6 | // { } 7 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/empty_call.yul: -------------------------------------------------------------------------------- 1 | { () } 2 | // ---- 3 | // ParserError 1856: (2-3): Literal or identifier expected. 4 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/function_defined_in_init_block_1.yul: -------------------------------------------------------------------------------- 1 | { 2 | for { } 1 { function f() {} } {} 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/function_defined_in_init_block_2.yul: -------------------------------------------------------------------------------- 1 | { 2 | for { } 1 {} { function f() {} } 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/function_literal_valid.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x 3 | function f(a,b) {} 4 | f(x,1) 5 | } 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/vardecl_multi.yul: -------------------------------------------------------------------------------- 1 | { 2 | function f() -> x, y {} 3 | let x, y := f() 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/variable_declaration_bool.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x := true 3 | let y := false 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/scripts/fixtures/smt_contract_with_crlf_newlines.sol: -------------------------------------------------------------------------------- 1 | pragma experimental SMTChecker; 2 | 3 | contract C { 4 | } 5 | -------------------------------------------------------------------------------- /test/cmdlineTests/ast_json_import_wrong_evmVersion/args: -------------------------------------------------------------------------------- 1 | --evm-version=homestead --import-ast --combined-json ast --pretty-json 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/combined_json_abi/input.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | pragma solidity >=0.0; 3 | contract C {} 4 | -------------------------------------------------------------------------------- /test/cmdlineTests/combined_json_generated_sources/args: -------------------------------------------------------------------------------- 1 | --combined-json generated-sources,generated-sources-runtime --pretty-json 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_snippet_only/args: -------------------------------------------------------------------------------- 1 | --ir --ir-optimized --asm --optimize --debug-info snippet 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/error_codes/input.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() { 3 | 2=0; 4 | ""[2]; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/cmdlineTests/evmasm_transient_storage_inline_assembly/args: -------------------------------------------------------------------------------- 1 | --no-cbor-metadata --optimize --opcodes --asm --debug-info none 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_optimize_not_supported/err: -------------------------------------------------------------------------------- 1 | Error: Option --optimize is not supported with --import-asm-json. 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/linker_mode_invalid_option_optimize/err: -------------------------------------------------------------------------------- 1 | Error: Option --optimize is only valid in compiler and assembler modes. 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_bmc_loop_iterations_no_argument/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine bmc --model-checker-bmc-loop-iterations -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_print_query_no_smtlib2_solver_bmc/err: -------------------------------------------------------------------------------- 1 | Error: Only SMTLib2 solver can be enabled to print queries 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_print_query_no_smtlib2_solver_chc/err: -------------------------------------------------------------------------------- 1 | Error: Only SMTLib2 solver can be enabled to print queries 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_targets_out_of_bounds_bmc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine bmc --model-checker-targets outOfBounds 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_targets_out_of_bounds_chc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc --model-checker-targets outOfBounds 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/pretty_json_standard/output.json: -------------------------------------------------------------------------------- 1 | { 2 | "sources": { 3 | "A": { 4 | "id": 0 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_invalid_option_optimize/err: -------------------------------------------------------------------------------- 1 | Error: Option --optimize is only valid in compiler and assembler modes. 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_asm_json_arbitrary_source_index/args: -------------------------------------------------------------------------------- 1 | --strict-assembly - --asm-json --pretty-json --json-indent 4 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_asm_json_subobjects_with_debug/args: -------------------------------------------------------------------------------- 1 | --strict-assembly - --asm-json --pretty-json --json-indent 4 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_yul_cfg_json_export/args: -------------------------------------------------------------------------------- 1 | --strict-assembly --optimize --yul-cfg-json --pretty-json --json-indent 4 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/yul_optimizer_steps_with_empty_optimization_sequence/args: -------------------------------------------------------------------------------- 1 | --ir-optimized --optimize --yul-optimizations :iDu 2 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/short_type_name_ref.sol: -------------------------------------------------------------------------------- 1 | contract c { function f() public { uint[][] memory rows; } } 2 | 3 | // ---- 4 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/unicode.sol: -------------------------------------------------------------------------------- 1 | contract C { function f() public { string memory x = unicode"Hello 😃"; } } 2 | 3 | // ---- 4 | -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/externalSource/_relative_imports/dir/B/b.sol: -------------------------------------------------------------------------------- 1 | import {C} from "../../c.sol"; 2 | contract B { 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/externalSource/_relative_imports/dir/G/g.sol: -------------------------------------------------------------------------------- 1 | import {B} from "../B/b.sol"; 2 | contract G { 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/freeFunctions/free_storage.sol: -------------------------------------------------------------------------------- 1 | struct S { uint x; } 2 | function fun(S storage) { 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/largeTypes/large_storage_array_fine.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint[2**64 - 1] x; 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/license/license_OR.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 OR GPL-2.0 2 | contract C {} 3 | // ---- 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/modifiers/definition_in_library_virtual.sol: -------------------------------------------------------------------------------- 1 | library L { 2 | modifier m { _; } 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/417_interface_events.sol: -------------------------------------------------------------------------------- 1 | interface I { 2 | event E(); 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/mapping.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | mapping(address => bytes32) names; 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/pragma/invalid_pragma.sol: -------------------------------------------------------------------------------- 1 | pragma 0; 2 | // ---- 3 | // SyntaxError 5226: (0-9): Invalid pragma "0" 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/pragma/valid_range_disjunction_range_second.sol: -------------------------------------------------------------------------------- 1 | pragma solidity 0.8.17 || 0.4.1 - 0.9.0; 2 | // ---- 3 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/viewPureChecker/suggest_pure.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function g() view public { } 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/functionSpecializer/smoke.yul: -------------------------------------------------------------------------------- 1 | { } 2 | // ---- 3 | // step: functionSpecializer 4 | // 5 | // { } 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/function_definitions.yul: -------------------------------------------------------------------------------- 1 | { 2 | function f() { } 3 | function g(a) -> x { } 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/function_shadowing_outside_vars_1.yul: -------------------------------------------------------------------------------- 1 | { 2 | { let x } 3 | function f() -> x {} 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/period_in_identifier_start_with_comment.yul: -------------------------------------------------------------------------------- 1 | /// comment 2 | { x.y(2) function x.y(a) {} } 3 | // ---- 4 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/switch_case_different_literal.yul: -------------------------------------------------------------------------------- 1 | { 2 | switch 1 3 | case "1" {} 4 | case "2" {} 5 | } 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/tuple_assignment.yul: -------------------------------------------------------------------------------- 1 | { 2 | function f() -> a, b, c {} 3 | let x, y, z := f() 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_all_and_none/err: -------------------------------------------------------------------------------- 1 | Error: Invalid value for --debug-info option: location,all,none 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_location_only/args: -------------------------------------------------------------------------------- 1 | --ir --ir-optimized --asm --optimize --debug-info location 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/evmasm_transient_storage_state_variable_via_ir/args: -------------------------------------------------------------------------------- 1 | --no-cbor-metadata --via-ir --optimize --asm --debug-info none 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_non_unique_sources/err: -------------------------------------------------------------------------------- 1 | Error: Assembly Import Error: Items in 'sourceList' array are not unique. 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_unrecognized_field/stdin: -------------------------------------------------------------------------------- 1 | { 2 | ".code": [ 3 | {"_name": "DIFFICULTY"} 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /test/cmdlineTests/inline_assembly_function_name_clash/args: -------------------------------------------------------------------------------- 1 | --via-ir --combined-json function-debug-runtime --pretty-json --json-indent 4 -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_bmc_loop_iterations_invalid_arg/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine bmc --model-checker-bmc-loop-iterations bmc -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_show_proved_safe_true_all_engines/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine all --model-checker-show-proved-safe 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_show_unsupported_true_all_engines/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine all --model-checker-show-unsupported 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_invalid_option_optimize_yul/err: -------------------------------------------------------------------------------- 1 | Error: Option --optimize-yul is only valid in compiler and assembler modes. 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_ir_ast_requested/in.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | pragma solidity *; 3 | 4 | contract C {} 5 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_asm_json_with_debug_info_annotations/args: -------------------------------------------------------------------------------- 1 | --strict-assembly - --asm-json --pretty-json --json-indent 4 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_asm_json_without_debug_info_annotations/args: -------------------------------------------------------------------------------- 1 | --strict-assembly - --asm-json --pretty-json --json-indent 4 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_invalid_option_output_dir/err: -------------------------------------------------------------------------------- 1 | Error: The following options are invalid in assembly mode: --output-dir. 2 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/enum_value_declaration.sol: -------------------------------------------------------------------------------- 1 | enum A { X, Y } 2 | function f() pure returns (A) { return A.X; } 3 | 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/long_type_name_binary_operation.sol: -------------------------------------------------------------------------------- 1 | contract c { function f() public { uint a = 2 + 3; } } 2 | 3 | // ---- 4 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/modifier_definition.sol: -------------------------------------------------------------------------------- 1 | contract C { modifier M(uint i) { _; } function F() M(1) public {} } 2 | 3 | // ---- 4 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/modifier_invocation.sol: -------------------------------------------------------------------------------- 1 | contract C { modifier M(uint i) { _; } function F() M(1) public {} } 2 | 3 | // ---- 4 | -------------------------------------------------------------------------------- /test/libsolidity/memoryGuardTests/dialectString/stub.sol: -------------------------------------------------------------------------------- 1 | contract C {} 2 | // ---- 3 | // :C(creation) true 4 | // :C(runtime) true 5 | -------------------------------------------------------------------------------- /test/libsolidity/smtCheckerTests/file_level/free_function_3.sol: -------------------------------------------------------------------------------- 1 | function f() view {} 2 | // ==== 3 | // SMTEngine: all 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/abiEncoder/selected_twice_v2.sol: -------------------------------------------------------------------------------- 1 | pragma abicoder v2; 2 | pragma experimental ABIEncoderV2; 3 | // ---- 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/errors/selector.sol: -------------------------------------------------------------------------------- 1 | error E(); 2 | 3 | contract C { 4 | bytes4 t = E.selector; 5 | } 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/license/license_AND.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 AND GPL-2.0 2 | contract C {} 3 | // ---- 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/422_interface_enums.sol: -------------------------------------------------------------------------------- 1 | interface I { 2 | enum A { B, C } 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/pragma/valid_range_disjunction_two_ranges.sol: -------------------------------------------------------------------------------- 1 | pragma solidity 0.4.0 - 0.9.0 || 0.4.1 - 0.6.2; 2 | // ---- 3 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/string/large_utf8_codepoint.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | string s = "\xf0\x9f\xa6\x84"; 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/mapping/mapping_dynamic_key.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | mapping(string => uint) data; 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/visibility/interface/function_external.sol: -------------------------------------------------------------------------------- 1 | interface I { 2 | function f() external; 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/conditionalSimplifier/smoke.yul: -------------------------------------------------------------------------------- 1 | { } 2 | // ---- 3 | // step: conditionalSimplifier 4 | // 5 | // { } 6 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/conditionalUnsimplifier/smoke.yul: -------------------------------------------------------------------------------- 1 | { } 2 | // ---- 3 | // step: conditionalUnsimplifier 4 | // 5 | // { } 6 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/expressionSimplifier/smoke.yul: -------------------------------------------------------------------------------- 1 | { } 2 | // ---- 3 | // step: expressionSimplifier 4 | // 5 | // { { } } 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/assign_from_stack.yul: -------------------------------------------------------------------------------- 1 | { =: x } 2 | // ---- 3 | // ParserError 1856: (2-3): Literal or identifier expected. 4 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/call_literal.yul: -------------------------------------------------------------------------------- 1 | { 2 | 1() 3 | } 4 | // ---- 5 | // ParserError 9980: (7-8): Function name expected. 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/functional_assign_complex.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x := 2 x := add(add(7, mul(6, x)), mul(7, 8)) 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/number_literal_2.yul: -------------------------------------------------------------------------------- 1 | { let x := .1 } 2 | // ---- 3 | // ParserError 4828: (11-13): Invalid number literal. 4 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/number_literal_3.yul: -------------------------------------------------------------------------------- 1 | { let x := 1e5 } 2 | // ---- 3 | // ParserError 4828: (11-14): Invalid number literal. 4 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/surplus_input.yul: -------------------------------------------------------------------------------- 1 | {} 2 | {} 3 | // ---- 4 | // ParserError 2314: (3-4): Expected end of source but got '{' 5 | -------------------------------------------------------------------------------- /funding.json: -------------------------------------------------------------------------------- 1 | { 2 | "opRetro": { 3 | "projectId": "0xcc8d03e014e121d10602eeff729b755d5dc6a317df0d6302c8a9d3b5424aaba8" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/cmdlineTests/combined_json_no_pretty_print/input.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | pragma solidity >=0.0; 3 | contract C {} 4 | -------------------------------------------------------------------------------- /test/cmdlineTests/combined_json_with_base_path/c.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | pragma solidity >=0.0; 3 | 4 | contract C {} 5 | -------------------------------------------------------------------------------- /test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_all_and_none/args: -------------------------------------------------------------------------------- 1 | --ir --ir-optimized --asm --optimize --debug-info location,all,none 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/function_debug_info_via_yul/args: -------------------------------------------------------------------------------- 1 | --via-ir --optimize --combined-json function-debug,function-debug-runtime --pretty-json 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/ir_optimized_transient_storage_value_type/args: -------------------------------------------------------------------------------- 1 | --via-ir --no-cbor-metadata --ir-optimized --optimize --debug-info none 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/ir_optimized_with_optimize/input.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | pragma solidity *; 3 | 4 | contract C {} 5 | -------------------------------------------------------------------------------- /test/cmdlineTests/ir_unoptimized_with_optimize/input.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | pragma solidity *; 3 | 4 | contract C {} 5 | -------------------------------------------------------------------------------- /test/cmdlineTests/linker_mode_invalid_option_optimize_runs/err: -------------------------------------------------------------------------------- 1 | Error: Option --optimize-runs is only valid in compiler and assembler modes. 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/linker_mode_invalid_option_optimize_yul/err: -------------------------------------------------------------------------------- 1 | Error: Option --optimize-yul is only valid in compiler and assembler modes. 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/linking_strict_assembly/args: -------------------------------------------------------------------------------- 1 | --strict-assembly --libraries contract/test.sol:L=0x1234567890123456789012345678901234567890 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/linking_strict_assembly_duplicate_library_name/err: -------------------------------------------------------------------------------- 1 | Error: Address specified more than once for library "library.sol:L". 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_print_query_bmc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine bmc --model-checker-print-query --model-checker-solvers smtlib2 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_targets_constant_condition_bmc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine bmc --model-checker-targets constantCondition 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_targets_constant_condition_chc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc --model-checker-targets constantCondition 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_targets_underflow_overflow_bmc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine bmc --model-checker-targets underflow,overflow 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_targets_underflow_overflow_chc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc --model-checker-targets underflow,overflow 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/no_cbor_metadata_with_metadata_hash/err: -------------------------------------------------------------------------------- 1 | Error: Cannot specify a metadata hashing method when --no-cbor-metadata is set. 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_invalid_option_optimize_runs/err: -------------------------------------------------------------------------------- 1 | Error: Option --optimize-runs is only valid in compiler and assembler modes. 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/stop_after_parsing_abi/err: -------------------------------------------------------------------------------- 1 | Error: The following options are mutually exclusive: --stop-after, --abi. Select at most one. 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_debug_info_print_snippet_only/err: -------------------------------------------------------------------------------- 1 | Error: To use 'snippet' with --debug-info you must select also 'location'. 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_optimizer_invalid_yul_optimizer_enabled_and_disabled/args: -------------------------------------------------------------------------------- 1 | --strict-assembly --optimize-yul --no-optimize-yul 2 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/non_utf8.sol: -------------------------------------------------------------------------------- 1 | contract C { function f() public { string memory x = string(bytes(hex"ff")); } } 2 | 3 | // ---- 4 | -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/immutable/getter.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint immutable public x = 1; 3 | } 4 | // ---- 5 | // x() -> 1 6 | -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/isoltestTesting/builtins.sol: -------------------------------------------------------------------------------- 1 | contract SmokeTest { 2 | } 3 | // ---- 4 | // isoltest_builtin_test -> 0x1234 5 | -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/isoltestTesting/storage/storage_empty.sol: -------------------------------------------------------------------------------- 1 | contract StorageEmpty { 2 | } 3 | // ---- 4 | // storageEmpty -> 1 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/events/overloading_in_contract.sol: -------------------------------------------------------------------------------- 1 | contract A { 2 | event X(); 3 | event X(uint); 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/metaTypes/name_constant.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | string public constant name = type(C).name; 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/comment_end_with_double_star.sol: -------------------------------------------------------------------------------- 1 | contract C1 { 2 | /** 3 | **/ 4 | } 5 | contract C2 {} 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/import_empty.sol: -------------------------------------------------------------------------------- 1 | import ""; 2 | // ---- 3 | // ParserError 6326: (9-10): Import path cannot be empty. 4 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/functions_in_parallel_scopes.yul: -------------------------------------------------------------------------------- 1 | { 2 | { function g() {} } 3 | { function g() {} } 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/number_literal_4.yul: -------------------------------------------------------------------------------- 1 | { let x := 67.235 } 2 | // ---- 3 | // ParserError 4828: (11-17): Invalid number literal. 4 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/objects/multiple_data.yul: -------------------------------------------------------------------------------- 1 | object "A" { 2 | code { } 3 | data "one" "" 4 | data "two" "" 5 | } 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/vardecl_complex.yul: -------------------------------------------------------------------------------- 1 | { 2 | let y := 2 3 | let x := add(add(7, mul(6, y)), mul(7, 8)) 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /docs/_static/css/fonts.css: -------------------------------------------------------------------------------- 1 | @import url("https://fonts.cdnfonts.com/css/overpass"); 2 | @import url("https://fonts.cdnfonts.com/css/overpass-mono"); -------------------------------------------------------------------------------- /test/cmdlineTests/asm_json_yul_export_evm_asm_import/args: -------------------------------------------------------------------------------- 1 | --import-asm-json - --opcodes --asm --bin --asm-json --pretty-json --json-indent 4 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/ast_compact_json_with_base_path/c.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | pragma solidity >=0.0; 3 | 4 | contract C {} 5 | -------------------------------------------------------------------------------- /test/cmdlineTests/combined_json_stop_after_parsing/input.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | pragma solidity *; 3 | 4 | contract C {} 5 | -------------------------------------------------------------------------------- /test/cmdlineTests/evmasm_difficulty_post_paris/args: -------------------------------------------------------------------------------- 1 | --no-cbor-metadata --via-ir --optimize --opcodes --asm --debug-info none --evm-version paris 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/evmasm_difficulty_pre_paris/args: -------------------------------------------------------------------------------- 1 | --no-cbor-metadata --via-ir --optimize --opcodes --asm --debug-info none --evm-version london 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/evmasm_prevrandao_post_paris/args: -------------------------------------------------------------------------------- 1 | --no-cbor-metadata --via-ir --optimize --opcodes --asm --debug-info none --evm-version paris 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/evmasm_prevrandao_pre_paris/args: -------------------------------------------------------------------------------- 1 | --no-cbor-metadata --via-ir --optimize --opcodes --asm --debug-info none --evm-version london 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/evmasm_transient_storage_inline_assembly_via_ir/args: -------------------------------------------------------------------------------- 1 | --no-cbor-metadata --via-ir --optimize --opcodes --asm --debug-info none 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/linker_mode_invalid_option_no_optimize_yul/err: -------------------------------------------------------------------------------- 1 | Error: Option --no-optimize-yul is only valid in compiler and assembler modes. 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/linker_mode_invalid_option_optimize/args: -------------------------------------------------------------------------------- 1 | --optimize --link --libraries input.sol:L=0x1234567890123456789012345678901234567890 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/linking_solidity/args: -------------------------------------------------------------------------------- 1 | --bin --bin-runtime --libraries linking_solidity/input.sol:L=0x1234567890123456789012345678901234567890 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_invariants_contract_reentrancy/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc --model-checker-invariants contract,reentrancy 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_invalid_option_no_optimize_yul/err: -------------------------------------------------------------------------------- 1 | Error: Option --no-optimize-yul is only valid in compiler and assembler modes. 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_invalid_option_yul_optimizations/err: -------------------------------------------------------------------------------- 1 | Error: Option --yul-optimizations is only valid in compiler and assembler modes. 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_irOptimized_ast_requested/in.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | pragma solidity *; 3 | 4 | contract C {} 5 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_type_sources/input.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "Solidity", 3 | "sources": ["source1", "source2", "source3"] 4 | } 5 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_only_cr/err: -------------------------------------------------------------------------------- 1 | Error: Expected keyword "object". 2 | --> strict_asm_only_cr/input.yul:1:2: 3 | | 4 | 1 | 5 | | ^ 6 | -------------------------------------------------------------------------------- /test/cmdlineTests/yul_optimizer_disabled_sequence_empty/input.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | pragma solidity >=0.0; 3 | contract C { } -------------------------------------------------------------------------------- /test/cmdlineTests/yul_optimizer_steps_invalid_abbreviation/args: -------------------------------------------------------------------------------- 1 | --ir-optimized --optimize --yul-optimizations abcdefg{hijklmno}pqr[st]uvwxyz 2 | -------------------------------------------------------------------------------- /test/compilationTests/MultiSigWallet/README.md: -------------------------------------------------------------------------------- 1 | MultiSigWallet contracts, originally from 2 | 3 | https://github.com/ConsenSys/MultiSigWallet 4 | -------------------------------------------------------------------------------- /test/compilationTests/milestonetracker/README.md: -------------------------------------------------------------------------------- 1 | Giveth milestone tracker, originally from 2 | 3 | https://github.com/Giveth/milestonetracker/ 4 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/event_with_variables_of_internal_types.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | event E(function() internal); 3 | } 4 | 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/long_type_name_identifier.sol: -------------------------------------------------------------------------------- 1 | contract c { uint[] a; function f() public { uint[] storage b = a; } } 2 | 3 | // ---- 4 | -------------------------------------------------------------------------------- /test/libsolidity/lsp/didChange_template.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity >=0.8.0; 3 | 4 | contract C 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/optimizedIRCaching/multiple_contracts.sol: -------------------------------------------------------------------------------- 1 | contract C {} 2 | contract D {} 3 | contract E {} 4 | // ---- 5 | // cachedObjects: 6 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/array/length/constant_var.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint constant LEN = 10; 3 | uint[LEN] ids; 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/events/events_with_same_name.sol: -------------------------------------------------------------------------------- 1 | contract TestIt { 2 | event A(); 3 | event A(uint i); 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/immutable/reading_during_statevar_init.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint immutable x = 0; 3 | uint y = x; 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/inlineAssembly/memory_safe_in_dialect_string.sol: -------------------------------------------------------------------------------- 1 | function f() pure { 2 | assembly "evmasm" ("memory-safe") {} 3 | } -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/license/license_whitespace_after_colon.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | contract C {} 3 | // ---- 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/license/license_whitespace_before_spdx.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | contract C {} 3 | // ---- 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/literalOperations/mod_zero_nonliteral.sol: -------------------------------------------------------------------------------- 1 | contract A { 2 | constructor() { uint a; a % 0; } 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/418_interface_inheritance.sol: -------------------------------------------------------------------------------- 1 | interface A { 2 | } 3 | interface I is A { 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/mapping_with_names_2.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | mapping(address => bytes32 ipfs) names; 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/mapping_with_names_3.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | mapping(address user => bytes32) names; 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/multi_arrays.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | mapping(uint => mapping(uint => int8)[8][][9])[] x; 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/revertStatement/at_file_level.sol: -------------------------------------------------------------------------------- 1 | revert X(); 2 | // ---- 3 | // ParserError 2314: (8-9): Expected ';' but got '(' 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/revertStatement/in_global_function.sol: -------------------------------------------------------------------------------- 1 | error E(); 2 | function f() pure { 3 | revert E(); 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/userDefinedValueType/forward_reference_array.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | Left[] pu1; 3 | } 4 | type Left is bytes2; 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/userDefinedValueType/forward_reference_struct.sol: -------------------------------------------------------------------------------- 1 | struct S { U u; } 2 | contract C { S s; } 3 | type U is address; 4 | -------------------------------------------------------------------------------- /test/libyul/yulInterpreterTests/smoke.yul: -------------------------------------------------------------------------------- 1 | {} 2 | // ---- 3 | // Trace: 4 | // Memory dump: 5 | // Storage dump: 6 | // Transient storage dump: 7 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/for_statement_break_nested_body_in_init.yul: -------------------------------------------------------------------------------- 1 | { 2 | for {let x for {} x {} { break }} 1 {} 3 | {} 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/for_statement_break_nested_body_in_post.yul: -------------------------------------------------------------------------------- 1 | { 2 | for {} 1 {let x for {} x {} { break }} 3 | {} 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/function_def_multiple_args.yul: -------------------------------------------------------------------------------- 1 | { 2 | function f(a, d) { } 3 | function g(a, d) -> x, y { } 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/functions_multiple_args.yul: -------------------------------------------------------------------------------- 1 | { 2 | function f(a, d) { } 3 | function g(a, d) -> x, y { } 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/hex_switch_case.yul: -------------------------------------------------------------------------------- 1 | { 2 | switch codesize() 3 | case hex"00" {} 4 | case hex"1122" {} 5 | } 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/if_statement_fail_1.yul: -------------------------------------------------------------------------------- 1 | { if let x {} } 2 | // ---- 3 | // ParserError 1856: (5-8): Literal or identifier expected. 4 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/if_statement_scope_1.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x := 2 3 | if 42 { x := 3 } 4 | } 5 | // ==== 6 | // dialect: evm 7 | // ---- 8 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/loadimmutable.yul: -------------------------------------------------------------------------------- 1 | { 2 | let addr := loadimmutable("address") 3 | } 4 | // ==== 5 | // dialect: evm 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/number_literals_2.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x := .1 3 | } 4 | // ---- 5 | // ParserError 4828: (12-14): Invalid number literal. 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/number_literals_3.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x := 1e5 3 | } 4 | // ---- 5 | // ParserError 4828: (12-15): Invalid number literal. 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/objects/code_without_object.yul: -------------------------------------------------------------------------------- 1 | code { 2 | } 3 | // ---- 4 | // ParserError 4294: (0-4): Expected keyword "object". 5 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/objects/empty_object.yul: -------------------------------------------------------------------------------- 1 | object "A" { 2 | } 3 | // ---- 4 | // ParserError 4846: (13-14): Expected keyword "code". 5 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/objects/incomplete1.yul: -------------------------------------------------------------------------------- 1 | object { 2 | // ---- 3 | // ParserError 2314: (7-8): Expected 'StringLiteral' but got '{' 4 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/string_literal_switch_case.yul: -------------------------------------------------------------------------------- 1 | { 2 | switch codesize() 3 | case "1" {} 4 | case "2" {} 5 | } 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/vardecl_bool.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x := true 3 | let y := false 4 | } 5 | // ==== 6 | // dialect: evm 7 | // ---- 8 | -------------------------------------------------------------------------------- /test/cmdlineTests/ast_compact_json_no_pretty_json/input.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | pragma solidity >=0.0; 3 | 4 | contract C {} 5 | -------------------------------------------------------------------------------- /test/cmdlineTests/ast_compact_json_with_base_path/input.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | pragma solidity >=0.0; 3 | 4 | import "./c.sol"; 5 | -------------------------------------------------------------------------------- /test/cmdlineTests/combined_json_with_base_path/input.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | pragma solidity >=0.0; 3 | 4 | import "./c.sol"; 5 | -------------------------------------------------------------------------------- /test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_snippet_only/err: -------------------------------------------------------------------------------- 1 | Error: To use 'snippet' with --debug-info you must select also 'location'. 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/ir_unoptimized_with_optimize_via_ir/input.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | pragma solidity *; 3 | 4 | contract C {} 5 | -------------------------------------------------------------------------------- /test/cmdlineTests/linker_mode_invalid_option_yul_optimizations/err: -------------------------------------------------------------------------------- 1 | Error: Option --yul-optimizations is only valid in compiler and assembler modes. 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/no_import_callback/contract_1.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | pragma solidity >=0.0; 3 | 4 | import "contract_2.sol"; 5 | -------------------------------------------------------------------------------- /test/cmdlineTests/optimizer_enabled_invalid_yul_optimizer_enabled_and_disabled/input.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | pragma solidity *; 3 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_optimizer_yul/output.json: -------------------------------------------------------------------------------- 1 | { 2 | "sources": { 3 | "A": { 4 | "id": 0 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_code_generation_error/err: -------------------------------------------------------------------------------- 1 | Error: Some immutables were read from but never assigned, possibly because of optimization. 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/yul_optimizer_steps_nesting_too_deep/err: -------------------------------------------------------------------------------- 1 | Error: Invalid optimizer step sequence in --yul-optimizations: Brackets nested too deep 2 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/base_constructor_call.sol: -------------------------------------------------------------------------------- 1 | contract A { constructor(uint) {} } 2 | contract C is A { constructor() A(2) {} } 3 | 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/lsp/analyze-full-project/C.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity >=0.8.0; 3 | 4 | contract C 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/lsp/analyze-full-project/D.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity >=0.8.0; 3 | 4 | contract D 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/lsp/analyze-full-project/E.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity >=0.8.0; 3 | 4 | contract E 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/abstract/library.sol: -------------------------------------------------------------------------------- 1 | abstract library A { } 2 | // ---- 3 | // TypeError 9571: (0-22): Libraries cannot be abstract. 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/errors/anonymous.sol: -------------------------------------------------------------------------------- 1 | error E() anonymous; 2 | // ---- 3 | // ParserError 2314: (10-19): Expected ';' but got 'anonymous' 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/events/event_array_v2.sol: -------------------------------------------------------------------------------- 1 | pragma abicoder v2; 2 | contract c { 3 | event E(uint[]); 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/immutable/decrement.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint immutable x; 3 | constructor() { 4 | x--; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/immutable/increment.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint immutable x; 3 | constructor() { 4 | x++; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/largeTypes/large_storage_arrays_combined.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint[200][200][2**30][][2**30] x; 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/literals/hex_string_underscores_valid.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | bytes constant c = hex"12_3456_789012"; 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/526_fallback_marked_external.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | fallback () external { } 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/shadowsBuiltin/ignores_constructor.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | constructor() {} 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/address_payable_constant.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | address payable constant a = payable(0); 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/arrays_in_events.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | event e(uint[10] a, bytes7[8] indexed b, c[3] x); 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/function_type_state_variable.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function() x; 3 | function() y = x; 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/mapping_with_names_1.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | mapping(address user => bytes32 ipfs) names; 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/user_defined_value_type.sol: -------------------------------------------------------------------------------- 1 | type MyInt is uint; 2 | 3 | contract C { 4 | type MyAddress is address; 5 | } 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/mapping/mapping_dynamic_key_public.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | mapping(string => uint) public data; 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libyul/evmCodeTransform/stackReuse/smoke.yul: -------------------------------------------------------------------------------- 1 | {} 2 | // ==== 3 | // stackOptimization: true 4 | // ---- 5 | // /* "":0:2 */ 6 | // stop 7 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/commonSubexpressionEliminator/smoke.yul: -------------------------------------------------------------------------------- 1 | { } 2 | // ---- 3 | // step: commonSubexpressionEliminator 4 | // 5 | // { } 6 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/unusedFunctionParameterPruner/smoke.yul: -------------------------------------------------------------------------------- 1 | {} 2 | // ---- 3 | // step: unusedFunctionParameterPruner 4 | // 5 | // { } 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/for_statement_break.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x 3 | for {let i := 0} x {i := add(i, 1)} 4 | { 5 | break 6 | } 7 | } 8 | // ---- 9 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/for_statement_continue_nested_body_in_post.yul: -------------------------------------------------------------------------------- 1 | { 2 | for {} 1 {let x for {} x {} { continue }} 3 | {} 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/for_visibility_1.yul: -------------------------------------------------------------------------------- 1 | { 2 | for { let i := 1 } i { pop(i) } { pop(i) } 3 | } 4 | // ==== 5 | // dialect: evm 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/keywords.yul: -------------------------------------------------------------------------------- 1 | { 2 | return (byte(1, 2), 2) 3 | pop(address()) // this is valid (but unreachable) code 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/number_literals_4.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x := 67.235 3 | } 4 | // ---- 5 | // ParserError 4828: (12-18): Invalid number literal. 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/objects/basic_subobject.yul: -------------------------------------------------------------------------------- 1 | object "A" { 2 | code {} 3 | 4 | object "B" { 5 | code {} 6 | } 7 | } 8 | // ---- 9 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/period_in_identifier_spaced_1.yul: -------------------------------------------------------------------------------- 1 | { let x. y } 2 | // ---- 3 | // ParserError 6913: (11-12): Call or assignment expected. 4 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/period_in_identifier_spaced_2.yul: -------------------------------------------------------------------------------- 1 | { let x .y } 2 | // ---- 3 | // ParserError 1856: (8-9): Literal or identifier expected. 4 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/period_not_as_identifier_start.yul: -------------------------------------------------------------------------------- 1 | { let .y } 2 | // ---- 3 | // ParserError 2314: (6-7): Expected identifier but got '.' 4 | -------------------------------------------------------------------------------- /test/cmdlineTests/asm_json_import_sourcelist_with_null_elements/err: -------------------------------------------------------------------------------- 1 | Error: Assembly Import Error: The 'sourceList' array contains invalid 'null' item. 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_difficulty_prevrandao/output: -------------------------------------------------------------------------------- 1 | Opcodes: 2 | PREVRANDAO PREVRANDAO 3 | EVM assembly: 4 | prevrandao 5 | prevrandao 6 | -------------------------------------------------------------------------------- /test/cmdlineTests/linker_mode_invalid_option_optimize_yul/args: -------------------------------------------------------------------------------- 1 | --optimize-yul --link --libraries input.sol:L=0x1234567890123456789012345678901234567890 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_contracts_only_one/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine all --model-checker-contracts model_checker_contracts_only_one/input.sol:A 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_ext_calls_empty_arg/err: -------------------------------------------------------------------------------- 1 | Error: No input files given. If you wish to use the standard input please specify "-" explicitly. 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_invariants_contract_eld/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc --model-checker-invariants contract --model-checker-solvers eld 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_print_query_no_smtlib2_solver_bmc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine bmc --model-checker-print-query --model-checker-solvers z3 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_print_query_no_smtlib2_solver_chc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc --model-checker-print-query --model-checker-solvers z3 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_targets_underflow_overflow_assert_bmc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine bmc --model-checker-targets underflow,overflow,assert 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_targets_underflow_overflow_assert_chc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc --model-checker-targets underflow,overflow,assert 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_default_success/output.json: -------------------------------------------------------------------------------- 1 | { 2 | "sources": { 3 | "A": { 4 | "id": 0 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_optimizer_no_yul/output.json: -------------------------------------------------------------------------------- 1 | { 2 | "sources": { 3 | "A": { 4 | "id": 0 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_yul_single_file_via_urls/input.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "Yul", 3 | "sources": { 4 | "C": {"urls": ["in.yul"]} 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/cmdlineTests/stop_after_parsing_ast/input.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | pragma solidity *; 3 | 4 | import "A"; 5 | 6 | contract C {} 7 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_jump/err: -------------------------------------------------------------------------------- 1 | Error: Function "jump" not found. 2 | --> strict_asm_jump/input.yul:1:3: 3 | | 4 | 1 | { jump(1) } 5 | | ^^^^ 6 | -------------------------------------------------------------------------------- /test/cmdlineTests/yul_optimizer_steps_nested_brackets/args: -------------------------------------------------------------------------------- 1 | --ir-optimized --optimize --yul-optimizations a[[a][[aa]aa[aa]][]]aaa[aa[aa[aa]]]a[a][a][a]a[a] 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/yul_optimizer_steps_unbalanced_closing_bracket/err: -------------------------------------------------------------------------------- 1 | Error: Invalid optimizer step sequence in --yul-optimizations: Unbalanced brackets 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/yul_optimizer_steps_unbalanced_opening_bracket/err: -------------------------------------------------------------------------------- 1 | Error: Invalid optimizer step sequence in --yul-optimizations: Unbalanced brackets 2 | -------------------------------------------------------------------------------- /test/libsolidity/lsp/include-paths-nested-2/A/foo.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity >=0.8.0; 3 | 4 | contract A 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/lsp/include-paths-nested/A/B/foo.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity >=0.8.0; 3 | 4 | contract B 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/lsp/include-paths-nested/A/foo.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity >=0.8.0; 3 | 4 | contract A 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/lsp/node_modules/rootlib.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity >=0.8.0; 3 | 4 | library MyRootLib 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/externalSource/_source_name_starting_with_dots/dir/contract.sol: -------------------------------------------------------------------------------- 1 | import {A} from "./a.sol"; 2 | import {B} from "../b.sol"; 3 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/constructor/constructor_storage_abstract.sol: -------------------------------------------------------------------------------- 1 | abstract contract A { 2 | constructor(uint[] storage a) {} 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/errors/indexed_error.sol: -------------------------------------------------------------------------------- 1 | error E(uint indexed); 2 | // ---- 3 | // ParserError 2314: (13-20): Expected ',' but got 'indexed' 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/fallback/payable_fallback_without_receive_empty.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | fallback() external payable { } 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/immutable/immutable_state_var_named_transient.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | address public immutable transient; 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/literalOperations/division_by_zero_nonliteral.sol: -------------------------------------------------------------------------------- 1 | contract A { 2 | constructor() { uint a; a / 0; } 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/191_negative_integers_to_signed_min.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | int8 public i = -128; 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/251_using_for_library.sol: -------------------------------------------------------------------------------- 1 | library D { } 2 | contract C { 3 | using D for uint; 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/355_payable_external.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f() payable external {} 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/address_payable_library.sol: -------------------------------------------------------------------------------- 1 | library L { 2 | } 3 | contract C { 4 | using L for address payable; 5 | } 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/import_complex_without_from.sol: -------------------------------------------------------------------------------- 1 | import {hello, world}; 2 | // ---- 3 | // ParserError 8208: (21-22): Expected "from". 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/mapping_with_names_7.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | mapping(address owner => bytes32[] note) notes; 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/modifier_arguments.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | modifier mod(address a) { if (msg.sender == a) _; } 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/userDefinedValueType/mapping_key.sol: -------------------------------------------------------------------------------- 1 | type MyInt is int; 2 | contract C { 3 | mapping(MyInt => int) m; 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/using/using_lhs_asterisk.sol: -------------------------------------------------------------------------------- 1 | using * for uint; 2 | // ---- 3 | // ParserError 2314: (6-7): Expected identifier but got '*' 4 | -------------------------------------------------------------------------------- /test/libyul/functionSideEffects/empty.yul: -------------------------------------------------------------------------------- 1 | { 2 | } 3 | // ---- 4 | // : movable, movable apart from effects, can be removed, can be removed if no msize 5 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/unusedPruner/multi_declarations.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x, y 3 | } 4 | // ---- 5 | // step: unusedPruner 6 | // 7 | // { { } } 8 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/unusedPruner/pop.yul: -------------------------------------------------------------------------------- 1 | { 2 | let a := 1 3 | pop(a) 4 | } 5 | // ---- 6 | // step: unusedPruner 7 | // 8 | // { { } } 9 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/varDeclInitializer/simple.yul: -------------------------------------------------------------------------------- 1 | { 2 | let a 3 | } 4 | // ---- 5 | // step: varDeclInitializer 6 | // 7 | // { let a := 0 } 8 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/for_expr_invalid_2.yul: -------------------------------------------------------------------------------- 1 | { 2 | for 1 1 {} {} 3 | } 4 | // ---- 5 | // ParserError 2314: (7-8): Expected '{' but got 'Number' 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/for_expr_invalid_3.yul: -------------------------------------------------------------------------------- 1 | { 2 | for {} 1 1 {} 3 | } 4 | // ---- 5 | // ParserError 2314: (12-13): Expected '{' but got 'Number' 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/for_expr_invalid_4.yul: -------------------------------------------------------------------------------- 1 | { 2 | for {} 1 {} 1 3 | } 4 | // ---- 5 | // ParserError 2314: (15-16): Expected '{' but got 'Number' 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/for_statement_continue.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x 3 | for {let i := 0} x {i := add(i, 1)} 4 | { 5 | continue 6 | } 7 | } 8 | // ---- 9 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/for_statement_continue_nested_body_in_init.yul: -------------------------------------------------------------------------------- 1 | { 2 | for {let x for {} x {} { continue }} 1 {} 3 | { 4 | } 5 | } 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/functional_returndatacopy.yul: -------------------------------------------------------------------------------- 1 | { 2 | returndatacopy(0, 32, 64) 3 | } 4 | // ==== 5 | // EVMVersion: >=byzantium 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/if_statement_3.yul: -------------------------------------------------------------------------------- 1 | { 2 | function f() -> x {} 3 | 4 | if f() 5 | { 6 | let b := f() 7 | } 8 | } 9 | // ---- 10 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/invalid/label_disallowed.yul: -------------------------------------------------------------------------------- 1 | { 2 | label: 3 | } 4 | // ---- 5 | // ParserError 6913: (11-12): Call or assignment expected. 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/period_in_identifier_spaced_3.yul: -------------------------------------------------------------------------------- 1 | { let x . y } 2 | // ---- 3 | // ParserError 1856: (8-9): Literal or identifier expected. 4 | -------------------------------------------------------------------------------- /scripts/download_ossfuzz_corpus.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | set -e 3 | cd /tmp 4 | git clone --depth 1 https://github.com/ethereum/solidity-fuzzing-corpus.git 5 | -------------------------------------------------------------------------------- /test/cmdlineTests/abiencoderv2_no_warning/output: -------------------------------------------------------------------------------- 1 | 2 | ======= abiencoderv2_no_warning/input.sol:C ======= 3 | Function signatures: 4 | 3fc03eeb: f((uint256)) 5 | -------------------------------------------------------------------------------- /test/cmdlineTests/combined_json_no_pretty_print/output: -------------------------------------------------------------------------------- 1 | {"contracts":{"combined_json_no_pretty_print/input.sol:C":{"abi":[]}},"version": ""} 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/evm_version_constantinople/err: -------------------------------------------------------------------------------- 1 | Warning: Source file does not specify required compiler version! 2 | --> evm_version_constantinople/input.sol 3 | -------------------------------------------------------------------------------- /test/cmdlineTests/linker_mode_invalid_option_no_optimize_yul/args: -------------------------------------------------------------------------------- 1 | --no-optimize-yul --link --libraries input.sol:L=0x1234567890123456789012345678901234567890 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/linker_mode_invalid_option_optimize_runs/args: -------------------------------------------------------------------------------- 1 | --optimize-runs 1000 --link --libraries input.sol:L=0x1234567890123456789012345678901234567890 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/mcopy_bytes_array_returned_from_function/args: -------------------------------------------------------------------------------- 1 | --evm-version cancun --no-cbor-metadata --via-ir --optimize --ir-optimized --debug-info none 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/mcopy_string_literal_returned_from_function/args: -------------------------------------------------------------------------------- 1 | --evm-version cancun --no-cbor-metadata --via-ir --optimize --ir-optimized --debug-info none 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_bmc_loop_iterations_invalid_arg/err: -------------------------------------------------------------------------------- 1 | Error: the argument ('bmc') for option '--model-checker-bmc-loop-iterations' is invalid 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_contracts_inexistent_source/err: -------------------------------------------------------------------------------- 1 | Warning: Requested source "model_checker_contracts_inexistent_source/A.sol" does not exist. 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_print_query_superflous_solver/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine bmc --model-checker-print-query --model-checker-solvers z3,smtlib2 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/optimizer_enabled_invalid_yul_optimizer_enabled_and_disabled/err: -------------------------------------------------------------------------------- 1 | Error: Options --optimize-yul and --no-optimize-yul cannot be used together. 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_non_utf8_filename/input.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farichaa/solidity/HEAD/test/cmdlineTests/standard_non_utf8_filename/input.json -------------------------------------------------------------------------------- /test/cmdlineTests/standard_optimizer_yulDetails/output.json: -------------------------------------------------------------------------------- 1 | { 2 | "sources": { 3 | "A": { 4 | "id": 0 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_output_selection_empty/output.json: -------------------------------------------------------------------------------- 1 | { 2 | "sources": { 3 | "C": { 4 | "id": 0 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/cmdlineTests/storage_layout_user_defined_no_pretty_print/input.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL v3 2 | pragma solidity >=0.0; 3 | 4 | contract C {} 5 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/assembly/empty_block.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function g() view public { 3 | assembly { {} } 4 | } 5 | } 6 | 7 | // ---- 8 | -------------------------------------------------------------------------------- /test/libsolidity/lsp/include-paths-nested-2/A/B/foo.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity >=0.8.0; 3 | 4 | contract B 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/lsp/include-paths-nested/A/B/C/foo.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity >=0.8.0; 3 | 4 | contract C 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/various/super_alone.sol: -------------------------------------------------------------------------------- 1 | contract A { 2 | function f() public { 3 | super; 4 | } 5 | } 6 | // ---- 7 | // f() -> 8 | -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/viaYul/smoke_test.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | } 3 | // ==== 4 | // allowNonExistingFunctions: true 5 | // ---- 6 | // f() -> FAILURE 7 | -------------------------------------------------------------------------------- /test/libsolidity/smtCheckerTests/types/event_with_rational_size_array.sol: -------------------------------------------------------------------------------- 1 | contract a { event b(uint[(1 / 1)]); } 2 | // ==== 3 | // SMTEngine: all 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/constants/constant_state_variable_named_transient.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | int constant public transient = 0; 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/constants/constant_unassigned.sol: -------------------------------------------------------------------------------- 1 | uint constant x; 2 | // ---- 3 | // TypeError 4266: (0-15): Uninitialized "constant" variable. 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/events/event_nested_array_v2.sol: -------------------------------------------------------------------------------- 1 | pragma abicoder v2; 2 | contract c { 3 | event E(uint[][]); 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/events/events_with_same_name_different_types.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | event A(uint); 3 | event A(bytes); 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/literalOperations/mod_zero_compound.sol: -------------------------------------------------------------------------------- 1 | contract A { 2 | uint a; 3 | constructor() { a = 5; a %= 0; } 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/104_empty_name_input_parameter.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f(uint) public { } 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/event_arguments_indexed.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | event e(uint a, bytes32 indexed s, bool indexed b); 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/no_function_params.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | uint256 stateVar; 3 | function functionName() public {} 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/pragma/unknown_pragma.sol: -------------------------------------------------------------------------------- 1 | pragma thisdoesntexist; 2 | // ---- 3 | // SyntaxError 4936: (0-23): Unknown pragma "thisdoesntexist" 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/userDefinedValueType/forward_reference_constant_variable_declaration.sol: -------------------------------------------------------------------------------- 1 | MyInt constant x = MyInt.wrap(20); 2 | type MyInt is int; 3 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/using/undeclared_library.sol: -------------------------------------------------------------------------------- 1 | using L for uint; 2 | // ---- 3 | // DeclarationError 9589: (6-7): Identifier is not a library name. 4 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/builtin_identifier_6.yul: -------------------------------------------------------------------------------- 1 | { 2 | add := 1 3 | } 4 | // ---- 5 | // ParserError 6272: (7-9): Cannot assign to builtin function "add". 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/for_expr_invalid_1.yul: -------------------------------------------------------------------------------- 1 | { 2 | for {} {} {} {} 3 | } 4 | // ---- 5 | // ParserError 1856: (10-11): Literal or identifier expected. 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/function_defined_in_init_nested_1.yul: -------------------------------------------------------------------------------- 1 | { 2 | for { 3 | for {} 1 { function f() {} } 4 | {} 5 | } 1 {} 6 | {} 7 | } 8 | // ---- 9 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/instructions.yul: -------------------------------------------------------------------------------- 1 | { pop } 2 | // ==== 3 | // dialect: evm 4 | // ---- 5 | // ParserError 6913: (6-7): Call or assignment expected. 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/invalid/jump_disallowed.yul: -------------------------------------------------------------------------------- 1 | { 2 | jump(2) 3 | } 4 | // ---- 5 | // DeclarationError 4619: (6-10): Function "jump" not found. 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/invalid/literals_on_stack_disallowed.yul: -------------------------------------------------------------------------------- 1 | { 2 | 1 3 | } 4 | // ---- 5 | // ParserError 6913: (8-9): Call or assignment expected. 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/linkersymbol_evm.yul: -------------------------------------------------------------------------------- 1 | { 2 | let addr := linkersymbol("contract/library.sol:L") 3 | } 4 | // ==== 5 | // dialect: evm 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/objects/empty_data.yul: -------------------------------------------------------------------------------- 1 | object "A" { 2 | data "tmp" "" 3 | } 4 | // ---- 5 | // ParserError 4846: (15-19): Expected keyword "code". 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/optional_types.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x := 1 3 | let y := 1 4 | function f(a) {} 5 | function g(a) -> b {} 6 | } 7 | // ---- 8 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_invalid_data_not_hex/err: -------------------------------------------------------------------------------- 1 | Error: Assembly Import Error: The value for key '0' inside '.data' is not a valid hexadecimal string. 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_no_value/err: -------------------------------------------------------------------------------- 1 | Error: Assembly Import Error: Member 'value' is missing for instruction 'PUSH', but the instruction needs a value. 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/linker_mode_invalid_option_yul_optimizations/args: -------------------------------------------------------------------------------- 1 | --yul-optimizations a --link --libraries input.sol:L=0x1234567890123456789012345678901234567890 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/linking_strict_assembly_unresolved_references/args: -------------------------------------------------------------------------------- 1 | --strict-assembly --libraries contract/test.sol:L1=0x1234567890123456789012345678901234567890 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/no_cbor_metadata/output: -------------------------------------------------------------------------------- 1 | 2 | ======= no_cbor_metadata/input.sol:C ======= 3 | Binary: 4 | 608080604052346013576003908160188239f35b5f80fdfe5f80fd 5 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_model_checker_engine_none/output.json: -------------------------------------------------------------------------------- 1 | { 2 | "sources": { 3 | "A": { 4 | "id": 0 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_non_utf8_filename2/input.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farichaa/solidity/HEAD/test/cmdlineTests/standard_non_utf8_filename2/input.json -------------------------------------------------------------------------------- /test/cmdlineTests/standard_raw_utf16_filename/input.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farichaa/solidity/HEAD/test/cmdlineTests/standard_raw_utf16_filename/input.json -------------------------------------------------------------------------------- /test/cmdlineTests/storage_layout_user_defined/err: -------------------------------------------------------------------------------- 1 | Warning: Source file does not specify required compiler version! 2 | --> storage_layout_user_defined/input.sol 3 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_evm_version_byzantium/err: -------------------------------------------------------------------------------- 1 | Warning: Support for EVM versions older than constantinople is deprecated and will be removed in the future. 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_optimizer_invalid_yul_optimizer_enabled_and_disabled/err: -------------------------------------------------------------------------------- 1 | Error: Options --optimize-yul and --no-optimize-yul cannot be used together. 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/yul_optimizer_steps_invalid_abbreviation/err: -------------------------------------------------------------------------------- 1 | Error: Invalid optimizer step sequence in --yul-optimizations: 'b' is not a valid step abbreviation 2 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/assembly/stringlit.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function m() public { 3 | assembly { let x := "abc" } 4 | } 5 | } 6 | 7 | // ---- 8 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/using_for_directive.sol: -------------------------------------------------------------------------------- 1 | using {f} for uint; 2 | library L {} 3 | function f(uint) {} 4 | contract C { using L for *; } 5 | 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/libsolidity/lsp/include-paths-nested-2/foo.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity >=0.8.0; 3 | 4 | contract RootContract 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/lsp/include-paths-nested/foo.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity >=0.8.0; 3 | 4 | contract RootContract 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/constructor/payable_constructor.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | constructor() payable {} 3 | } 4 | // ---- 5 | // constructor(), 27 wei -> 6 | -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/operators/shifts/shift_constant_left.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint256 public a = 0x42 << 8; 3 | } 4 | // ---- 5 | // a() -> 0x4200 6 | -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/operators/shifts/shift_constant_right.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint256 public a = 0x4200 >> 8; 3 | } 4 | // ---- 5 | // a() -> 0x42 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/array/bytes_pop.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | bytes data; 3 | function test() public { 4 | data.pop(); 5 | } 6 | } 7 | // ---- 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/duplicate_contract.sol: -------------------------------------------------------------------------------- 1 | contract X {} 2 | contract X {} 3 | // ---- 4 | // DeclarationError 2333: (14-27): Identifier already declared. 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/errors/error_location_memory.sol: -------------------------------------------------------------------------------- 1 | error E(uint[] memory); 2 | // ---- 3 | // ParserError 2314: (15-21): Expected ',' but got 'memory' 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/errors/using_structs.sol: -------------------------------------------------------------------------------- 1 | struct S {uint a;} 2 | contract C { 3 | error MyError(S); 4 | error MyError2(S t); 5 | } 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/events/event_array_indexed_v2.sol: -------------------------------------------------------------------------------- 1 | pragma abicoder v2; 2 | contract c { 3 | event E(uint[] indexed); 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/experimental/inference/experimental_keywords.sol: -------------------------------------------------------------------------------- 1 | function f() pure { 2 | uint word; word; 3 | uint static_assert; static_assert; 4 | } -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/fallback/returns.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | fallback(bytes calldata _input) external returns (bytes memory _output) {} 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/imports/library_name_clash_with_contract.sol: -------------------------------------------------------------------------------- 1 | ==== Source: a ==== 2 | contract A {} 3 | ==== Source: b ==== 4 | library A {} 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/imports/regular_import.sol: -------------------------------------------------------------------------------- 1 | ==== Source: a ==== 2 | contract C {} 3 | ==== Source: b ==== 4 | import "a"; contract D is C {} 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/074_fallback_function.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint x; 3 | fallback() external { x = 2; } 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/419_interface_structs.sol: -------------------------------------------------------------------------------- 1 | interface I { 2 | struct A { 3 | int dummy; 4 | } 5 | } 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/assembly_evmasm_type.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public pure { 3 | assembly "evmasm" {} 4 | } 5 | } 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/mapping_with_names_8.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | mapping(address => mapping(address => address) hello) world; 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/pragma/empty_version.sol: -------------------------------------------------------------------------------- 1 | pragma solidity; 2 | // ---- 3 | // ParserError 1684: (0-16): Invalid version pragma. Empty version pragma. 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/pragma/unterminated_pragma.sol: -------------------------------------------------------------------------------- 1 | pragma solidity 0.4.3 2 | // ---- 3 | // ParserError 2314: (22-22): Expected ';' but got end of source 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/using/using_empty_list_file_level.sol: -------------------------------------------------------------------------------- 1 | using {} for uint; 2 | // ---- 3 | // ParserError 2314: (7-8): Expected identifier but got '}' 4 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/structuralSimplifier/if_false_condition.yul: -------------------------------------------------------------------------------- 1 | { if 0 { mstore(0, 0) } } 2 | // ---- 3 | // step: structuralSimplifier 4 | // 5 | // { } 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/blobbasefee_identifier_pre_cancun.yul: -------------------------------------------------------------------------------- 1 | { 2 | function blobbasefee() {} 3 | } 4 | // ==== 5 | // EVMVersion: <=shanghai 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/dot_leading_function.yul: -------------------------------------------------------------------------------- 1 | { 2 | function .x() {} 3 | } 4 | // ---- 5 | // ParserError 2314: (15-16): Expected identifier but got '.' 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/if_statement_fail_2.yul: -------------------------------------------------------------------------------- 1 | { if true let x := 3 } 2 | // ---- 3 | // ParserError 2314: (10-13): Expected '{' but got reserved keyword 'let' 4 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/invalid/jumpi_disallowed.yul: -------------------------------------------------------------------------------- 1 | { 2 | jumpi(2, 1) 3 | } 4 | // ---- 5 | // DeclarationError 4619: (6-11): Function "jumpi" not found. 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/invalid_type.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x: invalidType 3 | } 4 | // ---- 5 | // ParserError 5473: (10-24): Types are not supported in untyped Yul. 6 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/switch_case_string_literal_very_long.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x 3 | switch x 4 | case "01234567890123456789012345678901" {} 5 | } 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/libyul/yulSyntaxTests/switch_statement_1.yul: -------------------------------------------------------------------------------- 1 | { switch 42 default {} } 2 | // ---- 3 | // Warning 9592: (2-22): "switch" statement with only a default case. 4 | -------------------------------------------------------------------------------- /libstdlib/src/stub.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Apache-2.0 2 | pragma solidity >=0.0; 3 | 4 | pragma experimental solidity; 5 | 6 | function identity() 7 | { 8 | } 9 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_difficulty_prevrandao/stdin: -------------------------------------------------------------------------------- 1 | { 2 | ".code": [ 3 | {"name": "DIFFICULTY"}, 4 | {"name": "PREVRANDAO"} 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /test/cmdlineTests/import_asm_json_invalid_data_not_object/err: -------------------------------------------------------------------------------- 1 | Error: Assembly Import Error: The value of key '0' inside '.data' is neither a hex string nor an object. 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_contracts_inexistent_source/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine all --model-checker-contracts model_checker_contracts_inexistent_source/A.sol:A 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_print_query_all/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine all --model-checker-print-query --model-checker-solvers smtlib2 --model-checker-timeout 1000 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/model_checker_print_query_chc/args: -------------------------------------------------------------------------------- 1 | --model-checker-engine chc --model-checker-print-query --model-checker-solvers smtlib2 --model-checker-timeout 1000 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_evm_version_constantinople/output.json: -------------------------------------------------------------------------------- 1 | { 2 | "sources": { 3 | "input.sol": { 4 | "id": 0 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_stop_after_parsing_ast_requested/in.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | pragma solidity *; 3 | 4 | import "A"; 5 | 6 | contract C {} 7 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_eof_container_prague/args: -------------------------------------------------------------------------------- 1 | --strict-assembly --experimental-eof-version 1 --evm-version prague --asm --ir-optimized --bin --debug-info none 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_eof_dataloadn_prague/args: -------------------------------------------------------------------------------- 1 | --strict-assembly --experimental-eof-version 1 --evm-version prague --asm --ir-optimized --bin --debug-info none 2 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/assembly/leave.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function l() public { 3 | assembly { function f() { leave } } 4 | } 5 | } 6 | 7 | // ---- 8 | -------------------------------------------------------------------------------- /test/libsolidity/optimizedIRCaching/bytecode_dependency_creation.sol: -------------------------------------------------------------------------------- 1 | contract A {} 2 | 3 | contract C { 4 | A a = new A(); 5 | } 6 | // ---- 7 | // cachedObjects: 4 8 | -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/empty_contract.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | } 3 | // ==== 4 | // allowNonExistingFunctions: true 5 | // ---- 6 | // i_am_not_there() -> FAILURE 7 | --------------------------------------------------------------------------------