Contract Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 95 txns
Misc:
Address Watch: Add To Watch List
Contract Creator: 0x54dd50c94ac1e7770e5cd382fe7910e19d55d92cat txn 0x31ed2773699f802334f4052617a193074d35b2f4e50c381acd824ce7114704f7
 Latest 25 transactions from a total of 95 transactions

TxHash Age From To Value [TxFee]
0x3ed27832c7aedf3fa0a44bc03ae4b1c6de9c1eabb59e5b6606d25f1bf8df77c1107 days 5 hrs ago0xad4b1774f0c051aaece4402370f1b340809ff64b  IN   0x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether0.0009534
0xefb3f84e6a7b384367d5e43d178d75e5c6feba25bdf084c449eaa32ba4e0409e108 days 4 hrs ago0xe044a3d2b55644fba736c298b9dccb94e9566b2f  IN   0x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether0.0009534
0xbf25c55c2893976e9888f18875d9ecea2815d7652a00e8b22431dbee320ce43e108 days 4 hrs ago0xe044a3d2b55644fba736c298b9dccb94e9566b2f  IN   0x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether0.0009534
0x1a48d69a3810440d7f581f66e9beac41dc6b955f23a4be334329c947a303de63108 days 4 hrs ago0xe044a3d2b55644fba736c298b9dccb94e9566b2f  IN   0x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether0.0009534
0x80e67846936bc805ea321a8112a0377b22e481117103b754bea8e08ff5e7165f108 days 4 hrs ago0xe044a3d2b55644fba736c298b9dccb94e9566b2f  IN   0x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether0.0009534
0x74b94340473ebe261cdbc62398acf82c2d653d1b00c7265526466e08bcec3e01119 days 1 hr ago0x04ede35b1d51c0e814833887b2ddbb5d553070b6  IN   0x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether0.0009534
0x5adf4b02253e8614fd7635120a4f164045483be09ad01a3f39162fa56a153090120 days 18 hrs ago0xb13874b5bde62ee189c74f03e85f9c4d27cfa878  IN   0x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether0.0009534
0xbfd883807e434076a7f170c92b332130e37e5e4f55928e86f9bb95b051f40c53161 days 12 hrs ago0xccf34690b1112a769cd5cd9540f162c229720ba3  IN   0x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether0.0009534
0x972a78aacf2032cab70b2e522e392b8e87631df67cab02225134b459c2dee565186 days 6 hrs ago0xf8b10e7fb3e8ad489831d8dfd253a54d70d149c1  IN   0x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether0.0009534
0xcc26c0a91782ffc68802a23a00ba640bad4d87a590af2405f89258c4677cb8a1210 days 6 hrs ago0x9bcdb1b3650106f8b4d281b5ced8eb2f75889f50  IN   0x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether0.0016734
0x64a4534a424965dbfa62e80c101922ce78a329b72b248d15f49fda0fe9606bea246 days 10 hrs ago0x253d21c683702bc7cc6749d73deba3bed751b218  IN   0x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether0.0009534
0x139638b84b71b973daa7f340836a90c5271d043475206bb9b520707da377cc3f249 days 3 hrs ago0x62c57477cad5328d14c472a189b06241afdf9ed0  IN   0x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether0.0009534
0x62fca0d3041d8fccc14a0cc7d6cbbbce39aa13cefc2a3ad5ad78bb1966152ce9249 days 3 hrs ago0x62c57477cad5328d14c472a189b06241afdf9ed0  IN   0x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether0.0009534
0xeb4993075fe3e398cd3550076757d49ce4ed58ef1b0d05bc4b6f703043449acf251 days 14 hrs ago0xa9f826d6852842709112b8ac569f11bf9c991e56  IN   0x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether0.0009534
0xb5989cb8d3d3c43f6f5d77a45d5fbc40c596f91cecc71629b70b6f95c1f49f6e252 days 8 hrs ago0xc16bc02d24a1b2c305628363b54a03af5b31af88  IN   0x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether0.0016734
0x95c7b72f095c3712e6979be75eec4c6c62405936c10d4be68f308826867078e5263 days 23 hrs ago0x2f82d63c1291a960eeeb2c3a30ce089831fe0098  IN   0x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether0.0009534
0x672b721d6eea9d4272384b6529bfe897b7b55c2407ffa5074635cd98b44b5e31270 days 19 hrs ago0xa25f05e1ac13dfc31b0ba86b14b0f5bc349002a0  IN   0x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether0.0009534
0xc25e7c7c23de30af86e60ed396b776de89578e1988a671e1df80f9b876fcf200288 days 11 hrs ago0x64db7d95ab1a35709913a9dabe1662b62d6a8eec  IN   0x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether0.0016734
0x06a35f68b21ca209c7c54d9ed205797ddd61d925488f3d256936abd0ebfd6016305 days 14 hrs ago0xc949e242a450cf57ea08a65d29463c8c7d8cccde  IN   0x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether0.000198625
0xb37163e2d47771efc6ef62c926783be3c36a5bacc4ba4ac887ed1db13ad9e91a305 days 14 hrs ago0xc949e242a450cf57ea08a65d29463c8c7d8cccde  IN   0x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether0.000119175
0xf611cab04b0f347eef9b35341d71542a24283aa7e014f961fcb9af2a3eda7eab307 days 14 hrs ago0x483e188ad144611eee1be127b5f730cd618319f7  IN   0x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether0.00013945
0x37f9321fbf4c3ae0fcda2a13c28425323cc9049a91e72c5f87e337aa2fd80330309 days 2 hrs ago0xa2b1875bbdf7d0e3599533b9fb1f74b642778bc2  IN   0x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether0.000049977
0x7c801b1309f0a97ca8ce8684503247eedc1aba6087186fefdfc5e6f89c9abae4309 days 2 hrs ago0xa2b1875bbdf7d0e3599533b9fb1f74b642778bc2  IN   0x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether0.000039725
0x922ec7f6019e696af95c6575e8c8828eca1151e865bbe8d93e71b7b1b577cf4a309 days 2 hrs ago0xa2b1875bbdf7d0e3599533b9fb1f74b642778bc2  IN   0x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether0.000039725
0x7d2b0fee7bf864fea7c9fd81ef399ac40c83d952866bf9891e286ace3e999bf6309 days 2 hrs ago0xa2b1875bbdf7d0e3599533b9fb1f74b642778bc2  IN   0x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether0.000039725
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 25 Internal Txns, Click here To View More View All
ParentTxHash Block Age From To Value
0xbe0f51d93b978dadbb7ac9c7268418453396f64775d929aad12d81305c2d36396271258103 days 20 hrs ago0x1e217adc6a6adc16e248af109ab7efa4d1bb252d0x4185ea7c616d4b8c0d2827a005a570e85bd875880.180386 Ether
0xbe0f51d93b978dadbb7ac9c7268418453396f64775d929aad12d81305c2d36396271258103 days 20 hrs ago0x1e217adc6a6adc16e248af109ab7efa4d1bb252d0x54dd50c94ac1e7770e5cd382fe7910e19d55d92c0.011514 Ether
0xbe0f51d93b978dadbb7ac9c7268418453396f64775d929aad12d81305c2d36396271258103 days 20 hrs ago0x4185ea7c616d4b8c0d2827a005a570e85bd875880x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether
0xbe0f51d93b978dadbb7ac9c7268418453396f64775d929aad12d81305c2d36396271258103 days 20 hrs ago0x4185ea7c616d4b8c0d2827a005a570e85bd875880x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether
0xbe0f51d93b978dadbb7ac9c7268418453396f64775d929aad12d81305c2d36396271258103 days 20 hrs ago0x4185ea7c616d4b8c0d2827a005a570e85bd875880x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether
0xbe0f51d93b978dadbb7ac9c7268418453396f64775d929aad12d81305c2d36396271258103 days 20 hrs ago0x4185ea7c616d4b8c0d2827a005a570e85bd875880x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether
0xbe0f51d93b978dadbb7ac9c7268418453396f64775d929aad12d81305c2d36396271258103 days 20 hrs ago0x4185ea7c616d4b8c0d2827a005a570e85bd875880x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether
0xbe0f51d93b978dadbb7ac9c7268418453396f64775d929aad12d81305c2d36396271258103 days 20 hrs ago0x4185ea7c616d4b8c0d2827a005a570e85bd875880x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether
0xbe0f51d93b978dadbb7ac9c7268418453396f64775d929aad12d81305c2d36396271258103 days 20 hrs ago0x4185ea7c616d4b8c0d2827a005a570e85bd875880x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether
0xbe0f51d93b978dadbb7ac9c7268418453396f64775d929aad12d81305c2d36396271258103 days 20 hrs ago0x4185ea7c616d4b8c0d2827a005a570e85bd875880x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether
0xbe0f51d93b978dadbb7ac9c7268418453396f64775d929aad12d81305c2d36396271258103 days 20 hrs ago0x4185ea7c616d4b8c0d2827a005a570e85bd875880x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether
0xc600029a59fd0c16c650fcc7b8b9d3beb4181d2d360faca80d5098cc79825e926271252103 days 20 hrs ago0x4185ea7c616d4b8c0d2827a005a570e85bd875880x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether
0xc600029a59fd0c16c650fcc7b8b9d3beb4181d2d360faca80d5098cc79825e926271252103 days 20 hrs ago0x4185ea7c616d4b8c0d2827a005a570e85bd875880x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether
0xc600029a59fd0c16c650fcc7b8b9d3beb4181d2d360faca80d5098cc79825e926271252103 days 20 hrs ago0x4185ea7c616d4b8c0d2827a005a570e85bd875880x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether
0xc600029a59fd0c16c650fcc7b8b9d3beb4181d2d360faca80d5098cc79825e926271252103 days 20 hrs ago0x4185ea7c616d4b8c0d2827a005a570e85bd875880x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether
0xc600029a59fd0c16c650fcc7b8b9d3beb4181d2d360faca80d5098cc79825e926271252103 days 20 hrs ago0x4185ea7c616d4b8c0d2827a005a570e85bd875880x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether
0xc600029a59fd0c16c650fcc7b8b9d3beb4181d2d360faca80d5098cc79825e926271252103 days 20 hrs ago0x4185ea7c616d4b8c0d2827a005a570e85bd875880x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether
0x5ac366dc462bb6f1e1150dc434611d99317651ce6f8f4fb37260d84197348ff75522042232 days 18 hrs ago0x1e217adc6a6adc16e248af109ab7efa4d1bb252d0x4185ea7c616d4b8c0d2827a005a570e85bd875880.170892 Ether
0x5ac366dc462bb6f1e1150dc434611d99317651ce6f8f4fb37260d84197348ff75522042232 days 18 hrs ago0x1e217adc6a6adc16e248af109ab7efa4d1bb252d0x54dd50c94ac1e7770e5cd382fe7910e19d55d92c0.010908 Ether
0x5ac366dc462bb6f1e1150dc434611d99317651ce6f8f4fb37260d84197348ff75522042232 days 18 hrs ago0x4185ea7c616d4b8c0d2827a005a570e85bd875880x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether
0x5ac366dc462bb6f1e1150dc434611d99317651ce6f8f4fb37260d84197348ff75522042232 days 18 hrs ago0x4185ea7c616d4b8c0d2827a005a570e85bd875880x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether
0x5ac366dc462bb6f1e1150dc434611d99317651ce6f8f4fb37260d84197348ff75522042232 days 18 hrs ago0x4185ea7c616d4b8c0d2827a005a570e85bd875880x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether
0x5ac366dc462bb6f1e1150dc434611d99317651ce6f8f4fb37260d84197348ff75522042232 days 18 hrs ago0x4185ea7c616d4b8c0d2827a005a570e85bd875880x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether
0x5ac366dc462bb6f1e1150dc434611d99317651ce6f8f4fb37260d84197348ff75522042232 days 18 hrs ago0x4185ea7c616d4b8c0d2827a005a570e85bd875880x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether
0x5ac366dc462bb6f1e1150dc434611d99317651ce6f8f4fb37260d84197348ff75522042232 days 18 hrs ago0x4185ea7c616d4b8c0d2827a005a570e85bd875880x1e217adc6a6adc16e248af109ab7efa4d1bb252d0.0101 Ether
[ Download CSV Export  ] 
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity), NestedArrayFunctionCallDecoder (medium-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: LottoCount
Compiler Text: v0.4.19+commit.c4cbbb05
Optimization Enabled: No
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.19;
contract LottoCount {
 
    //CONSTANT
    uint256 private maxTickets;
    uint256 public ticketPrice; 
     
    //LOTO REGISTER
    uint256 public lottoIndex;
    uint256 lastTicketTime;
    
    //LOTTO VARIABLES
	uint8 _direction;
    uint256 numtickets;
    uint256 totalBounty;
    
    address worldOwner;   
     
    event NewTicket(address indexed fromAddress, bool success);
    event LottoComplete(address indexed fromAddress, uint indexed lottoIndex, uint256 reward);
    
    /// Create a new Lotto
    function LottoCount() public 
    {
        worldOwner = msg.sender; 
        
        ticketPrice = 0.0101 * 10**18;
        maxTickets = 10;
        
		_direction = 0;
        lottoIndex = 1;
        lastTicketTime = 0;
        
        numtickets = 0;
        totalBounty = 0;
    }

    
    function getBalance() public view returns (uint256 balance)
    {
        balance = 0;
        
        if(worldOwner == msg.sender) balance = this.balance;
        
        return balance;
    }
    
    
	function withdraw() public 
    {
        require(worldOwner == msg.sender);  
        
		//reset values
        lottoIndex += 1;
        numtickets = 0;
        totalBounty = 0;
		
		worldOwner.transfer(this.balance); 
    }
    
    
    function getLastTicketTime() public view returns (uint256 time)
    {
        time = lastTicketTime; 
        return time;
    }
    
	
    function AddTicket() public payable 
    {
        require(msg.value == ticketPrice); 
        require(numtickets < maxTickets);
        
		//update bif
		lastTicketTime = now;
        numtickets += 1;
        totalBounty += ticketPrice;
        bool success = numtickets == maxTickets;
		
        NewTicket(msg.sender, success);
        
		//check if winner
        if(success) 
        {
            PayWinner(msg.sender);
        } 
    }
    
    
    function PayWinner( address winner ) private 
    { 
        require(numtickets == maxTickets);
        
		//calc reward
        uint ownerTax = 6 * totalBounty / 100;
        uint winnerPrice = totalBounty - ownerTax;
        
        LottoComplete(msg.sender, lottoIndex, winnerPrice);
         
		//reset values
        lottoIndex += 1;
        numtickets = 0;
        totalBounty = 0;
		
		//change max tickets to give unpredictability
		if(_direction == 0 && maxTickets < 20) maxTickets += 1;
		if(_direction == 1 && maxTickets > 10) maxTickets -= 1;
		
		if(_direction == 0 && maxTickets == 20) _direction = 1;
		if(_direction == 1 && maxTickets == 10) _direction = 0;
         
		//give real money
        worldOwner.transfer(ownerTax);
        winner.transfer(winnerPrice); 
    }
}

    Contract ABI  
[{"constant":true,"inputs":[],"name":"getBalance","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ticketPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getLastTicketTime","outputs":[{"name":"time","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"lottoIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"AddTicket","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"fromAddress","type":"address"},{"indexed":false,"name":"success","type":"bool"}],"name":"NewTicket","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"fromAddress","type":"address"},{"indexed":true,"name":"lottoIndex","type":"uint256"},{"indexed":false,"name":"reward","type":"uint256"}],"name":"LottoComplete","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6060604052341561000f57600080fd5b33600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506623e1e5803b4000600181905550600a6000819055506000600460006101000a81548160ff021916908360ff16021790555060016002819055506000600381905550600060058190555060006006819055506105fe806100b16000396000f300606060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806312065fe01461007d5780631209b1f6146100a657806319c97154146100cf5780633ccfd60b146100f85780637a15eb8d1461010d578063b204bb5d14610136575b600080fd5b341561008857600080fd5b610090610140565b6040518082815260200191505060405180910390f35b34156100b157600080fd5b6100b96101bc565b6040518082815260200191505060405180910390f35b34156100da57600080fd5b6100e26101c2565b6040518082815260200191505060405180910390f35b341561010357600080fd5b61010b6101cf565b005b341561011857600080fd5b6101206102c7565b6040518082815260200191505060405180910390f35b61013e6102cd565b005b60008090503373ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156101b6573073ffffffffffffffffffffffffffffffffffffffff163190505b80905090565b60015481565b6000600354905080905090565b3373ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561022b57600080fd5b600160026000828254019250508190555060006005819055506000600681905550600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f1935050505015156102c557600080fd5b565b60025481565b6000600154341415156102df57600080fd5b6000546005541015156102f157600080fd5b4260038190555060016005600082825401925050819055506001546006600082825401925050819055506000546005541490503373ffffffffffffffffffffffffffffffffffffffff167f23de19158786940de5dda06fd0b7b6cb38f4a275de8e5aa97841291762e9892c82604051808215151515815260200191505060405180910390a280156103865761038533610389565b5b50565b60008060005460055414151561039e57600080fd5b60646006546006028115156103af57fe5b049150816006540390506002543373ffffffffffffffffffffffffffffffffffffffff167fdc5dff36369474a27c3e9316fd6e5682d3eed3a3c023aa2a2ebcb553c954d387836040518082815260200191505060405180910390a36001600260008282540192505081905550600060058190555060006006819055506000600460009054906101000a900460ff1660ff1614801561044f57506014600054105b1561046557600160008082825401925050819055505b6001600460009054906101000a900460ff1660ff161480156104895750600a600054115b1561049f57600160008082825403925050819055505b6000600460009054906101000a900460ff1660ff161480156104c357506014600054145b156104e5576001600460006101000a81548160ff021916908360ff1602179055505b6001600460009054906101000a900460ff1660ff161480156105095750600a600054145b1561052b576000600460006101000a81548160ff021916908360ff1602179055505b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050151561058d57600080fd5b8273ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015156105cd57600080fd5b5050505600a165627a7a723058204f3aafdb4c86bdf6b5ddc27377128219d73853d9cc9b6b3ae0a9e6a4bed756de0029

   Swarm Source:
bzzr://4f3aafdb4c86bdf6b5ddc27377128219d73853d9cc9b6b3ae0a9e6a4bed756de

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.