The {“extends”: “solhint:recommended”} property in a configuration file enables this rule.
When fallback is not payable and there is no receive function you will not be able to receive currency.
This rule accepts a string option of rule severity. Must be one of “error”, “warn”, “off”. Default to warn.
{
"rules": {
"payable-fallback": "warn"
}
}
--fix
optionfunction() public payable {}
fallback() external payable {}
function() {} function g() payable {}
fallback() {} function g() payable {}
This rule was introduced in Solhint 2.0.0-alpha.0