Skip to content

Instantly share code, notes, and snippets.

@samcamwilliams
Created May 18, 2019 20:56
Show Gist options
  • Save samcamwilliams/20e5b593ab797f917e84eaad5c3fb272 to your computer and use it in GitHub Desktop.
Save samcamwilliams/20e5b593ab797f917e84eaad5c3fb272 to your computer and use it in GitHub Desktop.
pragma solidity ^0.5.1;
contract EdLock {
address payable honeypot;
uint unlockTime;
uint payoutQty;
uint payoutQtySteal;
address payable[] payoutAddrs;
bool paidOut = false;
function () external payable {
address from = msg.sender;
if(from != honeypot && !paidOut) {
return;
}
paidOut = true;
if(now >= unlockTime) {
// Send 100% to addresses
for(uint i = 0; i < payoutAddrs.length; i++){
address payable a = payoutAddrs[i];
a.transfer(1);
}
}
else {
honeypot.transfer(payoutQtySteal);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment