Code contract:
pragma solidity <0.7.0;
contract contr{
function money()public payable{
msg.sender.transfer(5 ether);
}
}
ABI contract: [{"inputs":[],"name":"money","outputs":[],"stateMutability":"payable","type":"function"}]
I call the function from the geth console this way: contr.money.sendTransaction({from: eth.accounts[0], value: 50000000000000000000})
also called like this: contr.money.sendTransaction({from: eth.accounts[0], to: contr.address, value: 50000000000000000000}) The error does not chang
в