Skip to content

Feat/expensive#442

Merged
mijinummi merged 3 commits into
MDTechLabs:mainfrom
ummarig:feat/expensive
Jun 2, 2026
Merged

Feat/expensive#442
mijinummi merged 3 commits into
MDTechLabs:mainfrom
ummarig:feat/expensive

Conversation

@ummarig
Copy link
Copy Markdown
Contributor

@ummarig ummarig commented Jun 2, 2026

✅ Implemented

Added a new Soroban gas optimization lint rule to detect expensive Map iteration patterns and suggest pagination/chunking.

Files updated

Closes #376

  • gas_optimization_rules.rs

    • Added MapIterationRule
    • Detects loops with .iter(), .keys(...), .values(...), .entries(...), or .range(...) in the context of Map
    • Suggests: Use pagination or chunked iteration rather than iterating over the entire Map in one call
    • Added unit tests for positive and negative cases
  • mod.rs

    • Registered MapIterationRule in the default SorobanLinter rule set

Closes #377

Notes

  • Editor diagnostics report no issues in the modified files.
  • Rule ID: soroban-map-iteration

Completed: Implement gas optimization rules (3/3)

Made changes.

Closes #379

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 2, 2026

@ummarig 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 b2c981a into MDTechLabs:main Jun 2, 2026
4 of 6 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

Development

Successfully merging this pull request may close these issues.

Detect Missing Soroban Test Coverage Detect Missing Soroban Contract Metadata Detect Expensive Map Iteration in Soroban

2 participants