3 ms·
Looks like the winner gets precisely 0: // The winner is responsible for withdrawing the funds // after the button expires function Win() public {
by grapehut 9y ago
Looks like the winner gets precisely 0:
// The winner is responsible for withdrawing the funds
// after the button expires
function Win() public {
require(msg.sender == winner);
require(now > deadline);
reward = 0;
winner.transfer(reward);
}
- masterspy7 9y agoOh god, I messed up horribly. Will refund everyone who paid
- Ocha 9y agoThis is so funny.
- Analemma_ 9y agoNo, no, don’t refund anyone! Code is Law. They knew what they were doing when they donated; refunding them would be moral hazard.
- masterspy7 9y agoFixed the contract and will refund anyone who clicked on the old contract
- leijurv 9y agoMaybe put something on the site saying "Don't send anymore this contract is literally a black hole"
- leijurv 9y agoPeople are still sending money to it. https://etherscan.io/tx/0xfe36f95a77f64251a2d4d6a6f38b2058c9eccaaa1fb5d8004086d0d4b4c1dc9e https://etherscan.io/tx/0xfe36f95a77f64251a2d4d6a6f38b2058c9... https://etherscan.io/tx/0x763e247b776b0437ca08e08deb7dfdc4638d26391d2b29f890ffe0a7708c53cc https://etherscan.io/tx/0x763e247b776b0437ca08e08deb7dfdc463...
- Tepix 9y agoDid you not test it on the testnet?
- Ocha 9y agoNot sure how function calls in ETH Smart Contracts but what prevents someone calling Countdown() function and extending by 3 hours?
- mmozeiko 9y agoIts a "constructor". It is called only once when contract is deployed to blockchain.
- Ocha 9y agoMakes sense. Thanks
- supermdguy 9y agoLike mmozeiko said, it will only get called once. If it got called again, it would deploy a completely new instance of the contract.
- croddin 9y agoAnd the tips can't be withdrawn either. All the money stays in the contract? function withdrawTips() public { // The owner can only withdraw the tips tips = 0; owner.transfer(tips); }
- masterspy7 9y agoYea, all the money is gone forever... :( I added that code in last minute and wasn't even thinking when I did it.
- GenericsMotors 9y agoAaaand this is why code-as-law is a shit idea.