Contract 0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f

Contract Overview

Balance:
0 MATIC
Txn Hash
Method
Block
From
To
Value [Txn Fee]
0xf97b15d9c7551bb44c3169171b3003ada913772d7d5a8cb3337eca4fca2bba53Withdraw Commiss...315633022023-01-30 8:45:3916 hrs 53 mins ago0x0e4440ba633985471c84a0dc7c66d80e8989459d IN  0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0 MATIC0.0000458355 1.500000016
0x5c0ab781d2af2d231efac3f472276b633b42aabf9e21489cec499baceeceffe2Withdraw Winning...315632972023-01-30 8:45:1916 hrs 54 mins ago0x0e4440ba633985471c84a0dc7c66d80e8989459d IN  0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0 MATIC0.0000429405 1.500000016
0x2540a4dc07b770ecdfee2e5ce9ea9004d3d3d6f202cb286b05492fb3eac1e5aaDraw Winner Tick...315632852023-01-30 8:44:4916 hrs 54 mins ago0x0e4440ba633985471c84a0dc7c66d80e8989459d IN  0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0 MATIC0.000710212507 1.500000016
0x6c5671981f0762000b7b76a932d0f8a220e583e7b609c123efa09f8607f0ba7cBuy Tickets315632672023-01-30 8:44:1116 hrs 55 mins ago0x0e4440ba633985471c84a0dc7c66d80e8989459d IN  0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f1 MATIC0.003451090536 1.500000016
0xdfb00a3262c17535c1bfa84b3ba0bb23e681edb94c91c5090e8d1d433585eb5cRestart Draw315632482023-01-30 8:43:3116 hrs 56 mins ago0x0e4440ba633985471c84a0dc7c66d80e8989459d IN  0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0 MATIC0.0000464685 1.500000016
0x91bfefe317f90a4f0df6764018378d7024c6d21a47484ad9fb471de94e7fcbadWithdraw Winning...314239692023-01-26 9:12:434 days 16 hrs ago0x0e4440ba633985471c84a0dc7c66d80e8989459d IN  0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0 MATIC0.0000429405 1.500000016
0xed0edc6561ad28ba12ccf024637cef5ee785ab96aaf279378fad4c5a32943533Withdraw Commiss...314239602023-01-26 9:12:234 days 16 hrs ago0x0e4440ba633985471c84a0dc7c66d80e8989459d IN  0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0 MATIC0.0000458355 1.500000016
0x2a543e1a74b5ee9bebfdf1d13c4b9ffdce843a1e73de0bc4ef94824bc1bae632Draw Winner Tick...314239512023-01-26 9:12:034 days 16 hrs ago0x0e4440ba633985471c84a0dc7c66d80e8989459d IN  0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0 MATIC0.000164920501 1.500000016
0x8b457e8339647df05b9fe41a7c94183efdd5ddf43ae90c80f8d99ecd18771f98Buy Tickets314239422023-01-26 9:11:454 days 16 hrs ago0x0e4440ba633985471c84a0dc7c66d80e8989459d IN  0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0.1 MATIC0.000417640504 1.500000016
0x08e15fa0259eca8b48a79272434015a4d43351a1241a57554298f951388ed33cRestart Draw314239252023-01-26 9:11:094 days 16 hrs ago0x0e4440ba633985471c84a0dc7c66d80e8989459d IN  0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0 MATIC0.0000464685 1.500000016
0xc13e4d3008526ed532c4878f1ba9cb9a7072dfdbdb5ab4c6d84d74359a96f83eWithdraw Commiss...313843062023-01-25 9:42:185 days 15 hrs ago0x0e4440ba633985471c84a0dc7c66d80e8989459d IN  0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0 MATIC0.00004600173 1.50544
0x4fbbcf2719ce48d411e91e6bd4fe20ff5bc0cae9e7636052f65a836ceff60887Withdraw Winning...313842902023-01-25 9:41:445 days 15 hrs ago0x0e4440ba633985471c84a0dc7c66d80e8989459d IN  0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0 MATIC0.00004309623 1.50544
0x7c8d3c6337f6054ffc10c56a7632705d6b67f9b1e0499773a490cd16668dd36aDraw Winner Tick...313842592023-01-25 9:40:385 days 15 hrs ago0x0e4440ba633985471c84a0dc7c66d80e8989459d IN  0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0 MATIC0.000214163894 1.50544
0x60323d943ac81b32d8ff9df15bd74a4ca4d64b99c99230ef1b795603c01d4ed2Buy Tickets313842252023-01-25 9:39:265 days 16 hrs ago0x0e4440ba633985471c84a0dc7c66d80e8989459d IN  0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0.1 MATIC0.000407177609 1.558115346
0x0e6cbfb20019396a8f14880c9f0df03056bbc1436b99c30a1af6886d861189a2Buy Tickets313841772023-01-25 9:37:445 days 16 hrs ago0x0e4440ba633985471c84a0dc7c66d80e8989459d IN  0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0.06 MATIC0.000258103171 1.50544
0x74560085e7505b74521f6afc5de25bfbc5f7840a95e9baf9d66c96fa455a1553Buy Tickets313841622023-01-25 9:37:125 days 16 hrs ago0x0e4440ba633985471c84a0dc7c66d80e8989459d IN  0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0.02 MATIC0.000200984679 2.037
0x445eba5c1c99aa418e5c2fabf38c801b0ae4d8a6e264c48d51f491297adae11cRestart Draw313841462023-01-25 9:36:385 days 16 hrs ago0x0e4440ba633985471c84a0dc7c66d80e8989459d IN  0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0 MATIC0.000063104223 2.037
0x93dde5580abf88500c5188b5740cb7718b4e10c502bf495b2432db4f84f7e589Withdraw Commiss...313825902023-01-25 8:41:145 days 16 hrs ago0x0e4440ba633985471c84a0dc7c66d80e8989459d IN  0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0 MATIC0.000050039707 1.637585738
0xe9572ab2ab0991fa80f04d3079ed0d136b39e33fef1a837a26bc4977a704228aWithdraw Winning...313825722023-01-25 8:40:365 days 16 hrs ago0x0e4440ba633985471c84a0dc7c66d80e8989459d IN  0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0 MATIC0.000046879166 1.637585737
0x79a2bd07e5cf248d02aa70140e1b0f7b6e2c0a999673a2f38a104ec20432fbf2Draw Winner Tick...313825572023-01-25 8:40:045 days 16 hrs ago0x0e4440ba633985471c84a0dc7c66d80e8989459d IN  0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0 MATIC0.000775355906 1.637585737
0xbb79e81501107599facecb24245fe77f49ad35da665b02207070bd7faa9b8b58Buy Tickets313824312023-01-25 8:35:365 days 17 hrs ago0x0e4440ba633985471c84a0dc7c66d80e8989459d IN  0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0.1 MATIC0.000427945367 1.637585737
0x266a8c2fc24e041004bdbf20be606eadb2aef9a5ac29e45c7c4b3de997cd15f1Buy Tickets313824202023-01-25 8:35:145 days 17 hrs ago0x0e4440ba633985471c84a0dc7c66d80e8989459d IN  0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0.1 MATIC0.000633717979 2.425000016
0x32e7425d23b85681038c601a9ac3fca316b6a3a325bc9cc1fb6711831f005a2cBuy Tickets313824012023-01-25 8:34:345 days 17 hrs ago0x0e4440ba633985471c84a0dc7c66d80e8989459d IN  0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0.1 MATIC0.000456276942 1.746
0xe0a74b0061cf7ba8ec56dfd6b3cf6749bfee7c3922b17579ee39bf90cf314b99Buy Tickets313823802023-01-25 8:33:485 days 17 hrs ago0x0e4440ba633985471c84a0dc7c66d80e8989459d IN  0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0.1 MATIC0.000427945367 1.637585737
0xf5f5d7fac27d92c0ff834a1f2d6b2a574085454f2dc0329686af6532e15d3624Buy Tickets313823672023-01-25 8:33:205 days 17 hrs ago0x0e4440ba633985471c84a0dc7c66d80e8989459d IN  0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0.1 MATIC0.000633717979 2.425000016
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xf97b15d9c7551bb44c3169171b3003ada913772d7d5a8cb3337eca4fca2bba53315633022023-01-30 8:45:3916 hrs 53 mins ago 0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0x0e4440ba633985471c84a0dc7c66d80e8989459d0.1 MATIC
0x5c0ab781d2af2d231efac3f472276b633b42aabf9e21489cec499baceeceffe2315632972023-01-30 8:45:1916 hrs 54 mins ago 0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0x0e4440ba633985471c84a0dc7c66d80e8989459d0.9 MATIC
0x91bfefe317f90a4f0df6764018378d7024c6d21a47484ad9fb471de94e7fcbad314239692023-01-26 9:12:434 days 16 hrs ago 0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0x0e4440ba633985471c84a0dc7c66d80e8989459d0.09 MATIC
0xed0edc6561ad28ba12ccf024637cef5ee785ab96aaf279378fad4c5a32943533314239602023-01-26 9:12:234 days 16 hrs ago 0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0x0e4440ba633985471c84a0dc7c66d80e8989459d0.01 MATIC
0xc13e4d3008526ed532c4878f1ba9cb9a7072dfdbdb5ab4c6d84d74359a96f83e313843062023-01-25 9:42:185 days 15 hrs ago 0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0x0e4440ba633985471c84a0dc7c66d80e8989459d0.018 MATIC
0x4fbbcf2719ce48d411e91e6bd4fe20ff5bc0cae9e7636052f65a836ceff60887313842902023-01-25 9:41:445 days 15 hrs ago 0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0x0e4440ba633985471c84a0dc7c66d80e8989459d0.162 MATIC
0x93dde5580abf88500c5188b5740cb7718b4e10c502bf495b2432db4f84f7e589313825902023-01-25 8:41:145 days 16 hrs ago 0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0x0e4440ba633985471c84a0dc7c66d80e8989459d0.1 MATIC
0xe9572ab2ab0991fa80f04d3079ed0d136b39e33fef1a837a26bc4977a704228a313825722023-01-25 8:40:365 days 16 hrs ago 0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0x0e4440ba633985471c84a0dc7c66d80e8989459d0.9 MATIC
0x31e20f9d67fbdf69db5871d53f70ae30bcf82d681ba4093a7c364429f4d38a9c313822842023-01-25 8:30:245 days 17 hrs ago 0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0x0e4440ba633985471c84a0dc7c66d80e8989459d0.001 MATIC
0x4377de4cd814af871010a44bdacb51cf4ddd91d3db0e241f68bf76f5eca44c2d313822762023-01-25 8:30:085 days 17 hrs ago 0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0x0e4440ba633985471c84a0dc7c66d80e8989459d0.009 MATIC
0x1ee3e057565cdae69dfc3162ff1a0fb91bc7e594ea23baf224f4b0281a486257313772122023-01-25 5:30:205 days 20 hrs ago 0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0x0e4440ba633985471c84a0dc7c66d80e8989459d0.005 MATIC
0x9b7081c48b9d72c5705dbf633f9e51e6c6d6fddb44f88bf07e63f9a22168164b313772032023-01-25 5:30:025 days 20 hrs ago 0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0x0e4440ba633985471c84a0dc7c66d80e8989459d0.045 MATIC
0x77590403ca1ce80a9b11793efdd31eca947763e68d567c66fa592646b51f0da7313766782023-01-25 5:11:175 days 20 hrs ago 0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0x0e4440ba633985471c84a0dc7c66d80e8989459d0.008 MATIC
0x48051428d7d26a95d7cc647aca854146185889e2165694b9d9e08b37a854e375313444582023-01-24 10:07:586 days 15 hrs ago 0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0x0e4440ba633985471c84a0dc7c66d80e8989459d0.027 MATIC
0x1223ff444011a30c1ebaeef4759a53d6aca96119a2bcce5c34249109746f4f7f313391672023-01-24 6:59:546 days 18 hrs ago 0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0xfe5332295f2498001c42223b2aec996ddd7857300.045 MATIC
0x2e4e965950622551e1f1e8b381802b84dd4b4849ec6757cabab8ce7f5faa5453313359892023-01-24 5:06:556 days 20 hrs ago 0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0x0e4440ba633985471c84a0dc7c66d80e8989459d0.01 MATIC
0x033845ccbbe37102c2b40b8a123a3c6eff493d4696218354bbadee6a18349b0b313359762023-01-24 5:06:276 days 20 hrs ago 0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0x0e4440ba633985471c84a0dc7c66d80e8989459d0.09 MATIC
0x5ba4a68ce10d0adcd3dfd46e2a8f981c97b68c3032a08890bb5832efbb4147b1313068322023-01-23 11:51:167 days 13 hrs ago 0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0x0e4440ba633985471c84a0dc7c66d80e8989459d0.007 MATIC
0x7cf696e81810ec80033938b261ee7f91e36b955fd54f3adf083fffeb393da512312994822023-01-23 7:30:277 days 18 hrs ago 0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0x80dc41cd4d8a9586575c2837d2d06f828391727f0.054 MATIC
0xe8567a6ec5d67ee063fe1ddf3bc6134a959c6330208dab954ebcb34c8577f800312988312023-01-23 7:07:147 days 18 hrs ago 0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0x0e4440ba633985471c84a0dc7c66d80e8989459d0.009 MATIC
0x35dc13599c29d6fd7abe68a2665ff3269271ddb37e47be2f4b0d1da3e0e4e451312956172023-01-23 5:13:067 days 20 hrs ago 0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0x0e4440ba633985471c84a0dc7c66d80e8989459d0.02 MATIC
0xe317b64585f339d62837989a3332413a044fe2f3737143ee9f2bd15a7bf9427d312956032023-01-23 5:12:367 days 20 hrs ago 0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0x80dc41cd4d8a9586575c2837d2d06f828391727f0.18 MATIC
0x3e57c3e39478743f951aff355fe8d66e07c32b998df8d7f4c88ec3c4f0b01f49311839922023-01-20 11:13:2610 days 14 hrs ago 0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0x0e4440ba633985471c84a0dc7c66d80e8989459d0.1 MATIC
0x1559090e5b1d4d09f8912ad7a3a8600a0350534a5c3591fe5ed738d6be71b854311839722023-01-20 11:12:4410 days 14 hrs ago 0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0x80dc41cd4d8a9586575c2837d2d06f828391727f0.9 MATIC
0xef613c28d32b792889c54163a6bc593554a4833b436dccf8202b33067e28edbd311836622023-01-20 11:01:4410 days 14 hrs ago 0x3941a7e887b494cfd32dc3d3cc31d426d1e2267f0x0e4440ba633985471c84a0dc7c66d80e8989459d0.01 MATIC
[ Download CSV Export 
Loading

Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0x954D6422483EB28Ba107d3f82Bd9E8fEff51937C

Contract Name:
Lottery

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 800 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 2 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

File 2 of 2 : Lottery.sol
// SPDX-License-Identifier: GPL-3.0
import "@openzeppelin/contracts/utils/Strings.sol";

pragma solidity >=0.7.0 <0.9.0;

contract Lottery {
    uint256 public constant ticketPrice = 0.01 ether;
    uint256 public constant maxTickets = 100; // maximum tickets per lottery
    uint256 public constant ticketCommission = 0.001 ether; // commition per ticket
    uint256 public constant duration = 30 minutes; // The duration set for the lottery

    uint256 public expiration; // Timeout in case That the lottery was not carried out.
    address public lotteryOperator; // the crator of the lottery
    uint256 public operatorTotalCommission = 0; // the total commission balance
    address public lastWinner; // the last winner of the lottery
    uint256 public lastWinnerAmount; // the last winner amount of the lottery

    mapping(address => uint256) public winnings; // maps the winners to there winnings
    address[] public tickets; //array of purchased Tickets

    // modifier to check if caller is the lottery operator
    modifier isOperator() {
        require(
            (msg.sender == lotteryOperator),
            "Caller is not the lottery operator"
        );
        _;
    }

    // modifier to check if caller is a winner
    modifier isWinner() {
        require(IsWinner(), "Caller is not a winner");
        _;
    }

    constructor() {
        lotteryOperator = msg.sender;
        expiration = block.timestamp + duration;
    }

    // return all the tickets
    function getTickets() public view returns (address[] memory) {
        return tickets;
    }

    function getWinningsForAddress(address addr) public view returns (uint256) {
        return winnings[addr];
    }

    function BuyTickets() public payable {
        require(
            msg.value % ticketPrice == 0,
            string.concat(
                "the value must be multiple of ",
                Strings.toString(ticketPrice),
                " Ether"
            )
        );
        uint256 numOfTicketsToBuy = msg.value / ticketPrice;

        require(
            numOfTicketsToBuy <= RemainingTickets(),
            "Not enough tickets available."
        );

        for (uint256 i = 0; i < numOfTicketsToBuy; i++) {
            tickets.push(msg.sender);
        }
    }

    function DrawWinnerTicket() public isOperator {
        require(tickets.length > 0, "No tickets were purchased");

        bytes32 blockHash = blockhash(block.number - tickets.length);
        uint256 randomNumber = uint256(
            keccak256(abi.encodePacked(block.timestamp, blockHash))
        );
        uint256 winningTicket = randomNumber % tickets.length;

        address winner = tickets[winningTicket];
        lastWinner = winner;
        winnings[winner] += (tickets.length * (ticketPrice - ticketCommission));
        lastWinnerAmount = winnings[winner];
        operatorTotalCommission += (tickets.length * ticketCommission);
        delete tickets;
        expiration = block.timestamp + duration;
    }

    function restartDraw() public isOperator {
        require(tickets.length == 0, "Cannot Restart Draw as Draw is in play");

        delete tickets;
        expiration = block.timestamp + duration;
    }

    function checkWinningsAmount() public view returns (uint256) {
        address payable winner = payable(msg.sender);

        uint256 reward2Transfer = winnings[winner];

        return reward2Transfer;
    }

    function WithdrawWinnings() public isWinner {
        address payable winner = payable(msg.sender);

        uint256 reward2Transfer = winnings[winner];
        winnings[winner] = 0;

        winner.transfer(reward2Transfer);
    }

    function RefundAll() public {
        require(block.timestamp >= expiration, "the lottery not expired yet");

        for (uint256 i = 0; i < tickets.length; i++) {
            address payable to = payable(tickets[i]);
            tickets[i] = address(0);
            to.transfer(ticketPrice);
        }
        delete tickets;
    }

    function WithdrawCommission() public isOperator {
        address payable operator = payable(msg.sender);

        uint256 commission2Transfer = operatorTotalCommission;
        operatorTotalCommission = 0;

        operator.transfer(commission2Transfer);
    }

    function IsWinner() public view returns (bool) {
        return winnings[msg.sender] > 0;
    }

    function CurrentWinningReward() public view returns (uint256) {
        return tickets.length * ticketPrice;
    }

    function RemainingTickets() public view returns (uint256) {
        return maxTickets - tickets.length;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 800
  },
  "evmVersion": "london",
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"BuyTickets","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"CurrentWinningReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DrawWinnerTicket","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"IsWinner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RefundAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"RemainingTickets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WithdrawCommission","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"WithdrawWinnings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"checkWinningsAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"duration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"expiration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTickets","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"getWinningsForAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastWinner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastWinnerAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lotteryOperator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTickets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operatorTotalCommission","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"restartDraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ticketCommission","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ticketPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tickets","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"winnings","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

6080604052600060025534801561001557600080fd5b50600180546001600160a01b031916331790556100346107084261003c565b600055610063565b8082018082111561005d57634e487b7160e01b600052601160045260246000fd5b92915050565b610f58806100726000396000f3fe6080604052600436106101805760003560e01c806371827b7b116100d6578063ba946d791161007f578063ea3a149911610059578063ea3a1499146103c4578063f2613269146103f1578063fe1881841461040657600080fd5b8063ba946d7914610363578063c6944fa014610379578063dd64e5341461038e57600080fd5b806396c85ef3116100b057806396c85ef31461030a5780639b89470314610339578063a88f46721461034e57600080fd5b806371827b7b146102d857806391d8b14e146102ed57806393a563b5146102f557600080fd5b80634665096d1161013857806350b447121161011257806350b44712146102655780635a58acdd1461029d5780636032a4f9146102bd57600080fd5b80634665096d146102185780634788af7c1461022e5780634ed026221461024357600080fd5b80630fb5a6b4116101695780630fb5a6b4146101d05780631209b1f6146101e657806335580df21461020157600080fd5b806306f7f3bf146101855780630789c607146101ae575b600080fd5b34801561019157600080fd5b5061019b60045481565b6040519081526020015b60405180910390f35b3480156101ba57600080fd5b503360009081526005602052604090205461019b565b3480156101dc57600080fd5b5061019b61070881565b3480156101f257600080fd5b5061019b662386f26fc1000081565b34801561020d57600080fd5b50610216610426565b005b34801561022457600080fd5b5061019b60005481565b34801561023a57600080fd5b506102166104cd565b34801561024f57600080fd5b506102586106e1565b6040516101a59190610ced565b34801561027157600080fd5b50610285610280366004610d3a565b610743565b6040516001600160a01b0390911681526020016101a5565b3480156102a957600080fd5b50600154610285906001600160a01b031681565b3480156102c957600080fd5b5061019b66038d7ea4c6800081565b3480156102e457600080fd5b5061021661076d565b61021661080c565b34801561030157600080fd5b5061019b610948565b34801561031657600080fd5b5033600090815260056020526040902054151560405190151581526020016101a5565b34801561034557600080fd5b5061019b606481565b34801561035a57600080fd5b5061021661095e565b34801561036f57600080fd5b5061019b60025481565b34801561038557600080fd5b5061019b610a82565b34801561039a57600080fd5b5061019b6103a9366004610d53565b6001600160a01b031660009081526005602052604090205490565b3480156103d057600080fd5b5061019b6103df366004610d53565b60056020526000908152604090205481565b3480156103fd57600080fd5b50610216610a9a565b34801561041257600080fd5b50600354610285906001600160a01b031681565b6001546001600160a01b031633146104905760405162461bcd60e51b815260206004820152602260248201527f43616c6c6572206973206e6f7420746865206c6f7474657279206f706572617460448201526137b960f11b60648201526084015b60405180910390fd5b600280546000918290556040513392839183156108fc0291849190818181858888f193505050501580156104c8573d6000803e3d6000fd5b505050565b6001546001600160a01b031633146105325760405162461bcd60e51b815260206004820152602260248201527f43616c6c6572206973206e6f7420746865206c6f7474657279206f706572617460448201526137b960f11b6064820152608401610487565b6006546105815760405162461bcd60e51b815260206004820152601960248201527f4e6f207469636b657473207765726520707572636861736564000000000000006044820152606401610487565b6006546000906105919043610d99565b604080514260208201529140908201819052915060009060600160408051601f1981840301815291905280516020909101206006549091506000906105d69083610dc8565b90506000600682815481106105ed576105ed610ddc565b6000918252602090912001546003805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039092169182179055905061063e66038d7ea4c68000662386f26fc10000610d99565b60065461064b9190610df2565b6001600160a01b03821660009081526005602052604081208054909190610673908490610e09565b90915550506001600160a01b0381166000908152600560205260409020546004556006546106a99066038d7ea4c6800090610df2565b600260008282546106ba9190610e09565b909155506106cc905060066000610cb3565b6106d861070842610e09565b60005550505050565b6060600680548060200260200160405190810160405280929190818152602001828054801561073957602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161071b575b5050505050905090565b6006818154811061075357600080fd5b6000918252602090912001546001600160a01b0316905081565b336000908152600560205260409020546107c95760405162461bcd60e51b815260206004820152601660248201527f43616c6c6572206973206e6f7420612077696e6e6572000000000000000000006044820152606401610487565b3360008181526005602052604080822080549083905590519091839183156108fc0291849190818181858888f193505050501580156104c8573d6000803e3d6000fd5b61081d662386f26fc1000034610dc8565b1561082e662386f26fc10000610b92565b60405160200161083e9190610e40565b6040516020818303038152906040529061086b5760405162461bcd60e51b81526004016104879190610eac565b50600061087f662386f26fc1000034610edf565b9050610889610948565b8111156108d85760405162461bcd60e51b815260206004820152601d60248201527f4e6f7420656e6f756768207469636b65747320617661696c61626c652e0000006044820152606401610487565b60005b8181101561094457600680546001810182556000919091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f01805473ffffffffffffffffffffffffffffffffffffffff1916331790558061093c81610ef3565b9150506108db565b5050565b600654600090610959906064610d99565b905090565b6000544210156109b05760405162461bcd60e51b815260206004820152601b60248201527f746865206c6f7474657279206e6f7420657870697265642079657400000000006044820152606401610487565b60005b600654811015610a73576000600682815481106109d2576109d2610ddc565b6000918252602082200154600680546001600160a01b03909216935090849081106109ff576109ff610ddc565b60009182526020822001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0393841617905560405191831691662386f26fc100009082818181858883f19350505050158015610a5e573d6000803e3d6000fd5b50508080610a6b90610ef3565b9150506109b3565b50610a8060066000610cb3565b565b60065460009061095990662386f26fc1000090610df2565b6001546001600160a01b03163314610aff5760405162461bcd60e51b815260206004820152602260248201527f43616c6c6572206973206e6f7420746865206c6f7474657279206f706572617460448201526137b960f11b6064820152608401610487565b60065415610b755760405162461bcd60e51b815260206004820152602660248201527f43616e6e6f74205265737461727420447261772061732044726177206973206960448201527f6e20706c617900000000000000000000000000000000000000000000000000006064820152608401610487565b610b8160066000610cb3565b610b8d61070842610e09565b600055565b606081600003610bb95750506040805180820190915260018152600360fc1b602082015290565b8160005b8115610be35780610bcd81610ef3565b9150610bdc9050600a83610edf565b9150610bbd565b60008167ffffffffffffffff811115610bfe57610bfe610f0c565b6040519080825280601f01601f191660200182016040528015610c28576020820181803683370190505b5090505b8415610cab57610c3d600183610d99565b9150610c4a600a86610dc8565b610c55906030610e09565b60f81b818381518110610c6a57610c6a610ddc565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350610ca4600a86610edf565b9450610c2c565b949350505050565b5080546000825590600052602060002090810190610cd19190610cd4565b50565b5b80821115610ce95760008155600101610cd5565b5090565b6020808252825182820181905260009190848201906040850190845b81811015610d2e5783516001600160a01b031683529284019291840191600101610d09565b50909695505050505050565b600060208284031215610d4c57600080fd5b5035919050565b600060208284031215610d6557600080fd5b81356001600160a01b0381168114610d7c57600080fd5b9392505050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610dac57610dac610d83565b92915050565b634e487b7160e01b600052601260045260246000fd5b600082610dd757610dd7610db2565b500690565b634e487b7160e01b600052603260045260246000fd5b8082028115828204841417610dac57610dac610d83565b80820180821115610dac57610dac610d83565b60005b83811015610e37578181015183820152602001610e1f565b50506000910152565b7f7468652076616c7565206d757374206265206d756c7469706c65206f66200000815260008251610e7881601e850160208701610e1c565b7f2045746865720000000000000000000000000000000000000000000000000000601e939091019283015250602401919050565b6020815260008251806020840152610ecb816040850160208701610e1c565b601f01601f19169190910160400192915050565b600082610eee57610eee610db2565b500490565b600060018201610f0557610f05610d83565b5060010190565b634e487b7160e01b600052604160045260246000fdfea26469706673582212208dbb14e8606fbb027362cab256ca1d5b66d97f16b2e5395a598bb591c009d87564736f6c63430008110033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading