So i´ve been experimenting with Solidity and Remix and i wanted to and a simple while loop to the .transfer and .balance method. While being able to deploy the contract, I can´t seem to be able to send the 10 ether specified in the code. Any help would be much appreciated. Here is the code:
pragma solidity ^0.5.0;
contract testTransfer {
function Transfer () public payable {
address payable x = 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4;
address payable myAddress = msg.sender;
if (x.balance < 100 && myAddress.balance >= 10) x.transfer (10 ether);
}
}
a different version where myAddress = this;
spits out the error that contract is not implicitly convertible to expected type