Solhint

Solhint

Community Analyzer

When fallback is not payable you will not be able to receive ethers SOLHINT-W1013

Anti-pattern
Minor

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

Bad Practice

  1. Fallback is not payable
    pragma solidity 0.4.4;
    
    
    contract A {
      function () public {}
    }
    

Recommended

  1. Fallback is payable
    pragma solidity 0.4.4;
    
    
    contract A {
      function () public payable {}
    }
    

Learn more

payable-fallback on Solhint's documentation.