Skip to content

Wagmi (e604566)#413

Merged
Dargon789 merged 414 commits intomainfrom
wagmi-(e604566)
Apr 13, 2026
Merged

Wagmi (e604566)#413
Dargon789 merged 414 commits intomainfrom
wagmi-(e604566)

Conversation

@Dargon789
Copy link
Copy Markdown
Owner

@Dargon789 Dargon789 commented Apr 13, 2026

Motivation

Solution

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

Summary by Sourcery

Introduce a new AST-based linting framework with simplified keccak256 gas linting, harden filesystem and npm publishing paths, add Cancun beacon block root handling to execution traces, refine documentation and UX output, and extend CI/CD and example project scaffolding.

New Features:

  • Add a generic linter infrastructure with AST-based early lint passes for Solidity, including a keccak256 gas-optimization lint.
  • Support processing and storing beacon block roots in the tracing executor and wire it into cast run for Cancun-era blocks.
  • Add a minimal example counter Foundry project with script, tests, and CI workflow.

Bug Fixes:

  • Harden file copying in script test utilities and benchmark cleanup to avoid symlink traversal and unsafe paths.
  • Validate npm tool/platform/arch inputs, package directories, and registry URLs to prevent unsafe paths, insecure schemes, and localhost/loopback registries.
  • Fix invariant executor interval checks to use modulo arithmetic compatible with stable Rust and avoid reliance on nightly-only helpers.
  • Avoid panics from total_cmp on non-finite values by switching suggestion ranking and contract scoring to safe partial_cmp fallbacks.
  • Ensure Vyper compiler settings are cloned correctly when building Etherscan standard JSON inputs.
  • Stabilize gas estimation output by always reporting required amount in ETH and adjusting the corresponding JSON payload.

Enhancements:

  • Simplify the ASM keccak256 lint to operate directly on AST call expressions and emit diagnostics via the new lint context.
  • Improve Solidity doc generation by adjusting function headings, handling @dev comments as italics, filtering enum @variant comments, and refining enum variant tables and inheritdoc merging.
  • Add a conversion from Vec<Comment> to Comments to streamline documentation comment handling.
  • Relax flake development shell configuration by removing dprint and nix hardening overrides.
  • Adjust CLI suggestion sorting to degrade gracefully when similarity comparisons are not totally ordered.

Build:

  • Add and duplicate multiple Docker build workflows and a Foundry build-and-test deploy workflow for GitHub Actions.
  • Introduce several CircleCI configurations for Rust builds, cargo formatting/tests, and placeholder web3 game workflows.

CI:

  • Add CodeQL, Snyk container, and APIsec scanning workflows for security analysis.
  • Augment npm publishing workflow with input validation, directory sanity checks, and package.json presence checks.
  • Add a CI workflow for the example counter project running Forge fmt, build, and tests.

Deployment:

  • Add a Google Cloud GKE build-and-deploy workflow and Docker image publishing workflows targeting Docker Hub.

Documentation:

  • Update issue templates for bugs and feature requests and add a README for the counter example project.
  • Refine generated Solidity documentation formatting, particularly for function signatures, @dev sections, and enum documentation tables.

Tests:

  • Add a new cast CLI test covering beacon block root tracing on Cancun blocks.
  • Include Remix Assert and Accounts helper contracts and a Counter Foundry project test suite.

