ETH Price: $3,058.63 (+1.14%)
Gas: 3 Gwei

Contract

0xa00cCf3183578DEBdc2Ad2368BdD1D85633EC614
 

Overview

ETH Balance

118 wei

Eth Value

Less Than $0.01 (@ $3,058.63/ETH)

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Transfer70078682019-01-04 8:05:012013 days ago1546589101IN
0xa00cCf31...5633EC614
0 ETH0.0008921715
Transfer70073942019-01-04 5:58:202013 days ago1546581500IN
0xa00cCf31...5633EC614
0 ETH0.000101062
Transfer70036902019-01-03 13:56:422014 days ago1546523802IN
0xa00cCf31...5633EC614
0 ETH0.0005947810
Transfer70036812019-01-03 13:54:312014 days ago1546523671IN
0xa00cCf31...5633EC614
0 ETH0.000505310
Transfer70032102019-01-03 11:59:172014 days ago1546516757IN
0xa00cCf31...5633EC614
0 ETH0.0005947810
Transfer70022552019-01-03 7:55:082014 days ago1546502108IN
0xa00cCf31...5633EC614
0 ETH0.000057562
Transfer69990882019-01-02 18:36:202015 days ago1546454180IN
0xa00cCf31...5633EC614
0 ETH0.000065421.1
Transfer69987022019-01-02 17:09:442015 days ago1546448984IN
0xa00cCf31...5633EC614
0 ETH0.000594310
Transfer69929132019-01-01 17:38:392016 days ago1546364319IN
0xa00cCf31...5633EC614
0 ETH0.001010620
Transfer69925172019-01-01 16:07:542016 days ago1546358874IN
0xa00cCf31...5633EC614
0 ETH0.0014869525
Transfer69924522019-01-01 15:55:272016 days ago1546358127IN
0xa00cCf31...5633EC614
0 ETH0.000178433
0x98873e4369923222019-01-01 15:20:492016 days ago1546356049IN
0xa00cCf31...5633EC614
0 ETH0.000157973
Transfer69911952019-01-01 10:48:572016 days ago1546339737IN
0xa00cCf31...5633EC614
0 ETH0.000151593
Transfer69909822019-01-01 9:52:292016 days ago1546336349IN
0xa00cCf31...5633EC614
0 ETH0.000044832
Transfer69909332019-01-01 9:39:562016 days ago1546335596IN
0xa00cCf31...5633EC614
0 ETH0.000151593
Transfer69907622019-01-01 8:58:282016 days ago1546333108IN
0xa00cCf31...5633EC614
0 ETH0.000252655
Transfer69906982019-01-01 8:38:412016 days ago1546331921IN
0xa00cCf31...5633EC614
0 ETH0.000297395
Transfer69906702019-01-01 8:31:302016 days ago1546331490IN
0xa00cCf31...5633EC614
0 ETH0.0024385941
Transfer69906682019-01-01 8:30:502016 days ago1546331450IN
0xa00cCf31...5633EC614
0 ETH0.000303186
Transfer69906272019-01-01 8:19:582016 days ago1546330798IN
0xa00cCf31...5633EC614
0 ETH0.0024385941
Transfer69906142019-01-01 8:16:192016 days ago1546330579IN
0xa00cCf31...5633EC614
0 ETH0.000252655
Transfer69903642019-01-01 7:07:192016 days ago1546326439IN
0xa00cCf31...5633EC614
0 ETH0.000202124
Transfer69894942019-01-01 3:27:452016 days ago1546313265IN
0xa00cCf31...5633EC614
0 ETH0.0034635941
Transfer69887292019-01-01 0:29:462016 days ago1546302586IN
0xa00cCf31...5633EC614
0 ETH0.003803924
Transfer69887242019-01-01 0:27:512016 days ago1546302471IN
0xa00cCf31...5633EC614
0 ETH0.00220594
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To Value
70078682019-01-04 8:05:012013 days ago1546589101
0xa00cCf31...5633EC614
0.26161473 ETH
70078682019-01-04 8:05:012013 days ago1546589101
0xa00cCf31...5633EC614
3.33330105 ETH
70073942019-01-04 5:58:202013 days ago1546581500
0xa00cCf31...5633EC614
0.05081871 ETH
70036902019-01-03 13:56:422014 days ago1546523802
0xa00cCf31...5633EC614
0.16282315 ETH
70036902019-01-03 13:56:422014 days ago1546523802
0xa00cCf31...5633EC614
1.82012304 ETH
70036812019-01-03 13:54:312014 days ago1546523671
0xa00cCf31...5633EC614
0.05081871 ETH
70032102019-01-03 11:59:172014 days ago1546516757
0xa00cCf31...5633EC614
0.12806315 ETH
70032102019-01-03 11:59:172014 days ago1546516757
0xa00cCf31...5633EC614
0.66470877 ETH
69990882019-01-02 18:36:202015 days ago1546454180
0xa00cCf31...5633EC614
0.44639157 ETH
69990882019-01-02 18:36:202015 days ago1546454180
0xa00cCf31...5633EC614
2.1412973 ETH
69987022019-01-02 17:09:442015 days ago1546448984
0xa00cCf31...5633EC614
0.03476 ETH
69987022019-01-02 17:09:442015 days ago1546448984
0xa00cCf31...5633EC614
0.13904 ETH
69929132019-01-01 17:38:392016 days ago1546364319
0xa00cCf31...5633EC614
0.05081871 ETH
69925172019-01-01 16:07:542016 days ago1546358874
0xa00cCf31...5633EC614
0.06403157 ETH
69925172019-01-01 16:07:542016 days ago1546358874
0xa00cCf31...5633EC614
0.71349473 ETH
69924522019-01-01 15:55:272016 days ago1546358127
0xa00cCf31...5633EC614
0.19209473 ETH
69924522019-01-01 15:55:272016 days ago1546358127
0xa00cCf31...5633EC614
1.7339345 ETH
69923222019-01-01 15:20:492016 days ago1546356049
0xa00cCf31...5633EC614
0.05081871 ETH
69911952019-01-01 10:48:572016 days ago1546339737
0xa00cCf31...5633EC614
0.15245614 ETH
69909332019-01-01 9:39:562016 days ago1546335596
0xa00cCf31...5633EC614
0.05081871 ETH
69907622019-01-01 8:58:282016 days ago1546333108
0xa00cCf31...5633EC614
0.05081871 ETH
69906982019-01-01 8:38:412016 days ago1546331921
0xa00cCf31...5633EC614
0.06403157 ETH
69906982019-01-01 8:38:412016 days ago1546331921
0xa00cCf31...5633EC614
0.45940116 ETH
69906702019-01-01 8:31:302016 days ago1546331490
0xa00cCf31...5633EC614
0.06403157 ETH
69906702019-01-01 8:31:302016 days ago1546331490
0xa00cCf31...5633EC614
0.71349473 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SmartLotto

