Skip to content

Latest commit

 

History

History
41 lines (33 loc) · 1.67 KB

gas-calldata-parameters.md

File metadata and controls

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

gas-calldata-parameters

Category Badge Default Severity Badge warn

Description

Suggest calldata keyword on function arguments when read only

Options

This rule accepts a string option of rule severity. Must be one of "error", "warn", "off". Default to warn.

Example Config

{
  "rules": {
    "gas-calldata-parameters": "warn"
  }
}

Notes

  • Only applies for external functions when receiving arguments with [memory] keyword
  • This rule makes a soft check to see if argument is readOnly to make the suggestion. Check it manually before changing it.
  • source 1 of the rule initiative (see Calldata vs Memory)
  • source 2 of the rule initiative

Examples

This rule does not have examples.

Version

This rule was introduced in Solhint 4.5.0

Resources