Dargon789 and others added 30 commits October 17, 2025 07:49
Signed-off-by: AU_gdev_19 <64915515+Dargon789@users.noreply.github.com>
Signed-off-by: AU_gdev_19 <64915515+Dargon789@users.noreply.github.com>
Signed-off-by: AU_gdev_19 <64915515+Dargon789@users.noreply.github.com>
Signed-off-by: AU_gdev_19 <64915515+Dargon789@users.noreply.github.com>
Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.62.31 to 2.62.33.
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](taiki-e/install-action@0005e01...e43a502)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.62.33
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Create ci_cargo.yml (#72)

Signed-off-by: AU_gdev_19 <64915515+Dargon789@users.noreply.github.com>

* Create config.yml

Signed-off-by: AU_gdev_19 <64915515+Dargon789@users.noreply.github.com>

* Rename ci_cargo.yml to cargo.yml

Signed-off-by: AU_gdev_19 <64915515+Dargon789@users.noreply.github.com>

* fix(fmt): handle trailing coments between base contracts (foundry-rs#12127)

* fix(fmt): account for ternary operators when estimating size

* fix(fmt): handle comments between inherited base contracts

* test: layout + base inheritance

* feat(forge): add bypass prevrandao (foundry-rs#12125)

* feat(forge): add bypass prevrandao

* Update crates/evm/networks/src/lib.rs

Co-authored-by: 0xrusowsky <90208954+0xrusowsky@users.noreply.github.com>

* changes after review: remove duped code

---------

Co-authored-by: 0xrusowsky <90208954+0xrusowsky@users.noreply.github.com>

* fix(fmt): filter libs when recursing (foundry-rs#12119)

* fix(fmt): account for ternary operators when estimating size

* fix(fmt): filter libs when recursing

* style: clippy

* test: wipe contracts before formatting

* test: explicitly test ignore

* fix(fmt): break try stmts in a fn header-like fashion (foundry-rs#12131)

* chore(deps): bump softprops/action-gh-release from 2.3.4 to 2.4.1

Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.3.4 to 2.4.1.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](softprops/action-gh-release@62c96d0...6da8fa9)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-version: 2.4.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump taiki-e/install-action from 2.62.28 to 2.62.33 (#161)

Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.62.28 to 2.62.33.
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](taiki-e/install-action@e7ef886...e43a502)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.62.33
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---------

Signed-off-by: AU_gdev_19 <64915515+Dargon789@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: 0xrusowsky <90208954+0xrusowsky@users.noreply.github.com>
Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* test: refactor testdata/ tests to be run in `forge test` (foundry-rs#12049)

* test: run forge test on testdata/

* chore: refactor to use common Test contract

* chore: disable testGasMeteringExternal, via-ir

* test: rm unused repros

* fix: paths

* upd

* fmt

* fix more tests

* test: turn testNonExistingContractRevert into expectRevert

* fix some more paths

* legacy assertions

* compile paris with paris

* fix: set configs for fs tests

* fix remaining paths in cheats

* restrict fs permissions

* fix: set runtime evm_version too

* fix vyper

* fix: a couple of repros

* fix: we have storage layouts

* fix: 3223, 3674: set sender

* reorder

* feat: move repros expected failures to snapshots

* feat: migrate remaining repros tests

* feat: rm migrated files

* skip testRevertIfGetUnlinked

* move expected core/ failures

* upd

* move logs/

* move all forgetest tests from it/ to cli/

* fix fork test

* move trace/

* tmp: move fuzz/invariant out of fuzz/

* move fuzz/

* forge fmt

* wips

* fix: both vyper and paris; set src/

* canon

* lib log

* logs

* Revert "fix: set runtime evm_version too"

This reverts commit 7ca544b.

Contract-level inline config will set evm version for libraries too,
which means we fail on deploying libraries that are compiled with
newer evm version.

* fix: set evm version where needed, per test function

* test: reduce gas wastage

* chore: clippy

* invariant mod.rs

* test: fix linking tests with new utils

* redact_with

* Revert "wips"

This reverts commit ee2c17a.

* migrate invariant/target{,Abi}

* migrate InvariantAfterInvariant.t.sol

* migrate InvariantAssume.t.sol

* migrate InvariantCalldataDictionary.t.sol, more test utils

* migrate InvariantCustomError.t.sol

* migrate InvariantExcludedSenders.t.sol

* migrate InvariantFixtures.t.sol

* migrate InvariantHandlerFailure.t.sol

* interlude: forgot to use a new file

* migrate InvariantInnerContract.t.sol

* migrate InvariantPreserveState.t.sol

* migrate InvariantReentrancy.t.sol

* migrate InvariantRollFork.t.sol

* migrate InvariantScrapeValues.t.sol

* migrate InvariantSequenceNoReverts.t.sol

* migrate InvariantShrinkBigSequence.t.sol

* migrate InvariantShrinkFailOnRevert.t.sol

* migrate InvariantShrinkWithAssert.t.sol

* migrate InvariantTest1.t.sol

* fix InvariantInnerContract.t.sol

* update new Rlp test

* com

* better com

* nuke tests/it

* test: fix testdata paths in script tester

* test: fix relative paths in test_cmd

* test: redact more in issue_2851

* fix: copy testdata correctly

* trace addrs

* manual retry logic with --retry

* fix nondeterministic output

* debug: fs lock error context

* test: fix project root for windows

* test: skip project root test if unset

* normalize both

* typo

* Revert "typo"

This reverts commit 402bea1.

* Revert "debug: fs lock error context"

This reverts commit e5caedd.

* fix

* fix: locked_write_line for windows

* chore: clippy

* fmt

* chore: speed up fuzzed_selected_targets

* other way

* fix nondeterministic output 2

* fix: disable persistence

* test: revert old via-ir

* ci: tweak cache key

* do not run trace test when isolate

---------

Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com>

* fix(anvil): always disable nonce check (foundry-rs#12144)

* deps: bump deps (foundry-rs#12149)

* deps: bump deps

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* minimum Cargo.lock

---------

Co-authored-by: rplusq <rplusq@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

---------

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com>
Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>
Co-authored-by: Rafael Quintero <32346241+rplusq@users.noreply.github.com>
Co-authored-by: rplusq <rplusq@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: AU_gdev_19 <64915515+Dargon789@users.noreply.github.com>
Signed-off-by: AU_gdev_19 <64915515+Dargon789@users.noreply.github.com>
Signed-off-by: AU_gdev_19 <64915515+Dargon789@users.noreply.github.com>
Signed-off-by: AU_gdev_19 <64915515+Dargon789@users.noreply.github.com>
CI/CD Configuration Update: The CircleCI configuration file, cargo.yml, has been updated to use a newer version of the Rust Docker image.
Rust Toolchain Version Bump: The cimg/rust Docker image version has been incremented from 1.88.0 to 1.89.0, ensuring the CI pipeline utilizes a more recent Rust toolchain.

Signed-off-by: AU_gdev_19 <64915515+Dargon789@users.noreply.github.com>
0xKarl98 and others added 24 commits April 13, 2026 09:06
refactor(anvil): extract build_block_info helper
* feat(evm): auto-detect Tempo network on Anvil

* test(evm): add integration tests for network auto-selection via infer_network_from_fork

Amp-Thread-ID: https://ampcode.com/threads/T-019d85e2-2767-70a1-a1bd-659d72a156f4
Co-authored-by: Amp <amp@ampcode.com>

---------

Co-authored-by: Amp <amp@ampcode.com>
…14243)

clippy: warn on derive_partial_eq_without_eq

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
clippy: warn on flat_map_option

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
The P256VERIFY precompile gas cost was reduced from 6900 to 3450,
but the flaky_osaka_can_run_p256_precompile snapshot still had the
old value hardcoded. Replace with [..] for consistency with the
rest of the snapshot.

Closes foundry-rs#14282
Closes foundry-rs#14283


Amp-Thread-ID: https://ampcode.com/threads/T-019d8681-ae7d-712f-b4e7-eb6f595f82e3

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
* clippy: warn on flat_map_option

Co-Authored-By: zerosnacks <95942363+zerosnacks@users.noreply.github.com>

* clippy: warn on equatable_if_let

Co-Authored-By: zerosnacks <95942363+zerosnacks@users.noreply.github.com>

---------

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
clippy: warn on large_stack_frames

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
clippy: warn on needless_continue

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
…ry-rs#14286)

clippy: warn on trailing_empty_array, trait_duplication_in_bounds, trivial_regex, tuple_array_conversions, unnecessary_struct_initialization, unused_peekable

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
Co-authored-by: Mablr <59505383+mablr@users.noreply.github.com>
)

* evm: require cheatcode origin for skip

* evm/core: stop decoding magic skip in maybe_decode

* evm/fuzz: guard skip decode by cheatcode reverter

---------

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
clippy: warn on unnecessary_self_imports

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
…ry-rs#14292)

* fix(anvil): convert evm_setTime input from millis to seconds before use

evm_setTime accepts a JavaScript-style millisecond timestamp for Ganache
compatibility, but the offset was computed by subtracting
current_call_timestamp (seconds) from the raw millisecond input. Convert
the input to seconds first, then compute the offset correctly.

Co-Authored-By: cui <1579517+cuiweixie@users.noreply.github.com>
Co-Authored-By: zerosnacks <95942363+zerosnacks@users.noreply.github.com>

* fix: move millis-to-seconds conversion to RPC dispatch layer

The internal evm_set_time API accepts seconds (matching internal tests),
while the JSON-RPC evm_setTime method accepts milliseconds for Ganache
compatibility. Move the Duration::from_millis conversion to the RPC
handler so both code paths are correct.

Co-Authored-By: cui <1579517+cuiweixie@users.noreply.github.com>
Co-Authored-By: zerosnacks <95942363+zerosnacks@users.noreply.github.com>

* fix: auto-detect seconds vs milliseconds in evm_setTime

Timestamps above 1e12 are treated as milliseconds (Ganache compat) and
converted to seconds; values at or below that threshold are treated as
seconds directly. This avoids silently downcasting a seconds timestamp
to a nonsensical value.

Co-Authored-By: cui <1579517+cuiweixie@users.noreply.github.com>
Co-Authored-By: zerosnacks <95942363+zerosnacks@users.noreply.github.com>

* style: fix rustfmt

Co-Authored-By: cui <1579517+cuiweixie@users.noreply.github.com>
Co-Authored-By: zerosnacks <95942363+zerosnacks@users.noreply.github.com>

---------

Co-authored-by: cui <1579517+cuiweixie@users.noreply.github.com>
Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
clippy: enable `string_lit_as_bytes`


Amp-Thread-ID: https://ampcode.com/threads/T-019d8707-07ff-77cf-b7f2-5dc0f64200ec

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
clippy: enable `option_as_ref_cloned`


Amp-Thread-ID: https://ampcode.com/threads/T-019d8707-07ff-77cf-b7f2-5dc0f64200ec

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
* fix(anvil): guard deposit tx parsing in Tempo mode

* use the ensure_op_deposits_active check
* clippy: enable `missing_const_for_fn`

Co-Authored-By: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019d8707-07ff-77cf-b7f2-5dc0f64200ec

* fix: revert const on feature-gated non-const functions

Co-Authored-By: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019d8707-07ff-77cf-b7f2-5dc0f64200ec

---------

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
clippy: enable `useless_let_if_seq`


Amp-Thread-ID: https://ampcode.com/threads/T-019d8707-07ff-77cf-b7f2-5dc0f64200ec

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
@mergify
Copy link
Copy Markdown

mergify bot commented Apr 13, 2026

⚠️ The sha of the head commit of this PR conflicts with #412. Mergify cannot evaluate rules on this PR. Once #412 is merged or closed, Mergify will resume processing this PR. ⚠️

@mergify
Copy link
Copy Markdown

mergify bot commented Apr 13, 2026

⚠️ The sha of the head commit of this PR conflicts with #412. Mergify cannot evaluate rules on this PR. Once #412 is merged or closed, Mergify will resume processing this PR. ⚠️

@Dargon789 Dargon789 merged commit 570d962 into main Apr 13, 2026
16 of 22 checks passed
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.

Sequence diagram for AST-based keccak256 linting