Overview
ETH Balance
0.217961390380859379 ETH
Eth Value
$759.63 (@ $3,485.14/ETH)More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 251 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Claim Winnings | 14541101 | 992 days ago | IN | 0 ETH | 0.00655305 | ||||
Dev Withdraw | 14541100 | 992 days ago | IN | 0 ETH | 0.00177797 | ||||
Claim Winnings | 9477994 | 1775 days ago | IN | 0 ETH | 0.00020308 | ||||
Dev Withdraw | 9477994 | 1775 days ago | IN | 0 ETH | 0.00004315 | ||||
Claim Winnings | 8911148 | 1871 days ago | IN | 0 ETH | 0.00031076 | ||||
Bid | 8846712 | 1881 days ago | IN | 0.001 ETH | 0.00211668 | ||||
Bid | 8832056 | 1883 days ago | IN | 0.001 ETH | 0.00011103 | ||||
Claim Winnings | 8832056 | 1883 days ago | IN | 0 ETH | 0.00003565 | ||||
Claim Winnings | 8829193 | 1884 days ago | IN | 0 ETH | 0.0000448 | ||||
Bid | 8829186 | 1884 days ago | IN | 0.001 ETH | 0.00042595 | ||||
Bid | 8799155 | 1889 days ago | IN | 0.001 ETH | 0.00018691 | ||||
Claim Winnings | 8799155 | 1889 days ago | IN | 0 ETH | 0.00010715 | ||||
Dev Withdraw | 8799151 | 1889 days ago | IN | 0 ETH | 0.00002828 | ||||
Claim Winnings | 8616596 | 1917 days ago | IN | 0 ETH | 0.00143571 | ||||
Dev Withdraw | 8616593 | 1917 days ago | IN | 0 ETH | 0.00046167 | ||||
Bid | 6041762 | 2342 days ago | IN | 0.001 ETH | 0.00096038 | ||||
Bid | 6041762 | 2342 days ago | IN | 0.001 ETH | 0.00212978 | ||||
Bid | 6041760 | 2342 days ago | IN | 0.001 ETH | 0.00015 | ||||
Bid | 6034242 | 2343 days ago | IN | 0.001 ETH | 0.00038415 | ||||
Bid | 6034242 | 2343 days ago | IN | 0.001 ETH | 0.00012428 | ||||
Bid | 6033759 | 2343 days ago | IN | 0.001 ETH | 0.00050786 | ||||
Bid | 6032268 | 2343 days ago | IN | 0.001 ETH | 0.00062144 | ||||
Bid | 6031734 | 2343 days ago | IN | 0.001 ETH | 0.00016119 | ||||
Claim Winnings | 6031718 | 2343 days ago | IN | 0 ETH | 0.00011201 | ||||
Bid | 6031716 | 2343 days ago | IN | 0.001 ETH | 0.00062144 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
14541101 | 992 days ago | 0.00537078 ETH | ||||
14541101 | 992 days ago | 0.00141041 ETH | ||||
14541101 | 992 days ago | 0.00012019 ETH | ||||
9477994 | 1775 days ago | 0.01074156 ETH | ||||
9477994 | 1775 days ago | 0.00282083 ETH | ||||
9477994 | 1775 days ago | 0.00024038 ETH | ||||
9477994 | 1775 days ago | 0.00004 ETH | ||||
8911148 | 1871 days ago | 0.02148312 ETH | ||||
8911148 | 1871 days ago | 0.00564166 ETH | ||||
8911148 | 1871 days ago | 0.00048076 ETH | ||||
8846712 | 1881 days ago | 0.04264625 ETH | ||||
8846712 | 1881 days ago | 0.01096333 ETH | ||||
8846712 | 1881 days ago | 0.00064153 ETH | ||||
8832056 | 1883 days ago | 0.00095974 ETH | ||||
8829186 | 1884 days ago | 0.02127666 ETH | ||||
8829186 | 1884 days ago | 0.00159282 ETH | ||||
8799155 | 1889 days ago | 0.0843125 ETH | ||||
8799155 | 1889 days ago | 0.04222333 ETH | ||||
8799155 | 1889 days ago | 0.00285565 ETH | ||||
8616596 | 1917 days ago | 0.168625 ETH | ||||
8616596 | 1917 days ago | 0.08444666 ETH | ||||
8616596 | 1917 days ago | 0.0057113 ETH | ||||
8616593 | 1917 days ago | 0.0002 ETH | ||||
6041762 | 2342 days ago | 0.16835666 ETH | ||||
6041762 | 2342 days ago | 0.01088593 ETH |
Loading...
Loading
Contract Name:
RandoLotto
Compiler Version
v0.4.24+commit.e67f0147
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2018-07-26 */ pragma solidity 0.4.24; // Random lottery // Smart contracts can't bet // Pay 0.001 to get a random number // If your random number is the highest so far you're in the lead // If no one beats you in 1 day you can claim your winnnings - half of the pot. // Three pots total - hour long, day long, and week long. // Successfully getting the highest value on one of them resets only that one. // When you bet, you bet for ALL THREE pots. (each is a different random number) contract RandoLotto { bool activated; address internal owner; uint256 internal devFee; uint256 internal seed; uint256 public totalBids; // Three pots uint256 public hourPot; uint256 public dayPot; uint256 public weekPot; // Each put has a current winner address public hourPotLeader; address public dayPotLeader; address public weekPotLeader; // Each pot has a current high score uint256 public hourPotHighscore; uint256 public dayPotHighscore; uint256 public weekPotHighscore; // Each pot has an expiration - reset when someone else takes leader of that pot uint256 public hourPotExpiration; uint256 public dayPotExpiration; uint256 public weekPotExpiration; struct threeUints { uint256 a; uint256 b; uint256 c; } mapping (address => threeUints) playerLastScores; modifier onlyOwner { require(msg.sender == owner); _; } constructor () public { owner = msg.sender; activated = false; totalBids = 0; hourPotHighscore = 0; dayPotHighscore = 0; weekPotHighscore = 0; hourPotLeader = msg.sender; dayPotLeader = msg.sender; weekPotLeader = msg.sender; } function activate() public payable onlyOwner { require(!activated); require(msg.value >= 0 ether); hourPotExpiration = now + 1 hours; dayPotExpiration = now + 1 days; weekPotExpiration = now + 1 weeks; hourPot = msg.value / 3; dayPot = msg.value / 3; weekPot = msg.value - hourPot - dayPot; activated = true; } // Fallback function calls bid. function () public payable { bid(); } // Bid function. function bid() public payable returns (uint256, uint256, uint256) { // Humans only unlike F3D require(msg.sender == tx.origin); require(msg.value == 0.001 ether); checkRoundEnd(); // Add monies to pot devFee = devFee + (msg.value / 100); uint256 toAdd = msg.value - devFee; hourPot = hourPot + (toAdd / 3); dayPot = dayPot + (toAdd / 3); weekPot = weekPot + (toAdd - ((toAdd/3) + (toAdd/3))); // Random number via blockhash seed = uint256(keccak256(blockhash(block.number - 1), seed, now)); uint256 seed1 = seed; if (seed > hourPotHighscore) { hourPotLeader = msg.sender; hourPotExpiration = now + 1 hours; hourPotHighscore = seed; } seed = uint256(keccak256(blockhash(block.number - 1), seed, now)); uint256 seed2 = seed; if (seed > dayPotHighscore) { dayPotLeader = msg.sender; dayPotExpiration = now + 1 days; dayPotHighscore = seed; } seed = uint256(keccak256(blockhash(block.number - 1), seed, now)); uint256 seed3 = seed; if (seed > weekPotHighscore) { weekPotLeader = msg.sender; weekPotExpiration = now + 1 weeks; weekPotHighscore = seed; } totalBids++; playerLastScores[msg.sender] = threeUints(seed1, seed2, seed3); return (seed1, seed2, seed3); } function checkRoundEnd() internal { if (now > hourPotExpiration) { uint256 hourToSend = hourPot / 2; hourPot = hourPot - hourToSend; hourPotLeader.transfer(hourToSend); hourPotLeader = msg.sender; hourPotHighscore = 0; hourPotExpiration = now + 1 hours; } if (now > dayPotExpiration) { uint256 dayToSend = dayPot / 2; dayPot = dayPot - dayToSend; dayPotLeader.transfer(dayToSend); dayPotLeader = msg.sender; dayPotHighscore = 0; dayPotExpiration = now + 1 days; } if (now > weekPotExpiration) { uint256 weekToSend = weekPot / 2; weekPot = weekPot - weekToSend; weekPotLeader.transfer(weekToSend); weekPotLeader = msg.sender; weekPotHighscore = 0; weekPotExpiration = now + 1 weeks; } } function claimWinnings() public { checkRoundEnd(); } function getMyLastScore() public view returns (uint256, uint256, uint256) { return (playerLastScores[msg.sender].a, playerLastScores[msg.sender].b, playerLastScores[msg.sender].c); } function devWithdraw() public onlyOwner { uint256 toSend = devFee; devFee = 0; owner.transfer(toSend); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[],"name":"dayPot","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"hourPot","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"activate","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"dayPotLeader","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"bid","outputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"getMyLastScore","outputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dayPotHighscore","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"hourPotLeader","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"weekPotExpiration","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalBids","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"weekPot","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"weekPotHighscore","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"devWithdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"claimWinnings","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"hourPotHighscore","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dayPotExpiration","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"hourPotExpiration","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"weekPotLeader","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"}]
Contract Creation Code
608060405234801561001057600080fd5b506000805461010060a860020a0319163361010081029190911760ff191682556003829055600a829055600b829055600c82905560078054600160a060020a03199081168317909155600880548216831790556009805490911690911790556107fe90819061007f90396000f3006080604052600436106100fb5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663032ccf3381146101085780630ea662ea1461012f5780630f15f4c014610144578063123601511461014e5780631998aeef1461017f5780634be04fd9146101a557806362797ef5146101ba5780637b563e3a146101cf5780637d736d0d146101e45780638b034136146101f9578063a03260401461020e578063a0e06c8a14610223578063ad606c7214610238578063b401faf11461024d578063be9f2dc014610262578063e95f641414610277578063f3afe1291461028c578063fa6140dd146102a1575b6101036102b6565b505050005b34801561011457600080fd5b5061011d6104c7565b60408051918252519081900360200190f35b34801561013b57600080fd5b5061011d6104cd565b61014c6104d3565b005b34801561015a57600080fd5b5061016361054f565b60408051600160a060020a039092168252519081900360200190f35b6101876102b6565b60408051938452602084019290925282820152519081900360600190f35b3480156101b157600080fd5b5061018761055e565b3480156101c657600080fd5b5061011d61057e565b3480156101db57600080fd5b50610163610584565b3480156101f057600080fd5b5061011d610593565b34801561020557600080fd5b5061011d610599565b34801561021a57600080fd5b5061011d61059f565b34801561022f57600080fd5b5061011d6105a5565b34801561024457600080fd5b5061014c6105ab565b34801561025957600080fd5b5061014c610615565b34801561026e57600080fd5b5061011d61061f565b34801561028357600080fd5b5061011d610625565b34801561029857600080fd5b5061011d61062b565b3480156102ad57600080fd5b50610163610631565b60008080808080803332146102ca57600080fd5b66038d7ea4c6800034146102dd57600080fd5b6102e5610640565b6001805460643490810490910191829055039350600384046004540160048190555060038481151561031357fe5b046005540160058190555060038481151561032a57fe5b04600385600680549290910492909201860301905560028054604080516000194301408152602081019290925242828201525190819003606001902090819055600a549093508311156103a5576007805473ffffffffffffffffffffffffffffffffffffffff191633179055610e104201600d55600254600a555b60028054604080516000194301408152602081019290925242828201525190819003606001902090819055600b5490925082111561040c576008805473ffffffffffffffffffffffffffffffffffffffff191633179055620151804201600e55600254600b555b5060028054604080516000194301408152602081019290925242828201525190819003606001902090819055600c54811115610471576009805473ffffffffffffffffffffffffffffffffffffffff19163317905562093a804201600f55600254600c555b600380546001908101909155604080516060810182528581526020808201868152828401868152336000908152601090935293909120915182555192810192909255516002909101559195509350915050909192565b60055481565b60045481565b6000546101009004600160a060020a031633146104ef57600080fd5b60005460ff16156104ff57600080fd5b600034101561050d57600080fd5b42610e108101600d55620151808101600e5562093a8001600f55600334046004556003340460058190556004543403036006556000805460ff19166001179055565b600854600160a060020a031681565b336000908152601060205260409020805460018201546002909201549092565b600b5481565b600754600160a060020a031681565b600f5481565b60035481565b60065481565b600c5481565b600080546101009004600160a060020a031633146105c857600080fd5b506001805460009182905581546040519192610100909104600160a060020a0316916108fc84150291849190818181858888f19350505050158015610611573d6000803e3d6000fd5b5050565b61061d610640565b565b600a5481565b600e5481565b600d5481565b600954600160a060020a031681565b6000806000600d544211156106c757600480546002810490819003909155600754604051919450600160a060020a0316906108fc8515029085906000818181858888f19350505050158015610699573d6000803e3d6000fd5b506007805473ffffffffffffffffffffffffffffffffffffffff1916331790556000600a55610e104201600d555b600e5442111561074a57600580546002810490819003909155600854604051919350600160a060020a0316906108fc8415029084906000818181858888f1935050505015801561071b573d6000803e3d6000fd5b506008805473ffffffffffffffffffffffffffffffffffffffff1916331790556000600b55620151804201600e555b600f544211156107cd5750600680546002810490819003909155600954604051600160a060020a03909116906108fc8315029083906000818181858888f1935050505015801561079e573d6000803e3d6000fd5b506009805473ffffffffffffffffffffffffffffffffffffffff1916331790556000600c5562093a804201600f555b5050505600a165627a7a7230582031ea800f327384cf2fea4d6fa3740e514062df1715b4149bef5765da16241a5d0029
Deployed Bytecode
0x6080604052600436106100fb5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663032ccf3381146101085780630ea662ea1461012f5780630f15f4c014610144578063123601511461014e5780631998aeef1461017f5780634be04fd9146101a557806362797ef5146101ba5780637b563e3a146101cf5780637d736d0d146101e45780638b034136146101f9578063a03260401461020e578063a0e06c8a14610223578063ad606c7214610238578063b401faf11461024d578063be9f2dc014610262578063e95f641414610277578063f3afe1291461028c578063fa6140dd146102a1575b6101036102b6565b505050005b34801561011457600080fd5b5061011d6104c7565b60408051918252519081900360200190f35b34801561013b57600080fd5b5061011d6104cd565b61014c6104d3565b005b34801561015a57600080fd5b5061016361054f565b60408051600160a060020a039092168252519081900360200190f35b6101876102b6565b60408051938452602084019290925282820152519081900360600190f35b3480156101b157600080fd5b5061018761055e565b3480156101c657600080fd5b5061011d61057e565b3480156101db57600080fd5b50610163610584565b3480156101f057600080fd5b5061011d610593565b34801561020557600080fd5b5061011d610599565b34801561021a57600080fd5b5061011d61059f565b34801561022f57600080fd5b5061011d6105a5565b34801561024457600080fd5b5061014c6105ab565b34801561025957600080fd5b5061014c610615565b34801561026e57600080fd5b5061011d61061f565b34801561028357600080fd5b5061011d610625565b34801561029857600080fd5b5061011d61062b565b3480156102ad57600080fd5b50610163610631565b60008080808080803332146102ca57600080fd5b66038d7ea4c6800034146102dd57600080fd5b6102e5610640565b6001805460643490810490910191829055039350600384046004540160048190555060038481151561031357fe5b046005540160058190555060038481151561032a57fe5b04600385600680549290910492909201860301905560028054604080516000194301408152602081019290925242828201525190819003606001902090819055600a549093508311156103a5576007805473ffffffffffffffffffffffffffffffffffffffff191633179055610e104201600d55600254600a555b60028054604080516000194301408152602081019290925242828201525190819003606001902090819055600b5490925082111561040c576008805473ffffffffffffffffffffffffffffffffffffffff191633179055620151804201600e55600254600b555b5060028054604080516000194301408152602081019290925242828201525190819003606001902090819055600c54811115610471576009805473ffffffffffffffffffffffffffffffffffffffff19163317905562093a804201600f55600254600c555b600380546001908101909155604080516060810182528581526020808201868152828401868152336000908152601090935293909120915182555192810192909255516002909101559195509350915050909192565b60055481565b60045481565b6000546101009004600160a060020a031633146104ef57600080fd5b60005460ff16156104ff57600080fd5b600034101561050d57600080fd5b42610e108101600d55620151808101600e5562093a8001600f55600334046004556003340460058190556004543403036006556000805460ff19166001179055565b600854600160a060020a031681565b336000908152601060205260409020805460018201546002909201549092565b600b5481565b600754600160a060020a031681565b600f5481565b60035481565b60065481565b600c5481565b600080546101009004600160a060020a031633146105c857600080fd5b506001805460009182905581546040519192610100909104600160a060020a0316916108fc84150291849190818181858888f19350505050158015610611573d6000803e3d6000fd5b5050565b61061d610640565b565b600a5481565b600e5481565b600d5481565b600954600160a060020a031681565b6000806000600d544211156106c757600480546002810490819003909155600754604051919450600160a060020a0316906108fc8515029085906000818181858888f19350505050158015610699573d6000803e3d6000fd5b506007805473ffffffffffffffffffffffffffffffffffffffff1916331790556000600a55610e104201600d555b600e5442111561074a57600580546002810490819003909155600854604051919350600160a060020a0316906108fc8415029084906000818181858888f1935050505015801561071b573d6000803e3d6000fd5b506008805473ffffffffffffffffffffffffffffffffffffffff1916331790556000600b55620151804201600e555b600f544211156107cd5750600680546002810490819003909155600954604051600160a060020a03909116906108fc8315029083906000818181858888f1935050505015801561079e573d6000803e3d6000fd5b506009805473ffffffffffffffffffffffffffffffffffffffff1916331790556000600c5562093a804201600f555b5050505600a165627a7a7230582031ea800f327384cf2fea4d6fa3740e514062df1715b4149bef5765da16241a5d0029
Swarm Source
bzzr://31ea800f327384cf2fea4d6fa3740e514062df1715b4149bef5765da16241a5d
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | Ether (ETH) | 100.00% | $3,482.25 | 0.218 | $759 |
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.