Skip to content

chore(10027-cheatcode-mutability-tags): Fix Mutability Tags for Cheatcodes that are Missing Them #10351

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

Mouzayan
Copy link

@Mouzayan Mouzayan commented Apr 23, 2025

Summary

Opening this as a draft to track work and get feedback.

This draft PR begins addressing issue #10027 — reviewing and updating view / pure / external modifiers for cheatcodes that do not modify EVM state.

Plan

  • Identify cheatcodes currently marked external with no view or pure modifier
  • Evaluate whether they:
    • Mutate observable state (EVM, filesystem, logs, interpreter) → leave as-is
    • Depend on prior cheatcode state but don’t mutate → mark as view
    • Have no dependencies or side effects → mark as pure
  • Update their ABI and signature accordingly
  • Add or update tests or dev docs if needed

Note

Ran cargo check, cargo clippy, and cargo +nightly fmt --check, all passed.
Ran cargo test --all --all-features multiple times and observed inconsistent failures across different tests.

To verify test isolation, ran: cargo test --all --all-features -- --test-threads=1.
With this, previously failing tests (like decode_traces_with_project_artifacts) passed, possibly indicating test suite flakiness.

Motivation

Solution

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

1 participant