gas-calldata-parameters
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