This is page 1 of 103. Use http://codebase.md/cyfrin/aderyn?lines=true&page={x} to view the full context.
# Directory Structure
```
├── .cargo
│ └── config.toml
├── .git-blame-ignore-revs
├── .gitattributes
├── .github
│ ├── images
│ │ ├── aderyn_logo.png
│ │ ├── poweredbycyfrinblack.png
│ │ └── poweredbycyfrinblue.png
│ ├── ISSUE_TEMPLATE
│ │ ├── bug_report.md
│ │ ├── false_positive_issue.md
│ │ └── feature_request.md
│ └── workflows
│ ├── cargo.yml
│ ├── dependencies.yml
│ ├── release.yml
│ ├── reports.yml
│ └── toml.yml
├── .gitignore
├── .gitmodules
├── .vscode
│ └── settings.json
├── aderyn
│ ├── Cargo.toml
│ ├── oranda.json
│ ├── README.md
│ ├── src
│ │ ├── birdsong.rs
│ │ ├── completions.rs
│ │ ├── lib.rs
│ │ ├── lsp.rs
│ │ ├── main.rs
│ │ ├── mcp.rs
│ │ └── panic.rs
│ └── templates
│ └── aderyn.toml
├── aderyn_core
│ ├── .gitignore
│ ├── Cargo.toml
│ ├── README.md
│ ├── src
│ │ ├── ast
│ │ │ ├── ast_nodes.rs
│ │ │ ├── ast.rs
│ │ │ ├── impls
│ │ │ │ ├── ctx
│ │ │ │ │ ├── utils.rs
│ │ │ │ │ └── workspace.rs
│ │ │ │ ├── ctx.rs
│ │ │ │ ├── disp
│ │ │ │ │ ├── blocks.rs
│ │ │ │ │ ├── contracts.rs
│ │ │ │ │ ├── enumerations.rs
│ │ │ │ │ ├── errors.rs
│ │ │ │ │ ├── events.rs
│ │ │ │ │ ├── expressions.rs
│ │ │ │ │ ├── functions.rs
│ │ │ │ │ ├── identifiers.rs
│ │ │ │ │ ├── literals.rs
│ │ │ │ │ ├── modifiers.rs
│ │ │ │ │ ├── statements.rs
│ │ │ │ │ ├── structures.rs
│ │ │ │ │ ├── types.rs
│ │ │ │ │ ├── user_defined_value_types.rs
│ │ │ │ │ ├── using_for_directives.rs
│ │ │ │ │ └── variables.rs
│ │ │ │ ├── disp.rs
│ │ │ │ ├── node
│ │ │ │ │ ├── blocks.rs
│ │ │ │ │ ├── contracts.rs
│ │ │ │ │ ├── documentation.rs
│ │ │ │ │ ├── enumerations.rs
│ │ │ │ │ ├── errors.rs
│ │ │ │ │ ├── events.rs
│ │ │ │ │ ├── expressions.rs
│ │ │ │ │ ├── functions.rs
│ │ │ │ │ ├── identifiers.rs
│ │ │ │ │ ├── import_directives.rs
│ │ │ │ │ ├── literals.rs
│ │ │ │ │ ├── modifiers.rs
│ │ │ │ │ ├── pragma_directives.rs
│ │ │ │ │ ├── source_units.rs
│ │ │ │ │ ├── statements.rs
│ │ │ │ │ ├── structures.rs
│ │ │ │ │ ├── types.rs
│ │ │ │ │ ├── user_defined_value_types.rs
│ │ │ │ │ ├── using_for_directives.rs
│ │ │ │ │ └── variables.rs
│ │ │ │ ├── node.rs
│ │ │ │ ├── own
│ │ │ │ │ ├── hashing.rs
│ │ │ │ │ ├── node_id.rs
│ │ │ │ │ ├── source_units.rs
│ │ │ │ │ └── utils.rs
│ │ │ │ └── own.rs
│ │ │ ├── impls.rs
│ │ │ ├── macros.rs
│ │ │ ├── magic.rs
│ │ │ ├── node_type.rs
│ │ │ └── yul.rs
│ │ ├── ast.rs
│ │ ├── audit
│ │ │ ├── attack_surface.rs
│ │ │ ├── auditor.rs
│ │ │ ├── entrypoint.rs
│ │ │ └── public_functions_no_sender.rs
│ │ ├── audit.rs
│ │ ├── context
│ │ │ ├── browser
│ │ │ │ ├── ancestral_line.rs
│ │ │ │ ├── closest_ancestor.rs
│ │ │ │ ├── external_calls.rs
│ │ │ │ ├── extractor.rs
│ │ │ │ ├── immediate_children.rs
│ │ │ │ ├── location.rs
│ │ │ │ ├── macros.rs
│ │ │ │ ├── parent.rs
│ │ │ │ ├── peek_over.rs
│ │ │ │ ├── peek_under.rs
│ │ │ │ ├── peek.rs
│ │ │ │ ├── siblings.rs
│ │ │ │ ├── sort_nodes.rs
│ │ │ │ └── storage_vars.rs
│ │ │ ├── browser.rs
│ │ │ ├── capturable.rs
│ │ │ ├── flow
│ │ │ │ ├── display.rs
│ │ │ │ ├── error.rs
│ │ │ │ ├── kind.rs
│ │ │ │ ├── primitives.rs
│ │ │ │ ├── reducibles.rs
│ │ │ │ ├── tests.rs
│ │ │ │ ├── utils.rs
│ │ │ │ ├── visualizer.rs
│ │ │ │ └── voids.rs
│ │ │ ├── flow.rs
│ │ │ ├── graph
│ │ │ │ ├── callgraph
│ │ │ │ │ ├── legacy.rs
│ │ │ │ │ ├── new.rs
│ │ │ │ │ ├── tests.rs
│ │ │ │ │ ├── utils.rs
│ │ │ │ │ └── visit.rs
│ │ │ │ ├── callgraph.rs
│ │ │ │ ├── preprocess
│ │ │ │ │ ├── legacy.rs
│ │ │ │ │ └── new.rs
│ │ │ │ ├── preprocess.rs
│ │ │ │ ├── traits.rs
│ │ │ │ └── utils.rs
│ │ │ ├── graph.rs
│ │ │ ├── macros.rs
│ │ │ ├── mcp
│ │ │ │ ├── callgraph
│ │ │ │ │ ├── render.rs
│ │ │ │ │ ├── tool.rs
│ │ │ │ │ └── utils.rs
│ │ │ │ ├── callgraph.rs
│ │ │ │ ├── contract_surface
│ │ │ │ │ ├── render.rs
│ │ │ │ │ ├── tool.rs
│ │ │ │ │ └── util.rs
│ │ │ │ ├── contract_surface.rs
│ │ │ │ ├── list_contracts
│ │ │ │ │ ├── render.rs
│ │ │ │ │ └── tool.rs
│ │ │ │ ├── list_contracts.rs
│ │ │ │ ├── node_finder
│ │ │ │ │ ├── render.rs
│ │ │ │ │ ├── tool.rs
│ │ │ │ │ └── utils.rs
│ │ │ │ ├── node_finder.rs
│ │ │ │ ├── node_summarizer
│ │ │ │ │ ├── render.rs
│ │ │ │ │ ├── tool.rs
│ │ │ │ │ └── utils.rs
│ │ │ │ ├── node_summarizer.rs
│ │ │ │ ├── project_overview
│ │ │ │ │ ├── render.rs
│ │ │ │ │ └── tool.rs
│ │ │ │ ├── project_overview.rs
│ │ │ │ ├── tool_guide
│ │ │ │ │ └── tool.rs
│ │ │ │ └── tool_guide.rs
│ │ │ ├── mcp.rs
│ │ │ ├── router
│ │ │ │ ├── external_calls.rs
│ │ │ │ ├── internal_calls.rs
│ │ │ │ ├── modifier_calls.rs
│ │ │ │ └── tests.rs
│ │ │ ├── router.rs
│ │ │ └── workspace.rs
│ │ ├── context.rs
│ │ ├── detect
│ │ │ ├── detector.rs
│ │ │ ├── entrypoint.rs
│ │ │ ├── helpers.rs
│ │ │ ├── high
│ │ │ │ ├── _template.rs
│ │ │ │ ├── abi_encode_packed_hash_collision.rs
│ │ │ │ ├── arbitrary_transfer_from.rs
│ │ │ │ ├── const_func_changes_state.rs
│ │ │ │ ├── contract_locks_ether.rs
│ │ │ │ ├── dangerous_unary_operator.rs
│ │ │ │ ├── delegate_call_unchecked_address.rs
│ │ │ │ ├── delete_nested_mapping.rs
│ │ │ │ ├── dynamic_array_length_assignment.rs
│ │ │ │ ├── enumerable_loop_removal.rs
│ │ │ │ ├── eth_send_unchecked_address.rs
│ │ │ │ ├── experimental_encoder.rs
│ │ │ │ ├── function_selector_collision.rs
│ │ │ │ ├── incorrect_caret_operator.rs
│ │ │ │ ├── incorrect_erc20_interface.rs
│ │ │ │ ├── incorrect_erc721_interface.rs
│ │ │ │ ├── incorrect_shift_order.rs
│ │ │ │ ├── misused_boolean.rs
│ │ │ │ ├── msg_value_in_loops.rs
│ │ │ │ ├── multiple_constructors.rs
│ │ │ │ ├── nested_struct_in_mapping.rs
│ │ │ │ ├── out_of_order_retryable.rs
│ │ │ │ ├── pre_declared_variable_usage.rs
│ │ │ │ ├── reentrancy_state_change.rs
│ │ │ │ ├── reused_contract_name.rs
│ │ │ │ ├── rtlo.rs
│ │ │ │ ├── selfdestruct.rs
│ │ │ │ ├── signed_integer_storage_array.rs
│ │ │ │ ├── state_variable_shadowing.rs
│ │ │ │ ├── storage_array_memory_edit.rs
│ │ │ │ ├── strict_equality_contract_balance.rs
│ │ │ │ ├── tautological_compare.rs
│ │ │ │ ├── tautology_or_contradiction.rs
│ │ │ │ ├── tx_origin_used_for_auth.rs
│ │ │ │ ├── unchecked_low_level_call.rs
│ │ │ │ ├── unchecked_send.rs
│ │ │ │ ├── unprotected_initializer.rs
│ │ │ │ ├── unsafe_casting.rs
│ │ │ │ ├── weak_randomness.rs
│ │ │ │ └── yul_return.rs
│ │ │ ├── high.rs
│ │ │ ├── low
│ │ │ │ ├── _template.rs
│ │ │ │ ├── assert_state_change.rs
│ │ │ │ ├── block_timestamp_deadline.rs
│ │ │ │ ├── boolean_equality.rs
│ │ │ │ ├── builtin_symbol_shadowing.rs
│ │ │ │ ├── centralization_risk.rs
│ │ │ │ ├── constant_function_contains_assembly.rs
│ │ │ │ ├── costly_loop.rs
│ │ │ │ ├── dead_code.rs
│ │ │ │ ├── delegatecall_in_loop.rs
│ │ │ │ ├── deprecated_oz_function.rs
│ │ │ │ ├── division_before_multiplication.rs
│ │ │ │ ├── ecrecover.rs
│ │ │ │ ├── empty_block.rs
│ │ │ │ ├── empty_require_revert.rs
│ │ │ │ ├── function_initializing_state.rs
│ │ │ │ ├── function_pointer_in_constructor.rs
│ │ │ │ ├── inconsistent_type_names.rs
│ │ │ │ ├── incorrect_modifier.rs
│ │ │ │ ├── internal_function_used_once.rs
│ │ │ │ ├── large_numeric_literal.rs
│ │ │ │ ├── literal_instead_of_constant.rs
│ │ │ │ ├── local_variable_shadowing.rs
│ │ │ │ ├── missing_inheritance.rs
│ │ │ │ ├── modifier_used_only_once.rs
│ │ │ │ ├── multiple_placeholders.rs
│ │ │ │ ├── non_reentrant_not_first.rs
│ │ │ │ ├── push_0_opcode.rs
│ │ │ │ ├── redundant_statement.rs
│ │ │ │ ├── require_revert_in_loop.rs
│ │ │ │ ├── return_bomb.rs
│ │ │ │ ├── solmate_safe_transfer_lib.rs
│ │ │ │ ├── state_change_without_event.rs
│ │ │ │ ├── state_no_address_check.rs
│ │ │ │ ├── state_variable_could_be_constant.rs
│ │ │ │ ├── state_variable_could_be_immutable.rs
│ │ │ │ ├── state_variable_read_external.rs
│ │ │ │ ├── storage_array_length_not_cached.rs
│ │ │ │ ├── todo.rs
│ │ │ │ ├── unchecked_return.rs
│ │ │ │ ├── uninitialized_local_variable.rs
│ │ │ │ ├── unsafe_erc20_operation.rs
│ │ │ │ ├── unsafe_oz_erc721_mint.rs
│ │ │ │ ├── unspecific_solidity_pragma.rs
│ │ │ │ ├── unused_error.rs
│ │ │ │ ├── unused_import.rs
│ │ │ │ ├── unused_public_function.rs
│ │ │ │ ├── unused_state_variable.rs
│ │ │ │ └── void_constructor.rs
│ │ │ ├── low.rs
│ │ │ └── test_utils.rs
│ │ ├── detect.rs
│ │ ├── lib.rs
│ │ ├── stats
│ │ │ ├── cloc.rs
│ │ │ ├── dbg_tips.txt
│ │ │ ├── ignore.rs
│ │ │ ├── token.rs
│ │ │ └── util.rs
│ │ ├── stats.rs
│ │ ├── test_utils
│ │ │ └── load_source_unit.rs
│ │ ├── test_utils.rs
│ │ ├── visitor
│ │ │ ├── ast_visitor.rs
│ │ │ ├── macros.rs
│ │ │ └── workspace_visitor.rs
│ │ └── visitor.rs
│ ├── templates
│ │ └── mcp-tool-response
│ │ ├── callgraph.md
│ │ ├── contract_surface.md
│ │ ├── list_contracts.md
│ │ ├── node_finder_get_all.md
│ │ ├── node_finder_grep.md
│ │ ├── node_finder_search.md
│ │ ├── node_summarizer.md
│ │ ├── project_overview.md
│ │ └── tool_guide.md
│ └── tests
│ ├── common
│ │ ├── ancestral_line.rs
│ │ ├── closest_ancestor.rs
│ │ ├── immediate_children.rs
│ │ ├── immediate_parent.rs
│ │ ├── mod.rs
│ │ ├── new_ast_nodes.rs
│ │ ├── peek_over.rs
│ │ └── sibling.rs
│ └── traversal.rs
├── aderyn_driver
│ ├── .gitignore
│ ├── benches
│ │ └── detectors.rs
│ ├── Cargo.toml
│ ├── README.md
│ ├── src
│ │ ├── compile.rs
│ │ ├── config.rs
│ │ ├── display.rs
│ │ ├── driver.rs
│ │ ├── interface
│ │ │ ├── json.rs
│ │ │ ├── lsp.rs
│ │ │ ├── markdown.rs
│ │ │ ├── mod.rs
│ │ │ ├── sarif.rs
│ │ │ ├── tables.rs
│ │ │ └── util.rs
│ │ ├── lib.rs
│ │ ├── mcp.rs
│ │ ├── process.rs
│ │ └── runner.rs
│ └── tests
│ └── astgen.rs
├── bacon.toml
├── benchmarks
│ ├── aderyn
│ │ ├── base
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ ├── change
│ │ │ └── estimates.json
│ │ ├── new
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ └── report
│ │ ├── both
│ │ │ ├── iteration_times.svg
│ │ │ └── pdf.svg
│ │ ├── change
│ │ │ ├── mean.svg
│ │ │ ├── median.svg
│ │ │ └── t-test.svg
│ │ ├── index.html
│ │ ├── iteration_times_small.svg
│ │ ├── iteration_times.svg
│ │ ├── MAD.svg
│ │ ├── mean.svg
│ │ ├── median.svg
│ │ ├── pdf_small.svg
│ │ ├── pdf.svg
│ │ ├── relative_iteration_times_small.svg
│ │ ├── relative_pdf_small.svg
│ │ ├── SD.svg
│ │ └── typical.svg
│ ├── arbitrary-transfer-from
│ │ ├── base
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ ├── change
│ │ │ └── estimates.json
│ │ ├── new
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ └── report
│ │ ├── both
│ │ │ ├── pdf.svg
│ │ │ └── regression.svg
│ │ ├── change
│ │ │ ├── mean.svg
│ │ │ ├── median.svg
│ │ │ └── t-test.svg
│ │ ├── index.html
│ │ ├── MAD.svg
│ │ ├── mean.svg
│ │ ├── median.svg
│ │ ├── pdf_small.svg
│ │ ├── pdf.svg
│ │ ├── regression_small.svg
│ │ ├── regression.svg
│ │ ├── relative_pdf_small.svg
│ │ ├── relative_regression_small.svg
│ │ ├── SD.svg
│ │ ├── slope.svg
│ │ └── typical.svg
│ ├── avoid-abi-encode-packed
│ │ ├── base
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ ├── change
│ │ │ └── estimates.json
│ │ ├── new
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ └── report
│ │ ├── both
│ │ │ ├── pdf.svg
│ │ │ └── regression.svg
│ │ ├── change
│ │ │ ├── mean.svg
│ │ │ ├── median.svg
│ │ │ └── t-test.svg
│ │ ├── index.html
│ │ ├── MAD.svg
│ │ ├── mean.svg
│ │ ├── median.svg
│ │ ├── pdf_small.svg
│ │ ├── pdf.svg
│ │ ├── regression_small.svg
│ │ ├── regression.svg
│ │ ├── relative_pdf_small.svg
│ │ ├── relative_regression_small.svg
│ │ ├── SD.svg
│ │ ├── slope.svg
│ │ └── typical.svg
│ ├── block-timestamp-deadline
│ │ ├── base
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ ├── change
│ │ │ └── estimates.json
│ │ ├── new
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ └── report
│ │ ├── both
│ │ │ ├── pdf.svg
│ │ │ └── regression.svg
│ │ ├── change
│ │ │ ├── mean.svg
│ │ │ ├── median.svg
│ │ │ └── t-test.svg
│ │ ├── index.html
│ │ ├── MAD.svg
│ │ ├── mean.svg
│ │ ├── median.svg
│ │ ├── pdf_small.svg
│ │ ├── pdf.svg
│ │ ├── regression_small.svg
│ │ ├── regression.svg
│ │ ├── relative_pdf_small.svg
│ │ ├── relative_regression_small.svg
│ │ ├── SD.svg
│ │ ├── slope.svg
│ │ └── typical.svg
│ ├── centralization-risk
│ │ ├── base
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ ├── change
│ │ │ └── estimates.json
│ │ ├── new
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ └── report
│ │ ├── both
│ │ │ ├── pdf.svg
│ │ │ └── regression.svg
│ │ ├── change
│ │ │ ├── mean.svg
│ │ │ ├── median.svg
│ │ │ └── t-test.svg
│ │ ├── index.html
│ │ ├── MAD.svg
│ │ ├── mean.svg
│ │ ├── median.svg
│ │ ├── pdf_small.svg
│ │ ├── pdf.svg
│ │ ├── regression_small.svg
│ │ ├── regression.svg
│ │ ├── relative_pdf_small.svg
│ │ ├── relative_regression_small.svg
│ │ ├── SD.svg
│ │ ├── slope.svg
│ │ └── typical.svg
│ ├── constants-instead-of-literals
│ │ ├── base
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ ├── change
│ │ │ └── estimates.json
│ │ ├── new
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ └── report
│ │ ├── both
│ │ │ ├── pdf.svg
│ │ │ └── regression.svg
│ │ ├── change
│ │ │ ├── mean.svg
│ │ │ ├── median.svg
│ │ │ └── t-test.svg
│ │ ├── index.html
│ │ ├── MAD.svg
│ │ ├── mean.svg
│ │ ├── median.svg
│ │ ├── pdf_small.svg
│ │ ├── pdf.svg
│ │ ├── regression_small.svg
│ │ ├── regression.svg
│ │ ├── relative_pdf_small.svg
│ │ ├── relative_regression_small.svg
│ │ ├── SD.svg
│ │ ├── slope.svg
│ │ └── typical.svg
│ ├── delegate-call-in-loop
│ │ ├── base
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ ├── change
│ │ │ └── estimates.json
│ │ ├── new
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ └── report
│ │ ├── both
│ │ │ ├── pdf.svg
│ │ │ └── regression.svg
│ │ ├── change
│ │ │ ├── mean.svg
│ │ │ ├── median.svg
│ │ │ └── t-test.svg
│ │ ├── index.html
│ │ ├── MAD.svg
│ │ ├── mean.svg
│ │ ├── median.svg
│ │ ├── pdf_small.svg
│ │ ├── pdf.svg
│ │ ├── regression_small.svg
│ │ ├── regression.svg
│ │ ├── relative_pdf_small.svg
│ │ ├── relative_regression_small.svg
│ │ ├── SD.svg
│ │ ├── slope.svg
│ │ └── typical.svg
│ ├── deprecated-oz-functions
│ │ ├── base
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ ├── change
│ │ │ └── estimates.json
│ │ ├── new
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ └── report
│ │ ├── both
│ │ │ ├── pdf.svg
│ │ │ └── regression.svg
│ │ ├── change
│ │ │ ├── mean.svg
│ │ │ ├── median.svg
│ │ │ └── t-test.svg
│ │ ├── index.html
│ │ ├── MAD.svg
│ │ ├── mean.svg
│ │ ├── median.svg
│ │ ├── pdf_small.svg
│ │ ├── pdf.svg
│ │ ├── regression_small.svg
│ │ ├── regression.svg
│ │ ├── relative_pdf_small.svg
│ │ ├── relative_regression_small.svg
│ │ ├── SD.svg
│ │ ├── slope.svg
│ │ └── typical.svg
│ ├── ecrecover
│ │ ├── base
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ ├── change
│ │ │ └── estimates.json
│ │ ├── new
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ └── report
│ │ ├── both
│ │ │ ├── pdf.svg
│ │ │ └── regression.svg
│ │ ├── change
│ │ │ ├── mean.svg
│ │ │ ├── median.svg
│ │ │ └── t-test.svg
│ │ ├── index.html
│ │ ├── MAD.svg
│ │ ├── mean.svg
│ │ ├── median.svg
│ │ ├── pdf_small.svg
│ │ ├── pdf.svg
│ │ ├── regression_small.svg
│ │ ├── regression.svg
│ │ ├── relative_pdf_small.svg
│ │ ├── relative_regression_small.svg
│ │ ├── SD.svg
│ │ ├── slope.svg
│ │ └── typical.svg
│ ├── empty-block
│ │ ├── base
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ ├── change
│ │ │ └── estimates.json
│ │ ├── new
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ └── report
│ │ ├── both
│ │ │ ├── pdf.svg
│ │ │ └── regression.svg
│ │ ├── change
│ │ │ ├── mean.svg
│ │ │ ├── median.svg
│ │ │ └── t-test.svg
│ │ ├── index.html
│ │ ├── MAD.svg
│ │ ├── mean.svg
│ │ ├── median.svg
│ │ ├── pdf_small.svg
│ │ ├── pdf.svg
│ │ ├── regression_small.svg
│ │ ├── regression.svg
│ │ ├── relative_pdf_small.svg
│ │ ├── relative_regression_small.svg
│ │ ├── SD.svg
│ │ ├── slope.svg
│ │ └── typical.svg
│ ├── hello_world
│ │ ├── base
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ ├── new
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ └── report
│ │ ├── index.html
│ │ ├── MAD.svg
│ │ ├── mean.svg
│ │ ├── median.svg
│ │ ├── pdf_small.svg
│ │ ├── pdf.svg
│ │ ├── regression_small.svg
│ │ ├── regression.svg
│ │ ├── SD.svg
│ │ ├── slope.svg
│ │ └── typical.svg
│ ├── inconsistent-type-names
│ │ ├── base
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ ├── change
│ │ │ └── estimates.json
│ │ ├── new
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ └── report
│ │ ├── both
│ │ │ ├── pdf.svg
│ │ │ └── regression.svg
│ │ ├── change
│ │ │ ├── mean.svg
│ │ │ ├── median.svg
│ │ │ └── t-test.svg
│ │ ├── index.html
│ │ ├── MAD.svg
│ │ ├── mean.svg
│ │ ├── median.svg
│ │ ├── pdf_small.svg
│ │ ├── pdf.svg
│ │ ├── regression_small.svg
│ │ ├── regression.svg
│ │ ├── relative_pdf_small.svg
│ │ ├── relative_regression_small.svg
│ │ ├── SD.svg
│ │ ├── slope.svg
│ │ └── typical.svg
│ ├── large-numeric-literal
│ │ ├── base
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ ├── change
│ │ │ └── estimates.json
│ │ ├── new
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ └── report
│ │ ├── both
│ │ │ ├── pdf.svg
│ │ │ └── regression.svg
│ │ ├── change
│ │ │ ├── mean.svg
│ │ │ ├── median.svg
│ │ │ └── t-test.svg
│ │ ├── index.html
│ │ ├── MAD.svg
│ │ ├── mean.svg
│ │ ├── median.svg
│ │ ├── pdf_small.svg
│ │ ├── pdf.svg
│ │ ├── regression_small.svg
│ │ ├── regression.svg
│ │ ├── relative_pdf_small.svg
│ │ ├── relative_regression_small.svg
│ │ ├── SD.svg
│ │ ├── slope.svg
│ │ └── typical.svg
│ ├── non-reentrant-before-others
│ │ ├── base
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ ├── change
│ │ │ └── estimates.json
│ │ ├── new
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ └── report
│ │ ├── both
│ │ │ ├── pdf.svg
│ │ │ └── regression.svg
│ │ ├── change
│ │ │ ├── mean.svg
│ │ │ ├── median.svg
│ │ │ └── t-test.svg
│ │ ├── index.html
│ │ ├── MAD.svg
│ │ ├── mean.svg
│ │ ├── median.svg
│ │ ├── pdf_small.svg
│ │ ├── pdf.svg
│ │ ├── regression_small.svg
│ │ ├── regression.svg
│ │ ├── relative_pdf_small.svg
│ │ ├── relative_regression_small.svg
│ │ ├── SD.svg
│ │ ├── slope.svg
│ │ └── typical.svg
│ ├── push-zero-opcode
│ │ ├── base
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ ├── change
│ │ │ └── estimates.json
│ │ ├── new
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ └── report
│ │ ├── both
│ │ │ ├── pdf.svg
│ │ │ └── regression.svg
│ │ ├── change
│ │ │ ├── mean.svg
│ │ │ ├── median.svg
│ │ │ └── t-test.svg
│ │ ├── index.html
│ │ ├── MAD.svg
│ │ ├── mean.svg
│ │ ├── median.svg
│ │ ├── pdf_small.svg
│ │ ├── pdf.svg
│ │ ├── regression_small.svg
│ │ ├── regression.svg
│ │ ├── relative_pdf_small.svg
│ │ ├── relative_regression_small.svg
│ │ ├── SD.svg
│ │ ├── slope.svg
│ │ └── typical.svg
│ ├── report
│ │ └── index.html
│ ├── require-with-string
│ │ ├── base
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ ├── change
│ │ │ └── estimates.json
│ │ ├── new
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ └── report
│ │ ├── both
│ │ │ ├── pdf.svg
│ │ │ └── regression.svg
│ │ ├── change
│ │ │ ├── mean.svg
│ │ │ ├── median.svg
│ │ │ └── t-test.svg
│ │ ├── index.html
│ │ ├── MAD.svg
│ │ ├── mean.svg
│ │ ├── median.svg
│ │ ├── pdf_small.svg
│ │ ├── pdf.svg
│ │ ├── regression_small.svg
│ │ ├── regression.svg
│ │ ├── relative_pdf_small.svg
│ │ ├── relative_regression_small.svg
│ │ ├── SD.svg
│ │ ├── slope.svg
│ │ └── typical.svg
│ ├── solmate-safe-transfer-lib
│ │ ├── base
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ ├── change
│ │ │ └── estimates.json
│ │ ├── new
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ └── report
│ │ ├── both
│ │ │ ├── pdf.svg
│ │ │ └── regression.svg
│ │ ├── change
│ │ │ ├── mean.svg
│ │ │ ├── median.svg
│ │ │ └── t-test.svg
│ │ ├── index.html
│ │ ├── MAD.svg
│ │ ├── mean.svg
│ │ ├── median.svg
│ │ ├── pdf_small.svg
│ │ ├── pdf.svg
│ │ ├── regression_small.svg
│ │ ├── regression.svg
│ │ ├── relative_pdf_small.svg
│ │ ├── relative_regression_small.svg
│ │ ├── SD.svg
│ │ ├── slope.svg
│ │ └── typical.svg
│ ├── unindexed-events
│ │ ├── base
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ ├── change
│ │ │ └── estimates.json
│ │ ├── new
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ └── report
│ │ ├── both
│ │ │ ├── pdf.svg
│ │ │ └── regression.svg
│ │ ├── change
│ │ │ ├── mean.svg
│ │ │ ├── median.svg
│ │ │ └── t-test.svg
│ │ ├── index.html
│ │ ├── MAD.svg
│ │ ├── mean.svg
│ │ ├── median.svg
│ │ ├── pdf_small.svg
│ │ ├── pdf.svg
│ │ ├── regression_small.svg
│ │ ├── regression.svg
│ │ ├── relative_pdf_small.svg
│ │ ├── relative_regression_small.svg
│ │ ├── SD.svg
│ │ ├── slope.svg
│ │ └── typical.svg
│ ├── unprotected-initializer
│ │ ├── base
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ ├── change
│ │ │ └── estimates.json
│ │ ├── new
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ └── report
│ │ ├── both
│ │ │ ├── pdf.svg
│ │ │ └── regression.svg
│ │ ├── change
│ │ │ ├── mean.svg
│ │ │ ├── median.svg
│ │ │ └── t-test.svg
│ │ ├── index.html
│ │ ├── MAD.svg
│ │ ├── mean.svg
│ │ ├── median.svg
│ │ ├── pdf_small.svg
│ │ ├── pdf.svg
│ │ ├── regression_small.svg
│ │ ├── regression.svg
│ │ ├── relative_pdf_small.svg
│ │ ├── relative_regression_small.svg
│ │ ├── SD.svg
│ │ ├── slope.svg
│ │ └── typical.svg
│ ├── unsafe-erc20-functions
│ │ ├── base
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ ├── change
│ │ │ └── estimates.json
│ │ ├── new
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ └── report
│ │ ├── both
│ │ │ ├── pdf.svg
│ │ │ └── regression.svg
│ │ ├── change
│ │ │ ├── mean.svg
│ │ │ ├── median.svg
│ │ │ └── t-test.svg
│ │ ├── index.html
│ │ ├── MAD.svg
│ │ ├── mean.svg
│ │ ├── median.svg
│ │ ├── pdf_small.svg
│ │ ├── pdf.svg
│ │ ├── regression_small.svg
│ │ ├── regression.svg
│ │ ├── relative_pdf_small.svg
│ │ ├── relative_regression_small.svg
│ │ ├── SD.svg
│ │ ├── slope.svg
│ │ └── typical.svg
│ ├── unsafe-oz-erc721-mint
│ │ ├── base
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ ├── change
│ │ │ └── estimates.json
│ │ ├── new
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ └── report
│ │ ├── both
│ │ │ ├── pdf.svg
│ │ │ └── regression.svg
│ │ ├── change
│ │ │ ├── mean.svg
│ │ │ ├── median.svg
│ │ │ └── t-test.svg
│ │ ├── index.html
│ │ ├── MAD.svg
│ │ ├── mean.svg
│ │ ├── median.svg
│ │ ├── pdf_small.svg
│ │ ├── pdf.svg
│ │ ├── regression_small.svg
│ │ ├── regression.svg
│ │ ├── relative_pdf_small.svg
│ │ ├── relative_regression_small.svg
│ │ ├── SD.svg
│ │ ├── slope.svg
│ │ └── typical.svg
│ ├── unspecific-solidity-pragma
│ │ ├── base
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ ├── change
│ │ │ └── estimates.json
│ │ ├── new
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ └── report
│ │ ├── both
│ │ │ ├── pdf.svg
│ │ │ └── regression.svg
│ │ ├── change
│ │ │ ├── mean.svg
│ │ │ ├── median.svg
│ │ │ └── t-test.svg
│ │ ├── index.html
│ │ ├── MAD.svg
│ │ ├── mean.svg
│ │ ├── median.svg
│ │ ├── pdf_small.svg
│ │ ├── pdf.svg
│ │ ├── regression_small.svg
│ │ ├── regression.svg
│ │ ├── relative_pdf_small.svg
│ │ ├── relative_regression_small.svg
│ │ ├── SD.svg
│ │ ├── slope.svg
│ │ └── typical.svg
│ ├── useless-internal-function
│ │ ├── base
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ ├── change
│ │ │ └── estimates.json
│ │ ├── new
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ └── report
│ │ ├── both
│ │ │ ├── pdf.svg
│ │ │ └── regression.svg
│ │ ├── change
│ │ │ ├── mean.svg
│ │ │ ├── median.svg
│ │ │ └── t-test.svg
│ │ ├── index.html
│ │ ├── MAD.svg
│ │ ├── mean.svg
│ │ ├── median.svg
│ │ ├── pdf_small.svg
│ │ ├── pdf.svg
│ │ ├── regression_small.svg
│ │ ├── regression.svg
│ │ ├── relative_pdf_small.svg
│ │ ├── relative_regression_small.svg
│ │ ├── SD.svg
│ │ ├── slope.svg
│ │ └── typical.svg
│ ├── useless-modifier
│ │ ├── base
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ ├── change
│ │ │ └── estimates.json
│ │ ├── new
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ └── report
│ │ ├── both
│ │ │ ├── pdf.svg
│ │ │ └── regression.svg
│ │ ├── change
│ │ │ ├── mean.svg
│ │ │ ├── median.svg
│ │ │ └── t-test.svg
│ │ ├── index.html
│ │ ├── MAD.svg
│ │ ├── mean.svg
│ │ ├── median.svg
│ │ ├── pdf_small.svg
│ │ ├── pdf.svg
│ │ ├── regression_small.svg
│ │ ├── regression.svg
│ │ ├── relative_pdf_small.svg
│ │ ├── relative_regression_small.svg
│ │ ├── SD.svg
│ │ ├── slope.svg
│ │ └── typical.svg
│ ├── useless-public-function
│ │ ├── base
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ ├── change
│ │ │ └── estimates.json
│ │ ├── new
│ │ │ ├── benchmark.json
│ │ │ ├── estimates.json
│ │ │ ├── sample.json
│ │ │ └── tukey.json
│ │ └── report
│ │ ├── both
│ │ │ ├── pdf.svg
│ │ │ └── regression.svg
│ │ ├── change
│ │ │ ├── mean.svg
│ │ │ ├── median.svg
│ │ │ └── t-test.svg
│ │ ├── index.html
│ │ ├── MAD.svg
│ │ ├── mean.svg
│ │ ├── median.svg
│ │ ├── pdf_small.svg
│ │ ├── pdf.svg
│ │ ├── regression_small.svg
│ │ ├── regression.svg
│ │ ├── relative_pdf_small.svg
│ │ ├── relative_regression_small.svg
│ │ ├── SD.svg
│ │ ├── slope.svg
│ │ └── typical.svg
│ └── zero-address-check
│ ├── base
│ │ ├── benchmark.json
│ │ ├── estimates.json
│ │ ├── sample.json
│ │ └── tukey.json
│ ├── change
│ │ └── estimates.json
│ ├── new
│ │ ├── benchmark.json
│ │ ├── estimates.json
│ │ ├── sample.json
│ │ └── tukey.json
│ └── report
│ ├── both
│ │ ├── pdf.svg
│ │ └── regression.svg
│ ├── change
│ │ ├── mean.svg
│ │ ├── median.svg
│ │ └── t-test.svg
│ ├── index.html
│ ├── MAD.svg
│ ├── mean.svg
│ ├── median.svg
│ ├── pdf_small.svg
│ ├── pdf.svg
│ ├── regression_small.svg
│ ├── regression.svg
│ ├── relative_pdf_small.svg
│ ├── relative_regression_small.svg
│ ├── SD.svg
│ ├── slope.svg
│ └── typical.svg
├── Cargo.lock
├── Cargo.toml
├── cli
│ ├── benchmarks.sh
│ └── reportgen.sh
├── CODEOWNERS
├── CONTRIBUTING.md
├── cyfrinup
│ ├── dynamic_script
│ └── why.md
├── deny.toml
├── dist-workspace.toml
├── funding.json
├── LICENSE
├── Makefile
├── package-lock.json
├── package.json
├── README.md
├── RELEASE_CHECKLIST.md
├── reports
│ ├── adhoc-sol-files-highs-only-report.json
│ ├── adhoc-sol-files-report.md
│ ├── ccip-functions-report.md
│ ├── empty_report.md
│ ├── hardhat-playground-report.md
│ ├── nft-report-icm.md
│ ├── nft-report.md
│ ├── prb-math-report.md
│ ├── report.json
│ ├── report.md
│ ├── report.sarif
│ ├── sablier-aderyn-toml-nested-root.md
│ ├── templegold-report.md
│ └── uniswap_profile.md
├── rust-toolchain.toml
├── rustfmt.toml
├── tests
│ ├── adhoc-sol-files
│ │ ├── aderyn.toml
│ │ ├── Counter.sol
│ │ ├── DemoASTNodes.sol
│ │ ├── Helper.sol
│ │ ├── InconsistentUints.sol
│ │ ├── inheritance
│ │ │ ├── ExtendedInheritance.sol
│ │ │ ├── IContractInheritance.sol
│ │ │ └── InheritanceBase.sol
│ │ ├── InternalFunctions.sol
│ │ ├── lib
│ │ │ └── ThisShouldBeExcluded.sol
│ │ ├── multiple-versions
│ │ │ ├── 0.4
│ │ │ │ ├── A.sol
│ │ │ │ └── B.sol
│ │ │ ├── 0.5
│ │ │ │ ├── A.sol
│ │ │ │ └── B.sol
│ │ │ ├── 0.6
│ │ │ │ ├── A.sol
│ │ │ │ └── B.sol
│ │ │ ├── 0.7
│ │ │ │ ├── A.sol
│ │ │ │ └── B.sol
│ │ │ └── 0.8
│ │ │ ├── A.sol
│ │ │ └── B.sol
│ │ ├── OnceModifierExample.sol
│ │ └── StateVariables.sol
│ ├── ast
│ │ ├── abstract_contract.json
│ │ ├── address_payable.json
│ │ ├── array_type_name.json
│ │ ├── ast-erc4626.json
│ │ ├── base_constructor_call.json
│ │ ├── bit_not.json
│ │ ├── call.json
│ │ ├── constructor.json
│ │ ├── contract_dep_order.json
│ │ ├── do_while.json
│ │ ├── documentation_1.json
│ │ ├── documentation_2.json
│ │ ├── documentation_3.json
│ │ ├── documentation_local_variable.json
│ │ ├── documentation_on_statements.json
│ │ ├── documentation_triple.json
│ │ ├── empty_block.json
│ │ ├── enum_value_declaration.json
│ │ ├── enum_value.json
│ │ ├── event_definition.json
│ │ ├── experimental_encoder_pragma.json
│ │ ├── fallback_and_reveice_ether.json
│ │ ├── fallback_payable.json
│ │ ├── fallback.json
│ │ ├── function_type.json
│ │ ├── function.json
│ │ ├── global_enum.json
│ │ ├── global_struct.json
│ │ ├── inheritance_specifier.json
│ │ ├── leave.json
│ │ ├── license.json
│ │ ├── long_type_name_binary_operation.json
│ │ ├── long_type_name_identifier.json
│ │ ├── loop.json
│ │ ├── mappings.json
│ │ ├── modifier_definition.json
│ │ ├── modifier_invocation.json
│ │ ├── mutability.json
│ │ ├── nested_functions.json
│ │ ├── non_utf8.json
│ │ ├── override.json
│ │ ├── placeholder_statement.json
│ │ ├── receive_ether.json
│ │ ├── short_type_name_ref.json
│ │ ├── short_type_name.json
│ │ ├── slot_offset.json
│ │ ├── smoke.json
│ │ ├── source_location.json
│ │ ├── string.json
│ │ ├── stringlit.json
│ │ ├── switch_default.json
│ │ ├── switch.json
│ │ ├── try_catch.json
│ │ ├── two_base_functions.json
│ │ ├── unicode.json
│ │ ├── used_errors.json
│ │ ├── userDefinedValueType.json
│ │ ├── using_for_directive.json
│ │ ├── var_access.json
│ │ └── yul_hex_literal.json
│ ├── contract-playground
│ │ ├── .github
│ │ │ └── workflows
│ │ │ └── test.yml
│ │ ├── .gitignore
│ │ ├── dot
│ │ │ └── .gitkeep
│ │ ├── foundry.toml
│ │ ├── README.md
│ │ ├── script
│ │ │ └── Counter.s.sol
│ │ ├── src
│ │ │ ├── AbstractContract.sol
│ │ │ ├── AderynIgnoreCustomDetectors.sol
│ │ │ ├── AdminContract.sol
│ │ │ ├── ArbitraryTransferFrom.sol
│ │ │ ├── AssemblyExample.sol
│ │ │ ├── AssertStateChange.sol
│ │ │ ├── auditor_mode
│ │ │ │ ├── ExternalCalls.sol
│ │ │ │ └── PublicFunctionsWithoutSenderCheck.sol
│ │ │ ├── BooleanEquality.sol
│ │ │ ├── BuiltinSymbolShadow.sol
│ │ │ ├── CacheArrayLength.sol
│ │ │ ├── CallGraphTests.sol
│ │ │ ├── Casting.sol
│ │ │ ├── cloc
│ │ │ │ ├── AnotherHeavilyCommentedContract.sol
│ │ │ │ ├── EmptyContractFile.sol
│ │ │ │ └── HeavilyCommentedContract.sol
│ │ │ ├── CompilerBugStorageSignedIntegerArray.sol
│ │ │ ├── ConstantFuncsAssembly.sol
│ │ │ ├── ConstantsLiterals.sol
│ │ │ ├── ConstFuncChangeState.sol
│ │ │ ├── ContractLocksEther.sol
│ │ │ ├── ContractWithTodo.sol
│ │ │ ├── control_flow
│ │ │ │ └── SimpleProgram.sol
│ │ │ ├── CostlyOperationsInsideLoops.sol
│ │ │ ├── Counter.sol
│ │ │ ├── CrazyPragma.sol
│ │ │ ├── DangerousStrictEquality1.sol
│ │ │ ├── DangerousStrictEquality2.sol
│ │ │ ├── DangerousUnaryOperator.sol
│ │ │ ├── DeadCode.sol
│ │ │ ├── DelegateCallWithoutAddressCheck.sol
│ │ │ ├── DeletionNestedMappingStructureContract.sol
│ │ │ ├── DeprecatedOZFunctions.sol
│ │ │ ├── DivisionBeforeMultiplication.sol
│ │ │ ├── DynamicArrayLengthAssignment.sol
│ │ │ ├── EmitAfterExternalCall.sol
│ │ │ ├── EmptyBlocks.sol
│ │ │ ├── EnumerableSetIteration.sol
│ │ │ ├── eth2
│ │ │ │ └── DepositContract.sol
│ │ │ ├── ExperimentalEncoder.sol
│ │ │ ├── ExternalCalls.sol
│ │ │ ├── FunctionInitializingState.sol
│ │ │ ├── FunctionPointers.sol
│ │ │ ├── FunctionSignatureCollision.sol
│ │ │ ├── HugeConstants.sol
│ │ │ ├── IgnoreEverything.sol
│ │ │ ├── InconsistentUints.sol
│ │ │ ├── IncorrectCaretOperator.sol
│ │ │ ├── IncorrectERC20.sol
│ │ │ ├── IncorrectERC721.sol
│ │ │ ├── IncorrectModifier.sol
│ │ │ ├── IncorrectShift.sol
│ │ │ ├── inheritance
│ │ │ │ ├── ExtendedInheritance.sol
│ │ │ │ ├── IContractInheritance.sol
│ │ │ │ └── InheritanceBase.sol
│ │ │ ├── InternalFunctions.sol
│ │ │ ├── KeccakContract.sol
│ │ │ ├── LocalVariableShadow.sol
│ │ │ ├── MissingInheritance.sol
│ │ │ ├── MisusedBoolean.sol
│ │ │ ├── MsgValueInLoop.sol
│ │ │ ├── MultipleConstructorSchemes.sol
│ │ │ ├── MultiplePlaceholders.sol
│ │ │ ├── nested
│ │ │ │ ├── 1
│ │ │ │ │ └── Nested.sol
│ │ │ │ └── 2
│ │ │ │ └── Nested.sol
│ │ │ ├── nested_mappings
│ │ │ │ ├── LaterVersion.sol
│ │ │ │ └── NestedMappings.sol
│ │ │ ├── OnceModifierExample.sol
│ │ │ ├── OnlyLibrary.sol
│ │ │ ├── OutOfOrderRetryable.sol
│ │ │ ├── parent_chain
│ │ │ │ └── ParentChainContract.sol
│ │ │ ├── PragmaRange.sol
│ │ │ ├── PreDeclaredVarUsage.sol
│ │ │ ├── PublicFunction.sol
│ │ │ ├── PublicVariableReadInExternalContext.sol
│ │ │ ├── RedundantStatements.sol
│ │ │ ├── ReturnBomb.sol
│ │ │ ├── reused_contract_name
│ │ │ │ ├── ContractA.sol
│ │ │ │ └── ContractB.sol
│ │ │ ├── RevertsAndRequriesInLoops.sol
│ │ │ ├── router
│ │ │ │ ├── ExternalCalls.sol
│ │ │ │ ├── FallbackAndReceiveOverrides.sol
│ │ │ │ ├── InternalCalls.sol
│ │ │ │ ├── ModifierCalls.sol
│ │ │ │ └── VarOverridesFunction.sol
│ │ │ ├── RTLO.sol
│ │ │ ├── SendEtherNoChecks.sol
│ │ │ ├── SendEtherNoChecksLibImport.sol
│ │ │ ├── StateChangeAfterExternalCall.sol
│ │ │ ├── StateShadowing.sol
│ │ │ ├── StateVariableCouldBeDeclaredConstant.sol
│ │ │ ├── StateVariableCouldBeDeclaredImmutable.sol
│ │ │ ├── StateVariables.sol
│ │ │ ├── StateVariablesChangesWithoutEvents.sol
│ │ │ ├── StateVariablesManipulation.sol
│ │ │ ├── StorageConditionals.sol
│ │ │ ├── StorageParameters.sol
│ │ │ ├── T11sTranferer.sol
│ │ │ ├── TautologicalCompare.sol
│ │ │ ├── TautologyOrContradiction.sol
│ │ │ ├── TestERC20.sol
│ │ │ ├── TransientKeyword.sol
│ │ │ ├── Trump.sol
│ │ │ ├── TxOriginUsedForAuth.sol
│ │ │ ├── U2.sol
│ │ │ ├── U3.sol
│ │ │ ├── U4.sol
│ │ │ ├── U5.sol
│ │ │ ├── UncheckedCalls.sol
│ │ │ ├── UncheckedReturn.sol
│ │ │ ├── UncheckedSend.sol
│ │ │ ├── UninitializedLocalVariables.sol
│ │ │ ├── UninitializedStateVariable.sol
│ │ │ ├── uniswap
│ │ │ │ ├── UniswapV2Swapper.sol
│ │ │ │ └── UniswapV3Swapper.sol
│ │ │ ├── UnprotectedInitialize.sol
│ │ │ ├── UnsafeERC721Mint.sol
│ │ │ ├── UnusedError.sol
│ │ │ ├── UnusedImport.sol
│ │ │ ├── UnusedStateVariables.sol
│ │ │ ├── UsingSelfdestruct.sol
│ │ │ ├── VoidConstructor.sol
│ │ │ ├── WeakRandomness.sol
│ │ │ ├── WrongOrderOfLayout.sol
│ │ │ ├── YulReturn.sol
│ │ │ └── ZeroAddressCheck.sol
│ │ └── test
│ │ └── Counter.t.sol
│ ├── foundry-nft-f23
│ │ ├── .github
│ │ │ └── workflows
│ │ │ └── test.yml
│ │ ├── .gitignore
│ │ ├── foundry.lock
│ │ ├── foundry.toml
│ │ ├── README.md
│ │ ├── remappings.txt
│ │ └── src
│ │ ├── BasicNft.sol
│ │ ├── F1.sol
│ │ ├── F2.sol
│ │ ├── Initializer.sol
│ │ └── inner-core-modules
│ │ └── ICM.sol
│ ├── foundry-nft-f23-icm
│ │ ├── .github
│ │ │ └── workflows
│ │ │ └── test.yml
│ │ ├── .gitignore
│ │ ├── aderyn.toml
│ │ ├── foundry.toml
│ │ ├── README.md
│ │ ├── remappings.txt
│ │ └── src
│ │ ├── BasicNft.sol
│ │ ├── F1.sol
│ │ ├── F2.sol
│ │ ├── Initializer.sol
│ │ └── inner-core-modules
│ │ └── ICM.sol
│ ├── hardhat-js-playground
│ │ ├── .gitignore
│ │ ├── artifacts
│ │ │ ├── build-info
│ │ │ │ └── cee6fe9a9a2f03f7ff10a27ab2746af6.json
│ │ │ └── contracts
│ │ │ ├── Counter.sol
│ │ │ │ ├── Counter.dbg.json
│ │ │ │ └── Counter.json
│ │ │ ├── ExtendedInheritance.sol
│ │ │ │ ├── ExtendedInheritance.dbg.json
│ │ │ │ └── ExtendedInheritance.json
│ │ │ ├── IContractInheritance.sol
│ │ │ │ ├── IContractInheritance.dbg.json
│ │ │ │ └── IContractInheritance.json
│ │ │ ├── InheritanceBase.sol
│ │ │ │ ├── InheritanceBase.dbg.json
│ │ │ │ └── InheritanceBase.json
│ │ │ ├── KeccakContract.sol
│ │ │ │ ├── KeccakContract.dbg.json
│ │ │ │ └── KeccakContract.json
│ │ │ ├── Lock.sol
│ │ │ │ ├── Lock.dbg.json
│ │ │ │ └── Lock.json
│ │ │ └── StateVariables.sol
│ │ │ ├── StateVariables.dbg.json
│ │ │ └── StateVariables.json
│ │ ├── contracts
│ │ │ ├── Counter.sol
│ │ │ ├── ExtendedInheritance.sol
│ │ │ ├── IContractInheritance.sol
│ │ │ ├── InheritanceBase.sol
│ │ │ ├── KeccakContract.sol
│ │ │ ├── Lock.sol
│ │ │ └── StateVariables.sol
│ │ ├── hardhat.config.js
│ │ ├── package.json
│ │ ├── README.md
│ │ ├── scripts
│ │ │ └── deploy.js
│ │ ├── test
│ │ │ └── Lock.js
│ │ └── yarn.lock
│ ├── no-sol-files
│ │ ├── extra
│ │ │ └── HelloAgain.md
│ │ ├── Hello.txt
│ │ └── Hello.yul
│ └── toml
│ ├── nested_project1
│ │ ├── aderyn.toml
│ │ ├── folder1
│ │ │ └── hardhat.config.ts
│ │ ├── folder2
│ │ │ └── hardhat.config.ts
│ │ └── folder3
│ │ └── file.txt
│ └── nested_project2
│ ├── aderyn.toml
│ ├── folder1
│ │ └── foundry.toml
│ └── folder2
│ └── file1.txt
├── tools
│ └── xtask
│ ├── Cargo.toml
│ └── src
│ ├── blesspr.rs
│ ├── cut_release.rs
│ ├── flags.rs
│ ├── main.rs
│ ├── reportgen.rs
│ └── tomlgen.rs
└── typos.toml
```
# Files
--------------------------------------------------------------------------------
/aderyn_core/.gitignore:
--------------------------------------------------------------------------------
```
1 |
```
--------------------------------------------------------------------------------
/tests/contract-playground/dot/.gitkeep:
--------------------------------------------------------------------------------
```
1 |
```
--------------------------------------------------------------------------------
/aderyn_driver/.gitignore:
--------------------------------------------------------------------------------
```
1 | aderyn-report-for-bench.md
```
--------------------------------------------------------------------------------
/tests/hardhat-js-playground/.gitignore:
--------------------------------------------------------------------------------
```
1 | node_modules
2 | .env
3 | coverage
4 | coverage.json
5 | typechain
6 | typechain-types
7 |
8 | # Hardhat files
9 | cache
10 |
11 |
```
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
```
1 | [attr]generated linguist-generated=true diff=generated
2 |
3 | Cargo.lock generated
4 | reports/*.* generated
5 |
6 |
```
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
```
1 | /target
2 | .DS_Store
3 | .venv
4 | debug/
5 | dot/
6 | !dot/.gitkeep
7 | # Generated by `oranda generate ci`
8 | public/
9 | node_modules/
10 | app.log
11 |
```
--------------------------------------------------------------------------------
/tests/contract-playground/.gitignore:
--------------------------------------------------------------------------------
```
1 | # Compiler files
2 | cache/
3 | out/
4 |
5 | # Ignores development broadcast logs
6 | !/broadcast
7 | /broadcast/*/31337/
8 | /broadcast/**/dry-run/
9 |
10 | # Docs
11 | docs/
12 |
13 | # Dotenv file
14 | .env
```
--------------------------------------------------------------------------------
/tests/foundry-nft-f23-icm/.gitignore:
--------------------------------------------------------------------------------
```
1 | # Compiler files
2 | cache/
3 | out/
4 |
5 | # Ignores development broadcast logs
6 | !/broadcast
7 | /broadcast/*/31337/
8 | /broadcast/**/dry-run/
9 |
10 | # Docs
11 | docs/
12 |
13 | # Dotenv file
14 | .env
15 | broadcast
16 |
```
--------------------------------------------------------------------------------
/tests/foundry-nft-f23/.gitignore:
--------------------------------------------------------------------------------
```
1 | # Compiler files
2 | cache/
3 | out/
4 |
5 | # Ignores development broadcast logs
6 | !/broadcast
7 | /broadcast/*/31337/
8 | /broadcast/**/dry-run/
9 |
10 | # Docs
11 | docs/
12 |
13 | # Dotenv file
14 | .env
15 | broadcast
16 |
```
--------------------------------------------------------------------------------
/.git-blame-ignore-revs:
--------------------------------------------------------------------------------
```
1 | # Since version 2.23 (released in August 2019), git-blame has a feature
2 | # to ignore or bypass certain commits.
3 | #
4 | # This file contains a list of commits that are not likely what you
5 | # are looking for in a blame, such as mass reformatting or renaming.
6 | # You can set this file as a default ignore file for blame by running
7 | # the following command.
8 | #
9 | # $ git config blame.ignoreRevsFile .git-blame-ignore-revs
10 |
11 | # fmt: all (#3398)
12 | 748ae7fc6da5bd63f1955cb1a7b5eb6b36e0ad61
13 |
```
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
```
1 | [submodule "tests/contract-playground/lib/forge-std"]
2 | path = tests/contract-playground/lib/forge-std
3 | url = https://github.com/foundry-rs/forge-std
4 | [submodule "tests/contract-playground/lib/openzeppelin-contracts"]
5 | path = tests/contract-playground/lib/openzeppelin-contracts
6 | url = https://github.com/OpenZeppelin/openzeppelin-contracts
7 | [submodule "tests/contract-playground/lib/solmate"]
8 | path = tests/contract-playground/lib/solmate
9 | url = https://github.com/transmissions11/solmate
10 | [submodule "tests/contract-playground/lib/v2-periphery"]
11 | path = tests/contract-playground/lib/v2-periphery
12 | url = https://github.com/Uniswap/v2-periphery
13 | [submodule "bot/foundry_workspace/lib/forge-std"]
14 | path = bot/foundry_workspace/lib/forge-std
15 | url = https://github.com/foundry-rs/forge-std
16 | [submodule "tests/foundry-nft-f23/lib/forge-std"]
17 | path = tests/foundry-nft-f23/lib/forge-std
18 | url = https://github.com/foundry-rs/forge-std
19 | [submodule "tests/foundry-nft-f23/lib/openzeppelin-contracts"]
20 | path = tests/foundry-nft-f23/lib/openzeppelin-contracts
21 | url = https://github.com/OpenZeppelin/openzeppelin-contracts
22 | [submodule "tests/ccip-contracts"]
23 | path = tests/ccip-contracts
24 | url = https://github.com/smartcontractkit/ccip
25 | [submodule "tests/2024-05-Sablier"]
26 | path = tests/2024-05-Sablier
27 | url = https://github.com/alexroan/2024-05-Sablier.git
28 | [submodule "tests/prb-math"]
29 | path = tests/prb-math
30 | url = https://github.com/PaulRBerg/prb-math
31 | [submodule "tests/2024-07-templegold"]
32 | path = tests/2024-07-templegold
33 | url = https://github.com/Cyfrin/2024-07-templegold.git
34 | [submodule "tests/foundry-nft-f23-icm/lib/forge-std"]
35 | path = tests/foundry-nft-f23-icm/lib/forge-std
36 | url = https://github.com/foundry-rs/forge-std
37 | [submodule "tests/foundry-nft-f23-icm/lib/openzeppelin-contracts"]
38 | path = tests/foundry-nft-f23-icm/lib/openzeppelin-contracts
39 | url = https://github.com/OpenZeppelin/openzeppelin-contracts
40 |
```
--------------------------------------------------------------------------------
/aderyn/README.md:
--------------------------------------------------------------------------------
```markdown
1 | ../README.md
```
--------------------------------------------------------------------------------
/tests/hardhat-js-playground/README.md:
--------------------------------------------------------------------------------
```markdown
1 | # Sample Hardhat Project
2 |
3 | This project demonstrates a basic Hardhat use case. It comes with a sample contract, a test for that contract, and a script that deploys that contract.
4 |
5 | Try running some of the following tasks:
6 |
7 | ```shell
8 | npx hardhat help
9 | npx hardhat test
10 | REPORT_GAS=true npx hardhat test
11 | npx hardhat node
12 | npx hardhat run scripts/deploy.js
13 | ```
14 |
```
--------------------------------------------------------------------------------
/aderyn_core/README.md:
--------------------------------------------------------------------------------
```markdown
1 | <p align="center">
2 | <br />
3 | <a href="https://cyfrin.io/">
4 | <img src="../.github/images/aderyn_logo.png" width="400" alt=""/></a>
5 | <br />
6 | </p>
7 | <p align="center"><strong>A powerful Solidity static analyzer that takes a bird's eye view over your smart contracts.
8 | </strong></p>
9 | <p align="center">
10 | <br />
11 | <a href="https://cyfrin.io/">
12 | <img src="../.github/images/poweredbycyfrinblue.png" width="145" alt=""/></a>
13 | <br />
14 | </p>
15 |
16 |
17 | <p align="center">
18 | <a href="https://twitter.com/cyfrinaudits">Twitter</a>
19 | <a href="https://cyfrin.io">Website</a>
20 | <a href="https://discord.gg/cyfrin">Discord</a>
21 | <p>
22 |
23 | # Aderyn Core
24 |
25 | aderyn_core is the backend infrastructure for Aderyn.
26 |
27 | ```
28 | src/
29 | ├─ ast/ // Solidity AST Structs
30 | ├─ context/ // Program analysis tools
31 | ├─ detect/ // Where Detector specifications and logic live
32 | ├─ stats/ // Solidity file stats
33 | ├─ visitor/ // AST visitors
34 | ```
35 |
```
--------------------------------------------------------------------------------
/tests/contract-playground/README.md:
--------------------------------------------------------------------------------
```markdown
1 | ## Foundry
2 |
3 | **Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.**
4 |
5 | Foundry consists of:
6 |
7 | - **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools).
8 | - **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data.
9 | - **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network.
10 | - **Chisel**: Fast, utilitarian, and verbose solidity REPL.
11 |
12 | ## Documentation
13 |
14 | https://book.getfoundry.sh/
15 |
16 | ## Usage
17 |
18 | ### Build
19 |
20 | ```shell
21 | $ forge build
22 | ```
23 |
24 | ### Test
25 |
26 | ```shell
27 | $ forge test
28 | ```
29 |
30 | ### Format
31 |
32 | ```shell
33 | $ forge fmt
34 | ```
35 |
36 | ### Gas Snapshots
37 |
38 | ```shell
39 | $ forge snapshot
40 | ```
41 |
42 | ### Anvil
43 |
44 | ```shell
45 | $ anvil
46 | ```
47 |
48 | ### Deploy
49 |
50 | ```shell
51 | $ forge script script/Counter.s.sol:CounterScript --rpc-url <your_rpc_url> --private-key <your_private_key>
52 | ```
53 |
54 | ### Cast
55 |
56 | ```shell
57 | $ cast <subcommand>
58 | ```
59 |
60 | ### Help
61 |
62 | ```shell
63 | $ forge --help
64 | $ anvil --help
65 | $ cast --help
66 | ```
67 |
```
--------------------------------------------------------------------------------
/tests/foundry-nft-f23-icm/README.md:
--------------------------------------------------------------------------------
```markdown
1 | ## Foundry
2 |
3 | **Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.**
4 |
5 | Foundry consists of:
6 |
7 | - **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools).
8 | - **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data.
9 | - **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network.
10 | - **Chisel**: Fast, utilitarian, and verbose solidity REPL.
11 |
12 | ## Documentation
13 |
14 | https://book.getfoundry.sh/
15 |
16 | ## Usage
17 |
18 | ### Build
19 |
20 | ```shell
21 | $ forge build
22 | ```
23 |
24 | ### Test
25 |
26 | ```shell
27 | $ forge test
28 | ```
29 |
30 | ### Format
31 |
32 | ```shell
33 | $ forge fmt
34 | ```
35 |
36 | ### Gas Snapshots
37 |
38 | ```shell
39 | $ forge snapshot
40 | ```
41 |
42 | ### Anvil
43 |
44 | ```shell
45 | $ anvil
46 | ```
47 |
48 | ### Deploy
49 |
50 | ```shell
51 | $ forge script script/Counter.s.sol:CounterScript --rpc-url <your_rpc_url> --private-key <your_private_key>
52 | ```
53 |
54 | ### Cast
55 |
56 | ```shell
57 | $ cast <subcommand>
58 | ```
59 |
60 | ### Help
61 |
62 | ```shell
63 | $ forge --help
64 | $ anvil --help
65 | $ cast --help
66 | ```
67 |
```
--------------------------------------------------------------------------------
/tests/foundry-nft-f23/README.md:
--------------------------------------------------------------------------------
```markdown
1 | ## Foundry
2 |
3 | **Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.**
4 |
5 | Foundry consists of:
6 |
7 | - **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools).
8 | - **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data.
9 | - **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network.
10 | - **Chisel**: Fast, utilitarian, and verbose solidity REPL.
11 |
12 | ## Documentation
13 |
14 | https://book.getfoundry.sh/
15 |
16 | ## Usage
17 |
18 | ### Build
19 |
20 | ```shell
21 | $ forge build
22 | ```
23 |
24 | ### Test
25 |
26 | ```shell
27 | $ forge test
28 | ```
29 |
30 | ### Format
31 |
32 | ```shell
33 | $ forge fmt
34 | ```
35 |
36 | ### Gas Snapshots
37 |
38 | ```shell
39 | $ forge snapshot
40 | ```
41 |
42 | ### Anvil
43 |
44 | ```shell
45 | $ anvil
46 | ```
47 |
48 | ### Deploy
49 |
50 | ```shell
51 | $ forge script script/Counter.s.sol:CounterScript --rpc-url <your_rpc_url> --private-key <your_private_key>
52 | ```
53 |
54 | ### Cast
55 |
56 | ```shell
57 | $ cast <subcommand>
58 | ```
59 |
60 | ### Help
61 |
62 | ```shell
63 | $ forge --help
64 | $ anvil --help
65 | $ cast --help
66 | ```
67 |
```
--------------------------------------------------------------------------------
/aderyn_driver/README.md:
--------------------------------------------------------------------------------
```markdown
1 | <p align="center">
2 | <br />
3 | <a href="https://cyfrin.io/">
4 | <img src="../.github/images/aderyn_logo.png" width="400" alt=""/></a>
5 | <br />
6 | </p>
7 | <p align="center"><strong>A powerful Solidity static analyzer that takes a bird's eye view over your smart contracts.
8 | </strong></p>
9 | <p align="center">
10 | <br />
11 | <a href="https://cyfrin.io/">
12 | <img src="../.github/images/poweredbycyfrinblue.png" width="145" alt=""/></a>
13 | <br />
14 | </p>
15 |
16 |
17 | <p align="center">
18 | <a href="https://twitter.com/cyfrinaudits">Twitter</a>
19 | <a href="https://cyfrin.io">Website</a>
20 | <a href="https://discord.gg/cyfrin">Discord</a>
21 | <p>
22 |
23 | # Aderyn Driver
24 |
25 | aderyn_driver drives the process of running aderyn over a codebase, utilizing [aderyn_core](../aderyn_core).
26 |
27 | Order of operation:
28 | 1. Configuration
29 | * Aderyn detects the source folder containing the contracts as well as the remappings to enable scan.
30 | 2. Build the `WorkspaceContext`.
31 | * Uses `solidity-ast-rs` to get the ASTs of the solidity files and then creates a Workspace Context out of the same.
32 | 4. Calls `aderyn_core::detect_issues` and then serializes the report based on output file format
33 |
```
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
```markdown
1 | <p align="center">
2 | <br />
3 | <a href="https://cyfrin.io/">
4 | <img src="https://github.com/Cyfrin/aderyn/blob/dev/.github/images/aderyn_logo.png" width="400" alt=""/></a>
5 | <br />
6 | </p>
7 | <p align="center"><strong>A powerful Solidity static analyzer that takes a bird's eye view over your smart contracts.
8 | </strong></p>
9 | <p align="center">
10 | <br />
11 | <a href="https://cyfrin.io/">
12 | <img src="https://github.com/Cyfrin/aderyn/blob/dev/.github/images/poweredbycyfrinblue.png" width="145" alt=""/></a>
13 | <br />
14 | </p>
15 |
16 | <p align="center">
17 | <a href="https://cyfrin.gitbook.io/cyfrin-docs/aderyn-cli/readme">Docs</a>
18 | <a href="https://discord.gg/cyfrin">Discord</a>
19 | <a href="https://twitter.com/cyfrinaudits">Twitter</a>
20 | <p>
21 |
22 | ---
23 |
24 | <div align="center">
25 |
26 | [![Stargazers][stars-shield]][stars-url] [![Forks][forks-shield]][forks-url]
27 | [![Contributors][contributors-shield]][contributors-url]
28 | [![Release][release-shield]][release-url]
29 | [![Issues][issues-shield]][issues-url]
30 | [![GPL-3.0 License][license-shield]][license-url]
31 |
32 | </div>
33 |
34 | ## What is Aderyn?
35 |
36 | **Aderyn is an open-source public good developer tool.** It is a Rust-based solidity smart contract static analyzer designed to help protocol engineers and security researchers find vulnerabilities in Solidity code bases.
37 |
38 | You can read the [Cyfrin official documentation](https://cyfrin.gitbook.io/cyfrin-docs/aderyn-cli/readme) for an in-depth look at Aderyn's functionalities.
39 |
40 | There is also an officially supported [VSCode extension](https://github.com/Cyfrin/vscode-aderyn/) for Aderyn. Download from the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=Cyfrin.aderyn&ssr=false#overview) and start identifying vulnerabilities in your Solidity
41 | code with ease.
42 |
43 | ## Features
44 |
45 | - Off the shelf support for Foundry projects.
46 | - Off the shelf support for Hardhat projects. (Sometimes `remappings.txt` maybe required)
47 | - Configuration file (`aderyn.toml`) needed to support custom frameworks.
48 | - Markdown, JSON and Sarif reports
49 |
50 | ## Installation
51 |
52 | > **NOTE** Windows users must have WSL installed
53 |
54 | ### Using Cyfrinup
55 |
56 | **Cyfrinup** is the cross platform installation manager for Cyfrin tools.
57 |
58 | [One time setup](https://github.com/Cyfrin/up).
59 |
60 | Run `aderyn --version` to check the installation.
61 |
62 | Run `cyfrinup` to upgrade everything to the latest version.
63 |
64 | ---
65 |
66 | ### Using curl
67 |
68 | ```sh
69 | curl --proto '=https' --tlsv1.2 -LsSf https://github.com/cyfrin/aderyn/releases/latest/download/aderyn-installer.sh | bash
70 | ```
71 |
72 | ##### Upgrade older versions by running: `aderyn-update`
73 |
74 | ---
75 |
76 | ### Using Homebrew
77 |
78 | ```sh
79 | brew install cyfrin/tap/aderyn
80 | ```
81 |
82 | ##### Upgrade older versions by running: `brew upgrade cyfrin/tap/aderyn`
83 |
84 | ---
85 |
86 | ### Using npm
87 |
88 | ```sh
89 | npm install @cyfrin/aderyn -g
90 | ```
91 |
92 | ##### Upgrade older versions by (re)running: `npm install @cyfrin/aderyn -g`
93 |
94 | ---
95 |
96 | If you are installing with Curl or Homebrew or npm, ensure that the correct version of Aderyn in your path comes from either the Homebrew or npm global packages directory. If an older version exists at `~/.cyfrin/bin/aderyn`, remove it using `rm -f ~/.cyfrin/bin/aderyn`, as this is no longer the default installation location.
97 |
98 | ## Quick Start
99 |
100 | [Quick Start](https://cyfrin.gitbook.io/cyfrin-docs/aderyn-cli/quickstart) example with video guide.
101 |
102 | ```
103 | cd path/to/solidity/project/root
104 | aderyn
105 | ```
106 |
107 | This generates a [report.md](https://github.com/Cyfrin/aderyn/blob/dev/reports/report.md)
108 |
109 | See examples using more CLI options [here](https://cyfrin.gitbook.io/cyfrin-docs/cli-options)
110 |
111 | ## VS Code extension
112 |
113 | Officially supported [VSCode extension](https://github.com/Cyfrin/vscode-aderyn/) for Aderyn.
114 | Download from [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=Cyfrin.aderyn&ssr=false#overview)
115 |
116 | ## Contributing & License
117 |
118 | Help us build Aderyn 🦜 Please see our [contribution guidelines](./CONTRIBUTING.md) for in-depth developer environment setup and PR approval process.
119 | Aderyn is an open-source software licensed under the [GPL-3.0 License](./LICENSE).
120 |
121 | ## Building a custom Aderyn detector
122 |
123 | Aderyn makes it easy to build Static Analysis detectors that can adapt to any Solidity codebase and protocol. This guide will teach you how to build, test, and run your custom Aderyn detectors.
124 | To learn how to create your custom Aderyn detectors, [checkout the official docs](https://cyfrin.gitbook.io/cyfrin-docs/aderyn-cli/detectors-quickstart)
125 |
126 |
127 | ## Credits
128 |
129 | This project exists thanks to all the people who [contribute](/CONTRIBUTING.md).<br>
130 |
131 | <a href="https://github.com/cyfrin/Aderyn/graphs/contributors">
132 | <img src="https://contrib.rocks/image?repo=cyfrin/Aderyn" />
133 | </a>
134 |
135 | ## Attribution
136 |
137 | - AST Visitor code from [solc-ast-rs](https://github.com/hrkrshnn/solc-ast-rs).
138 | - Foundry Compilers for backend AST generation [foundry-compilers](https://github.com/foundry-rs/compilers)
139 | - Original detectors based on [4naly3er](https://github.com/Picodes/4naly3er) detectors.
140 | - Shoutout to the original king of static analysis [slither](https://github.com/crytic/slither).
141 | - Solidity AST Generator [solidity-ast-rs](https://github.com/Cyfrin/solidity-ast-rs).
142 |
143 | [contributors-shield]: https://img.shields.io/github/contributors/cyfrin/aderyn
144 | [contributors-url]: https://github.com/cyfrin/aderyn/graphs/contributors
145 | [forks-shield]: https://img.shields.io/github/forks/cyfrin/aderyn
146 | [forks-url]: https://github.com/cyfrin/aderyn/network/members
147 | [stars-shield]: https://img.shields.io/github/stars/cyfrin/aderyn
148 | [stars-url]: https://github.com/cyfrin/aderyn/stargazers
149 | [release-shield]: https://img.shields.io/github/v/release/Cyfrin/aderyn
150 | [release-url]: https://github.com/Cyfrin/aderyn/releases
151 | [issues-shield]: https://img.shields.io/github/issues/cyfrin/aderyn
152 | [issues-url]: https://github.com/cyfrin/aderyn/issues
153 | [license-shield]: https://img.shields.io/github/license/cyfrin/aderyn?logoColor=%23fff&color=blue
154 | [license-url]: https://github.com/cyfrin/aderyn/blob/master/LICENSE
155 | [linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555
156 |
```
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
```markdown
1 | # Welcome to the Cyfrin Aderyn Contributing Guide
2 |
3 | This guide aims to provide an overview of the contribution workflow to help make the contribution process effective for everyone involved.
4 |
5 | ## About the Project
6 |
7 | Aderyn is a Rust-based solidity smart contract static analyzer designed to help protocol engineers and security researchers find vulnerabilities in Solidity code bases.
8 |
9 | Thanks to its detectors, running Cyfrin Aderyn on your Solidity codebase will highlight all the issues currently supported, drastically reducing the potential for unknown vulnerabilities in your Solidity code.
10 |
11 | Aderyn also makes it easier for smart contract engineers and protocols to create custom detectors to find specific or unsupported code vulnerabilities.
12 |
13 | Read the [README](README.md) and consult the docs for an in-depth project overview.
14 |
15 | ### Vision
16 |
17 | Cyfrin Aderyn aims to give engineers and smart contract security researchers reliable and open-source Solidity static analysis tools to find and suggest solutions to smart contract vulnerabilities while adapting quickly and efficiently to different codebases.
18 |
19 | ### Project Status
20 |
21 | The project is under active development.
22 |
23 | You can contribute to this repo in many ways:
24 |
25 | - Solve open issues
26 | - Report bugs or feature requests
27 | - Improve the documentation
28 |
29 | Contributions are made via Issues and Pull Requests (PRs). A few general guidelines for contributions:
30 |
31 | - Search for existing Issues and PRs before creating your own.
32 | - Contributions should only fix/add the functionality in the issue OR address style issues, not both.
33 | - If you're running into an error, please give context. Explain what you're trying to do and how to reproduce the error.
34 |
35 | ## Getting started
36 |
37 | ### Overview
38 |
39 | Indexed in [DeepWiki](https://deepwiki.com/Cyfrin/aderyn)
40 |
41 | ### Pull Requests
42 |
43 | #### Developer environment setup
44 |
45 | 1. [Install Rust](https://www.rust-lang.org/tools/install),
46 | 2. Clone this repo and `cd aderyn/`
47 | 3. Run `make` . Make sure to have tools listed at the top of the Makefile installed in your computer.
48 | 4. Work on the issue, write unit tests. Use `cargo test <test-name>` to test. Feel free to add solidity files to `tests/contract-playground`.
49 | 5. Run `cargo prep --cpg` to generate the report for the same.
50 | 6. Once happy with the work, run `cargo blesspr` to "polish" your PR so CI can be happy.
51 | 7. Create a pull request to `dev` branch here. The maintainers will be notified. Either @alexroan or @TilakMaddy will reach out to you.
52 |
53 | Suggested VSCode extensions
54 | * [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=dustypomerleau.rust-syntax) - Rust language support for Visual Studio Code
55 | * [Rust Syntax](https://marketplace.visualstudio.com/items?itemName=dustypomerleau.rust-syntax) - Improved Rust syntax highlighting
56 |
57 | #### Advanced Setup
58 | 1. Install [Bacon](https://dystroy.org/bacon/)
59 | 2. Run `bacon` at the root
60 | 3. Press
61 | * `t` for tests
62 | * `r` for generating a report on contract-playground. Shorthand for `cargo prep --cfg`
63 | * `a` for generating all reports. Shorthand for `cargo prep --all --parallel`
64 | * `Alt-b` or `⌥-b` (Option-B on Mac) for "blessing" the PR. Shorthand for `cargo blesspr`
65 |
66 | #### Tips
67 | Feel free to reach out to `cargo fixfmt` and `cargo fixclippy` to apply quick fixes on code quality.
68 |
69 | #### Pull Request Process
70 |
71 | We follow the ["fork-and-pull" Git workflow](https://github.com/susam/gitpr)
72 |
73 | 1. Fork the repo
74 | 2. Clone the project
75 | 3. Create a new branch with a descriptive name
76 | 4. Commit your changes to the new branch
77 | 5. Push changes to your fork
78 | 6. Open a PR in our repository and tag one of the maintainers to review your PR
79 |
80 | Here are some tips for a high-quality pull request:
81 |
82 | - Create a title for the PR that accurately defines the work done.
83 | - Structure the description neatly to make it easy for the readers to consume. For example, you can include bullet points and screenshots instead of having one large paragraph.
84 | - Add the link to the issue if applicable.
85 | - Have a good commit message that summarises the work done.
86 |
87 | Once you submit your PR:
88 |
89 | - We may ask questions, request additional information, or ask for changes to be made before a PR can be merged. These are to clarify the PR for everyone involved and create a frictionless interaction process.
90 | - As you update your PR and apply changes, mark each conversation resolved.
91 |
92 | Once the PR is approved, we'll "squash-and-merge" to keep the git commit history clean.
93 |
94 | ### Issues
95 |
96 | Issues should be used to report problems, request a new feature, or discuss potential changes before a PR is created.
97 |
98 | #### Solve an issue
99 |
100 | Please review our [existing issues](https://github.com/cyfrin/aderyn/issues) to find one that interests you.
101 |
102 | If a contributor is working on the issue, they will be assigned to the individual. If you find an issue to work on, you can assign it to yourself and open a PR with a fix.
103 |
104 | #### Report Bugs
105 |
106 | If a related issue doesn't exist, you can open a new issue.
107 |
108 | Some tips to follow when you are creating an issue:
109 |
110 | - Provide as much context as possible. Over-communicate to give the most details to the reader.
111 | - Include the steps to reproduce the issue or the reason for adding the feature.
112 | - Screenshots, videos, etc., are highly appreciated.
113 |
114 |
```
--------------------------------------------------------------------------------
/tests/toml/nested_project1/folder1/hardhat.config.ts:
--------------------------------------------------------------------------------
```typescript
1 |
```
--------------------------------------------------------------------------------
/tests/toml/nested_project1/folder2/hardhat.config.ts:
--------------------------------------------------------------------------------
```typescript
1 |
```
--------------------------------------------------------------------------------
/tests/toml/nested_project1/folder3/file.txt:
--------------------------------------------------------------------------------
```
1 |
```
--------------------------------------------------------------------------------
/tests/toml/nested_project2/folder1/foundry.toml:
--------------------------------------------------------------------------------
```toml
1 |
```
--------------------------------------------------------------------------------
/tests/toml/nested_project2/folder2/file1.txt:
--------------------------------------------------------------------------------
```
1 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/context/graph/utils.rs:
--------------------------------------------------------------------------------
```rust
1 | // Utilities
2 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/context/graph/preprocess.rs:
--------------------------------------------------------------------------------
```rust
1 | mod legacy;
2 | mod new;
3 |
```
--------------------------------------------------------------------------------
/tests/no-sol-files/Hello.txt:
--------------------------------------------------------------------------------
```
1 | I am not a solidity file!
```
--------------------------------------------------------------------------------
/aderyn_core/src/detect/test_utils.rs:
--------------------------------------------------------------------------------
```rust
1 | pub use crate::test_utils::*;
2 |
```
--------------------------------------------------------------------------------
/tests/no-sol-files/extra/HelloAgain.md:
--------------------------------------------------------------------------------
```markdown
1 | I am also not a solidity file!
```
--------------------------------------------------------------------------------
/aderyn_core/src/ast/impls/ctx.rs:
--------------------------------------------------------------------------------
```rust
1 | pub mod utils;
2 | pub mod workspace;
3 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/context/mcp/tool_guide.rs:
--------------------------------------------------------------------------------
```rust
1 | mod tool;
2 |
3 | pub use tool::ToolGuide;
4 |
```
--------------------------------------------------------------------------------
/rust-toolchain.toml:
--------------------------------------------------------------------------------
```toml
1 | [toolchain]
2 | channel = "nightly-2025-09-20"
3 |
```
--------------------------------------------------------------------------------
/benchmarks/aderyn/base/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [24074388.25,60254053.375,156733160.375,192912825.5]
```
--------------------------------------------------------------------------------
/benchmarks/aderyn/new/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [24074388.25,60254053.375,156733160.375,192912825.5]
```
--------------------------------------------------------------------------------
/aderyn_core/src/ast/impls.rs:
--------------------------------------------------------------------------------
```rust
1 | pub mod ctx;
2 | pub mod disp;
3 | pub mod node;
4 | pub mod own;
5 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/context/mcp/list_contracts.rs:
--------------------------------------------------------------------------------
```rust
1 | mod render;
2 | mod tool;
3 |
4 | pub use tool::ListContractsTool;
5 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/context/mcp/project_overview.rs:
--------------------------------------------------------------------------------
```rust
1 | mod render;
2 | mod tool;
3 |
4 | pub use tool::ProjectOverviewTool;
5 |
```
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
```json
1 | {
2 | "dependencies": {
3 | "@cyfrin/aderyn": "^0.5.11"
4 | }
5 | }
6 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/context/mcp/callgraph.rs:
--------------------------------------------------------------------------------
```rust
1 | mod render;
2 | mod tool;
3 | mod utils;
4 |
5 | pub use tool::CallgraphTool;
6 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/context/mcp/node_finder.rs:
--------------------------------------------------------------------------------
```rust
1 | mod render;
2 | mod tool;
3 | mod utils;
4 |
5 | pub use tool::NodeFinderTool;
6 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/visitor.rs:
--------------------------------------------------------------------------------
```rust
1 | pub mod ast_visitor;
2 | pub mod macros;
3 | pub mod workspace_visitor;
4 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/context/mcp/node_summarizer.rs:
--------------------------------------------------------------------------------
```rust
1 | mod render;
2 | mod tool;
3 | mod utils;
4 |
5 | pub use tool::NodeSummarizerTool;
6 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/ast/impls/own.rs:
--------------------------------------------------------------------------------
```rust
1 | pub mod hashing;
2 | pub mod node_id;
3 | pub mod source_units;
4 | pub mod utils;
5 |
```
--------------------------------------------------------------------------------
/benchmarks/ecrecover/base/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [4050.157365511992,4469.464027675213,5587.615126777137,6006.921788940359]
```
--------------------------------------------------------------------------------
/benchmarks/ecrecover/new/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [4050.157365511992,4469.464027675213,5587.615126777137,6006.921788940359]
```
--------------------------------------------------------------------------------
/benchmarks/large-numeric-literal/base/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [47144.93649317571,51072.20664528066,61544.92705089388,65472.19720299884]
```
--------------------------------------------------------------------------------
/benchmarks/large-numeric-literal/new/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [47144.93649317571,51072.20664528066,61544.92705089388,65472.19720299884]
```
--------------------------------------------------------------------------------
/benchmarks/deprecated-oz-functions/base/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [209437.4101413315,232279.87118165128,293193.100622504,316035.56166282383]
```
--------------------------------------------------------------------------------
/benchmarks/deprecated-oz-functions/new/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [209437.4101413315,232279.87118165128,293193.100622504,316035.56166282383]
```
--------------------------------------------------------------------------------
/benchmarks/unsafe-erc20-functions/base/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [35212.9987387433,38456.261190165795,47104.96106062579,50348.223512048295]
```
--------------------------------------------------------------------------------
/benchmarks/unsafe-erc20-functions/new/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [35212.9987387433,38456.261190165795,47104.96106062579,50348.223512048295]
```
--------------------------------------------------------------------------------
/benchmarks/unsafe-oz-erc721-mint/base/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [175205.12765688275,228651.135374494,371173.8226214574,424619.83033906866]
```
--------------------------------------------------------------------------------
/benchmarks/unsafe-oz-erc721-mint/new/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [175205.12765688275,228651.135374494,371173.8226214574,424619.83033906866]
```
--------------------------------------------------------------------------------
/benchmarks/useless-modifier/base/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [19796.776305383224,22043.67289645662,28035.397139319008,30282.2937303924]
```
--------------------------------------------------------------------------------
/benchmarks/useless-modifier/new/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [19796.776305383224,22043.67289645662,28035.397139319008,30282.2937303924]
```
--------------------------------------------------------------------------------
/benchmarks/arbitrary-transfer-from/base/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [47743.649223318556,53290.926970867804,68083.66763099913,73630.94537854838]
```
--------------------------------------------------------------------------------
/benchmarks/arbitrary-transfer-from/new/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [47743.649223318556,53290.926970867804,68083.66763099913,73630.94537854838]
```
--------------------------------------------------------------------------------
/benchmarks/block-timestamp-deadline/base/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [235390.88589375693,254808.37849375347,306588.3587604109,326005.8513604074]
```
--------------------------------------------------------------------------------
/benchmarks/block-timestamp-deadline/new/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [235390.88589375693,254808.37849375347,306588.3587604109,326005.8513604074]
```
--------------------------------------------------------------------------------
/benchmarks/non-reentrant-before-others/base/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [2683.886806189582,2960.949995258795,3699.7851661100294,3976.8483551792424]
```
--------------------------------------------------------------------------------
/benchmarks/non-reentrant-before-others/new/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [2683.886806189582,2960.949995258795,3699.7851661100294,3976.8483551792424]
```
--------------------------------------------------------------------------------
/benchmarks/push-zero-opcode/base/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [34078.58690040802,37859.73479445004,47942.795845228764,51723.943739270784]
```
--------------------------------------------------------------------------------
/benchmarks/push-zero-opcode/new/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [34078.58690040802,37859.73479445004,47942.795845228764,51723.943739270784]
```
--------------------------------------------------------------------------------
/benchmarks/require-with-string/base/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [17979.023262548268,22893.97480694981,36000.51225868725,40915.463803088795]
```
--------------------------------------------------------------------------------
/benchmarks/require-with-string/new/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [17979.023262548268,22893.97480694981,36000.51225868725,40915.463803088795]
```
--------------------------------------------------------------------------------
/benchmarks/unspecific-solidity-pragma/base/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [13387.772945464523,14814.454993205294,18618.94045384735,20045.62250158812]
```
--------------------------------------------------------------------------------
/benchmarks/unspecific-solidity-pragma/new/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [13387.772945464523,14814.454993205294,18618.94045384735,20045.62250158812]
```
--------------------------------------------------------------------------------
/benchmarks/zero-address-check/base/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [385785.5071481919,413785.54258315027,488452.3037430392,516452.33917799755]
```
--------------------------------------------------------------------------------
/benchmarks/zero-address-check/new/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [385785.5071481919,413785.54258315027,488452.3037430392,516452.33917799755]
```
--------------------------------------------------------------------------------
/benchmarks/constants-instead-of-literals/base/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [957069.8053083075,1151507.6895156088,1670008.7140684123,1864446.5982757136]
```
--------------------------------------------------------------------------------
/benchmarks/constants-instead-of-literals/new/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [957069.8053083075,1151507.6895156088,1670008.7140684123,1864446.5982757136]
```
--------------------------------------------------------------------------------
/benchmarks/delegate-call-in-loop/base/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [10444.92577347332,10809.214898230912,11780.652564251159,12144.941689008752]
```
--------------------------------------------------------------------------------
/benchmarks/delegate-call-in-loop/new/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [10444.92577347332,10809.214898230912,11780.652564251159,12144.941689008752]
```
--------------------------------------------------------------------------------
/benchmarks/empty-block/base/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [42044.806702114896,45770.336014479704,55705.080847452526,59430.61015981733]
```
--------------------------------------------------------------------------------
/benchmarks/empty-block/new/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [42044.806702114896,45770.336014479704,55705.080847452526,59430.61015981733]
```
--------------------------------------------------------------------------------
/benchmarks/inconsistent-type-names/base/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [650955.9366935485,1056646.1151209679,2138486.5909274193,2544176.7693548384]
```
--------------------------------------------------------------------------------
/benchmarks/inconsistent-type-names/new/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [650955.9366935485,1056646.1151209679,2138486.5909274193,2544176.7693548384]
```
--------------------------------------------------------------------------------
/benchmarks/solmate-safe-transfer-lib/base/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [3014.2540197349813,3142.371600337862,3484.0184819455453,3612.1360625484267]
```
--------------------------------------------------------------------------------
/benchmarks/solmate-safe-transfer-lib/new/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [3014.2540197349813,3142.371600337862,3484.0184819455453,3612.1360625484267]
```
--------------------------------------------------------------------------------
/benchmarks/unprotected-initializer/base/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [24701.896637931022,28382.651522090513,38197.99787984915,41878.752764008634]
```
--------------------------------------------------------------------------------
/benchmarks/unprotected-initializer/new/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [24701.896637931022,28382.651522090513,38197.99787984915,41878.752764008634]
```
--------------------------------------------------------------------------------
/benchmarks/useless-public-function/base/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [404523.76632256125,429920.72586094146,497645.95129662193,523042.9108350021]
```
--------------------------------------------------------------------------------
/benchmarks/useless-public-function/new/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [404523.76632256125,429920.72586094146,497645.95129662193,523042.9108350021]
```
--------------------------------------------------------------------------------
/benchmarks/avoid-abi-encode-packed/base/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [12691.557164385296,13382.961864104447,15226.707730022183,15918.112429741333]
```
--------------------------------------------------------------------------------
/benchmarks/avoid-abi-encode-packed/new/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [12691.557164385296,13382.961864104447,15226.707730022183,15918.112429741333]
```
--------------------------------------------------------------------------------
/benchmarks/centralization-risk/base/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [10336.201621396072,11216.300298449867,13563.230103926653,14443.328780980448]
```
--------------------------------------------------------------------------------
/benchmarks/centralization-risk/new/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [10336.201621396072,11216.300298449867,13563.230103926653,14443.328780980448]
```
--------------------------------------------------------------------------------
/benchmarks/hello_world/base/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [1402.4802387291743,1666.3598487721251,2370.0388088866607,2633.9184189296116]
```
--------------------------------------------------------------------------------
/benchmarks/hello_world/new/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [1402.4802387291743,1666.3598487721251,2370.0388088866607,2633.9184189296116]
```
--------------------------------------------------------------------------------
/benchmarks/unindexed-events/base/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [25470.691852159456,26676.110658222584,29890.560807724258,31095.979613787385]
```
--------------------------------------------------------------------------------
/benchmarks/unindexed-events/new/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [25470.691852159456,26676.110658222584,29890.560807724258,31095.979613787385]
```
--------------------------------------------------------------------------------
/benchmarks/useless-internal-function/base/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [12622.216641566672,14172.750966145632,18307.509165022853,19858.043489601812]
```
--------------------------------------------------------------------------------
/benchmarks/useless-internal-function/new/tukey.json:
--------------------------------------------------------------------------------
```json
1 | [12622.216641566672,14172.750966145632,18307.509165022853,19858.043489601812]
```
--------------------------------------------------------------------------------
/aderyn_core/src/context/mcp/contract_surface.rs:
--------------------------------------------------------------------------------
```rust
1 | pub mod render;
2 | pub mod tool;
3 | pub mod util;
4 |
5 | pub use tool::ContractSurfaceTool;
6 |
```
--------------------------------------------------------------------------------
/typos.toml:
--------------------------------------------------------------------------------
```toml
1 | [files]
2 | extend-exclude = ["tests/*", "benchmarks/*"]
3 |
4 | [default.extend-words]
5 | nd = "nd"
6 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/audit.rs:
--------------------------------------------------------------------------------
```rust
1 | pub mod attack_surface;
2 | pub mod auditor;
3 | pub mod entrypoint;
4 | pub mod public_functions_no_sender;
5 |
```
--------------------------------------------------------------------------------
/tests/adhoc-sol-files/aderyn.toml:
--------------------------------------------------------------------------------
```toml
1 | version = 1
2 | # src = ""
3 | exclude = ["lib/"]
4 | # remappings = []
5 | # scope = [
6 | # "AdminContract.sol"
7 | # ]
8 |
```
--------------------------------------------------------------------------------
/tests/hardhat-js-playground/artifacts/contracts/Counter.sol/Counter.dbg.json:
--------------------------------------------------------------------------------
```json
1 | {
2 | "_format": "hh-sol-dbg-1",
3 | "buildInfo": "../../build-info/cee6fe9a9a2f03f7ff10a27ab2746af6.json"
4 | }
5 |
```
--------------------------------------------------------------------------------
/tests/hardhat-js-playground/artifacts/contracts/ExtendedInheritance.sol/ExtendedInheritance.dbg.json:
--------------------------------------------------------------------------------
```json
1 | {
2 | "_format": "hh-sol-dbg-1",
3 | "buildInfo": "../../build-info/cee6fe9a9a2f03f7ff10a27ab2746af6.json"
4 | }
5 |
```
--------------------------------------------------------------------------------
/tests/hardhat-js-playground/artifacts/contracts/IContractInheritance.sol/IContractInheritance.dbg.json:
--------------------------------------------------------------------------------
```json
1 | {
2 | "_format": "hh-sol-dbg-1",
3 | "buildInfo": "../../build-info/cee6fe9a9a2f03f7ff10a27ab2746af6.json"
4 | }
5 |
```
--------------------------------------------------------------------------------
/tests/hardhat-js-playground/artifacts/contracts/InheritanceBase.sol/InheritanceBase.dbg.json:
--------------------------------------------------------------------------------
```json
1 | {
2 | "_format": "hh-sol-dbg-1",
3 | "buildInfo": "../../build-info/cee6fe9a9a2f03f7ff10a27ab2746af6.json"
4 | }
5 |
```
--------------------------------------------------------------------------------
/tests/hardhat-js-playground/artifacts/contracts/KeccakContract.sol/KeccakContract.dbg.json:
--------------------------------------------------------------------------------
```json
1 | {
2 | "_format": "hh-sol-dbg-1",
3 | "buildInfo": "../../build-info/cee6fe9a9a2f03f7ff10a27ab2746af6.json"
4 | }
5 |
```
--------------------------------------------------------------------------------
/tests/hardhat-js-playground/artifacts/contracts/Lock.sol/Lock.dbg.json:
--------------------------------------------------------------------------------
```json
1 | {
2 | "_format": "hh-sol-dbg-1",
3 | "buildInfo": "../../build-info/cee6fe9a9a2f03f7ff10a27ab2746af6.json"
4 | }
5 |
```
--------------------------------------------------------------------------------
/tests/hardhat-js-playground/artifacts/contracts/StateVariables.sol/StateVariables.dbg.json:
--------------------------------------------------------------------------------
```json
1 | {
2 | "_format": "hh-sol-dbg-1",
3 | "buildInfo": "../../build-info/cee6fe9a9a2f03f7ff10a27ab2746af6.json"
4 | }
5 |
```
--------------------------------------------------------------------------------
/funding.json:
--------------------------------------------------------------------------------
```json
1 | {
2 | "opRetro": {
3 | "projectId": "0xa7d78d566bfa319479ec048c94c3d8c1f4d628a9344ba157fc4974dbf472dc3e"
4 | }
5 | }
6 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/context.rs:
--------------------------------------------------------------------------------
```rust
1 | pub mod browser;
2 | pub mod capturable;
3 | pub mod flow;
4 | pub mod graph;
5 | pub mod macros;
6 | pub mod mcp;
7 | pub mod router;
8 | pub mod workspace;
9 |
```
--------------------------------------------------------------------------------
/benchmarks/aderyn/base/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"aderyn","function_id":null,"value_str":null,"throughput":null,"full_id":"aderyn","directory_name":"aderyn","title":"aderyn"}
```
--------------------------------------------------------------------------------
/benchmarks/aderyn/new/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"aderyn","function_id":null,"value_str":null,"throughput":null,"full_id":"aderyn","directory_name":"aderyn","title":"aderyn"}
```
--------------------------------------------------------------------------------
/tests/hardhat-js-playground/hardhat.config.js:
--------------------------------------------------------------------------------
```javascript
1 | require("@nomicfoundation/hardhat-toolbox");
2 |
3 | /** @type import('hardhat/config').HardhatUserConfig */
4 | module.exports = {
5 | solidity: "0.8.20",
6 | };
7 |
```
--------------------------------------------------------------------------------
/benchmarks/ecrecover/base/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"ecrecover","function_id":null,"value_str":null,"throughput":null,"full_id":"ecrecover","directory_name":"ecrecover","title":"ecrecover"}
```
--------------------------------------------------------------------------------
/benchmarks/ecrecover/new/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"ecrecover","function_id":null,"value_str":null,"throughput":null,"full_id":"ecrecover","directory_name":"ecrecover","title":"ecrecover"}
```
--------------------------------------------------------------------------------
/benchmarks/empty-block/base/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"empty-block","function_id":null,"value_str":null,"throughput":null,"full_id":"empty-block","directory_name":"empty-block","title":"empty-block"}
```
--------------------------------------------------------------------------------
/benchmarks/empty-block/new/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"empty-block","function_id":null,"value_str":null,"throughput":null,"full_id":"empty-block","directory_name":"empty-block","title":"empty-block"}
```
--------------------------------------------------------------------------------
/benchmarks/hello_world/base/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"hello_world","function_id":null,"value_str":null,"throughput":null,"full_id":"hello_world","directory_name":"hello_world","title":"hello_world"}
```
--------------------------------------------------------------------------------
/benchmarks/hello_world/new/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"hello_world","function_id":null,"value_str":null,"throughput":null,"full_id":"hello_world","directory_name":"hello_world","title":"hello_world"}
```
--------------------------------------------------------------------------------
/benchmarks/push-zero-opcode/base/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"push-zero-opcode","function_id":null,"value_str":null,"throughput":null,"full_id":"push-zero-opcode","directory_name":"push-zero-opcode","title":"push-zero-opcode"}
```
--------------------------------------------------------------------------------
/benchmarks/push-zero-opcode/new/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"push-zero-opcode","function_id":null,"value_str":null,"throughput":null,"full_id":"push-zero-opcode","directory_name":"push-zero-opcode","title":"push-zero-opcode"}
```
--------------------------------------------------------------------------------
/benchmarks/unindexed-events/base/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"unindexed-events","function_id":null,"value_str":null,"throughput":null,"full_id":"unindexed-events","directory_name":"unindexed-events","title":"unindexed-events"}
```
--------------------------------------------------------------------------------
/benchmarks/unindexed-events/new/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"unindexed-events","function_id":null,"value_str":null,"throughput":null,"full_id":"unindexed-events","directory_name":"unindexed-events","title":"unindexed-events"}
```
--------------------------------------------------------------------------------
/benchmarks/useless-modifier/base/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"useless-modifier","function_id":null,"value_str":null,"throughput":null,"full_id":"useless-modifier","directory_name":"useless-modifier","title":"useless-modifier"}
```
--------------------------------------------------------------------------------
/benchmarks/useless-modifier/new/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"useless-modifier","function_id":null,"value_str":null,"throughput":null,"full_id":"useless-modifier","directory_name":"useless-modifier","title":"useless-modifier"}
```
--------------------------------------------------------------------------------
/tests/foundry-nft-f23-icm/aderyn.toml:
--------------------------------------------------------------------------------
```toml
1 | # Aderyn Configuration File
2 | # Help Aderyn work with more granular control
3 |
4 | # DO NOT CHANGE version below. As of now, only 1 is supported
5 | version = 1
6 |
7 | [env]
8 | FOUNDRY_PROFILE = "icm"
9 |
```
--------------------------------------------------------------------------------
/benchmarks/zero-address-check/base/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"zero-address-check","function_id":null,"value_str":null,"throughput":null,"full_id":"zero-address-check","directory_name":"zero-address-check","title":"zero-address-check"}
```
--------------------------------------------------------------------------------
/benchmarks/zero-address-check/new/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"zero-address-check","function_id":null,"value_str":null,"throughput":null,"full_id":"zero-address-check","directory_name":"zero-address-check","title":"zero-address-check"}
```
--------------------------------------------------------------------------------
/benchmarks/centralization-risk/base/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"centralization-risk","function_id":null,"value_str":null,"throughput":null,"full_id":"centralization-risk","directory_name":"centralization-risk","title":"centralization-risk"}
```
--------------------------------------------------------------------------------
/benchmarks/centralization-risk/new/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"centralization-risk","function_id":null,"value_str":null,"throughput":null,"full_id":"centralization-risk","directory_name":"centralization-risk","title":"centralization-risk"}
```
--------------------------------------------------------------------------------
/benchmarks/require-with-string/base/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"require-with-string","function_id":null,"value_str":null,"throughput":null,"full_id":"require-with-string","directory_name":"require-with-string","title":"require-with-string"}
```
--------------------------------------------------------------------------------
/benchmarks/require-with-string/new/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"require-with-string","function_id":null,"value_str":null,"throughput":null,"full_id":"require-with-string","directory_name":"require-with-string","title":"require-with-string"}
```
--------------------------------------------------------------------------------
/benchmarks/delegate-call-in-loop/base/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"delegate-call-in-loop","function_id":null,"value_str":null,"throughput":null,"full_id":"delegate-call-in-loop","directory_name":"delegate-call-in-loop","title":"delegate-call-in-loop"}
```
--------------------------------------------------------------------------------
/benchmarks/delegate-call-in-loop/new/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"delegate-call-in-loop","function_id":null,"value_str":null,"throughput":null,"full_id":"delegate-call-in-loop","directory_name":"delegate-call-in-loop","title":"delegate-call-in-loop"}
```
--------------------------------------------------------------------------------
/benchmarks/large-numeric-literal/base/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"large-numeric-literal","function_id":null,"value_str":null,"throughput":null,"full_id":"large-numeric-literal","directory_name":"large-numeric-literal","title":"large-numeric-literal"}
```
--------------------------------------------------------------------------------
/benchmarks/large-numeric-literal/new/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"large-numeric-literal","function_id":null,"value_str":null,"throughput":null,"full_id":"large-numeric-literal","directory_name":"large-numeric-literal","title":"large-numeric-literal"}
```
--------------------------------------------------------------------------------
/benchmarks/unsafe-oz-erc721-mint/base/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"unsafe-oz-erc721-mint","function_id":null,"value_str":null,"throughput":null,"full_id":"unsafe-oz-erc721-mint","directory_name":"unsafe-oz-erc721-mint","title":"unsafe-oz-erc721-mint"}
```
--------------------------------------------------------------------------------
/benchmarks/unsafe-oz-erc721-mint/new/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"unsafe-oz-erc721-mint","function_id":null,"value_str":null,"throughput":null,"full_id":"unsafe-oz-erc721-mint","directory_name":"unsafe-oz-erc721-mint","title":"unsafe-oz-erc721-mint"}
```
--------------------------------------------------------------------------------
/benchmarks/unsafe-erc20-functions/base/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"unsafe-erc20-functions","function_id":null,"value_str":null,"throughput":null,"full_id":"unsafe-erc20-functions","directory_name":"unsafe-erc20-functions","title":"unsafe-erc20-functions"}
```
--------------------------------------------------------------------------------
/benchmarks/unsafe-erc20-functions/new/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"unsafe-erc20-functions","function_id":null,"value_str":null,"throughput":null,"full_id":"unsafe-erc20-functions","directory_name":"unsafe-erc20-functions","title":"unsafe-erc20-functions"}
```
--------------------------------------------------------------------------------
/benchmarks/arbitrary-transfer-from/base/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"arbitrary-transfer-from","function_id":null,"value_str":null,"throughput":null,"full_id":"arbitrary-transfer-from","directory_name":"arbitrary-transfer-from","title":"arbitrary-transfer-from"}
```
--------------------------------------------------------------------------------
/benchmarks/arbitrary-transfer-from/new/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"arbitrary-transfer-from","function_id":null,"value_str":null,"throughput":null,"full_id":"arbitrary-transfer-from","directory_name":"arbitrary-transfer-from","title":"arbitrary-transfer-from"}
```
--------------------------------------------------------------------------------
/benchmarks/avoid-abi-encode-packed/base/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"avoid-abi-encode-packed","function_id":null,"value_str":null,"throughput":null,"full_id":"avoid-abi-encode-packed","directory_name":"avoid-abi-encode-packed","title":"avoid-abi-encode-packed"}
```
--------------------------------------------------------------------------------
/benchmarks/avoid-abi-encode-packed/new/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"avoid-abi-encode-packed","function_id":null,"value_str":null,"throughput":null,"full_id":"avoid-abi-encode-packed","directory_name":"avoid-abi-encode-packed","title":"avoid-abi-encode-packed"}
```
--------------------------------------------------------------------------------
/benchmarks/deprecated-oz-functions/base/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"deprecated-oz-functions","function_id":null,"value_str":null,"throughput":null,"full_id":"deprecated-oz-functions","directory_name":"deprecated-oz-functions","title":"deprecated-oz-functions"}
```
--------------------------------------------------------------------------------
/benchmarks/deprecated-oz-functions/new/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"deprecated-oz-functions","function_id":null,"value_str":null,"throughput":null,"full_id":"deprecated-oz-functions","directory_name":"deprecated-oz-functions","title":"deprecated-oz-functions"}
```
--------------------------------------------------------------------------------
/benchmarks/inconsistent-type-names/base/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"inconsistent-type-names","function_id":null,"value_str":null,"throughput":null,"full_id":"inconsistent-type-names","directory_name":"inconsistent-type-names","title":"inconsistent-type-names"}
```
--------------------------------------------------------------------------------
/benchmarks/inconsistent-type-names/new/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"inconsistent-type-names","function_id":null,"value_str":null,"throughput":null,"full_id":"inconsistent-type-names","directory_name":"inconsistent-type-names","title":"inconsistent-type-names"}
```
--------------------------------------------------------------------------------
/benchmarks/unprotected-initializer/base/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"unprotected-initializer","function_id":null,"value_str":null,"throughput":null,"full_id":"unprotected-initializer","directory_name":"unprotected-initializer","title":"unprotected-initializer"}
```
--------------------------------------------------------------------------------
/benchmarks/unprotected-initializer/new/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"unprotected-initializer","function_id":null,"value_str":null,"throughput":null,"full_id":"unprotected-initializer","directory_name":"unprotected-initializer","title":"unprotected-initializer"}
```
--------------------------------------------------------------------------------
/benchmarks/useless-public-function/base/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"useless-public-function","function_id":null,"value_str":null,"throughput":null,"full_id":"useless-public-function","directory_name":"useless-public-function","title":"useless-public-function"}
```
--------------------------------------------------------------------------------
/benchmarks/useless-public-function/new/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"useless-public-function","function_id":null,"value_str":null,"throughput":null,"full_id":"useless-public-function","directory_name":"useless-public-function","title":"useless-public-function"}
```
--------------------------------------------------------------------------------
/benchmarks/block-timestamp-deadline/base/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"block-timestamp-deadline","function_id":null,"value_str":null,"throughput":null,"full_id":"block-timestamp-deadline","directory_name":"block-timestamp-deadline","title":"block-timestamp-deadline"}
```
--------------------------------------------------------------------------------
/benchmarks/block-timestamp-deadline/new/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"block-timestamp-deadline","function_id":null,"value_str":null,"throughput":null,"full_id":"block-timestamp-deadline","directory_name":"block-timestamp-deadline","title":"block-timestamp-deadline"}
```
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
```json
1 | {
2 | "rust-analyzer.showUnlinkedFileNotification": false,
3 | "[rust]": {
4 | "editor.defaultFormatter": "rust-lang.rust-analyzer", // Makes the magic
5 | "editor.formatOnSave": true // Optional
6 | },
7 | }
```
--------------------------------------------------------------------------------
/benchmarks/solmate-safe-transfer-lib/base/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"solmate-safe-transfer-lib","function_id":null,"value_str":null,"throughput":null,"full_id":"solmate-safe-transfer-lib","directory_name":"solmate-safe-transfer-lib","title":"solmate-safe-transfer-lib"}
```
--------------------------------------------------------------------------------
/benchmarks/solmate-safe-transfer-lib/new/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"solmate-safe-transfer-lib","function_id":null,"value_str":null,"throughput":null,"full_id":"solmate-safe-transfer-lib","directory_name":"solmate-safe-transfer-lib","title":"solmate-safe-transfer-lib"}
```
--------------------------------------------------------------------------------
/benchmarks/useless-internal-function/base/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"useless-internal-function","function_id":null,"value_str":null,"throughput":null,"full_id":"useless-internal-function","directory_name":"useless-internal-function","title":"useless-internal-function"}
```
--------------------------------------------------------------------------------
/benchmarks/useless-internal-function/new/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"useless-internal-function","function_id":null,"value_str":null,"throughput":null,"full_id":"useless-internal-function","directory_name":"useless-internal-function","title":"useless-internal-function"}
```
--------------------------------------------------------------------------------
/tests/contract-playground/foundry.toml:
--------------------------------------------------------------------------------
```toml
1 | [profile.default]
2 | src = "src"
3 | out = "out"
4 | libs = ["lib"]
5 | bytecode_hash = "none"
6 |
7 | [profile.sample]
8 | out = "sample_out"
9 | bytecode_hash = "none"
10 |
11 | [profile.uniswap]
12 | src = "src/uniswap"
13 | out = "out"
14 | bytecode_hash = "none"
```
--------------------------------------------------------------------------------
/tools/xtask/Cargo.toml:
--------------------------------------------------------------------------------
```toml
1 | [package]
2 | name = "xtask"
3 | description = "Auxiliary build tool"
4 | version = "0.5.2"
5 | edition = { workspace = true }
6 | publish = false
7 |
8 | [dependencies]
9 | anyhow = "1.0"
10 | xflags = "0.3"
11 | xshell = "0.2"
12 |
13 | [lints]
14 | workspace = true
15 |
```
--------------------------------------------------------------------------------
/aderyn/oranda.json:
--------------------------------------------------------------------------------
```json
1 | {
2 | "build": {
3 | "path_prefix": "aderyn"
4 | },
5 | "styles": {
6 | "favicon": "https://www.axo.dev/favicon.ico",
7 | "theme": "axo_dark"
8 | },
9 | "components": {
10 | "artifacts": {
11 | "cargo_dist": true
12 | }
13 | }
14 | }
15 |
```
--------------------------------------------------------------------------------
/benchmarks/unspecific-solidity-pragma/base/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"unspecific-solidity-pragma","function_id":null,"value_str":null,"throughput":null,"full_id":"unspecific-solidity-pragma","directory_name":"unspecific-solidity-pragma","title":"unspecific-solidity-pragma"}
```
--------------------------------------------------------------------------------
/benchmarks/unspecific-solidity-pragma/new/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"unspecific-solidity-pragma","function_id":null,"value_str":null,"throughput":null,"full_id":"unspecific-solidity-pragma","directory_name":"unspecific-solidity-pragma","title":"unspecific-solidity-pragma"}
```
--------------------------------------------------------------------------------
/benchmarks/non-reentrant-before-others/base/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"non-reentrant-before-others","function_id":null,"value_str":null,"throughput":null,"full_id":"non-reentrant-before-others","directory_name":"non-reentrant-before-others","title":"non-reentrant-before-others"}
```
--------------------------------------------------------------------------------
/benchmarks/non-reentrant-before-others/new/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"non-reentrant-before-others","function_id":null,"value_str":null,"throughput":null,"full_id":"non-reentrant-before-others","directory_name":"non-reentrant-before-others","title":"non-reentrant-before-others"}
```
--------------------------------------------------------------------------------
/benchmarks/constants-instead-of-literals/base/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"constants-instead-of-literals","function_id":null,"value_str":null,"throughput":null,"full_id":"constants-instead-of-literals","directory_name":"constants-instead-of-literals","title":"constants-instead-of-literals"}
```
--------------------------------------------------------------------------------
/benchmarks/constants-instead-of-literals/new/benchmark.json:
--------------------------------------------------------------------------------
```json
1 | {"group_id":"constants-instead-of-literals","function_id":null,"value_str":null,"throughput":null,"full_id":"constants-instead-of-literals","directory_name":"constants-instead-of-literals","title":"constants-instead-of-literals"}
```
--------------------------------------------------------------------------------
/aderyn_core/src/ast/impls/disp/errors.rs:
--------------------------------------------------------------------------------
```rust
1 | use crate::ast::*;
2 | use std::fmt::Display;
3 |
4 | impl Display for ErrorDefinition {
5 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6 | f.write_fmt(format_args!("error {}{}", self.name, self.parameters))
7 | }
8 | }
9 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/ast/impls/disp/events.rs:
--------------------------------------------------------------------------------
```rust
1 | use crate::ast::*;
2 | use std::fmt::Display;
3 |
4 | impl Display for EventDefinition {
5 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6 | f.write_fmt(format_args!("event {}{}", self.name, self.parameters))
7 | }
8 | }
9 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/ast/impls/disp/user_defined_value_types.rs:
--------------------------------------------------------------------------------
```rust
1 | use crate::ast::*;
2 | use std::fmt::Display;
3 |
4 | impl Display for UserDefinedValueTypeDefinition {
5 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6 | f.write_fmt(format_args!("type {} is {}", self.name, self.underlying_type,))
7 | }
8 | }
9 |
```
--------------------------------------------------------------------------------
/tests/foundry-nft-f23/foundry.toml:
--------------------------------------------------------------------------------
```toml
1 | [profile.default]
2 | src = "src"
3 | out = "out"
4 | libs = ["lib"]
5 | remappings = ["@oz/contracts=lib/openzeppelin-contracts/contracts", "icm/=src/inner-core-modules"]
6 |
7 | # See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options
8 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/ast/impls/node/literals.rs:
--------------------------------------------------------------------------------
```rust
1 | use crate::{ast::*, visitor::ast_visitor::*};
2 | use eyre::Result;
3 |
4 | impl Node for Literal {
5 | fn accept(&self, visitor: &mut impl ASTConstVisitor) -> Result<()> {
6 | visitor.visit_literal(self)?;
7 | visitor.end_visit_literal(self)
8 | }
9 | macros::accept_id!();
10 | }
11 |
```
--------------------------------------------------------------------------------
/aderyn_driver/src/lib.rs:
--------------------------------------------------------------------------------
```rust
1 | #![feature(result_option_map_or_default)]
2 |
3 | mod display;
4 | mod interface;
5 | mod mcp;
6 | mod runner;
7 |
8 | pub mod compile;
9 | pub mod config;
10 | pub mod driver;
11 | pub mod process;
12 |
13 | pub use aderyn_core::{ast as core_ast, detect as detection_modules, detect::detector};
14 | pub use mcp::SingletonMcpServer;
15 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/ast/impls/node/pragma_directives.rs:
--------------------------------------------------------------------------------
```rust
1 | use crate::{ast::*, visitor::ast_visitor::*};
2 | use eyre::Result;
3 |
4 | impl Node for PragmaDirective {
5 | fn accept(&self, visitor: &mut impl ASTConstVisitor) -> Result<()> {
6 | visitor.visit_pragma_directive(self)?;
7 | visitor.end_visit_pragma_directive(self)
8 | }
9 | macros::accept_id!();
10 | }
11 |
```
--------------------------------------------------------------------------------
/tests/ast/global_enum.json:
--------------------------------------------------------------------------------
```json
1 | {"absolutePath":"a","exportedSymbols":{"E":[2]},"id":3,"nodeType":"SourceUnit","nodes":[{"canonicalName":"E","id":2,"members":[{"id":1,"name":"A","nameLocation":"9:1:1","nodeType":"EnumValue","src":"9:1:1"}],"name":"E","nameLocation":"5:1:1","nodeType":"EnumDefinition","src":"0:12:1"}],"src":"0:13:1"}
2 |
```
--------------------------------------------------------------------------------
/rustfmt.toml:
--------------------------------------------------------------------------------
```toml
1 | reorder_imports = true
2 | imports_granularity = "Crate"
3 | use_small_heuristics = "Max"
4 | comment_width = 100
5 | wrap_comments = true
6 | binop_separator = "Front"
7 | trailing_comma = "Vertical"
8 | trailing_semicolon = false
9 | use_field_init_shorthand = true
10 | format_code_in_doc_comments = true
11 | doc_comment_code_block_width = 100
12 |
```
--------------------------------------------------------------------------------
/.cargo/config.toml:
--------------------------------------------------------------------------------
```toml
1 | [alias]
2 | xtask = "run --package xtask --bin xtask --"
3 | prep = "xtask reportgen"
4 | patch = "xtask cut-release --patch"
5 | minor = "xtask cut-release --minor"
6 | blesspr = "xtask blesspr"
7 | tomlgen = "xtask tomlgen"
8 | fixfmt = "fmt --all"
9 | fixclippy = "clippy --quiet --workspace --all-targets --all-features --allow-dirty --fix"
10 |
```
--------------------------------------------------------------------------------
/aderyn_core/tests/common/mod.rs:
--------------------------------------------------------------------------------
```rust
1 | mod ancestral_line;
2 | mod closest_ancestor;
3 | mod immediate_children;
4 | mod immediate_parent;
5 | mod new_ast_nodes;
6 | mod peek_over;
7 | mod sibling;
8 |
9 | pub use ancestral_line::*;
10 | pub use closest_ancestor::*;
11 | pub use immediate_children::*;
12 | pub use immediate_parent::*;
13 | pub use new_ast_nodes::*;
14 | pub use peek_over::*;
15 | pub use sibling::*;
16 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/lib.rs:
--------------------------------------------------------------------------------
```rust
1 | pub mod ast;
2 | pub mod audit;
3 | pub mod context;
4 | pub mod detect;
5 | pub mod stats;
6 | pub mod test_utils;
7 | pub mod visitor;
8 |
9 | // Use this to detect issues (Actively maintained)
10 | pub use detect::entrypoint as report;
11 | pub use report::detect_issues;
12 |
13 | // Use this as audit tools (De-prioritized)
14 | pub use audit::entrypoint as audit_tools;
15 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/ast/impls/disp.rs:
--------------------------------------------------------------------------------
```rust
1 | pub mod blocks;
2 | pub mod contracts;
3 | pub mod enumerations;
4 | pub mod errors;
5 | pub mod events;
6 | pub mod expressions;
7 | pub mod functions;
8 | pub mod identifiers;
9 | pub mod literals;
10 | pub mod modifiers;
11 | pub mod statements;
12 | pub mod structures;
13 | pub mod types;
14 | pub mod user_defined_value_types;
15 | pub mod using_for_directives;
16 | pub mod variables;
17 |
```
--------------------------------------------------------------------------------
/cyfrinup/why.md:
--------------------------------------------------------------------------------
```markdown
1 | Why does this file dynamic_script exist ?
2 |
3 | * To support existing cyfrinup users (The ones who installed cyfrinup from aderyn)
4 | * The new way to install cyfrinup is from https://github.com/Cyfrin/up
5 |
6 | * Don't change the location (cyfrinup/dynamic_script)
7 | * Don't delete this branch (master branch)
8 | * Don't rename this branch (master branch)
9 |
10 | IMPORTANT
11 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/ast/impls/disp/identifiers.rs:
--------------------------------------------------------------------------------
```rust
1 | use crate::ast::*;
2 | use std::fmt::Display;
3 |
4 | impl Display for Identifier {
5 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6 | f.write_str(self.name.as_str())
7 | }
8 | }
9 |
10 | impl Display for IdentifierPath {
11 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12 | f.write_str(self.name.as_str())
13 | }
14 | }
15 |
```
--------------------------------------------------------------------------------
/tests/foundry-nft-f23-icm/remappings.txt:
--------------------------------------------------------------------------------
```
1 | @oz/contracts/=lib/openzeppelin-contracts/contracts/
2 | icm/=src/inner-core-modules/
3 | @openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/
4 | ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/
5 | erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/
6 | forge-std/=lib/forge-std/src/
7 | openzeppelin-contracts/=lib/openzeppelin-contracts/
8 |
```
--------------------------------------------------------------------------------
/tests/foundry-nft-f23/remappings.txt:
--------------------------------------------------------------------------------
```
1 | @oz/contracts/=lib/openzeppelin-contracts/contracts/
2 | icm/=src/inner-core-modules/
3 | @openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/
4 | ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/
5 | erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/
6 | forge-std/=lib/forge-std/src/
7 | openzeppelin-contracts/=lib/openzeppelin-contracts/
8 |
```
--------------------------------------------------------------------------------
/aderyn_core/templates/mcp-tool-response/node_finder_get_all.md:
--------------------------------------------------------------------------------
```markdown
1 | ## List of Node IDs and compilation unit indexes for all {{ node_type }}
2 |
3 | {% if nodes.len() > 0 %}
4 | {% for n in nodes %}
5 | - Name: {{ n.name }} | NodeID: {{ n.node_id }} | CompilationUnitIndex: {{ n.compilation_unit_index }}
6 | {% endfor %}
7 | {% else %}
8 | No {{ node_type }} nodes found !
9 | {% endif %}
10 |
11 | ### Tip: Now, use the node summarizer tool to investigate these nodes
12 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/ast/impls/disp/structures.rs:
--------------------------------------------------------------------------------
```rust
1 | use crate::ast::*;
2 | use std::fmt::Display;
3 |
4 | impl Display for StructDefinition {
5 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6 | f.write_fmt(format_args!("struct {} {{\n", self.name))?;
7 |
8 | for member in self.members.iter() {
9 | f.write_fmt(format_args!("\t{member};\n"))?;
10 | }
11 |
12 | f.write_str("}")
13 | }
14 | }
15 |
```
--------------------------------------------------------------------------------
/.github/workflows/dependencies.yml:
--------------------------------------------------------------------------------
```yaml
1 | # Runs `cargo update` periodically.
2 |
3 | name: Dependencies
4 |
5 | on:
6 | schedule:
7 | # Run weekly
8 | - cron: "0 13 * * SUN"
9 | workflow_dispatch:
10 | # Needed so we can run it manually
11 |
12 | permissions:
13 | contents: write
14 | pull-requests: write
15 |
16 | jobs:
17 | update:
18 | uses: cyfrin/ci/.github/workflows/cargo-update-pr.yml@main
19 | secrets:
20 | token: ${{ secrets.GITHUB_TOKEN }}
21 |
```
--------------------------------------------------------------------------------
/tests/ast/smoke.json:
--------------------------------------------------------------------------------
```json
1 | {"absolutePath":"a","exportedSymbols":{"C":[1]},"id":2,"nodeType":"SourceUnit","nodes":[{"abstract":false,"baseContracts":[],"canonicalName":"C","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":1,"linearizedBaseContracts":[1],"name":"C","nameLocation":"9:1:1","nodeType":"ContractDefinition","nodes":[],"scope":2,"src":"0:13:1","usedErrors":[]}],"src":"0:14:1"}
2 |
```
--------------------------------------------------------------------------------
/benchmarks/constants-instead-of-literals/change/estimates.json:
--------------------------------------------------------------------------------
```json
1 | {"mean":{"confidence_interval":{"confidence_level":0.95,"lower_bound":0.2304644673752343,"upper_bound":0.2836103583226366},"point_estimate":0.2555964540676632,"standard_error":0.013668433098330088},"median":{"confidence_interval":{"confidence_level":0.95,"lower_bound":0.23410624969175498,"upper_bound":0.28137830306259226},"point_estimate":0.255863349825838,"standard_error":0.01091889072949671}}
```
--------------------------------------------------------------------------------
/benchmarks/inconsistent-type-names/change/estimates.json:
--------------------------------------------------------------------------------
```json
1 | {"mean":{"confidence_interval":{"confidence_level":0.95,"lower_bound":0.11507827990187239,"upper_bound":0.260787988997303},"point_estimate":0.18267223511910147,"standard_error":0.03702971062399887},"median":{"confidence_interval":{"confidence_level":0.95,"lower_bound":0.07395985819044393,"upper_bound":0.19244746647757105},"point_estimate":0.1292845678642669,"standard_error":0.0312794607053693}}
```
--------------------------------------------------------------------------------
/benchmarks/unindexed-events/change/estimates.json:
--------------------------------------------------------------------------------
```json
1 | {"mean":{"confidence_interval":{"confidence_level":0.95,"lower_bound":0.2231284018801977,"upper_bound":0.26122818773932927},"point_estimate":0.2421793991692307,"standard_error":0.00966467841379027},"median":{"confidence_interval":{"confidence_level":0.95,"lower_bound":0.2363290446511357,"upper_bound":0.26245735684730165},"point_estimate":0.2527294660843511,"standard_error":0.00636923695976504}}
```
--------------------------------------------------------------------------------
/benchmarks/aderyn/change/estimates.json:
--------------------------------------------------------------------------------
```json
1 | {"mean":{"confidence_interval":{"confidence_level":0.95,"lower_bound":0.18459828421517133,"upper_bound":0.2908493398392847},"point_estimate":0.23709096764774906,"standard_error":0.0274031214685985},"median":{"confidence_interval":{"confidence_level":0.95,"lower_bound":0.1222985354981565,"upper_bound":0.25353205407930934},"point_estimate":0.1730272680196443,"standard_error":0.043756226418304595}}
```
--------------------------------------------------------------------------------
/benchmarks/unsafe-oz-erc721-mint/change/estimates.json:
--------------------------------------------------------------------------------
```json
1 | {"mean":{"confidence_interval":{"confidence_level":0.95,"lower_bound":0.19154766165666307,"upper_bound":0.2363117371553592},"point_estimate":0.2138181557757537,"standard_error":0.01147432486199359},"median":{"confidence_interval":{"confidence_level":0.95,"lower_bound":0.22577513767889013,"upper_bound":0.2856583033378013},"point_estimate":0.25595683015160864,"standard_error":0.020154385975473834}}
```
--------------------------------------------------------------------------------
/benchmarks/require-with-string/change/estimates.json:
--------------------------------------------------------------------------------
```json
1 | {"mean":{"confidence_interval":{"confidence_level":0.95,"lower_bound":0.08470470900806529,"upper_bound":0.13650914242408738},"point_estimate":0.11129129963271955,"standard_error":0.013075828997862221},"median":{"confidence_interval":{"confidence_level":0.95,"lower_bound":0.07008408416489931,"upper_bound":0.131979118615982},"point_estimate":0.11617206079308806,"standard_error":0.01762845161408381}}
```
--------------------------------------------------------------------------------
/benchmarks/unprotected-initializer/change/estimates.json:
--------------------------------------------------------------------------------
```json
1 | {"mean":{"confidence_interval":{"confidence_level":0.95,"lower_bound":0.10422525680183017,"upper_bound":0.15921938469651462},"point_estimate":0.13234566792603975,"standard_error":0.013970159838129076},"median":{"confidence_interval":{"confidence_level":0.95,"lower_bound":0.12024791775714583,"upper_bound":0.1708133252205546},"point_estimate":0.13933719191933558,"standard_error":0.013111840198843034}}
```
--------------------------------------------------------------------------------
/benchmarks/unsafe-erc20-functions/change/estimates.json:
--------------------------------------------------------------------------------
```json
1 | {"mean":{"confidence_interval":{"confidence_level":0.95,"lower_bound":0.19186709905203972,"upper_bound":0.24864930794058382},"point_estimate":0.21806274798852998,"standard_error":0.014933306293329503},"median":{"confidence_interval":{"confidence_level":0.95,"lower_bound":0.1861209339338803,"upper_bound":0.21666210707795874},"point_estimate":0.19984866496690357,"standard_error":0.006883440883201164}}
```
--------------------------------------------------------------------------------
/benchmarks/deprecated-oz-functions/change/estimates.json:
--------------------------------------------------------------------------------
```json
1 | {"mean":{"confidence_interval":{"confidence_level":0.95,"lower_bound":0.05034215609152555,"upper_bound":0.13318624217413327},"point_estimate":0.08784060599331789,"standard_error":0.021032955402811023},"median":{"confidence_interval":{"confidence_level":0.95,"lower_bound":0.051561444905542375,"upper_bound":0.08003882431087761},"point_estimate":0.0687782306032394,"standard_error":0.007468054979754801}}
```
--------------------------------------------------------------------------------
/benchmarks/large-numeric-literal/change/estimates.json:
--------------------------------------------------------------------------------
```json
1 | {"mean":{"confidence_interval":{"confidence_level":0.95,"lower_bound":0.04164237613327339,"upper_bound":0.08104553956620382},"point_estimate":0.060233742887845665,"standard_error":0.01000169549810649},"median":{"confidence_interval":{"confidence_level":0.95,"lower_bound":0.02664898746862865,"upper_bound":0.04779890487572791},"point_estimate":0.03955766789299542,"standard_error":0.005362763178234432}}
```
--------------------------------------------------------------------------------
/benchmarks/solmate-safe-transfer-lib/change/estimates.json:
--------------------------------------------------------------------------------
```json
1 | {"mean":{"confidence_interval":{"confidence_level":0.95,"lower_bound":0.02270077089176444,"upper_bound":0.052206873542652396},"point_estimate":0.036619720477730544,"standard_error":0.007505833743210787},"median":{"confidence_interval":{"confidence_level":0.95,"lower_bound":0.03998135307362105,"upper_bound":0.0564168865004826},"point_estimate":0.04657488716239877,"standard_error":0.003982970326183508}}
```
--------------------------------------------------------------------------------
/benchmarks/centralization-risk/change/estimates.json:
--------------------------------------------------------------------------------
```json
1 | {"mean":{"confidence_interval":{"confidence_level":0.95,"lower_bound":0.05557981941189865,"upper_bound":0.08157323098605106},"point_estimate":0.06765189442867259,"standard_error":0.006639736942282112},"median":{"confidence_interval":{"confidence_level":0.95,"lower_bound":0.061127581548396925,"upper_bound":0.07130039762370807},"point_estimate":0.06727113805527551,"standard_error":0.0026426212685625606}}
```
--------------------------------------------------------------------------------
/benchmarks/non-reentrant-before-others/change/estimates.json:
--------------------------------------------------------------------------------
```json
1 | {"mean":{"confidence_interval":{"confidence_level":0.95,"lower_bound":-0.19247387824058612,"upper_bound":-0.1540273193483068},"point_estimate":-0.17270162020722646,"standard_error":0.00983083895771451},"median":{"confidence_interval":{"confidence_level":0.95,"lower_bound":-0.1634056179930612,"upper_bound":-0.13588635196403887},"point_estimate":-0.15303706565382502,"standard_error":0.007022807261505105}}
```
--------------------------------------------------------------------------------
/benchmarks/useless-modifier/change/estimates.json:
--------------------------------------------------------------------------------
```json
1 | {"mean":{"confidence_interval":{"confidence_level":0.95,"lower_bound":-0.24667191328817295,"upper_bound":-0.1711562018329418},"point_estimate":-0.2086702191099329,"standard_error":0.019343034603648245},"median":{"confidence_interval":{"confidence_level":0.95,"lower_bound":-0.1372056294807137,"upper_bound":-0.11437625149633945},"point_estimate":-0.12489674183505184,"standard_error":0.005935699349106572}}
```
--------------------------------------------------------------------------------
/benchmarks/zero-address-check/change/estimates.json:
--------------------------------------------------------------------------------
```json
1 | {"mean":{"confidence_interval":{"confidence_level":0.95,"lower_bound":-0.1166576213918913,"upper_bound":-0.045318985308371314},"point_estimate":-0.07959277850387769,"standard_error":0.01825462454322313},"median":{"confidence_interval":{"confidence_level":0.95,"lower_bound":-0.05909160828753046,"upper_bound":-0.0138332871382576},"point_estimate":-0.03905866069535058,"standard_error":0.01146088228435885}}
```
--------------------------------------------------------------------------------
/benchmarks/delegate-call-in-loop/change/estimates.json:
--------------------------------------------------------------------------------
```json
1 | {"mean":{"confidence_interval":{"confidence_level":0.95,"lower_bound":0.01923442891315579,"upper_bound":0.045794961933755735},"point_estimate":0.03183848854555604,"standard_error":0.006796872354841665},"median":{"confidence_interval":{"confidence_level":0.95,"lower_bound":0.030087232643266626,"upper_bound":0.040116378633839656},"point_estimate":0.03584070334728784,"standard_error":0.0027584335867530513}}
```
--------------------------------------------------------------------------------
/benchmarks/block-timestamp-deadline/change/estimates.json:
--------------------------------------------------------------------------------
```json
1 | {"mean":{"confidence_interval":{"confidence_level":0.95,"lower_bound":-0.08864842497820327,"upper_bound":-0.052022743707901005},"point_estimate":-0.07033575985250085,"standard_error":0.009322991046485948},"median":{"confidence_interval":{"confidence_level":0.95,"lower_bound":-0.09030168772453417,"upper_bound":-0.05925709151443026},"point_estimate":-0.0768567966459347,"standard_error":0.00782612878075919}}
```
--------------------------------------------------------------------------------
/benchmarks/ecrecover/change/estimates.json:
--------------------------------------------------------------------------------
```json
1 | {"mean":{"confidence_interval":{"confidence_level":0.95,"lower_bound":-0.038640715264485,"upper_bound":0.03075957538923424},"point_estimate":-0.008889453516800483,"standard_error":0.017706089025754927},"median":{"confidence_interval":{"confidence_level":0.95,"lower_bound":-0.029639659498790105,"upper_bound":0.00206123694192617},"point_estimate":-0.015919609024937498,"standard_error":0.007684173875484277}}
```
--------------------------------------------------------------------------------
/benchmarks/empty-block/change/estimates.json:
--------------------------------------------------------------------------------
```json
1 | {"mean":{"confidence_interval":{"confidence_level":0.95,"lower_bound":-0.13013682208538654,"upper_bound":-0.09909525684229743},"point_estimate":-0.11424228876949039,"standard_error":0.007888634881575365},"median":{"confidence_interval":{"confidence_level":0.95,"lower_bound":-0.1134577528216575,"upper_bound":-0.09515296265418605},"point_estimate":-0.10457456910782315,"standard_error":0.004530557889843372}}
```
--------------------------------------------------------------------------------
/benchmarks/push-zero-opcode/change/estimates.json:
--------------------------------------------------------------------------------
```json
1 | {"mean":{"confidence_interval":{"confidence_level":0.95,"lower_bound":-0.15031487886375028,"upper_bound":-0.10290861183722898},"point_estimate":-0.12565908793344926,"standard_error":0.012081532529051647},"median":{"confidence_interval":{"confidence_level":0.95,"lower_bound":-0.1200802975068389,"upper_bound":-0.08171786426128666},"point_estimate":-0.09736355512517914,"standard_error":0.008690414075589278}}
```
--------------------------------------------------------------------------------
/benchmarks/useless-internal-function/change/estimates.json:
--------------------------------------------------------------------------------
```json
1 | {"mean":{"confidence_interval":{"confidence_level":0.95,"lower_bound":-0.03625602385108224,"upper_bound":0.0622741900613067},"point_estimate":0.011375644861571388,"standard_error":0.025146790022912827},"median":{"confidence_interval":{"confidence_level":0.95,"lower_bound":-0.0022510158335653507,"upper_bound":0.041257540415950526},"point_estimate":0.012760327597773236,"standard_error":0.011624854117686899}}
```
--------------------------------------------------------------------------------
/benchmarks/unspecific-solidity-pragma/change/estimates.json:
--------------------------------------------------------------------------------
```json
1 | {"mean":{"confidence_interval":{"confidence_level":0.95,"lower_bound":-0.05534505214482258,"upper_bound":-0.016459417227862285},"point_estimate":-0.035263136669480555,"standard_error":0.009879386749350481},"median":{"confidence_interval":{"confidence_level":0.95,"lower_bound":-0.01805537827677761,"upper_bound":0.023109409491738342},"point_estimate":0.007201816535256533,"standard_error":0.010570931377548056}}
```
--------------------------------------------------------------------------------
/benchmarks/avoid-abi-encode-packed/change/estimates.json:
--------------------------------------------------------------------------------
```json
1 | {"mean":{"confidence_interval":{"confidence_level":0.95,"lower_bound":-0.055300891011265556,"upper_bound":-0.014009501757529144},"point_estimate":-0.03345029890171669,"standard_error":0.010528456143212517},"median":{"confidence_interval":{"confidence_level":0.95,"lower_bound":-0.03916809300932156,"upper_bound":-0.011241474036724597},"point_estimate":-0.02694527695390625,"standard_error":0.007480058001538933}}
```
--------------------------------------------------------------------------------
/benchmarks/arbitrary-transfer-from/change/estimates.json:
--------------------------------------------------------------------------------
```json
1 | {"mean":{"confidence_interval":{"confidence_level":0.95,"lower_bound":-0.061353370740656187,"upper_bound":0.0026567942969303324},"point_estimate":-0.02722292315621233,"standard_error":0.016283745226276618},"median":{"confidence_interval":{"confidence_level":0.95,"lower_bound":-0.0010873602534972049,"upper_bound":0.032037099574494965},"point_estimate":0.021917850875370792,"standard_error":0.008154835906145632}}
```
--------------------------------------------------------------------------------
/benchmarks/useless-public-function/change/estimates.json:
--------------------------------------------------------------------------------
```json
1 | {"mean":{"confidence_interval":{"confidence_level":0.95,"lower_bound":-0.02441879241081983,"upper_bound":0.012481220806996174},"point_estimate":-0.006268967900450062,"standard_error":0.009386207456287382},"median":{"confidence_interval":{"confidence_level":0.95,"lower_bound":-0.03836100983652091,"upper_bound":-0.0016011197871399485},"point_estimate":-0.019456822896066872,"standard_error":0.010117925503257076}}
```
--------------------------------------------------------------------------------
/tests/ast/license.json:
--------------------------------------------------------------------------------
```json
1 | {"absolutePath":"a","exportedSymbols":{"C":[1]},"id":2,"license":"GPL-3.0","nodeType":"SourceUnit","nodes":[{"abstract":false,"baseContracts":[],"canonicalName":"C","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":1,"linearizedBaseContracts":[1],"name":"C","nameLocation":"45:1:1","nodeType":"ContractDefinition","nodes":[],"scope":2,"src":"36:13:1","usedErrors":[]}],"src":"36:14:1"}
2 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/ast/impls/node.rs:
--------------------------------------------------------------------------------
```rust
1 | pub mod blocks;
2 | pub mod contracts;
3 | pub mod documentation;
4 | pub mod enumerations;
5 | pub mod errors;
6 | pub mod events;
7 | pub mod expressions;
8 | pub mod functions;
9 | pub mod identifiers;
10 | pub mod import_directives;
11 | pub mod literals;
12 | pub mod modifiers;
13 | pub mod pragma_directives;
14 | pub mod source_units;
15 | pub mod statements;
16 | pub mod structures;
17 | pub mod types;
18 | pub mod user_defined_value_types;
19 | pub mod using_for_directives;
20 | pub mod variables;
21 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/ast/impls/disp/using_for_directives.rs:
--------------------------------------------------------------------------------
```rust
1 | use crate::ast::*;
2 |
3 | use std::fmt::Display;
4 |
5 | impl Display for UsingForDirective {
6 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7 | f.write_fmt(format_args!(
8 | "using {:?} for {}",
9 | self.library_name,
10 | match self.type_name.as_ref() {
11 | Some(type_name) => format!("{type_name}"),
12 | None => "_".to_string(),
13 | }
14 | ))
15 | }
16 | }
17 |
```
--------------------------------------------------------------------------------
/tests/foundry-nft-f23-icm/foundry.toml:
--------------------------------------------------------------------------------
```toml
1 | [profile.default]
2 | src = "src"
3 | out = "out"
4 | libs = ["lib"]
5 | remappings = ["@oz/contracts=lib/openzeppelin-contracts/contracts", "icm/=src/inner-core-modules"]
6 |
7 | [profile.icm]
8 | src = "src/inner-core-modules"
9 | out = "out"
10 | libs = ["lib"]
11 | remappings = ["@oz/contracts=lib/openzeppelin-contracts/contracts", "icm/=src/inner-core-modules"]
12 |
13 | # See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options
14 |
```
--------------------------------------------------------------------------------
/cli/benchmarks.sh:
--------------------------------------------------------------------------------
```bash
1 | # This script will bench each individual detectors as well as overall aderyn
2 | # Note: We Must skip CLOC counting and forge build phase.
3 |
4 | # Copy the existing benchmarks to target/ so aderyn can know the history
5 | cp -r benchmarks/* target/criterion/
6 |
7 | # Make the bench
8 | cargo bench
9 |
10 | # Replace the benchmarks to the reflect the latest
11 | cp -r target/criterion/* benchmarks/
12 |
13 | # Open the benchmarks reports in browser
14 | open benchmarks/report/index.html
```
--------------------------------------------------------------------------------
/aderyn_core/src/context/flow/error.rs:
--------------------------------------------------------------------------------
```rust
1 | use derive_more::From;
2 |
3 | pub type Result<T> = core::result::Result<T, Error>;
4 |
5 | #[derive(Debug, From)]
6 | pub enum Error {
7 | #[from]
8 | Custom(String),
9 | }
10 |
11 | impl core::fmt::Display for Error {
12 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13 | write!(f, "{self:?}")
14 | }
15 | }
16 |
17 | impl From<&str> for Error {
18 | fn from(value: &str) -> Self {
19 | Error::Custom(value.to_string())
20 | }
21 | }
22 |
23 | impl std::error::Error for Error {}
24 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/ast/impls/node/user_defined_value_types.rs:
--------------------------------------------------------------------------------
```rust
1 | use crate::{
2 | ast::*,
3 | visitor::ast_visitor::{ASTConstVisitor, Node},
4 | };
5 | use eyre::Result;
6 |
7 | impl Node for UserDefinedValueTypeDefinition {
8 | fn accept(&self, visitor: &mut impl ASTConstVisitor) -> Result<()> {
9 | if visitor.visit_user_defined_value_type_definition(self)? {
10 | self.underlying_type.accept(visitor)?;
11 | }
12 | visitor.end_visit_user_defined_value_type_definition(self)?;
13 | Ok(())
14 | }
15 | macros::accept_id!();
16 | }
17 |
```
--------------------------------------------------------------------------------
/aderyn_core/templates/mcp-tool-response/node_finder_search.md:
--------------------------------------------------------------------------------
```markdown
1 | ## Node IDs and compilation unit indexes of matching {{ node_type }}s.
2 |
3 | ### Search input: {{ term }}
4 |
5 | {% if matching_nodes.len() > 0 %}
6 | ### Matching {{ node_type }}s
7 |
8 | {% for node_info in matching_nodes %}
9 | - Name: {{ node_info.name }} | NodeID: {{ node_info.node_id }} | CompilationUnitIndex: {{ node_info.compilation_unit_index }}
10 | {% endfor %}
11 | {% else %}
12 | No match found for {{ node_type }}s !
13 | {% endif %}
14 |
15 | ### Tip: Now, use the node summarizer tool to investigate these nodes
16 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/context/mcp/list_contracts/render.rs:
--------------------------------------------------------------------------------
```rust
1 | use askama::Template;
2 | use derive_builder::Builder;
3 | use serde::Serialize;
4 |
5 | use crate::ast::NodeID;
6 |
7 | #[derive(Builder, Serialize, Template)]
8 | #[template(path = "mcp-tool-response/list_contracts.md")]
9 | #[builder(pattern = "owned")]
10 | pub struct ContractsList {
11 | pub contracts_info: Vec<ContractInfo>,
12 | pub compilation_unit_index: usize,
13 | }
14 |
15 | #[derive(Builder, Serialize)]
16 | #[builder(pattern = "owned")]
17 | pub struct ContractInfo {
18 | pub name: String,
19 | pub filepath: String,
20 | pub node_id: NodeID,
21 | }
22 |
```
--------------------------------------------------------------------------------
/tests/ast/documentation_1.json:
--------------------------------------------------------------------------------
```json
1 | {"absolutePath":"a","exportedSymbols":{"C":[2]},"id":3,"nodeType":"SourceUnit","nodes":[{"abstract":false,"baseContracts":[],"canonicalName":"C","contractDependencies":[],"contractKind":"contract","documentation":{"id":1,"nodeType":"StructuredDocumentation","src":"0:27:1","text":"This contract is empty"},"fullyImplemented":true,"id":2,"linearizedBaseContracts":[2],"name":"C","nameLocation":"37:1:1","nodeType":"ContractDefinition","nodes":[],"scope":3,"src":"28:13:1","usedErrors":[]}],"src":"28:14:1"}
2 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/ast/impls/disp/enumerations.rs:
--------------------------------------------------------------------------------
```rust
1 | use crate::ast::*;
2 | use std::fmt::Display;
3 |
4 | impl Display for EnumValue {
5 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6 | f.write_str(self.name.as_str())
7 | }
8 | }
9 |
10 | impl Display for EnumDefinition {
11 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12 | f.write_fmt(format_args!("enum {} {{\n", self.name))?;
13 |
14 | for member in self.members.iter() {
15 | f.write_fmt(format_args!("\t{member},"))?;
16 | }
17 |
18 | f.write_str("}")
19 | }
20 | }
21 |
```
--------------------------------------------------------------------------------
/tests/hardhat-js-playground/artifacts/contracts/IContractInheritance.sol/IContractInheritance.json:
--------------------------------------------------------------------------------
```json
1 | {
2 | "_format": "hh-sol-artifact-1",
3 | "contractName": "IContractInheritance",
4 | "sourceName": "contracts/IContractInheritance.sol",
5 | "abi": [
6 | {
7 | "inputs": [
8 | {
9 | "internalType": "uint256",
10 | "name": "something",
11 | "type": "uint256"
12 | }
13 | ],
14 | "name": "doSomething",
15 | "outputs": [],
16 | "stateMutability": "nonpayable",
17 | "type": "function"
18 | }
19 | ],
20 | "bytecode": "0x",
21 | "deployedBytecode": "0x",
22 | "linkReferences": {},
23 | "deployedLinkReferences": {}
24 | }
25 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/context/browser.rs:
--------------------------------------------------------------------------------
```rust
1 | mod ancestral_line;
2 | mod closest_ancestor;
3 | mod external_calls;
4 | mod extractor;
5 | mod immediate_children;
6 | mod location;
7 | mod macros;
8 | mod parent;
9 | mod peek;
10 | mod peek_over;
11 | mod peek_under;
12 | mod siblings;
13 | mod sort_nodes;
14 | mod storage_vars;
15 | pub use ancestral_line::*;
16 | pub use closest_ancestor::*;
17 | pub use external_calls::*;
18 | pub use extractor::*;
19 | pub use immediate_children::*;
20 | pub use location::*;
21 | pub use parent::*;
22 | pub use peek::*;
23 | pub use peek_over::*;
24 | pub use peek_under::*;
25 | pub use siblings::*;
26 | pub use sort_nodes::*;
27 | pub use storage_vars::*;
28 |
```
--------------------------------------------------------------------------------
/tests/ast/documentation_2.json:
--------------------------------------------------------------------------------
```json
1 | {"absolutePath":"b","exportedSymbols":{"C":[5]},"id":6,"nodeType":"SourceUnit","nodes":[{"abstract":false,"baseContracts":[],"canonicalName":"C","contractDependencies":[],"contractKind":"contract","documentation":{"id":4,"nodeType":"StructuredDocumentation","src":"0:61:2","text":"This contract is empty\nand has a line-breaking comment."},"fullyImplemented":true,"id":5,"linearizedBaseContracts":[5],"name":"C","nameLocation":"71:1:2","nodeType":"ContractDefinition","nodes":[],"scope":6,"src":"62:13:2","usedErrors":[]}],"src":"62:14:2"}
2 |
```
--------------------------------------------------------------------------------
/tools/xtask/src/tomlgen.rs:
--------------------------------------------------------------------------------
```rust
1 | use xshell::{Shell, cmd};
2 |
3 | pub fn init_toml_files() -> anyhow::Result<()> {
4 | let sh = Shell::new()?;
5 | sh.change_dir(env!("CARGO_MANIFEST_DIR"));
6 | sh.change_dir("../../");
7 |
8 | let cmd = cmd!(sh, "rm -rf ./tests/toml/nested_project1/aderyn.toml");
9 | cmd.run()?;
10 |
11 | let cmd = cmd!(sh, "rm -rf ./tests/toml/nested_project2/aderyn.toml");
12 | cmd.run()?;
13 |
14 | let cmd = cmd!(sh, "cargo run -- init ./tests/toml/nested_project1");
15 | cmd.run()?;
16 |
17 | let cmd = cmd!(sh, "cargo run -- init ./tests/toml/nested_project2");
18 | cmd.run()?;
19 |
20 | Ok(())
21 | }
22 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/ast/magic.rs:
--------------------------------------------------------------------------------
```rust
1 | use serde_repr::{Deserialize_repr, Serialize_repr};
2 |
3 | #[repr(i64)]
4 | #[derive(Clone, Copy, Debug, Deserialize_repr, Serialize_repr, PartialEq, Eq)]
5 | pub enum MagicVariableID {
6 | Abi = -1,
7 | Addmod = -2,
8 | Assert = -3,
9 | Block = -4,
10 | Blockhash = -5,
11 | Ecrecover = -6,
12 | Gasleft = -7,
13 | Keccak256 = -8,
14 | Msg = -15,
15 | Mulmod = -16,
16 | Now = -17,
17 | Require = -18,
18 | Revert = -19,
19 | Ripemd160 = -20,
20 | Selfdestruct = -21,
21 | Sha256 = -22,
22 | Sha3 = -23,
23 | Suicide = -24,
24 | Super = -25,
25 | Tx = -26,
26 | Type = -27,
27 | This = -28,
28 | }
29 |
```
--------------------------------------------------------------------------------
/tests/hardhat-js-playground/package.json:
--------------------------------------------------------------------------------
```json
1 | {
2 | "dependencies": {
3 | "hardhat": "^2.18.3"
4 | },
5 | "devDependencies": {
6 | "@nomicfoundation/hardhat-chai-matchers": "^2.0.0",
7 | "@nomicfoundation/hardhat-ethers": "^3.0.0",
8 | "@nomicfoundation/hardhat-network-helpers": "^1.0.0",
9 | "@nomicfoundation/hardhat-toolbox": "^3.0.0",
10 | "@nomicfoundation/hardhat-verify": "^1.0.0",
11 | "@typechain/ethers-v6": "^0.4.0",
12 | "@typechain/hardhat": "^8.0.0",
13 | "chai": "^4.2.0",
14 | "ethers": "^6.4.0",
15 | "hardhat-gas-reporter": "^1.0.8",
16 | "solidity-coverage": "^0.8.0",
17 | "typechain": "^8.1.0"
18 | }
19 | }
20 |
```
--------------------------------------------------------------------------------
/aderyn_core/templates/mcp-tool-response/node_finder_grep.md:
--------------------------------------------------------------------------------
```markdown
1 | ## Node IDs and compilation unit indexes for matching nodes.
2 |
3 | ### Regex input: {{ term }}
4 |
5 | {% if nodes.len() > 0 %}
6 | {% for (node_type, inodes) in nodes %}
7 | {% if inodes.len() > 0 %}
8 | ### Found in implementation code of following {{ node_type }}s
9 | {% for node_info in inodes %}
10 | - Name: {{ node_info.name }} | NodeID: {{ node_info.node_id }} | CompilationUnitIndex: {{ node_info.compilation_unit_index }}
11 | {% endfor %}
12 | {% endif %}
13 | {% endfor %}
14 | ### Tip: Now, use the node summarizer tool to investigate these nodes
15 | {% else %}
16 | ### No match found for regex {{ term }} !
17 | {% endif %}
18 |
```
--------------------------------------------------------------------------------
/tests/contract-playground/.github/workflows/test.yml:
--------------------------------------------------------------------------------
```yaml
1 | name: test
2 |
3 | on: workflow_dispatch
4 |
5 | env:
6 | FOUNDRY_PROFILE: ci
7 |
8 | jobs:
9 | check:
10 | strategy:
11 | fail-fast: true
12 |
13 | name: Foundry project
14 | runs-on: ubuntu-latest
15 | steps:
16 | - uses: actions/checkout@v4
17 | with:
18 | submodules: recursive
19 |
20 | - name: Install Foundry
21 | uses: foundry-rs/foundry-toolchain@v1
22 | with:
23 | version: nightly
24 |
25 | - name: Run Forge build
26 | run: |
27 | forge --version
28 | forge build --sizes
29 | id: build
30 |
31 | - name: Run Forge tests
32 | run: |
33 | forge test -vvv
34 | id: test
35 |
```
--------------------------------------------------------------------------------
/tests/foundry-nft-f23-icm/.github/workflows/test.yml:
--------------------------------------------------------------------------------
```yaml
1 | name: test
2 |
3 | on: workflow_dispatch
4 |
5 | env:
6 | FOUNDRY_PROFILE: ci
7 |
8 | jobs:
9 | check:
10 | strategy:
11 | fail-fast: true
12 |
13 | name: Foundry project
14 | runs-on: ubuntu-latest
15 | steps:
16 | - uses: actions/checkout@v4
17 | with:
18 | submodules: recursive
19 |
20 | - name: Install Foundry
21 | uses: foundry-rs/foundry-toolchain@v1
22 | with:
23 | version: nightly
24 |
25 | - name: Run Forge build
26 | run: |
27 | forge --version
28 | forge build --sizes
29 | id: build
30 |
31 | - name: Run Forge tests
32 | run: |
33 | forge test -vvv
34 | id: test
35 |
```
--------------------------------------------------------------------------------
/tests/foundry-nft-f23/.github/workflows/test.yml:
--------------------------------------------------------------------------------
```yaml
1 | name: test
2 |
3 | on: workflow_dispatch
4 |
5 | env:
6 | FOUNDRY_PROFILE: ci
7 |
8 | jobs:
9 | check:
10 | strategy:
11 | fail-fast: true
12 |
13 | name: Foundry project
14 | runs-on: ubuntu-latest
15 | steps:
16 | - uses: actions/checkout@v4
17 | with:
18 | submodules: recursive
19 |
20 | - name: Install Foundry
21 | uses: foundry-rs/foundry-toolchain@v1
22 | with:
23 | version: nightly
24 |
25 | - name: Run Forge build
26 | run: |
27 | forge --version
28 | forge build --sizes
29 | id: build
30 |
31 | - name: Run Forge tests
32 | run: |
33 | forge test -vvv
34 | id: test
35 |
```
--------------------------------------------------------------------------------
/aderyn/src/completions.rs:
--------------------------------------------------------------------------------
```rust
1 | use clap_complete::Shell;
2 |
3 | #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq, clap::ValueEnum)]
4 | pub enum SupportedShellsForCompletions {
5 | Fish,
6 | Bash,
7 | Elvish,
8 | Zsh,
9 | }
10 |
11 | impl From<SupportedShellsForCompletions> for Shell {
12 | fn from(shell: SupportedShellsForCompletions) -> Self {
13 | match shell {
14 | SupportedShellsForCompletions::Fish => Shell::Fish,
15 | SupportedShellsForCompletions::Bash => Shell::Bash,
16 | SupportedShellsForCompletions::Elvish => Shell::Elvish,
17 | SupportedShellsForCompletions::Zsh => Shell::Zsh,
18 | }
19 | }
20 | }
21 |
```
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
```markdown
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | ## Consider opening a [discussion](https://github.com/Cyfrin/aderyn/discussions) instead of an issue for this.
11 |
12 |
13 | Try answering the follows:
14 |
15 | **Is your feature request related to a problem? Please describe.**
16 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
17 |
18 | **Describe the solution you'd like**
19 | A clear and concise description of what you want to happen.
20 |
21 | **Additional context**
22 | Add any other context or screenshots about the feature request here.
23 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/ast/impls/disp/literals.rs:
--------------------------------------------------------------------------------
```rust
1 | use crate::ast::*;
2 | use std::fmt::Display;
3 |
4 | impl Display for Literal {
5 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6 | if let LiteralKind::String = self.kind {
7 | f.write_str("\"")?;
8 | }
9 |
10 | if let Some(value) = self.value.as_ref() {
11 | f.write_str(value.as_str())?;
12 | }
13 | f.write_str(self.hex_value.as_str())?;
14 |
15 | if let Some(subdenomination) = self.subdenomination.as_ref() {
16 | subdenomination.fmt(f)?;
17 | }
18 |
19 | if let LiteralKind::String = self.kind {
20 | f.write_str("\"")?;
21 | }
22 |
23 | Ok(())
24 | }
25 | }
26 |
```
--------------------------------------------------------------------------------
/deny.toml:
--------------------------------------------------------------------------------
```toml
1 | # Root options
2 | [graph]
3 | all-features = false
4 | no-default-features = false
5 | [output]
6 | feature-depth = 1
7 |
8 | # This section is considered when running `cargo deny check bans`.
9 | [bans]
10 | multiple-versions = "allow"
11 | wildcards = "allow"
12 | highlight = "all"
13 | workspace-default-features = "allow"
14 | external-default-features = "allow"
15 | deny = [ "openssl" ]
16 |
17 | # This section is considered when running `cargo deny check sources`.
18 | [sources]
19 | unknown-registry = "deny"
20 | allow-registry = ["https://github.com/rust-lang/crates.io-index"]
21 | unknown-git = "deny"
22 | allow-git = ["https://github.com/Cyfrin/solidity-ast-rs", "https://github.com/foundry-rs/foundry"]
23 |
```
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/false_positive_issue.md:
--------------------------------------------------------------------------------
```markdown
1 | ---
2 | name: Report False Positive Issue
3 | about: Make the case for a false positive and help us improve the detector
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Detector Title**
11 | The title of the detector (usually starts after **H-** or **L-** in the report)
12 |
13 | **To Reproduce**
14 | Steps to reproduce the behavior:
15 | 1. Clone repo: '...'
16 | 2. Run aderyn with this '...'
17 | 3. Scroll down to '...'
18 | 4. See error
19 |
20 | **Screenshots**
21 | If applicable, add screenshots to help explain your problem.
22 |
23 | **Expected behavior**
24 | A clear and concise description of what you expected to happen.
25 |
26 | **Additional context**
27 | Add any other context about the problem here.
28 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/ast/impls/disp/blocks.rs:
--------------------------------------------------------------------------------
```rust
1 | use crate::ast::{Block, UncheckedBlock};
2 | use std::fmt::Display;
3 |
4 | impl Display for Block {
5 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6 | f.write_str("{\n")?;
7 |
8 | for statement in self.statements.iter() {
9 | f.write_fmt(format_args!("\t{statement};\n"))?;
10 | }
11 |
12 | f.write_str("}")
13 | }
14 | }
15 |
16 | impl Display for UncheckedBlock {
17 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
18 | f.write_str("{\n")?;
19 |
20 | for statement in self.statements.iter() {
21 | f.write_fmt(format_args!("\t{statement};\n"))?;
22 | }
23 |
24 | f.write_str("}")
25 | }
26 | }
27 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/context/mcp/project_overview/render.rs:
--------------------------------------------------------------------------------
```rust
1 | use askama::Template;
2 | use derive_builder::Builder;
3 | use serde::Serialize;
4 |
5 | #[derive(Builder, Serialize, Template)]
6 | #[template(path = "mcp-tool-response/project_overview.md")]
7 | #[builder(pattern = "owned")]
8 | pub struct ProjectOverview {
9 | pub root: String,
10 | pub source: String,
11 | pub remappings: Vec<String>,
12 | pub compilation_units: Vec<CompilationUnit>,
13 | }
14 |
15 | #[derive(Builder, Serialize)]
16 | #[builder(pattern = "owned")]
17 | pub struct CompilationUnit {
18 | pub files: Vec<FileEntry>,
19 | pub included_count: usize,
20 | }
21 |
22 | #[derive(Builder, Serialize)]
23 | #[builder(pattern = "owned")]
24 | pub struct FileEntry {
25 | pub path: String,
26 | pub included: bool,
27 | }
28 |
```
--------------------------------------------------------------------------------
/tests/ast/event_definition.json:
--------------------------------------------------------------------------------
```json
1 | {"absolutePath":"a","exportedSymbols":{"C":[3]},"id":4,"nodeType":"SourceUnit","nodes":[{"abstract":false,"baseContracts":[],"canonicalName":"C","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":3,"linearizedBaseContracts":[3],"name":"C","nameLocation":"9:1:1","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"eventSelector":"92bbf6e823a631f3c8e09b1c8df90f378fb56f7fbc9701827e1ff8aad7f6a028","id":2,"name":"E","nameLocation":"19:1:1","nodeType":"EventDefinition","parameters":{"id":1,"nodeType":"ParameterList","parameters":[],"src":"20:2:1"},"src":"13:10:1"}],"scope":4,"src":"0:25:1","usedErrors":[]}],"src":"0:26:1"}
2 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/ast/impls/node/structures.rs:
--------------------------------------------------------------------------------
```rust
1 | use crate::{ast::*, visitor::ast_visitor::*};
2 | use eyre::Result;
3 |
4 | impl Node for StructDefinition {
5 | fn accept(&self, visitor: &mut impl ASTConstVisitor) -> Result<()> {
6 | if visitor.visit_struct_definition(self)? {
7 | list_accept(&self.members, visitor)?;
8 | }
9 | self.accept_metadata(visitor)?;
10 | visitor.end_visit_struct_definition(self)
11 | }
12 | fn accept_metadata(&self, visitor: &mut impl ASTConstVisitor) -> Result<()> {
13 | let members_ids = &self.members.iter().map(|x| x.id).collect::<Vec<_>>();
14 | visitor.visit_immediate_children(self.id, members_ids.clone())?;
15 | Ok(())
16 | }
17 | macros::accept_id!();
18 | }
19 |
```
--------------------------------------------------------------------------------
/tests/ast/enum_value.json:
--------------------------------------------------------------------------------
```json
1 | {"absolutePath":"a","exportedSymbols":{"C":[4]},"id":5,"nodeType":"SourceUnit","nodes":[{"abstract":false,"baseContracts":[],"canonicalName":"C","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":4,"linearizedBaseContracts":[4],"name":"C","nameLocation":"9:1:1","nodeType":"ContractDefinition","nodes":[{"canonicalName":"C.E","id":3,"members":[{"id":1,"name":"A","nameLocation":"22:1:1","nodeType":"EnumValue","src":"22:1:1"},{"id":2,"name":"B","nameLocation":"25:1:1","nodeType":"EnumValue","src":"25:1:1"}],"name":"E","nameLocation":"18:1:1","nodeType":"EnumDefinition","src":"13:15:1"}],"scope":5,"src":"0:30:1","usedErrors":[]}],"src":"0:31:1"}
2 |
```
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
```markdown
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Describe the bug**
11 | A clear and concise description of what the bug is.
12 |
13 | **To Reproduce**
14 | Steps to reproduce the behavior:
15 | 1. Clone repo: '...'
16 | 2. Run aderyn with this '...'
17 | 3. Scroll down to '...'
18 | 4. See error
19 |
20 | **Expected behavior**
21 | A clear and concise description of what you expected to happen.
22 |
23 | **Screenshots**
24 | If applicable, add screenshots to help explain your problem.
25 |
26 | **Desktop (please complete the following information):**
27 | - OS: [e.g. iOS version...]
28 | - Chip: [e.g. arm, amd]
29 | - Aderyn Version: [e.g. 22]
30 |
31 | **Additional context**
32 | Add any other context about the problem here.
33 |
```
--------------------------------------------------------------------------------
/tests/ast/global_struct.json:
--------------------------------------------------------------------------------
```json
1 | {"absolutePath":"a","exportedSymbols":{"S":[3]},"id":4,"nodeType":"SourceUnit","nodes":[{"canonicalName":"S","id":3,"members":[{"constant":false,"id":2,"mutability":"mutable","name":"a","nameLocation":"19:1:1","nodeType":"VariableDeclaration","scope":3,"src":"11:9:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":1,"name":"uint256","nodeType":"ElementaryTypeName","src":"11:7:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"name":"S","nameLocation":"7:1:1","nodeType":"StructDefinition","scope":4,"src":"0:23:1","visibility":"public"}],"src":"0:24:1"}
2 |
```
--------------------------------------------------------------------------------
/aderyn_core/templates/mcp-tool-response/list_contracts.md:
--------------------------------------------------------------------------------
```markdown
1 | ## List of Contracts in Compilation Unit {{ compilation_unit_index }}
2 |
3 | The following is the list of names of deployable contracts and their corresponding Node IDs and filepaths.
4 |
5 | {% for c in contracts_info %}
6 | - {{ c.name }} | {{ c.filepath }} | Node ID: {{ c.node_id }}
7 | {% endfor %}
8 |
9 | *Suggestion for next steps:* Use these Node IDs with the contract surface area inspection tool to analyze specific contracts.
10 |
11 | **Note:** All contracts listed above belong to compilation unit {{ compilation_unit_index }}. If you see duplicate contract names in this list, they are actually different contracts that happen to share the same name but exist in different files, making each one unique within the compilation unit.
12 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/ast/impls/node/errors.rs:
--------------------------------------------------------------------------------
```rust
1 | use crate::{ast::*, visitor::ast_visitor::*};
2 | use eyre::Result;
3 |
4 | impl Node for ErrorDefinition {
5 | fn accept(&self, visitor: &mut impl ASTConstVisitor) -> Result<()> {
6 | if visitor.visit_error_definition(self)? && self.documentation.is_some() {
7 | self.documentation.as_ref().unwrap().accept(visitor)?;
8 | self.parameters.accept(visitor)?;
9 | }
10 | self.accept_metadata(visitor)?;
11 | visitor.end_visit_error_definition(self)
12 | }
13 | fn accept_metadata(&self, visitor: &mut impl ASTConstVisitor) -> Result<()> {
14 | // TODO: send documentation nodes to visitor
15 | visitor.visit_immediate_children(self.id, vec![self.parameters.id])
16 | }
17 | macros::accept_id!();
18 | }
19 |
```
--------------------------------------------------------------------------------
/tests/ast/placeholder_statement.json:
--------------------------------------------------------------------------------
```json
1 | {"absolutePath":"a","exportedSymbols":{"C":[5]},"id":6,"nodeType":"SourceUnit","nodes":[{"abstract":false,"baseContracts":[],"canonicalName":"C","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":5,"linearizedBaseContracts":[5],"name":"C","nameLocation":"9:1:1","nodeType":"ContractDefinition","nodes":[{"body":{"id":3,"nodeType":"Block","src":"24:6:1","statements":[{"id":2,"nodeType":"PlaceholderStatement","src":"26:1:1"}]},"id":4,"name":"M","nameLocation":"22:1:1","nodeType":"ModifierDefinition","parameters":{"id":1,"nodeType":"ParameterList","parameters":[],"src":"24:0:1"},"src":"13:17:1","virtual":false,"visibility":"internal"}],"scope":6,"src":"0:32:1","usedErrors":[]}],"src":"0:33:1"}
2 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/ast/impls/node/events.rs:
--------------------------------------------------------------------------------
```rust
1 | use crate::{ast::*, visitor::ast_visitor::*};
2 | use eyre::Result;
3 |
4 | impl Node for EventDefinition {
5 | fn accept(&self, visitor: &mut impl ASTConstVisitor) -> Result<()> {
6 | if visitor.visit_event_definition(self)? {
7 | if self.documentation.is_some() {
8 | self.documentation.as_ref().unwrap().accept(visitor)?;
9 | }
10 | self.parameters.accept(visitor)?;
11 | }
12 | self.accept_metadata(visitor)?;
13 | visitor.end_visit_event_definition(self)
14 | }
15 | fn accept_metadata(&self, visitor: &mut impl ASTConstVisitor) -> Result<()> {
16 | // TODO: documentation nodes
17 | visitor.visit_immediate_children(self.id, vec![self.parameters.id])?;
18 | Ok(())
19 | }
20 | macros::accept_id!();
21 | }
22 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/audit/auditor.rs:
--------------------------------------------------------------------------------
```rust
1 | use std::error::Error;
2 |
3 | use prettytable::Row;
4 |
5 | use crate::{
6 | audit::{
7 | attack_surface::AttackSurfaceDetector,
8 | public_functions_no_sender::PublicFunctionsNoSenderChecksDetector,
9 | },
10 | context::workspace::WorkspaceContext,
11 | };
12 |
13 | pub fn get_auditor_detectors() -> Vec<Box<dyn AuditorDetector>> {
14 | vec![
15 | Box::<AttackSurfaceDetector>::default(),
16 | Box::<PublicFunctionsNoSenderChecksDetector>::default(),
17 | ]
18 | }
19 |
20 | pub trait AuditorDetector: Send + Sync + 'static {
21 | fn detect(&mut self, _context: &WorkspaceContext) -> Result<bool, Box<dyn Error>>;
22 |
23 | fn title(&self) -> String;
24 |
25 | fn skeletal_clone(&self) -> Box<dyn AuditorDetector>;
26 |
27 | fn table_titles(&self) -> Row;
28 |
29 | fn table_rows(&self) -> Vec<Row>;
30 | }
31 |
```
--------------------------------------------------------------------------------
/benchmarks/aderyn/base/estimates.json:
--------------------------------------------------------------------------------
```json
1 | {"mean":{"confidence_interval":{"confidence_level":0.95,"lower_bound":110012715.45975,"upper_bound":119876058.76},"point_estimate":114670170.35,"standard_error":2522559.824001567},"median":{"confidence_interval":{"confidence_level":0.95,"lower_bound":103040968.0,"upper_bound":114958188.0},"point_estimate":107556753.5,"standard_error":3978876.4603039916},"median_abs_dev":{"confidence_interval":{"confidence_level":0.95,"lower_bound":14318521.333095431,"upper_bound":23442213.25071752},"point_estimate":17426259.924522042,"standard_error":2391538.6143476125},"slope":null,"std_dev":{"confidence_interval":{"confidence_level":0.95,"lower_bound":18201039.33954221,"upper_bound":32321162.895440847},"point_estimate":25379575.59235664,"standard_error":3634033.308885464}}
```
--------------------------------------------------------------------------------
/benchmarks/aderyn/new/estimates.json:
--------------------------------------------------------------------------------
```json
1 | {"mean":{"confidence_interval":{"confidence_level":0.95,"lower_bound":110012715.45975,"upper_bound":119876058.76},"point_estimate":114670170.35,"standard_error":2522559.824001567},"median":{"confidence_interval":{"confidence_level":0.95,"lower_bound":103040968.0,"upper_bound":114958188.0},"point_estimate":107556753.5,"standard_error":3978876.4603039916},"median_abs_dev":{"confidence_interval":{"confidence_level":0.95,"lower_bound":14318521.333095431,"upper_bound":23442213.25071752},"point_estimate":17426259.924522042,"standard_error":2391538.6143476125},"slope":null,"std_dev":{"confidence_interval":{"confidence_level":0.95,"lower_bound":18201039.33954221,"upper_bound":32321162.895440847},"point_estimate":25379575.59235664,"standard_error":3634033.308885464}}
```
--------------------------------------------------------------------------------
/tools/xtask/src/main.rs:
--------------------------------------------------------------------------------
```rust
1 | //! See <https://github.com/matklad/cargo-xtask/>.
2 | //!
3 | //! This binary defines various auxiliary build commands, which are not expressible with just
4 | //! `cargo`.
5 | //!
6 | //! This binary is integrated into the `cargo` command line by using an alias in `.cargo/config`.
7 |
8 | #![allow(unreachable_pub, unexpected_cfgs)]
9 |
10 | mod blesspr;
11 | mod cut_release;
12 | mod flags;
13 | mod reportgen;
14 | mod tomlgen;
15 |
16 | fn main() -> anyhow::Result<()> {
17 | let flags = flags::Xtask::from_env_or_exit();
18 | match flags.subcommand {
19 | flags::XtaskCmd::Reportgen(choice) => reportgen::reportgen(choice),
20 | flags::XtaskCmd::CutRelease(cut_release) => cut_release::cut_release(cut_release),
21 | flags::XtaskCmd::Blesspr(..) => blesspr::blesspr(),
22 | flags::XtaskCmd::Tomlgen(..) => tomlgen::init_toml_files(),
23 | }
24 | }
25 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/ast/impls/node/identifiers.rs:
--------------------------------------------------------------------------------
```rust
1 | use crate::{ast::*, visitor::ast_visitor::*};
2 | use eyre::Result;
3 |
4 | impl Node for Identifier {
5 | fn accept(&self, visitor: &mut impl ASTConstVisitor) -> Result<()> {
6 | visitor.visit_identifier(self)?;
7 | self.accept_metadata(visitor)?;
8 | visitor.end_visit_identifier(self)
9 | }
10 | fn accept_metadata(&self, _visitor: &mut impl ASTConstVisitor) -> Result<()> {
11 | Ok(())
12 | }
13 | macros::accept_id!();
14 | }
15 |
16 | impl Node for IdentifierPath {
17 | fn accept(&self, visitor: &mut impl ASTConstVisitor) -> Result<()> {
18 | visitor.visit_identifier_path(self)?;
19 | self.accept_metadata(visitor)?;
20 | visitor.end_visit_identifier_path(self)
21 | }
22 | fn accept_metadata(&self, _visitor: &mut impl ASTConstVisitor) -> Result<()> {
23 | Ok(())
24 | }
25 | macros::accept_id!();
26 | }
27 |
```
--------------------------------------------------------------------------------
/aderyn_core/src/context/browser/macros.rs:
--------------------------------------------------------------------------------
```rust
1 | macro_rules! generate_extraction_library {
2 | ($( $name:ident | $visit_method:ident => $node:ident |),* $(,)*) => {
3 | $(
4 | #[derive(Default)]
5 | pub struct $name {
6 | pub extracted: Vec<$node>,
7 | }
8 |
9 | impl $name {
10 | pub fn from<T: Node + ?Sized>(node: &T) -> Self {
11 | let mut extractor: $name = Self::default();
12 | node.accept(&mut extractor).unwrap_or_default();
13 | extractor
14 | }
15 | }
16 |
17 | impl ASTConstVisitor for $name {
18 | fn $visit_method(&mut self, node: &$node) -> Result<bool> {
19 | self.extracted.push(node.clone());
20 | Ok(true)
21 | }
22 | }
23 | )*
24 | };
25 | }
26 |
27 | pub(crate) use generate_extraction_library;
28 |
```