Skip to content

feat: detect ABI Encoding Inefficiencies - #536

Merged
mijinummi merged 2 commits into
MDTechLabs:mainfrom
SharifIbrahimDev:feat/342-inefficient-mapping-iteration
Jun 23, 2026
Merged

feat: detect ABI Encoding Inefficiencies#536
mijinummi merged 2 commits into
MDTechLabs:mainfrom
SharifIbrahimDev:feat/342-inefficient-mapping-iteration

Conversation

@SharifIbrahimDev

Copy link
Copy Markdown
Contributor

Description

This PR introduces a new optimization rule to detect inefficient ABI encoding patterns in Solidity contracts.

Changes Made

  • Optimization Encoding Module: Added detect_abi_encoding_inefficiencies to flag abi.encode( calls which often can be replaced by abi.encodePacked( to save gas.
  • Solidity Rule Wrapper: Created AbiEncodingRule to wrap the logic for the GasGuard rule engine.
  • Unit Tests: Included tests for correctly flagging inefficient usages while ignoring safe alternatives.

Closes #332

@drips-wave

drips-wave Bot commented Jun 23, 2026

Copy link
Copy Markdown

@SharifIbrahimDev 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 5b862d1 into MDTechLabs:main Jun 23, 2026
6 checks passed
@grantfox-oss grantfox-oss Bot mentioned this pull request Jun 23, 2026
1 task
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 ABI Encoding Inefficiencies

2 participants