Contract 0x3e2202b2b98b288ef827fac3c894ce9c17ca7eff

 
Txn Hash
Block
From
To
Value [Txn Fee]
0x1ee3c21b8bad3d3050cfb268f0cabf8ef6b83cfb76457d4fc6fe081d6aa6f4a789764922021-07-08 12:27:4217 days 4 hrs ago0x64653ae9bb31c838c86c291c34dde65201fecade IN  0x3e2202b2b98b288ef827fac3c894ce9c17ca7eff0 BNB0.001326275
0x8f269ce11d839e33f0f7df34eca4ef63ad1dc60b31a20a22483f86f05a25e5d789215612021-07-06 14:39:2019 days 2 hrs ago0xb2f5b7009a21a6af46582f31325ad9aaea0c0bd2 IN  0x3e2202b2b98b288ef827fac3c894ce9c17ca7eff0 BNB0.00127285
0x5af0f985881de3e910189e178bc687ab56bad9f8f69bbc2b4e4b979f6216c06789191962021-07-06 12:39:3219 days 4 hrs ago0x26fe2c64205a9cd962c22446164e4ced1b6c2231 IN  0x3e2202b2b98b288ef827fac3c894ce9c17ca7eff0 BNB0.00127285
0xc949845f758b602087a636a0bccfb8e07190d0cf199476da3d28e312c30852cc88510642021-07-04 3:24:1221 days 13 hrs ago0x22589cf6d458af2eaee7ee7cb7be7baf0ffb0783 IN  0x3e2202b2b98b288ef827fac3c894ce9c17ca7eff0 BNB0.00119779
0x30bfca0d8f3c49d1e4d51d4bf850c922f880007ece76f30c2b4688321387323a88510322021-07-04 3:22:3421 days 13 hrs ago0xcc50492c30fbf4d2361cf2310718689fd993163c IN  0x3e2202b2b98b288ef827fac3c894ce9c17ca7eff0 BNB0.00127279
0xb0be70e8c3b4ad8affb8d86c1f4a951bafe8476799f9cd8258de5856c27ea06988510002021-07-04 3:20:5121 days 13 hrs ago0x54f4f2bebe40578e0676a580796bd730f1945bab IN  0x3e2202b2b98b288ef827fac3c894ce9c17ca7eff0 BNB0.0015
0xbcf08c22952c7249c9a4ef23eaa7af5143fcfc42897b87fea1e07eefef6a891a88509902021-07-04 3:20:2121 days 13 hrs ago0x54f4f2bebe40578e0676a580796bd730f1945bab IN  0x3e2202b2b98b288ef827fac3c894ce9c17ca7eff0 BNB0.00119779
0xaf733d6374d0d6ee61a2a4920e459aa0d6d46165bb96018eb1f4fdbfa496690588048042021-07-02 12:29:2623 days 4 hrs ago0x627faaa13ca3d25bf959325d44543e04c99ccec8 IN  0x3e2202b2b98b288ef827fac3c894ce9c17ca7eff0 BNB0.00127285
0xa6c84e1a8cacd6a81b0d1b7d143de317dcc29216dfb676fab790828ad991f6e587598992021-06-30 22:40:5124 days 18 hrs ago0xaeb9633b513d24f4d9b66e3065d29e20a335aac5 IN  0x3e2202b2b98b288ef827fac3c894ce9c17ca7eff0 BNB0.03208938
0x0830cc53b21583f1cc724ddb8561cb7fc76e4ea25dc9bee0109f5b4725f26f6387342422021-06-30 1:04:3925 days 16 hrs ago0xc9aaae3201f40fd0ff04d9c885769d8256a456ab IN  0x3e2202b2b98b288ef827fac3c894ce9c17ca7eff0 BNB0.00127285
0x666717c6430b8abb4900e3e8e2dcb44ed4105c6afd0df0bf836a9018556c388a86936202021-06-28 14:58:3227 days 2 hrs ago0xba7b3252afd95306c69a54a4bc3d5128b32cda9b IN  0x3e2202b2b98b288ef827fac3c894ce9c17ca7eff0 BNB0.00127285
0x25d12d9d70c9566aed5facd0067cdcdcb608b6d7aa9b98c83c220c61c432571d86927422021-06-28 14:13:2527 days 2 hrs ago0xac3520bfea13b7bdeb63fae817023bbef669638a IN  0x3e2202b2b98b288ef827fac3c894ce9c17ca7eff0 BNB0.019393155
0x5b4482813e8065ace3172bf6ece63600f3fc6289f6f4cbebcde8d4a35a20842885765802021-06-24 13:07:4631 days 3 hrs ago0x3667c95d49973d1a782b9f5904d709bd95a82b93 IN  0x3e2202b2b98b288ef827fac3c894ce9c17ca7eff0 BNB0.028819845
0xebd98720795379e52648c1e62c70ed87cc5772db7276d046c5abc0c89a93ef8285007852021-06-21 21:38:2733 days 19 hrs ago0x89da3b81b3aef16a8899cb178347752ad24afed0 IN  0x3e2202b2b98b288ef827fac3c894ce9c17ca7eff0 BNB0.00127285
0x6885dc8cc837c3ad68caaa4c149359e859b44885ce2623dad660d9830c077fd184987492021-06-21 19:56:1433 days 21 hrs ago0xd10b19baa6c9693b1d424b947df68fbfed9e5932 IN  0x3e2202b2b98b288ef827fac3c894ce9c17ca7eff0 BNB0.00127285
0xec5ddcc0552b77d399ba27498c22418bfa1eb041399f0c0127b3608f6e1154c384894932021-06-21 12:12:0234 days 4 hrs ago0x2a5be69d8ecbf44f975a7541ff90d034e07f2ed6 IN  0x3e2202b2b98b288ef827fac3c894ce9c17ca7eff0 BNB0.00127285
0x3ad3e9b06a56f3d4698d2d035cac637a5711d141255d26ab4631c6b061b3547f84573942021-06-20 9:25:4635 days 7 hrs ago0x758348f346db10d93b602e6092d827daf5d2bed6 IN  0x3e2202b2b98b288ef827fac3c894ce9c17ca7eff0 BNB0.00127291
0x1558051d1e680f6193e0015e601f9a907b6054c569922f5a33aee18271a3953e84407792021-06-19 19:33:3435 days 21 hrs ago0x072baf86defbe3ae21c636c04597c9d7aaa84740 IN  0x3e2202b2b98b288ef827fac3c894ce9c17ca7eff0 BNB0.00127285
0x57c89e99425c3c539592b551d6af0deba30935aad397f800720bb92fbc566fd884262072021-06-19 7:15:5036 days 9 hrs ago0xe43c85ca13aca2d5f297fc8f35d8256332c1eab3 IN  0x3e2202b2b98b288ef827fac3c894ce9c17ca7eff0 BNB0.00119785
0x59be398392278b916da9ba86ecfd2dab83000d068e9f0c429686a7cb0b5ab73784066052021-06-18 14:47:3137 days 2 hrs ago0xba7b3252afd95306c69a54a4bc3d5128b32cda9b IN  0x3e2202b2b98b288ef827fac3c894ce9c17ca7eff0 BNB0.000990915
0x99b04efc0b6f96cd7025d21d33b42b6e6105841434103ac99050a4bb4c11bd2084065552021-06-18 14:45:0137 days 2 hrs ago0xba7b3252afd95306c69a54a4bc3d5128b32cda9b IN  0x3e2202b2b98b288ef827fac3c894ce9c17ca7eff0 BNB0.000744825
0xe2feb8915eb57371c4a8fb810f65a1405563ace48e0a77e981a9086ddb2c1adb84065292021-06-18 14:43:4237 days 2 hrs ago0xba7b3252afd95306c69a54a4bc3d5128b32cda9b IN  0x3e2202b2b98b288ef827fac3c894ce9c17ca7eff0 BNB0.00049873
0x87e5827ea35893342760b54015e496cbbb2d45c4660a01b972e7d17ca3bcf8c683792952021-06-17 15:49:5438 days 1 hr ago0x60aea8a3eb1d6e0951852ce09e206c58dafd8588 IN  0x3e2202b2b98b288ef827fac3c894ce9c17ca7eff0 BNB0.00127291
0xb6eff3dbc978ba06cdba8fe62465f4145f94461776810fb2f5cf4be91d5b480a83745222021-06-17 11:49:1438 days 5 hrs ago0x11843f35b2efe60b3a698fa79f5114e4074baef8 IN  0x3e2202b2b98b288ef827fac3c894ce9c17ca7eff0 BNB0.00119791
0xa0ed5702500f9c7eacf3a6aa9e4a285d9f6442da99d9e1290bb6ff9b6a187e9e83729932021-06-17 10:31:3438 days 6 hrs ago0x1a63c55b30fca8bb6860536616fca976705f746d IN  0x3e2202b2b98b288ef827fac3c894ce9c17ca7eff0 BNB0.00127285
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TrustPadTieredStaking

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 8 : IStaking.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IStaking {
    struct UserInfo {
        uint256 amount;
        uint256 rewardDebt;
        uint256 pendingRewards;
    }

    function userInfo(address account) external view returns (UserInfo memory);
}

