i'm trying to store Ether inside a Contract and refund it when I call the function paypackEther(). Inside of the Remix IDE with the JavaScript VM it works perfectly, but when I execute it on Rinkeby with Mist, I can't get the stored ether. It's making me crazy...
What's my mistake?
pragma solidity ^0.4.24;
contract SimpleContract {
function () public payable {
}
constructor() payable public {
}
function paybackEther() public {
selfdestruct(msg.sender);
}
}
The contract adress is: 0x0b5933fd3D33F7d79C0e19e12A070fafA053Df57 https://rinkeby.etherscan.io/address/0x0b5933fd3d33f7d79c0e19e12a070fafa053df57
Thanks in advance :)
selfdestruct(msg.sender)
withmsg.sender.transfer(address(this).balance)
and say if it works?