Skip to content

Conversation

@Jayakumar2812
Copy link
Contributor

Motivation

Monad introduces system transactions executed at zero gas by the protocol.
These appear in the block as regular transactions but do not follow basefee rules.
Currently, Foundry tools (cast, --quick, etc.) treat these as normal transactions.
This causes:
• cast to fail with Error #1: transaction validation error: gas price is less than basefee
• --quick to fails when multiple system transactions exist in the same block, leading to nonce-too-high errors

Solution

Added MONAD_SYSTEM_ADDRESS and updated transaction handling to skip Monad system transactions, similar to how L2 system txs are ignored.
This prevents validation errors caused by 0-gas system transactions in cast.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

0xrusowsky
0xrusowsky previously approved these changes Nov 17, 2025
@0xrusowsky
Copy link
Contributor

0xrusowsky commented Nov 17, 2025

@Jayakumar2812 please run rustfmt to fix the CI errors

mattsse
mattsse previously approved these changes Nov 17, 2025
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

reasonable

@mattsse mattsse dismissed stale reviews from 0xrusowsky and themself via 7e36ed8 November 17, 2025 14:51
@mattsse mattsse enabled auto-merge November 17, 2025 14:54
@mattsse mattsse added this pull request to the merge queue Nov 17, 2025
Merged via the queue into foundry-rs:master with commit 4f6c0f6 Nov 17, 2025
15 checks passed
@github-project-automation github-project-automation bot moved this to Done in Foundry Nov 17, 2025
Sharilleed223 added a commit to Sharilleed223/foundry that referenced this pull request Nov 19, 2025
Simplify Option unwrapping patterns in gas snapshot handling:
- Replace is_some() + unwrap() with if let Some pattern
- Remove redundant intermediate variable binding

Add missing test for MONAD_SYSTEM_ADDRESS constant:
- Test coverage was incomplete after PR foundry-rs#12585
- Add assertion to verify MONAD_SYSTEM_ADDRESS constant value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants