Skip to content

Add gas-optimized reentrancy guard, G006/G003 rules, gas snapshot diff script - #676

Merged
mijinummi merged 1 commit into
MDTechLabs:mainfrom
Leothosine:feat/issues-649-650-651-652
Jul 28, 2026
Merged

Add gas-optimized reentrancy guard, G006/G003 rules, gas snapshot diff script#676
mijinummi merged 1 commit into
MDTechLabs:mainfrom
Leothosine:feat/issues-649-650-651-652

Conversation

@Leothosine

Copy link
Copy Markdown
Contributor

Adds small, focused starter implementations for four assigned issues:

  • GasOptimizedReentrancyGuard: 1/2 sentinel reentrancy guard so re-entry checks hit a warm slot instead of a cold 0->1 write.
  • detect_missing_payable (Rule G006): flags onlyOwner/onlyAdmin functions missing payable.
  • detect_public_vars_in_abstract (Rule G003): flags public state variable declarations intended for abstract/internal contracts.
  • compare-gas-snapshots.sh: diffs .gas-snapshot against a baseline ref and prints a markdown diff table. Wiring this into .github/workflows/gas-diff.yml is a follow-up, since pushing workflow file changes requires a token with the workflow scope.

These are intentionally small starter implementations covering the core of each acceptance criteria; dedicated test fixtures and full AST/CFG-based analysis can follow in subsequent PRs.

Closes #652
Closes #651
Closes #650
Closes #649

@drips-wave

drips-wave Bot commented Jul 28, 2026

Copy link
Copy Markdown

@Leothosine Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@mijinummi
mijinummi merged commit fb7c8a0 into MDTechLabs:main Jul 28, 2026
3 of 7 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

2 participants