Skip to content

Latest commit

 

History

History
67 lines (45 loc) · 1.68 KB

payable-fallback.md

File metadata and controls

67 lines (45 loc) · 1.68 KB
warning layout title
This is a dynamically generated file. Do not edit manually.
default
payable-fallback | Solhint

payable-fallback

Recommended Badge Category Badge Default Severity Badge warn

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

Description

When fallback is not payable you will not be able to receive ethers.

Options

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

Example Config

{
  "rules": {
    "payable-fallback": "warn"
  }
}

Examples

👍 Examples of correct code for this rule

Fallback is payable

      pragma solidity 0.4.4;
        
        
      contract A {
        function () public payable {}
      }
    

👎 Examples of incorrect code for this rule

Fallback is not payable

      pragma solidity 0.4.4;
        
        
      contract A {
        function () public {}
      }
    

Version

This rule was introduced in Solhint 2.0.0-alpha.0

Resources