Compiler Version
v0.4.25+commit.59dbf8f1

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2018-12-13
*/

pragma solidity ^0.4.25;

/**
 *
 * SmartLotto.in
 *
 * Fair lottery smart contract with random determination of winning tickets
 *
 *
 * 1 ticket is jackpot winning ticket and get 10% of the contract balance
 * 5 tickets are first prize winnings tickets and get 5% of the contract balance
 * 10% of all tickets are second prize winners and get 35% of the contract balance
 * all other tickets receive 50% refund of the ticket price
 *
 *
 * 5% for referral program - use Add Data field and fill it with ETH-address of your upline when you buy tickets
 *
 *
 * 1 ticket price is 0.1 ETH, you can buy 250 tickets per 1 transaction maximum (250 tickets = 25 ETH)
 * You can make more transactions and purhase more tickets to increase your winning chances
 *
 * Use 200000 of gas limit when you buy tickets, check current gas price on https://ethgasstation.info
 *
 * Good luck!
 *
 */


contract SmartLotto {
    using SafeMath for uint256;

    uint256 constant public TICKET_PRICE = 0.1 ether;        // price of 1 ticket is 0.1 ETH
    uint256 constant public MAX_TICKETS_PER_TX = 250;        // max tickets amount per 1 transaction

    uint256 constant public JACKPOT_WINNER = 1;              // jackpot go to 1 ticket winners
    uint256 constant public FIRST_PRIZE_WINNERS = 5;         // first prize go to 5 tickets winners
    uint256 constant public SECOND_PRIZE_WINNERS_PERC = 10;  // percent of the second prize ticket winners

    uint256 constant public JACKPOT_PRIZE = 10;              // jackpot winner take 10% of balance
    uint256 constant public FIRST_PRIZE_POOL = 5;            // first prize winners takes 5% of balance
    uint256 constant public SECOND_PRIZE_POOL = 35;          // second prize winners takes 35% of balance

    uint256 constant public REFERRAL_COMMISSION = 5;         // referral commission 5% from input
    uint256 constant public MARKETING_COMMISSION = 10;       // marketing commission 10% from input
    uint256 constant public WINNINGS_COMMISSION = 20;        // winnings commission 20% from winnings

    uint256 constant public PERCENTS_DIVIDER = 100;          // percents divider, 100%

    uint256 constant public CLOSE_TICKET_SALES = 1546297200; // 23:00:00 31th of December 2018 GMT
    uint256 constant public LOTTERY_DRAW_START = 1546300800; // 00:00:00 1th of January 2019 GMT
    uint256 constant public PAYMENTS_END_TIME = 1554076800;  // 00:00:00 1th of April 2019 GMT

    uint256 public playersCount = 0;                         // participated players counter
    uint256 public ticketsCount = 0;                         // buyed tickets counter

    uint256 public jackpotPrize = 0;                         // jackpot win amount per ticket
    uint256 public firstPrize = 0;                           // first prize win amount per ticket
    uint256 public secondPrize = 0;                          // second prize win amount per ticket
    uint256 public secondPrizeWonTickets = 0;                // second prize win tickets amount
    uint256 public wonTicketsAmount = 0;                     // total amount of won tickets
    uint256 public participantsMoneyPool = 0;                // money pool returned to participants
    uint256 public participantsTicketPrize = 0;              // amount returned per 1 ticket

    uint256 public ticketsCalculated = 0;                    // won tickets calculated counter

    uint256 public salt = 0;                                 // salt for random generator

    bool public calculationsDone;                            // flag true when all calculations finished

    address constant public MARKETING_ADDRESS = 0xFD527958E10C546f8b484135CC51fa9f0d3A8C5f;
    address constant public COMMISSION_ADDRESS = 0x53434676E12A4eE34a4eC7CaBEBE9320e8b836e1;


    struct Player {
        uint256 ticketsCount;
        uint256[] ticketsPacksBuyed;
        uint256 winnings;
        uint256 wonTicketsCount;
        uint256 payed;
    }

    struct TicketsBuy {
        address player;
        uint256 ticketsAmount;
    }

	struct TicketsWon {
		uint256 won;
    }

    mapping (address => Player) public players;
    mapping (uint256 => TicketsBuy) public ticketsBuys;
	mapping (uint256 => TicketsWon) public ticketsWons;


    function() public payable {
        if (msg.value >= TICKET_PRICE) {
            buyTickets();
        } else {
            if (!calculationsDone) {
                makeCalculations(50);
            } else {
                payPlayers();
            }
        }
    }


    function buyTickets() private {
        // require time now less than or equal to 23:00:00 31th of December 2018 GMT
        require(now <= CLOSE_TICKET_SALES);

        // save msg.value
        uint256 msgValue = msg.value;

        // load player msg.sender
        Player storage player = players[msg.sender];

        // if new player add to total players stats
        if (player.ticketsCount == 0) {
            playersCount++;
        }

        // count amount of tickets which can be bought
        uint256 ticketsAmount = msgValue.div(TICKET_PRICE);

        // if tickets more than MAX_TICKETS_PER_TX (250 tickets)
        if (ticketsAmount > MAX_TICKETS_PER_TX) {
            // use MAX_TICKETS_PER_TX (250 tickets)
            ticketsAmount = MAX_TICKETS_PER_TX;
        }

		// count overpayed amount by player
		uint256 overPayed = msgValue.sub(ticketsAmount.mul(TICKET_PRICE));

		// if player overpayed
		if (overPayed > 0) {
			// update msgValue for futher calculations
			msgValue = msgValue.sub(overPayed);

			// send to player overpayed amount
			msg.sender.send(overPayed);
		}

        // add bought tickets pack to array with id of current tickets amount
        player.ticketsPacksBuyed.push(ticketsCount);

        // create new TicketsBuy record
        // creating only one record per MAX_TICKETS_PER_TX (250 tickets)
        // to avoid high gas usage when players buy tickets
        ticketsBuys[ticketsCount] = TicketsBuy({
            player : msg.sender,
            ticketsAmount : ticketsAmount
        });

		// add bought tickets to player stats
        player.ticketsCount = player.ticketsCount.add(ticketsAmount);
        // update bought tickets counter
        ticketsCount = ticketsCount.add(ticketsAmount);

        // try get ref address from tx data
        address referrerAddress = bytesToAddress(msg.data);

        // if ref address not 0 and not msg.sender
        if (referrerAddress != address(0) && referrerAddress != msg.sender) {
            // count ref amount
            uint256 referralAmount = msgValue.mul(REFERRAL_COMMISSION).div(PERCENTS_DIVIDER);
            // send ref amount
            referrerAddress.send(referralAmount);
        }

        // count marketing amount
        uint256 marketingAmount = msgValue.mul(MARKETING_COMMISSION).div(PERCENTS_DIVIDER);
        // send marketing amount
        MARKETING_ADDRESS.send(marketingAmount);
    }

    function makeCalculations(uint256 count) public {
        // require calculations not done
        require(!calculationsDone);
        // require time now more than or equal to 00:00:00 1st of January 2019 GMT
        require(now >= LOTTERY_DRAW_START);

        // if salt not counted
        if (salt == 0) {
            // create random salt which depends on blockhash, count of tickets and count of players
            salt = uint256(keccak256(abi.encodePacked(ticketsCount, uint256(blockhash(block.number-1)), playersCount)));

            // get actual contract balance
            uint256 contractBalance = address(this).balance;

            // count and save jackpot win amount per ticket
            jackpotPrize = contractBalance.mul(JACKPOT_PRIZE).div(PERCENTS_DIVIDER).div(JACKPOT_WINNER);
            // count and save first prize win amount per ticket
            firstPrize = contractBalance.mul(FIRST_PRIZE_POOL).div(PERCENTS_DIVIDER).div(FIRST_PRIZE_WINNERS);

            // count and save second prize win tickets amount
            secondPrizeWonTickets = ticketsCount.mul(SECOND_PRIZE_WINNERS_PERC).div(PERCENTS_DIVIDER);
            // count and save second prize win amount per ticket
            secondPrize = contractBalance.mul(SECOND_PRIZE_POOL).div(PERCENTS_DIVIDER).div(secondPrizeWonTickets);

            // count and save how many tickets won
            wonTicketsAmount = secondPrizeWonTickets.add(JACKPOT_WINNER).add(FIRST_PRIZE_WINNERS);

            // count and save money pool returned to participants
            participantsMoneyPool = contractBalance.mul(PERCENTS_DIVIDER.sub(JACKPOT_PRIZE).sub(FIRST_PRIZE_POOL).sub(SECOND_PRIZE_POOL)).div(PERCENTS_DIVIDER);
            // count and save participants prize per ticket
            participantsTicketPrize = participantsMoneyPool.div(ticketsCount.sub(wonTicketsAmount));

            // proceed jackpot prize ticket winnings
            calculateWonTickets(JACKPOT_WINNER, jackpotPrize);
            // proceed first prize tickets winnings
            calculateWonTickets(FIRST_PRIZE_WINNERS, firstPrize);

            // update calculated tickets counter
            ticketsCalculated = ticketsCalculated.add(JACKPOT_WINNER).add(FIRST_PRIZE_WINNERS);
        // if salt already counted
        } else {
            // if calculations of second prize winners not yet finished
            if (ticketsCalculated < wonTicketsAmount) {
                // how many tickets not yet calculated
                uint256 ticketsForCalculation = wonTicketsAmount.sub(ticketsCalculated);

                // if count zero and tickets for calculations more than 50
                // than calculate 50 tickets to avoid gas cost more than block limit
                if (count == 0 && ticketsForCalculation > 50) {
                    ticketsForCalculation = 50;
                }

                // if count more than zero and count less than amount of not calculated tickets
                // than use count as amount of tickets for calculations
                if (count > 0 && count <= ticketsForCalculation) {
                    ticketsForCalculation = count;
                }

                // proceed second prize ticket winnings
                calculateWonTickets(ticketsForCalculation, secondPrize);

                // update calculated tickets counter
                ticketsCalculated = ticketsCalculated.add(ticketsForCalculation);
            }

            // if calculations of second prize winners finished set calculations done
            if (ticketsCalculated == wonTicketsAmount) {
                calculationsDone = true;
            }
        }
    }

    function calculateWonTickets(uint256 numbers, uint256 prize) private {
        // for all numbers in var make calculations
        for (uint256 n = 0; n < numbers; n++) {
            // get random generated won ticket number
            uint256 wonTicketNumber = random(n);

			// if ticket already won
			if (ticketsWons[wonTicketNumber].won == 1) {
				// than add 1 ticket to numbers
				numbers = numbers.add(1);
			// ticket not won yet
			} else {
				// mark ticket as won
				ticketsWons[wonTicketNumber].won = 1;

				// search player record to add ticket winnings
				for (uint256 i = 0; i < MAX_TICKETS_PER_TX; i++) {
					// search max MAX_TICKETS_PER_TX (250 tickets)
					uint256 wonTicketIdSearch = wonTicketNumber - i;

					// if player record found
					if (ticketsBuys[wonTicketIdSearch].ticketsAmount > 0) {
						// read player from storage
						Player storage player = players[ticketsBuys[wonTicketIdSearch].player];

						// add ticket prize amount to player winnings
						player.winnings = player.winnings.add(prize);
						// update user won tickets counter
						player.wonTicketsCount++;

						// player found so stop searching
						break;
					}
				}
			}
        }

        // update salt and add numbers amount
        salt = salt.add(numbers);
    }

    function payPlayers() private {
        // require calculations are done
        require(calculationsDone);

        // pay players if time now less than 00:00:00 1st of April 2019 GMT
        if (now <= PAYMENTS_END_TIME) {
            // read player record
            Player storage player = players[msg.sender];

            // if player have won tickets and not yet payed
            if (player.winnings > 0 && player.payed == 0) {
                // count winnings commission from player won amount
                uint256 winCommission = player.winnings.mul(WINNINGS_COMMISSION).div(PERCENTS_DIVIDER);

                // count amount of not won tickets
                uint256 notWonTickets = player.ticketsCount.sub(player.wonTicketsCount);
                // count return amount for not won tickets
                uint256 notWonAmount = notWonTickets.mul(participantsTicketPrize);

                // update player payed winnings
                player.payed = player.winnings.add(notWonAmount);

                // send total winnings amount to player
                msg.sender.send(player.winnings.sub(winCommission).add(notWonAmount).add(msg.value));

                // send commission
                COMMISSION_ADDRESS.send(winCommission);
            }

            // if player have not won tickets and not yet payed
            if (player.winnings == 0 && player.payed == 0) {
                // count return amount for not won tickets
                uint256 returnAmount = player.ticketsCount.mul(participantsTicketPrize);

                // update player payed winnings
                player.payed = returnAmount;

                // send total winnings amount to player
                msg.sender.send(returnAmount.add(msg.value));
            }
        // if payment period already ended
        } else {
            // get actual contract balance
            uint256 contractBalance = address(this).balance;

            // actual contract balance more than zero
            if (contractBalance > 0) {
                // send contract balance to commission address
                COMMISSION_ADDRESS.send(contractBalance);
            }
        }
    }

    function random(uint256 nonce) private view returns (uint256) {
        // random number generated from salt plus nonce divided by total amount of tickets
        uint256 number = uint256(keccak256(abi.encodePacked(salt.add(nonce)))).mod(ticketsCount);
        return number;
    }

    function playerBuyedTicketsPacks(address player) public view returns (uint256[]) {
        return players[player].ticketsPacksBuyed;
    }

    function bytesToAddress(bytes data) private pure returns (address addr) {
        assembly {
            addr := mload(add(data, 0x14))
        }
    }
}


/**
 * @title SafeMath
 * @dev Math operations with safety checks that revert on error
 */
library SafeMath {
    /**
    * @dev Multiplies two numbers, reverts on overflow.
    */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b);

        return c;
    }

    /**
    * @dev Integer division of two numbers truncating the quotient, reverts on division by zero.
    */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
    * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).
    */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a);
        uint256 c = a - b;

        return c;
    }

    /**
    * @dev Adds two numbers, reverts on overflow.
    */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a);

        return c;
    }

    /**
    * @dev Divides two numbers and returns the remainder (unsigned integer modulo),
    * reverts when dividing by zero.
    */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b != 0);
        return a % b;
    }
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"PERCENTS_DIVIDER","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"secondPrizeWonTickets","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ticketsCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"TICKET_PRICE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"wonTicketsAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"WINNINGS_COMMISSION","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"calculationsDone","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ticketsCalculated","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"firstPrize","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SECOND_PRIZE_WINNERS_PERC","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"COMMISSION_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"ticketsWons","outputs":[{"name":"won","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"secondPrize","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"JACKPOT_PRIZE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"count","type":"uint256"}],"name":"makeCalculations","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"PAYMENTS_END_TIME","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"jackpotPrize","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"participantsTicketPrize","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"FIRST_PRIZE_WINNERS","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MARKETING_COMMISSION","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAX_TICKETS_PER_TX","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"ticketsBuys","outputs":[{"name":"player","type":"address"},{"name":"ticketsAmount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"LOTTERY_DRAW_START","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"JACKPOT_WINNER","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"REFERRAL_COMMISSION","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"playersCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"CLOSE_TICKET_SALES","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"salt","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"players","outputs":[{"name":"ticketsCount","type":"uint256"},{"name":"winnings","type":"uint256"},{"name":"wonTicketsCount","type":"uint256"},{"name":"payed","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"FIRST_PRIZE_POOL","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SECOND_PRIZE_POOL","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MARKETING_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"player","type":"address"}],"name":"playerBuyedTicketsPacks","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"participantsMoneyPool","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"payable":true,"stateMutability":"payable","type":"fallback"}]

6080604052600080556000600155600060025560006003556000600455600060055560006006556000600755600060085560006009556000600a5534801561004657600080fd5b5061103d806100566000396000f3006080604052600436106101ab5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166301c234a881146101e75780630d4a7db21461020e5780631644e7af146102235780631a95f15f146102385780631bd088531461024d5780631c083f6614610262578063212571351461027757806324f1e47a146102a05780632e98520c146102b5578063378037ee146102ca57806339b61d4e146102df57806339f9a096146103105780633d70bc52146103285780633d740287146102ca5780634592928f1461033d5780635430e9071461035557806354e537681461036a578063618424781461037f5780636a6e4cb0146103945780636d791984146102ca5780636ddfe339146103a95780637117eff2146103be57806393ab4985146103f95780639c5d5e981461040e578063a365f2a514610394578063a3f67d6d14610423578063aa2b1d1714610438578063bfa0b1331461044d578063e2eb41ff14610462578063e4682a4914610394578063e4bc379a146104a9578063e689c476146104be578063ef30e43e146104d3578063fdc1bcf114610544575b67016345785d8a000034106101c7576101c2610559565b6101e5565b600b5460ff1615156101dd576101c260326107ae565b6101e5610a52565b005b3480156101f357600080fd5b506101fc610c2a565b60408051918252519081900360200190f35b34801561021a57600080fd5b506101fc610c2f565b34801561022f57600080fd5b506101fc610c35565b34801561024457600080fd5b506101fc610c3b565b34801561025957600080fd5b506101fc610c47565b34801561026e57600080fd5b506101fc610c4d565b34801561028357600080fd5b5061028c610c52565b604080519115158252519081900360200190f35b3480156102ac57600080fd5b506101fc610c5b565b3480156102c157600080fd5b506101fc610c61565b3480156102d657600080fd5b506101fc610c67565b3480156102eb57600080fd5b506102f4610c6c565b60408051600160a060020a039092168252519081900360200190f35b34801561031c57600080fd5b506101fc600435610c84565b34801561033457600080fd5b506101fc610c96565b34801561034957600080fd5b506101e56004356107ae565b34801561036157600080fd5b506101fc610c9c565b34801561037657600080fd5b506101fc610ca4565b34801561038b57600080fd5b506101fc610caa565b3480156103a057600080fd5b506101fc610cb0565b3480156103b557600080fd5b506101fc610cb5565b3480156103ca57600080fd5b506103d6600435610cba565b60408051600160a060020a03909316835260208301919091528051918290030190f35b34801561040557600080fd5b506101fc610cdf565b34801561041a57600080fd5b506101fc610ce7565b34801561042f57600080fd5b506101fc610cec565b34801561044457600080fd5b506101fc610cf2565b34801561045957600080fd5b506101fc610cfa565b34801561046e57600080fd5b50610483600160a060020a0360043516610d00565b604080519485526020850193909352838301919091526060830152519081900360800190f35b3480156104b557600080fd5b506101fc610d27565b3480156104ca57600080fd5b506102f4610d2c565b3480156104df57600080fd5b506104f4600160a060020a0360043516610d44565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610530578181015183820152602001610518565b505050509050019250505060405180910390f35b34801561055057600080fd5b506101fc610db3565b6000808080808080635c2a9f7042111561057257600080fd5b336000908152600c6020526040902080543498509096501515610599576000805460010190555b6105b18767016345785d8a000063ffffffff610db916565b945060fa8511156105c15760fa94505b6105e96105dc8667016345785d8a000063ffffffff610de116565b889063ffffffff610e1616565b9350600084111561062457610604878563ffffffff610e1616565b604051909750339085156108fc029086906000818181858888f150505050505b600180548782018054808401825560009182526020808320909101929092556040805180820182523381528084018a815285548452600d90945291209051815473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039091161781559051910155855461069a9086610e2d565b86556001546106af908663ffffffff610e2d16565b60015560408051602036601f81018290048202830182019093528282526106e9926000918190840183828082843750610e3f945050505050565b9250600160a060020a0383161580159061070c5750600160a060020a0383163314155b1561075c57610733606461072789600563ffffffff610de116565b9063ffffffff610db916565b604051909250600160a060020a0384169083156108fc029084906000818181858888f150505050505b610772606461072789600a63ffffffff610de116565b60405190915073fd527958e10c546f8b484135cc51fa9f0d3a8c5f9082156108fc029083906000818181858888f1505050505050505050505050565b600b54600090819060ff16156107c357600080fd5b635c2aad804210156107d457600080fd5b600a5415156109be576001546001430340600190046000546040516020018084815260200183815260200182815260200193505050506040516020818303038152906040526040518082805190602001908083835b602083106108485780518252601f199092019160209182019101610829565b5181516020939093036101000a60001901801990911692169190911790526040519201829003909120600a90815530319550610894935060019250610727915060649082908790610de1565b6002556108af6005610727606481868463ffffffff610de116565b6003556001546108cd9060649061072790600a63ffffffff610de116565b60058190556108ea9061072760648186602363ffffffff610de116565b60045560058054610913919061090790600163ffffffff610e2d16565b9063ffffffff610e2d16565b6006556109506064610727610943602361093760058186600a63ffffffff610e1616565b9063ffffffff610e1616565b859063ffffffff610de116565b60075560065460015461097c9161096d919063ffffffff610e1616565b6007549063ffffffff610db916565b60085560025461098e90600190610e46565b61099b6005600354610e46565b6109b660056109076001600954610e2d90919063ffffffff16565b600955610a4d565b6006546009541015610a33576009546006546109df9163ffffffff610e1616565b9050821580156109ef5750603281115b156109f8575060325b600083118015610a085750808311155b15610a105750815b610a1c81600454610e46565b600954610a2f908263ffffffff610e2d16565b6009555b6006546009541415610a4d57600b805460ff191660011790555b505050565b600b546000908190819081908190819060ff161515610a7057600080fd5b635ca154804211610be557336000908152600c602052604081206002810154909750118015610aa157506004860154155b15610b7e57610ac3606461072760148960020154610de190919063ffffffff16565b60038701548754919650610add919063ffffffff610e1616565b9350610af460085485610de190919063ffffffff16565b6002870154909350610b0c908463ffffffff610e2d16565b6004870155600286015433906108fc90610b3690349061090790889082908c63ffffffff610e1616565b6040518115909202916000818181858888f150506040517353434676e12a4ee34a4ec7cabebe9320e8b836e1935088156108fc0292508891506000818181858888f150505050505b6002860154158015610b9257506004860154155b15610be0576008548654610bab9163ffffffff610de116565b600487018190559150336108fc610bc8843463ffffffff610e2d16565b6040518115909202916000818181858888f150505050505b610c22565b5030316000811115610c22576040517353434676e12a4ee34a4ec7cabebe9320e8b836e19082156108fc029083906000818181858888f150505050505b505050505050565b606481565b60055481565b60015481565b67016345785d8a000081565b60065481565b601481565b600b5460ff1681565b60095481565b60035481565b600a81565b7353434676e12a4ee34a4ec7cabebe9320e8b836e181565b600e6020526000908152604090205481565b60045481565b635ca1548081565b60025481565b60085481565b600581565b60fa81565b600d6020526000908152604090208054600190910154600160a060020a039091169082565b635c2aad8081565b600181565b60005481565b635c2a9f7081565b600a5481565b600c6020526000908152604090208054600282015460038301546004909301549192909184565b602381565b73fd527958e10c546f8b484135cc51fa9f0d3a8c5f81565b600160a060020a0381166000908152600c6020908152604091829020600101805483518184028101840190945280845260609392830182828015610da757602002820191906000526020600020905b815481526020019060010190808311610d93575b50505050509050919050565b60075481565b600080808311610dc857600080fd5b8284811515610dd357fe5b0490508091505b5092915050565b600080831515610df45760009150610dda565b50828202828482811515610e0457fe5b0414610e0f57600080fd5b9392505050565b60008083831115610e2657600080fd5b5050900390565b600082820183811015610e0f57600080fd5b6014015190565b6000808080805b86851015610f3157610e5e85610f50565b6000818152600e602052604090205490945060011415610e9057610e8987600163ffffffff610e2d16565b9650610f26565b6000848152600e602052604081206001905592505b60fa831015610f26578284036000818152600d60205260408120600101549193501015610f1b57506000818152600d6020908152604080832054600160a060020a03168352600c90915290206002810154610f06908763ffffffff610e2d16565b60028201556003810180546001019055610f26565b600190920191610ea5565b600190940193610e4d565b600a54610f44908863ffffffff610e2d16565b600a5550505050505050565b600080610e0f600154610f6e85600a54610e2d90919063ffffffff16565b604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b60208310610fbc5780518252601f199092019160209182019101610f9d565b5181516020939093036101000a6000190180199091169216919091179052604051920182900390912093925050610ff09050565b6000811515610ffe57600080fd5b818381151561100957fe5b0693925050505600a165627a7a72305820027035f1cf4c64362221647d73ae3f2922ae7247c4336411bd911817c32984420029

Deployed Bytecode

0x6080604052600436106101ab5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166301c234a881146101e75780630d4a7db21461020e5780631644e7af146102235780631a95f15f146102385780631bd088531461024d5780631c083f6614610262578063212571351461027757806324f1e47a146102a05780632e98520c146102b5578063378037ee146102ca57806339b61d4e146102df57806339f9a096146103105780633d70bc52146103285780633d740287146102ca5780634592928f1461033d5780635430e9071461035557806354e537681461036a578063618424781461037f5780636a6e4cb0146103945780636d791984146102ca5780636ddfe339146103a95780637117eff2146103be57806393ab4985146103f95780639c5d5e981461040e578063a365f2a514610394578063a3f67d6d14610423578063aa2b1d1714610438578063bfa0b1331461044d578063e2eb41ff14610462578063e4682a4914610394578063e4bc379a146104a9578063e689c476146104be578063ef30e43e146104d3578063fdc1bcf114610544575b67016345785d8a000034106101c7576101c2610559565b6101e5565b600b5460ff1615156101dd576101c260326107ae565b6101e5610a52565b005b3480156101f357600080fd5b506101fc610c2a565b60408051918252519081900360200190f35b34801561021a57600080fd5b506101fc610c2f565b34801561022f57600080fd5b506101fc610c35565b34801561024457600080fd5b506101fc610c3b565b34801561025957600080fd5b506101fc610c47565b34801561026e57600080fd5b506101fc610c4d565b34801561028357600080fd5b5061028c610c52565b604080519115158252519081900360200190f35b3480156102ac57600080fd5b506101fc610c5b565b3480156102c157600080fd5b506101fc610c61565b3480156102d657600080fd5b506101fc610c67565b3480156102eb57600080fd5b506102f4610c6c565b60408051600160a060020a039092168252519081900360200190f35b34801561031c57600080fd5b506101fc600435610c84565b34801561033457600080fd5b506101fc610c96565b34801561034957600080fd5b506101e56004356107ae565b34801561036157600080fd5b506101fc610c9c565b34801561037657600080fd5b506101fc610ca4565b34801561038b57600080fd5b506101fc610caa565b3480156103a057600080fd5b506101fc610cb0565b3480156103b557600080fd5b506101fc610cb5565b3480156103ca57600080fd5b506103d6600435610cba565b60408051600160a060020a03909316835260208301919091528051918290030190f35b34801561040557600080fd5b506101fc610cdf565b34801561041a57600080fd5b506101fc610ce7565b34801561042f57600080fd5b506101fc610cec565b34801561044457600080fd5b506101fc610cf2565b34801561045957600080fd5b506101fc610cfa565b34801561046e57600080fd5b50610483600160a060020a0360043516610d00565b604080519485526020850193909352838301919091526060830152519081900360800190f35b3480156104b557600080fd5b506101fc610d27565b3480156104ca57600080fd5b506102f4610d2c565b3480156104df57600080fd5b506104f4600160a060020a0360043516610d44565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610530578181015183820152602001610518565b505050509050019250505060405180910390f35b34801561055057600080fd5b506101fc610db3565b6000808080808080635c2a9f7042111561057257600080fd5b336000908152600c6020526040902080543498509096501515610599576000805460010190555b6105b18767016345785d8a000063ffffffff610db916565b945060fa8511156105c15760fa94505b6105e96105dc8667016345785d8a000063ffffffff610de116565b889063ffffffff610e1616565b9350600084111561062457610604878563ffffffff610e1616565b604051909750339085156108fc029086906000818181858888f150505050505b600180548782018054808401825560009182526020808320909101929092556040805180820182523381528084018a815285548452600d90945291209051815473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039091161781559051910155855461069a9086610e2d565b86556001546106af908663ffffffff610e2d16565b60015560408051602036601f81018290048202830182019093528282526106e9926000918190840183828082843750610e3f945050505050565b9250600160a060020a0383161580159061070c5750600160a060020a0383163314155b1561075c57610733606461072789600563ffffffff610de116565b9063ffffffff610db916565b604051909250600160a060020a0384169083156108fc029084906000818181858888f150505050505b610772606461072789600a63ffffffff610de116565b60405190915073fd527958e10c546f8b484135cc51fa9f0d3a8c5f9082156108fc029083906000818181858888f1505050505050505050505050565b600b54600090819060ff16156107c357600080fd5b635c2aad804210156107d457600080fd5b600a5415156109be576001546001430340600190046000546040516020018084815260200183815260200182815260200193505050506040516020818303038152906040526040518082805190602001908083835b602083106108485780518252601f199092019160209182019101610829565b5181516020939093036101000a60001901801990911692169190911790526040519201829003909120600a90815530319550610894935060019250610727915060649082908790610de1565b6002556108af6005610727606481868463ffffffff610de116565b6003556001546108cd9060649061072790600a63ffffffff610de116565b60058190556108ea9061072760648186602363ffffffff610de116565b60045560058054610913919061090790600163ffffffff610e2d16565b9063ffffffff610e2d16565b6006556109506064610727610943602361093760058186600a63ffffffff610e1616565b9063ffffffff610e1616565b859063ffffffff610de116565b60075560065460015461097c9161096d919063ffffffff610e1616565b6007549063ffffffff610db916565b60085560025461098e90600190610e46565b61099b6005600354610e46565b6109b660056109076001600954610e2d90919063ffffffff16565b600955610a4d565b6006546009541015610a33576009546006546109df9163ffffffff610e1616565b9050821580156109ef5750603281115b156109f8575060325b600083118015610a085750808311155b15610a105750815b610a1c81600454610e46565b600954610a2f908263ffffffff610e2d16565b6009555b6006546009541415610a4d57600b805460ff191660011790555b505050565b600b546000908190819081908190819060ff161515610a7057600080fd5b635ca154804211610be557336000908152600c602052604081206002810154909750118015610aa157506004860154155b15610b7e57610ac3606461072760148960020154610de190919063ffffffff16565b60038701548754919650610add919063ffffffff610e1616565b9350610af460085485610de190919063ffffffff16565b6002870154909350610b0c908463ffffffff610e2d16565b6004870155600286015433906108fc90610b3690349061090790889082908c63ffffffff610e1616565b6040518115909202916000818181858888f150506040517353434676e12a4ee34a4ec7cabebe9320e8b836e1935088156108fc0292508891506000818181858888f150505050505b6002860154158015610b9257506004860154155b15610be0576008548654610bab9163ffffffff610de116565b600487018190559150336108fc610bc8843463ffffffff610e2d16565b6040518115909202916000818181858888f150505050505b610c22565b5030316000811115610c22576040517353434676e12a4ee34a4ec7cabebe9320e8b836e19082156108fc029083906000818181858888f150505050505b505050505050565b606481565b60055481565b60015481565b67016345785d8a000081565b60065481565b601481565b600b5460ff1681565b60095481565b60035481565b600a81565b7353434676e12a4ee34a4ec7cabebe9320e8b836e181565b600e6020526000908152604090205481565b60045481565b635ca1548081565b60025481565b60085481565b600581565b60fa81565b600d6020526000908152604090208054600190910154600160a060020a039091169082565b635c2aad8081565b600181565b60005481565b635c2a9f7081565b600a5481565b600c6020526000908152604090208054600282015460038301546004909301549192909184565b602381565b73fd527958e10c546f8b484135cc51fa9f0d3a8c5f81565b600160a060020a0381166000908152600c6020908152604091829020600101805483518184028101840190945280845260609392830182828015610da757602002820191906000526020600020905b815481526020019060010190808311610d93575b50505050509050919050565b60075481565b600080808311610dc857600080fd5b8284811515610dd357fe5b0490508091505b5092915050565b600080831515610df45760009150610dda565b50828202828482811515610e0457fe5b0414610e0f57600080fd5b9392505050565b60008083831115610e2657600080fd5b5050900390565b600082820183811015610e0f57600080fd5b6014015190565b6000808080805b86851015610f3157610e5e85610f50565b6000818152600e602052604090205490945060011415610e9057610e8987600163ffffffff610e2d16565b9650610f26565b6000848152600e602052604081206001905592505b60fa831015610f26578284036000818152600d60205260408120600101549193501015610f1b57506000818152600d6020908152604080832054600160a060020a03168352600c90915290206002810154610f06908763ffffffff610e2d16565b60028201556003810180546001019055610f26565b600190920191610ea5565b600190940193610e4d565b600a54610f44908863ffffffff610e2d16565b600a5550505050505050565b600080610e0f600154610f6e85600a54610e2d90919063ffffffff16565b604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b60208310610fbc5780518252601f199092019160209182019101610f9d565b5181516020939093036101000a6000190180199091169216919091179052604051920182900390912093925050610ff09050565b6000811515610ffe57600080fd5b818381151561100957fe5b0693925050505600a165627a7a72305820027035f1cf4c64362221647d73ae3f2922ae7247c4336411bd911817c32984420029

Swarm Source

bzzr://027035f1cf4c64362221647d73ae3f2922ae7247c4336411bd911817c3298442

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.