I am using Remix with Metamask on the Ropsten test system, and when I try and transfer Wei I get a gas error. I tried a few combinations but there are various errors relating to gas.
Has anyone any example code for this?
Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending?
address public mywallet = 0xcDDb122bb4dCe8AcF90078E0e853b1414d10EDb0; bool public status = false; function payUser (uint amount) public payable returns (bool) { uint GAS_LIMIT = 4000000; // userAddress.transfer.gas(GAS_LIMIT)(amount); // status = mywallet.call.value(amount).gas(GAS_LIMIT)(); mywallet.transfer(amount); return status; } function getBalance(address walletAddress) public view returns (uint) { return walletAddress.balance; }