Skip to content

fix(precompiles): reject state changes in static calls to mint writers - #422

Merged
tac0turtle merged 2 commits into
mainfrom
fix/mint-precompile-reject-static-write
Oct 27, 2026
Merged

tac0turtle merged 2 commits into
mainfrom
fix/mint-precompile-reject-static-write

Conversation

@damiannolan

Copy link
Copy Markdown
Contributor

Description

The mint precompile's writer methods (mint, burn, addToAllowList, removeFromAllowList) did not check is_static, so they could commit state inside a STATICCALL frame. The proposer and deploy_permissions precompiles already reject this; mirror the same guard here.

Adds a regression test covering the static-call path.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Refactoring

Related Issues

Fixes #(issue)

Checklist

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Testing

Additional Notes

The mint precompile's writer methods (mint, burn, addToAllowList,
removeFromAllowList) did not check `is_static`, so they could commit
state inside a STATICCALL frame. The proposer and deploy_permissions
precompiles already reject this; mirror the same guard here.

Adds a regression test covering the static-call path.
@damiannolan
damiannolan requested a review from a team as a code owner October 27, 2026 09:04
@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 70ad77a6-7837-4ab4-89f0-4bfdf4550ffb
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tac0turtle
tac0turtle enabled auto-merge (squash) October 27, 2026 09:08
@tac0turtle
tac0turtle merged commit e607e7e into main Oct 27, 2026
16 checks passed
@tac0turtle
tac0turtle deleted the fix/mint-precompile-reject-static-write branch October 27, 2026 09:18
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.

2 participants