title: How to check for negative numbers sent to smart contract?
body: <p>I want my contract not to accept negative values being added to it's balance, so I thought I'd add a require value > 0. It seams though as the value sent with the payable function is unsigned and therefore always a positive number. Meaning if you send -1 ether it is accepted and adds about 1 ether instead. How do I make sure no negative numbers can be sent?</p>
  
  <pre><code>function () external payable {
    require(msg.value &gt; 0); 
    require(msg.data.length == 0);
  } 
  </code></pre>
  
  <p>Thanks! </p>