Skip to content

Foundry/alert autofix 19 - #101

Closed
Dargon789 wants to merge 552 commits into
main-config-forgefrom
foundry/alert-autofix-19
Closed

Foundry/alert autofix 19#101
Dargon789 wants to merge 552 commits into
main-config-forgefrom
foundry/alert-autofix-19

Conversation

@Dargon789

@Dargon789 Dargon789 commented Oct 13, 2025

Copy link
Copy Markdown
Owner

Motivation

Solution

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

mattsse and others added 30 commits July 28, 2025 20:53
- always register demangler
- remove split debug info, tracy can't seem to find debug info
…oundry-rs#11098)

* feat(`cheatcodes`): show mismatched params in events

* more param related failure tests

* fmt

* clippy

* feat: decode events using SignaturesIdentifier

* correctly identify indexed params

* don't  decode anon events

* fix

* clippy

* fix test

* fix test: build to cache selectors

* name mismatched logs

* nits

* check has_indexed_info

* addr checksum

* reinstate early data check

* fix

* nit
foundry-rs#11140)

Revert "fix(`cast`): unknown signatures are cached as an empty string (foundry-rs#11127)"

This reverts commit 88b14a1.
)

make typed request casting not panic and return useful error to user
* feat(cast): transaction to transaction request

* fixes

* fixes

* fixes

* fixes

* kept json
* chore: clean up cheatcode assertions

Make them faster and smaller in code size

* invert
* chore(cast): add `--left` flag to cmd `to-bytes32`

* revert and create new `pad` cmd

* make left-pad default
* fix(forge): consistent handling unresolved imports

* Add test
* chore: bump forge-std version used for tests

* Fixes

---------

Co-authored-by: DaniPopes <DaniPopes@users.noreply.github.com>
Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com>
* chore: latest bench - stable v.s v1.3.0-rc4

* v1.3.0

* nit

* fix can_install_missing_deps_build by updating forge-std-rev
* add backwards compat for v1.2 anvil state dumps

* nits

* rename to _compat

* nits

* clean up

* clean up

* clean up, introduce LegacyBlockEnv

* fix tests
* wip

* fixes

* feature

* clippy

* clippy

* refactor a bit

* refactor

* clippy

* touchups

* touchups

---------

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Dargon789 and others added 13 commits September 14, 2025 00:06
flake.lock: Update

Flake lock file updates:

• Updated input 'fenix':
    'github:nix-community/fenix/22cabbc275cf8b258ec6e2be58553853e2ee005d?narHash=sha256-etrTo3sL%2BaHWeG9ct9NGJpgW4qv84ajwQRKv4gGmkao%3D' (2025-09-06)
  → 'github:nix-community/fenix/1458349a1bd55105f917e962dca4b328ac0a55e8?narHash=sha256-P9VX/P2mN96MkFN8hwCYUQ%2BLV1bfH57UJ/pGwjd0Olc%3D' (2025-09-13)
