Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Transactions Sent
Latest:
N/A
First:
N/A
Latest 11 from a total of 11 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Kill | 5051073 | 2460 days ago | IN | 0 ETH | 0.00006749 | ||||
Participate | 5050454 | 2460 days ago | IN | 0.1 ETH | 0.00047756 | ||||
Participate | 5050390 | 2460 days ago | IN | 0.1 ETH | 0.00047756 | ||||
Participate | 5049091 | 2460 days ago | IN | 0.1 ETH | 0.00093238 | ||||
Force Reseed | 5047910 | 2460 days ago | IN | 0 ETH | 0.00114033 | ||||
Transfer | 5047883 | 2460 days ago | IN | 0.9 ETH | 0.00008416 | ||||
Force Reseed | 5047875 | 2460 days ago | IN | 0 ETH | 0.00114033 | ||||
Force Reseed | 5047866 | 2460 days ago | IN | 0 ETH | 0.00116822 | ||||
Participate | 5047858 | 2460 days ago | IN | 0.1 ETH | 0.00112193 | ||||
Participate | 5047851 | 2460 days ago | IN | 0.1 ETH | 0.00047756 | ||||
0x60606040 | 5047816 | 2460 days ago | IN | 0 ETH | 0.00036372 |
Loading...
Loading
Contract Self Destruct called at Txn Hash 0x5ec4cec8799c8f42f7d9a54c0596041ffb2434ea0ee30041d079cd5f019b8988
Contract Name:
AddressLottery
Compiler Version
v0.4.19+commit.c4cbbb05
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2018-02-07 */ pragma solidity ^0.4.0; /* * This is a distributed lottery that chooses random addresses as lucky addresses. If these * participate, they get the jackpot: the whole balance of the contract, including the ticket * price. Of course one address can only win once. The owner regularly reseeds the secret * seed of the contract (based on which the lucky addresses are chosen), so if you did not win, * just wait for a reseed and try again! Contract addresses cannot play for obvious reasons. * * Ticket price: 0.1 ETH * Jackpot chance: 1 in 8 * * To participate, send 0.10 ETH to the contract with data "d11711a2" */ contract AddressLottery{ struct SeedComponents{ uint component1; uint component2; uint component3; uint component4; } address owner; uint private secretSeed; uint private lastReseed; uint winnerLuckyNumber = 7; mapping (address => bool) participated; function AddressLottery() { owner = msg.sender; reseed(SeedComponents(12345678, 0x12345678, 0xabbaeddaacdc, 0x22222222)); } modifier onlyOwner() { require(msg.sender == owner); _; } modifier onlyHuman() { require(msg.sender == tx.origin); _; } function participate() payable onlyHuman { require(msg.value == 0.1 ether); // every address can only win once, obviously require(!participated[msg.sender]); if ( luckyNumberOfAddress(msg.sender) == winnerLuckyNumber) { participated[msg.sender] = true; require(msg.sender.call.value(this.balance)()); } } function luckyNumberOfAddress(address addr) constant returns(uint n){ // 1 in 8 chance n = uint(keccak256(uint(addr), secretSeed)[0]) % 8; } function reseed(SeedComponents components) internal{ secretSeed = uint256(keccak256( components.component1, components.component2, components.component3, components.component4 )); lastReseed = block.number; } function kill() onlyOwner { suicide(owner); } function forceReseed() onlyOwner{ SeedComponents s; s.component1 = uint(msg.sender); s.component2 = uint256(block.blockhash(block.number - 1)); s.component3 = block.number * 1337; s.component4 = tx.gasprice * 7; reseed(s); } function () payable {} // DEBUG, DELETE BEFORE DEPLOYMENT!! function _myLuckyNumber() constant returns(uint n){ n = luckyNumberOfAddress(msg.sender); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[{"name":"addr","type":"address"}],"name":"luckyNumberOfAddress","outputs":[{"name":"n","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"kill","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"_myLuckyNumber","outputs":[{"name":"n","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"forceReseed","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"participate","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"}]
Contract Creation Code
60606040526007600355341561001457600080fd5b60008054600160a060020a03191633600160a060020a03161790556100766080604051908101604090815262bc614e82526312345678602083015265abbaeddaacdc90820152632222222260608201526401000000006102d661007b82021704565b6100c1565b8051816020015182604001518360600151604051808581526020018481526020018381526020018281526020019450505050506040519081900390206001555043600255565b610348806100d06000396000f30060606040526004361061006c5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166337354a68811461006e57806341c0e1b51461009f57806345e29057146100b257806380ca7aec146100c5578063d11711a2146100d8575b005b341561007957600080fd5b61008d600160a060020a03600435166100e0565b60405190815260200160405180910390f35b34156100aa57600080fd5b61006c610161565b34156100bd57600080fd5b61008d61018a565b34156100d057600080fd5b61006c61019a565b61006c61021b565b6000600882600160a060020a031660015460405191825260208201526040908101905190819003902060001a7f0100000000000000000000000000000000000000000000000000000000000000027f0100000000000000000000000000000000000000000000000000000000000000900481151561015a57fe5b0692915050565b60005433600160a060020a0390811691161461017c57600080fd5b600054600160a060020a0316ff5b6000610195336100e0565b905090565b6000805433600160a060020a039081169116146101b657600080fd5b33600160a060020a031681554360001981014060018301556105390260028201553a60070260038201556102188160806040519081016040908152825482526001830154602083015260028301549082015260039091015460608201526102d6565b50565b32600160a060020a031633600160a060020a031614151561023b57600080fd5b67016345785d8a0000341461024f57600080fd5b600160a060020a03331660009081526004602052604090205460ff161561027557600080fd5b600354610281336100e0565b14156102d457600160a060020a0333811660008181526004602052604090819020805460ff191660011790559091301631905160006040518083038185876187965a03f19250505015156102d457600080fd5b565b80518160200151826040015183606001516040518085815260200184815260200183815260200182815260200194505050505060405190819003902060015550436002555600a165627a7a72305820cc99ecc27ddf9ab6f3de49cdab76d7854405f2feacfa778e65b61cba854232f80029
Deployed Bytecode
0x60606040526004361061006c5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166337354a68811461006e57806341c0e1b51461009f57806345e29057146100b257806380ca7aec146100c5578063d11711a2146100d8575b005b341561007957600080fd5b61008d600160a060020a03600435166100e0565b60405190815260200160405180910390f35b34156100aa57600080fd5b61006c610161565b34156100bd57600080fd5b61008d61018a565b34156100d057600080fd5b61006c61019a565b61006c61021b565b6000600882600160a060020a031660015460405191825260208201526040908101905190819003902060001a7f0100000000000000000000000000000000000000000000000000000000000000027f0100000000000000000000000000000000000000000000000000000000000000900481151561015a57fe5b0692915050565b60005433600160a060020a0390811691161461017c57600080fd5b600054600160a060020a0316ff5b6000610195336100e0565b905090565b6000805433600160a060020a039081169116146101b657600080fd5b33600160a060020a031681554360001981014060018301556105390260028201553a60070260038201556102188160806040519081016040908152825482526001830154602083015260028301549082015260039091015460608201526102d6565b50565b32600160a060020a031633600160a060020a031614151561023b57600080fd5b67016345785d8a0000341461024f57600080fd5b600160a060020a03331660009081526004602052604090205460ff161561027557600080fd5b600354610281336100e0565b14156102d457600160a060020a0333811660008181526004602052604090819020805460ff191660011790559091301631905160006040518083038185876187965a03f19250505015156102d457600080fd5b565b80518160200151826040015183606001516040518085815260200184815260200183815260200182815260200194505050505060405190819003902060015550436002555600a165627a7a72305820cc99ecc27ddf9ab6f3de49cdab76d7854405f2feacfa778e65b61cba854232f80029
Swarm Source
bzzr://cc99ecc27ddf9ab6f3de49cdab76d7854405f2feacfa778e65b61cba854232f8
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.