Created
May 18, 2019 20:56
-
-
Save samcamwilliams/20e5b593ab797f917e84eaad5c3fb272 to your computer and use it in GitHub Desktop.
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.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