• Updated input 'fenix/rust-analyzer-src':
    'github:rust-lang/rust-analyzer/a53b44412d4643cdec41005129735b38737eb296?narHash=sha256-JMLa0ZsbEd3%2B3E0/PQj/igVi9%2Bpb98TgxaOEEw%2Bt1bo%3D' (2025-09-05)
  → 'github:rust-lang/rust-analyzer/9edc9cbe5d8e832b5864e09854fa94861697d2fd?narHash=sha256-/PAhxheUq4WBrW5i/JHzcCqK5fGWwLKdH6/Lu1tyS18%3D' (2025-09-08)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/c6a788f552b7b7af703b1a29802a7233c0067908?narHash=sha256-6n/n1GZQ/vi%2BLhFXMSyoseKdNfc2QQaSBXJdgamrbkE%3D' (2025-09-03)
  → 'github:NixOS/nixpkgs/6d7ec06d6868ac6d94c371458fc2391ded9ff13d?narHash=sha256-fEvTiU4s9lWgW7mYEU/1QUPirgkn%2BodUBTaindgiziY%3D' (2025-09-13)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Updating git repository `https://github.com/rust-cli/rexpect`
     Locking 44 packages to latest compatible versions
   Unchanged alloy-evm v0.20.1 (available: v0.21.0)
    Updating alloy-hardforks v0.3.0 -> v0.3.1
   Unchanged alloy-op-evm v0.20.1 (available: v0.21.0)
    Updating alloy-op-hardforks v0.3.0 -> v0.3.1
    Removing android-tzdata v0.1.1
    Updating annotate-snippets v0.12.3 -> v0.12.4
    Updating aws-lc-rs v1.13.3 -> v1.14.0
    Updating aws-lc-sys v0.30.0 -> v0.31.0
    Updating aws-sdk-kms v1.86.0 -> v1.87.0
    Updating aws-sdk-sso v1.83.0 -> v1.84.0
    Updating aws-sdk-ssooidc v1.84.0 -> v1.85.0
    Updating aws-sdk-sts v1.85.0 -> v1.86.0
    Updating aws-smithy-runtime v1.9.1 -> v1.9.2
    Updating bindgen v0.69.5 -> v0.72.1
    Updating cc v1.2.36 -> v1.2.37
    Updating chrono v0.4.41 -> v0.4.42
    Updating comfy-table v7.2.0 -> v7.2.1
    Updating console v0.16.0 -> v0.16.1
   Unchanged dialoguer v0.11.0 (available: v0.12.0)
    Updating errno v0.3.13 -> v0.3.14
    Updating iana-time-zone v0.1.63 -> v0.1.64
   Unchanged idna_adapter v1.1.0 (available: v1.2.1)
    Updating indexmap v2.11.0 -> v2.11.1
    Removing itertools v0.12.1
    Removing lazycell v1.3.0
    Updating linux-raw-sys v0.9.4 -> v0.11.0
   Unchanged matchit v0.8.4 (available: v0.8.6)
    Updating normpath v1.3.0 -> v1.4.0
    Updating nybbles v0.4.3 -> v0.4.4
   Unchanged op-alloy-consensus v0.19.1 (available: v0.20.0)
   Unchanged op-alloy-rpc-types v0.19.1 (available: v0.20.0)
    Updating pest v2.8.1 -> v2.8.2
    Updating pest_derive v2.8.1 -> v2.8.2
    Updating pest_generator v2.8.1 -> v2.8.2
    Updating pest_meta v2.8.1 -> v2.8.2
   Unchanged protobuf v3.3.0 (available: v3.7.2)
   Unchanged protobuf-support v3.3.0 (available: v3.7.2)
   Unchanged rand v0.8.5 (available: v0.9.2)
    Updating revm-inspectors v0.29.1 -> v0.29.2
    Removing rustc-hash v1.1.0
    Updating rustix v1.0.8 -> v1.1.2
    Updating rustls-webpki v0.103.4 -> v0.103.5
    Updating schannel v0.1.27 -> v0.1.28
    Updating security-framework v3.3.0 -> v3.4.0
    Updating security-framework-sys v2.14.0 -> v2.15.0
    Updating serde v1.0.219 -> v1.0.221
      Adding serde_core v1.0.221
    Updating serde_derive v1.0.219 -> v1.0.221
    Updating serde_json v1.0.143 -> v1.0.144
    Updating tempfile v3.21.0 -> v3.22.0
    Updating term v1.1.0 -> v1.2.0
    Updating unicode-ident v1.0.18 -> v1.0.19
   Unchanged unicode-width v0.2.0 (available: v0.2.1)
   Unchanged vergen v8.3.2 (available: v9.0.6)
    Updating wasi v0.14.4+wasi-0.2.4 -> v0.14.5+wasi-0.2.4
      Adding wasip2 v1.0.0+wasi-0.2.4
    Removing which v4.4.2
    Updating winapi-util v0.1.10 -> v0.1.11
      Adding windows-core v0.62.0
      Adding windows-result v0.4.0
      Adding windows-strings v0.5.0
note: to see how you depend on a package, run `cargo tree --invert --package <dep>@<ver>`

Co-authored-by: mattsse <19890894+mattsse@users.noreply.github.com>
…11635)

fix(forge): color bug in `Display` impl for   `TestResult`

- Applied `wrap()` to `Painted` string to handle correctly the "nested paints"
* feat(coverage): analyze with solar

* chore: walk stmts normally, sort items

* wip

* chore: display all items with relevant source in debug format

* wip

* upd

* chore: clippy

* test: update do_while_lcov

The `++i` line was reported first, so with the old check all previous
lines were ignored. Now we track all lines regardless, so this change is
more correct.

* fix: legacy: do not recurse into emit, revert

Fixes branch_with_calldata_reads test.

* correct span

* fix: inline config path

* fix: resolve function kinds, ignore type conversions / struct ctors

* fix: walk only functions

* fix: push stmt for yul stmt expr early

* test: add a test case for if (..) return

If statements like `if (x) return y;` were missed by the
previous `has_statements` function.

* test: hoist contract instantiations out of test fns

* test: add test case for single if with continue/break

Same as previous test with `return`.
…oundry-rs#11644)

* Update cmd.rs

* Update crates/anvil/src/cmd.rs

Co-authored-by: onbjerg <onbjerg@users.noreply.github.com>

* Update cmd.rs

* Update cmd.rs

---------

