Contract 0xb70bE2b22c85a08cf09eeE2Bf3F2F11c8226C02a 1

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xf1062743a613e145b6c030a98ac92aed7fe26f60f0de25593555cc7ad968a7fbCheck And Pay Ja...124593772021-11-08 0:20:3628 days 22 hrs ago0x385dea237e900eca3ef6982ee770474440de6c88 IN  0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0 BNB0.0073329
0x3ae58c48c58d9629272c32ceeffea4290241d429803019a2712ec5a79ba08d4eSet Jackpot124593192021-11-08 0:17:4128 days 22 hrs ago0x385dea237e900eca3ef6982ee770474440de6c88 IN  0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0 BNB0.00017098
0x1d6fa2237831563958eace7bb987472d1862f9c1a5793db376c1ef64cf9ce382Check And Pay Ja...124591562021-11-08 0:09:3228 days 22 hrs ago0x385dea237e900eca3ef6982ee770474440de6c88 IN  0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0 BNB0.0074079
0xfa76e46a9529b6969c09f68f6bee4da26b851a77c40937a2e5b59e6e7529d905Set Jackpot124591362021-11-08 0:08:3228 days 22 hrs ago0x385dea237e900eca3ef6982ee770474440de6c88 IN  0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0 BNB0.00017092
0xe607a389cc523df11516012ab781608960963c52831708ef6e7659f87125c925Transfer123645772021-11-04 16:36:0432 days 6 hrs ago0x51ff994032eeb6328ee79f3738971f1fd32131aa IN  0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0.01 BNB0.0071092266
0x1defdc0e6aab3345af17d00593860d162497885d9b98dd5b639f5abce0e16c77Authorize By Aut...121856992021-10-29 7:02:5638 days 15 hrs ago0x26b693ba6fbb6464f2116b365663a0f4d8394ffa IN  0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0 BNB0.00011837
0xee5b348ab49ae66516d0ed5cfec440f1a0d806b3e8fdef45e75fc377c32cc515Exclude From Jac...120262302021-10-23 16:36:5344 days 6 hrs ago0xb0251e1ff03794a4e63bc7ad47422cd144bcdcee IN  0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0 BNB0.000227665
0x3b7b7b2489ff3184c383ab3f1a1c66aabea29cdabbb81645a5637669e53eb3e5Exclude From Jac...120262142021-10-23 16:36:0544 days 6 hrs ago0xb0251e1ff03794a4e63bc7ad47422cd144bcdcee IN  0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0 BNB0.000227605
0xa04ab88e57c5ff41a434e82a813688ef76a9cb363df7bdb9f221ae252d5a974eEnroll Self118510622021-10-17 12:28:4450 days 10 hrs ago0xc6b2c8e0b99a9d26f2b9557fc7eeaddeb4d3c1d1 IN  0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0 BNB0.00023608
0xe0b21eec7dfb0174cc0a2440fdd931af0ee36967346d0d7fce19d44d5c07f1b2Authorize By Aut...118504832021-10-17 11:58:1450 days 11 hrs ago0xc6b2c8e0b99a9d26f2b9557fc7eeaddeb4d3c1d1 IN  0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0 BNB0.00011837
0xb79295b854400cf922953249b9e828ff29bd87afdfa8ae87bdd2d22607eab323Enroll Self118196922021-10-16 10:11:4351 days 12 hrs ago0x5f52c8dd7ed86ceef1dbcb598ee8435cfa7c7736 IN  0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0 BNB0.000565945
0x72075707f88597b523679d241d51205969a65efe09336a0a3f8b62120cae0eb7Enroll Self118195952021-10-16 10:06:4051 days 12 hrs ago0x07383123dfbf0a1e9eb8b5447779fd2a659ecc6e IN  0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0 BNB0.00023608
0xb4e781f4a3b1013ef136465e90d4bc36f4165ebc5ca136da0abc109d31834926Set Jackpot Elig...117314532021-10-13 8:13:4654 days 14 hrs ago0xb0251e1ff03794a4e63bc7ad47422cd144bcdcee IN  0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0 BNB0.000086055
0x886ae5a6ea7fa5c154b8ac53bb4121dd06c6c2b3b8f2b93eb85dfe07596c9f16Enroll Self117138362021-10-12 17:18:0855 days 5 hrs ago0x6e5e46f39d29dc50fe601de3a1341a9aa4830fab IN  0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0 BNB0.00023608
0x9d4725bf1983dbb66d446aacccef25f61ae61358cdbfe6294a370ce7334705e1Set Jackpot Elig...117126782021-10-12 16:20:1355 days 6 hrs ago0x61ef014259c0aa1889d82fae706edc9aad4dae82 IN  0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0 BNB0.000161115
0xeb444dbd9552e91bb09f6dca8cef3476c52844d9b66a2df47efd355078cce92aEnroll Self113460732021-09-29 20:43:4068 days 2 hrs ago0x28b558c1b47840423858e0003d896bf9f7860f67 IN  0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0 BNB0.00023608
0x6cda8af82726d01a4dbcc993aed73d34d67bcdfa805ed5b2147a8a870b25786eEnroll Self113460142021-09-29 20:40:4368 days 2 hrs ago0x98a4dfa478cc3d42bec9b5afc60ad55e8ce02a79 IN  0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0 BNB0.000565945
0x035b53d74f0e6290cb5d1d6c8781536765ae8a1881b98bd687bfad797c563128Enroll Self112661922021-09-27 1:25:1170 days 21 hrs ago0x6e5e46f39d29dc50fe601de3a1341a9aa4830fab IN  0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0 BNB0.00023608
0xf606a22adb1e7677e773e6222080b59c291e69d56955d85e2d841e03fa9d6cd8Set Jackpot Elig...111160532021-09-21 19:28:5476 days 3 hrs ago0xb0251e1ff03794a4e63bc7ad47422cd144bcdcee IN  0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0 BNB0.000119135
0x7f01ba1ddec2fae7411d1dc1c393150ed777172c52924ebba239e2d6452b9e56Set Jackpot Elig...111091142021-09-21 13:39:1276 days 9 hrs ago0xb0251e1ff03794a4e63bc7ad47422cd144bcdcee IN  0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0 BNB0.000119315
0x09fc2e7319a692d9efd06dcb2a2d56ddb86ea0fdc84b09f1f943443057d11213Set Jackpot Elig...111088422021-09-21 13:25:3476 days 9 hrs ago0xb0251e1ff03794a4e63bc7ad47422cd144bcdcee IN  0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0 BNB0.000119315
0xe7190aeed7645893ef9f1e6c364ec055b1db763368ae22003ba8ab8535692d20Authorize By Aut...111087782021-09-21 13:22:2276 days 9 hrs ago0xb0251e1ff03794a4e63bc7ad47422cd144bcdcee IN  0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0 BNB0.00011837
0xaba654471b205f0857ee887ac35feb53bffeed5d2d18b3945b3a5ffd0fefc123Check And Pay Ja...108675252021-09-13 3:37:5384 days 19 hrs ago0x98a5ef89293ee3c5d24b00d7f71e8cd165892b1f IN  0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0 BNB0.00134836
0x81e12e50b1668e7dba0a8202dfd8e197d87a831a041d9c3e107dedc726fc6389Set Jackpot Elig...108142942021-09-11 7:05:2586 days 15 hrs ago0x8427f4702831667fd58fb5a652f1c795e2b8e942 IN  0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0 BNB0.000161175
0xca81cc7c45d631a7a475a45bf4b5f95ae8250b6c8d6e56aec236770343e2d91aSet Jackpot Elig...108142482021-09-11 7:03:0786 days 15 hrs ago0x8427f4702831667fd58fb5a652f1c795e2b8e942 IN  0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0 BNB0.000140355
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xcfb97127d2ae7a2c1c5bd8169510c7c23b94423354955dbed684ae1574218097124211712021-11-06 16:20:2330 days 6 hrs ago 0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a PancakeSwap: Router v20.085787328140246575 BNB
0xcfb97127d2ae7a2c1c5bd8169510c7c23b94423354955dbed684ae1574218097124211712021-11-06 16:20:2330 days 6 hrs ago SuperFuel: SFUEL Token 0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0.085787328140246575 BNB
0x17b13ad7bf49580f141a663db2b6f7b47ac58d72b46447aedd0c6b9079fb4838124175342021-11-06 13:11:5230 days 9 hrs ago 0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a PancakeSwap: Router v20.142430506259018294 BNB
0x17b13ad7bf49580f141a663db2b6f7b47ac58d72b46447aedd0c6b9079fb4838124175342021-11-06 13:11:5230 days 9 hrs ago SuperFuel: SFUEL Token 0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0.142430506259018294 BNB
0x2a5277a489ad3471862ecf9c9f33470da17f7a986f2eedbf08f108edba2c2ee7124134322021-11-06 9:45:2430 days 13 hrs ago 0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a PancakeSwap: Router v20.180765980117496676 BNB
0x2a5277a489ad3471862ecf9c9f33470da17f7a986f2eedbf08f108edba2c2ee7124134322021-11-06 9:45:2430 days 13 hrs ago SuperFuel: SFUEL Token 0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0.180765980117496676 BNB
0xd51a91db39a8c033fbae017b3dd0500fbc3c34b31f09ac96532fe9fd304af782124008792021-11-05 23:13:3130 days 23 hrs ago 0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a PancakeSwap: Router v20.104660754266912902 BNB
0xd51a91db39a8c033fbae017b3dd0500fbc3c34b31f09ac96532fe9fd304af782124008792021-11-05 23:13:3130 days 23 hrs ago SuperFuel: SFUEL Token 0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0.104660754266912902 BNB
0x01fb9307d9db7eefa1a44faf9cf46df31d25995540cb60e1d2477234a23e8fc3123960582021-11-05 19:11:4331 days 3 hrs ago 0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a PancakeSwap: Router v20.170899533256955703 BNB
0x01fb9307d9db7eefa1a44faf9cf46df31d25995540cb60e1d2477234a23e8fc3123960582021-11-05 19:11:4331 days 3 hrs ago SuperFuel: SFUEL Token 0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0.170899533256955703 BNB
0xf5bc3fe67b14fa096313cb0a9e4ceb63ea016a354d7df902f511b29d8bc988d0123838022021-11-05 8:45:2931 days 14 hrs ago 0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a PancakeSwap: Router v20.066351361305158438 BNB
0xf5bc3fe67b14fa096313cb0a9e4ceb63ea016a354d7df902f511b29d8bc988d0123838022021-11-05 8:45:2931 days 14 hrs ago SuperFuel: SFUEL Token 0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0.066351361305158438 BNB
0x2aa99bbdc55108cb318280ed9a1392ca659c4124cd6d2ee5b45dbcf36f949486123751062021-11-05 1:28:5231 days 21 hrs ago 0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a PancakeSwap: Router v20.067644663912308554 BNB
0x2aa99bbdc55108cb318280ed9a1392ca659c4124cd6d2ee5b45dbcf36f949486123751062021-11-05 1:28:5231 days 21 hrs ago SuperFuel: SFUEL Token 0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0.067644663912308554 BNB
0x0d53128d4748d6add9d33dd118b8923a317d93a73520014df6d5b778b0739881123653122021-11-04 17:12:5432 days 5 hrs ago 0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a PancakeSwap: Router v20.069493901403300489 BNB
0x0d53128d4748d6add9d33dd118b8923a317d93a73520014df6d5b778b0739881123653122021-11-04 17:12:5432 days 5 hrs ago SuperFuel: SFUEL Token 0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0.069493901403300489 BNB
0xe607a389cc523df11516012ab781608960963c52831708ef6e7659f87125c925123645772021-11-04 16:36:0432 days 6 hrs ago 0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a PancakeSwap: Router v20.01 BNB
0x9083cff6d70cbc8d80eafbedf34d4fc805300bbdb2318b9fbaed108ceaefbdf5123514052021-11-04 4:53:5432 days 18 hrs ago 0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a PancakeSwap: Router v20.15867348953003291 BNB
0x9083cff6d70cbc8d80eafbedf34d4fc805300bbdb2318b9fbaed108ceaefbdf5123514052021-11-04 4:53:5432 days 18 hrs ago SuperFuel: SFUEL Token 0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0.15867348953003291 BNB
0xd7f4ef45e488b79574111ca05f6cdafaeba99f8466aaa3e6777b1422fe0eca10123352862021-11-03 15:06:1933 days 7 hrs ago 0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a PancakeSwap: Router v20.125299456074290617 BNB
0xd7f4ef45e488b79574111ca05f6cdafaeba99f8466aaa3e6777b1422fe0eca10123352862021-11-03 15:06:1933 days 7 hrs ago SuperFuel: SFUEL Token 0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0.125299456074290617 BNB
0x540425746e99a069e63445e01e325a855918a1d602fdd8ed6a77c101fcff12f1123162832021-11-02 22:26:3034 days 35 mins ago 0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a PancakeSwap: Router v20.08128803703345874 BNB
0x540425746e99a069e63445e01e325a855918a1d602fdd8ed6a77c101fcff12f1123162832021-11-02 22:26:3034 days 35 mins ago SuperFuel: SFUEL Token 0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0.08128803703345874 BNB
0x2b12cfe40b55921852254deda70a28eb006bae9e6703df172fa5b762eb93333c122982642021-11-02 7:01:3534 days 16 hrs ago 0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a PancakeSwap: Router v20.108542053523382081 BNB
0x2b12cfe40b55921852254deda70a28eb006bae9e6703df172fa5b762eb93333c122982642021-11-02 7:01:3534 days 16 hrs ago SuperFuel: SFUEL Token 0xb70be2b22c85a08cf09eee2bf3f2f11c8226c02a0.108542053523382081 BNB
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SuperFuelSmartLotteryV2

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 100 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 21 : SuperFuelSmartLotteryV2.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;

import "./SuperFuelSmartLottery.sol";

contract SuperFuelSmartLotteryV2 is SuperFuelSmartLottery {
    SuperFuelSmartLottery private lotteryV1;
    address payable[] private postProcessQueue;

    constructor(address superFuel, address _lotteryV1, address _router, address _rewardsToken) SuperFuelSmartLottery(superFuel, _router, _rewardsToken) public {
        lotteryV1 = SuperFuelSmartLottery(payable(_lotteryV1));
        draw = lotteryV1.draw();
        for(uint256 i = 1; i < draw; i++) {
            (string memory name, address add, uint drawNo, uint prize) = lotteryV1.winnersByRound(i);
            winnersByRound[i] = WinnerLog(name, add, drawNo, prize);
        }
    }

    function logTransfer(address payable from, uint256 fromBalance, address payable to, uint256 toBalance) public override onlyOwner {
        _logTransfer(from, fromBalance, to, toBalance);
        if(!locked)
            _postProcess(2);
        postProcessQueue.push(from);
        postProcessQueue.push(to);
    }

    function _postProcess(uint256 maxProcess) internal lockFunction {
        for(uint256 i = 0; i < maxProcess; i++) {
            if(postProcessQueue.length == 0)
                break;
            address payable currentIndex = postProcessQueue[0];
            uint256 bal = superFuelToken.balanceOf(currentIndex);
            _logTransfer(payable(deadAddress), 0, currentIndex, bal);
            postProcessQueue[0] = postProcessQueue[postProcessQueue.length - 1];
            postProcessQueue.pop();
        }
    }

    function postProcess(uint256 maxQty) external authorized {
        if(!locked)
            _postProcess(maxQty);
    }

    function enrollSelf() external {
        if(!locked)
            _update(payable(_msgSender()));
    }

    function batchUpdate(address payable[] memory addressList) external authorized {
        for(uint256 i = 0; i < addressList.length; i++){
            if(!locked)
                _update(addressList[i]);
        }
    }

    function update(address payable hodlerAddress) external authorized {
        if(!locked)
            _update(hodlerAddress);
    }

    function _update(address payable hodlerAddress) internal lockFunction {
        uint256 bal = superFuelToken.balanceOf(hodlerAddress);
        _logTransfer(payable(deadAddress), 0, hodlerAddress, bal);
    }

}

File 2 of 21 : SuperFuelSmartLottery.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;

import '@pancakeswap/pancake-swap-lib/contracts/math/SafeMath.sol';
import '@pancakeswap/pancake-swap-lib/contracts/utils/Address.sol';
import '@pancakeswap/pancake-swap-lib/contracts/GSN/Context.sol';
import '@pancakeswap/pancake-swap-lib/contracts/utils/EnumerableSet.sol';
import "./interfaces/ISmartLottery.sol";
import "./utils/AuthorizedListExt.sol";
import "./utils/LockableFunction.sol";
import "./utils/LPSwapSupport.sol";
import "./utils/UserInfoManager.sol";


contract SuperFuelSmartLottery is ISmartLottery, LPSwapSupport, LockableFunction, AuthorizedListExt, UserInfoManager {
    using EnumerableSet for EnumerableSet.AddressSet;

    RewardType private rewardType;
    IBEP20 public lotteryToken;
    IBEP20 public superFuelToken;
    uint256 private superFuelDecimals = 9;
    JackpotRequirements public eligibilityCriteria;
    RewardInfo private rewardTokenInfo;

    address[] public pastWinners;
    EnumerableSet.AddressSet private jackpotParticipants;
    uint256 private maxAttemptsToFindWinner = 10;

    uint256 private jackpot;
    uint256 public override draw = 1;

    uint256 private defaultDecimals = 10 ** 18;

    mapping(uint256 => WinnerLog) public winnersByRound;
    mapping(address => bool) public isExcludedFromJackpot;

    constructor(address superFuel, address _router, address _rewardsToken) AuthorizedListExt(true) public {
        updateRouter(_router);
        superFuelToken = IBEP20(payable(superFuel));
        minSpendAmount = 0;
        maxSpendAmount = 100 ether;

        if(_rewardsToken == address(0)){
            rewardType = RewardType.CURRENCY;
            rewardTokenInfo.name = "BNB";
            rewardTokenInfo.rewardAddress = address(0);
            rewardTokenInfo.decimals = defaultDecimals;
        } else {
            rewardType = RewardType.TOKEN;
            lotteryToken = IBEP20(payable(_rewardsToken));
            rewardTokenInfo.name = lotteryToken.name();
            rewardTokenInfo.rewardAddress = _rewardsToken;
            rewardTokenInfo.decimals = 10 ** uint256(lotteryToken.decimals());
        }

        jackpot = 12 * 10 ** 8 * rewardTokenInfo.decimals;

        eligibilityCriteria = JackpotRequirements({
            minSuperFuelBalance: 100 * 10 ** 6 * 10 ** 9,
            minDrawsSinceLastWin: 1,
            timeSinceLastTransfer: 48 hours
        });

        isExcludedFromJackpot[address(this)] = true;
        isExcludedFromJackpot[superFuel] = true;
        isExcludedFromJackpot[deadAddress] = true;

        address owner1 = address(0x8427F4702831667Fd58Fb5a652F1c795e2B8E942);
        address owner2 = address(0xa4a91638919a45A0B485DBb57D6BFdeA9051B129);
        authorizedCaller[owner1] = true;
        authorizedCaller[owner2] = true;

        _owner = superFuel;
    }

    receive() external payable{
        if(!inSwap)
            swap();
    }

    function deposit() external payable virtual override onlyOwner {
        if(!inSwap)
            swap();
    }

    function rewardCurrency() external view override returns(string memory){
        return rewardTokenInfo.name;
    }

    function swap() lockTheSwap internal {
        if(rewardType == RewardType.TOKEN) {
            uint256 contractBalance = address(this).balance;
            swapCurrencyForTokensAdv(address(lotteryToken), contractBalance, address(this));
        }
    }

    function setJackpotToCurrency(bool andSwap) external virtual override authorized {
        require(rewardType != RewardType.CURRENCY, "Rewards already set to reflect currency");
        if(!inSwap)
            resetToCurrency(andSwap);
    }

    function resetToCurrency(bool andSwap) private lockTheSwap {
        uint256 contractBalance = lotteryToken.balanceOf(address(this));
        if(contractBalance > rewardTokenInfo.decimals && andSwap){
            swapTokensForCurrencyAdv(address(lotteryToken), contractBalance, address(this));
        }
        lotteryToken = IBEP20(0);

        rewardTokenInfo.name = "BNB";
        rewardTokenInfo.rewardAddress = address(0);
        rewardTokenInfo.decimals = defaultDecimals;

        rewardType = RewardType.CURRENCY;
    }

    function setJackpotToToken(address _tokenAddress, bool andSwap) external virtual override authorized{
        require(rewardType != RewardType.TOKEN || _tokenAddress != address(lotteryToken), "Rewards already set to reflect this token");
        if(!inSwap)
            resetToToken(_tokenAddress, andSwap);
    }

    function resetToToken(address _tokenAddress, bool andSwap) private lockTheSwap {
        uint256 contractBalance;
        if(rewardType == RewardType.TOKEN && andSwap){
            contractBalance = lotteryToken.balanceOf(address(this));
            if(contractBalance > rewardTokenInfo.decimals)
                swapTokensForCurrencyAdv(address(lotteryToken), contractBalance, address(this));
        }
        contractBalance = address(this).balance;
        swapCurrencyForTokensAdv(_tokenAddress, contractBalance, address(this));

        lotteryToken = IBEP20(payable(_tokenAddress));

        rewardTokenInfo.name = lotteryToken.name();
        rewardTokenInfo.rewardAddress = _tokenAddress;
        rewardTokenInfo.decimals = 10 ** uint256(lotteryToken.decimals());

        rewardType = RewardType.TOKEN;
    }

    function lotteryBalance() public view returns(uint256 balance){
        balance =  _lotteryBalance();
        balance = balance.div(rewardTokenInfo.decimals);
    }

    function _lotteryBalance() internal view returns(uint256 balance){
        if(rewardType == RewardType.CURRENCY){
            balance =  address(this).balance;
        } else {
            balance = lotteryToken.balanceOf(address(this));
        }
    }

    function jackpotAmount() public override view returns(uint256 balance) {
        balance = jackpot;
        if(rewardTokenInfo.decimals > 0){
            balance = balance.div(rewardTokenInfo.decimals);
        }
    }

    function setJackpot(uint256 newJackpot) external override authorized {
        require(newJackpot > 0, "Jackpot must be set above 0");
        jackpot = newJackpot;
        if(rewardTokenInfo.decimals > 0){
            jackpot = jackpot.mul(rewardTokenInfo.decimals);
        }
        emit JackpotSet(rewardTokenInfo.name, newJackpot);
    }

    function checkAndPayJackpot() public override returns(bool){
        if(_lotteryBalance() >= jackpot && !locked){
            return _selectAndPayWinner();
        }
        return false;
    }

    function isJackpotReady() external view override returns(bool){
        return _lotteryBalance() >= jackpot;
    }

    function _selectAndPayWinner() private lockFunction returns(bool winnerFound){
        winnerFound = false;
        uint256 possibleWinner = pseudoRand();
        uint256 numParticipants = jackpotParticipants.length();

        uint256 maxAttempts = maxAttemptsToFindWinner >= numParticipants ? numParticipants : maxAttemptsToFindWinner;

        for(uint256 attempts = 0; attempts < maxAttempts; attempts++){
            possibleWinner = possibleWinner.add(attempts);
            if(possibleWinner >= numParticipants){
                possibleWinner = 0;
            }
            if(_isEligibleForJackpot(jackpotParticipants.at(possibleWinner))){
                reward(jackpotParticipants.at(possibleWinner));
                winnerFound = true;
                break;
            }
        }
    }

    function reward(address winner) private {
        if(rewardType == RewardType.CURRENCY){
            winner.call{value: jackpot}("");
        } else if(rewardType == RewardType.TOKEN){
            lotteryToken.transfer(winner, jackpot);
        }
        winnersByRound[draw] = WinnerLog({
            rewardName: rewardTokenInfo.name,
            winnerAddress: winner,
            drawNumber: draw,
            prizeWon: jackpot
        });

        hodlerInfo[winner].lastWin = draw;
        pastWinners.push(winner);

        emit JackpotWon(winner, rewardTokenInfo.name, jackpot, draw);
        ++draw;
    }

    function isEligibleForJackpot(address participant) external view returns(bool){
        if(!jackpotParticipants.contains(participant) || hodlerInfo[participant].tokenBalance < eligibilityCriteria.minSuperFuelBalance)
            return false;
        return _isEligibleForJackpot(participant);
    }

    function _isEligibleForJackpot(address participant) private view returns(bool){
        uint256 drawRange = eligibilityCriteria.minDrawsSinceLastWin >= draw ? draw : eligibilityCriteria.minDrawsSinceLastWin;
        if(hodlerInfo[participant].lastTransfer < block.timestamp.sub(eligibilityCriteria.timeSinceLastTransfer)
                && (hodlerInfo[participant].lastWin == 0 || hodlerInfo[participant].lastWin < draw.sub(drawRange))){
            return !isExcludedFromJackpot[participant];
        }
        return false;
    }

    function pseudoRand() private view returns(uint256){
        uint256 nonce = draw.add(_lotteryBalance());
        uint256 modulo = jackpotParticipants.length();
        uint256 someValue = uint256(keccak256(abi.encodePacked(nonce, msg.sender, gasleft(), block.timestamp, draw, jackpotParticipants.at(0))));
        return someValue.mod(modulo);
    }

    function excludeFromJackpot(address user, bool shouldExclude) public override authorized {
        if(isExcludedFromJackpot[user] && !shouldExclude && hodlerInfo[user].tokenBalance >= eligibilityCriteria.minSuperFuelBalance)
            jackpotParticipants.add(user);
        if(!isExcludedFromJackpot[user] && shouldExclude)
            jackpotParticipants.remove(user);
        isExcludedFromJackpot[user] = shouldExclude;
    }

    function logTransfer(address payable from, uint256 fromBalance, address payable to, uint256 toBalance) public virtual override(ISmartLottery, UserInfoManager) onlyOwner {
        _logTransfer(from, fromBalance, to, toBalance);
    }

    function _logTransfer(address payable from, uint256 fromBalance, address payable to, uint256 toBalance) internal virtual override {
        super._logTransfer(from, fromBalance, to, toBalance);

        if(!isExcludedFromJackpot[from]){
            if(fromBalance >= eligibilityCriteria.minSuperFuelBalance){
                jackpotParticipants.add(from);
            } else {
                jackpotParticipants.remove(from);
            }
        }

        if(!isExcludedFromJackpot[to]){
            if(toBalance >= eligibilityCriteria.minSuperFuelBalance){
                jackpotParticipants.add(to);
            } else {
                jackpotParticipants.remove(to);
            }
        }
    }

    function _approve(address, address, uint256) internal override {
        require(false);
    }

    function setMaxAttempts(uint256 attemptsToFindWinner) external override authorized {
        require(attemptsToFindWinner > 0 && attemptsToFindWinner != maxAttemptsToFindWinner, "Invalid or duplicate value");
        maxAttemptsToFindWinner = attemptsToFindWinner;
    }

    function setJackpotEligibilityCriteria(uint256 minSuperFuelBalance, uint256 minDrawsSinceWin, uint256 timeSinceLastTransferHours) external override authorized {
        JackpotRequirements memory newCriteria = JackpotRequirements({
            minSuperFuelBalance: minSuperFuelBalance * 10 ** superFuelDecimals,
            minDrawsSinceLastWin: minDrawsSinceWin,
            timeSinceLastTransfer: timeSinceLastTransferHours * 1 hours
        });
        emit JackpotCriteriaUpdated(minSuperFuelBalance, minDrawsSinceWin, timeSinceLastTransferHours);
        eligibilityCriteria = newCriteria;
    }

}

File 3 of 21 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.4.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, 'SafeMath: addition overflow');

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, 'SafeMath: subtraction overflow');
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, 'SafeMath: multiplication overflow');

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, 'SafeMath: division by zero');
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, 'SafeMath: modulo by zero');
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }

    function min(uint256 x, uint256 y) internal pure returns (uint256 z) {
        z = x < y ? x : y;
    }

    // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
    function sqrt(uint256 y) internal pure returns (uint256 z) {
        if (y > 3) {
            z = y;
            uint256 x = y / 2 + 1;
            while (x < z) {
                z = x;
                x = (y / x + x) / 2;
            }
        } else if (y != 0) {
            z = 1;
        }
    }
}

File 4 of 21 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.2;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            codehash := extcodehash(account)
        }
        return (codehash != accountHash && codehash != 0x0);
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, 'Address: insufficient balance');

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{value: amount}('');
        require(success, 'Address: unable to send value, recipient may have reverted');
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, 'Address: low-level call failed');
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return _functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, 'Address: low-level call with value failed');
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, 'Address: insufficient balance for call');
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(
        address target,
        bytes memory data,
        uint256 weiValue,
        string memory errorMessage
    ) private returns (bytes memory) {
        require(isContract(target), 'Address: call to non-contract');

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{value: weiValue}(data);
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 5 of 21 : Context.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.4.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
contract Context {
    // Empty internal constructor, to prevent people from mistakenly deploying
    // an instance of this contract, which should be used via inheritance.
    constructor() internal {}

    function _msgSender() internal view returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 6 of 21 : EnumerableSet.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.0.0, only sets of type `address` (`AddressSet`) and `uint256`
 * (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.

            bytes32 lastvalue = set._values[lastIndex];

            // Move the last value to the index where the value to delete is
            set._values[toDeleteIndex] = lastvalue;
            // Update the index for the moved value
            set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        require(set._values.length > index, 'EnumerableSet: index out of bounds');
        return set._values[index];
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(value)));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(value)));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(value)));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint256(_at(set._inner, index)));
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }
}

File 7 of 21 : ISmartLottery.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;

import "./IBaseDistributor.sol";
import "./IUserInfoManager.sol";
import "./IAuthorizedList.sol";

interface ISmartLottery is IBaseDistributor, IAuthorizedListExt, IAuthorizedList {
    struct WinnerLog{
        string rewardName;
        address winnerAddress;
        uint256 drawNumber;
        uint256 prizeWon;
    }

    struct JackpotRequirements{
        uint256 minSuperFuelBalance;
        uint256 minDrawsSinceLastWin;
        uint256 timeSinceLastTransfer;
    }

    event JackpotSet(string indexed tokenName, uint256 JackpotAmount);
    event JackpotWon(address indexed winner, string indexed reward, uint256 amount, uint256 drawNo);
    event JackpotCriteriaUpdated(uint256 minSuperFuelBalance, uint256 minDrawsSinceLastWin, uint256 timeSinceLastTransfer);

    function draw() external pure returns(uint256);
    function jackpotAmount() external view returns(uint256);
    function isJackpotReady() external view returns(bool);
    function setJackpot(uint256 newJackpot) external;
    function checkAndPayJackpot() external returns(bool);
    function excludeFromJackpot(address shareholder, bool shouldExclude) external;
    function setMaxAttempts(uint256 attemptsToFindWinner) external;

    function setJackpotToCurrency(bool andSwap) external;
    function setJackpotToToken(address _tokenAddress, bool andSwap) external;
    function setJackpotEligibilityCriteria(uint256 minSuperFuelBalance, uint256 minDrawsSinceWin, uint256 timeSinceLastTransferHours) external;
    function logTransfer(address payable from, uint256 fromBalance, address payable to, uint256 toBalance) external;
}

File 8 of 21 : AuthorizedListExt.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;

import "../interfaces/IAuthorizedList.sol";
import "./AuthorizedList.sol";

contract AuthorizedListExt is IAuthorizedListExt, AuthorizedList {
    bool private multiAuth;

    constructor(bool allowNonOwnerAuths) public AuthorizedList() {
        multiAuth = allowNonOwnerAuths;
    }

    function authorizeByAuthorized(address authAddress) external virtual override authorized {
        require(multiAuth, "Option not set to allow this function");
        authorizedCaller[authAddress] = true;
        emit AuthorizationUpdated(authAddress, true);
    }
}

File 9 of 21 : LockableFunction.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;

abstract contract LockableFunction {
    bool internal locked;

    modifier lockFunction {
        locked = true;
        _;
        locked = false;
    }
}

File 10 of 21 : LPSwapSupport.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0;

/**
There are far too many uses for the LP swapping pool.
Rather than rewrite them, this contract performs them for us and uses both generic and specific calls.
-The Dev
*/
import '@pancakeswap/pancake-swap-lib/contracts/token/BEP20/IBEP20.sol';
import '@pancakeswap/pancake-swap-lib/contracts/math/SafeMath.sol';
import '@pancakeswap-libs/pancake-swap-core/contracts/interfaces/IPancakePair.sol';
import '@pancakeswap-libs/pancake-swap-core/contracts/interfaces/IPancakeFactory.sol';
import 'pancakeswap-peripheral/contracts/interfaces/IPancakeRouter02.sol';
import "./AuthorizedList.sol";

abstract contract LPSwapSupport is AuthorizedList {
    using SafeMath for uint256;
    event UpdateRouter(address indexed newAddress, address indexed oldAddress);
    event UpdatePair(address indexed newAddress, address indexed oldAddress);
    event UpdateLPReceiver(address indexed newAddress, address indexed oldAddress);
    event SwapAndLiquifyEnabledUpdated(bool enabled);

    event SwapAndLiquify(
        uint256 tokensSwapped,
        uint256 currencyReceived,
        uint256 tokensIntoLiqudity
    );

    modifier lockTheSwap {
        inSwap = true;
        _;
        inSwap = false;
    }

    bool internal inSwap;
    bool public swapsEnabled = true;

    uint256 public minSpendAmount = 0.001 ether;
    uint256 public maxSpendAmount = 1 ether;

    IPancakeRouter02 public pancakeRouter;
    address public pancakePair;
    address public liquidityReceiver = deadAddress;
    address public deadAddress = 0x000000000000000000000000000000000000dEaD;

    function _approve(address owner, address spender, uint256 tokenAmount) internal virtual;

    function updateRouter(address newAddress) public authorized {
        require(newAddress != address(pancakeRouter), "The router is already set to this address");
        emit UpdateRouter(newAddress, address(pancakeRouter));
        pancakeRouter = IPancakeRouter02(newAddress);
    }

    function updateLiquidityReceiver(address receiverAddress) external onlyOwner{
        require(receiverAddress != liquidityReceiver, "LP is already sent to that address");
        emit UpdateLPReceiver(receiverAddress, liquidityReceiver);
        liquidityReceiver = receiverAddress;
    }

    function updateRouterAndPair(address newAddress) public virtual authorized {
        if(newAddress != address(pancakeRouter)){
            updateRouter(newAddress);
        }
        address _pancakeswapV2Pair = IPancakeFactory(pancakeRouter.factory()).createPair(address(this), pancakeRouter.WETH());
        if(_pancakeswapV2Pair != pancakePair){
            updateLPPair(_pancakeswapV2Pair);
        }
    }

    function updateLPPair(address newAddress) public virtual authorized {
        require(newAddress != pancakePair, "The LP Pair is already set to this address");
        emit UpdatePair(newAddress, pancakePair);
        pancakePair = newAddress;
    }

    function setSwapAndLiquifyEnabled(bool _enabled) public authorized {
        swapsEnabled = _enabled;
        emit SwapAndLiquifyEnabledUpdated(_enabled);
    }

    function swapAndLiquify(uint256 tokens) internal {
        // split the contract balance into halves
        uint256 half = tokens.div(2);
        uint256 otherHalf = tokens.sub(half);

        // capture the contract's current ETH balance.
        // this is so that we can capture exactly the amount of ETH that the
        // swap creates, and not make the liquidity event include any ETH that
        // has been manually sent to the contract
        uint256 initialBalance = address(this).balance;

        // swap tokens for
        swapTokensForCurrency(half);

        // how much did we just swap into?
        uint256 newBalance = address(this).balance.sub(initialBalance);

        // add liquidity to uniswap
        addLiquidity(otherHalf, newBalance);

        emit SwapAndLiquify(half, newBalance, otherHalf);
    }

    function swapTokensForCurrency(uint256 tokenAmount) internal {
        swapTokensForCurrencyAdv(address(this), tokenAmount, address(this));
    }

    function swapTokensForCurrencyAdv(address tokenAddress, uint256 tokenAmount, address destination) internal {

        // generate the uniswap pair path of token -> weth
        address[] memory path = new address[](2);
        path[0] = tokenAddress;
        path[1] = pancakeRouter.WETH();

        if(tokenAddress != address(this)){
            IBEP20(tokenAddress).approve(address(pancakeRouter), tokenAmount);
        } else {
            _approve(address(this), address(pancakeRouter), tokenAmount);
        }

        // make the swap
        pancakeRouter.swapExactTokensForETHSupportingFeeOnTransferTokens(
            tokenAmount,
            0, // accept any amount of ETH
            path,
            destination,
            block.timestamp
        );
    }

    function addLiquidity(uint256 tokenAmount, uint256 cAmount) private {

        // approve token transfer to cover all possible scenarios
        _approve(address(this), address(pancakeRouter), tokenAmount);

        // add the liquidity
        pancakeRouter.addLiquidityETH{value: cAmount}(
            address(this),
            tokenAmount,
            0, // slippage is unavoidable
            0, // slippage is unavoidable
            liquidityReceiver,
            block.timestamp
        );
    }

    function swapCurrencyForTokens(uint256 amount) internal {
        swapCurrencyForTokensAdv(address(this), amount, address(this));
    }

    function swapCurrencyForTokensAdv(address tokenAddress, uint256 amount, address destination) internal {
        // generate the pair path of token
        address[] memory path = new address[](2);
        path[0] = pancakeRouter.WETH();
        path[1] = tokenAddress;
        if(amount > address(this).balance){
            amount = address(this).balance;
        }
        if(amount > maxSpendAmount){
            amount = maxSpendAmount;
        }
        if(amount < minSpendAmount) {return;}

        // make the swap
        pancakeRouter.swapExactETHForTokensSupportingFeeOnTransferTokens{value: amount}(
            0,
            path,
            destination,
            block.timestamp.add(400)
        );
    }

    function updateSwapRange(uint256 minAmount, uint256 maxAmount) external authorized {
        require(minAmount <= maxAmount, "Minimum must be less than maximum");
        minSpendAmount = minAmount;
        maxSpendAmount = maxAmount;
    }
}

File 11 of 21 : UserInfoManager.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;

import '@pancakeswap/pancake-swap-lib/contracts/utils/Address.sol';
import '@pancakeswap/pancake-swap-lib/contracts/math/SafeMath.sol';
import "./Ownable.sol";
import "../interfaces/IUserInfoManager.sol";

abstract contract UserInfoManager is Ownable {
    using Address for address;
    using SafeMath for uint256;

    struct User {
        uint256 tokenBalance;
        uint256 lastReceive;
        uint256 lastTransfer;
        bool exists;
        uint256 lastWin;
    }

    mapping(address => User) internal hodlerInfo;

    function logTransfer(address payable from, uint256 fromBalance, address payable to, uint256 toBalance) public virtual onlyOwner {
        _logTransfer(from, fromBalance, to, toBalance);
    }

    function _logTransfer(address payable from, uint256 fromBalance, address payable to, uint256 toBalance) internal virtual {
        hodlerInfo[from].tokenBalance = fromBalance;
        hodlerInfo[from].lastTransfer = block.timestamp;
        if(!hodlerInfo[from].exists){
            hodlerInfo[from].exists = true;
        }
        hodlerInfo[to].tokenBalance = toBalance;
        hodlerInfo[to].lastReceive = block.timestamp;
        if(!hodlerInfo[to].exists){
            hodlerInfo[to].exists = true;
        }
    }
}

File 12 of 21 : IBaseDistributor.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;

interface IBaseDistributor {
    enum RewardType{
        TOKEN,
        CURRENCY
    }

    struct RewardInfo{
        string name;
        address rewardAddress;
        uint256 decimals;
    }

    function deposit() external payable;
    function rewardCurrency() external view returns(string memory);

}

File 13 of 21 : IUserInfoManager.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;

interface IUserInfoManager {
//    function logTransfer(address payable from, uint256 fromBalance, address payable to, uint256 toBalance) external;
}

File 14 of 21 : IAuthorizedList.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;

interface IAuthorizedList {
    function authorizeCaller(address authAddress, bool shouldAuthorize) external;
}

interface IAuthorizedListExt {
    function authorizeByAuthorized(address authAddress) external;
}

File 15 of 21 : AuthorizedList.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;

import '@pancakeswap/pancake-swap-lib/contracts/GSN/Context.sol';
import '@pancakeswap/pancake-swap-lib/contracts/utils/Address.sol';
import "./Ownable.sol";
import "../interfaces/IAuthorizedList.sol";

contract AuthorizedList is IAuthorizedList, Context, Ownable
{
    using Address for address;

    event AuthorizationUpdated(address indexed user, bool authorized);
    event AuthorizationRenounced(address indexed user);

    mapping(address => bool) internal authorizedCaller;

    modifier authorized() {
        require(authorizedCaller[_msgSender()] || _msgSender() == _owner, "You are not authorized to use this function");
        require(_msgSender() != address(0), "Zero address is not a valid caller");
        _;
    }

    constructor() public Ownable() {
        authorizedCaller[_msgSender()] = true;
    }

    function authorizeCaller(address authAddress, bool shouldAuthorize) external virtual override onlyOwner {
        authorizedCaller[authAddress] = shouldAuthorize;
        emit AuthorizationUpdated(authAddress, shouldAuthorize);
    }

    function renounceAuthorization() external authorized {
        authorizedCaller[_msgSender()] = false;
        emit AuthorizationRenounced(_msgSender());
    }
}

File 16 of 21 : Ownable.sol
// SPDX-License-Identifier: MIT

import '@pancakeswap/pancake-swap-lib/contracts/GSN/Context.sol';

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
pragma solidity >=0.6.0;
abstract contract Ownable is Context {
    address public _owner;
    address private _previousOwner;
    uint256 private _lockTime;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    constructor() internal {
        _owner = _msgSender();
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(_owner == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
    * @dev Leaves the contract without owner. It will not be possible to call
    * `onlyOwner` functions anymore. Can only be called by the current owner.
    *
    * NOTE: Renouncing ownership will leave the contract without an owner,
    * thereby removing any functionality that is only available to the owner.
    */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
        _previousOwner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
        _previousOwner = newOwner;
    }

    function geUnlockTime() public view returns (uint256) {
        return _lockTime;
    }

    //Locks the contract for owner for the amount of time provided
    function lock(uint256 time) public virtual onlyOwner {
        _previousOwner = _owner;
        _owner = address(0);
        _lockTime = block.timestamp + time;
        emit OwnershipTransferred(_owner, address(0));
    }

    //Unlocks the contract for owner when _lockTime is exceeds
    function unlock() public virtual {
        require(_previousOwner == msg.sender, "You don't have permission to unlock");
        require(block.timestamp > _lockTime , "Contract is not unlockable yet");
        emit OwnershipTransferred(_owner, _previousOwner);
        _owner = _previousOwner;
    }
}

File 17 of 21 : IBEP20.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.4.0;

interface IBEP20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the token decimals.
     */
    function decimals() external view returns (uint8);

    /**
     * @dev Returns the token symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the token name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the bep token owner.
     */
    function getOwner() external view returns (address);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address _owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 18 of 21 : IPancakePair.sol
pragma solidity >=0.5.0;

interface IPancakePair {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    function name() external pure returns (string memory);
    function symbol() external pure returns (string memory);
    function decimals() external pure returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);
    function PERMIT_TYPEHASH() external pure returns (bytes32);
    function nonces(address owner) external view returns (uint);

    function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;

    event Mint(address indexed sender, uint amount0, uint amount1);
    event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
    event Swap(
        address indexed sender,
        uint amount0In,
        uint amount1In,
        uint amount0Out,
        uint amount1Out,
        address indexed to
    );
    event Sync(uint112 reserve0, uint112 reserve1);

    function MINIMUM_LIQUIDITY() external pure returns (uint);
    function factory() external view returns (address);
    function token0() external view returns (address);
    function token1() external view returns (address);
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
    function price0CumulativeLast() external view returns (uint);
    function price1CumulativeLast() external view returns (uint);
    function kLast() external view returns (uint);

    function mint(address to) external returns (uint liquidity);
    function burn(address to) external returns (uint amount0, uint amount1);
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
    function skim(address to) external;
    function sync() external;

    function initialize(address, address) external;
}

File 19 of 21 : IPancakeFactory.sol
pragma solidity >=0.5.0;

interface IPancakeFactory {
    event PairCreated(address indexed token0, address indexed token1, address pair, uint);

    function feeTo() external view returns (address);
    function feeToSetter() external view returns (address);

    function getPair(address tokenA, address tokenB) external view returns (address pair);
    function allPairs(uint) external view returns (address pair);
    function allPairsLength() external view returns (uint);

    function createPair(address tokenA, address tokenB) external returns (address pair);

    function setFeeTo(address) external;
    function setFeeToSetter(address) external;
}

File 20 of 21 : IPancakeRouter02.sol
pragma solidity >=0.6.2;

import './IPancakeRouter01.sol';

interface IPancakeRouter02 is IPancakeRouter01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountETH);
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}

File 21 of 21 : IPancakeRouter01.sol
pragma solidity >=0.6.2;

interface IPancakeRouter01 {
    function factory() external pure returns (address);
    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountETH);
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountETH);
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);
    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 100
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"superFuel","type":"address"},{"internalType":"address","name":"_lotteryV1","type":"address"},{"internalType":"address","name":"_router","type":"address"},{"internalType":"address","name":"_rewardsToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"AuthorizationRenounced","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"bool","name":"authorized","type":"bool"}],"name":"AuthorizationUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"minSuperFuelBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"minDrawsSinceLastWin","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timeSinceLastTransfer","type":"uint256"}],"name":"JackpotCriteriaUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"tokenName","type":"string"},{"indexed":false,"internalType":"uint256","name":"JackpotAmount","type":"uint256"}],"name":"JackpotSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"winner","type":"address"},{"indexed":true,"internalType":"string","name":"reward","type":"string"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"drawNo","type":"uint256"}],"name":"JackpotWon","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokensSwapped","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"currencyReceived","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokensIntoLiqudity","type":"uint256"}],"name":"SwapAndLiquify","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"SwapAndLiquifyEnabledUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newAddress","type":"address"},{"indexed":true,"internalType":"address","name":"oldAddress","type":"address"}],"name":"UpdateLPReceiver","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newAddress","type":"address"},{"indexed":true,"internalType":"address","name":"oldAddress","type":"address"}],"name":"UpdatePair","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newAddress","type":"address"},{"indexed":true,"internalType":"address","name":"oldAddress","type":"address"}],"name":"UpdateRouter","type":"event"},{"inputs":[],"name":"_owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"authAddress","type":"address"}],"name":"authorizeByAuthorized","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"authAddress","type":"address"},{"internalType":"bool","name":"shouldAuthorize","type":"bool"}],"name":"authorizeCaller","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable[]","name":"addressList","type":"address[]"}],"name":"batchUpdate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"checkAndPayJackpot","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deadAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"draw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eligibilityCriteria","outputs":[{"internalType":"uint256","name":"minSuperFuelBalance","type":"uint256"},{"internalType":"uint256","name":"minDrawsSinceLastWin","type":"uint256"},{"internalType":"uint256","name":"timeSinceLastTransfer","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"enrollSelf","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"bool","name":"shouldExclude","type":"bool"}],"name":"excludeFromJackpot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"geUnlockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"participant","type":"address"}],"name":"isEligibleForJackpot","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isExcludedFromJackpot","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isJackpotReady","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"jackpotAmount","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liquidityReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"time","type":"uint256"}],"name":"lock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"from","type":"address"},{"internalType":"uint256","name":"fromBalance","type":"uint256"},{"internalType":"address payable","name":"to","type":"address"},{"internalType":"uint256","name":"toBalance","type":"uint256"}],"name":"logTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lotteryBalance","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lotteryToken","outputs":[{"internalType":"contract IBEP20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSpendAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minSpendAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pancakePair","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pancakeRouter","outputs":[{"internalType":"contract IPancakeRouter02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"pastWinners","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"maxQty","type":"uint256"}],"name":"postProcess","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardCurrency","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"newJackpot","type":"uint256"}],"name":"setJackpot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"minSuperFuelBalance","type":"uint256"},{"internalType":"uint256","name":"minDrawsSinceWin","type":"uint256"},{"internalType":"uint256","name":"timeSinceLastTransferHours","type":"uint256"}],"name":"setJackpotEligibilityCriteria","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"andSwap","type":"bool"}],"name":"setJackpotToCurrency","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"bool","name":"andSwap","type":"bool"}],"name":"setJackpotToToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"attemptsToFindWinner","type":"uint256"}],"name":"setMaxAttempts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_enabled","type":"bool"}],"name":"setSwapAndLiquifyEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"superFuelToken","outputs":[{"internalType":"contract IBEP20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapsEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"hodlerAddress","type":"address"}],"name":"update","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAddress","type":"address"}],"name":"updateLPPair","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiverAddress","type":"address"}],"name":"updateLiquidityReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAddress","type":"address"}],"name":"updateRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAddress","type":"address"}],"name":"updateRouterAndPair","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"minAmount","type":"uint256"},{"internalType":"uint256","name":"maxAmount","type":"uint256"}],"name":"updateSwapRange","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"winnersByRound","outputs":[{"internalType":"string","name":"rewardName","type":"string"},{"internalType":"address","name":"winnerAddress","type":"address"},{"internalType":"uint256","name":"drawNumber","type":"uint256"},{"internalType":"uint256","name":"prizeWon","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040526004805461ff00191661010017905566038d7ea4c68000600555670de0b6b3a76400006006819055600a8054600980546001600160a01b03199081166001600160a01b03841617825590911661dead178255600e556018556001601a55601b553480156200007157600080fd5b5060405162004f8e38038062004f8e833981810160405260808110156200009757600080fd5b50805160208201516040830151606090930151919290918382826001620000bd62000770565b600080546001600160a01b0319166001600160a01b0392909216919091178155600190600390620000ed62000770565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055600a805460ff60a81b1916600160a81b921515929092029190911790556200013d8262000774565b600d80546001600160a01b0319166001600160a01b0385811691909117909155600060055568056bc75e2d631000006006558116620001cc57600c805460ff191660011790556040805180820190915260038082526221272160e91b6020909201918252620001af9160129162000904565b50601380546001600160a01b0319169055601b54601455620003d5565b600c80546001600160a81b0319166101006001600160a01b0384811682029290921792839055604080516306fdde0360e01b8152905191909304909116916306fdde03916004808301926000929190829003018186803b1580156200023057600080fd5b505afa15801562000245573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156200026f57600080fd5b81019080805160405193929190846401000000008211156200029057600080fd5b908301906020820185811115620002a657600080fd5b8251640100000000811182820188101715620002c157600080fd5b82525081516020918201929091019080838360005b83811015620002f0578181015183820152602001620002d6565b50505050905090810190601f1680156200031e5780820380516001836020036101000a031916815260200191505b50604052505081516200033992601292506020019062000904565b50601380546001600160a01b0319166001600160a01b0383811691909117909155600c546040805163313ce56760e01b815290516101009092049092169163313ce567916004808301926020929190829003018186803b1580156200039d57600080fd5b505afa158015620003b2573d6000803e3d6000fd5b505050506040513d6020811015620003c957600080fd5b505160ff16600a0a6014555b50506014546347868c00026019556040805160608101825267016345785d8a0000808252600160208084018290526202a300938501849052600f929092556010819055601192909255306000908152601d8252838120805460ff1990811685179091556001600160a01b039586168083528583208054831686179055600a54871683528583208054831686179055600384527ff8a2b5dc1b27d4c5d7a3db0c412e53f2e9d0dceade3ea2d007e359e020c6bd79805483168617905573a4a91638919a45a0b485dbb57d6bfdea9051b12983527f4079d7c6d1d0b1fb7055d8e6eacca1631de2dec02800041771499dbdcc2699ea8054909216909417905580546001600160a01b03199081169093179055601e805490921687851617918290558251630eecae2160e01b815292519190931692630eecae219260048181019391829003018186803b1580156200052957600080fd5b505afa1580156200053e573d6000803e3d6000fd5b505050506040513d60208110156200055557600080fd5b5051601a5560015b601a548110156200076557601e5460408051637a0bb3a960e11b8152600481018490529051606092600092839283926001600160a01b03169163f41767529160248083019286929190829003018186803b158015620005bb57600080fd5b505afa158015620005d0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526080811015620005fa57600080fd5b81019080805160405193929190846401000000008211156200061b57600080fd5b9083019060208201858111156200063157600080fd5b82516401000000008111828201881017156200064c57600080fd5b82525081516020918201929091019080838360005b838110156200067b57818101518382015260200162000661565b50505050905090810190601f168015620006a95780820380516001836020036101000a031916815260200191505b506040818152602083810151848301516060958601516080860185528986526001600160a01b0383168487015285850182905295850186905260008e8152601c84529390932084518051999d50919b50929950939750919590945062000716935084929091019062000904565b506020820151600182810180546001600160a01b0319166001600160a01b0390931692909217909155604083015160028301556060909201516003909101559490940193506200055d92505050565b5050505050620009a0565b3390565b600360006200078262000770565b6001600160a01b0316815260208101919091526040016000205460ff1680620007c757506000546001600160a01b0316620007bc62000770565b6001600160a01b0316145b620008045760405162461bcd60e51b815260040180806020018281038252602b81526020018062004f3a602b913960400191505060405180910390fd5b60006200081062000770565b6001600160a01b03161415620008585760405162461bcd60e51b815260040180806020018281038252602281526020018062004f186022913960400191505060405180910390fd5b6007546001600160a01b0382811691161415620008a75760405162461bcd60e51b815260040180806020018281038252602981526020018062004f656029913960400191505060405180910390fd5b6007546040516001600160a01b03918216918316907f2c6fb4d5ff9fad6ecf2e09cd64cbc9aad92a8b9d2cc0e5c3ddef9b529b0b5ffd90600090a3600780546001600160a01b0319166001600160a01b0392909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200094757805160ff191683800117855562000977565b8280016001018555821562000977579182015b82811115620009775782518255916020019190600101906200095a565b506200098592915062000989565b5090565b5b808211156200098557600081556001016200098a565b61456880620009b06000396000f3fe6080604052600436106102975760003560e01c8063b1eac37e1161015a578063d0e30db0116100c1578063ed9a48ba1161007a578063ed9a48ba1461097b578063eda4763f146109ae578063f2fde38b146109de578063f417675214610a11578063fa08adee14610ad1578063fcc55e5814610afb576102b0565b8063d0e30db01461084d578063d6c7cc8b14610855578063d847b8e3146108df578063dd467064146108f4578063e499e79c1461091e578063e51b644a14610948576102b0565b8063b8544dd711610113578063b8544dd71461079a578063b8c9d25c146107af578063c05e9360146107c4578063c21ebd07146107d9578063c49b9a80146107ee578063c851cc321461081a576102b0565b8063b1eac37e146106e0578063b2288649146106f5578063b2bdfa7b1461070a578063b67420211461071f578063b6c5232414610752578063b84e3e4914610767576102b0565b80637744acc9116101fe578063969cd8fe116101b7578063969cd8fe146105bd578063992bfe27146106045780639d24dbd51461062e578063a2340af81461065a578063a55a54e714610695578063a69df4b5146106cb576102b0565b80637744acc9146105215780637b3d564214610536578063855dab691461054b57806387b13e0d1461057e5780638da5cb5b1461059357806394539467146105a8576102b0565b806343b8272c1161025057806343b8272c146103935780635528ebd71461044157806359992cc814610474578063688491fc1461049e578063715018a6146104d95780637726ebf5146104ee576102b0565b80630eecae21146102b55780631c1b8772146102dc578063264d26dd1461030f57806327c8f835146103405780633d092c6d146103555780634184c9191461037e576102b0565b366102b05760045460ff166102ae576102ae610b36565b005b600080fd5b3480156102c157600080fd5b506102ca610b88565b60408051918252519081900360200190f35b3480156102e857600080fd5b506102ae600480360360208110156102ff57600080fd5b50356001600160a01b0316610b8e565b34801561031b57600080fd5b50610324610c84565b604080516001600160a01b039092168252519081900360200190f35b34801561034c57600080fd5b50610324610c93565b34801561036157600080fd5b5061036a610ca2565b604080519115158252519081900360200190f35b34801561038a57600080fd5b506102ca610ce2565b34801561039f57600080fd5b506102ae600480360360208110156103b657600080fd5b810190602081018135600160201b8111156103d057600080fd5b8201836020820111156103e257600080fd5b803590602001918460208302840111600160201b8311171561040357600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610ce8945050505050565b34801561044d57600080fd5b506102ae6004803603602081101561046457600080fd5b50356001600160a01b0316610e06565b34801561048057600080fd5b506102ae6004803603602081101561049757600080fd5b5035610f85565b3480156104aa57600080fd5b506102ae600480360360408110156104c157600080fd5b506001600160a01b0381351690602001351515611176565b3480156104e557600080fd5b506102ae6112d1565b3480156104fa57600080fd5b5061036a6004803603602081101561051157600080fd5b50356001600160a01b031661136d565b34801561052d57600080fd5b506102ae611382565b34801561054257600080fd5b506102ca6113a5565b34801561055757600080fd5b5061036a6004803603602081101561056e57600080fd5b50356001600160a01b03166113ab565b34801561058a57600080fd5b506103246113fb565b34801561059f57600080fd5b5061032461140a565b3480156105b457600080fd5b50610324611419565b3480156105c957600080fd5b506102ae600480360360808110156105e057600080fd5b506001600160a01b038135811691602081013591604082013516906060013561142d565b34801561061057600080fd5b506102ae6004803603602081101561062757600080fd5b5035611516565b34801561063a57600080fd5b506102ae6004803603602081101561065157600080fd5b50351515611657565b34801561066657600080fd5b506102ae6004803603604081101561067d57600080fd5b506001600160a01b0381351690602001351515611793565b3480156106a157600080fd5b506102ae600480360360608110156106b857600080fd5b508035906020810135906040013561192d565b3480156106d757600080fd5b506102ae611a8e565b3480156106ec57600080fd5b506102ca611b7c565b34801561070157600080fd5b506102ca611b9a565b34801561071657600080fd5b50610324611bb5565b34801561072b57600080fd5b506102ae6004803603602081101561074257600080fd5b50356001600160a01b0316611bc4565b34801561075e57600080fd5b506102ca611e45565b34801561077357600080fd5b5061077c611e4b565b60408051938452602084019290925282820152519081900360600190f35b3480156107a657600080fd5b506102ae611e57565b3480156107bb57600080fd5b50610324611fa5565b3480156107d057600080fd5b5061036a611fb4565b3480156107e557600080fd5b50610324611fc2565b3480156107fa57600080fd5b506102ae6004803603602081101561081157600080fd5b50351515611fd1565b34801561082657600080fd5b506102ae6004803603602081101561083d57600080fd5b50356001600160a01b03166120f9565b6102ae61227c565b34801561086157600080fd5b5061086a6122e6565b6040805160208082528351818301528351919283929083019185019080838360005b838110156108a457818101518382015260200161088c565b50505050905090810190601f1680156108d15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156108eb57600080fd5b5061036a61237c565b34801561090057600080fd5b506102ae6004803603602081101561091757600080fd5b5035612390565b34801561092a57600080fd5b506103246004803603602081101561094157600080fd5b503561242e565b34801561095457600080fd5b506102ae6004803603602081101561096b57600080fd5b50356001600160a01b0316612455565b34801561098757600080fd5b506102ae6004803603602081101561099e57600080fd5b50356001600160a01b03166125d8565b3480156109ba57600080fd5b506102ae600480360360408110156109d157600080fd5b50803590602001356126da565b3480156109ea57600080fd5b506102ae60048036036020811015610a0157600080fd5b50356001600160a01b03166127fd565b348015610a1d57600080fd5b50610a3b60048036036020811015610a3457600080fd5b50356128ed565b6040518080602001856001600160a01b03168152602001848152602001838152602001828103825286818151815260200191508051906020019080838360005b83811015610a93578181015183820152602001610a7b565b50505050905090810190601f168015610ac05780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b348015610add57600080fd5b506102ae60048036036020811015610af457600080fd5b50356129ac565b348015610b0757600080fd5b506102ae60048036036040811015610b1e57600080fd5b506001600160a01b0381351690602001351515612a9f565b6004805460ff191660011790556000600c5460ff166001811115610b5657fe5b1415610b7c57600c544790610b7a9061010090046001600160a01b03168230612b57565b505b6004805460ff19169055565b601a5481565b60036000610b9a612d41565b6001600160a01b0316815260208101919091526040016000205460ff1680610bdc57506000546001600160a01b0316610bd1612d41565b6001600160a01b0316145b610c175760405162461bcd60e51b815260040180806020018281038252602b8152602001806144bc602b913960400191505060405180910390fd5b6000610c21612d41565b6001600160a01b03161415610c675760405162461bcd60e51b81526004018080602001828103825260228152602001806143a56022913960400191505060405180910390fd5b600a54600160a01b900460ff16610c8157610c8181612d45565b50565b6009546001600160a01b031681565b600a546001600160a01b031681565b6000601954610caf612e02565b10158015610cc75750600a54600160a01b900460ff16155b15610cdb57610cd4612ea4565b9050610cdf565b5060005b90565b60055481565b60036000610cf4612d41565b6001600160a01b0316815260208101919091526040016000205460ff1680610d3657506000546001600160a01b0316610d2b612d41565b6001600160a01b0316145b610d715760405162461bcd60e51b815260040180806020018281038252602b8152602001806144bc602b913960400191505060405180910390fd5b6000610d7b612d41565b6001600160a01b03161415610dc15760405162461bcd60e51b81526004018080602001828103825260228152602001806143a56022913960400191505060405180910390fd5b60005b8151811015610e0257600a54600160a01b900460ff16610dfa57610dfa828281518110610ded57fe5b6020026020010151612d45565b600101610dc4565b5050565b60036000610e12612d41565b6001600160a01b0316815260208101919091526040016000205460ff1680610e5457506000546001600160a01b0316610e49612d41565b6001600160a01b0316145b610e8f5760405162461bcd60e51b815260040180806020018281038252602b8152602001806144bc602b913960400191505060405180910390fd5b6000610e99612d41565b6001600160a01b03161415610edf5760405162461bcd60e51b81526004018080602001828103825260228152602001806143a56022913960400191505060405180910390fd5b600a54600160a81b900460ff16610f275760405162461bcd60e51b81526004018080602001828103825260258152602001806143806025913960400191505060405180910390fd5b6001600160a01b038116600081815260036020908152604091829020805460ff19166001908117909155825190815291517f2c59b8f31260880424e870332281eba93ddfef67e37d699cebe5a7ba89f7a8a69281900390910190a250565b60036000610f91612d41565b6001600160a01b0316815260208101919091526040016000205460ff1680610fd357506000546001600160a01b0316610fc8612d41565b6001600160a01b0316145b61100e5760405162461bcd60e51b815260040180806020018281038252602b8152602001806144bc602b913960400191505060405180910390fd5b6000611018612d41565b6001600160a01b0316141561105e5760405162461bcd60e51b81526004018080602001828103825260228152602001806143a56022913960400191505060405180910390fd5b600081116110b3576040805162461bcd60e51b815260206004820152601b60248201527f4a61636b706f74206d757374206265207365742061626f766520300000000000604482015290519081900360640190fd5b6019819055601454156110d3576014546019546110cf91612f5f565b6019555b601260000160405180828054600181600116156101000203166002900480156111335780601f10611111576101008083540402835291820191611133565b820191906000526020600020905b81548152906001019060200180831161111f575b50506040805191829003822085835290519093507f72310be2a94efb44a1be12ce3b02b0a58a56e7426e7f503c81977c74f6f3ed4092509081900360200190a250565b60036000611182612d41565b6001600160a01b0316815260208101919091526040016000205460ff16806111c457506000546001600160a01b03166111b9612d41565b6001600160a01b0316145b6111ff5760405162461bcd60e51b815260040180806020018281038252602b8152602001806144bc602b913960400191505060405180910390fd5b6000611209612d41565b6001600160a01b0316141561124f5760405162461bcd60e51b81526004018080602001828103825260228152602001806143a56022913960400191505060405180910390fd5b6000600c5460ff16600181111561126257fe5b1415806112825750600c546001600160a01b038381166101009092041614155b6112bd5760405162461bcd60e51b81526004018080602001828103825260298152602001806143316029913960400191505060405180910390fd5b60045460ff16610e0257610e028282612fc1565b6112d9612d41565b6000546001600160a01b03908116911614611329576040805162461bcd60e51b8152602060048201819052602482015260008051602061447c833981519152604482015290519081900360640190fd5b600080546040516001600160a01b039091169060008051602061449c833981519152908390a3600080546001600160a01b0319908116909155600180549091169055565b601d6020526000908152604090205460ff1681565b600a54600160a01b900460ff166113a3576113a361139e612d41565b612d45565b565b60065481565b60006113b86016836132c7565b15806113dd5750600f546001600160a01b0383166000908152600b6020526040902054105b156113ea575060006113f6565b6113f3826132dc565b90505b919050565b600d546001600160a01b031681565b6000546001600160a01b031690565b600c5461010090046001600160a01b031681565b611435612d41565b6000546001600160a01b03908116911614611485576040805162461bcd60e51b8152602060048201819052602482015260008051602061447c833981519152604482015290519081900360640190fd5b611491848484846133af565b600a54600160a01b900460ff166114ac576114ac600261344f565b50601f80546001818101835560008390527fa03837a25210ee280c2113ff4b77ca23440b19d4866cca721c801278fd08d80791820180546001600160a01b039788166001600160a01b03199182161790915583549182019093550180549290941691161790915550565b60036000611522612d41565b6001600160a01b0316815260208101919091526040016000205460ff168061156457506000546001600160a01b0316611559612d41565b6001600160a01b0316145b61159f5760405162461bcd60e51b815260040180806020018281038252602b8152602001806144bc602b913960400191505060405180910390fd5b60006115a9612d41565b6001600160a01b031614156115ef5760405162461bcd60e51b81526004018080602001828103825260228152602001806143a56022913960400191505060405180910390fd5b60008111801561160157506018548114155b611652576040805162461bcd60e51b815260206004820152601a60248201527f496e76616c6964206f72206475706c69636174652076616c7565000000000000604482015290519081900360640190fd5b601855565b60036000611663612d41565b6001600160a01b0316815260208101919091526040016000205460ff16806116a557506000546001600160a01b031661169a612d41565b6001600160a01b0316145b6116e05760405162461bcd60e51b815260040180806020018281038252602b8152602001806144bc602b913960400191505060405180910390fd5b60006116ea612d41565b6001600160a01b031614156117305760405162461bcd60e51b81526004018080602001828103825260228152602001806143a56022913960400191505060405180910390fd5b6001600c5460ff16600181111561174357fe5b14156117805760405162461bcd60e51b815260040180806020018281038252602781526020018061442b6027913960400191505060405180910390fd5b60045460ff16610c8157610c81816135c6565b6003600061179f612d41565b6001600160a01b0316815260208101919091526040016000205460ff16806117e157506000546001600160a01b03166117d6612d41565b6001600160a01b0316145b61181c5760405162461bcd60e51b815260040180806020018281038252602b8152602001806144bc602b913960400191505060405180910390fd5b6000611826612d41565b6001600160a01b0316141561186c5760405162461bcd60e51b81526004018080602001828103825260228152602001806143a56022913960400191505060405180910390fd5b6001600160a01b0382166000908152601d602052604090205460ff168015611892575080155b80156118b85750600f546001600160a01b0383166000908152600b602052604090205410155b156118ca576118c86016836136f4565b505b6001600160a01b0382166000908152601d602052604090205460ff161580156118f05750805b1561190257611900601683613709565b505b6001600160a01b03919091166000908152601d60205260409020805460ff1916911515919091179055565b60036000611939612d41565b6001600160a01b0316815260208101919091526040016000205460ff168061197b57506000546001600160a01b0316611970612d41565b6001600160a01b0316145b6119b65760405162461bcd60e51b815260040180806020018281038252602b8152602001806144bc602b913960400191505060405180910390fd5b60006119c0612d41565b6001600160a01b03161415611a065760405162461bcd60e51b81526004018080602001828103825260228152602001806143a56022913960400191505060405180910390fd5b611a0e61425a565b506040805160608082018352600e54600a0a860282526020808301869052610e108502838501528351878152908101869052808401859052925191927fc323aad3b2da1205a70449fba3219e13ef1c229a230bcdecb2415190f8786f53929081900390910190a18051600f55602081015160105560400151601155505050565b6001546001600160a01b03163314611ad75760405162461bcd60e51b81526004018080602001828103825260238152602001806145106023913960400191505060405180910390fd5b6002544211611b2d576040805162461bcd60e51b815260206004820152601e60248201527f436f6e7472616374206973206e6f7420756e6c6f636b61626c65207965740000604482015290519081900360640190fd5b600154600080546040516001600160a01b03938416939091169160008051602061449c83398151915291a3600154600080546001600160a01b0319166001600160a01b03909216919091179055565b60195460145415610cdf57601454611b9590829061371e565b905090565b6000611ba4612e02565b601454909150611b9590829061371e565b6000546001600160a01b031681565b60036000611bd0612d41565b6001600160a01b0316815260208101919091526040016000205460ff1680611c1257506000546001600160a01b0316611c07612d41565b6001600160a01b0316145b611c4d5760405162461bcd60e51b815260040180806020018281038252602b8152602001806144bc602b913960400191505060405180910390fd5b6000611c57612d41565b6001600160a01b03161415611c9d5760405162461bcd60e51b81526004018080602001828103825260228152602001806143a56022913960400191505060405180910390fd5b6007546001600160a01b03828116911614611cbb57611cbb816120f9565b6007546040805163c45a015560e01b815290516000926001600160a01b03169163c45a0155916004808301926020929190829003018186803b158015611d0057600080fd5b505afa158015611d14573d6000803e3d6000fd5b505050506040513d6020811015611d2a57600080fd5b5051600754604080516315ab88c960e31b815290516001600160a01b039384169363c9c6539693309391169163ad5c464891600480820192602092909190829003018186803b158015611d7c57600080fd5b505afa158015611d90573d6000803e3d6000fd5b505050506040513d6020811015611da657600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301525160448083019260209291908290030181600087803b158015611df857600080fd5b505af1158015611e0c573d6000803e3d6000fd5b505050506040513d6020811015611e2257600080fd5b50516008549091506001600160a01b03808316911614610e0257610e0281612455565b60025490565b600f5460105460115483565b60036000611e63612d41565b6001600160a01b0316815260208101919091526040016000205460ff1680611ea557506000546001600160a01b0316611e9a612d41565b6001600160a01b0316145b611ee05760405162461bcd60e51b815260040180806020018281038252602b8152602001806144bc602b913960400191505060405180910390fd5b6000611eea612d41565b6001600160a01b03161415611f305760405162461bcd60e51b81526004018080602001828103825260228152602001806143a56022913960400191505060405180910390fd5b600060036000611f3e612d41565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055611f6e612d41565b6001600160a01b03167f920e415c98aa02ef5e7a82e76ad3e5550ba8c5beda365d8554123b90e9964ec160405160405180910390a2565b6008546001600160a01b031681565b600454610100900460ff1681565b6007546001600160a01b031681565b60036000611fdd612d41565b6001600160a01b0316815260208101919091526040016000205460ff168061201f57506000546001600160a01b0316612014612d41565b6001600160a01b0316145b61205a5760405162461bcd60e51b815260040180806020018281038252602b8152602001806144bc602b913960400191505060405180910390fd5b6000612064612d41565b6001600160a01b031614156120aa5760405162461bcd60e51b81526004018080602001828103825260228152602001806143a56022913960400191505060405180910390fd5b60048054821515610100810261ff00199092169190911790915560408051918252517f53726dfcaf90650aa7eb35524f4d3220f07413c8d6cb404cc8c18bf5591bc1599181900360200190a150565b60036000612105612d41565b6001600160a01b0316815260208101919091526040016000205460ff168061214757506000546001600160a01b031661213c612d41565b6001600160a01b0316145b6121825760405162461bcd60e51b815260040180806020018281038252602b8152602001806144bc602b913960400191505060405180910390fd5b600061218c612d41565b6001600160a01b031614156121d25760405162461bcd60e51b81526004018080602001828103825260228152602001806143a56022913960400191505060405180910390fd5b6007546001600160a01b038281169116141561221f5760405162461bcd60e51b81526004018080602001828103825260298152602001806144e76029913960400191505060405180910390fd5b6007546040516001600160a01b03918216918316907f2c6fb4d5ff9fad6ecf2e09cd64cbc9aad92a8b9d2cc0e5c3ddef9b529b0b5ffd90600090a3600780546001600160a01b0319166001600160a01b0392909216919091179055565b612284612d41565b6000546001600160a01b039081169116146122d4576040805162461bcd60e51b8152602060048201819052602482015260008051602061447c833981519152604482015290519081900360640190fd5b60045460ff166113a3576113a3610b36565b60128054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156123725780601f1061234757610100808354040283529160200191612372565b820191906000526020600020905b81548152906001019060200180831161235557829003601f168201915b5050505050905090565b6000601954612389612e02565b1015905090565b612398612d41565b6000546001600160a01b039081169116146123e8576040805162461bcd60e51b8152602060048201819052602482015260008051602061447c833981519152604482015290519081900360640190fd5b60008054600180546001600160a01b03199081166001600160a01b03841617909155168155428201600255604051819060008051602061449c833981519152908290a350565b6015818154811061243b57fe5b6000918252602090912001546001600160a01b0316905081565b60036000612461612d41565b6001600160a01b0316815260208101919091526040016000205460ff16806124a357506000546001600160a01b0316612498612d41565b6001600160a01b0316145b6124de5760405162461bcd60e51b815260040180806020018281038252602b8152602001806144bc602b913960400191505060405180910390fd5b60006124e8612d41565b6001600160a01b0316141561252e5760405162461bcd60e51b81526004018080602001828103825260228152602001806143a56022913960400191505060405180910390fd5b6008546001600160a01b038281169116141561257b5760405162461bcd60e51b815260040180806020018281038252602a815260200180614452602a913960400191505060405180910390fd5b6008546040516001600160a01b03918216918316907f2761a95c60ea350c03f8626225a98d3f2ec3157652944c749928643f8a8bc35790600090a3600880546001600160a01b0319166001600160a01b0392909216919091179055565b6125e0612d41565b6000546001600160a01b03908116911614612630576040805162461bcd60e51b8152602060048201819052602482015260008051602061447c833981519152604482015290519081900360640190fd5b6009546001600160a01b038281169116141561267d5760405162461bcd60e51b81526004018080602001828103825260228152602001806143e86022913960400191505060405180910390fd5b6009546040516001600160a01b03918216918316907f2d80b0b16ebc329c69e0a7bb0f4da75aa482405c60e134862b2860bed95b791c90600090a3600980546001600160a01b0319166001600160a01b0392909216919091179055565b600360006126e6612d41565b6001600160a01b0316815260208101919091526040016000205460ff168061272857506000546001600160a01b031661271d612d41565b6001600160a01b0316145b6127635760405162461bcd60e51b815260040180806020018281038252602b8152602001806144bc602b913960400191505060405180910390fd5b600061276d612d41565b6001600160a01b031614156127b35760405162461bcd60e51b81526004018080602001828103825260228152602001806143a56022913960400191505060405180910390fd5b808211156127f25760405162461bcd60e51b81526004018080602001828103825260218152602001806143c76021913960400191505060405180910390fd5b600591909155600655565b612805612d41565b6000546001600160a01b03908116911614612855576040805162461bcd60e51b8152602060048201819052602482015260008051602061447c833981519152604482015290519081900360640190fd5b6001600160a01b03811661289a5760405162461bcd60e51b815260040180806020018281038252602681526020018061435a6026913960400191505060405180910390fd5b600080546040516001600160a01b038085169392169160008051602061449c83398151915291a3600080546001600160a01b039092166001600160a01b0319928316811790915560018054909216179055565b601c6020908152600091825260409182902080548351601f600260001961010060018616150201909316929092049182018490048402810184019094528084529092918391908301828280156129845780601f1061295957610100808354040283529160200191612984565b820191906000526020600020905b81548152906001019060200180831161296757829003601f168201915b505050506001830154600284015460039094015492936001600160a01b039091169290915084565b600360006129b8612d41565b6001600160a01b0316815260208101919091526040016000205460ff16806129fa57506000546001600160a01b03166129ef612d41565b6001600160a01b0316145b612a355760405162461bcd60e51b815260040180806020018281038252602b8152602001806144bc602b913960400191505060405180910390fd5b6000612a3f612d41565b6001600160a01b03161415612a855760405162461bcd60e51b81526004018080602001828103825260228152602001806143a56022913960400191505060405180910390fd5b600a54600160a01b900460ff16610c8157610c818161344f565b612aa7612d41565b6000546001600160a01b03908116911614612af7576040805162461bcd60e51b8152602060048201819052602482015260008051602061447c833981519152604482015290519081900360640190fd5b6001600160a01b038216600081815260036020908152604091829020805460ff1916851515908117909155825190815291517f2c59b8f31260880424e870332281eba93ddfef67e37d699cebe5a7ba89f7a8a69281900390910190a25050565b60408051600280825260608083018452926020830190803683375050600754604080516315ab88c960e31b815290519394506001600160a01b039091169263ad5c464892506004808301926020929190829003018186803b158015612bbb57600080fd5b505afa158015612bcf573d6000803e3d6000fd5b505050506040513d6020811015612be557600080fd5b505181518290600090612bf457fe5b60200260200101906001600160a01b031690816001600160a01b0316815250508381600181518110612c2257fe5b60200260200101906001600160a01b031690816001600160a01b03168152505047831115612c4e574792505b600654831115612c5e5760065492505b600554831015612c6e5750612d3c565b6007546001600160a01b031663b6f9de958460008486612c9042610190613760565b6040518663ffffffff1660e01b81526004018085815260200180602001846001600160a01b03168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015612cfa578181015183820152602001612ce2565b50505050905001955050505050506000604051808303818588803b158015612d2157600080fd5b505af1158015612d35573d6000803e3d6000fd5b5050505050505b505050565b3390565b600a805460ff60a01b1916600160a01b179055600d54604080516370a0823160e01b81526001600160a01b038481166004830152915160009392909216916370a0823191602480820192602092909190829003018186803b158015612da957600080fd5b505afa158015612dbd573d6000803e3d6000fd5b505050506040513d6020811015612dd357600080fd5b5051600a54909150612df1906001600160a01b0316600084846133af565b5050600a805460ff60a01b19169055565b60006001600c5460ff166001811115612e1757fe5b1415612e24575047610cdf565b600c54604080516370a0823160e01b815230600482015290516101009092046001600160a01b0316916370a0823191602480820192602092909190829003018186803b158015612e7357600080fd5b505afa158015612e87573d6000803e3d6000fd5b505050506040513d6020811015612e9d57600080fd5b5051905090565b600a805460ff60a01b1916600160a01b179055600080612ec26137ba565b90506000612ed06016613878565b90506000816018541015612ee657601854612ee8565b815b905060005b81811015612f4957612eff8482613760565b9350828410612f0d57600093505b612f20612f1b601686613883565b6132dc565b15612f4157612f38612f33601686613883565b61388f565b60019450612f49565b600101612eed565b5050600a805460ff60a01b191690555090919050565b600082612f6e57506000612fbb565b82820282848281612f7b57fe5b0414612fb85760405162461bcd60e51b815260040180806020018281038252602181526020018061440a6021913960400191505060405180910390fd5b90505b92915050565b6004805460ff19166001179055600080600c5460ff166001811115612fe257fe5b148015612fec5750815b1561309557600c54604080516370a0823160e01b815230600482015290516101009092046001600160a01b0316916370a0823191602480820192602092909190829003018186803b15801561304057600080fd5b505afa158015613054573d6000803e3d6000fd5b505050506040513d602081101561306a57600080fd5b505160145490915081111561309557600c546130959061010090046001600160a01b03168230613bfa565b50476130a2838230612b57565b82600c60016101000a8154816001600160a01b0302191690836001600160a01b03160217905550600c60019054906101000a90046001600160a01b03166001600160a01b03166306fdde036040518163ffffffff1660e01b815260040160006040518083038186803b15801561311757600080fd5b505afa15801561312b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561315457600080fd5b8101908080516040519392919084600160201b82111561317357600080fd5b90830190602082018581111561318857600080fd5b8251600160201b8111828201881017156131a157600080fd5b82525081516020918201929091019080838360005b838110156131ce5781810151838201526020016131b6565b50505050905090810190601f1680156131fb5780820380516001836020036101000a031916815260200191505b506040525050815161321492601292506020019061427b565b50601380546001600160a01b0319166001600160a01b0385811691909117909155600c546040805163313ce56760e01b815290516101009092049092169163313ce567916004808301926020929190829003018186803b15801561327757600080fd5b505afa15801561328b573d6000803e3d6000fd5b505050506040513d60208110156132a157600080fd5b505160ff16600a0a6014555050600c805460ff1990811690915560048054909116905550565b6000612fb8836001600160a01b038416613e42565b600080601a54600f6001015410156132f6576010546132fa565b601a545b60115490915061330b904290613e5a565b6001600160a01b0384166000908152600b602052604090206002015410801561337d57506001600160a01b0383166000908152600b6020526040902060040154158061337d5750601a5461335f9082613e5a565b6001600160a01b0384166000908152600b6020526040902060040154105b156133a65750506001600160a01b0381166000908152601d602052604090205460ff16156113f6565b50600092915050565b6133bb84848484613e9c565b6001600160a01b0384166000908152601d602052604090205460ff1661340257600f5483106133f5576133ef6016856136f4565b50613402565b613400601685613709565b505b6001600160a01b0382166000908152601d602052604090205460ff1661344957600f54811061343c576134366016836136f4565b50613449565b613447601683613709565b505b50505050565b600a805460ff60a01b1916600160a01b17905560005b81811015612df157601f5461347957612df1565b6000601f60008154811061348957fe5b6000918252602080832090910154600d54604080516370a0823160e01b81526001600160a01b0393841660048201819052915191965091909216926370a0823192602480840193829003018186803b1580156134e457600080fd5b505afa1580156134f8573d6000803e3d6000fd5b505050506040513d602081101561350e57600080fd5b5051600a5490915061352c906001600160a01b0316600084846133af565b601f8054600019810190811061353e57fe5b6000918252602082200154601f80546001600160a01b0390921692909161356157fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550601f80548061359a57fe5b600082815260209020810160001990810180546001600160a01b03191690550190555050600101613465565b60048054600160ff19909116178155600c54604080516370a0823160e01b81523093810193909352516000926101009092046001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561362757600080fd5b505afa15801561363b573d6000803e3d6000fd5b505050506040513d602081101561365157600080fd5b5051601454909150811180156136645750815b1561368557600c546136859061010090046001600160a01b03168230613bfa565b600c8054610100600160a81b03191690556040805180820190915260038082526221272160e91b60209092019182526136c09160129161427b565b5050601380546001600160a01b031916905550601b54601455600c805460ff19908116600117909155600480549091169055565b6000612fb8836001600160a01b038416613f47565b6000612fb8836001600160a01b038416613f91565b6000612fb883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614057565b600082820183811015612fb8576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000806137d16137c8612e02565b601a5490613760565b905060006137df6016613878565b9050600082335a601a5442906137f760166000613883565b60405160200180878152602001866001600160a01b031660601b8152601401858152602001848152602001838152602001826001600160a01b031660601b815260140196505050505050506040516020818303038152906040528051906020012060001c905061387082826140f990919063ffffffff16565b935050505090565b60006113f382614136565b6000612fb8838361413a565b6001600c5460ff1660018111156138a257fe5b1415613900576019546040516001600160a01b0383169190600081818185875af1925050503d80600081146138f3576040519150601f19603f3d011682016040523d82523d6000602084013e6138f8565b606091505b5050506139b4565b6000600c5460ff16600181111561391357fe5b14156139b457600c60019054906101000a90046001600160a01b03166001600160a01b031663a9059cbb826019546040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561398757600080fd5b505af115801561399b573d6000803e3d6000fd5b505050506040513d60208110156139b157600080fd5b50505b604080516012805460a06020601f6002600019610100600187161502019094169390930492830181900402840181019094526080830181815292938493929190840182828015613a455780601f10613a1a57610100808354040283529160200191613a45565b820191906000526020600020905b815481529060010190602001808311613a2857829003601f168201915b50505050508152602001826001600160a01b03168152602001601a548152602001601954815250601c6000601a5481526020019081526020016000206000820151816000019080519060200190613a9d92919061427b565b50602082810151600180840180546001600160a01b039384166001600160a01b031991821617909155604080870151600280880191909155606090970151600390960195909555601a549287166000818152600b9095528585206004019390935560158054808401825594527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec47590930180549093169091179091559051601280549093919283928592918216156101000260001901909116048015613b995780601f10613b77576101008083540402835291820191613b99565b820191906000526020600020905b815481529060010190602001808311613b85575b505060408051918290038220601954601a54908452602084015281519094506001600160a01b03861693507f59bb05c3a63993e6a6c07e437a05711740b92da3605ff92cb60656ffeb55fa4e9281900390910190a350601a80546001019055565b60408051600280825260608083018452926020830190803683370190505090508381600081518110613c2857fe5b6001600160a01b03928316602091820292909201810191909152600754604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b158015613c7c57600080fd5b505afa158015613c90573d6000803e3d6000fd5b505050506040513d6020811015613ca657600080fd5b5051815182906001908110613cb757fe5b6001600160a01b03928316602091820292909201015284163014613d5d576007546040805163095ea7b360e01b81526001600160a01b0392831660048201526024810186905290519186169163095ea7b3916044808201926020929091908290030181600087803b158015613d2b57600080fd5b505af1158015613d3f573d6000803e3d6000fd5b505050506040513d6020811015613d5557600080fd5b50613d759050565b600754613d759030906001600160a01b0316856102b0565b60075460405163791ac94760e01b8152600481018581526000602483018190526001600160a01b038681166064850152426084850181905260a060448601908152875160a48701528751929096169563791ac947958a9589948b9493919260c40190602080880191028083838b5b83811015613dfb578181015183820152602001613de3565b505050509050019650505050505050600060405180830381600087803b158015613e2457600080fd5b505af1158015613e38573d6000803e3d6000fd5b5050505050505050565b60009081526001919091016020526040902054151590565b6000612fb883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061419e565b6001600160a01b0384166000908152600b602052604090208381554260028201556003015460ff16613eef576001600160a01b0384166000908152600b60205260409020600301805460ff191660011790555b6001600160a01b0382166000908152600b602052604090208181554260018201556003015460ff16613449576001600160a01b0382166000908152600b60205260409020600301805460ff1916600117905550505050565b6000613f538383613e42565b613f8957508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612fbb565b506000612fbb565b6000818152600183016020526040812054801561404d5783546000198083019190810190600090879083908110613fc457fe5b9060005260206000200154905080876000018481548110613fe157fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061401157fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612fbb565b6000915050612fbb565b600081836140e35760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156140a8578181015183820152602001614090565b50505050905090810190601f1680156140d55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816140ef57fe5b0495945050505050565b6000612fb8838360405180604001604052806018815260200177536166654d6174683a206d6f64756c6f206279207a65726f60401b8152506141f8565b5490565b8154600090821061417c5760405162461bcd60e51b815260040180806020018281038252602281526020018061430f6022913960400191505060405180910390fd5b82600001828154811061418b57fe5b9060005260206000200154905092915050565b600081848411156141f05760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156140a8578181015183820152602001614090565b505050900390565b600081836142475760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156140a8578181015183820152602001614090565b5082848161425157fe5b06949350505050565b60405180606001604052806000815260200160008152602001600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106142bc57805160ff19168380011785556142e9565b828001600101855582156142e9579182015b828111156142e95782518255916020019190600101906142ce565b506142f59291506142f9565b5090565b5b808211156142f557600081556001016142fa56fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64735265776172647320616c72656164792073657420746f207265666c656374207468697320746f6b656e4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f7074696f6e206e6f742073657420746f20616c6c6f7720746869732066756e6374696f6e5a65726f2061646472657373206973206e6f7420612076616c69642063616c6c65724d696e696d756d206d757374206265206c657373207468616e206d6178696d756d4c5020697320616c72656164792073656e7420746f20746861742061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775265776172647320616c72656164792073657420746f207265666c6563742063757272656e6379546865204c50205061697220697320616c72656164792073657420746f207468697320616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65728be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0596f7520617265206e6f7420617574686f72697a656420746f2075736520746869732066756e6374696f6e54686520726f7574657220697320616c72656164792073657420746f20746869732061646472657373596f7520646f6e27742068617665207065726d697373696f6e20746f20756e6c6f636ba26469706673582212201d8a97a690e4e141c5b689872ca17abe462dc3d85b6c2b9792dbbc0e1caa818164736f6c634300060c00335a65726f2061646472657373206973206e6f7420612076616c69642063616c6c6572596f7520617265206e6f7420617574686f72697a656420746f2075736520746869732066756e6374696f6e54686520726f7574657220697320616c72656164792073657420746f2074686973206164647265737300000000000000000000000031cc5ac39e2968c861830ade3580318bb815d6330000000000000000000000001761dc7c574ff2998049193e7e1871ac98c27a5f00000000000000000000000010ed43c718714eb63d5aa57b78b54704e256024e0000000000000000000000008076c74c5e3f5852037f31ff0093eeb8c8add8d3

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

00000000000000000000000031cc5ac39e2968c861830ade3580318bb815d6330000000000000000000000001761dc7c574ff2998049193e7e1871ac98c27a5f00000000000000000000000010ed43c718714eb63d5aa57b78b54704e256024e0000000000000000000000008076c74c5e3f5852037f31ff0093eeb8c8add8d3

-----Decoded View---------------
Arg [0] : superFuel (address): 0x31cc5ac39e2968c861830ade3580318bb815d633
Arg [1] : _lotteryV1 (address): 0x1761dc7c574ff2998049193e7e1871ac98c27a5f
Arg [2] : _router (address): 0x10ed43c718714eb63d5aa57b78b54704e256024e
Arg [3] : _rewardsToken (address): 0x8076c74c5e3f5852037f31ff0093eeb8c8add8d3

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000031cc5ac39e2968c861830ade3580318bb815d633
Arg [1] : 0000000000000000000000001761dc7c574ff2998049193e7e1871ac98c27a5f
Arg [2] : 00000000000000000000000010ed43c718714eb63d5aa57b78b54704e256024e
Arg [3] : 0000000000000000000000008076c74c5e3f5852037f31ff0093eeb8c8add8d3


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