Contract 0x7a676691cbfad2b4e9f42e1e89b794fea5546c33

 

Contract Overview

Balance:
0 ETH

ETH Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x53dff2feb1988cdcf2cca54aa379f3e5d4310d332ffcad36e4e53430a1b7b6e9Withdraw Fees123078842022-05-17 11:14:18141 days 20 hrs ago0xa53ae003f47a3ad9133b8089eb742f2fdcc5aaeb IN  0x7a676691cbfad2b4e9f42e1e89b794fea5546c330 ETH0.000108386127 ETH
0xb35284b16a7f92234d6cc884e6cf663b17a816d7490515ad1809caa20a47a92fWithdraw Winning...114428062022-05-07 21:12:29151 days 10 hrs ago0x146cfed833cc926b16b0da9257e8a281c2add9f3 IN  0x7a676691cbfad2b4e9f42e1e89b794fea5546c330 ETH0.000145735056 ETH
0x3e0e12bb740e5604fd9dbdd00f69ed3f27b7b1f650531001828ae1fb0ccd545cWithdraw Winning...114426382022-05-07 21:10:12151 days 10 hrs ago0xa53ae003f47a3ad9133b8089eb742f2fdcc5aaeb IN  0x7a676691cbfad2b4e9f42e1e89b794fea5546c330 ETH0.000146368097 ETH
0x72ff4d041dc1ce7d4a10077ee346ebcf7b6e9a6836b4a5c9785031c0329ad945Enter Next Lotte...106729922022-04-27 15:35:46161 days 16 hrs ago0x146cfed833cc926b16b0da9257e8a281c2add9f3 IN  0x7a676691cbfad2b4e9f42e1e89b794fea5546c330 ETH0.000293430211 ETH
0xce8cef8abf404cff43aca972b79a3c9a4b3e6e39a52a7ba26c90308bf0888068Enter Next Lotte...106410392022-04-27 8:32:37161 days 23 hrs ago0xa03724c06002dfa56377cf1995ee5e3080e56c0b IN  0x7a676691cbfad2b4e9f42e1e89b794fea5546c330 ETH0.000384235334 ETH
0x57a39839ef1afdd7e8c2d8321970ac032b6051ae4886a894d9084a1e93703ba1Withdraw Winning...106017362022-04-26 20:00:03162 days 11 hrs ago0x146cfed833cc926b16b0da9257e8a281c2add9f3 IN  0x7a676691cbfad2b4e9f42e1e89b794fea5546c330 ETH0.000197575063 ETH
0x0f2b4b6d668f9415705f5010a7dd4074d3e360d7f6268d572597bc92fbe76d8bWithdraw Winning...106016882022-04-26 19:59:28162 days 11 hrs ago0xa53ae003f47a3ad9133b8089eb742f2fdcc5aaeb IN  0x7a676691cbfad2b4e9f42e1e89b794fea5546c330 ETH0.000199084345 ETH
0xeb09ace9f4312e4060697fbd9596a5ef7677a35fcd9d190034950e355f38d371Withdraw Fees106007022022-04-26 19:40:34162 days 12 hrs ago0xa53ae003f47a3ad9133b8089eb742f2fdcc5aaeb IN  0x7a676691cbfad2b4e9f42e1e89b794fea5546c330 ETH0.000199059918 ETH
0x1dcb6fbc8eee457974bff46b17077e5b8bdb5bb762943c01c63a262e724a08d5Enter Next Lotte...103239042022-04-22 11:17:48166 days 20 hrs ago0xa53ae003f47a3ad9133b8089eb742f2fdcc5aaeb IN  0x7a676691cbfad2b4e9f42e1e89b794fea5546c330 ETH0.000345334737 ETH
0xba8d4eaba99cde97973b6734e103df7c3415b2466439ed2b82223269bcf7e6ddEnter Next Lotte...103238572022-04-22 11:17:15166 days 20 hrs ago0x146cfed833cc926b16b0da9257e8a281c2add9f3 IN  0x7a676691cbfad2b4e9f42e1e89b794fea5546c330 ETH0.000423750841 ETH
0xd4ffce0f0a8feb492eb49fc9a2c65d0746aebce5ea5d19d4357b57459d7289d1Enter Next Lotte...103238052022-04-22 11:15:46166 days 20 hrs ago0x146cfed833cc926b16b0da9257e8a281c2add9f3 IN  0x7a676691cbfad2b4e9f42e1e89b794fea5546c330 ETH0.000344344405 ETH
0xc2d8c92aaa9163d4175af1c22e776196c16a580f105b11f3e2911d70b8c86b75Enter Next Lotte...103236822022-04-22 11:12:30166 days 20 hrs ago0xa53ae003f47a3ad9133b8089eb742f2fdcc5aaeb IN  0x7a676691cbfad2b4e9f42e1e89b794fea5546c330 ETH0.000237577593 ETH
0x6f1769302d2cb02514d0e98becd779094843cac1c5185b3713e58acbcedeaa33Enter Next Lotte...103206282022-04-22 10:11:29166 days 21 hrs ago0xa53ae003f47a3ad9133b8089eb742f2fdcc5aaeb IN  0x7a676691cbfad2b4e9f42e1e89b794fea5546c330 ETH0.000242830969 ETH
0x09f45f7d54bd835a38dfbe3feddf73d29243e81a3f6e31f05d9cb901e5ee22c0Enter Next Lotte...103199832022-04-22 9:59:59166 days 21 hrs ago0xa53ae003f47a3ad9133b8089eb742f2fdcc5aaeb IN  0x7a676691cbfad2b4e9f42e1e89b794fea5546c330 ETH0.000435050235 ETH
0x313f16de164fae94685858e9ed469864937e9a2be12132db440dd81ceee96146Enter Next Lotte...97022732022-04-12 18:01:22176 days 13 hrs ago0xa53ae003f47a3ad9133b8089eb742f2fdcc5aaeb IN  0x7a676691cbfad2b4e9f42e1e89b794fea5546c330 ETH0.000312617916 ETH
0x9689d71462c94aa0230637585e0f7bc97a81393af656ccd8e08975e337ae9220Enter Next Lotte...95980342022-04-10 17:30:56178 days 14 hrs ago0x146cfed833cc926b16b0da9257e8a281c2add9f3 IN  0x7a676691cbfad2b4e9f42e1e89b794fea5546c330 ETH0.000193818947 ETH
0x4443f4286bd67eb37421ef13be3d88c30523ce4e9434dcd53a236555b81e0dd9Enter Next Lotte...95980102022-04-10 17:30:08178 days 14 hrs ago0x146cfed833cc926b16b0da9257e8a281c2add9f3 IN  0x7a676691cbfad2b4e9f42e1e89b794fea5546c330 ETH0.000193217257 ETH
0x569152180b377b295103a7d8bd0a4486dcfe34bd09535d28ed52aa1ae767eefdEnter Next Lotte...95979512022-04-10 17:27:30178 days 14 hrs ago0x146cfed833cc926b16b0da9257e8a281c2add9f3 IN  0x7a676691cbfad2b4e9f42e1e89b794fea5546c330 ETH0.000341410711 ETH
0x7ca9d6eda03c8c1a890ab098dd370dc178f8db4c620ef2bb0f67213cf10d25f6Cancel Entry95967222022-04-10 16:44:05178 days 15 hrs ago0x146cfed833cc926b16b0da9257e8a281c2add9f3 IN  0x7a676691cbfad2b4e9f42e1e89b794fea5546c330 ETH0.000181379338 ETH
0x5edfccb5faed4741a3d977ec5d762359b51f9043afd320ef58c9363e69c60d97Enter Next Lotte...95967132022-04-10 16:44:05178 days 15 hrs ago0x146cfed833cc926b16b0da9257e8a281c2add9f3 IN  0x7a676691cbfad2b4e9f42e1e89b794fea5546c330 ETH0.000341402123 ETH
0x82ba7ca2900a19c65cda26d3e053f03dc8b996774fe73b111bbbdb77e5d235920x6080604095965342022-04-10 16:39:54178 days 15 hrs ago0xa53ae003f47a3ad9133b8089eb742f2fdcc5aaeb IN  Create: MagicLottery0 ETH0.014369144322 ETH
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x53dff2feb1988cdcf2cca54aa379f3e5d4310d332ffcad36e4e53430a1b7b6e9123078842022-05-17 11:14:18141 days 20 hrs ago 0x7a676691cbfad2b4e9f42e1e89b794fea5546c33 0x3f770ac673856f105b586bb393d122721265ad460 ETH
0x53dff2feb1988cdcf2cca54aa379f3e5d4310d332ffcad36e4e53430a1b7b6e9123078842022-05-17 11:14:18141 days 20 hrs ago 0x7a676691cbfad2b4e9f42e1e89b794fea5546c33Treasure DAO: Magic Token0 ETH
0x7b4f6223641c4e6b3c368cdb6033e9e11e9403df630d954ce0df7363d4d46c50118099242022-05-11 15:35:48147 days 16 hrs ago 0x7a676691cbfad2b4e9f42e1e89b794fea5546c33 0x2d57f794ab20585b112c57d310872abd6dc69de10 ETH
0x7b4f6223641c4e6b3c368cdb6033e9e11e9403df630d954ce0df7363d4d46c50118099242022-05-11 15:35:48147 days 16 hrs ago 0x7a676691cbfad2b4e9f42e1e89b794fea5546c33 0x3f770ac673856f105b586bb393d122721265ad460 ETH
0x7b4f6223641c4e6b3c368cdb6033e9e11e9403df630d954ce0df7363d4d46c50118099242022-05-11 15:35:48147 days 16 hrs ago 0x7a676691cbfad2b4e9f42e1e89b794fea5546c33 0xc71e6725569af73ac6641ec4bcc99a709ead40c70 ETH
0x7b4f6223641c4e6b3c368cdb6033e9e11e9403df630d954ce0df7363d4d46c50118099242022-05-11 15:35:48147 days 16 hrs ago 0x7a676691cbfad2b4e9f42e1e89b794fea5546c33 0x3f770ac673856f105b586bb393d122721265ad460 ETH
0x7b4f6223641c4e6b3c368cdb6033e9e11e9403df630d954ce0df7363d4d46c50118099242022-05-11 15:35:48147 days 16 hrs ago 0x7a676691cbfad2b4e9f42e1e89b794fea5546c33 0x8e79c8607a28fe1ec3527991c89f1d9e36d1bad90 ETH
0x7b4f6223641c4e6b3c368cdb6033e9e11e9403df630d954ce0df7363d4d46c50118099242022-05-11 15:35:48147 days 16 hrs ago 0x7a676691cbfad2b4e9f42e1e89b794fea5546c33Treasure DAO: Magic Token0 ETH
0x7b4f6223641c4e6b3c368cdb6033e9e11e9403df630d954ce0df7363d4d46c50118099242022-05-11 15:35:48147 days 16 hrs ago 0x7a676691cbfad2b4e9f42e1e89b794fea5546c33 0xa0a89db1c899c49f98e6326b764bafcf167fc2ce0 ETH
0x7b4f6223641c4e6b3c368cdb6033e9e11e9403df630d954ce0df7363d4d46c50118099242022-05-11 15:35:48147 days 16 hrs ago 0x7a676691cbfad2b4e9f42e1e89b794fea5546c33Treasure DAO: Magic Token0 ETH
0x7b4f6223641c4e6b3c368cdb6033e9e11e9403df630d954ce0df7363d4d46c50118099242022-05-11 15:35:48147 days 16 hrs ago 0xb3f5503f93d5ef84b06993a1975b9d21b962892f 0x7a676691cbfad2b4e9f42e1e89b794fea5546c330 ETH
0xb35284b16a7f92234d6cc884e6cf663b17a816d7490515ad1809caa20a47a92f114428062022-05-07 21:12:29151 days 10 hrs ago 0x7a676691cbfad2b4e9f42e1e89b794fea5546c33 0x3f770ac673856f105b586bb393d122721265ad460 ETH
0xb35284b16a7f92234d6cc884e6cf663b17a816d7490515ad1809caa20a47a92f114428062022-05-07 21:12:29151 days 10 hrs ago 0x7a676691cbfad2b4e9f42e1e89b794fea5546c33Treasure DAO: Magic Token0 ETH
0x3e0e12bb740e5604fd9dbdd00f69ed3f27b7b1f650531001828ae1fb0ccd545c114426382022-05-07 21:10:12151 days 10 hrs ago 0x7a676691cbfad2b4e9f42e1e89b794fea5546c33 0x3f770ac673856f105b586bb393d122721265ad460 ETH
0x3e0e12bb740e5604fd9dbdd00f69ed3f27b7b1f650531001828ae1fb0ccd545c114426382022-05-07 21:10:12151 days 10 hrs ago 0x7a676691cbfad2b4e9f42e1e89b794fea5546c33Treasure DAO: Magic Token0 ETH
0x3aae207b3011f6d5449146e2aa3a288bf86e36293dd58f5304c5550ba4cb7996114067352022-05-07 11:17:21151 days 20 hrs ago 0x7a676691cbfad2b4e9f42e1e89b794fea5546c33 0x2d57f794ab20585b112c57d310872abd6dc69de10 ETH
0x3aae207b3011f6d5449146e2aa3a288bf86e36293dd58f5304c5550ba4cb7996114067352022-05-07 11:17:21151 days 20 hrs ago 0x7a676691cbfad2b4e9f42e1e89b794fea5546c33 0x3f770ac673856f105b586bb393d122721265ad460 ETH
0x3aae207b3011f6d5449146e2aa3a288bf86e36293dd58f5304c5550ba4cb7996114067352022-05-07 11:17:21151 days 20 hrs ago 0x7a676691cbfad2b4e9f42e1e89b794fea5546c33 0xc71e6725569af73ac6641ec4bcc99a709ead40c70 ETH
0x3aae207b3011f6d5449146e2aa3a288bf86e36293dd58f5304c5550ba4cb7996114067352022-05-07 11:17:21151 days 20 hrs ago 0x7a676691cbfad2b4e9f42e1e89b794fea5546c33 0x3f770ac673856f105b586bb393d122721265ad460 ETH
0x3aae207b3011f6d5449146e2aa3a288bf86e36293dd58f5304c5550ba4cb7996114067352022-05-07 11:17:21151 days 20 hrs ago 0x7a676691cbfad2b4e9f42e1e89b794fea5546c33 0x8e79c8607a28fe1ec3527991c89f1d9e36d1bad90 ETH
0x3aae207b3011f6d5449146e2aa3a288bf86e36293dd58f5304c5550ba4cb7996114067352022-05-07 11:17:21151 days 20 hrs ago 0x7a676691cbfad2b4e9f42e1e89b794fea5546c33Treasure DAO: Magic Token0 ETH
0x3aae207b3011f6d5449146e2aa3a288bf86e36293dd58f5304c5550ba4cb7996114067352022-05-07 11:17:21151 days 20 hrs ago 0x7a676691cbfad2b4e9f42e1e89b794fea5546c33 0xa0a89db1c899c49f98e6326b764bafcf167fc2ce0 ETH
0x3aae207b3011f6d5449146e2aa3a288bf86e36293dd58f5304c5550ba4cb7996114067352022-05-07 11:17:21151 days 20 hrs ago 0x7a676691cbfad2b4e9f42e1e89b794fea5546c33Treasure DAO: Magic Token0 ETH
0x3aae207b3011f6d5449146e2aa3a288bf86e36293dd58f5304c5550ba4cb7996114067352022-05-07 11:17:21151 days 20 hrs ago 0xb3f5503f93d5ef84b06993a1975b9d21b962892f 0x7a676691cbfad2b4e9f42e1e89b794fea5546c330 ETH
0x44f43f84011783e6ee240355d9863d053ca094fe00ab4411c7c3390fd1258068113220622022-05-06 11:17:26152 days 20 hrs ago 0x7a676691cbfad2b4e9f42e1e89b794fea5546c33 0x2d57f794ab20585b112c57d310872abd6dc69de10 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MagicLottery

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 10000 runs

Other Settings:
default evmVersion, Unlicense license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Arbiscan on 2022-04-10
*/

// SPDX-License-Identifier: Unlicense
pragma solidity >=0.8.0;

/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC20.sol)
/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)
/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.
abstract contract ERC20 {
    /*///////////////////////////////////////////////////////////////
                                  EVENTS
    //////////////////////////////////////////////////////////////*/

    event Transfer(address indexed from, address indexed to, uint256 amount);

    event Approval(address indexed owner, address indexed spender, uint256 amount);

    /*///////////////////////////////////////////////////////////////
                             METADATA STORAGE
    //////////////////////////////////////////////////////////////*/

    string public name;

    string public symbol;

    uint8 public immutable decimals;

    /*///////////////////////////////////////////////////////////////
                              ERC20 STORAGE
    //////////////////////////////////////////////////////////////*/

    uint256 public totalSupply;

    mapping(address => uint256) public balanceOf;

    mapping(address => mapping(address => uint256)) public allowance;

    /*///////////////////////////////////////////////////////////////
                             EIP-2612 STORAGE
    //////////////////////////////////////////////////////////////*/

    bytes32 public constant PERMIT_TYPEHASH =
        keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");

    uint256 internal immutable INITIAL_CHAIN_ID;

    bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;

    mapping(address => uint256) public nonces;

    /*///////////////////////////////////////////////////////////////
                               CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    constructor(
        string memory _name,
        string memory _symbol,
        uint8 _decimals
    ) {
        name = _name;
        symbol = _symbol;
        decimals = _decimals;

        INITIAL_CHAIN_ID = block.chainid;
        INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();
    }

    /*///////////////////////////////////////////////////////////////
                              ERC20 LOGIC
    //////////////////////////////////////////////////////////////*/

    function approve(address spender, uint256 amount) public virtual returns (bool) {
        allowance[msg.sender][spender] = amount;

        emit Approval(msg.sender, spender, amount);

        return true;
    }

    function transfer(address to, uint256 amount) public virtual returns (bool) {
        balanceOf[msg.sender] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(msg.sender, to, amount);

        return true;
    }

    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual returns (bool) {
        uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.

        if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;

        balanceOf[from] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(from, to, amount);

        return true;
    }

    /*///////////////////////////////////////////////////////////////
                              EIP-2612 LOGIC
    //////////////////////////////////////////////////////////////*/

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual {
        require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED");

        // Unchecked because the only math done is incrementing
        // the owner's nonce which cannot realistically overflow.
        unchecked {
            bytes32 digest = keccak256(
                abi.encodePacked(
                    "\x19\x01",
                    DOMAIN_SEPARATOR(),
                    keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline))
                )
            );

            address recoveredAddress = ecrecover(digest, v, r, s);

            require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER");

            allowance[recoveredAddress][spender] = value;
        }

        emit Approval(owner, spender, value);
    }

    function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {
        return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();
    }

    function computeDomainSeparator() internal view virtual returns (bytes32) {
        return
            keccak256(
                abi.encode(
                    keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
                    keccak256(bytes(name)),
                    keccak256("1"),
                    block.chainid,
                    address(this)
                )
            );
    }

    /*///////////////////////////////////////////////////////////////
                       INTERNAL MINT/BURN LOGIC
    //////////////////////////////////////////////////////////////*/

    function _mint(address to, uint256 amount) internal virtual {
        totalSupply += amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(address(0), to, amount);
    }

    function _burn(address from, uint256 amount) internal virtual {
        balanceOf[from] -= amount;

        // Cannot underflow because a user's balance
        // will never be larger than the total supply.
        unchecked {
            totalSupply -= amount;
        }

        emit Transfer(from, address(0), amount);
    }
}interface Randomizer {
    // Sets the number of blocks that must pass between increment the commitId and seeding the random
    // Admin
    function setNumBlocksAfterIncrement(uint8 _numBlocksAfterIncrement)
        external;

    // Increments the commit id.
    // Admin
    function incrementCommitId() external;

    // Adding the random number needs to be done AFTER incrementing the commit id on a separate transaction. If
    // these are done together, there is a potential vulnerability to front load a commit when the bad actor
    // sees the value of the random number.
    function addRandomForCommit(uint256 _seed) external;

    // Returns a request ID for a random number. This is unique.
    function requestRandomNumber() external returns (uint256);

    // Returns the random number for the given request ID. Will revert
    // if the random is not ready.
    function revealRandomNumber(uint256 _requestId)
        external
        view
        returns (uint256);

    // Returns if the random number for the given request ID is ready or not. Call
    // before calling revealRandomNumber.
    function isRandomReady(uint256 _requestId) external view returns (bool);
}enum Lock {
    twoWeeks,
    oneMonth,
    threeMonths,
    sixMonths,
    twelveMonths
}

interface AtlasMine {
    function deposit(uint256 _amount, Lock _lock) external;

    function withdrawPosition(uint256 _depositId, uint256 _amount)
        external
        returns (bool);

    function withdrawAll() external;

    function harvestPosition(uint256 _depositId) external;

    function harvestAll() external;

    function withdrawAndHarvestPosition(uint256 _depositId, uint256 _amount)
        external;

    function withdrawAndHarvestAll() external;

    function currentId(address) external returns (uint256);
}
struct Lottery {
    uint256 depositId;
    uint256 requestId;
    uint256 total;
    address[] contestants;
    uint256[] balances;
    uint256 startTime;
}

contract MagicLottery {
    /// Storage ///

    ERC20 public magicToken;
    AtlasMine public atlasMine;
    Randomizer public randomizer;

    address public operator;
    bool public paused = false;
    bool private locked;

    uint256 public lastLottery;
    uint256 public MIN_TIME_ELAPSED = 1 days;

    address[] public nextLotteryContestants;
    uint256[] public nextLotteryBalances;
    uint256 public nextLotteryTotalBalance;
    mapping(address => uint256) public indexOfNextLotteryContestant;
    mapping(address => bool) public nextLotteryContestantExists;

    Lottery[] private allLotteries;

    mapping(address => uint256) public postLotteryBalances;

    uint256 public fee;
    uint256 public feeReserve;
    uint256 public constant MAX_FEE = 3000;
    uint256 public constant FEE_DENOMINATOR = 10000;

    /// Errors ///

    error InvalidAmount(uint256 amount);
    error InvalidOperator(address operator);
    error InvalidFeeAmount(uint256 amount);
    error NotEnoughContestants();
    error NotEnoughTimeElapsed();
    error Unauthorized();
    error ContractPaused();
    error NonReentrant();

    /// Events ///

    event EnteredLottery(address indexed contestant, uint256 amount);
    event CancelledEntry(address indexed contestant);
    event LotteryStarted(
        uint256 indexed depositId,
        uint256 requestId,
        uint256 total
    );
    event LotteryEnded(
        uint256 indexed depositId,
        address indexed winner,
        uint256 jackpot
    );
    event PostLotteryBalancesWithdrawn(
        address indexed contestant,
        uint256 amount
    );
    event FeesWithdrawn(address indexed operator, uint256 amount);
    event OperatorChanged(address indexed operator);
    event FeeChanged(uint256 fee);
    event PauseStatusChanged(bool paused);

    /// Modifiers ///

    modifier onlyOperator() {
        if (msg.sender != operator) {
            revert Unauthorized();
        }
        _;
    }

    modifier onlyWhenNotPaused() {
        if (paused) {
            revert ContractPaused();
        }
        _;
    }

    modifier nonReentrant() {
        if (locked) {
            revert NonReentrant();
        }
        locked = true;
        _;
        locked = false;
    }

    /// Constructor ///

    constructor(
        ERC20 _magicToken,
        AtlasMine _atlasMine,
        Randomizer _randomizer,
        uint256 _fee
    ) {
        if (_fee <= 0 || _fee > MAX_FEE) {
            revert InvalidFeeAmount(_fee);
        }

        magicToken = _magicToken;
        atlasMine = _atlasMine;
        randomizer = _randomizer;
        fee = _fee;
        operator = msg.sender;
        lastLottery = block.timestamp;

        emit FeeChanged(_fee);
        emit OperatorChanged(msg.sender);
    }

    /// Public Methods ///

    function enterNextLottery(uint256 _amount)
        external
        onlyWhenNotPaused
        returns (uint256)
    {
        if (_amount <= 0) {
            revert InvalidAmount(_amount);
        }

        // Effects
        magicToken.transferFrom(msg.sender, address(this), _amount);

        if (!nextLotteryContestantExists[msg.sender]) {
            indexOfNextLotteryContestant[msg.sender] = nextLotteryContestants
                .length;
            nextLotteryContestants.push(msg.sender);
            nextLotteryBalances.push(0);
            nextLotteryContestantExists[msg.sender] = true;
        }
        uint256 index = indexOfNextLotteryContestant[msg.sender];
        nextLotteryBalances[index] += _amount;
        nextLotteryTotalBalance += _amount;

        // Interactions
        emit EnteredLottery(msg.sender, nextLotteryBalances[index]);

        return nextLotteryBalances[index];
    }

    function cancelEntry() external returns (bool) {
        if (!nextLotteryContestantExists[msg.sender]) {
            return false;
        }

        uint256 indexToDelete = indexOfNextLotteryContestant[msg.sender];
        uint256 balance = nextLotteryBalances[indexToDelete];

        // Effects
        nextLotteryContestantExists[msg.sender] = false;

        uint256 nlbLen = nextLotteryBalances.length;
        if (nlbLen > 1) {
            nextLotteryBalances[indexToDelete] = nextLotteryBalances[
                nlbLen - 1
            ];
        }
        nextLotteryBalances.pop();

        uint256 nlcLen = nextLotteryContestants.length;
        if (nlcLen > 1) {
            nextLotteryContestants[indexToDelete] = nextLotteryContestants[
                nlcLen - 1
            ];
        }
        nextLotteryContestants.pop();

        indexOfNextLotteryContestant[msg.sender] = indexToDelete;
        nextLotteryTotalBalance -= balance;
        magicToken.transfer(msg.sender, balance);

        // Interactions
        emit CancelledEntry(msg.sender);

        return true;
    }

    function beginNextLottery()
        external
        onlyWhenNotPaused
        nonReentrant
        returns (uint256)
    {
        if (lastLottery + MIN_TIME_ELAPSED > block.timestamp) {
            revert NotEnoughTimeElapsed();
        }
        if (nextLotteryContestants.length < 2) {
            revert NotEnoughContestants();
        }

        magicToken.approve(address(atlasMine), nextLotteryTotalBalance);

        // Interactions
        atlasMine.deposit(nextLotteryTotalBalance, Lock.twoWeeks);
        uint256 requestId = randomizer.requestRandomNumber();
        uint256 depositId = atlasMine.currentId(address(this));
        emit LotteryStarted(depositId, requestId, nextLotteryTotalBalance);

        // Effects
        allLotteries.push(
            Lottery({
                depositId: depositId,
                requestId: requestId,
                total: nextLotteryTotalBalance,
                contestants: nextLotteryContestants,
                balances: nextLotteryBalances,
                startTime: block.timestamp
            })
        );

        _resetNextLottery();

        return depositId;
    }

    function drawWinner() external nonReentrant returns (address) {
        Lottery memory lottery = allLotteries[0];
        uint256 preDrawBalance = magicToken.balanceOf(address(this));
        atlasMine.withdrawAndHarvestPosition(
            lottery.depositId,
            type(uint256).max
        );
        uint256 harvestedAmount = magicToken.balanceOf(address(this)) -
            preDrawBalance;
        uint256 totalRewards = harvestedAmount - lottery.total;
        uint256 totalFee = (totalRewards * fee) / FEE_DENOMINATOR;
        uint256 randomNum = randomizer.revealRandomNumber(lottery.requestId);
        address winner = _getWinner(randomNum, lottery);

        feeReserve += totalFee;

        uint256 contestantsLength = lottery.contestants.length;
        for (uint256 i; i < contestantsLength; ++i) {
            if (winner == lottery.contestants[i]) {
                postLotteryBalances[winner] +=
                    lottery.balances[i] +
                    (totalRewards - totalFee);
                continue;
            }
            postLotteryBalances[lottery.contestants[i]] = lottery.balances[i];
        }

        uint256 lotteriesLength = allLotteries.length;
        for (uint256 i; i < lotteriesLength - 1; ++i) {
            allLotteries[i] = allLotteries[i + 1];
        }
        allLotteries.pop();

        emit LotteryEnded(lottery.depositId, winner, totalRewards);

        return winner;
    }

    function withdrawWinnings() external returns (bool) {
        uint256 balance = postLotteryBalances[msg.sender];

        if (balance == 0) {
            return false;
        }

        postLotteryBalances[msg.sender] = 0;

        magicToken.transfer(msg.sender, balance);
        emit PostLotteryBalancesWithdrawn(msg.sender, balance);
        return true;
    }

    function enterLotteryWithWinnings()
        external
        onlyWhenNotPaused
        returns (uint256)
    {
        uint256 balance = postLotteryBalances[msg.sender];

        if (balance <= 0) {
            revert InvalidAmount(balance);
        }

        postLotteryBalances[msg.sender] = 0;

        if (!nextLotteryContestantExists[msg.sender]) {
            indexOfNextLotteryContestant[msg.sender] = nextLotteryContestants
                .length;
            nextLotteryContestants.push(msg.sender);
            nextLotteryBalances.push(0);
            nextLotteryContestantExists[msg.sender] = true;
        }
        uint256 index = indexOfNextLotteryContestant[msg.sender];
        nextLotteryBalances[index] += balance;
        nextLotteryTotalBalance += balance;

        // Interactions
        emit EnteredLottery(msg.sender, nextLotteryBalances[index]);

        return nextLotteryBalances[index];
    }

    function withdrawFees() external onlyOperator {
        uint256 amount = feeReserve;

        if (amount == 0) {
            return;
        }

        feeReserve = 0;
        magicToken.transfer(msg.sender, amount);
        emit FeesWithdrawn(msg.sender, amount);
    }

    function changeOperator(address _operator) external onlyOperator {
        if (_operator == address(0)) {
            revert InvalidOperator(_operator);
        }

        operator = _operator;

        emit OperatorChanged(_operator);
    }

    function setFee(uint256 _fee) external onlyOperator {
        if (_fee <= 0 || _fee > MAX_FEE) {
            revert InvalidFeeAmount(_fee);
        }

        fee = _fee;

        emit FeeChanged(_fee);
    }

    function setPaused(bool _paused) external onlyOperator {
        paused = _paused;

        emit PauseStatusChanged(_paused);
    }

    function canBeginNextLottery() external view returns (bool, bytes memory) {
        return (
            !paused &&
                lastLottery + MIN_TIME_ELAPSED <= block.timestamp &&
                nextLotteryContestants.length >= 2,
            abi.encodeWithSelector(this.beginNextLottery.selector)
        );
    }

    function canDrawWinner() external view returns (bool, bytes memory) {
        return (
            allLotteries.length > 0 &&
                allLotteries[0].startTime + 2 weeks <= block.timestamp,
            abi.encodeWithSelector(this.drawWinner.selector)
        );
    }

    /// Private Methods ///

    function _resetNextLottery() internal {
        for (uint256 i; i < nextLotteryContestants.length; i++) {
            delete indexOfNextLotteryContestant[nextLotteryContestants[i]];
            delete nextLotteryContestantExists[nextLotteryContestants[i]];
        }

        delete nextLotteryContestants;
        delete nextLotteryBalances;
        nextLotteryTotalBalance = 0;
        lastLottery = block.timestamp;
    }

    function _getWinner(uint256 _randomNum, Lottery memory _lottery)
        internal
        pure
        returns (address)
    {
        uint256 rand = _randomNum % _lottery.total;
        for (uint256 i; i < _lottery.contestants.length; i++) {
            uint256 val = _lottery.balances[i];
            if (rand < val) {
                return _lottery.contestants[i];
            }
            rand -= val;
        }
        // should never reach here
        return _lottery.contestants[_lottery.contestants.length - 1];
    }
}

Contract ABI

[{"inputs":[{"internalType":"contract ERC20","name":"_magicToken","type":"address"},{"internalType":"contract AtlasMine","name":"_atlasMine","type":"address"},{"internalType":"contract Randomizer","name":"_randomizer","type":"address"},{"internalType":"uint256","name":"_fee","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ContractPaused","type":"error"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"InvalidAmount","type":"error"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"InvalidFeeAmount","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"InvalidOperator","type":"error"},{"inputs":[],"name":"NonReentrant","type":"error"},{"inputs":[],"name":"NotEnoughContestants","type":"error"},{"inputs":[],"name":"NotEnoughTimeElapsed","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"contestant","type":"address"}],"name":"CancelledEntry","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"contestant","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EnteredLottery","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"FeeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"FeesWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"depositId","type":"uint256"},{"indexed":true,"internalType":"address","name":"winner","type":"address"},{"indexed":false,"internalType":"uint256","name":"jackpot","type":"uint256"}],"name":"LotteryEnded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"depositId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"requestId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"total","type":"uint256"}],"name":"LotteryStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"}],"name":"OperatorChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"paused","type":"bool"}],"name":"PauseStatusChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"contestant","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PostLotteryBalancesWithdrawn","type":"event"},{"inputs":[],"name":"FEE_DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_TIME_ELAPSED","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"atlasMine","outputs":[{"internalType":"contract AtlasMine","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"beginNextLottery","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"canBeginNextLottery","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canDrawWinner","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cancelEntry","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"changeOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"drawWinner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enterLotteryWithWinnings","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"enterNextLottery","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeReserve","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"indexOfNextLotteryContestant","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastLottery","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"magicToken","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"nextLotteryBalances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nextLotteryContestantExists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"nextLotteryContestants","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextLotteryTotalBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"postLotteryBalances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"randomizer","outputs":[{"internalType":"contract Randomizer","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawWinnings","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]

60806040526003805460ff60a01b19169055620151806005553480156200002557600080fd5b506040516200284738038062002847833981016040819052620000489162000157565b801580620000575750610bb881115b156200007d57604051633d83b26760e01b81526004810182905260240160405180910390fd5b600080546001600160a01b038087166001600160a01b031992831617909255600180548684169083161790556002805492851692821692909217909155600d8290556003805490911633179055426004556040517f6bbc57480a46553fa4d156ce702beef5f3ad66303b0ed1a5d4cb44966c6584c390620001019083815260200190565b60405180910390a160405133907f4721129e0e676ed6a92909bb24e853ccdd63ad72280cc2e974e38e480e0e6e5490600090a250505050620001b1565b6001600160a01b03811681146200015457600080fd5b50565b600080600080608085870312156200016e57600080fd5b84516200017b816200013e565b60208601519094506200018e816200013e565b6040860151909350620001a1816200013e565b6060959095015193969295505050565b61268680620001c16000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c8063789ff0e111610104578063ca504aa1116100a2578063dbdf6bdd11610071578063dbdf6bdd146103c9578063ddca3f43146103dc578063eafa8d82146103e5578063f10fb5841461040557600080fd5b8063ca504aa1146103a7578063cb21a2d1146103b0578063cc42e83a146103b8578063d73792a9146103c057600080fd5b8063b2185bb1116100de578063b2185bb11461036d578063b9df877714610375578063bc063e1a1461037e578063c808b22b1461038757600080fd5b8063789ff0e1146103535780638563d8641461035c578063af0b4b271461036457600080fd5b8063476343ee116101715780635f709c611161014b5780635f709c611461030557806367c1f2011461030d57806369fe0e2d1461032d578063746a56c91461034057600080fd5b8063476343ee146102b8578063570ca735146102c05780635c975abb146102e057600080fd5b806321acd0ca116101ad57806321acd0ca146102175780632daf7c9f1461022d578063363e8dbc146102655780633995c8801461029857600080fd5b806306394c9b146101d45780630e6d6bde146101e957806316c38b3c14610204575b600080fd5b6101e76101e2366004612385565b610425565b005b6101f161054f565b6040519081526020015b60405180910390f35b6101e76102123660046123d0565b6107c0565b61021f610895565b6040516101fb9291906123ed565b61024061023b36600461246a565b610944565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101fb565b610288610273366004612385565b600a6020526000908152604090205460ff1681565b60405190151581526020016101fb565b6001546102409073ffffffffffffffffffffffffffffffffffffffff1681565b6101e761097b565b6003546102409073ffffffffffffffffffffffffffffffffffffffff1681565b6003546102889074010000000000000000000000000000000000000000900460ff1681565b610288610ab4565b6101f161031b366004612385565b60096020526000908152604090205481565b6101e761033b36600461246a565b610daa565b6101f161034e36600461246a565b610e78565b6101f1600e5481565b61021f610e99565b6101f160045481565b610240610f43565b6101f160085481565b6101f1610bb881565b6000546102409073ffffffffffffffffffffffffffffffffffffffff1681565b6101f160055481565b6101f16116ce565b610288611c7c565b6101f161271081565b6101f16103d736600461246a565b611d85565b6101f1600d5481565b6101f16103f3366004612385565b600c6020526000908152604090205481565b6002546102409073ffffffffffffffffffffffffffffffffffffffff1681565b60035473ffffffffffffffffffffffffffffffffffffffff163314610476576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166104e0576040517f3eaa03e300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024015b60405180910390fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f4721129e0e676ed6a92909bb24e853ccdd63ad72280cc2e974e38e480e0e6e5490600090a250565b60035460009074010000000000000000000000000000000000000000900460ff16156105a7576040517fab35696f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600c6020526040902054806105f1576040517f3728b83d000000000000000000000000000000000000000000000000000000008152600481018290526024016104d7565b336000908152600c60209081526040808320839055600a90915290205460ff166106e3576006805433600081815260096020908152604080832085905560018086019096557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f90940180547fffffffffffffffffffffffff000000000000000000000000000000000000000016909317909255600780548086019091557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68801819055600a9091522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690911790555b33600090815260096020526040902054600780548391908390811061070a5761070a612483565b90600052602060002001600082825461072391906124e1565b92505081905550816008600082825461073c91906124e1565b90915550506007805433917fc3d9208034e72b3cd2d1b5f1e9911ebc02e7be185fca8924062b57bd5464afd4918490811061077957610779612483565b906000526020600020015460405161079391815260200190565b60405180910390a2600781815481106107ae576107ae612483565b90600052602060002001549250505090565b60035473ffffffffffffffffffffffffffffffffffffffff163314610811576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6003805482151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff9091161790556040517fef37df9624f797913e7585c7f7b5d004ba6704be3c64b0561c157728ccc869859061088a90831515815260200190565b60405180910390a150565b60035460009060609074010000000000000000000000000000000000000000900460ff161580156108d55750426005546004546108d291906124e1565b11155b80156108e45750600654600211155b6040805160048152602481019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fcb21a2d10000000000000000000000000000000000000000000000000000000017905290939092509050565b6006818154811061095457600080fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b60035473ffffffffffffffffffffffffffffffffffffffff1633146109cc576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e5460008190036109db5750565b6000600e819055546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526024810183905273ffffffffffffffffffffffffffffffffffffffff9091169063a9059cbb906044016020604051808303816000875af1158015610a57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a7b91906124f9565b5060405181815233907fc0819c13be868895eb93e40eaceb96de976442fa1d404e5c55f14bb65a8c489a9060200160405180910390a250565b336000908152600a602052604081205460ff16610ad15750600090565b336000908152600960205260408120546007805491929183908110610af857610af8612483565b6000918252602080832090910154338352600a909152604090912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556007549091506001811115610b90576007610b55600183612516565b81548110610b6557610b65612483565b906000526020600020015460078481548110610b8357610b83612483565b6000918252602090912001555b6007805480610ba157610ba161252d565b6000828152602081208201600019908101919091550190556006546001811115610c64576006610bd2600183612516565b81548110610be257610be2612483565b6000918252602090912001546006805473ffffffffffffffffffffffffffffffffffffffff9092169186908110610c1b57610c1b612483565b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b6006805480610c7557610c7561252d565b60008281526020808220830160001990810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055909201909255338252600990526040812085905560088054859290610cd3908490612516565b90915550506000546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526024810185905273ffffffffffffffffffffffffffffffffffffffff9091169063a9059cbb906044016020604051808303816000875af1158015610d4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7391906124f9565b5060405133907fb60f8bd76d0ebf3720858badf853e9e6983ead788666e6a2e8f9fb26a065786790600090a2600194505050505090565b60035473ffffffffffffffffffffffffffffffffffffffff163314610dfb576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b801580610e095750610bb881115b15610e43576040517f3d83b267000000000000000000000000000000000000000000000000000000008152600481018290526024016104d7565b600d8190556040518181527f6bbc57480a46553fa4d156ce702beef5f3ad66303b0ed1a5d4cb44966c6584c39060200161088a565b60078181548110610e8857600080fd5b600091825260209091200154905081565b600b5460009060609015801590610ee3575042600b600081548110610ec057610ec0612483565b90600052602060002090600602016005015462127500610ee091906124e1565b11155b6040805160048152602481019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb2185bb10000000000000000000000000000000000000000000000000000000017905290939092509050565b6003546000907501000000000000000000000000000000000000000000900460ff1615610f9c576040517f9396d15600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff167501000000000000000000000000000000000000000000179055600b8054600091908290610ff257610ff2612483565b90600052602060002090600602016040518060c00160405290816000820154815260200160018201548152602001600282015481526020016003820180548060200260200160405190810160405280929190818152602001828054801561108f57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311611064575b50505050508152602001600482018054806020026020016040519081016040528092919081815260200182805480156110e757602002820191906000526020600020905b8154815260200190600101908083116110d3575b505050918352505060059190910154602090910152600080546040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152929350909173ffffffffffffffffffffffffffffffffffffffff909116906370a0823190602401602060405180830381865afa158015611170573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611194919061255c565b60015483516040517fa7e69fb40000000000000000000000000000000000000000000000000000000081526004810191909152600019602482015291925073ffffffffffffffffffffffffffffffffffffffff169063a7e69fb490604401600060405180830381600087803b15801561120c57600080fd5b505af1158015611220573d6000803e3d6000fd5b5050600080546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015291935084925073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015611295573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112b9919061255c565b6112c39190612516565b905060008360400151826112d79190612516565b90506000612710600d54836112ec9190612575565b6112f691906125c3565b60025460208701516040517f4ad30a7500000000000000000000000000000000000000000000000000000000815292935060009273ffffffffffffffffffffffffffffffffffffffff90921691634ad30a75916113599160040190815260200190565b602060405180830381865afa158015611376573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061139a919061255c565b905060006113a8828861207f565b905082600e60008282546113bc91906124e1565b909155505060608701515160005b8181101561152357886060015181815181106113e8576113e8612483565b602002602001015173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036114945761142c8587612516565b8960800151828151811061144257611442612483565b602002602001015161145491906124e1565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600c6020526040812080549091906114899084906124e1565b909155506115139050565b886080015181815181106114aa576114aa612483565b6020026020010151600c60008b6060015184815181106114cc576114cc612483565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b61151c816125d7565b90506113ca565b50600b5460005b611535600183612516565b8110156115eb57600b6115498260016124e1565b8154811061155957611559612483565b9060005260206000209060060201600b828154811061157a5761157a612483565b906000526020600020906006020160008201548160000155600182015481600101556002820154816002015560038201816003019080546115bc92919061224a565b50600482810180546115d1928401919061224a565b506005918201549101556115e4816125d7565b905061152a565b50600b8054806115fd576115fd61252d565b600082815260208120600660001990930192830201818155600181018290556002810182905590611631600383018261229a565b61163f60048301600061229a565b506000600591909101559055885160405187815273ffffffffffffffffffffffffffffffffffffffff851691907f8d51d444ca9d8e0d53abe7300704f34dd3e2b745a1e6959d3dad806745f751759060200160405180910390a35050600380547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff169055979650505050505050565b60035460009074010000000000000000000000000000000000000000900460ff1615611726576040517fab35696f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6003547501000000000000000000000000000000000000000000900460ff161561177c576040517f9396d15600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff16750100000000000000000000000000000000000000000017905560055460045442916117cd916124e1565b1115611805576040517f8506b73500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60065460021115611842576040517f4dfc9b1700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000546001546008546040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9283166004820152602481019190915291169063095ea7b3906044016020604051808303816000875af11580156118c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118e591906124f9565b506001546008546040517f654cfdff00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9092169163654cfdff91611940916000906004016125f1565b600060405180830381600087803b15801561195a57600080fd5b505af115801561196e573d6000803e3d6000fd5b505050506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638678a7b26040518163ffffffff1660e01b81526004016020604051808303816000875af11580156119e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a07919061255c565b6001546040517f2299b8fa00000000000000000000000000000000000000000000000000000000815230600482015291925060009173ffffffffffffffffffffffffffffffffffffffff90911690632299b8fa906024016020604051808303816000875af1158015611a7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aa1919061255c565b9050807ffcdeb3394eefba8891818e18ed3c4d1aa8872705afa5819133971caea073dc1d83600854604051611ae0929190918252602082015260400190565b60405180910390a2600b6040518060c0016040528083815260200184815260200160085481526020016006805480602002602001604051908101604052809291908181526020018280548015611b6c57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311611b41575b505050505081526020016007805480602002602001604051908101604052809291908181526020018280548015611bc257602002820191906000526020600020905b815481526020019060010190808311611bae575b505050918352505042602091820152825460018181018555600094855293829020835160069092020190815582820151938101939093556040820151600284015560608201518051929392611c1d92600385019201906122bb565b5060808201518051611c39916004840191602090910190612335565b5060a082015181600501555050611c4e61214c565b915050600380547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff16905590565b336000908152600c6020526040812054808203611c9b57600091505090565b336000818152600c6020526040808220829055905490517fa9059cbb00000000000000000000000000000000000000000000000000000000815260048101929092526024820183905273ffffffffffffffffffffffffffffffffffffffff169063a9059cbb906044016020604051808303816000875af1158015611d23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d4791906124f9565b5060405181815233907f4bf644cef6239691f548ba939659648841dec4c8c48872b88aeb2655ce4a4dc49060200160405180910390a2600191505090565b60035460009074010000000000000000000000000000000000000000900460ff1615611ddd576040517fab35696f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008211611e1a576040517f3728b83d000000000000000000000000000000000000000000000000000000008152600481018390526024016104d7565b6000546040517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526044810184905273ffffffffffffffffffffffffffffffffffffffff909116906323b872dd906064016020604051808303816000875af1158015611e97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ebb91906124f9565b50336000908152600a602052604090205460ff16611fa1576006805433600081815260096020908152604080832085905560018086019096557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f90940180547fffffffffffffffffffffffff000000000000000000000000000000000000000016909317909255600780548086019091557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68801819055600a9091522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690911790555b336000908152600960205260409020546007805484919083908110611fc857611fc8612483565b906000526020600020016000828254611fe191906124e1565b925050819055508260086000828254611ffa91906124e1565b90915550506007805433917fc3d9208034e72b3cd2d1b5f1e9911ebc02e7be185fca8924062b57bd5464afd4918490811061203757612037612483565b906000526020600020015460405161205191815260200190565b60405180910390a26007818154811061206c5761206c612483565b9060005260206000200154915050919050565b600080826040015184612092919061263c565b905060005b836060015151811015612116576000846080015182815181106120bc576120bc612483565b60200260200101519050808310156120f657846060015182815181106120e4576120e4612483565b60200260200101519350505050612146565b6121008184612516565b925050808061210e906125d7565b915050612097565b506060830151805161212a90600190612516565b8151811061213a5761213a612483565b60200260200101519150505b92915050565b60005b60065481101561222657600960006006838154811061217057612170612483565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001812081905560068054600a929190849081106121bd576121bd612483565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690558061221e816125d7565b91505061214f565b506122336006600061229a565b61223f6007600061229a565b600060085542600455565b82805482825590600052602060002090810192821561228a5760005260206000209182015b8281111561228a57825482559160010191906001019061226f565b50612296929150612370565b5090565b50805460008255906000526020600020908101906122b89190612370565b50565b82805482825590600052602060002090810192821561228a579160200282015b8281111561228a57825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9091161782556020909201916001909101906122db565b82805482825590600052602060002090810192821561228a579160200282015b8281111561228a578251825591602001919060010190612355565b5b808211156122965760008155600101612371565b60006020828403121561239757600080fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146123bb57600080fd5b9392505050565b80151581146122b857600080fd5b6000602082840312156123e257600080fd5b81356123bb816123c2565b821515815260006020604081840152835180604085015260005b8181101561242357858101830151858201606001528201612407565b81811115612435576000606083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01692909201606001949350505050565b60006020828403121561247c57600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082198211156124f4576124f46124b2565b500190565b60006020828403121561250b57600080fd5b81516123bb816123c2565b600082821015612528576125286124b2565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60006020828403121561256e57600080fd5b5051919050565b600081600019048311821515161561258f5761258f6124b2565b500290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826125d2576125d2612594565b500490565b600060001982036125ea576125ea6124b2565b5060010190565b828152604081016005831061262f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8260208301529392505050565b60008261264b5761264b612594565b50069056fea26469706673582212205cdc19f12e3db7fa861e3be02e1381fa03a8b46ab2be4527a92ca77ac706b7fe64736f6c634300080d0033000000000000000000000000539bde0d7dbd336b79148aa742883198bbf60342000000000000000000000000a0a89db1c899c49f98e6326b764bafcf167fc2ce0000000000000000000000008e79c8607a28fe1ec3527991c89f1d9e36d1bad900000000000000000000000000000000000000000000000000000000000003e8

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000539bde0d7dbd336b79148aa742883198bbf60342000000000000000000000000a0a89db1c899c49f98e6326b764bafcf167fc2ce0000000000000000000000008e79c8607a28fe1ec3527991c89f1d9e36d1bad900000000000000000000000000000000000000000000000000000000000003e8

-----Decoded View---------------
Arg [0] : _magicToken (address): 0x539bde0d7dbd336b79148aa742883198bbf60342
Arg [1] : _atlasMine (address): 0xa0a89db1c899c49f98e6326b764bafcf167fc2ce
Arg [2] : _randomizer (address): 0x8e79c8607a28fe1ec3527991c89f1d9e36d1bad9
Arg [3] : _fee (uint256): 1000

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000539bde0d7dbd336b79148aa742883198bbf60342
Arg [1] : 000000000000000000000000a0a89db1c899c49f98e6326b764bafcf167fc2ce
Arg [2] : 0000000000000000000000008e79c8607a28fe1ec3527991c89f1d9e36d1bad9
Arg [3] : 00000000000000000000000000000000000000000000000000000000000003e8


Deployed ByteCode Sourcemap

8709:11564:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18006:249;;;;;;:::i;:::-;;:::i;:::-;;16760:950;;;:::i;:::-;;;474:25:1;;;462:2;447:18;16760:950:0;;;;;;;;18487:135;;;;;;:::i;:::-;;:::i;18630:327::-;;;:::i;:::-;;;;;;;;:::i;9034:39::-;;;;;;:::i;:::-;;:::i;:::-;;;1980:42:1;1968:55;;;1950:74;;1938:2;1923:18;9034:39:0;1804:226:1;9238:59:0;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2200:14:1;;2193:22;2175:41;;2163:2;2148:18;9238:59:0;2035:187:1;8791:26:0;;;;;;;;;17718:280;;;:::i;8861:23::-;;;;;;;;;8891:26;;;;;;;;;;;;12578:1130;;;:::i;9168:63::-;;;;;;:::i;:::-;;;;;;;;;;;;;;18263:216;;;;;;:::i;:::-;;:::i;9080:36::-;;;;;;:::i;:::-;;:::i;9433:25::-;;;;;;18965:281;;;:::i;8952:26::-;;;;;;14895:1472;;;:::i;9123:38::-;;;;;;9465;;9499:4;9465:38;;8761:23;;;;;;;;;8985:40;;;;;;13716:1171;;;:::i;16375:377::-;;;:::i;9510:47::-;;9552:5;9510:47;;11631:939;;;;;;:::i;:::-;;:::i;9408:18::-;;;;;;9345:54;;;;;;:::i;:::-;;;;;;;;;;;;;;8824:28;;;;;;;;;18006:249;10665:8;;;;10651:10;:22;10647:76;;10697:14;;;;;;;;;;;;;;10647:76;18086:23:::1;::::0;::::1;18082:89;;18133:26;::::0;::::1;::::0;;1980:42:1;1968:55;;18133:26:0::1;::::0;::::1;1950:74:1::0;1923:18;;18133:26:0::1;;;;;;;;18082:89;18183:8;:20:::0;;;::::1;;::::0;::::1;::::0;;::::1;::::0;;;18221:26:::1;::::0;::::1;::::0;-1:-1:-1;;18221:26:0::1;18006:249:::0;:::o;16760:950::-;10794:6;;16859:7;;10794:6;;;;;10790:62;;;10824:16;;;;;;;;;;;;;;10790:62;16922:10:::1;16884:15;16902:31:::0;;;:19:::1;:31;::::0;;;;;16950:12;16946:74:::1;;16986:22;::::0;::::1;::::0;;::::1;::::0;::::1;474:25:1::0;;;447:18;;16986:22:0::1;328:177:1::0;16946:74:0::1;17052:10;17066:1;17032:31:::0;;;:19:::1;:31;::::0;;;;;;;:35;;;17085:27:::1;:39:::0;;;;;;::::1;;17080:320;;17184:22;:47:::0;;17170:10:::1;17141:40;::::0;;;:28:::1;:40;::::0;;;;;;;:90;;;17246:39:::1;::::0;;::::1;::::0;;;;;;::::1;::::0;;;::::1;::::0;;::::1;::::0;;;17300:19:::1;:27:::0;;;;::::1;::::0;;;;::::1;::::0;;;17342::::1;:39:::0;;;;:46;;;::::1;::::0;;::::1;::::0;;17080:320:::1;17455:10;17410:13;17426:40:::0;;;:28:::1;:40;::::0;;;;;17477:19:::1;:26:::0;;17507:7;;17477:19;17426:40;;17477:26;::::1;;;;;:::i;:::-;;;;;;;;;:37;;;;;;;:::i;:::-;;;;;;;;17552:7;17525:23;;:34;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;17629:19:0::1;:26:::0;;17617:10:::1;::::0;17602:54:::1;::::0;17649:5;;17629:26;::::1;;;;;:::i;:::-;;;;;;;;;17602:54;;;;474:25:1::0;;462:2;447:18;;328:177;17602:54:0::1;;;;;;;;17676:19;17696:5;17676:26;;;;;;;;:::i;:::-;;;;;;;;;17669:33;;;;16760:950:::0;:::o;18487:135::-;10665:8;;;;10651:10;:22;10647:76;;10697:14;;;;;;;;;;;;;;10647:76;18553:6:::1;:16:::0;;;::::1;;::::0;::::1;::::0;;;::::1;;::::0;;18587:27:::1;::::0;::::1;::::0;::::1;::::0;18562:7;2200:14:1;2193:22;2175:41;;2163:2;2148:18;;2035:187;18587:27:0::1;;;;;;;;18487:135:::0;:::o;18630:327::-;18738:6;;18684:4;;18690:12;;18738:6;;;;;18737:7;:77;;;;;18799:15;18779:16;;18765:11;;:30;;;;:::i;:::-;:49;;18737:77;:132;;;;-1:-1:-1;18835:22:0;:29;18868:1;-1:-1:-1;18835:34:0;18737:132;18884:54;;;;;;;;;;;;;;;;;;;18907:30;18884:54;;;18715:234;;18884:54;;-1:-1:-1;18630:327:0;-1:-1:-1;18630:327:0:o;9034:39::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9034:39:0;:::o;17718:280::-;10665:8;;;;10651:10;:22;10647:76;;10697:14;;;;;;;;;;;;;;10647:76;17792:10:::1;::::0;17775:14:::1;17819:11:::0;;;17815:50:::1;;17847:7;17718:280::o:0;17815:50::-:1;17890:1;17877:10;:14:::0;;;17902:10;:39:::1;::::0;;;;17922:10:::1;17902:39;::::0;::::1;3653:74:1::0;3743:18;;;3736:34;;;17902:10:0::1;::::0;;::::1;::::0;:19:::1;::::0;3626:18:1;;17902:39:0::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;17957:33:0::1;::::0;474:25:1;;;17971:10:0::1;::::0;17957:33:::1;::::0;462:2:1;447:18;17957:33:0::1;;;;;;;17764:234;17718:280::o:0;12578:1130::-;12669:10;12619:4;12641:39;;;:27;:39;;;;;;;;12636:85;;-1:-1:-1;12704:5:0;;12578:1130::o;12636:85::-;12786:10;12733:21;12757:40;;;:28;:40;;;;;;12826:19;:34;;12757:40;;12733:21;12757:40;;12826:34;;;;;;:::i;:::-;;;;;;;;;;;;;12921:10;12893:39;;:27;:39;;;;;;;:47;;;;;;12970:19;:26;12826:34;;-1:-1:-1;12893:47:0;13011:10;;13007:143;;;13075:19;13113:10;13122:1;13113:6;:10;:::i;:::-;13075:63;;;;;;;;:::i;:::-;;;;;;;;;13038:19;13058:13;13038:34;;;;;;;;:::i;:::-;;;;;;;;;;:100;13007:143;13160:19;:25;;;;;;;:::i;:::-;;;;;;;;;;-1:-1:-1;;13160:25:0;;;;;;;;;;13215:22;:29;13160:25;13259:10;;13255:149;;;13326:22;13367:10;13376:1;13367:6;:10;:::i;:::-;13326:66;;;;;;;;:::i;:::-;;;;;;;;;;;13286:22;:37;;13326:66;;;;;13309:13;;13286:37;;;;;;:::i;:::-;;;;;;;;;:106;;;;;;;;;;;;;;;;;;13255:149;13414:22;:28;;;;;;;:::i;:::-;;;;;;;;;;;-1:-1:-1;;13414:28:0;;;;;;;;;;;;;;;13484:10;13455:40;;:28;:40;;;;;:56;;;13522:23;:34;;13549:7;;13414:28;13522:34;;13549:7;;13522:34;:::i;:::-;;;;-1:-1:-1;;13567:10:0;;:40;;;;;13587:10;13567:40;;;3653:74:1;3743:18;;;3736:34;;;13567:10:0;;;;;:19;;3626:18:1;;13567:40:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;13650:26:0;;13665:10;;13650:26;;;;;13696:4;13689:11;;;;;;12578:1130;:::o;18263:216::-;10665:8;;;;10651:10;:22;10647:76;;10697:14;;;;;;;;;;;;;;10647:76;18330:9;;;:27:::1;;;9499:4;18343;:14;18330:27;18326:89;;;18381:22;::::0;::::1;::::0;;::::1;::::0;::::1;474:25:1::0;;;447:18;;18381:22:0::1;328:177:1::0;18326:89:0::1;18427:3;:10:::0;;;18455:16:::1;::::0;474:25:1;;;18455:16:0::1;::::0;462:2:1;447:18;18455:16:0::1;328:177:1::0;9080:36:0;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9080:36:0;:::o;18965:281::-;19066:12;:19;19013:4;;19019:12;;19066:23;;;;:98;;;19149:15;19110:12;19123:1;19110:15;;;;;;;;:::i;:::-;;;;;;;;;;;:25;;;19138:7;19110:35;;;;:::i;:::-;:54;;19066:98;19179:48;;;;;;;;;;;;;;;;;;;19202:24;19179:48;;;19044:194;;19179:48;;-1:-1:-1;18965:281:0;-1:-1:-1;18965:281:0:o;14895:1472::-;10918:6;;14948:7;;10918:6;;;;;10914:60;;;10948:14;;;;;;;;;;;;;;10914:60;10984:6;:13;;;;;;;;14993:12:::1;:15:::0;;10984:13;;14993:12;10984:13;;14993:15:::1;;;;:::i;:::-;;;;;;;;;;;14968:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;;::::1;;::::0;;;;;::::1;::::0;::::1;;::::0;;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;14968:40:0;;;-1:-1:-1;;14968:40:0::1;::::0;;;::::1;::::0;::::1;::::0;;::::1;::::0;-1:-1:-1;15044:10:0;;:35:::1;::::0;;;;15073:4:::1;15044:35;::::0;::::1;1950:74:1::0;14968:40:0;;-1:-1:-1;;;15044:10:0::1;::::0;;::::1;::::0;:20:::1;::::0;1923:18:1;;15044:35:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;15090:9;::::0;15141:17;;15090:111:::1;::::0;;;;::::1;::::0;::::1;4713:25:1::0;;;;-1:-1:-1;;4754:18:1;;;4747:34;15019:60:0;;-1:-1:-1;15090:9:0::1;;::::0;:36:::1;::::0;4686:18:1;;15090:111:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;15212:23:0::1;15238:10:::0;;:35:::1;::::0;;;;15267:4:::1;15238:35;::::0;::::1;1950:74:1::0;15212:23:0;;-1:-1:-1;15289:14:0;;-1:-1:-1;15238:10:0::1;;::::0;:20:::1;::::0;1923:18:1;;15238:35:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:65;;;;:::i;:::-;15212:91;;15314:20;15355:7;:13;;;15337:15;:31;;;;:::i;:::-;15314:54;;15379:16;9552:5;15414:3;;15399:12;:18;;;;:::i;:::-;15398:38;;;;:::i;:::-;15467:10;::::0;15497:17:::1;::::0;::::1;::::0;15467:48:::1;::::0;;;;15379:57;;-1:-1:-1;15447:17:0::1;::::0;15467:10:::1;::::0;;::::1;::::0;:29:::1;::::0;:48:::1;::::0;::::1;;474:25:1::0;;;462:2;447:18;;328:177;15467:48:0::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;15447:68;;15526:14;15543:30;15554:9;15565:7;15543:10;:30::i;:::-;15526:47;;15600:8;15586:10;;:22;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;15649:19:0::1;::::0;::::1;::::0;:26;15621:25:::1;15686:370;15706:17;15702:1;:21;15686:370;;;15759:7;:19;;;15779:1;15759:22;;;;;;;;:::i;:::-;;;;;;;15749:32;;:6;:32;;::::0;15745:220:::1;;15898:23;15913:8:::0;15898:12;:23:::1;:::i;:::-;15854:7;:16;;;15871:1;15854:19;;;;;;;;:::i;:::-;;;;;;;:68;;;;:::i;:::-;15802:27;::::0;::::1;;::::0;;;:19:::1;:27;::::0;;;;:120;;:27;;;:120:::1;::::0;;;::::1;:::i;:::-;::::0;;;-1:-1:-1;15941:8:0::1;::::0;-1:-1:-1;15941:8:0::1;15745:220;16025:7;:16;;;16042:1;16025:19;;;;;;;;:::i;:::-;;;;;;;15979;:43;15999:7;:19;;;16019:1;15999:22;;;;;;;;:::i;:::-;;;;;;;15979:43;;;;;;;;;;;;;;;:65;;;;15686:370;15725:3;::::0;::::1;:::i;:::-;;;15686:370;;;-1:-1:-1::0;16094:12:0::1;:19:::0;16068:23:::1;16124:110;16144:19;16162:1;16144:15:::0;:19:::1;:::i;:::-;16140:1;:23;16124:110;;;16203:12;16216:5;:1:::0;16220::::1;16216:5;:::i;:::-;16203:19;;;;;;;;:::i;:::-;;;;;;;;;;;16185:12;16198:1;16185:15;;;;;;;;:::i;:::-;;;;;;;;;;;:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;16185:37:0::1;::::0;;::::1;::::0;;::::1;::::0;;::::1;::::0;;::::1;:::i;:::-;-1:-1:-1::0;16185:37:0::1;::::0;;::::1;::::0;;::::1;::::0;16165:3:::1;::::0;::::1;:::i;:::-;;;16124:110;;;;16244:12;:18;;;;;;;:::i;:::-;;::::0;;;::::1;::::0;;::::1;-1:-1:-1::0;;16244:18:0;;;;;::::1;;::::0;;;::::1;::::0;::::1;::::0;;;::::1;::::0;::::1;::::0;;;;::::1;;::::0;::::1;::::0;::::1;:::i;:::-;;;::::0;::::1;;;:::i;:::-;-1:-1:-1::0;16244:18:0::1;;::::0;;;::::1;::::0;;;16293:17;;16280:53:::1;::::0;474:25:1;;;16280:53:0::1;::::0;::::1;::::0;16293:17;16280:53:::1;::::0;462:2:1;447:18;16280:53:0::1;;;;;;;-1:-1:-1::0;;11020:6:0;:14;;;;;;16353:6;14895:1472;-1:-1:-1;;;;;;;14895:1472:0:o;13716:1171::-;10794:6;;13829:7;;10794:6;;;;;10790:62;;;10824:16;;;;;;;;;;;;;;10790:62;10918:6:::1;::::0;;;::::1;;;10914:60;;;10948:14;;;;;;;;;;;;;;10914:60;10984:6;:13:::0;;;::::1;::::0;::::1;::::0;;13872:16:::2;::::0;13858:11:::2;::::0;13891:15:::2;::::0;13858:30:::2;::::0;::::2;:::i;:::-;:48;13854:110;;;13930:22;;;;;;;;;;;;;;13854:110;13978:22;:29:::0;14010:1:::2;-1:-1:-1::0;13974:95:0::2;;;14035:22;;;;;;;;;;;;;;13974:95;14081:10;::::0;;14108:9;14120:23:::2;::::0;14081:63:::2;::::0;;;;:10:::2;14108:9:::0;;::::2;14081:63;::::0;::::2;3653:74:1::0;3743:18;;;3736:34;;;;14081:10:0;::::2;::::0;:18:::2;::::0;3626::1;;14081:63:0::2;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;14182:9:0::2;::::0;14200:23:::2;::::0;14182:57:::2;::::0;;;;:9:::2;::::0;;::::2;::::0;:17:::2;::::0;:57:::2;::::0;:9:::2;::::0;:57:::2;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;14250:17;14270:10;;;;;;;;;;;:30;;;:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;14333:9;::::0;:34:::2;::::0;;;;14361:4:::2;14333:34;::::0;::::2;1950:74:1::0;14250:52:0;;-1:-1:-1;14313:17:0::2;::::0;14333:9:::2;::::0;;::::2;::::0;:19:::2;::::0;1923:18:1;;14333:34:0::2;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;14313:54;;14398:9;14383:61;14409:9;14420:23;;14383:61;;;;;;4713:25:1::0;;;4769:2;4754:18;;4747:34;4701:2;4686:18;;4539:248;14383:61:0::2;;;;;;;;14477:12;14509:298;;;;;;;;14547:9;14509:298;;;;14586:9;14509:298;;;;14621:23;;14509:298;;;;14676:22;14509:298;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;;::::2;;::::0;;;;;::::2;::::0;::::2;;::::0;;::::2;;;;;;;;;;;;;14727:19;14509:298;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;14509:298:0;;;-1:-1:-1;;14776:15:0::2;14509:298;::::0;;::::2;::::0;14477:341;;::::2;::::0;;::::2;::::0;;-1:-1:-1;14477:341:0;;;;;;;;;::::2;::::0;;::::2;;::::0;;;;;::::2;::::0;;;::::2;::::0;;;;::::2;::::0;::::2;::::0;::::2;::::0;::::2;::::0;::::2;::::0;::::2;::::0;;;;;;::::2;::::0;::::2;::::0;::::2;::::0;::::2;::::0;::::2;:::i;:::-;-1:-1:-1::0;14477:341:0::2;::::0;::::2;::::0;;;::::2;::::0;::::2;::::0;::::2;::::0;::::2;::::0;;::::2;::::0;::::2;:::i;:::-;;;;;;;;;;;;14831:19;:17;:19::i;:::-;14870:9:::0;-1:-1:-1;;11020:6:0::1;:14:::0;;;::::1;::::0;;13716:1171;:::o;16375:377::-;16476:10;16421:4;16456:31;;;:19;:31;;;;;;16504:12;;;16500:57;;16540:5;16533:12;;;16375:377;:::o;16500:57::-;16589:10;16603:1;16569:31;;;:19;:31;;;;;;:35;;;16617:10;;:40;;;;;;;;3653:74:1;;;;3743:18;;;3736:34;;;16569:31:0;16617:10;;:19;;3626:18:1;;16617:40:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;16673:49:0;;474:25:1;;;16702:10:0;;16673:49;;462:2:1;447:18;16673:49:0;;;;;;;16740:4;16733:11;;;16375:377;:::o;11631:939::-;10794:6;;11737:7;;10794:6;;;;;10790:62;;;10824:16;;;;;;;;;;;;;;10790:62;11777:1:::1;11766:7;:12;11762:74;;11802:22;::::0;::::1;::::0;;::::1;::::0;::::1;474:25:1::0;;;447:18;;11802:22:0::1;328:177:1::0;11762:74:0::1;11868:10;::::0;:59:::1;::::0;;;;11892:10:::1;11868:59;::::0;::::1;6271:34:1::0;11912:4:0::1;6321:18:1::0;;;6314:43;6373:18;;;6366:34;;;11868:10:0::1;::::0;;::::1;::::0;:23:::1;::::0;6183:18:1;;11868:59:0::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;11973:10:0::1;11945:39;::::0;;;:27:::1;:39;::::0;;;;;::::1;;11940:320;;12044:22;:47:::0;;12030:10:::1;12001:40;::::0;;;:28:::1;:40;::::0;;;;;;;:90;;;12106:39:::1;::::0;;::::1;::::0;;;;;;::::1;::::0;;;::::1;::::0;;::::1;::::0;;;12160:19:::1;:27:::0;;;;::::1;::::0;;;;::::1;::::0;;;12202::::1;:39:::0;;;;:46;;;::::1;::::0;;::::1;::::0;;11940:320:::1;12315:10;12270:13;12286:40:::0;;;:28:::1;:40;::::0;;;;;12337:19:::1;:26:::0;;12367:7;;12337:19;12286:40;;12337:26;::::1;;;;;:::i;:::-;;;;;;;;;:37;;;;;;;:::i;:::-;;;;;;;;12412:7;12385:23;;:34;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;12489:19:0::1;:26:::0;;12477:10:::1;::::0;12462:54:::1;::::0;12509:5;;12489:26;::::1;;;;;:::i;:::-;;;;;;;;;12462:54;;;;474:25:1::0;;462:2;447:18;;328:177;12462:54:0::1;;;;;;;;12536:19;12556:5;12536:26;;;;;;;;:::i;:::-;;;;;;;;;12529:33;;;11631:939:::0;;;:::o;19727:543::-;19842:7;19867:12;19895:8;:14;;;19882:10;:27;;;;:::i;:::-;19867:42;;19925:9;19920:236;19940:8;:20;;;:27;19936:1;:31;19920:236;;;19989:11;20003:8;:17;;;20021:1;20003:20;;;;;;;;:::i;:::-;;;;;;;19989:34;;20049:3;20042:4;:10;20038:81;;;20080:8;:20;;;20101:1;20080:23;;;;;;;;:::i;:::-;;;;;;;20073:30;;;;;;;20038:81;20133:11;20141:3;20133:11;;:::i;:::-;;;19974:182;19969:3;;;;;:::i;:::-;;;;19920:236;;;-1:-1:-1;20209:20:0;;;;20230:27;;:31;;20260:1;;20230:31;:::i;:::-;20209:53;;;;;;;;:::i;:::-;;;;;;;20202:60;;;19727:543;;;;;:::o;19285:434::-;19339:9;19334:221;19354:22;:29;19350:33;;19334:221;;;19412:28;:55;19441:22;19464:1;19441:25;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;19412:55;;;;;;;;;;;;19405:62;;;19517:22;:25;;19489:27;;19441:25;19517:22;19540:1;;19517:25;;;;;;:::i;:::-;;;;;;;;;;;;;;;19489:54;;;;;;;;;;;;19482:61;;;;;;19385:3;;;;:::i;:::-;;;;19334:221;;;-1:-1:-1;19567:29:0;19574:22;;19567:29;:::i;:::-;19607:26;19614:19;;19607:26;:::i;:::-;19670:1;19644:23;:27;19696:15;19682:11;:29;19285:434::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14:309:1;73:6;126:2;114:9;105:7;101:23;97:32;94:52;;;142:1;139;132:12;94:52;181:9;168:23;231:42;224:5;220:54;213:5;210:65;200:93;;289:1;286;279:12;200:93;312:5;14:309;-1:-1:-1;;;14:309:1:o;510:118::-;596:5;589:13;582:21;575:5;572:32;562:60;;618:1;615;608:12;633:241;689:6;742:2;730:9;721:7;717:23;713:32;710:52;;;758:1;755;748:12;710:52;797:9;784:23;816:28;838:5;816:28;:::i;879:735::-;1062:6;1055:14;1048:22;1037:9;1030:41;1011:4;1090:2;1128;1123;1112:9;1108:18;1101:30;1160:6;1154:13;1203:6;1198:2;1187:9;1183:18;1176:34;1228:1;1238:140;1252:6;1249:1;1246:13;1238:140;;;1347:14;;;1343:23;;1337:30;1313:17;;;1332:2;1309:26;1302:66;1267:10;;1238:140;;;1396:6;1393:1;1390:13;1387:91;;;1466:1;1461:2;1452:6;1441:9;1437:22;1433:31;1426:42;1387:91;-1:-1:-1;1530:2:1;1518:15;1535:66;1514:88;1499:104;;;;1605:2;1495:113;;879:735;-1:-1:-1;;;;879:735:1:o;1619:180::-;1678:6;1731:2;1719:9;1710:7;1706:23;1702:32;1699:52;;;1747:1;1744;1737:12;1699:52;-1:-1:-1;1770:23:1;;1619:180;-1:-1:-1;1619:180:1:o;2968:184::-;3020:77;3017:1;3010:88;3117:4;3114:1;3107:15;3141:4;3138:1;3131:15;3157:184;3209:77;3206:1;3199:88;3306:4;3303:1;3296:15;3330:4;3327:1;3320:15;3346:128;3386:3;3417:1;3413:6;3410:1;3407:13;3404:39;;;3423:18;;:::i;:::-;-1:-1:-1;3459:9:1;;3346:128::o;3781:245::-;3848:6;3901:2;3889:9;3880:7;3876:23;3872:32;3869:52;;;3917:1;3914;3907:12;3869:52;3949:9;3943:16;3968:28;3990:5;3968:28;:::i;4031:125::-;4071:4;4099:1;4096;4093:8;4090:34;;;4104:18;;:::i;:::-;-1:-1:-1;4141:9:1;;4031:125::o;4161:184::-;4213:77;4210:1;4203:88;4310:4;4307:1;4300:15;4334:4;4331:1;4324:15;4350:184;4420:6;4473:2;4461:9;4452:7;4448:23;4444:32;4441:52;;;4489:1;4486;4479:12;4441:52;-1:-1:-1;4512:16:1;;4350:184;-1:-1:-1;4350:184:1:o;4792:228::-;4832:7;4958:1;-1:-1:-1;;4886:74:1;4883:1;4880:81;4875:1;4868:9;4861:17;4857:105;4854:131;;;4965:18;;:::i;:::-;-1:-1:-1;5005:9:1;;4792:228::o;5025:184::-;5077:77;5074:1;5067:88;5174:4;5171:1;5164:15;5198:4;5195:1;5188:15;5214:120;5254:1;5280;5270:35;;5285:18;;:::i;:::-;-1:-1:-1;5319:9:1;;5214:120::o;5339:195::-;5378:3;-1:-1:-1;;5402:5:1;5399:77;5396:103;;5479:18;;:::i;:::-;-1:-1:-1;5526:1:1;5515:13;;5339:195::o;5539:464::-;5719:25;;;5707:2;5692:18;;5774:1;5763:13;;5753:201;;5810:77;5807:1;5800:88;5911:4;5908:1;5901:15;5939:4;5936:1;5929:15;5753:201;5990:6;5985:2;5974:9;5970:18;5963:34;5539:464;;;;;:::o;6411:112::-;6443:1;6469;6459:35;;6474:18;;:::i;:::-;-1:-1:-1;6508:9:1;;6411:112::o

Metadata Hash

5cdc19f12e3db7fa861e3be02e1381fa03a8b46ab2be4527a92ca77ac706b7fe
Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.