| warning | This is a dynamically generated file. Do not edit manually. |
|---|---|
| layout | default |
| title | gas-custom-errors | Solhint |
The {"extends": "solhint:recommended"} property in a configuration file enables this rule.
Enforces the use of Custom Errors over Require with strings error and Revert statements
This rule accepts a string option for rule severity. Must be one of "error", "warn", "off". Defaults to warn.
{
"rules": {
"gas-custom-errors": "warn"
}
}- This rules applies to Solidity version 0.8.4 and higher
revert CustomErrorFunction();revert CustomErrorFunction({ msg: "Insufficient Balance" });require(success, CustomErrorFunction({ msg: "Insufficient Balance" }));require(isAuthorized(account), CustomErrorFunction());require(a > b, CustomErrorFunction());require(userBalance >= availableAmount, "Insufficient Balance");revert();revert("Insufficient Balance");This rule was introduced in Solhint 4.5.0