Created
January 31, 2019 19:15
-
-
Save nachinius/6cccd373665bd8e0dbbd20f0598c8511 to your computer and use it in GitHub Desktop.
/** * Can receive money. * Can be stolen. * Non payable at address. */
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pragma solidity 0.5.3; | |
| /** | |
| * Can receive money. | |
| * Can be stolen. | |
| * Non payable at address. | |
| */ | |
| contract Alfa { | |
| function stealMyEth() public { | |
| address myAddress = address(this); | |
| msg.sender.transfer(myAddress.balance); | |
| } | |
| event Received(uint amount, address benefactor); | |
| function receive() payable public { | |
| emit Received(msg.value, msg.sender); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment