title: Error: Cannot send value to non-payable function GETH
body: <p>Code contract:</p>
  <pre><code>pragma solidity &lt;0.7.0;
  
  contract contr{
  
    function money()public payable{
       msg.sender.transfer(5 ether);
    }
  }
  </code></pre>
  <p>ABI contract:<code> [{&quot;inputs&quot;:[],&quot;name&quot;:&quot;money&quot;,&quot;outputs&quot;:[],&quot;stateMutability&quot;:&quot;payable&quot;,&quot;type&quot;:&quot;function&quot;}]</code></p>
  <p>I call the function from the geth console this way: <strong>contr.money.sendTransaction({from: eth.accounts[0], value: 50000000000000000000})</strong></p>
  <p>also called like this: <strong>contr.money.sendTransaction({from: eth.accounts[0], to: contr.address, value: 50000000000000000000})</strong> The error does not chang</p>
  <p>в</p>