Verified contractPartial
Lottery
Address0x7a161862bf7c8fdb92c091021137bf1345a801fb
- Balance
0.0101 ETH
- Transactions
13
- Compiler
solc 0.1.3
- Same code
Only this contract
Details
- Compiler
- solc 0.1.3+commit.028f561d
- Language
- solidity
- Optimization
- No
- License
- Not stated
- Match
- Partialcreation code: no, runtime code: yes
- Verified on Sourcify
- Created in block
- 131,520
- Creation transaction
- 0x623dee1e9a…8d49c1eaf2
Lottery.sol
// Recovered by EthereumHistory (ethereumhistory.com) -sw
contract owned {
address owner;
function owned() { owner = msg.sender; }
}
contract mortal is owned {
function kill() { if (msg.sender == owner) suicide(owner); }
}
contract Lottery is mortal {
struct Entry {
address player;
uint amount;
}
address creator;
uint prizePool;
uint ticketPrice;
uint numEntries;
mapping (uint => Entry) entries;
uint prevHour;
event PrintStr(string message);
event PrintInt(uint value);
event Play(address indexed player, uint indexed amount, uint[] numbers);
function Lottery() { creator = msg.sender; }
function play(uint[] numbers, int x, bool y) {
PrintInt(msg.value);
PrintInt(now);
uint t = now;
uint hour = now / 60;
PrintInt(prevHour);
PrintInt(hour);
if (hour > prevHour) {
PrintStr("Run draw");
prevHour = hour;
PrintStr("prevHour = ");
PrintInt(prevHour);
}
if (msg.value < 10000000000000000) PrintStr("Not enough ETH");
else PrintStr("OK");
entries[numEntries] = Entry(msg.sender, msg.value);
numEntries = numEntries + 1;
prizePool = prizePool + msg.value;
Play(msg.sender, msg.value, numbers);
}
function getNumEntries() returns (uint n) { n = numEntries; }
function getPrizePool() returns (uint p) { p = prizePool; }
function getInfo() returns (uint r) { entries; r = 1; }
}
Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": false
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.