solhint

gas-small-strings

Recommended Badge Category Badge Default Severity Badge warn

The {“extends”: “solhint:recommended”} property in a configuration file enables this rule.

Description

Keep strings smaller than 32 bytes. Promote the use of custom errors

Options

This rule accepts a string option for rule severity. Must be one of “error”, “warn”, “off”. Defaults to warn.

Example Config

{
  "rules": {
    "gas-small-strings": "warn"
  }
}

Notes

Examples

This rule does not have examples.

Version

This rule was introduced in Solhint 4.5.0

Resources