File 2 of 8 : ITieredStaking.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

library StakingStructs {
    struct Tier {
        string id;
        uint8 multiplier;
        uint256 lockingPeriod; // in seconds
        uint256 minAmount; // tier is applied when userAmount >= minAmount
        bool random;
    }
}

interface ITieredStaking {
    function getUserTierIdx(address account) external view returns (uint);

    function getUserTier(address account) external view returns (StakingStructs.Tier memory);

    function getTierById(string calldata id) external view returns (StakingStructs.Tier memory);

    function getTier(uint idx) external view returns (StakingStructs.Tier memory);

    function getTotalTierNumbers() external view returns (uint[] memory, string[] memory);

    function getTierNumbers(address presale) external view returns (uint[] memory, string[] memory);

    function pickWinners(address presale, string calldata tierId, uint256 winnersN) external returns (address[] memory);

    function isWinner(address presale, address account) external view returns (bool);

    function getWinners(address presale, string calldata tierId) external view returns (address[] memory);

    function getWinnersCount(address presale, string calldata tierId) external view returns (uint);

    function deposit(uint256 amount) external;

    function withdraw(uint256 amount) external;
}

File 3 of 8 : TrustPadTieredStaking.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

contract TrustPadTieredStaking is Ownable, ITieredStaking {
    using SafeERC20 for IERC20;

    string constant noneTierId = "none";

    struct UserState {
        address account;
        uint256 amount;
        uint256 stakedAt;
        // used for tier detection while "lastStakedAt + tier.lockingPeriod > block.now"
        // to preserve the previous tier while the new staking is applied
        uint256 prevAmount;
        uint256 prevStakedAt;
    }

    address public secondaryStakingSource;
    IERC20 public stakingToken;

    bool public lockPeriodActive = false;
    StakingStructs.Tier[] public tiers;

    mapping(address => UserState) public userState;
    // All accounts, needed for random choosing
    address[] public userAccounts;

    struct PresaleWinners {
        // tierId -> value
        mapping(string => uint8) count;
        mapping(string => address[]) accounts;
        mapping(address => bool) isWinner;
    }

    // presale -> data
    mapping(address => PresaleWinners) winners;

    event SecondaryStakingSource(address staking);
    event LockingPeriodActive(bool active);
    event PickWinners(address indexed presale, string tierId, address[] winners);

    event Deposit(address indexed user, uint256 amount);
    event Withdraw(address indexed user, uint256 amount);

    event TierCreate(string indexed id, uint8 multiplier, uint256 lockingPeriod, uint256 minAmount, bool random);
    event TierUpdate(string indexed id, uint8 multiplier, uint256 lockingPeriod, uint256 minAmount, bool random);
    event TierRemove(string indexed id, uint256 idx);

    constructor(IERC20 _stakingToken) {
        stakingToken = _stakingToken;
        tiers.push(StakingStructs.Tier(noneTierId, 0, 0, 0, false));
    }

    /**
     * When specified, staked user amount from it will be added when determining user tier.
     * E.g. user staked 10 tokens in Tiered Staking and 20,000 in Normal Staking, total amount will be 20,010.
     */
    function setSecondaryStakingSource(address staking) external onlyOwner {
        secondaryStakingSource = staking;
        emit SecondaryStakingSource(address(staking));
    }

    function unsetSecondaryStakingSource() external onlyOwner {
        secondaryStakingSource = address(0);
        emit SecondaryStakingSource(address(0));
    }

    function getUserTierIdx(address account) public view override returns (uint) {
        UserState storage state = userState[account];
        uint256 amount = getUserAmount(account, false);
        uint possibleTierIdx = getActiveTierIdxForAmount(amount, 0);
        // Might return none tier, if staked just now
        uint actualTierIdx = getActiveTierIdxForAmount(amount, state.stakedAt);

        // If not equal, means the possibleTierIdx is still locked and we need to check the previous tier
        if (possibleTierIdx == actualTierIdx) {
            return actualTierIdx;
        }
        if (state.prevStakedAt == 0) {
            return actualTierIdx;
        }

        // Check what was the previous tier considering the previous locking period
        uint prevAmount = getUserAmount(account, true);
        uint prevTierIdx = getActiveTierIdxForAmount(prevAmount, state.prevStakedAt);

        return tiers[prevTierIdx].multiplier > tiers[actualTierIdx].multiplier
        ? prevTierIdx
        : actualTierIdx;
    }

    function getActiveTierIdxForAmount(uint amount, uint stakedAt) internal view returns (uint) {
        if (amount == 0) {
            return 0;
        }
        uint maxTierK = 0;
        uint256 maxTierV;
        for (uint i = 1; i < tiers.length; i++) {
            StakingStructs.Tier storage tier = tiers[i];
            bool isHigherTier = amount >= tier.minAmount && tier.minAmount > maxTierV;
            bool isTierActive = !lockPeriodActive || stakedAt == 0 || stakedAt + tier.lockingPeriod <= block.timestamp;
            if (isHigherTier && isTierActive) {
                maxTierK = i;
                maxTierV = tier.minAmount;
            }
        }

        return maxTierK;
    }

    function getUserAmount(address account, bool prevAmount) internal view returns (uint) {
        UserState storage state = userState[account];
        uint256 amount = prevAmount ? state.prevAmount : state.amount;
        if (amount == 0) {
            return 0;
        }
        amount += getSecondaryUserAmount(account);

        return amount;
    }

    function getSecondaryUserAmount(address account) internal view returns (uint) {
        if (address(secondaryStakingSource) != address(0)) {
            return IStaking(secondaryStakingSource).userInfo(account).amount;
        }
        return 0;
    }

    function getUserTier(address account) external view override returns (StakingStructs.Tier memory) {
        return tiers[getUserTierIdx(account)];
    }

    function setLockingPeriodActive(bool _active) external onlyOwner {
        lockPeriodActive = _active;
        emit LockingPeriodActive(_active);
    }

    function getTier(uint idx) external view override returns (StakingStructs.Tier memory) {
        return tiers[idx];
    }

    function getTierById(string calldata id) public view override returns (StakingStructs.Tier memory) {
        for (uint256 i = 0; i < tiers.length; i++) {
            if (stringsEqual(tiers[i].id, id)) {
                return tiers[i];
            }
        }
        revert('No such tier');
    }

    function getTierIdx(string memory id) public view returns (uint) {
        for (uint256 i = 0; i < tiers.length; i++) {
            if (stringsEqual(tiers[i].id, id)) {
                return i;
            }
        }
        revert('No such tier');
    }

    function stringsEqual(string memory a, string memory b) private pure returns (bool) {
        return keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b));
    }

    function setTier(string calldata id, uint8 multiplier, uint256 lockingPeriod, uint256 minAmount, bool random) external onlyOwner returns (uint256) {
        require(!stringsEqual(id, noneTierId), "Can't change 'none' tier");

        for (uint256 i = 0; i < tiers.length; i++) {
            if (stringsEqual(tiers[i].id, id)) {
                tiers[i].multiplier = multiplier;
                tiers[i].lockingPeriod = lockingPeriod;
                tiers[i].minAmount = minAmount;
                tiers[i].random = random;

                emit TierUpdate(id, multiplier, lockingPeriod, minAmount, random);

                return i;
            }
        }

        StakingStructs.Tier memory newTier = StakingStructs.Tier(id, multiplier, lockingPeriod, minAmount, random);
        tiers.push(newTier);

        emit TierCreate(id, multiplier, lockingPeriod, minAmount, random);

        return tiers.length - 1;
    }

    function deleteTier(string calldata id) external onlyOwner {
        require(!stringsEqual(id, noneTierId), "Can't delete 'none' tier");

        for (uint256 tierIdx = 0; tierIdx < tiers.length; tierIdx++) {
            if (stringsEqual(tiers[tierIdx].id, id)) {
                for (uint i = tierIdx; i < tiers.length - 1; i++) {
                    tiers[i] = tiers[i + 1];
                }
                tiers.pop();

                emit TierRemove(id, tierIdx);
                break;
            }
        }
    }

    function getTotalTierNumbers() public view override returns (uint[] memory, string[] memory) {
        uint[] memory counts = new uint[](tiers.length);
        for (uint256 i = 0; i < userAccounts.length; i++) {
            address account = userAccounts[i];
            uint tierIdx = getUserTierIdx(account);
            counts[tierIdx] += 1;
        }

        string[] memory tierIds = new string[](tiers.length);
        for (uint i = 0; i < tiers.length; i++) {
            tierIds[i] = tiers[i].id;
        }

        return (counts, tierIds);
    }

    function getTierNumbers(address presale) public view override returns (uint[] memory, string[] memory) {
        (uint[] memory counts, string[] memory tierIds) = getTotalTierNumbers();

        // Reset counts of random tiers, assigning only winners counts
        for (uint i = 0; i < tiers.length; i++) {
            if (tiers[i].random) {
                PresaleWinners storage data = winners[presale];
                counts[i] = data.count[tierIds[i]];
            }
        }

        return (counts, tierIds);
    }

    function isWinner(address presale, address account) external view override returns (bool) {
        PresaleWinners storage data = winners[presale];
        return data.isWinner[account];
    }

    function getWinners(address presale, string calldata tierId) external view override returns (address[] memory) {
        PresaleWinners storage data = winners[presale];
        return data.accounts[tierId];
    }

    function getWinnersCount(address presale, string calldata tierId) external view override returns (uint) {
        PresaleWinners storage data = winners[presale];
        return data.count[tierId];
    }

    function removeFromWinners(address presale, address account) external onlyOwner {
        PresaleWinners storage data = winners[presale];
        data.isWinner[account] = false;
    }

    function deposit(uint256 amount) external override {
        UserState storage user = userState[msg.sender];
        require(amount > 0, "Deposit amount must be greater than 0");

        if (user.account == address(0)) {
            userAccounts.push(msg.sender);
        }

        user.account = msg.sender;
        uint newAmount = user.amount + amount;

        // When new deposit transitions account to a next tier,
        // remember previous values to base the tier calculation on them while the new tier is locked
        uint secondaryAmount = getSecondaryUserAmount(user.account);
        uint newTierIdx = getActiveTierIdxForAmount(newAmount + secondaryAmount, 0);
        uint prevTierIdx = user.prevAmount > 0 ? getActiveTierIdxForAmount(user.prevAmount + secondaryAmount, 0) : 0;
        if (newTierIdx != prevTierIdx) {
            user.prevAmount = user.amount;
            user.prevStakedAt = user.stakedAt;
        }
        user.amount = newAmount;
        user.stakedAt = block.timestamp;

        stakingToken.safeTransferFrom(address(msg.sender), address(this), amount);

        emit Deposit(msg.sender, amount);
    }

    function withdraw(uint256 amount) external override {
        UserState storage user = userState[msg.sender];
        require(amount > 0, "Withdraw amount must be greater than 0");
        require(user.amount >= amount, "Withdrawing more than you have!");

        uint newAmount = user.amount - amount;

        user.amount = newAmount;
        user.prevAmount = newAmount;

        // Reset user state and delete the account from list of all accounts used for random winners selection
        if (user.amount == 0) {
            for (uint userIdx = 0; userIdx < userAccounts.length; userIdx++) {
                if (userAccounts[userIdx] == user.account) {
                    for (uint i = userIdx; i < userAccounts.length - 1; i++) {
                        userAccounts[i] = userAccounts[i + 1];
                    }
                    userAccounts.pop();
                    user.account = address(0);
                    user.stakedAt = 0;
                    user.prevStakedAt = 0;
                    user.prevAmount = 0;
                    break;
                }
            }
        }

        stakingToken.safeTransfer(address(msg.sender), amount);

        emit Withdraw(msg.sender, amount);
    }

    /**
    * Pseudo-randomly (pseudo is enough in this case) chooses winners for a presale-tier.
    * Winners are stored per tier-presale and later used to determine if user is allowed to buy.
    */
    function pickWinners(
        address presale,
        string calldata tierId,
        uint256 winnersN
    ) external override onlyOwner returns (address[] memory) {
        StakingStructs.Tier memory tier = getTierById(tierId);
        PresaleWinners storage presaleWinners = winners[presale];
        uint tierIdx = getTierIdx(tier.id);

        require(tier.random, "Only lottery tiers are allowed to pick winners");

        // Find all tier addresses
        address[] memory tierAddresses = new address[](userAccounts.length);
        uint allCount = 0;
        for (uint256 uIdx = 0; uIdx < userAccounts.length; uIdx++) {
            uint userTierIdx = getUserTierIdx(userAccounts[uIdx]);
            if (tierIdx == userTierIdx) {
                tierAddresses[allCount] = userAccounts[uIdx];
                allCount += 1;
            }
        }

        require(winnersN > 0, 'Number of winners must be > 0');
        require(winnersN <= allCount, 'Number of winners must be less than total accounts in the tier');

        // Reset the winners state for the tier if needed
        for (uint i = 0; i < presaleWinners.count[tier.id]; i++) {
            address account = presaleWinners.accounts[tier.id][i];
            presaleWinners.isWinner[account] = false;
        }
        presaleWinners.count[tier.id] = 0;
        delete presaleWinners.accounts[tier.id];

        // Pseudo-randomly choose N unique winners
        address[] memory tierWinners = new address[](winnersN);
        uint8 pickedWinners = 0;
        uint attempts = 0;
        while (pickedWinners < winnersN) {
            uint idx = randomNumber(attempts) % allCount;
            address winner = tierAddresses[idx];

            bool wasPicked = false;
            for (uint i = 0; i < pickedWinners; i++) {
                if (tierWinners[i] == winner) {
                    wasPicked = true;
                    break;
                }
            }

            if (!wasPicked) {
                tierWinners[pickedWinners] = winner;
                pickedWinners++;

                presaleWinners.isWinner[winner] = true;
            }
            attempts++;
        }

        presaleWinners.accounts[tierId] = tierWinners;
        presaleWinners.count[tierId] = pickedWinners;

        emit PickWinners(presale, tierId, tierWinners);

        return tierWinners;
    }

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

