Skip to content

Latest commit

 

History

History
41 lines (33 loc) · 1.63 KB

gas-struct-packing.md

File metadata and controls

41 lines (33 loc) · 1.63 KB
warning layout title
This is a dynamically generated file. Do not edit manually.
default
gas-struct-packing | Solhint

gas-struct-packing

Category Badge Default Severity Badge warn

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