gas-struct-packing

Description
Suggest to re-arrange struct packing order when it is inefficient
Options
This rule accepts a string option of rule severity. Must be one of “error”, “warn”, “off”. Defaults to warn.
Example Config
{
"rules": {
"gas-struct-packing": "warn"
}
}
Notes
- This rule assumes all UserDefinedTypeName take a new slot. (beware of Enums inside Structs)
- Simple cases like a struct with three addresses might be reported as false positive. (needs to be fixed)
- source 1 of the rule initiative (Variable Packing)
- source 2 of the rule initiative
Examples
This rule does not have examples.
Version
This rule was introduced in Solhint 4.5.0
Resources