Skip to content

https://github.com/foundry-rs/foundry/pull/12861#issue-3740415132Thanks for the feedback #12889

@dhh5071-sketch

Description

@dhh5071-sketch

Thanks for the feedback

I agree that saturating_sub may mask incorrect gas accounting.
Would you prefer:

  • an explicit fork-check (Cancun vs Prague), or
  • guarding the subtraction with a conditional + debug assertion, or
  • returning early when gas < stipend inside pauseGasMetering?

Happy to rework this to preserve gas semantics while avoiding the panic.

Originally posted by @subwaycookiecrunch in #12861 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions