Contract 0xf31f75204938ae7883bdb427708e8f79ac51dba6

 
 
Txn Hash
Block
From
To
Value [Txn Fee]
0x89f6966de2d1b40f139f30c42bf5b78e30ec46314fa73469a6ebf53a5f4768f683248302021-06-15 18:04:0540 days 23 hrs ago0xeae4f53b34caa533d470c44458dc3d9d71f212ae IN  0xf31f75204938ae7883bdb427708e8f79ac51dba60 BNB0.000109395
0x1dec05724fda14197ba1f5579e582a39329588ef2180476b006be493c43463cb83247862021-06-15 18:01:5340 days 23 hrs ago0xeae4f53b34caa533d470c44458dc3d9d71f212ae IN  0xf31f75204938ae7883bdb427708e8f79ac51dba60 BNB0.000109395
0x4236787bdf2cd42192e2149beb7b6d2247ec2051f7aa211a4e3ba1dff0ab34ae83238212021-06-15 17:13:3841 days 7 mins agoTrustPad: Deployer IN  0xf31f75204938ae7883bdb427708e8f79ac51dba60 BNB0.00016725
0x8af1c411e4752278beb448bbdd9cad0b4b9a472451be122e4fb7e7be202da96783228592021-06-15 16:25:3241 days 55 mins ago0xe374b701b74dbd13c4010b298e575774a40099c9 IN  0xf31f75204938ae7883bdb427708e8f79ac51dba60 BNB0.000109455
0x2c351df052bac25933a0064bfc5744c81ce0ec1487d26c60b9239204bd9a17e983214632021-06-15 15:13:3841 days 2 hrs ago0x698fc1f8fe67667493c3a27f2dccec5fe15707cd IN  0xf31f75204938ae7883bdb427708e8f79ac51dba60 BNB0.000711105
0xc15dbd606a30a7b9f8aff8342410758189277fb358e1e71760f592320a1fc34483214592021-06-15 15:13:2441 days 2 hrs ago0x984e946c8b2f139cfd7215267cc0f570c32fba15 IN  0xf31f75204938ae7883bdb427708e8f79ac51dba60 BNB0.0005473473
0xd4f917bfe3d616b5de991d7790e8647e7917bf02896293be31ad1cc8ba932f0a83214552021-06-15 15:13:1241 days 2 hrs ago0x7e03cd211a00a82525b5182f30ea8088cbc78aa9 IN  0xf31f75204938ae7883bdb427708e8f79ac51dba60 BNB0.00070279
0x5968ebcc40523425ef536f18d3d5d57f6baaf9a65fbeb9587c3320c5b6736cb883214492021-06-15 15:12:5241 days 2 hrs ago0x45beacbb0e144718e17deac4dd810a7501244c89 IN  0xf31f75204938ae7883bdb427708e8f79ac51dba60 BNB0.000719155
0x04bf6ad1c848e351744eaed5f306aeb11161ff42832a2c7016ede4db58fa5d8983214482021-06-15 15:12:4941 days 2 hrs ago0x1611dfe8430a07d3f31d78d53565b111ba2ee0a2 IN  0xf31f75204938ae7883bdb427708e8f79ac51dba60 BNB0.000719155
0x8a70bd011b81d62a7385c7b56e3955a60970524bdf0b9b231571b217dc25e68383214452021-06-15 15:12:4041 days 2 hrs ago0x9c107c37474b976d371936986b01e0cb4eb001f3 IN  0xf31f75204938ae7883bdb427708e8f79ac51dba60 BNB0.000719215
0x45b039a6ca08847396834b750d3e83eb39fd4edb9e4638244101402fe4ee6f4783214342021-06-15 15:12:0741 days 2 hrs ago0xdc76582ab62a5e24881196142ff32f72d1374a32 IN  0xf31f75204938ae7883bdb427708e8f79ac51dba60 BNB0.00070291
0x36d19bb725f9249a7507fe06c8721761688ab3dd333f4354dc27a94500cc720783214342021-06-15 15:12:0741 days 2 hrs ago0xfefc26249e37ac4f554b0f82a2f75ccbe6488970 IN  0xf31f75204938ae7883bdb427708e8f79ac51dba60 BNB0.000711105
0x6378cd1575f364323a829eb857a2d2e51fedb7768747a48afa2b1f460c8a7b0f83214282021-06-15 15:11:4941 days 2 hrs ago0xf78ad17d3edb046eb6149d8ba2cbab110f8a2a77 IN  0xf31f75204938ae7883bdb427708e8f79ac51dba60 BNB0.000719095
0xb7849d807b4a46f2dafa82c030c4e27e5de07aec3e9fa089f3a3a301d6788cd083214252021-06-15 15:11:4041 days 2 hrs ago0x6c3c301bb3af46c86205844c7ad9ef8bd6593baf IN  0xf31f75204938ae7883bdb427708e8f79ac51dba60 BNB0.000719155
0x5803e0248f3f8b1fbb6c175b0b1a1ea9937c27f277b310a56e52f1cdfbdd739d83214202021-06-15 15:11:2541 days 2 hrs ago0x01a0cfe175f96fe8576ea1e7d9db19128280f92d IN  0xf31f75204938ae7883bdb427708e8f79ac51dba60 BNB0.00077779
0x58fe883966ff54ddd4376deeb4cb3d0197740ce2b5ba96bab4206a7c935defa783214192021-06-15 15:11:2241 days 2 hrs ago0x2748a2f6987942c791a331223d09fc59b8ea082b IN  0xf31f75204938ae7883bdb427708e8f79ac51dba60 BNB0.000719155
0xa397ca158935ed419234706f90d09d33dc6f2b86ce3fe951004bc55991e163c683214182021-06-15 15:11:1941 days 2 hrs ago0xc1376e73d99334079d1d9f47498a6f8ef65056fb IN  0xf31f75204938ae7883bdb427708e8f79ac51dba60 BNB0.000469875
0x705746c895739b5fb42d0cbed1ae9baa40b3e1ffbcc97fcfac1ecc49e1d422d183214082021-06-15 15:10:4941 days 2 hrs ago0x657584d0fce466748fb03745a394a6d2426e8fd9 IN  0xf31f75204938ae7883bdb427708e8f79ac51dba60 BNB0.00070291
0x5398925dbdb27121bcb206843b2faa0076342a266ccbd30fee86071de019757b83214012021-06-15 15:10:2841 days 2 hrs ago0xa41b7ca61b2ba91c1901902e724350057ec406ba IN  0xf31f75204938ae7883bdb427708e8f79ac51dba60 BNB0.00070291
0xdfaf5526ed0a396c2578f56bc3ad80254b6ad7f70beeddd27ba01d2436e97bf583213972021-06-15 15:10:1641 days 2 hrs ago0x33f6ee932cea603fafd6854827259be172c91da4 IN  0xf31f75204938ae7883bdb427708e8f79ac51dba60 BNB0.00077785
0x9841f07791c92a1790daffb17d3c41b2a2de7244e4f5511539b68804486f358283213962021-06-15 15:10:1341 days 2 hrs ago0x10ba3300c1e673a59070927b85dd49f030aa9bcc IN  0xf31f75204938ae7883bdb427708e8f79ac51dba60 BNB0.00077785
0x525948cad3709a8a2bbfd87cb8e709928d4dbb5e76ac51124c0f487add6c1d1e83213872021-06-15 15:09:4641 days 2 hrs ago0x6663ca30021e80892e56c7edbc2ed1d8c726e6b1 IN  0xf31f75204938ae7883bdb427708e8f79ac51dba60 BNB0.000719275
0xf537067d0894a256d69dedb0cd2cb169a6e8207b3e6a991f4f06ce11d4640c7683213862021-06-15 15:09:4341 days 2 hrs ago0x72a519bfdc922be98db0d6b7f1d2a5a42359fdd4 IN  0xf31f75204938ae7883bdb427708e8f79ac51dba60 BNB0.00077791
0xec09fcd15c9c64a6eca0432cd543304585758e0e24883622f55fe9b8970c138783213862021-06-15 15:09:4341 days 2 hrs ago0xd495c43fc1d888e2e7a97d6fa409674b775eac41 IN  0xf31f75204938ae7883bdb427708e8f79ac51dba60 BNB0.00077779
0xb33db22fa4d52fde1db2ef78f67b4763df7b86cde2b6a6fd3601a037fe31d24583213832021-06-15 15:09:3441 days 2 hrs ago0x158fbe9c1f21225e499e331e6b18d5c516a897c4 IN  0xf31f75204938ae7883bdb427708e8f79ac51dba60 BNB0.000719155
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TrustPadIDO

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 14 : GeneralIDO.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "./Timed.sol";

abstract contract GeneralIDO is Ownable, Timed {
    // Actual rate is: rate / 1e6
    // 6.123456 actual rate = 6123456 specified rate
    uint256 public rate;
    uint256 public tokensForSale;

    event RateChanged(uint256 newRate);
    event CapChanged(uint256 newRate);

    constructor(uint256 _rate, uint256 _tokensForSale) {
        rate = _rate;
        tokensForSale = _tokensForSale;
    }

    function setTokensForSale(uint _tokensForSale) external onlyOwner {
        require(!isLive(), "Sale: Sale is live, cap change not allowed");
        tokensForSale = _tokensForSale;
        emit CapChanged(tokensForSale);
    }

    function calculatePurchaseAmount(uint purchaseAmountWei) public view returns (uint256) {
        return purchaseAmountWei * rate / 1e6;
    }

    function setRate(uint256 newRate) public onlyOwner {
        require(!isLive(), "Sale: Sale is live, rate change not allowed");
        rate = newRate;
        emit RateChanged(rate);
    }
}

File 2 of 14 : Timed.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";

abstract contract Timed is Ownable {
    uint public startTime;
    uint public duration;
    uint public registerTime;
    uint public registerDuration;

    event StartChanged(uint256 time);
    event DurationChanged(uint256 duration);
    event RegisterTimeChanged(uint256 time);
    event RegisterDurationChanged(uint256 duration);

    constructor(uint256 _startTime, uint256 _saleDuration) {
        startTime = _startTime;
        duration = _saleDuration;
    }

    modifier ongoingSale(){
        require(isLive(), "Sale: Not live");
        _;
    }

    modifier ongoingRegister(){
        require(isRegistering(), "Sale: Not open for registration");
        require(!isLive(), "Sale: Cannot register, sale is live");
        _;
    }

    function isLive() public view returns (bool) {
        return block.timestamp > startTime && block.timestamp < startTime + duration;
    }

    function isRegistering() public view returns (bool) {
        return block.timestamp > registerTime && block.timestamp < registerTime + registerDuration;
    }

    function setStartTime(uint256 newTime) public onlyOwner {
        require(newTime > registerTime, "Sale: start time must be after the register time");
        startTime = newTime;
        emit StartChanged(startTime);
    }

    function setSaleDuration(uint256 newDuration) public onlyOwner {
        duration = newDuration;
        emit DurationChanged(duration);
    }

    function setRegisterTime(uint256 newTime) public onlyOwner {
        require(newTime < startTime, "Sale: register time must be before the start time");
        registerTime = newTime;
        emit RegisterTimeChanged(registerTime);
    }

    function setRegisterDuration(uint256 newDuration) public onlyOwner {
        require(registerTime + newDuration < startTime, "Sale: register end must be before the start time");
        registerDuration = newDuration;
        emit RegisterDurationChanged(registerDuration);
    }
}

File 3 of 14 : TrustPadIDO.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "../staking/ILevelsStaking.sol";
import "./WithLimits.sol";
import "./Timed.sol";
import "./WithWhitelist.sol";
import "./WithLevelsSale.sol";
import "./Withdrawable.sol";
import "./GeneralIDO.sol";

contract TrustPadIDO is
Ownable,
ReentrancyGuard,
Timed,
GeneralIDO,
Withdrawable,
WithLimits,
WithWhitelist,
WithLevelsSale {
    using SafeERC20 for IERC20;

    string public id;
    uint256 public tokensSold;
    uint256 public raised;
    uint256 public participants;
    mapping(address => uint256) public balances;

    event TokensPurchased(address indexed beneficiary, uint256 value, uint256 amount);

    constructor(
        string memory _id,
        uint256 _startTime,
        uint256 _duration,
        uint256 _rate,
        uint256 _tokensForSale,
        address _fundToken
    )
    GeneralIDO(_rate, _tokensForSale)
    Timed(_startTime, _duration)
    Withdrawable(_fundToken) {
        id = _id;
    }

    function balanceOf(address account) external view returns (uint256) {
        return balances[account];
    }

    receive() external payable {
        require(!fundByTokens, "Sale: This presale is funded by tokens, use buyTokens(value)");
        buyTokens();
    }

    function buyTokens() public payable ongoingSale nonReentrant {
        require(!fundByTokens, "Sale: presale is funded by tokens but value is missing");

        internalBuyTokens(msg.value);
    }

    /**
    * The fund token must be first approved to be transferred by presale contract for the given "value".
    */
    function buyTokens(uint256 value) public ongoingSale nonReentrant {
        require(fundByTokens, "Sale: funding by tokens is not allowed");
        require(fundToken.allowance(msg.sender, address(this)) >= value, 'Sale: fund token not approved');

        internalBuyTokens(value);

        fundToken.safeTransferFrom(msg.sender, address(this), value);
    }

    function internalBuyTokens(uint256 value) private {
        uint maxAllocation = checkAccountAllowedToBuy();

        address account = _msgSender();
        uint256 amount = calculatePurchaseAmount(value);
        tokensSold += amount;
        balances[account] += amount;

        require(amount > 0, "Sale: amount is 0");
        require(value >= minSell, "Sale: amount is too small");
        require(maxAllocation == 0 || balances[account] <= maxAllocation, "Sale: amount exceeds max allocation");
        require(tokensSold <= tokensForSale, "Sale: cap reached");

        raised = raised + value;
        participants = participants + 1;

        emit TokensPurchased(account, value, amount);
    }

    function checkAccountAllowedToBuy() private view returns (uint) {
        address account = _msgSender();
        uint levelAllocation = getUserLevelAllocation(account);
        uint maxAllocation = calculatePurchaseAmount(maxSell);

        // Public sale with no whitelist or levels
        if (!whitelistEnabled && !levelsEnabled) {
            return maxAllocation;
        }

        // User whitelisted, consider his level allocation too
        if (whitelistEnabled && whitelisted[msg.sender]) {
            return max(maxAllocation, levelAllocation);
        }
        if (whitelistEnabled && !levelsEnabled) {
            revert('Sale: not in the whitelist');
        }

        // Check user level if levels enabled and user was not whitelisted
        if (levelsEnabled) {
            require(baseAllocation > 0, "Sale: levels are enabled but baseAllocation is not set");

            // If opened for all levels, just return the level allocation without checking user weight
            if (levelsOpenAll()) {
                uint allocation = baseAllocation * levelsStaking.getUserTier(account).multiplier;
                return allocation + maxAllocation;
            }

            bytes memory levelBytes = bytes(userLevel[account]);
            require(levelBytes.length > 0, "Sale: user level is not registered");
            require(levelAllocation > 0, "Sale: user has no level allocation, not registered, lost lottery or level is too low");

            return levelAllocation;
        }

        revert('Sale: unreachable state');
    }

    function max(uint a, uint b) private pure returns (uint) {
        return a > b ? a : b;
    }
}

File 4 of 14 : WithLevelsSale.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "../staking/ILevelsStaking.sol";
import "./Timed.sol";
import "./GeneralIDO.sol";
import "./WithWhitelist.sol";
import "./WithLimits.sol";

abstract contract WithLevelsSale is Ownable, Timed, GeneralIDO, WithLimits, WithWhitelist {
    ILevelsStaking public levelsStaking;
    bool public levelsEnabled = true;
    bool public lockOnRegister = true;

    // sale end - fcfsDuration = levelsOpenAll
    uint public fcfsDuration;

    // Sum of weights (lottery losers are subtracted when picking winners) for base allocation calculation
    uint public totalWeights;
    uint public baseAllocation;

    mapping(string => address[]) public levelAddresses;
    // Whether (and how many) winners were picked for a lottery level
    mapping(string => uint8) public winnersPicked;
    // Needed for user allocation calculation = baseAllocation * userWeight
    // If user lost lottery, his weight resets to 0 - means user can't participate in sale
    mapping(address => uint8) public userWeight;
    mapping(address => string) public userLevel;

    event BaseAllocationCalculated(uint256 baseAllocation, uint256 levelsAllocation);
    event BaseAllocationChanged(uint256 baseAllocation);
    event LevelsStakingChanged(address staking);
    event LevelsEnabled(bool status);
    event SaleOpenedForAllLevels(bool status);
    event LockOnRegisterEnabled(bool status);
    event FCFSDurationChanged(uint256 duration);
    event WinnersPicked(string tierId, uint totalN, uint winnersN, address[] winners);
    event Registered(address indexed account, string levelId, uint weight, bool tokensLocked);

    function levelsOpenAll() view public returns (bool) {
        return block.timestamp + fcfsDuration > startTime + duration;
    }

    /**
     * Return: id, multiplier, allocation, isWinner.
     *
     * User is a winner when:
     * - winners were picked for the level
     * - user has non-zero weight (i.e. registered and not excluded as loser)
     * - the level is a lottery level
     */
    function getUserLevelState(address account) view external returns (string memory, uint, uint, bool) {
        bytes memory levelBytes = bytes(userLevel[account]);
        string memory level = levelBytes.length == 0 ? 'none' : userLevel[account];
        Structs.Tier memory tier = levelsStaking.getTierById(level);
        bool levelsOpen = levelsOpenAll();
        uint8 weight = levelsOpen ? tier.multiplier : userWeight[account];
        uint allocation = weight * baseAllocation;
        if (levelsOpen) {
            allocation += calculatePurchaseAmount(maxSell);
        }
        bool isWinner = levelBytes.length == 0
        ? false
        : tier.random && (levelsOpen || whitelisted[account] || (winnersPicked[level] > 0 && userWeight[account] > 0));

        return (level, weight, allocation, isWinner);
    }

    function getUserLevelAllocation(address account) view public returns (uint) {
        return userWeight[account] * baseAllocation;
    }

    function getLevelAddresses(string calldata id) view external returns (address[] memory) {
        return levelAddresses[id];
    }

    function getLevelWinners(string calldata id) view external returns (address[] memory) {
        address[] memory winners = new address[](winnersPicked[id]);
        for (uint256 i = 0; i < levelAddresses[id].length; i++) {
            address addr = levelAddresses[id][i];
            if (userWeight[addr] > 0) {
                winners[winners.length] = addr;
            }
        }

        return winners;
    }

    function getLevelNumbers() view external returns (string[] memory, uint[] memory) {
        string[] memory ids = levelsStaking.getTierIds();
        uint[] memory counts = new uint[](ids.length);
        for (uint i = 0; i < ids.length; i++) {
            counts[i] = levelAddresses[ids[i]].length;
        }
        return (ids, counts);
    }

    function getLevelNumber(string calldata id) view external returns (uint) {
        return levelAddresses[id].length;
    }

    function toggleLevels(bool status) external onlyOwner {
        levelsEnabled = status;
        emit LevelsEnabled(status);
    }

    function setFCFSDuration(uint256 newDuration) public onlyOwner {
        fcfsDuration = newDuration;
        emit FCFSDurationChanged(duration);
    }

    function toggleLockOnRegister(bool status) external onlyOwner {
        lockOnRegister = status;
        emit LockOnRegisterEnabled(status);
    }

    function setBaseAllocation(uint256 _baseAllocation) external onlyOwner {
        baseAllocation = _baseAllocation;
        emit BaseAllocationChanged(baseAllocation);
    }

    function setLevelsStaking(ILevelsStaking _staking) external onlyOwner {
        require(address(levelsStaking) == address(0), 'Sale: Staking contract is already set');
        levelsStaking = _staking;
        emit LevelsStakingChanged(address(levelsStaking));
    }

    /**
     * Find the new base allocation based on total weights of all levels, # of whitelisted accounts and their max buy.
     * Should be called after winners are picked.
     */
    function updateBaseAllocation() external onlyOwner {
        uint levelsAlloc = tokensForSale - whitelistAllocation();
        baseAllocation = levelsAlloc / totalWeights;

        emit BaseAllocationCalculated(baseAllocation, levelsAlloc);
    }

    /**
     * Register a user with his current level multiplier.
     * Level multiplier is added to total weights, which later is used to calculate the base allocation.
     * Address is stored, so we can see all registered people.
     *
     * Later, when picking winners, loser weight is removed from total weights for correct base allocation calculation.
     */
    function register() external ongoingRegister {
        require(levelsEnabled, 'Sale: Cannot register, levels disabled');
        require(address(levelsStaking) != address(0), 'Sale: Levels staking address is not specified');

        address account = _msgSender();
        require(userWeight[account] == 0, 'Sale: Already registered');

        Structs.Tier memory tier = levelsStaking.getUserTier(account);
        require(tier.multiplier > 0, 'Sale: Your level is too low to register');

        // Lock the staked tokens based on the current user level
        if (lockOnRegister) {
            levelsStaking.lock(account);
        }

        userLevel[account] = tier.id;
        userWeight[account] = tier.multiplier;
        totalWeights += tier.multiplier;
        levelAddresses[tier.id].push(account);

        emit Registered(account, tier.id, tier.multiplier, lockOnRegister);
    }

    function setWinners(string calldata id, address[] calldata winners) external onlyOwner {
        uint8 weight = levelsStaking.getTierById(id).multiplier;

        for (uint i = 0; i < levelAddresses[id].length; i++) {
            totalWeights -= userWeight[levelAddresses[id][i]];
            userWeight[levelAddresses[id][i]] = 0;
        }

        for (uint i = 0; i < winners.length; i++) {
            totalWeights += weight;
            userWeight[winners[i]] = weight;
            userLevel[winners[i]] = id;
        }
        winnersPicked[id] = uint8(winners.length);

        emit WinnersPicked(id, levelAddresses[id].length, winners.length, winners);
    }

    function pickWinners(string calldata id) external onlyOwner {
        Structs.Tier memory tier = levelsStaking.getTierById(id);
        require(tier.random, "Sale: Only lottery tiers are allowed to pick winners");

        uint8 odds = tier.odds;
        uint totalParticipants = levelAddresses[id].length;
        require(totalParticipants > 0, 'Sale: Participants number should be more than 0. Are there registered users in this level?');
        uint winnersCount = totalParticipants / odds;
        if (winnersCount == 0) {
            winnersCount = 1;
        }
        winnersPicked[id] = uint8(winnersCount);

        // Pick people with non-zero weight and mark them as losers, deducting the weight from total weights
        uint losersToPick = totalParticipants - winnersCount;
        uint attempts = 0;
        while (losersToPick > 0) {
            uint idx = randomNumber(attempts) % totalParticipants;
            attempts++;

            address loser = levelAddresses[id][idx];
            uint8 weight = userWeight[loser];

            // Was already excluded, skipping
            if (weight == 0) {
                continue;
            }

            totalWeights -= weight;
            userWeight[loser] = 0;
            losersToPick--;
        }

        // Collect and publish the list of winners
        address[] memory winners = new address[](winnersCount);
        for (uint256 i = 0; i < levelAddresses[id].length; i++) {
            address addr = levelAddresses[id][i];
            if (userWeight[addr] > 0) {
                winners[winners.length] = addr;
            }
        }
        emit WinnersPicked(id, totalParticipants, winners.length, winners);
    }

    function randomNumber(uint seed) private view returns (uint) {
        return uint(keccak256(abi.encodePacked(block.difficulty, block.timestamp, seed)));
    }
}

File 5 of 14 : WithLimits.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";

abstract contract WithLimits is Ownable {
    // Max sell per user in currency
    uint256 public maxSell;
    // Min contribution per TX in currency
    uint256 public minSell;

    event MinChanged(uint256 value);
    event MaxChanged(uint256 value);

    function getMinMaxLimits() external view returns (uint256, uint256) {
        return (minSell, maxSell);
    }

    function setMin(uint256 value) public onlyOwner {
        require(maxSell == 0 || value <= maxSell, "Must be smaller than max");
        minSell = value;
        emit MinChanged(value);
    }

    function setMax(uint256 value) public onlyOwner {
        require(minSell == 0 || value >= minSell, "Must be bigger than min");
        maxSell = value;
        emit MaxChanged(value);
    }
}

File 6 of 14 : WithWhitelist.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "./GeneralIDO.sol";
import "./WithLimits.sol";

abstract contract WithWhitelist is Ownable, GeneralIDO, WithLimits {
    bool public whitelistEnabled = true;
    mapping(address => bool) public whitelisted;
    uint internal whitelistedCount;

    event WhitelistEnabled(bool status);

    constructor() {
        whitelisted[msg.sender] = true;
    }

    function whitelistAllocation() public view returns (uint) {
        uint whitelistAlloc = calculatePurchaseAmount(maxSell);
        return whitelistAlloc * whitelistedCount;
    }

    function toggleWhitelist(bool status) public onlyOwner {
        whitelistEnabled = status;
        emit WhitelistEnabled(status);
    }

    function batchAddWhitelisted(address[] calldata addresses) external onlyOwner {
        for (uint i = 0; i < addresses.length; i++) {
            if (!whitelisted[addresses[i]]) {
                whitelisted[addresses[i]] = true;
                whitelistedCount += 1;
            }
        }
    }

    function batchRemoveWhitelisted(address[] calldata addresses) external onlyOwner {
        for (uint i = 0; i < addresses.length; i++) {
            if (whitelisted[addresses[i]]) {
                whitelisted[addresses[i]] = false;
                whitelistedCount -= 1;
            }
        }
    }
}

File 7 of 14 : Withdrawable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

abstract contract Withdrawable is Ownable {
    using SafeERC20 for IERC20;

    bool public fundByTokens = false;
    IERC20 public fundToken;

    constructor(address _fundToken) {
        fundByTokens = _fundToken != address(0);
        if (fundByTokens) {
            fundToken = IERC20(_fundToken);
        }
    }

    /**
     * Withdraw ALL both BNB and the currency token if specified
     */
    function withdrawAll() external onlyOwner {
        uint256 balance = address(this).balance;
        if (balance > 0) {
            payable(owner()).transfer(balance);
        }

        if (fundByTokens && fundToken.balanceOf(address(this)) > 0) {
            fundToken.transfer(owner(), fundToken.balanceOf(address(this)));
        }
    }

    /**
     * Withdraw the specified amount of BNB or currency token
     */
    function withdrawBalance(uint256 amount) external onlyOwner {
        if (fundByTokens) {
            fundToken.transfer(owner(), amount);
        } else {
            payable(owner()).transfer(amount);
        }
    }

    /**
     * When tokens are sent to the sale by mistake: withdraw the specified token.
     */
    function withdrawToken(address token, uint256 amount) external onlyOwner {
        IERC20(token).transfer(owner(), amount);
    }
}

File 8 of 14 : ILevelsStaking.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

library Structs {
    struct UserInfo {
        uint256 amount;
        uint256 rewardDebt;
        uint256 pendingRewards;
        uint256 unlocksAt;
    }

    struct Tier {
        string id;
        uint8 multiplier;
        uint256 lockingPeriod; // in seconds
        uint256 minAmount; // tier is applied when userAmount >= minAmount
        bool random;
        uint8 odds; // divider: 2 = 50%, 4 = 25%, 10 = 10%
    }
}

interface ILevelsStaking {
    function getTierById(string calldata id) external view returns (Structs.Tier memory);
    function getUserTier(address account) external view returns (Structs.Tier memory);
    function getTierIds() external view returns (string[] memory);
    function lock(address account) external;
}

File 9 of 14 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/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.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual 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);
    }

    /**
     * @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;
    }
}

File 10 of 14 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor () {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 11 of 14 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @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 12 of 14 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 13 of 14 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @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) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

    /**
     * @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");
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        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 14 of 14 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.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 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.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

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

Contract ABI

[{"inputs":[{"internalType":"string","name":"_id","type":"string"},{"internalType":"uint256","name":"_startTime","type":"uint256"},{"internalType":"uint256","name":"_duration","type":"uint256"},{"internalType":"uint256","name":"_rate","type":"uint256"},{"internalType":"uint256","name":"_tokensForSale","type":"uint256"},{"internalType":"address","name":"_fundToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"baseAllocation","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"levelsAllocation","type":"uint256"}],"name":"BaseAllocationCalculated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"baseAllocation","type":"uint256"}],"name":"BaseAllocationChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newRate","type":"uint256"}],"name":"CapChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"}],"name":"DurationChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"}],"name":"FCFSDurationChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"LevelsEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"staking","type":"address"}],"name":"LevelsStakingChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"LockOnRegisterEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"MaxChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"MinChanged","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":"newRate","type":"uint256"}],"name":"RateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"}],"name":"RegisterDurationChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"RegisterTimeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"string","name":"levelId","type":"string"},{"indexed":false,"internalType":"uint256","name":"weight","type":"uint256"},{"indexed":false,"internalType":"bool","name":"tokensLocked","type":"bool"}],"name":"Registered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"SaleOpenedForAllLevels","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"StartChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokensPurchased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"WhitelistEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"tierId","type":"string"},{"indexed":false,"internalType":"uint256","name":"totalN","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"winnersN","type":"uint256"},{"indexed":false,"internalType":"address[]","name":"winners","type":"address[]"}],"name":"WinnersPicked","type":"event"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseAllocation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"batchAddWhitelisted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"batchRemoveWhitelisted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"buyTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"buyTokens","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"purchaseAmountWei","type":"uint256"}],"name":"calculatePurchaseAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"duration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fcfsDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fundByTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fundToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"id","type":"string"}],"name":"getLevelAddresses","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"id","type":"string"}],"name":"getLevelNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLevelNumbers","outputs":[{"internalType":"string[]","name":"","type":"string[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"id","type":"string"}],"name":"getLevelWinners","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMinMaxLimits","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getUserLevelAllocation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getUserLevelState","outputs":[{"internalType":"string","name":"","type":"string"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"id","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isLive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isRegistering","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"levelAddresses","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"levelsEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"levelsOpenAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"levelsStaking","outputs":[{"internalType":"contract ILevelsStaking","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockOnRegister","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSell","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minSell","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":"participants","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"id","type":"string"}],"name":"pickWinners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"raised","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"register","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"registerDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"registerTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_baseAllocation","type":"uint256"}],"name":"setBaseAllocation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newDuration","type":"uint256"}],"name":"setFCFSDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ILevelsStaking","name":"_staking","type":"address"}],"name":"setLevelsStaking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setMax","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setMin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newRate","type":"uint256"}],"name":"setRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newDuration","type":"uint256"}],"name":"setRegisterDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newTime","type":"uint256"}],"name":"setRegisterTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newDuration","type":"uint256"}],"name":"setSaleDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newTime","type":"uint256"}],"name":"setStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokensForSale","type":"uint256"}],"name":"setTokensForSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"id","type":"string"},{"internalType":"address[]","name":"winners","type":"address[]"}],"name":"setWinners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"toggleLevels","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"toggleLockOnRegister","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"toggleWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tokensForSale","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokensSold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalWeights","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updateBaseAllocation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userLevel","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userWeight","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistAllocation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"winnersPicked","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040526008805460ff19908116909155600b80549091166001179055600e805461ffff60a01b191661010160a01b1790553480156200003f57600080fd5b5060405162004d2638038062004d26833981016040819052620000629162000210565b8083838787600033600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180556002919091556003556006919091556007556008805460ff19166001600160a01b038316151590811790915560ff16156200010e5760088054610100600160a81b0319166101006001600160a01b038416021790555b50336000908152600c60209081526040909120805460ff1916600117905586516200014091601691908901906200014d565b5050505050505062000374565b8280546200015b9062000321565b90600052602060002090601f0160209004810192826200017f5760008555620001ca565b82601f106200019a57805160ff1916838001178555620001ca565b82800160010185558215620001ca579182015b82811115620001ca578251825591602001919060010190620001ad565b50620001d8929150620001dc565b5090565b5b80821115620001d85760008155600101620001dd565b80516001600160a01b03811681146200020b57600080fd5b919050565b60008060008060008060c0878903121562000229578182fd5b86516001600160401b038082111562000240578384fd5b818901915089601f83011262000254578384fd5b8151818111156200026957620002696200035e565b604051601f8201601f19908116603f011681019083821181831017156200029457620002946200035e565b81604052828152602093508c84848701011115620002b0578687fd5b8691505b82821015620002d35784820184015181830185015290830190620002b4565b82821115620002e457868484830101525b809a5050505080890151965050506040870151935060608701519250608087015191506200031560a08801620001f3565b90509295509295509295565b600181811c908216806200033657607f821691505b602082108114156200035857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6149a280620003846000396000f3fe6080604052600436106103f25760003560e01c80637e12180e11610208578063c96c813711610118578063e1b318c2116100ab578063f2fde38b1161007a578063f2fde38b14610c44578063f3a4674714610c64578063f733a16c14610c79578063fefca77c14610c8e578063ff0e562c14610cae57600080fd5b8063e1b318c214610bcd578063e797d00214610bee578063eea6221714610c0e578063f0ea4bfc14610c2e57600080fd5b8063d6e8b9b1116100e7578063d6e8b9b114610b48578063d936547e14610b5d578063da00734914610b8d578063da76d5cd14610bad57600080fd5b8063c96c813714610acd578063d0febe4c14610475578063d2ab6be314610aed578063d3527bd614610b2857600080fd5b8063af640d0f1161019b578063bd3099241161016a578063bd30992414610a2f578063be40a32714610a4f578063c138353714610a6f578063c3816f6314610a97578063c4bfce1814610ab757600080fd5b8063af640d0f146109ce578063b2b215b5146109e3578063b8eb354614610a04578063b8f7a66514610a1a57600080fd5b8063926323d5116101d7578063926323d51461095557806393b9400d1461096b5780639e281a981461098e578063a6b02bc3146109ae57600080fd5b80637e12180e146108e257806380e3f1ad14610902578063853828b6146109225780638da5cb5b1461093757600080fd5b806350adcdb71161030357806364661e4b11610296578063738fa94b11610265578063738fa94b1461085657806375a5b1ab14610876578063766daf7b1461088c57806378e97925146108ac5780637afc56f5146108c257600080fd5b806364661e4b146107c55780636c4470fb146107f557806370a082311461080b578063715018a61461084157600080fd5b80635666cd78116102d25780635666cd781461072e578063577174e914610743578063589d7c5414610763578063637c92ff146107a557600080fd5b806350adcdb714610694578063518ab2a8146106d157806351fb012d146106e7578063538a13f31461070157600080fd5b806327e235e31161038657806334fcf4371161035557806334fcf437146105fe5780633610724e1461061e5780633d7faab91461063e5780633e0a322d1461065457806345dc3dd81461067457600080fd5b806327e235e314610578578063280e31cc146105a55780632c4e722e146105d257806334dadad5146105e857600080fd5b80631302973a116103c25780631302973a1461050d57806318c08810146105235780631aa3a008146105435780631fe9eabc1461055857600080fd5b8062fed7001461048457806307ebef70146104b35780630fb5a6b4146104d357806312aef8c3146104f757600080fd5b3661047f5760085460ff16156104755760405162461bcd60e51b815260206004820152603c60248201527f53616c653a20546869732070726573616c652069732066756e6465642062792060448201527f746f6b656e732c2075736520627579546f6b656e732876616c7565290000000060648201526084015b60405180910390fd5b61047d610cce565b005b600080fd5b34801561049057600080fd5b5060085461049e9060ff1681565b60405190151581526020015b60405180910390f35b3480156104bf57600080fd5b5061047d6104ce3660046142b2565b610dec565b3480156104df57600080fd5b506104e960035481565b6040519081526020016104aa565b34801561050357600080fd5b506104e960075481565b34801561051957600080fd5b506104e9600a5481565b34801561052f57600080fd5b5061047d61053e366004614470565b6112bd565b34801561054f57600080fd5b5061047d611326565b34801561056457600080fd5b5061047d610573366004614470565b611785565b34801561058457600080fd5b506104e9610593366004614133565b601a6020526000908152604090205481565b3480156105b157600080fd5b506105c56105c0366004614133565b611841565b6040516104aa91906146d3565b3480156105de57600080fd5b506104e960065481565b3480156105f457600080fd5b506104e960045481565b34801561060a57600080fd5b5061047d610619366004614470565b6118db565b34801561062a57600080fd5b5061047d610639366004614470565b6119a3565b34801561064a57600080fd5b506104e9600f5481565b34801561066057600080fd5b5061047d61066f366004614470565b611ba2565b34801561068057600080fd5b5061047d61068f366004614470565b611c6b565b3480156106a057600080fd5b506008546106b99061010090046001600160a01b031681565b6040516001600160a01b0390911681526020016104aa565b3480156106dd57600080fd5b506104e960175481565b3480156106f357600080fd5b50600b5461049e9060ff1681565b34801561070d57600080fd5b5061072161071c3660046142b2565b611d27565b6040516104aa9190614564565b34801561073a57600080fd5b506104e9611e75565b34801561074f57600080fd5b5061047d61075e3660046142e5565b611e99565b34801561076f57600080fd5b5061079361077e366004614133565b60146020526000908152604090205460ff1681565b60405160ff90911681526020016104aa565b3480156107b157600080fd5b5061047d6107c0366004614470565b61223c565b3480156107d157600080fd5b506107e56107e0366004614133565b612306565b6040516104aa94939291906146e6565b34801561080157600080fd5b506104e960195481565b34801561081757600080fd5b506104e9610826366004614133565b6001600160a01b03166000908152601a602052604090205490565b34801561084d57600080fd5b5061047d61262b565b34801561086257600080fd5b5061047d610871366004614470565b61269f565b34801561088257600080fd5b506104e960055481565b34801561089857600080fd5b5061047d6108a736600461417a565b612775565b3480156108b857600080fd5b506104e960025481565b3480156108ce57600080fd5b506107216108dd3660046142b2565b6128a7565b3480156108ee57600080fd5b5061047d6108fd366004614470565b612924565b34801561090e57600080fd5b5061047d61091d36600461427a565b612983565b34801561092e57600080fd5b5061047d6129ee565b34801561094357600080fd5b506000546001600160a01b03166106b9565b34801561096157600080fd5b506104e960105481565b34801561097757600080fd5b50610980612c1b565b6040516104aa929190614577565b34801561099a57600080fd5b5061047d6109a936600461414f565b612d9d565b3480156109ba57600080fd5b506104e96109c9366004614470565b612e68565b3480156109da57600080fd5b506105c5612e8c565b3480156109ef57600080fd5b50600e5461049e90600160a81b900460ff1681565b348015610a1057600080fd5b506104e960095481565b348015610a2657600080fd5b5061049e612e99565b348015610a3b57600080fd5b506104e9610a4a366004614133565b612ebf565b348015610a5b57600080fd5b5061047d610a6a36600461427a565b612ee9565b348015610a7b57600080fd5b50600a54600954604080519283526020830191909152016104aa565b348015610aa357600080fd5b506106b9610ab236600461437f565b612f60565b348015610ac357600080fd5b506104e960115481565b348015610ad957600080fd5b5061047d610ae8366004614470565b612fa7565b348015610af957600080fd5b50610793610b0836600461434d565b805160208183018101805160138252928201919093012091525460ff1681565b348015610b3457600080fd5b5061047d610b4336600461417a565b613006565b348015610b5457600080fd5b5061047d613132565b348015610b6957600080fd5b5061049e610b78366004614133565b600c6020526000908152604090205460ff1681565b348015610b9957600080fd5b506104e9610ba83660046142b2565b6131be565b348015610bb957600080fd5b5061047d610bc8366004614470565b6131ea565b348015610bd957600080fd5b50600e5461049e90600160a01b900460ff1681565b348015610bfa57600080fd5b5061047d610c09366004614133565b6132b4565b348015610c1a57600080fd5b5061047d610c29366004614470565b613393565b348015610c3a57600080fd5b506104e960185481565b348015610c5057600080fd5b5061047d610c5f366004614133565b61345a565b348015610c7057600080fd5b5061049e613544565b348015610c8557600080fd5b5061049e613569565b348015610c9a57600080fd5b5061047d610ca936600461427a565b613587565b348015610cba57600080fd5b50600e546106b9906001600160a01b031681565b610cd6612e99565b610d135760405162461bcd60e51b815260206004820152600e60248201526d53616c653a204e6f74206c69766560901b604482015260640161046c565b60026001541415610d665760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161046c565b600260015560085460ff1615610ddd5760405162461bcd60e51b815260206004820152603660248201527f53616c653a2070726573616c652069732066756e64656420627920746f6b656e60448201527573206275742076616c7565206973206d697373696e6760501b606482015260840161046c565b610de6346135fe565b60018055565b6000546001600160a01b03163314610e165760405162461bcd60e51b815260040161046c90614744565b600e5460405163d5a162bd60e01b81526000916001600160a01b03169063d5a162bd90610e499086908690600401614610565b60006040518083038186803b158015610e6157600080fd5b505afa158015610e75573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610e9d91908101906143c1565b90508060800151610f0d5760405162461bcd60e51b815260206004820152603460248201527f53616c653a204f6e6c79206c6f74746572792074696572732061726520616c6c6044820152736f77656420746f207069636b2077696e6e65727360601b606482015260840161046c565b60a0810151604051600090601290610f289087908790614554565b90815260405190819003602001902054905080610fd35760405162461bcd60e51b815260206004820152605a60248201527f53616c653a205061727469636970616e7473206e756d6265722073686f756c6460448201527f206265206d6f7265207468616e20302e2041726520746865726520726567697360648201527f746572656420757365727320696e2074686973206c6576656c3f000000000000608482015260a40161046c565b6000610fe260ff841683614810565b905080610fed575060015b8060138787604051611000929190614554565b908152604051908190036020019020805460ff9290921660ff19909216919091179055600061102f8284614843565b905060005b811561115157604080514460208083019190915242828401526060808301859052835180840390910181526080909201909252805191012060009061107a9086906148f3565b905081611086816148d8565b925050600060128a8a60405161109d929190614554565b908152602001604051809103902082815481106110ca57634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b0316808352601490915260409091205490915060ff168061110257505050611034565b8060ff16601060008282546111179190614843565b90915550506001600160a01b0382166000908152601460205260409020805460ff191690558461114681614886565b955050505050611034565b6000836001600160401b0381111561117957634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156111a2578160200160208202803683370190505b50905060005b60128a8a6040516111ba929190614554565b9081526040519081900360200190205481101561127157600060128b8b6040516111e5929190614554565b9081526020016040518091039020828154811061121257634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b0316808352601490915260409091205490915060ff161561125e57825181908490634e487b7160e01b600052603260045260246000fd5b5080611269816148d8565b9150506111a8565b507f1384e026e8cb5a62c4b4038979dd91ae8a2e68f61772d6079c3b7e7384b89c1b8989878451856040516112aa959493929190614695565b60405180910390a1505050505050505050565b6000546001600160a01b031633146112e75760405162461bcd60e51b815260040161046c90614744565b600f8190556003546040519081527fff9eb67881f60bf89c804c5f5baf096fc4011374504513568b2825aa85c60860906020015b60405180910390a150565b61132e613569565b61137a5760405162461bcd60e51b815260206004820152601f60248201527f53616c653a204e6f74206f70656e20666f7220726567697374726174696f6e00604482015260640161046c565b611382612e99565b156113db5760405162461bcd60e51b815260206004820152602360248201527f53616c653a2043616e6e6f742072656769737465722c2073616c65206973206c60448201526269766560e81b606482015260840161046c565b600e54600160a01b900460ff166114435760405162461bcd60e51b815260206004820152602660248201527f53616c653a2043616e6e6f742072656769737465722c206c6576656c732064696044820152651cd8589b195960d21b606482015260840161046c565b600e546001600160a01b03166114b15760405162461bcd60e51b815260206004820152602d60248201527f53616c653a204c6576656c73207374616b696e6720616464726573732069732060448201526c1b9bdd081cdc1958da599a5959609a1b606482015260840161046c565b3360008181526014602052604090205460ff16156115115760405162461bcd60e51b815260206004820152601860248201527f53616c653a20416c726561647920726567697374657265640000000000000000604482015260640161046c565b600e54604051637269310760e11b81526001600160a01b038381166004830152600092169063e4d2620e9060240160006040518083038186803b15801561155757600080fd5b505afa15801561156b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261159391908101906143c1565b90506000816020015160ff16116115fc5760405162461bcd60e51b815260206004820152602760248201527f53616c653a20596f7572206c6576656c20697320746f6f206c6f7720746f207260448201526632b3b4b9ba32b960c91b606482015260840161046c565b600e54600160a81b900460ff161561166e57600e5460405163f435f5a760e01b81526001600160a01b0384811660048301529091169063f435f5a790602401600060405180830381600087803b15801561165557600080fd5b505af1158015611669573d6000803e3d6000fd5b505050505b80516001600160a01b0383166000908152601560209081526040909120825161169c93919290910190613ee9565b50602081810180516001600160a01b0385166000908152601490935260408320805460ff191660ff9283161790559051601080549190921692906116e19084906147f8565b909155505080516040516012916116f791614538565b9081526040516020918190038201812080546001810182556000918252908390200180546001600160a01b0319166001600160a01b038616908117909155835192840151600e5491937f2c4f034e06930af56f941f70cd4d8a322e62777b01e1db02013de59b1a626d189361177993919291600160a81b900460ff1690614717565b60405180910390a25050565b6000546001600160a01b031633146117af5760405162461bcd60e51b815260040161046c90614744565b600a5415806117c05750600a548110155b61180c5760405162461bcd60e51b815260206004820152601760248201527f4d75737420626520626967676572207468616e206d696e000000000000000000604482015260640161046c565b60098190556040518181527f770427b1be4e1c22afadce4780c0ad65c0cbdd9b12543bea5a992f5bda0255079060200161131b565b6015602052600090815260409020805461185a9061489d565b80601f01602080910402602001604051908101604052809291908181526020018280546118869061489d565b80156118d35780601f106118a8576101008083540402835291602001916118d3565b820191906000526020600020905b8154815290600101906020018083116118b657829003601f168201915b505050505081565b6000546001600160a01b031633146119055760405162461bcd60e51b815260040161046c90614744565b61190d612e99565b1561196e5760405162461bcd60e51b815260206004820152602b60248201527f53616c653a2053616c65206973206c6976652c2072617465206368616e67652060448201526a1b9bdd08185b1b1bddd95960aa1b606482015260840161046c565b60068190556040518181527f595a30f13a69b616c4d568e2a2b7875fdfe86e4300a049953c76ee278f8f3f109060200161131b565b6119ab612e99565b6119e85760405162461bcd60e51b815260206004820152600e60248201526d53616c653a204e6f74206c69766560901b604482015260640161046c565b60026001541415611a3b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161046c565b600260015560085460ff16611aa15760405162461bcd60e51b815260206004820152602660248201527f53616c653a2066756e64696e6720627920746f6b656e73206973206e6f7420616044820152651b1b1bddd95960d21b606482015260840161046c565b600854604051636eb1769f60e11b8152336004820152306024820152829161010090046001600160a01b03169063dd62ed3e9060440160206040518083038186803b158015611aef57600080fd5b505afa158015611b03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b279190614488565b1015611b755760405162461bcd60e51b815260206004820152601d60248201527f53616c653a2066756e6420746f6b656e206e6f7420617070726f766564000000604482015260640161046c565b611b7e816135fe565b600854611b9b9061010090046001600160a01b0316333084613820565b5060018055565b6000546001600160a01b03163314611bcc5760405162461bcd60e51b815260040161046c90614744565b6004548111611c365760405162461bcd60e51b815260206004820152603060248201527f53616c653a2073746172742074696d65206d757374206265206166746572207460448201526f68652072656769737465722074696d6560801b606482015260840161046c565b60028190556040518181527fb40bc62c7614c21c292641d79509c0572ffdcf912e874169cf69162e026146c99060200161131b565b6000546001600160a01b03163314611c955760405162461bcd60e51b815260040161046c90614744565b6009541580611ca657506009548111155b611cf25760405162461bcd60e51b815260206004820152601860248201527f4d75737420626520736d616c6c6572207468616e206d61780000000000000000604482015260640161046c565b600a8190556040518181527f46077927d83541de01a449629a0bb1dbeb03e03fd6ee2e3ba4bf2952e39433509060200161131b565b6060600060138484604051611d3d929190614554565b9081526040519081900360200190205460ff166001600160401b03811115611d7557634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611d9e578160200160208202803683370190505b50905060005b60128585604051611db6929190614554565b90815260405190819003602001902054811015611e6d57600060128686604051611de1929190614554565b90815260200160405180910390208281548110611e0e57634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b0316808352601490915260409091205490915060ff1615611e5a57825181908490634e487b7160e01b600052603260045260246000fd5b5080611e65816148d8565b915050611da4565b509392505050565b600080611e83600954612e68565b9050600d5481611e939190614824565b91505090565b6000546001600160a01b03163314611ec35760405162461bcd60e51b815260040161046c90614744565b600e5460405163d5a162bd60e01b81526000916001600160a01b03169063d5a162bd90611ef69088908890600401614610565b60006040518083038186803b158015611f0e57600080fd5b505afa158015611f22573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611f4a91908101906143c1565b60200151905060005b60128686604051611f65929190614554565b90815260405190819003602001902054811015612090576014600060128888604051611f92929190614554565b90815260200160405180910390208381548110611fbf57634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b031683528201929092526040018120546010805460ff909216929091611ffb908490614843565b925050819055506000601460006012898960405161201a929190614554565b9081526020016040518091039020848154811061204757634e487b7160e01b600052603260045260246000fd5b6000918252602080832091909101546001600160a01b031683528201929092526040019020805460ff191660ff9290921691909117905580612088816148d8565b915050611f53565b5060005b8281101561219b578160ff16601060008282546120b191906147f8565b90915550829050601460008686858181106120dc57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906120f19190614133565b6001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff021916908360ff16021790555085856015600087878681811061214f57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906121649190614133565b6001600160a01b031681526020810191909152604001600020612188929091613f6d565b5080612193816148d8565b915050612094565b5060405182906013906121b19088908890614554565b908152602001604051809103902060006101000a81548160ff021916908360ff1602179055507f1384e026e8cb5a62c4b4038979dd91ae8a2e68f61772d6079c3b7e7384b89c1b85856012888860405161220c929190614554565b9081526040519081900360200181205461222d939291879089908290614624565b60405180910390a15050505050565b6000546001600160a01b031633146122665760405162461bcd60e51b815260040161046c90614744565b60025481106122d15760405162461bcd60e51b815260206004820152603160248201527f53616c653a2072656769737465722074696d65206d757374206265206265666f6044820152707265207468652073746172742074696d6560781b606482015260840161046c565b60048190556040518181527f90d3be8da38886a5f029d2f1188aa8d57c6826b16cbc7abdcf22d883f6605acc9060200161131b565b6001600160a01b03811660009081526015602052604081208054606092918291829182916123339061489d565b80601f016020809104026020016040519081016040528092919081815260200182805461235f9061489d565b80156123ac5780601f10612381576101008083540402835291602001916123ac565b820191906000526020600020905b81548152906001019060200180831161238f57829003601f168201915b5050505050905060008151600014612464576001600160a01b038716600090815260156020526040902080546123e19061489d565b80601f016020809104026020016040519081016040528092919081815260200182805461240d9061489d565b801561245a5780601f1061242f5761010080835404028352916020019161245a565b820191906000526020600020905b81548152906001019060200180831161243d57829003601f168201915b5050505050612482565b604051806040016040528060048152602001636e6f6e6560e01b8152505b600e5460405163d5a162bd60e01b81529192506000916001600160a01b039091169063d5a162bd906124b89085906004016146d3565b60006040518083038186803b1580156124d057600080fd5b505afa1580156124e4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261250c91908101906143c1565b90506000612518613544565b9050600081612542576001600160a01b038a1660009081526014602052604090205460ff16612548565b82602001515b905060006011548260ff1661255d9190614824565b9050821561257d57612570600954612e68565b61257a90826147f8565b90505b6000865160001461260f578460800151801561260a575083806125b857506001600160a01b038c166000908152600c602052604090205460ff165b8061260a575060006013876040516125d09190614538565b9081526040519081900360200190205460ff1611801561260a57506001600160a01b038c1660009081526014602052604090205460ff1615155b612612565b60005b959c60ff939093169b5090995093975095505050505050565b6000546001600160a01b031633146126555760405162461bcd60e51b815260040161046c90614744565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146126c95760405162461bcd60e51b815260040161046c90614744565b600254816004546126da91906147f8565b106127405760405162461bcd60e51b815260206004820152603060248201527f53616c653a20726567697374657220656e64206d757374206265206265666f7260448201526f65207468652073746172742074696d6560801b606482015260840161046c565b60058190556040518181527f0427e7ba04df00e564e2a87324ce9927680ca725fde43516ad6055c9d3c6b6ad9060200161131b565b6000546001600160a01b0316331461279f5760405162461bcd60e51b815260040161046c90614744565b60005b818110156128a257600c60008484848181106127ce57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906127e39190614133565b6001600160a01b0316815260208101919091526040016000205460ff1615612890576000600c600085858581811061282b57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906128409190614133565b6001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600d600082825461288a9190614843565b90915550505b8061289a816148d8565b9150506127a2565b505050565b6060601283836040516128bb929190614554565b908152604080519182900360209081018320805480830285018301909352828452919083018282801561291757602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116128f9575b5050505050905092915050565b6000546001600160a01b0316331461294e5760405162461bcd60e51b815260040161046c90614744565b60038190556040518181527f9bb10695bde7db94333a5404f0767118f3965fd73217e45f96529c3d368285af9060200161131b565b6000546001600160a01b031633146129ad5760405162461bcd60e51b815260040161046c90614744565b600b805460ff19168215159081179091556040519081527f9bea0dd3cae4438dc4c54c3110002aedc380f4075b6edae73ae0536105a2008a9060200161131b565b6000546001600160a01b03163314612a185760405162461bcd60e51b815260040161046c90614744565b478015612a5a57600080546040516001600160a01b039091169183156108fc02918491818181858888f19350505050158015612a58573d6000803e3d6000fd5b505b60085460ff168015612aea57506008546040516370a0823160e01b815230600482015260009161010090046001600160a01b0316906370a082319060240160206040518083038186803b158015612ab057600080fd5b505afa158015612ac4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ae89190614488565b115b15612c18576008546001600160a01b036101009091041663a9059cbb612b186000546001600160a01b031690565b6008546040516370a0823160e01b81523060048201526101009091046001600160a01b0316906370a082319060240160206040518083038186803b158015612b5f57600080fd5b505afa158015612b73573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b979190614488565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044015b602060405180830381600087803b158015612bde57600080fd5b505af1158015612bf2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c169190614296565b505b50565b6060806000600e60009054906101000a90046001600160a01b03166001600160a01b031663d8cde1c66040518163ffffffff1660e01b815260040160006040518083038186803b158015612c6e57600080fd5b505afa158015612c82573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612caa91908101906141b9565b9050600081516001600160401b03811115612cd557634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015612cfe578160200160208202803683370190505b50905060005b8251811015612d93576012838281518110612d2f57634e487b7160e01b600052603260045260246000fd5b6020026020010151604051612d449190614538565b908152602001604051809103902080549050828281518110612d7657634e487b7160e01b600052603260045260246000fd5b602090810291909101015280612d8b816148d8565b915050612d04565b5090939092509050565b6000546001600160a01b03163314612dc75760405162461bcd60e51b815260040161046c90614744565b816001600160a01b031663a9059cbb612de86000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401602060405180830381600087803b158015612e3057600080fd5b505af1158015612e44573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128a29190614296565b6000620f424060065483612e7c9190614824565b612e869190614810565b92915050565b6016805461185a9061489d565b600060025442118015612eba5750600354600254612eb791906147f8565b42105b905090565b6011546001600160a01b0382166000908152601460205260408120549091612e869160ff16614824565b6000546001600160a01b03163314612f135760405162461bcd60e51b815260040161046c90614744565b600e8054821515600160a81b0260ff60a81b199091161790556040517f0615d623d485097ea27091190b1b298ccd7557f48c9f963a477f18185af6b8999061131b90831515815260200190565b81516020818401810180516012825292820191850191909120919052805482908110612f8b57600080fd5b6000918252602090912001546001600160a01b03169150829050565b6000546001600160a01b03163314612fd15760405162461bcd60e51b815260040161046c90614744565b60118190556040518181527fde564456246ca1697b6573255d45061d65b3e9ee5a2577854152bbd6b80ad3a49060200161131b565b6000546001600160a01b031633146130305760405162461bcd60e51b815260040161046c90614744565b60005b818110156128a257600c600084848481811061305f57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906130749190614133565b6001600160a01b0316815260208101919091526040016000205460ff16613120576001600c60008585858181106130bb57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906130d09190614133565b6001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600d600082825461311a91906147f8565b90915550505b8061312a816148d8565b915050613033565b6000546001600160a01b0316331461315c5760405162461bcd60e51b815260040161046c90614744565b6000613166611e75565b6007546131739190614843565b9050601054816131839190614810565b601181905560408051918252602082018390527fc5aaa53d8a53bcc079422d70f3e62fa174bef2a1ce91dbef53ecc73f3e4956cf910161131b565b6000601283836040516131d2929190614554565b90815260405190819003602001902054905092915050565b6000546001600160a01b031633146132145760405162461bcd60e51b815260040161046c90614744565b60085460ff161561327b576008546001600160a01b036101009091041663a9059cbb6132486000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401612bc4565b600080546040516001600160a01b039091169183156108fc02918491818181858888f19350505050158015612c16573d6000803e3d6000fd5b6000546001600160a01b031633146132de5760405162461bcd60e51b815260040161046c90614744565b600e546001600160a01b0316156133455760405162461bcd60e51b815260206004820152602560248201527f53616c653a205374616b696e6720636f6e747261637420697320616c726561646044820152641e481cd95d60da1b606482015260840161046c565b600e80546001600160a01b0319166001600160a01b0383169081179091556040519081527fe4e32051fe8e9eb36a875f8ce993530de8409e2baeca6a55638b8e1185aecade9060200161131b565b6000546001600160a01b031633146133bd5760405162461bcd60e51b815260040161046c90614744565b6133c5612e99565b156134255760405162461bcd60e51b815260206004820152602a60248201527f53616c653a2053616c65206973206c6976652c20636170206368616e6765206e6044820152691bdd08185b1b1bddd95960b21b606482015260840161046c565b60078190556040518181527f162238f20a51a0fd11d4e4e9ea154917f3776b59af9fedaeaf42676ad580a2c79060200161131b565b6000546001600160a01b031633146134845760405162461bcd60e51b815260040161046c90614744565b6001600160a01b0381166134e95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161046c565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600060035460025461355691906147f8565b600f5461356390426147f8565b11905090565b600060045442118015612eba5750600554600454612eb791906147f8565b6000546001600160a01b031633146135b15760405162461bcd60e51b815260040161046c90614744565b600e8054821515600160a01b0260ff60a01b199091161790556040517f5a93387354333593ee4e928f4c1050f3f43ca3f370542ce5de543ca1b71092889061131b90831515815260200190565b6000613608613880565b905033600061361684612e68565b9050806017600082825461362a91906147f8565b90915550506001600160a01b0382166000908152601a6020526040812080548392906136579084906147f8565b90915550508061369d5760405162461bcd60e51b8152602060048201526011602482015270053616c653a20616d6f756e74206973203607c1b604482015260640161046c565b600a548410156136ef5760405162461bcd60e51b815260206004820152601960248201527f53616c653a20616d6f756e7420697320746f6f20736d616c6c00000000000000604482015260640161046c565b82158061371457506001600160a01b0382166000908152601a60205260409020548310155b61376c5760405162461bcd60e51b815260206004820152602360248201527f53616c653a20616d6f756e742065786365656473206d617820616c6c6f63617460448201526234b7b760e91b606482015260840161046c565b60075460175411156137b45760405162461bcd60e51b815260206004820152601160248201527014d85b194e8818d85c081c995858da1959607a1b604482015260640161046c565b836018546137c291906147f8565b6018556019546137d39060016147f8565b60195560408051858152602081018390526001600160a01b038416917f8fafebcaf9d154343dad25669bfa277f4fbacd7ac6b0c4fed522580e040a0f33910160405180910390a250505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261387a908590613c87565b50505050565b6000338161388d82612ebf565b9050600061389c600954612e68565b600b5490915060ff161580156138bc5750600e54600160a01b900460ff16155b156138c8579392505050565b600b5460ff1680156138e95750336000908152600c602052604090205460ff165b15613900576138f88183613d59565b935050505090565b600b5460ff16801561391c5750600e54600160a01b900460ff16155b156139695760405162461bcd60e51b815260206004820152601a60248201527f53616c653a206e6f7420696e207468652077686974656c697374000000000000604482015260640161046c565b600e54600160a01b900460ff1615613c3f576000601154116139ec5760405162461bcd60e51b815260206004820152603660248201527f53616c653a206c6576656c732061726520656e61626c6564206275742062617360448201527519505b1b1bd8d85d1a5bdb881a5cc81b9bdd081cd95d60521b606482015260840161046c565b6139f4613544565b15613aa457600e54604051637269310760e11b81526001600160a01b038581166004830152600092169063e4d2620e9060240160006040518083038186803b158015613a3f57600080fd5b505afa158015613a53573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052613a7b91908101906143c1565b6020015160ff16601154613a8f9190614824565b9050613a9b82826147f8565b94505050505090565b6001600160a01b03831660009081526015602052604081208054613ac79061489d565b80601f0160208091040260200160405190810160405280929190818152602001828054613af39061489d565b8015613b405780601f10613b1557610100808354040283529160200191613b40565b820191906000526020600020905b815481529060010190602001808311613b2357829003601f168201915b505050505090506000815111613ba35760405162461bcd60e51b815260206004820152602260248201527f53616c653a2075736572206c6576656c206973206e6f74207265676973746572604482015261195960f21b606482015260840161046c565b60008311613c365760405162461bcd60e51b815260206004820152605460248201527f53616c653a207573657220686173206e6f206c6576656c20616c6c6f6361746960448201527f6f6e2c206e6f7420726567697374657265642c206c6f7374206c6f7474657279606482015273206f72206c6576656c20697320746f6f206c6f7760601b608482015260a40161046c565b50909392505050565b60405162461bcd60e51b815260206004820152601760248201527f53616c653a20756e726561636861626c65207374617465000000000000000000604482015260640161046c565b6000613cdc826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613d719092919063ffffffff16565b8051909150156128a25780806020019051810190613cfa9190614296565b6128a25760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161046c565b6000818311613d685781613d6a565b825b9392505050565b6060613d808484600085613d88565b949350505050565b606082471015613de95760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161046c565b843b613e375760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161046c565b600080866001600160a01b03168587604051613e539190614538565b60006040518083038185875af1925050503d8060008114613e90576040519150601f19603f3d011682016040523d82523d6000602084013e613e95565b606091505b5091509150613ea5828286613eb0565b979650505050505050565b60608315613ebf575081613d6a565b825115613ecf5782518084602001fd5b8160405162461bcd60e51b815260040161046c91906146d3565b828054613ef59061489d565b90600052602060002090601f016020900481019282613f175760008555613f5d565b82601f10613f3057805160ff1916838001178555613f5d565b82800160010185558215613f5d579182015b82811115613f5d578251825591602001919060010190613f42565b50613f69929150613fe1565b5090565b828054613f799061489d565b90600052602060002090601f016020900481019282613f9b5760008555613f5d565b82601f10613fb45782800160ff19823516178555613f5d565b82800160010185558215613f5d579182015b82811115613f5d578235825591602001919060010190613fc6565b5b80821115613f695760008155600101613fe2565b60008083601f840112614007578182fd5b5081356001600160401b0381111561401d578182fd5b6020830191508360208260051b850101111561403857600080fd5b9250929050565b805161404a8161495e565b919050565b60008083601f840112614060578182fd5b5081356001600160401b03811115614076578182fd5b60208301915083602082850101111561403857600080fd5b600082601f83011261409e578081fd5b81356140b16140ac826147d1565b6147a1565b8181528460208386010111156140c5578283fd5b816020850160208301379081016020019190915292915050565b600082601f8301126140ef578081fd5b81516140fd6140ac826147d1565b818152846020838601011115614111578283fd5b613d8082602083016020870161485a565b805160ff8116811461404a57600080fd5b600060208284031215614144578081fd5b8135613d6a81614949565b60008060408385031215614161578081fd5b823561416c81614949565b946020939093013593505050565b6000806020838503121561418c578182fd5b82356001600160401b038111156141a1578283fd5b6141ad85828601613ff6565b90969095509350505050565b600060208083850312156141cb578182fd5b82516001600160401b03808211156141e1578384fd5b818501915085601f8301126141f4578384fd5b81518181111561420657614206614933565b8060051b6142158582016147a1565b8281528581019085870183870188018b101561422f578889fd5b8893505b8484101561426c5780518681111561424957898afd5b6142578c8a838b01016140df565b84525060019390930192918701918701614233565b509998505050505050505050565b60006020828403121561428b578081fd5b8135613d6a8161495e565b6000602082840312156142a7578081fd5b8151613d6a8161495e565b600080602083850312156142c4578182fd5b82356001600160401b038111156142d9578283fd5b6141ad8582860161404f565b600080600080604085870312156142fa578182fd5b84356001600160401b0380821115614310578384fd5b61431c8883890161404f565b90965094506020870135915080821115614334578384fd5b5061434187828801613ff6565b95989497509550505050565b60006020828403121561435e578081fd5b81356001600160401b03811115614373578182fd5b613d808482850161408e565b60008060408385031215614391578182fd5b82356001600160401b038111156143a6578283fd5b6143b28582860161408e565b95602094909401359450505050565b6000602082840312156143d2578081fd5b81516001600160401b03808211156143e8578283fd5b9083019060c082860312156143fb578283fd5b614403614779565b825182811115614411578485fd5b61441d878286016140df565b82525061442c60208401614122565b602082015260408301516040820152606083015160608201526144516080840161403f565b608082015261446260a08401614122565b60a082015295945050505050565b600060208284031215614481578081fd5b5035919050565b600060208284031215614499578081fd5b5051919050565b6000815180845260208085019450808401835b838110156144d85781516001600160a01b0316875295820195908201906001016144b3565b509495945050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6000815180845261452481602086016020860161485a565b601f01601f19169290920160200192915050565b6000825161454a81846020870161485a565b9190910192915050565b8183823760009101908152919050565b602081526000613d6a60208301846144a0565b6000604082016040835280855180835260608501915060608160051b86010192506020808801855b838110156145cd57605f198887030185526145bb86835161450c565b9550938201939082019060010161459f565b505085840381870152865180855287820194820193509150845b82811015614603578451845293810193928101926001016145e7565b5091979650505050505050565b602081526000613d806020830184866144e3565b60808152600061463860808301888a6144e3565b602083810188905260408401879052838203606085015284825285918101835b8681101561468657833561466b81614949565b6001600160a01b031682529282019290820190600101614658565b509a9950505050505050505050565b6080815260006146a96080830187896144e3565b85602084015284604084015282810360608401526146c781856144a0565b98975050505050505050565b602081526000613d6a602083018461450c565b6080815260006146f9608083018761450c565b60208301959095525060408101929092521515606090910152919050565b60608152600061472a606083018661450c565b60ff94909416602083015250901515604090910152919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60405160c081016001600160401b038111828210171561479b5761479b614933565b60405290565b604051601f8201601f191681016001600160401b03811182821017156147c9576147c9614933565b604052919050565b60006001600160401b038211156147ea576147ea614933565b50601f01601f191660200190565b6000821982111561480b5761480b614907565b500190565b60008261481f5761481f61491d565b500490565b600081600019048311821515161561483e5761483e614907565b500290565b60008282101561485557614855614907565b500390565b60005b8381101561487557818101518382015260200161485d565b8381111561387a5750506000910152565b60008161489557614895614907565b506000190190565b600181811c908216806148b157607f821691505b602082108114156148d257634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156148ec576148ec614907565b5060010190565b6000826149025761490261491d565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114612c1857600080fd5b8015158114612c1857600080fdfea2646970667358221220df2fc874e170db4b6df0e89c94c2ad6d7a62a19147ade7ede73de48303e0add964736f6c6343000804003300000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000060c8ce8000000000000000000000000000000000000000000000000000000000000054600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001fc3842bd1f071c00000000000000000000000000000e9e7cea3dedca5984780bafc599bd69add087d56000000000000000000000000000000000000000000000000000000000000000a6c69717569646966747900000000000000000000000000000000000000000000

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

00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000060c8ce8000000000000000000000000000000000000000000000000000000000000054600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001fc3842bd1f071c00000000000000000000000000000e9e7cea3dedca5984780bafc599bd69add087d56000000000000000000000000000000000000000000000000000000000000000a6c69717569646966747900000000000000000000000000000000000000000000

-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [1] : 0000000000000000000000000000000000000000000000000000000060c8ce80
Arg [2] : 0000000000000000000000000000000000000000000000000000000000005460
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [4] : 000000000000000000000000000000000000000000001fc3842bd1f071c00000
Arg [5] : 000000000000000000000000e9e7cea3dedca5984780bafc599bd69add087d56
Arg [6] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [7] : 6c69717569646966747900000000000000000000000000000000000000000000


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.