File 4 of 8 : 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 5 of 8 : 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 6 of 8 : 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 7 of 8 : 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 8 of 8 : 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":"contract IERC20","name":"_stakingToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"active","type":"bool"}],"name":"LockingPeriodActive","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":true,"internalType":"address","name":"presale","type":"address"},{"indexed":false,"internalType":"string","name":"tierId","type":"string"},{"indexed":false,"internalType":"address[]","name":"winners","type":"address[]"}],"name":"PickWinners","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"staking","type":"address"}],"name":"SecondaryStakingSource","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"id","type":"string"},{"indexed":false,"internalType":"uint8","name":"multiplier","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"lockingPeriod","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"minAmount","type":"uint256"},{"indexed":false,"internalType":"bool","name":"random","type":"bool"}],"name":"TierCreate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"id","type":"string"},{"indexed":false,"internalType":"uint256","name":"idx","type":"uint256"}],"name":"TierRemove","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"id","type":"string"},{"indexed":false,"internalType":"uint8","name":"multiplier","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"lockingPeriod","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"minAmount","type":"uint256"},{"indexed":false,"internalType":"bool","name":"random","type":"bool"}],"name":"TierUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"string","name":"id","type":"string"}],"name":"deleteTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"idx","type":"uint256"}],"name":"getTier","outputs":[{"components":[{"internalType":"string","name":"id","type":"string"},{"internalType":"uint8","name":"multiplier","type":"uint8"},{"internalType":"uint256","name":"lockingPeriod","type":"uint256"},{"internalType":"uint256","name":"minAmount","type":"uint256"},{"internalType":"bool","name":"random","type":"bool"}],"internalType":"struct StakingStructs.Tier","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"id","type":"string"}],"name":"getTierById","outputs":[{"components":[{"internalType":"string","name":"id","type":"string"},{"internalType":"uint8","name":"multiplier","type":"uint8"},{"internalType":"uint256","name":"lockingPeriod","type":"uint256"},{"internalType":"uint256","name":"minAmount","type":"uint256"},{"internalType":"bool","name":"random","type":"bool"}],"internalType":"struct StakingStructs.Tier","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"id","type":"string"}],"name":"getTierIdx","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"presale","type":"address"}],"name":"getTierNumbers","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"string[]","name":"","type":"string[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalTierNumbers","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"string[]","name":"","type":"string[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getUserTier","outputs":[{"components":[{"internalType":"string","name":"id","type":"string"},{"internalType":"uint8","name":"multiplier","type":"uint8"},{"internalType":"uint256","name":"lockingPeriod","type":"uint256"},{"internalType":"uint256","name":"minAmount","type":"uint256"},{"internalType":"bool","name":"random","type":"bool"}],"internalType":"struct StakingStructs.Tier","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getUserTierIdx","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"presale","type":"address"},{"internalType":"string","name":"tierId","type":"string"}],"name":"getWinners","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"presale","type":"address"},{"internalType":"string","name":"tierId","type":"string"}],"name":"getWinnersCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"presale","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"isWinner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockPeriodActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"presale","type":"address"},{"internalType":"string","name":"tierId","type":"string"},{"internalType":"uint256","name":"winnersN","type":"uint256"}],"name":"pickWinners","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"presale","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"removeFromWinners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"secondaryStakingSource","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_active","type":"bool"}],"name":"setLockingPeriodActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"staking","type":"address"}],"name":"setSecondaryStakingSource","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"id","type":"string"},{"internalType":"uint8","name":"multiplier","type":"uint8"},{"internalType":"uint256","name":"lockingPeriod","type":"uint256"},{"internalType":"uint256","name":"minAmount","type":"uint256"},{"internalType":"bool","name":"random","type":"bool"}],"name":"setTier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tiers","outputs":[{"internalType":"string","name":"id","type":"string"},{"internalType":"uint8","name":"multiplier","type":"uint8"},{"internalType":"uint256","name":"lockingPeriod","type":"uint256"},{"internalType":"uint256","name":"minAmount","type":"uint256"},{"internalType":"bool","name":"random","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unsetSecondaryStakingSource","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"userAccounts","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userState","outputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"stakedAt","type":"uint256"},{"internalType":"uint256","name":"prevAmount","type":"uint256"},{"internalType":"uint256","name":"prevStakedAt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526002805460ff60a01b191690553480156200001e57600080fd5b506040516200374b3803806200374b83398101604081905262000041916200021a565b600080546001600160a01b031916339081178255604051909182917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600280546001600160a01b0383166001600160a01b03199091161790556040805160e081018252600460a08201908152636e6f6e6560e01b60c0830152815260006020808301829052928201819052606082018190526080820181905260038054600181018255915281518051929360059092027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b019262000128928492019062000174565b50602082015160018201805460ff90921660ff19928316179055604083015160028301556060830151600383015560809092015160049091018054911515919092161790555062000287565b82805462000182906200024a565b90600052602060002090601f016020900481019282620001a65760008555620001f1565b82601f10620001c157805160ff1916838001178555620001f1565b82800160010185558215620001f1579182015b82811115620001f1578251825591602001919060010190620001d4565b50620001ff92915062000203565b5090565b5b80821115620001ff576000815560010162000204565b6000602082840312156200022c578081fd5b81516001600160a01b038116811462000243578182fd5b9392505050565b600181811c908216806200025f57607f821691505b602082108114156200028157634e487b7160e01b600052602260045260246000fd5b50919050565b6134b480620002976000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c80637ae60946116100f9578063c1f1f5c011610097578063e4d2620e11610071578063e4d2620e14610450578063ebb5e18514610463578063f26f47d914610476578063f2fde38b1461048957600080fd5b8063c1f1f5c014610417578063c4f161ab1461042a578063d5a162bd1461043d57600080fd5b80638da5cb5b116100d35780638da5cb5b146103d85780639cd78ea5146103e9578063b6b55f25146103f1578063baf1d5331461040457600080fd5b80637ae6094614610391578063857a35b9146103a45780638b5f4991146103c557600080fd5b806350ce76b9116101665780636a106ece116101405780636a106ece14610350578063715018a614610363578063717f79851461036b57806372f702f31461037e57600080fd5b806350ce76b9146102e0578063616d50581461030457806369a0d9831461032f57600080fd5b80631b41fd49116101a25780631b41fd49146102905780632e1a7d4d146102a35780633819732d146102b85780634f062c5a146102c057600080fd5b8063039af9eb146101c95780630c8f81b5146101f65780631b32275414610270575b600080fd5b6101dc6101d73660046130e0565b61049c565b6040516101ed95949392919061328d565b60405180910390f35b61023e610204366004612def565b6004602081905260009182526040909120805460018201546002830154600384015493909401546001600160a01b03909216939092909185565b604080516001600160a01b0390961686526020860194909452928401919091526060830152608082015260a0016101ed565b61028361027e366004612e3b565b610571565b6040516101ed9190613193565b61028361029e366004612e8c565b61060f565b6102b66102b13660046130e0565b610c94565b005b6102b6610f54565b6102d36102ce3660046130e0565b610fc4565b6040516101ed91906132fe565b6002546102f490600160a01b900460ff1681565b60405190151581526020016101ed565b6103176103123660046130e0565b6110d1565b6040516001600160a01b0390911681526020016101ed565b61034261033d366004612def565b6110fb565b6040516101ed9291906131a6565b6102b661035e366004612def565b61120b565b6102b661128a565b600154610317906001600160a01b031681565b600254610317906001600160a01b031681565b6102b661039f366004612e09565b6112fe565b6103b76103b2366004612def565b61135d565b6040519081526020016101ed565b6102b66103d3366004612ee4565b611474565b6000546001600160a01b0316610317565b6103426114eb565b6102b66103ff3660046130e0565b61175b565b6103b7610412366004612fdb565b611917565b6103b7610425366004612e3b565b611a3e565b6102f4610438366004612e09565b611a85565b6102d361044b366004612f1c565b611ab9565b6102d361045e366004612def565b611ce7565b6102b6610471366004612f1c565b611d18565b6103b7610484366004612f5c565b6120b9565b6102b6610497366004612def565b61258c565b600381815481106104ac57600080fd5b90600052602060002090600502016000915090508060000180546104cf906133ae565b80601f01602080910402602001604051908101604052809291908181526020018280546104fb906133ae565b80156105485780601f1061051d57610100808354040283529160200191610548565b820191906000526020600020905b81548152906001019060200180831161052b57829003601f168201915b505050600184015460028501546003860154600490960154949560ff9283169591945092501685565b6001600160a01b0383166000908152600660205260409081902090516060919060018201906105a39086908690613183565b90815260408051918290036020908101832080548083028501830190935282845291908301828280156105ff57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116105e1575b50505050509150505b9392505050565b6000546060906001600160a01b031633146106455760405162461bcd60e51b815260040161063c906132c9565b60405180910390fd5b60006106518585611ab9565b6001600160a01b038716600090815260066020526040812082519293509161067890611917565b905082608001516106e25760405162461bcd60e51b815260206004820152602e60248201527f4f6e6c79206c6f74746572792074696572732061726520616c6c6f776564207460448201526d6f207069636b2077696e6e65727360901b606482015260840161063c565b60055460009067ffffffffffffffff81111561070e57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610737578160200160208202803683370190505b5090506000805b60055481101561082a5760006107886005838154811061076e57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031661135d565b90508085141561081757600582815481106107b357634e487b7160e01b600052603260045260246000fd5b9060005260206000200160009054906101000a90046001600160a01b03168484815181106107f157634e487b7160e01b600052603260045260246000fd5b6001600160a01b0390921660209283029190910190910152610814600184613353565b92505b5080610822816133e9565b91505061073e565b506000871161087b5760405162461bcd60e51b815260206004820152601d60248201527f4e756d626572206f662077696e6e657273206d757374206265203e2030000000604482015260640161063c565b808711156108f15760405162461bcd60e51b815260206004820152603e60248201527f4e756d626572206f662077696e6e657273206d757374206265206c657373207460448201527f68616e20746f74616c206163636f756e747320696e2074686520746965720000606482015260840161063c565b60005b8551604051869161090491613167565b9081526040519081900360200190205460ff168110156109a15760008560010187600001516040516109369190613167565b9081526020016040518091039020828154811061096357634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b0316825260028801905260409020805460ff191690555080610999816133e9565b9150506108f4565b50845160405160009186916109b69190613167565b908152604051908190036020018120805460ff9390931660ff1990931692909217909155855160018601916109eb9190613167565b90815260200160405180910390206000610a059190612b94565b60008767ffffffffffffffff811115610a2e57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610a57578160200160208202803683370190505b5090506000805b898260ff161015610bcc576040805144602080830191909152428284015260608083018590528351808403909101815260809092019092528051910120600090610aa9908690613424565b90506000868281518110610acd57634e487b7160e01b600052603260045260246000fd5b602002602001015190506000805b8560ff16811015610b4257826001600160a01b0316878281518110610b1057634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03161415610b305760019150610b42565b80610b3a816133e9565b915050610adb565b5080610bb75781868660ff1681518110610b6c57634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020928302919091019091015284610b8e81613404565b6001600160a01b038416600090815260028d0160205260409020805460ff191660011790559550505b83610bc1816133e9565b945050505050610a5e565b82876001018d8d604051610be1929190613183565b90815260200160405180910390209080519060200190610c02929190612bb5565b5081876000018d8d604051610c18929190613183565b908152602001604051809103902060006101000a81548160ff021916908360ff1602179055508c6001600160a01b03167fe3bbc737220dcf52075c5c9618a606f8fa8bfc58cf7093676785652d0b525f0a8d8d86604051610c7b9392919061323d565b60405180910390a250909b9a5050505050505050505050565b33600090815260046020526040902081610cff5760405162461bcd60e51b815260206004820152602660248201527f576974686472617720616d6f756e74206d75737420626520677265617465722060448201526507468616e20360d41b606482015260840161063c565b8181600101541015610d535760405162461bcd60e51b815260206004820152601f60248201527f5769746864726177696e67206d6f7265207468616e20796f7520686176652100604482015260640161063c565b6000828260010154610d65919061336b565b6001830181905560038301819055905080610f025760005b600554811015610f00578254600580546001600160a01b039092169183908110610db757634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03161415610eee57805b600554610de39060019061336b565b811015610e8a576005610df7826001613353565b81548110610e1557634e487b7160e01b600052603260045260246000fd5b600091825260209091200154600580546001600160a01b039092169183908110610e4f57634e487b7160e01b600052603260045260246000fd5b600091825260209091200180546001600160a01b0319166001600160a01b039290921691909117905580610e82816133e9565b915050610dd4565b506005805480610eaa57634e487b7160e01b600052603160045260246000fd5b600082815260208120820160001990810180546001600160a01b03199081169091559201909255845416845560028401819055600484018190556003840155610f00565b80610ef8816133e9565b915050610d7d565b505b600254610f19906001600160a01b03163385612676565b60405183815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364906020015b60405180910390a2505050565b6000546001600160a01b03163314610f7e5760405162461bcd60e51b815260040161063c906132c9565b600180546001600160a01b0319169055604051600081527fd34a0c29e07c0d3803d8b406b074a7e7d444b89af97e4d964c4e002ef8a2cbdf9060200160405180910390a1565b610fcc612c1a565b60038281548110610fed57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016040518060a0016040529081600082018054611016906133ae565b80601f0160208091040260200160405190810160405280929190818152602001828054611042906133ae565b801561108f5780601f106110645761010080835404028352916020019161108f565b820191906000526020600020905b81548152906001019060200180831161107257829003601f168201915b5050509183525050600182015460ff90811660208301526002830154604083015260038301546060830152600490920154909116151560809091015292915050565b600581815481106110e157600080fd5b6000918252602090912001546001600160a01b0316905081565b6060806000806111096114eb565b9150915060005b600354811015611200576003818154811061113b57634e487b7160e01b600052603260045260246000fd5b600091825260209091206004600590920201015460ff16156111ee576001600160a01b03861660009081526006602052604090208251819084908490811061119357634e487b7160e01b600052603260045260246000fd5b60200260200101516040516111a89190613167565b90815260405190819003602001902054845160ff909116908590849081106111e057634e487b7160e01b600052603260045260246000fd5b602002602001018181525050505b806111f8816133e9565b915050611110565b509094909350915050565b6000546001600160a01b031633146112355760405162461bcd60e51b815260040161063c906132c9565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527fd34a0c29e07c0d3803d8b406b074a7e7d444b89af97e4d964c4e002ef8a2cbdf906020015b60405180910390a150565b6000546001600160a01b031633146112b45760405162461bcd60e51b815260040161063c906132c9565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146113285760405162461bcd60e51b815260040161063c906132c9565b6001600160a01b039182166000908152600660209081526040808320939094168252600290920190915220805460ff19169055565b6001600160a01b03811660009081526004602052604081208161138084826126d9565b9050600061138f826000612735565b905060006113a1838560020154612735565b9050808214156113b45795945050505050565b60048401546113c65795945050505050565b60006113d38760016126d9565b905060006113e5828760040154612735565b90506003838154811061140857634e487b7160e01b600052603260045260246000fd5b60009182526020909120600160059092020101546003805460ff909216918390811061144457634e487b7160e01b600052603260045260246000fd5b600091825260209091206001600590920201015460ff16116114665782611468565b805b98975050505050505050565b6000546001600160a01b0316331461149e5760405162461bcd60e51b815260040161063c906132c9565b60028054821515600160a01b0260ff60a01b199091161790556040517f242743c870b5d0bd4c864a3e897fad02ead24b5a91f4760924d1f35d6dd311009061127f90831515815260200190565b606080600060038054905067ffffffffffffffff81111561151c57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611545578160200160208202803683370190505b50905060005b6005548110156115e85760006005828154811061157857634e487b7160e01b600052603260045260246000fd5b60009182526020822001546001600160a01b031691506115978261135d565b905060018482815181106115bb57634e487b7160e01b600052603260045260246000fd5b602002602001018181516115cf9190613353565b9052508291506115e09050816133e9565b91505061154b565b5060035460009067ffffffffffffffff81111561161557634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561164857816020015b60608152602001906001900390816116335790505b50905060005b600354811015611751576003818154811061167957634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016000018054611695906133ae565b80601f01602080910402602001604051908101604052809291908181526020018280546116c1906133ae565b801561170e5780601f106116e35761010080835404028352916020019161170e565b820191906000526020600020905b8154815290600101906020018083116116f157829003601f168201915b505050505082828151811061173357634e487b7160e01b600052603260045260246000fd5b60200260200101819052508080611749906133e9565b91505061164e565b5090939092509050565b336000908152600460205260409020816117c55760405162461bcd60e51b815260206004820152602560248201527f4465706f73697420616d6f756e74206d75737420626520677265617465722074604482015264068616e20360dc1b606482015260840161063c565b80546001600160a01b031661181757600580546001810182556000919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b031916331790555b80546001600160a01b03191633178155600181015460009061183a908490613353565b8254909150600090611854906001600160a01b0316612813565b9050600061186c6118658385613353565b6000612735565b9050600080856003015411611882576000611895565b6118958386600301546118659190613353565b90508082146118b35760018501546003860155600285015460048601555b6001850184905542600280870191909155546118da906001600160a01b03163330896128b3565b60405186815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9060200160405180910390a2505050505050565b6000805b600354811015611a06576119e96003828154811061194957634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016000018054611965906133ae565b80601f0160208091040260200160405190810160405280929190818152602001828054611991906133ae565b80156119de5780601f106119b3576101008083540402835291602001916119de565b820191906000526020600020905b8154815290600101906020018083116119c157829003601f168201915b5050505050846128f1565b156119f45792915050565b806119fe816133e9565b91505061191b565b5060405162461bcd60e51b815260206004820152600c60248201526b27379039bab1b4103a34b2b960a11b604482015260640161063c565b6001600160a01b03831660009081526006602052604080822090518190611a689086908690613183565b9081526040519081900360200190205460ff169150509392505050565b6001600160a01b038083166000908152600660209081526040808320938516835260029093019052205460ff165b92915050565b611ac1612c1a565b60005b600354811015611a0657611bc860038281548110611af257634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016000018054611b0e906133ae565b80601f0160208091040260200160405190810160405280929190818152602001828054611b3a906133ae565b8015611b875780601f10611b5c57610100808354040283529160200191611b87565b820191906000526020600020905b815481529060010190602001808311611b6a57829003601f168201915b505050505085858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506128f192505050565b15611cd55760038181548110611bee57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016040518060a0016040529081600082018054611c17906133ae565b80601f0160208091040260200160405190810160405280929190818152602001828054611c43906133ae565b8015611c905780601f10611c6557610100808354040283529160200191611c90565b820191906000526020600020905b815481529060010190602001808311611c7357829003601f168201915b5050509183525050600182015460ff9081166020830152600283015460408301526003830154606083015260049092015490911615156080909101529150611ab39050565b80611cdf816133e9565b915050611ac4565b611cef612c1a565b6003611cfa8361135d565b81548110610fed57634e487b7160e01b600052603260045260246000fd5b6000546001600160a01b03163314611d425760405162461bcd60e51b815260040161063c906132c9565b611d9d82828080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040805180820190915260048152636e6f6e6560e01b602082015291506128f19050565b15611dea5760405162461bcd60e51b815260206004820152601860248201527f43616e27742064656c65746520276e6f6e652720746965720000000000000000604482015260640161063c565b60005b6003548110156120b457611ef160038281548110611e1b57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016000018054611e37906133ae565b80601f0160208091040260200160405190810160405280929190818152602001828054611e63906133ae565b8015611eb05780601f10611e8557610100808354040283529160200191611eb0565b820191906000526020600020905b815481529060010190602001808311611e9357829003601f168201915b505050505084848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506128f192505050565b156120a257805b600354611f079060019061336b565b811015611fef576003611f1b826001613353565b81548110611f3957634e487b7160e01b600052603260045260246000fd5b906000526020600020906005020160038281548110611f6857634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016000820181600001908054611f8a906133ae565b611f95929190612c4e565b50600182810154908201805460ff92831660ff199182161790915560028085015490840155600380850154908401556004938401549390920180549092169216151591909117905580611fe7816133e9565b915050611ef8565b50600380548061200f57634e487b7160e01b600052603160045260246000fd5b6000828152602081206000199092019160058302019061202f8282612cc9565b5060018101805460ff199081169091556000600283018190556003830155600490910180549091169055905560405161206b9084908490613183565b604051908190038120828252907fcee998486f3d0adcdd2adb0961c0a53c3601b7165798f8f771109a455ba2d8b390602001610f47565b806120ac816133e9565b915050611ded565b505050565b600080546001600160a01b031633146120e45760405162461bcd60e51b815260040161063c906132c9565b61213f87878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040805180820190915260048152636e6f6e6560e01b602082015291506128f19050565b1561218c5760405162461bcd60e51b815260206004820152601860248201527f43616e2774206368616e676520276e6f6e652720746965720000000000000000604482015260640161063c565b60005b60035481101561241157612293600382815481106121bd57634e487b7160e01b600052603260045260246000fd5b906000526020600020906005020160000180546121d9906133ae565b80601f0160208091040260200160405190810160405280929190818152602001828054612205906133ae565b80156122525780601f1061222757610100808354040283529160200191612252565b820191906000526020600020905b81548152906001019060200180831161223557829003601f168201915b505050505089898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506128f192505050565b156123ff5785600382815481106122ba57634e487b7160e01b600052603260045260246000fd5b906000526020600020906005020160010160006101000a81548160ff021916908360ff160217905550846003828154811061230557634e487b7160e01b600052603260045260246000fd5b906000526020600020906005020160020181905550836003828154811061233c57634e487b7160e01b600052603260045260246000fd5b906000526020600020906005020160030181905550826003828154811061237357634e487b7160e01b600052603260045260246000fd5b60009182526020909120600590910201600401805460ff19169115159190911790556040516123a59089908990613183565b6040805191829003822060ff89168352602083018890529082018690528415156060830152907f0d076bee358683f6c71822a223363d7b4f919b75c448ac1f82018554776506e89060800160405180910390a29050612582565b80612409816133e9565b91505061218f565b506040805160c06020601f8a01819004028201810190925260a081018881526000928291908b908b9081908501838280828437600092018290525093855250505060ff8916602080840191909152604083018990526060830188905286151560809093019290925260038054600181018255915282518051939450849360059092027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01926124c592849290910190612d03565b50602082015160018201805460ff90921660ff1992831617905560408084015160028401556060840151600384015560809093015160049092018054921515929091169190911790555161251c9089908990613183565b6040805191829003822060ff89168352602083018890529082018690528415156060830152907f9920269e50b13e346dabbe333ab908688417b9f022d68513b9ed5c5820b654729060800160405180910390a260035461257e9060019061336b565b9150505b9695505050505050565b6000546001600160a01b031633146125b65760405162461bcd60e51b815260040161063c906132c9565b6001600160a01b03811661261b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161063c565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6040516001600160a01b0383166024820152604481018290526120b490849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261294a565b6001600160a01b03821660009081526004602052604081208183612701578160010154612707565b81600301545b90508061271957600092505050611ab3565b61272285612813565b61272c9082613353565b95945050505050565b60008261274457506000611ab3565b60008060015b6003548110156128095760006003828154811061277757634e487b7160e01b600052603260045260246000fd5b906000526020600020906005020190506000816003015488101580156127a05750838260030154115b600254909150600090600160a01b900460ff1615806127bd575087155b806127d75750428360020154896127d49190613353565b11155b90508180156127e35750805b156127f357839550826003015494505b5050508080612801906133e9565b91505061274a565b5090949350505050565b6001546000906001600160a01b0316156128ab57600154604051630cacd00160e11b81526001600160a01b03848116600483015290911690631959a0029060240160606040518083038186803b15801561286c57600080fd5b505afa158015612880573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128a49190613085565b5192915050565b506000919050565b6040516001600160a01b03808516602483015283166044820152606481018290526128eb9085906323b872dd60e01b906084016126a2565b50505050565b6000816040516020016129049190613167565b604051602081830303815290604052805190602001208360405160200161292b9190613167565b6040516020818303038152906040528051906020012014905092915050565b600061299f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612a1c9092919063ffffffff16565b8051909150156120b457808060200190518101906129bd9190612f00565b6120b45760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161063c565b6060612a2b8484600085612a33565b949350505050565b606082471015612a945760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161063c565b843b612ae25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161063c565b600080866001600160a01b03168587604051612afe9190613167565b60006040518083038185875af1925050503d8060008114612b3b576040519150601f19603f3d011682016040523d82523d6000602084013e612b40565b606091505b5091509150612b50828286612b5b565b979650505050505050565b60608315612b6a575081610608565b825115612b7a5782518084602001fd5b8160405162461bcd60e51b815260040161063c919061327a565b5080546000825590600052602060002090810190612bb29190612d77565b50565b828054828255906000526020600020908101928215612c0a579160200282015b82811115612c0a57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612bd5565b50612c16929150612d77565b5090565b6040518060a0016040528060608152602001600060ff16815260200160008152602001600081526020016000151581525090565b828054612c5a906133ae565b90600052602060002090601f016020900481019282612c7c5760008555612c0a565b82601f10612c8d5780548555612c0a565b82800160010185558215612c0a57600052602060002091601f016020900482015b82811115612c0a578254825591600101919060010190612cae565b508054612cd5906133ae565b6000825580601f10612ce5575050565b601f016020900490600052602060002090810190612bb29190612d77565b828054612d0f906133ae565b90600052602060002090601f016020900481019282612d315760008555612c0a565b82601f10612d4a57805160ff1916838001178555612c0a565b82800160010185558215612c0a579182015b82811115612c0a578251825591602001919060010190612d5c565b5b80821115612c165760008155600101612d78565b80356001600160a01b0381168114612da357600080fd5b919050565b60008083601f840112612db9578182fd5b50813567ffffffffffffffff811115612dd0578182fd5b602083019150836020828501011115612de857600080fd5b9250929050565b600060208284031215612e00578081fd5b61060882612d8c565b60008060408385031215612e1b578081fd5b612e2483612d8c565b9150612e3260208401612d8c565b90509250929050565b600080600060408486031215612e4f578081fd5b612e5884612d8c565b9250602084013567ffffffffffffffff811115612e73578182fd5b612e7f86828701612da8565b9497909650939450505050565b60008060008060608587031215612ea1578081fd5b612eaa85612d8c565b9350602085013567ffffffffffffffff811115612ec5578182fd5b612ed187828801612da8565b9598909750949560400135949350505050565b600060208284031215612ef5578081fd5b813561060881613470565b600060208284031215612f11578081fd5b815161060881613470565b60008060208385031215612f2e578182fd5b823567ffffffffffffffff811115612f44578283fd5b612f5085828601612da8565b90969095509350505050565b60008060008060008060a08789031215612f74578182fd5b863567ffffffffffffffff811115612f8a578283fd5b612f9689828a01612da8565b909750955050602087013560ff81168114612faf578283fd5b935060408701359250606087013591506080870135612fcd81613470565b809150509295509295509295565b600060208284031215612fec578081fd5b813567ffffffffffffffff80821115613003578283fd5b818401915084601f830112613016578283fd5b8135818111156130285761302861345a565b604051601f8201601f19908116603f011681019083821181831017156130505761305061345a565b81604052828152876020848701011115613068578586fd5b826020860160208301379182016020019490945295945050505050565b600060608284031215613096578081fd5b6040516060810181811067ffffffffffffffff821117156130b9576130b961345a565b80604052508251815260208301516020820152604083015160408201528091505092915050565b6000602082840312156130f1578081fd5b5035919050565b6000815180845260208085019450808401835b838110156131305781516001600160a01b03168752958201959082019060010161310b565b509495945050505050565b60008151808452613153816020860160208601613382565b601f01601f19169290920160200192915050565b60008251613179818460208701613382565b9190910192915050565b8183823760009101908152919050565b60208152600061060860208301846130f8565b604080825283519082018190526000906020906060840190828701845b828110156131df578151845292840192908401906001016131c3565b50505083810382850152845180825282820190600581901b83018401878501865b8381101561322e57601f1986840301855261321c83835161313b565b94870194925090860190600101613200565b50909998505050505050505050565b604081528260408201528284606083013760008060608584010152601f19601f8501168201606083820301602084015261258260608201856130f8565b602081526000610608602083018461313b565b60a0815260006132a060a083018861313b565b905060ff8616602083015284604083015283606083015282151560808301529695505050505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b602081526000825160a0602084015261331a60c084018261313b565b905060ff602085015116604084015260408401516060840152606084015160808401526080840151151560a08401528091505092915050565b6000821982111561336657613366613444565b500190565b60008282101561337d5761337d613444565b500390565b60005b8381101561339d578181015183820152602001613385565b838111156128eb5750506000910152565b600181811c908216806133c257607f821691505b602082108114156133e357634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156133fd576133fd613444565b5060010190565b600060ff821660ff81141561341b5761341b613444565b60010192915050565b60008261343f57634e487b7160e01b81526012600452602481fd5b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8015158114612bb257600080fdfea2646970667358221220162f89e887be65d72a2427a84f2372e2387af4c5766d0aebc21520fd3cdbf61564736f6c63430008040033000000000000000000000000adcfc6bf853a0a8ad7f9ff4244140d10cf01363c

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

000000000000000000000000adcfc6bf853a0a8ad7f9ff4244140d10cf01363c

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000adcfc6bf853a0a8ad7f9ff4244140d10cf01363c


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.