Co-authored-by: onbjerg <onbjerg@users.noreply.github.com>
…et docs (foundry-rs#11636)

* chore(common): deprecate ProjectCompiler::verify and fix compile_target docs

* fmt

* Update compile.rs

* fmt

* Update compile.rs

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pull request #101 has too many files changed.

The GitHub API will only let us fetch up to 300 changed files, and this pull request has 701.

@snyk-io

snyk-io Bot commented Oct 13, 2025

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Comment thread .github/workflows/nix.yml Fixed
Comment thread .github/workflows/nix.yml Fixed
Comment thread .github/workflows/npm.yml Fixed
Comment thread .github/workflows/npm.yml Fixed
Comment thread .github/workflows/npm.yml Fixed
…in permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: AU_gdev_19 <64915515+Dargon789@users.noreply.github.com>
@vercel

vercel Bot commented Oct 13, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
next Ready Ready Preview Comment Oct 13, 2025 7:46pm
react Ready Ready Preview Comment Oct 13, 2025 7:46pm

@vercel
vercel Bot temporarily deployed to Preview – next October 13, 2025 19:46 Inactive
@vercel
vercel Bot temporarily deployed to Preview – react October 13, 2025 19:46 Inactive
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: AU_gdev_19 <64915515+Dargon789@users.noreply.github.com>
@vercel
vercel Bot temporarily deployed to Preview – next October 13, 2025 19:46 Inactive
@vercel
vercel Bot temporarily deployed to Preview – react October 13, 2025 19:46 Inactive
@Dargon789
Dargon789 enabled auto-merge (rebase) October 13, 2025 19:50
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello @Dargon789, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances Foundry's development experience, testing capabilities, and RPC API. It introduces a standardized development container setup, a robust benchmarking framework, and critical updates to core dependencies, including a migration to Rust Edition 2024. Anvil's RPC API is expanded with new functionalities for account information, synchronous transaction sending, blob data retrieval, and advanced state/block overrides. Furthermore, it adds comprehensive support for EIP-7702 and Celo-specific features, alongside substantial improvements to the project's build, linting, and CI/CD processes.

Highlights

  • Dev Container Support: Introduced new dev container configurations (.devcontainer/Dockerfile.dev, .devcontainer/devcontainer.json) to standardize the development environment, including installations for Bun, Rust, Vyper, and VS Code extensions like rust-analyzer and bun-vscode.
  • Benchmarking Infrastructure: Added a new benches/ crate with a comprehensive benchmarking tool (foundry-bench) to measure performance across different Foundry versions and repositories. This includes scripts for combining, committing, and formatting benchmark results for GitHub Actions.
  • Dependency Updates & Rust Edition 2024: Upgraded the workspace to Rust Edition 2024 and Rust version to 1.89. Numerous dependencies were bumped, including major updates for alloy-* crates (e.g., alloy-consensus to 1.0.23, alloy-primitives to 1.3.1), revm to 29.0.0, and foundry-compilers to 0.19.1. New allocators (mimalloc, tikv-jemallocator) and various utility crates were also added.
  • Anvil RPC API Enhancements: Expanded Anvil's RPC capabilities with new methods such as eth_getAccountInfo, eth_sendTransactionSync, eth_sendRawTransactionSync, anvil_getBlobByHash, anvil_getBlobsByTransactionHash, eth_config, debug_codeByHash, anvil_impersonateSignature, anvil_addBalance, anvil_dealERC20, and anvil_setERC20Allowance. The eth_call and eth_estimateGas methods now support EvmOverrides for more flexible state and block manipulation.
  • EIP-7702 and Celo Support in Anvil: Implemented full support for EIP-7702 (Account Abstraction) transactions and added Celo-specific precompile support in Anvil, enhancing its compatibility with Optimism-based chains and Celo's native token transfers.
  • Makefile and CI/CD Improvements: Refactored the Makefile with new targets for test-coverage, lint-clippy, lint-typos, deny, and dprint for improved code quality checks and CI/CD integration. Docker builds now include the js-tracer feature.
Ignored Files
  • Ignored by pattern: .github/workflows/** (12)
    • .github/workflows/benchmarks.yml
    • .github/workflows/bump-forge-std.yml
    • .github/workflows/codeql.yml
    • .github/workflows/dependencies.yml
    • .github/workflows/docker-image.yml
    • .github/workflows/docker-publish.yml
    • .github/workflows/jekyll.yml
    • .github/workflows/nextest.yml
    • .github/workflows/nix.yml
    • .github/workflows/npm.yml
    • .github/workflows/release.yml
    • .github/workflows/test.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@Dargon789 Dargon789 linked an issue Oct 13, 2025 that may be closed by this pull request

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request is a significant and wide-ranging update that appears to be an automated or semi-automated refactoring, primarily focused on upgrading major dependencies like revm and alloy, and migrating the codebase to the Rust 2024 edition. Alongside these foundational changes, the PR introduces substantial new features, including a comprehensive development container setup, a new benchmarking framework, and numerous enhancements to cast and anvil commands, such as improved state/block overrides and backward compatibility for state dumps. The overall code quality is high, with many improvements in error handling and API design. My review identified a couple of minor issues in a new script and a CLI command's error message, which are detailed in the comments.

Comment thread .github/scripts/combine-benchmarks.sh
@Dargon789 Dargon789 closed this Oct 13, 2025
auto-merge was automatically disabled October 13, 2025 20:52

Pull request was closed

@Dargon789
Dargon789 deleted the foundry/alert-autofix-19 branch October 13, 2025 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

updated coverage analysis visitor