Contract 0xaa89615f67ffb22157b5ab86d9b34b6073e47f8f

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x789e0c764c05b258e74a67774163624e6b43b005d79d7dc9d1698a7fe6b3f8830x60806040208542852022-10-09 18:47:44118 days 20 hrs agoBiggerMinds: Deployer 2 IN  Create: MINDv20 AVAX0.10998792525
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MINDv2

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 20 : MINDv2.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;

import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol";
import "./NODERewardManagementV2.sol";
import "./interfaces/IRouter.sol";
import "./interfaces/IJoeRouter02.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol";

contract MINDv2 is Initializable, ERC20Upgradeable, OwnableUpgradeable, ReentrancyGuardUpgradeable {
    using SafeERC20Upgradeable for IERC20Upgradeable;

    NODERewardManagementV2 public nodeRewardManager;
    IJoeRouter02 public uniswapV2Router;
    address public uniswapV2Pair;

    address public treasury;
    uint256 public rewardsFee;          // 100 = 1.00%
    uint256 public liquidityPoolFee;    // 100 = 1.00%
    uint256 public rewardsPool;         // available balance for rewards

    uint256 public sellFee;             // 100 = 1.00%
    uint256 public buyFee;              // 100 = 1.00%
    uint256 public maxSellFee;
    uint256 public maxBuyFee;

    uint256 public rwSwap;              // 100 = 1.00%; percent of rewards to swap to AVAX
    bool private swapping;
    bool public swapAndLiquifyEnabled;
    uint256 public swapTokensAmount;
    mapping(address => bool) public proxyToApproved; // proxy allowance for interaction with future contract

    mapping(address => bool) public isBlacklisted;
    mapping(address => bool) public  automatedMarketMakerPairs;
    mapping (address => bool) private isExcludedFromFee;

    struct FeeRecipient {
        address recipient;
        uint256 basisPoints;
        bool sellToNative;
    }

    mapping(uint256 => FeeRecipient) public FeeRecipients;
    uint256 feeRecipientCount;
    uint256 totalFeeBasisPoints;
    uint256 totalFeeBasisPointsToSwap;
    bool isOpen;
    mapping(address => address) public Referrals;
    mapping(address => uint256) public ReferralIncome;
    uint256 public referralRateForBuySell;          // 100 = 1.00%
    uint256 public referralRateForNodeCreation;     // 100 = 1.00%
    uint256 public referralRateForNodeRewards;      // 100 = 1.00%
    uint256 public minTokensForReferral;
    uint256 public minNodesForReferral;

    uint256 public nodeCreateProcessFee;            // 100 = 1.00%
    address public nodeCreateProcessFeeRecipient;   // stabilator contract0
    uint256 public rewardProcessFee;                // 100 = 1.00%
    address public rewardProcessFeeRecipient;       // stabilator contract0
    uint256 public totalProcessFees;

    address public uniswapV2PairForSwap;
    address public uniswapV2RouterForSwap;
    bool public useSwapExactTokensForAVAXSupportingFeeOnTransferTokensForSwap;
    address public uniswapV2PairForLiquidity;
    address public uniswapV2RouterForLiquidity;
    bool public useSwapExactTokensForAVAXSupportingFeeOnTransferTokensForLiquidity;

    address public brainsContract;
    /// Lossless Compliance
    address public admin;
    address public recoveryAdmin;
    address private recoveryAdminCandidate;
    bytes32 private recoveryAdminKeyHash;
    uint256 public timelockPeriod;
    uint256 public losslessTurnOffTimestamp;
    bool public isLosslessOn;
    ILssController public lossless;

    function initialize(address _treasury, address[] memory addresses, 
        uint256[] memory basisPoints, bool[] memory sellToNative, uint256 swapAmount,
        uint256 _rewardsFee, uint256 _liquidityPoolFee, uint256 _sellFee, uint256 _buyFee,
        bool _swapAndLiquifyEnabled) public initializer 
    {
        require(_treasury != address(0), "TREASURY_IS_0");
        require(addresses.length == basisPoints.length && basisPoints.length == sellToNative.length, "ARRAY_LENGTH_MISTMATCH");        
        require(_sellFee < 2001, "SELLFEE_>2000");
        require(_buyFee < 2001, "BUYFEE_>2000");
        __ERC20_init("MIND+", "MIND+");
        OwnableUpgradeable.__Ownable_init();
        
        for(uint256 x; x < addresses.length; x++) {
            FeeRecipients[feeRecipientCount].recipient = addresses[x];
            FeeRecipients[feeRecipientCount].basisPoints = basisPoints[x];
            FeeRecipients[feeRecipientCount].sellToNative = sellToNative[x];
            feeRecipientCount++;
            totalFeeBasisPoints += basisPoints[x];
            totalFeeBasisPointsToSwap += sellToNative[x] ? basisPoints[x] : 0;
            isExcludedFromFee[addresses[x]] = true;
        }

        treasury = _treasury;

        rewardsFee = _rewardsFee; 
        liquidityPoolFee = _liquidityPoolFee; 
        sellFee = _sellFee; 
        buyFee = _buyFee;
        maxBuyFee = _buyFee;
        maxSellFee = _sellFee;

        _mint(treasury, 250000000 * (10 ** 18));

        require(swapAmount > 0, "SWAP_IS_ZERO");
        swapTokensAmount = swapAmount * (10**18);
        swapAndLiquifyEnabled = _swapAndLiquifyEnabled;
        isLosslessOn = false;
    }

    receive() external payable { }

    /***** ERC20 TRANSFERS *****/

    function transfer(address recipient, uint256 amount) public override lssTransfer(recipient, amount) returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    function transferFrom(address sender, address recipient, uint256 amount) public override lssTransferFrom(sender, recipient, amount) returns (bool) {
        _spendAllowance(sender, _msgSender(), amount);
        _transfer(sender, recipient, amount);        
        return true;
    }

    function _transfer(address from, address to, uint256 amount) internal override {
        require(isOpen || from == owner() || to == owner() ||
            proxyToApproved[from] || proxyToApproved[to], "NOT_OPEN");        
        require(from != address(0), "FROM_IS_ZERO");
        require(to != address(0), "TO_IS_ZERO");
        require(from == owner() || to == owner() || (!isBlacklisted[from] && !isBlacklisted[to]), "BLACKLISTED");

        uint256 fee;
        address referral;
        bool isBuyOrSell;
        uint256 transferAmount = amount;

        //sell
        if (!isExcludedFromFee[from] &&  automatedMarketMakerPairs[to]) {
            fee = sellFee;
            referral = Referrals[from];
            isBuyOrSell = true;

            uint256 contractTokenBalance = balanceOf(address(this)) >  rewardsPool 
                ? balanceOf(address(this)) -  rewardsPool 
                : 0;            

            bool swapAmountOk = contractTokenBalance >= swapTokensAmount;
            if (
                swapAmountOk &&
                swapAndLiquifyEnabled &&
                !swapping &&
                _msgSender() != owner()
            ) {
                swapping = true;

                _manualSwapAndLiquify();
                swapping = false;
            }       
        }

        //buy
        if (!isExcludedFromFee[to] &&  automatedMarketMakerPairs[from]) {
            fee = buyFee;
            referral = Referrals[to];
            isBuyOrSell = true;
        }

        if (fee > 0) {
            uint256 feeAmount = amount * fee / 10000;
            transferAmount -= feeAmount;
            super._transfer(from, address(this), feeAmount);
        }
        // referral
        if (isBuyOrSell) {
                        transferAmount -= _processReferralFeeWithReferral(from, referral, 
                amount, referralRateForBuySell);
        } 

        super._transfer(from, to, transferAmount);
    }   

    /***** MUTATIVE *****/

    function setReferral(address referral) external {
        require(_msgSender() != referral, "SAME_ADDRESS");
        Referrals[_msgSender()] = referral;
    }

    /***** OWNER ONLY *****/

    function openTrading() external onlyOwner {
        require(isOpen != true, "ALREADY_OPEN");
        isOpen = true;
    }

    /*** referrals ***/

    function setMinTokensForReferral(uint256 amount) external onlyOwner {
        minTokensForReferral = amount;
    }

    function setMinNodesForReferral(uint256 amount) external onlyOwner {
        minNodesForReferral = amount;
    }

    function setReferralRateForBuySell(uint256 value) external onlyOwner {
        require(value < 1001, "VALUE>1000");
        maxBuyFee = maxBuyFee - referralRateForBuySell + value;
        maxSellFee = maxSellFee - referralRateForBuySell + value;
        referralRateForBuySell = value;
    }

    /*** process fee (stabilators) ***/
    // 100 = 1.00%
    function setProcessFeeConfig(uint256 _rewardProcessFee) external onlyOwner {
        require(_rewardProcessFee < 1001, "VALUE>1000");
        rewardProcessFee = _rewardProcessFee;        
    }

    function addFeeRecipient(address recipient, uint256 basisPoints, bool sellToNative) external onlyOwner {
        FeeRecipients[feeRecipientCount].recipient = recipient;
        FeeRecipients[feeRecipientCount].basisPoints = basisPoints;
        FeeRecipients[feeRecipientCount].sellToNative = sellToNative;
        feeRecipientCount++;
        totalFeeBasisPoints += basisPoints;
        totalFeeBasisPointsToSwap += sellToNative ? basisPoints : 0;
    }

    function editFeeRecipient(uint256 id, address recipient, uint256 basisPoints, bool sellToNative) external onlyOwner {
        require(id < feeRecipientCount, "INVALID_ID");
        totalFeeBasisPoints = totalFeeBasisPoints - FeeRecipients[id].basisPoints + basisPoints;
        totalFeeBasisPointsToSwap -= FeeRecipients[id].sellToNative ? FeeRecipients[id].basisPoints : 0;
        totalFeeBasisPointsToSwap += sellToNative ? basisPoints : 0;
        FeeRecipients[id].recipient = recipient;
        FeeRecipients[id].basisPoints = basisPoints;
        FeeRecipients[id].sellToNative = sellToNative;
    }

    function updateSwapTokensAmount(uint256 value) external onlyOwner {
        swapTokensAmount = value;
    }

    function updateTreasury(address _treasury) external onlyOwner {
        require(_treasury != address(0), "ADDRESS_IS_0");
        treasury = _treasury;
    }

    // 1000 = 10.00%
    function updateRewardsFee(uint256 value) external onlyOwner {
        require(value < 101, "VALUE>100");
        rewardsFee = value;
    }

    // 1000 = 10.00%
    function updateLiquidityPoolFee(uint256 value) external onlyOwner {
        require(value < 2001, "VALUE>2000");
        liquidityPoolFee = value;
    }

    // 1000 = 10.00%
    function updateSellFee(uint256 value) external onlyOwner {
        require(value < 2001, "VALUE>2000");
        maxSellFee = maxSellFee - sellFee + value;
        sellFee = value;
    }

    // 1000 = 10.00%
    function updateBuyFee(uint256 value) external onlyOwner {
        require(value < 2001, "VALUE>2000");
        maxBuyFee = maxBuyFee - buyFee + value;
        buyFee = value;
    }

    // 1000 = 10.00%
    function updateRwSwapFee(uint256 value) external onlyOwner {
        rwSwap = value;
    }

    function blacklistMalicious(address account, bool value) external onlyOwner {
        isBlacklisted[account] = value;
    }

    function excludedFromFee(address _address) external view returns(bool) {
        return isExcludedFromFee[_address];
    }

    function setExcludedFromFee(address account, bool value) external onlyOwner {
        isExcludedFromFee[account] = value;
    }

    function setSwapAndLiquifyEnabled(bool newVal) external onlyOwner {
        swapAndLiquifyEnabled = newVal;
    }

    function setProxyState(address proxyAddress, bool value) external onlyOwner {
        proxyToApproved[proxyAddress] = value;
    }

    function setAutomatedMarketMakerPair(address pair, bool value) external onlyOwner {
        require(automatedMarketMakerPairs[pair] != value, "AMM_ALREADY_SET");
        automatedMarketMakerPairs[pair] = value;  
        isExcludedFromFee[pair] = value;      
        emit SetAutomatedMarketMakerPair(pair, value);
    }

    function setSwapPairAndRouter(address pair, address router, bool _useSwapExactTokensForAVAXSupportingFeeOnTransferTokens) external onlyOwner {
        require(pair != address(0), "PAIR_IS_ZERO");
        require(router != address(0), "ROUTER_IS_ZERO");
        uniswapV2PairForSwap = pair;
        uniswapV2RouterForSwap = router;
        isExcludedFromFee[router] = true;
        useSwapExactTokensForAVAXSupportingFeeOnTransferTokensForSwap = _useSwapExactTokensForAVAXSupportingFeeOnTransferTokens;
    }

    function setLiquidityPairAndRouter(address pair, address router, bool _useSwapExactTokensForAVAXSupportingFeeOnTransferTokens) external onlyOwner {
        require(pair != address(0), "PAIR_IS_ZERO");
        require(router != address(0), "ROUTER_IS_ZERO");
        uniswapV2PairForLiquidity = pair;
        uniswapV2RouterForLiquidity = router;
        isExcludedFromFee[router] = true;
        useSwapExactTokensForAVAXSupportingFeeOnTransferTokensForLiquidity = _useSwapExactTokensForAVAXSupportingFeeOnTransferTokens;
    }

    function manualSwapAndLiquify() external onlyOwner {
        _manualSwapAndLiquify();
    }

    function _manualSwapAndLiquify() private {
        uint256 contractTokenBalance = balanceOf(address(this)) >  rewardsPool 
            ?  balanceOf(address(this)) -  rewardsPool : 0;

        // amount for rewards
        uint256 rewardAmount = contractTokenBalance * rewardsFee / 10000;
        uint256 rewardAmountToSwap = rewardAmount * rwSwap / 10000;
        uint256 liquidityAmount = contractTokenBalance * liquidityPoolFee / 10000;
        uint256 liquidityAmountToSwap = liquidityAmount / 2;
        uint256 remainder = contractTokenBalance - rewardAmount - liquidityAmount;
        uint256 remainderToSwap = totalFeeBasisPoints > 0
            ? remainder * totalFeeBasisPointsToSwap / totalFeeBasisPoints
            : 0;
        uint256 totalAmountToSwap = rewardAmountToSwap + liquidityAmountToSwap + remainderToSwap;
        uint256 receivedAVAX = _swap(totalAmountToSwap);
        // add liquidity
        if (totalAmountToSwap > 0) {
            _addLiquidity(liquidityAmountToSwap, receivedAVAX * liquidityAmountToSwap / totalAmountToSwap);
        }

        // send to fee recipients
        uint256 remainderAVAX = totalAmountToSwap > 0
            ? receivedAVAX * remainderToSwap / totalAmountToSwap
            : 0;
        uint256 remainderAVAXBalance = remainderAVAX;
        remainder -= remainderToSwap;
        uint256 totalFeeBasisPointsNotToSwap = totalFeeBasisPoints - totalFeeBasisPointsToSwap;
        uint256 remainderBalance = remainder;
        for(uint256 x; x < feeRecipientCount; x++) {
            if (FeeRecipients[x].sellToNative) {
                uint256 amount = totalFeeBasisPointsToSwap > 0
                    ? remainderAVAX * FeeRecipients[x].basisPoints / totalFeeBasisPointsToSwap
                    : 0;
                amount = amount > remainderAVAXBalance ? remainderAVAXBalance : amount;
                (bool sent,) = FeeRecipients[x].recipient.call{value: amount}("");
                require(sent, "FAILED_TO_SEND");
                remainderAVAXBalance -= amount;
            } else {
                uint256 amount = totalFeeBasisPointsNotToSwap > 0
                    ? remainder * FeeRecipients[x].basisPoints / totalFeeBasisPointsNotToSwap
                    : 0;
                amount = amount > remainderBalance ? remainderBalance : amount;
                super._transfer(address(this),FeeRecipients[x].recipient, amount);
                remainderBalance -= amount;
            }
        }
        rewardsPool = balanceOf(address(this));
        emit ManualSwapAndLiquify(_msgSender(), contractTokenBalance);
    }   

    function withdrawAVAX() external nonReentrant onlyApproved {
        require(treasury != address(0), "TREASURY_NOT_SET");
        uint256 bal = address(this).balance;
        (bool sent, ) = treasury.call{value: bal}("");
        require(sent, "FAILED_SENDING_FUNDS");
        emit WithdrawAVAX(_msgSender(), bal);
    }

    function withdrawTokens(address _token) external nonReentrant onlyApproved {
        require(treasury != address(0), "TREASURY_NOT_SET");
        IERC20Upgradeable(_token).safeTransfer(
            treasury,
            IERC20Upgradeable(_token).balanceOf(address(this))
        );
    }

    /***** PRIVATE *****/

    function _swap(uint256 tokens) private returns(uint256) {
        uint256 initialETHBalance = address(this).balance;
        _swapTokensForEth(tokens);
        return (address(this).balance) - (initialETHBalance);
    }

    function _swapTokensForEth(uint256 tokenAmount) private {
        address[] memory path = new address[](2);
        path[0] = address(this);
        path[1] = useSwapExactTokensForAVAXSupportingFeeOnTransferTokensForSwap
            ? IRouter(uniswapV2RouterForSwap).WAVAX()
            : IRouter(uniswapV2RouterForSwap).WETH();

        _approve(address(this), address(uniswapV2RouterForSwap), tokenAmount);

        if (useSwapExactTokensForAVAXSupportingFeeOnTransferTokensForSwap) {
            IRouter(uniswapV2RouterForSwap).swapExactTokensForAVAXSupportingFeeOnTransferTokens(
                tokenAmount,
                0, // accept any amount of ETH
                path,
                address(this),
                block.timestamp
            );
        } else {
            IRouter(uniswapV2RouterForSwap).swapExactTokensForETHSupportingFeeOnTransferTokens(
                tokenAmount,
                0, // accept any amount of ETH
                path,
                address(this),
                block.timestamp
            );
        }
    }

    function _addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
        if (tokenAmount == 0 || ethAmount == 0) return;
        // approve token transfer to cover all possible scenarios
        _approve(address(this), uniswapV2RouterForLiquidity, tokenAmount);

        // add the liquidity
        if (useSwapExactTokensForAVAXSupportingFeeOnTransferTokensForLiquidity) {
            IRouter(uniswapV2RouterForLiquidity).addLiquidityAVAX{value: ethAmount}(
                address(this),
                tokenAmount,
                0, // slippage is unavoidable
                0, // slippage is unavoidable
                treasury,
                block.timestamp
            );
        } else {
            IRouter(uniswapV2RouterForLiquidity).addLiquidityETH{value: ethAmount}(
                address(this),
                tokenAmount,
                0, // slippage is unavoidable
                0, // slippage is unavoidable
                treasury,
                block.timestamp
            );        
        }
    }

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

    /***** MUTATIVE (NODE) *****/

    function setBrainsNFTContract(address value) external onlyOwner {
        require(value != address(0), "ADDRESS_IS_ZERO");
        brainsContract = value;
    }

    function removeFromRewardsPool(uint256 amount) external onlyApproved {
        require(rewardsPool > 0 && rewardsPool >= amount, "INSUFFICIENT_REWARDS");
        rewardsPool -= amount;    
        _transfer(address(this), treasury, amount);
        emit RemoveFromRewardsPool(address(this), amount);
    } 

    function updateReferralIncome(address referral, uint256 referralAmount) external onlyApproved {
        ReferralIncome[referral] += referralAmount;
    }

    // ensures referral fulfills requirements to receove referral inocme
    function _getReferral(address referral) private view returns(address result) {
        result = referral == address(0)  || balanceOf(referral) < minTokensForReferral
            || IERC721Upgradeable(brainsContract).balanceOf(referral) < minNodesForReferral
            ? address(this) 
            : referral;
    } 

    function _processReferralFee(address user, uint256 amount, uint256 rate) private returns(uint256 referralAmount) {
        if (rate == 0) return 0;
        address referral = Referrals[user];
        referral = _getReferral(referral);
        referralAmount = amount * rate / 10000;
        if (referralAmount > 0) {
            ReferralIncome[referral] += referralAmount;
            super._transfer(user, referral, referralAmount);
        }
    } 

    function _processReferralFeeWithReferral(address user, address referral, uint256 amount, uint256 rate) private returns(uint256 referralAmount) {
        if (rate == 0) return 0;
        referral = _getReferral(referral);
        referralAmount = amount * rate / 10000;
        if (referralAmount > 0) {
            ReferralIncome[referral] += referralAmount;
            super._transfer(user, referral, referralAmount);
        }
    } 

    function _processRewardProcessFee(uint256 rewardAmount) private returns(uint256 processFee) {
        if (rewardProcessFee > 0 && rewardProcessFeeRecipient != address(0)) {
            processFee = rewardAmount * rewardProcessFee / 10000;
            if (processFee > 0) { 
                totalProcessFees += processFee;
                super._transfer(_msgSender(), rewardProcessFeeRecipient, processFee);
            }
        }        
    }
    
    /***** MODIFIERS & EVENTS *****/

    modifier onlyApproved() {
        require(proxyToApproved[_msgSender()] == true || _msgSender() == owner(), "ONLY_APPROVED");
        _;
    }       

    event OpenTrading(address indexed user);
    event WithdrawAVAX(address indexed sender, uint256 indexed balance);
    event UpdateUniswapV2Router(address indexed newAddress, address indexed oldAddress);
    event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
    event LiquidityWalletUpdated(address indexed newLiquidityWallet, address indexed oldLiquidityWallet);
    event SwapAndLiquify(uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiqudity);
    event ManualSwapAndLiquify(address indexed user, uint256 indexed contractTokenBalance);
    event RemoveFromRewardsPool(address indexed user, uint256 indexed amount);
    event SetRouter(address indexed router, bool indexed value);

    /// Lossless Compliance

    event ConfirmBlacklisted(address blacklisted);

    modifier lssTransfer(address recipient, uint256 amount) {
        if (isLosslessOn) {
            lossless.beforeTransfer(_msgSender(), recipient, amount);
        }
        _;
    }

    modifier lssTransferFrom(address sender, address recipient, uint256 amount) {
        if (isLosslessOn) {
            lossless.beforeTransferFrom(_msgSender(), sender, recipient, amount);
        }
        _;
    }

    modifier lssBurn(address account, uint256 amount) {
        if (isLosslessOn) {
            lossless.beforeBurn(account, amount);
        } 
        _;
    }

    modifier lssMint(address account, uint256 amount) {
        if (isLosslessOn) {
            lossless.beforeMint(account, amount);
        } 
        _;
    }

    modifier onlyRecoveryAdmin() {
        require(_msgSender() == recoveryAdmin, "LERC20_NOT_RECOVERY_ADMIN");
        _;
    }

    /**
     * @notice  Function to set the lossless controller
     *
     * @param   _controller Lossless controller address
     */
    function setLosslessController(address _controller) public onlyOwner {
        require(_controller != address(0), "LERC20_CONTROLLER_IS_ZERO");
        require(_controller != address(lossless), "LERC20_SAME_ADDRESS");
        lossless = ILssController(_controller);
    }

    /**
     * @notice  Function to set the lossless admin that interacts with controller
     *
     * @param   newAdmin address of the new admin
     */
    function setLosslessAdmin(address newAdmin) external onlyOwner {
        require(newAdmin != admin, "LERC20_SAME_ADDRESS");
        admin = newAdmin;
    }

    /**
     * @notice  Function to propose a new recovery admin
     *
     * @param   candidate new admin proposed address
     * @param   keyHash Key to accept
     */
    function transferRecoveryAdminOwnership(address candidate, bytes32 keyHash) external onlyOwner {
        recoveryAdminCandidate = candidate;
        recoveryAdminKeyHash = keyHash;
    }


    /**
     * @notice  Function to accept the admin proposal
     * @param   key Key to accept
     */
    function acceptRecoveryAdminOwnership(bytes memory key) external {
        require(_msgSender() == recoveryAdminCandidate, "LERC20_NOT_CANDIDATE");
        require(keccak256(key) == recoveryAdminKeyHash, "LERC20_INVALID_KEY");
        recoveryAdmin = recoveryAdminCandidate;
        recoveryAdminCandidate = address(0);
    }


    /**
     * @notice  Function to retrieve the funds of a blacklisted address.
     *
     * @param   from Array of addresses corresponding to a report and a second report
     */
    function transferOutBlacklistedFunds(address[] calldata from) external {
        require(_msgSender() == address(lossless), "LERC20_NOT_LOSSLESS_CONTRACT");
        for(uint256 i; i < from.length;i++) {
            address fromAddress = from[i];
            _transfer(fromAddress, address(lossless), balanceOf(fromAddress));
        }
    }

    /**
     * @notice  Function to propose turning off everything related to lossless
    */
    function proposeLosslessTurnOff() external onlyRecoveryAdmin {
        require(losslessTurnOffTimestamp == 0, "LERC20_ALREADY_PROPOSED");
        require(isLosslessOn, "LERC20_ALREADY_OFF");
        losslessTurnOffTimestamp = block.timestamp + timelockPeriod;
    }

    /**
     * @notice  Function to execute lossless turn off after a period of time
    */
    function executeLosslessTurnOff() external onlyRecoveryAdmin {
        require(losslessTurnOffTimestamp != 0, "LERC20_NOT_PROPOSED");
        require(losslessTurnOffTimestamp <= block.timestamp, "LERC20_TIMELOCK_IN_PROGRESS");
        isLosslessOn = false;
        losslessTurnOffTimestamp = 0;
    }

    /**
     * @notice  Function to turn on everything related to lossless
    */
    function executeLosslessTurnOn() external onlyRecoveryAdmin {
        require(!isLosslessOn, "LERC20_ALREADY_ON");
        losslessTurnOffTimestamp = 0;
        isLosslessOn = true;
    }
}

interface ILssController {
    function beforeTransfer(address _msgSender, address _recipient, uint256 _amount) external;
    function beforeTransferFrom(address _msgSender, address _sender, address _recipient, uint256 _amount) external;
    function beforeMint(address _to, uint256 _amount) external;
    function beforeBurn(address _account, uint256 _amount) external;
}

File 2 of 20 : ERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20Upgradeable.sol";
import "./extensions/IERC20MetadataUpgradeable.sol";
import "../../utils/ContextUpgradeable.sol";
import "../../proxy/utils/Initializable.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing {
        __ERC20_init_unchained(name_, symbol_);
    }

    function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, _allowances[owner][spender] + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = _allowances[owner][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
        }
        _balances[to] += amount;

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Spend `amount` form the allowance of `owner` toward `spender`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[45] private __gap;
}

File 3 of 20 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal onlyInitializing {
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
        _transferOwnership(_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 {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 4 of 20 : ReentrancyGuardUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @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 ReentrancyGuardUpgradeable is Initializable {
    // 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;

    function __ReentrancyGuard_init() internal onlyInitializing {
        __ReentrancyGuard_init_unchained();
    }

    function __ReentrancyGuard_init_unchained() internal onlyInitializing {
        _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 making 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;
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 5 of 20 : SafeERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20Upgradeable.sol";
import "../../../utils/AddressUpgradeable.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 SafeERC20Upgradeable {
    using AddressUpgradeable for address;

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

    function safeTransferFrom(
        IERC20Upgradeable 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(
        IERC20Upgradeable 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'
        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(
        IERC20Upgradeable 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(
        IERC20Upgradeable 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(IERC20Upgradeable 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
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 6 of 20 : NODERewardManagementV2.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;

import "./interfaces/IVesting.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract NODERewardManagementV2 is Ownable {
    using Strings for uint256;

    address[] public Admins;
    mapping(address => bool) public AdminByAddr;
    IVesting vesting;

    struct NodeEntity {
        string name;
        uint256 creationTime;
        uint256 lastClaimTime;
        uint256 rewardAvailable;
    }

    mapping(address => uint256[]) public NodeIDsByUser;
    mapping(uint256 => NodeEntity) public NodesByID;
    mapping(string => bool) public NodeNames;

    uint256 public nodePrice;
    uint256 public rewardPerNode;
    address public token;
    uint256 public totalNodesCreated;
    uint256 public totalRewardStaked;
    uint256 public claimTime;
    uint256 public rewardsPerMinute;
    bool public cashoutEnabled;
    bool public bypassIsNodeOwner = true;
    bool public autoDistri = true;          // for parity with existing token contract calls
    uint256 public gasForDistribution;      // for parity with existing token contract calls
    uint256 public lastDistributionCount;   // for parity with existing token contract calls

    constructor(uint256 _nodePrice, uint256 _rewardPerNode, uint256 _claimTime) {
        nodePrice = _nodePrice;
        rewardsPerMinute =  _rewardPerNode / (24 * 60);
        rewardPerNode = _rewardPerNode;
        claimTime = _claimTime;
        Admins.push(msg.sender);
        AdminByAddr[msg.sender] = true;
    }

    /**************/
    /*   VIEWS    */
    /**************/

    function _getRewardAmountOfNode(address account, uint256 nodeIndex) external view nodeOwner(account) returns(uint256) {
        require(NodeIDsByUser[account].length > nodeIndex, "INVALID_INDEX");
        return _availableClaimableAmount(NodesByID[NodeIDsByUser[account][nodeIndex]].lastClaimTime) + 
                NodesByID[NodeIDsByUser[account][nodeIndex]].rewardAvailable;
    }

    function _getRewardAvailable(address account, uint256 nodeIndex) external view nodeOwner(account) returns(uint256) {
        require(NodeIDsByUser[account].length > nodeIndex, "INVALID_INDEX");
        return NodesByID[NodeIDsByUser[account][nodeIndex]].rewardAvailable;
    }

    function _getAvailableClaimAmount(address account, uint256 nodeIndex) external view nodeOwner(account) returns(uint256) {
        require(NodeIDsByUser[account].length > nodeIndex, "INVALID_INDEX");
        return _availableClaimableAmount(NodesByID[NodeIDsByUser[account][nodeIndex]].lastClaimTime);
    }

    function _getRewardAmountOf(address account) external view nodeOwner(account) returns(uint256) {
        uint256 rewardCount;
        for (uint256 x; x < NodeIDsByUser[account].length; x++) {
            rewardCount += _availableClaimableAmount(NodesByID[NodeIDsByUser[account][x]].lastClaimTime) + 
                NodesByID[NodeIDsByUser[account][x]].rewardAvailable;
        }
        return rewardCount;
    }

    function _getRewardAmountOf(address account, uint256 _creationTime) external view nodeOwner(account) returns(uint256) {
        require(_creationTime > 0, "CREATIONTIME_IS_ZERO");
        require(NodeIDsByUser[account].length > 0, "NO_NODES_FOR_CASHOUT");
        NodeEntity memory node = _getNodeWithCreationTime(account, _creationTime);
        return _availableClaimableAmount(node.lastClaimTime) + node.rewardAvailable;
    }

    function _getNodesRewardAvailable(address account) external view nodeOwner(account) returns(string memory) {
        NodeEntity memory node = NodesByID[NodeIDsByUser[account][0]];
        string memory _rewardsAvailable = uint2str(_availableClaimableAmount(node.lastClaimTime) + node.rewardAvailable);
        for(uint256 x = 1; x < NodeIDsByUser[account].length; x++) {
            node = NodesByID[NodeIDsByUser[account][x]];
            _rewardsAvailable = string(abi.encodePacked(_rewardsAvailable, "#", 
                uint2str(_availableClaimableAmount(node.lastClaimTime) + node.rewardAvailable)));
        }
        return _rewardsAvailable;
    }

    function _getNodesPendingClaimableAmount(address account) external view nodeOwner(account) returns(string memory) {
        string memory pendingClaimableAmount = uint2str(_pendingClaimableAmount(NodesByID[NodeIDsByUser[account][0]].lastClaimTime));
        for (uint256 x = 1; x < NodeIDsByUser[account].length; x++) {
            pendingClaimableAmount = string(abi.encodePacked(pendingClaimableAmount,"#", 
                uint2str(_pendingClaimableAmount(NodesByID[NodeIDsByUser[account][x]].lastClaimTime))));
        }
        return pendingClaimableAmount;
    }

    function _getNodeRewardAmountOf(address account, uint256 creationTime) external view nodeOwner(account) returns (uint256) {
        return _getNodeWithCreationTime(account, creationTime).rewardAvailable;
    }

    function _getNodesNames(address account) external view nodeOwner(account) returns(string memory) {
        string memory names = NodesByID[NodeIDsByUser[account][0]].name;
        for(uint256 x = 1; x < NodeIDsByUser[account].length; x++) {
            names = string(abi.encodePacked(names, "#", NodesByID[NodeIDsByUser[account][x]].name));
        }
        return names;
    }

    function _getNodesCreationTime(address account) external view nodeOwner(account) returns(string memory) {
        string memory creationTimes = uint2str(NodesByID[NodeIDsByUser[account][0]].creationTime);
        for(uint256 x = 1; x < NodeIDsByUser[account].length; x++) {
            creationTimes = string(abi.encodePacked(creationTimes, "#", 
                uint2str(NodesByID[NodeIDsByUser[account][x]].creationTime)));
        }
        return creationTimes;
    }

    function _getNodesLastClaimTime(address account) external view nodeOwner(account) returns(string memory) {
        string memory _lastClaimTimes = uint2str(NodesByID[NodeIDsByUser[account][0]].lastClaimTime);
        for(uint256 x = 1; x < NodeIDsByUser[account].length; x++) {
            _lastClaimTimes = string(abi.encodePacked(_lastClaimTimes, "#", 
                uint2str(NodesByID[NodeIDsByUser[account][x]].lastClaimTime)));
        }        
        return _lastClaimTimes;
    }

    function _getNodeNumberOf(address account) external view returns(uint256) {
        return NodeIDsByUser[account].length;
    }

    function _isNodeOwner(address account) external view returns(bool) {
        return bypassIsNodeOwner ? true : NodeIDsByUser[account].length > 0;
    }

    function _distributeRewards() external view onlyAdmin returns(uint256, uint256, uint256) {
        return (0,0,0);
    }

    /****************/
    /*   MUTATIVE   */
    /****************/

    function createNode(address account, string memory nodeName) external onlyAdmin {
        NodesByID[totalNodesCreated] = NodeEntity({
                name: _getAvailableName(nodeName),
                creationTime: block.timestamp,
                lastClaimTime: block.timestamp,
                rewardAvailable: 0
            });
        NodeIDsByUser[account].push(totalNodesCreated);
        totalNodesCreated++;
    }

    function createNodes(address[] calldata accounts, string[] calldata nodeNames) external onlyAdmin {
        require(accounts.length == nodeNames.length, "INCONSISTENT_LENGTH");
        for(uint256 x; x < accounts.length; x++) {
            NodesByID[totalNodesCreated] = NodeEntity({
                    name: _getAvailableName(nodeNames[x]),
                    creationTime: block.timestamp,
                    lastClaimTime: block.timestamp,
                    rewardAvailable: 0
                });
            NodeIDsByUser[accounts[x]].push(totalNodesCreated);            
            totalNodesCreated++;
        }
    }    

    function createNodesForAccount(address account, string[] calldata nodeNames) external onlyAdmin {
        for(uint256 x; x < nodeNames.length; x++) {
            NodesByID[totalNodesCreated] = NodeEntity({
                    name: _getAvailableName(nodeNames[x]),
                    creationTime: block.timestamp,
                    lastClaimTime: block.timestamp,
                    rewardAvailable: 0
                });
            NodeIDsByUser[account].push(totalNodesCreated);   
            totalNodesCreated++;
        }
    }    

    function _cashoutNodeReward(address account, uint256 _creationTime) external onlyAdmin nodeOwner(account) returns(uint256) {
        require(cashoutEnabled, "CASHOUT_DISABLED");
        require(_creationTime > 0, "CREATIONTIME_IS_ZERO");
        NodeEntity storage node = _getNodeWithCreationTime(account, _creationTime);
        require(isNodeClaimable(node), "TOO_EARLY_TO_CLAIM");
        uint256 rewardNode = _availableClaimableAmount(node.lastClaimTime) + node.rewardAvailable;
        node.rewardAvailable = 0;
        node.lastClaimTime = block.timestamp;
        if (vesting.isBeneficiary(account) && vesting.accruedBalanceOf(account) > 0) {
            vesting.claim(account);
        }
        return rewardNode; 
    }    

    function _cashoutAllNodesReward(address account) external onlyAdmin nodeOwner(account) returns(uint256) {
        require(cashoutEnabled, "CASHOUT_DISABLED");
        uint256 rewardsTotal;
        for (uint256 x; x < NodeIDsByUser[account].length; x++) {
            NodeEntity storage _node = NodesByID[NodeIDsByUser[account][x]];
            rewardsTotal += _availableClaimableAmount(_node.lastClaimTime) + _node.rewardAvailable;
            _node.rewardAvailable = 0;
            _node.lastClaimTime = block.timestamp;
        }
        if (vesting.isBeneficiary(account) && vesting.accruedBalanceOf(account) > 0) {
            vesting.claim(account);
        }        
        return rewardsTotal;
    }

    function transferNode(address to, string memory nodeName) external returns (bool) {
        return _transferNode(msg.sender, to, nodeName);
    }    

    function _transferNode(address from, address to, string memory nodeName) public onlyAdmin nodeOwner(from) returns (bool) {
        uint256 index;
        bool found;
        for(uint256 x = 0; x < NodeIDsByUser[from].length; x++) {
            if (keccak256(bytes(NodesByID[NodeIDsByUser[from][x]].name)) == keccak256(bytes(nodeName))) {
                found = true;
                index = x;
                break;
            }            
        }        
        require(found, "NODE_!EXISTS");
        // push ID into receiver
        NodeIDsByUser[to].push(NodeIDsByUser[from][index]);
        // swap ID with last item for sender
        NodeIDsByUser[from][index] = NodeIDsByUser[from][NodeIDsByUser[from].length - 1];
        // remove last ID from sender
        NodeIDsByUser[from].pop();
        return true;        
    }  

    function _renameNode(address account, string memory oldName, string memory newName) external nodeOwner(account) onlyAdmin {
        require(NodeNames[oldName], "NODE_!EXISTS");
        NodesByID[_getNodeIDByName(account, oldName)].name = newName;
        NodeNames[oldName] = false;
        NodeNames[newName] = true;
    }

    /****************/
    /*    ADMIN     */
    /****************/

    function setToken (address token_) external onlyAdmin {
        token = token_;
    }

    function setVesting(address vesting_) external onlyAdmin {
        vesting = IVesting(vesting_);
    }

    function _changeRewardsPerMinute(uint256 newPrice) external onlyAdmin {
        rewardsPerMinute = newPrice;
    }     

    function toggleCashoutEnabled() external onlyAdmin {
        cashoutEnabled = !cashoutEnabled;
    }

    function _changeNodePrice(uint256 newNodePrice) external onlyAdmin {
        nodePrice = newNodePrice;
    }

    function _changeClaimTime(uint256 newTime) external onlyAdmin {
        claimTime = newTime;
    }    

    function _changeRewardPerNode(uint256 newPrice) external onlyAdmin {
        rewardPerNode = newPrice;
        rewardsPerMinute = newPrice / (24 * 60);
    }  
   
    function addRewardToNode(address account, string memory name, uint256 amount) external onlyAdmin nodeOwner(account) {
        require(NodeNames[name], "NODE_!EXISTS");
        NodesByID[_getNodeIDByName(account, name)].rewardAvailable += amount;
    }

    function setBypassNodeOwner(bool bypass) external onlyAdmin {
        bypassIsNodeOwner = bypass;
    }

    function _changeAutoDistri(bool newMode) external onlyAdmin {}      

    function _changeGasDistri(uint256 newGasDistri) external onlyAdmin {}    

    /**************/
    /*  PRIVATE   */
    /**************/

    function _getNodeIDByName(address account, string memory name) private view returns(uint256) {
        require(NodeNames[name], "NODE_!EXISTS");
        uint256 nodeId;
        bool found;
        for(uint256 x; x < NodeIDsByUser[account].length; x++) {
            if (keccak256(bytes(NodesByID[NodeIDsByUser[account][x]].name)) == keccak256(bytes(name))) {
                nodeId = NodeIDsByUser[account][x];
                found = true;
                break;
            }
        }
        require(found, "NO_NODE_WITH_NAME");
        return nodeId;
    }

    function _pendingClaimableAmount(uint256 nodeLastClaimTime) private view returns (uint256 availableRewards) {
        uint256 timePassed = block.timestamp - nodeLastClaimTime;
        return timePassed / claimTime < 1 
            ? timePassed * rewardsPerMinute / claimTime 
            : 0;
    }

    function _availableClaimableAmount(uint256 nodeLastClaimTime) private view returns (uint256 availableRewards) {
        return ((block.timestamp - nodeLastClaimTime) / claimTime) * rewardsPerMinute;
    }      

    function _getAvailableName(string memory nodeName) private returns(string memory) {
        string memory newNodeName = nodeName;
        uint256 x;
        while(NodeNames[newNodeName]) {
            newNodeName = string(abi.encodePacked(nodeName, x.toString()));
            x++;
        }
        NodeNames[newNodeName] = true;             
        return newNodeName;
    }

    function _getNodeWithCreationTime(address account, uint256 creationTime) private view returns (NodeEntity storage) {
        uint256 nodeId;
        bool found;
        for(uint256 x; x < NodeIDsByUser[account].length; x++) {
            if (NodesByID[NodeIDsByUser[account][x]].creationTime == creationTime) {
                nodeId = NodeIDsByUser[account][x];
                found = true;
                break;
            }
        }
        require(found, "NO_NODE_WITH_BLOCKTIME");
        return NodesByID[nodeId];
    }

    function _getNodeWithCreatime(NodeEntity[] storage nodes, uint256 _creationTime) private view returns (NodeEntity storage) {
        require(nodes.length > 0, "NO_NODES_FOR_CASHOUT");
        bool found;
        int256 index = _binarysearch(nodes, 0, nodes.length, _creationTime);
        uint256 validIndex;
        if (index >= 0) {
            found = true;
            validIndex = uint256(index);
        }
        require(found, "NO_NODE_WITH_BLOCKTIME");
        return nodes[validIndex];
    }

    function isNodeClaimable(NodeEntity memory node) private view returns (bool) {
        return node.lastClaimTime + claimTime <= block.timestamp;
    }

    function _binarysearch(NodeEntity[] memory arr, uint256 low, uint256 high, uint256 x) private view returns (int256) {
        if (high >= low) {
            uint256 mid = (high + low) / (2);
            if (arr[mid].creationTime == x) {
                return int256(mid);
            } else if (arr[mid].creationTime > x) {
                return _binarysearch(arr, low, mid - 1, x);
            } else {
                return _binarysearch(arr, mid + 1, high, x);
            }
        } else {
            return -1;
        }
    }

    function uint2str(uint256 _i) internal pure returns (string memory _uintAsString) {
        if (_i == 0) return "0";
        uint256 j = _i;
        uint256 len;
        while (j != 0) {
            len++;
            j /= 10;
        }
        bytes memory bstr = new bytes(len);
        uint256 k = len;
        while (_i != 0) {
            k = k - 1;
            uint8 temp = (48 + uint8(_i - (_i / 10) * 10));
            bytes1 b1 = bytes1(temp);
            bstr[k] = b1;
            _i /= 10;
        }
        return string(bstr);
    }

    function setAdmins(address[] memory _Admins) external onlyAdmin {
        _setAdmins(_Admins);
    }

    function _setAdmins(address[] memory _Admins) internal {
        for (uint256 i; i < Admins.length; i++) {
            AdminByAddr[Admins[i]] = false;
        }

        for (uint256 j; j < _Admins.length; j++) {
            AdminByAddr[_Admins[j]] = true;
        }
        Admins = _Admins;
        emit SetAdmins(_Admins);
    }

    function getAdmins() external view returns (address[] memory) {
        return Admins;
    }      

    modifier onlyAdmin() {
        require(msg.sender == token || AdminByAddr[msg.sender] == true || msg.sender == owner(), "Fuck off");
        _;
    }

    modifier nodeOwner(address account) {
        require(NodeIDsByUser[account].length > 0, "NOT_NODE_OWNER");
        _;
    }

    event SetAdmins(address[] Admins);
}

File 7 of 20 : IRouter.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.2;

interface IRouter {

    function WAVAX() external pure returns (address);
    function WETH() external pure returns (address);

    function addLiquidityAVAX(
        address token,
        uint256 amountTokenDesired,
        uint256 amountTokenMin,
        uint256 amountAVAXMin,
        address to,
        uint256 deadline
    )
        external
        payable
        returns (
            uint256 amountToken,
            uint256 amountAVAX,
            uint256 liquidity
        );

    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);

    function swapExactTokensForAVAXSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;

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

File 8 of 20 : IJoeRouter02.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.2;

import "./IJoeRouter01.sol";

interface IJoeRouter02 is IJoeRouter01 {
    function removeLiquidityAVAXSupportingFeeOnTransferTokens(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountAVAXMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountAVAX);

    function removeLiquidityAVAXWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountAVAXMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountAVAX);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;

    function swapExactAVAXForTokensSupportingFeeOnTransferTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable;

    function swapExactTokensForAVAXSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;
}

File 9 of 20 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.0;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the
 * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() initializer {}
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the
        // contract may have been reentered.
        require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} modifier, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    function _isConstructor() private view returns (bool) {
        return !AddressUpgradeable.isContract(address(this));
    }
}

File 10 of 20 : IERC721Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165Upgradeable.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721Upgradeable is IERC165Upgradeable {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;
}

File 11 of 20 : IERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20Upgradeable {
    /**
     * @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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from,
        address to,
        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 20 : IERC20MetadataUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20Upgradeable.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20MetadataUpgradeable is IERC20Upgradeable {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

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

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

File 13 of 20 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @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 ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

File 14 of 20 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 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");

        (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");

        (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");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal 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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 15 of 20 : IVesting.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;

interface IVesting {     
    function claim(address _address) external;
    function accruedBalanceOf(address beneficiaryAddress) external view returns (uint256);
    function isBeneficiary(address beneficiaryAddress) external view returns(bool);
}

File 16 of 20 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

File 17 of 20 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

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() {
        _transferOwnership(_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 {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 18 of 20 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

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) {
        return msg.data;
    }
}

File 19 of 20 : IJoeRouter01.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.2;

interface IJoeRouter01 {
    function factory() external pure returns (address);

    function WAVAX() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint256 amountADesired,
        uint256 amountBDesired,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    )
        external
        returns (
            uint256 amountA,
            uint256 amountB,
            uint256 liquidity
        );

    function addLiquidityAVAX(
        address token,
        uint256 amountTokenDesired,
        uint256 amountTokenMin,
        uint256 amountAVAXMin,
        address to,
        uint256 deadline
    )
        external
        payable
        returns (
            uint256 amountToken,
            uint256 amountAVAX,
            uint256 liquidity
        );

    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountA, uint256 amountB);

    function removeLiquidityAVAX(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountAVAXMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountToken, uint256 amountAVAX);

    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountA, uint256 amountB);

    function removeLiquidityAVAXWithPermit(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountAVAXMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountToken, uint256 amountAVAX);

    function swapExactTokensForTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapTokensForExactTokens(
        uint256 amountOut,
        uint256 amountInMax,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapExactAVAXForTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable returns (uint256[] memory amounts);

    function swapTokensForExactAVAX(
        uint256 amountOut,
        uint256 amountInMax,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapExactTokensForAVAX(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapAVAXForExactTokens(
        uint256 amountOut,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable returns (uint256[] memory amounts);

    function quote(
        uint256 amountA,
        uint256 reserveA,
        uint256 reserveB
    ) external pure returns (uint256 amountB);

    function getAmountOut(
        uint256 amountIn,
        uint256 reserveIn,
        uint256 reserveOut
    ) external pure returns (uint256 amountOut);

    function getAmountIn(
        uint256 amountOut,
        uint256 reserveIn,
        uint256 reserveOut
    ) external pure returns (uint256 amountIn);

    function getAmountsOut(uint256 amountIn, address[] calldata path)
        external
        view
        returns (uint256[] memory amounts);

    function getAmountsIn(uint256 amountOut, address[] calldata path)
        external
        view
        returns (uint256[] memory amounts);
}

File 20 of 20 : IERC165Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165Upgradeable {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

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

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"blacklisted","type":"address"}],"name":"ConfirmBlacklisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newLiquidityWallet","type":"address"},{"indexed":true,"internalType":"address","name":"oldLiquidityWallet","type":"address"}],"name":"LiquidityWalletUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"contractTokenBalance","type":"uint256"}],"name":"ManualSwapAndLiquify","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"OpenTrading","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":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RemoveFromRewardsPool","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pair","type":"address"},{"indexed":true,"internalType":"bool","name":"value","type":"bool"}],"name":"SetAutomatedMarketMakerPair","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"router","type":"address"},{"indexed":true,"internalType":"bool","name":"value","type":"bool"}],"name":"SetRouter","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokensSwapped","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ethReceived","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokensIntoLiqudity","type":"uint256"}],"name":"SwapAndLiquify","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newAddress","type":"address"},{"indexed":true,"internalType":"address","name":"oldAddress","type":"address"}],"name":"UpdateUniswapV2Router","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"balance","type":"uint256"}],"name":"WithdrawAVAX","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"FeeRecipients","outputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"basisPoints","type":"uint256"},{"internalType":"bool","name":"sellToNative","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"ReferralIncome","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"Referrals","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"key","type":"bytes"}],"name":"acceptRecoveryAdminOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"basisPoints","type":"uint256"},{"internalType":"bool","name":"sellToNative","type":"bool"}],"name":"addFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"automatedMarketMakerPairs","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"value","type":"bool"}],"name":"blacklistMalicious","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"brainsContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buyFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"basisPoints","type":"uint256"},{"internalType":"bool","name":"sellToNative","type":"bool"}],"name":"editFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"excludedFromFee","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"executeLosslessTurnOff","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"executeLosslessTurnOn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasury","type":"address"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256[]","name":"basisPoints","type":"uint256[]"},{"internalType":"bool[]","name":"sellToNative","type":"bool[]"},{"internalType":"uint256","name":"swapAmount","type":"uint256"},{"internalType":"uint256","name":"_rewardsFee","type":"uint256"},{"internalType":"uint256","name":"_liquidityPoolFee","type":"uint256"},{"internalType":"uint256","name":"_sellFee","type":"uint256"},{"internalType":"uint256","name":"_buyFee","type":"uint256"},{"internalType":"bool","name":"_swapAndLiquifyEnabled","type":"bool"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isBlacklisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isLosslessOn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liquidityPoolFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lossless","outputs":[{"internalType":"contract ILssController","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"losslessTurnOffTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"manualSwapAndLiquify","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxBuyFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSellFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minNodesForReferral","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minTokensForReferral","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nodeCreateProcessFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nodeCreateProcessFeeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nodeRewardManager","outputs":[{"internalType":"contract NODERewardManagementV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"openTrading","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proposeLosslessTurnOff","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"proxyToApproved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"recoveryAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"referralRateForBuySell","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"referralRateForNodeCreation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"referralRateForNodeRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"removeFromRewardsPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardProcessFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardProcessFeeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rwSwap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sellFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pair","type":"address"},{"internalType":"bool","name":"value","type":"bool"}],"name":"setAutomatedMarketMakerPair","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"value","type":"address"}],"name":"setBrainsNFTContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"value","type":"bool"}],"name":"setExcludedFromFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pair","type":"address"},{"internalType":"address","name":"router","type":"address"},{"internalType":"bool","name":"_useSwapExactTokensForAVAXSupportingFeeOnTransferTokens","type":"bool"}],"name":"setLiquidityPairAndRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"setLosslessAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_controller","type":"address"}],"name":"setLosslessController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setMinNodesForReferral","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setMinTokensForReferral","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardProcessFee","type":"uint256"}],"name":"setProcessFeeConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"proxyAddress","type":"address"},{"internalType":"bool","name":"value","type":"bool"}],"name":"setProxyState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"referral","type":"address"}],"name":"setReferral","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setReferralRateForBuySell","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"newVal","type":"bool"}],"name":"setSwapAndLiquifyEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pair","type":"address"},{"internalType":"address","name":"router","type":"address"},{"internalType":"bool","name":"_useSwapExactTokensForAVAXSupportingFeeOnTransferTokens","type":"bool"}],"name":"setSwapPairAndRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapAndLiquifyEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapTokensAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timelockPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalProcessFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"from","type":"address[]"}],"name":"transferOutBlacklistedFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"candidate","type":"address"},{"internalType":"bytes32","name":"keyHash","type":"bytes32"}],"name":"transferRecoveryAdminOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uniswapV2Pair","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uniswapV2PairForLiquidity","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uniswapV2PairForSwap","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uniswapV2Router","outputs":[{"internalType":"contract IJoeRouter02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uniswapV2RouterForLiquidity","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uniswapV2RouterForSwap","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"updateBuyFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"updateLiquidityPoolFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"referral","type":"address"},{"internalType":"uint256","name":"referralAmount","type":"uint256"}],"name":"updateReferralIncome","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"updateRewardsFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"updateRwSwapFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"updateSellFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"updateSwapTokensAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasury","type":"address"}],"name":"updateTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"useSwapExactTokensForAVAXSupportingFeeOnTransferTokensForLiquidity","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"useSwapExactTokensForAVAXSupportingFeeOnTransferTokensForSwap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawAVAX","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b50614e9d806100206000396000f3fe60806040526004361061051c5760003560e01c80637f51bb1f116102a2578063a88f671611610165578063d6e242b8116100cc578063f2fde38b11610085578063f2fde38b14611046578063f3d90e6a14611066578063f59819491461107c578063f851a44014611092578063fe25153a146110b2578063fe575a87146110d257600080fd5b8063d6e242b814610f74578063d892934214610f89578063dd62ed3e14610fa9578063e6b49d6414610fef578063eb72ea561461100f578063efe25ad21461103057600080fd5b8063b62496f51161011e578063b62496f514610eb5578063c49b9a8014610ee5578063c9567bf914610f05578063ccfa214f14610f1a578063d41d14c314610f34578063d460e4b914610f5457600080fd5b8063a88f671614610e0b578063a9059cbb14610e2b578063abce145b14610e4b578063b164afe014610e60578063b38fe95714610e80578063b5c2287714610e9557600080fd5b8063980326f0116102095780639f2f6678116101c25780639f2f667814610d5f578063a435dfa514610d7f578063a45181c214610d95578063a457c2d714610db5578063a64cfefa14610dd5578063a74f7ff714610df557600080fd5b8063980326f014610c985780639a7a23d614610cb95780639b0d934d14610cd95780639ba2a72214610cf95780639dc38c7d14610d0f5780639e5914da14610d3f57600080fd5b80638da5cb5b1161025b5780638da5cb5b14610be55780638e8ecaff14610c0357806393310ffe14610c23578063936af91114610c4357806395d89b4114610c63578063965cf46614610c7857600080fd5b80637f51bb1f14610b205780637faa9bbc14610b4057806385ecafd714610b56578063897f39c414610b8f5780638b6da11514610baf5780638bc9c7b014610bc557600080fd5b8063467abe0a116103ea57806361086b001161035157806370a082311161030a57806370a0823114610a8057806370add8b814610aa0578063715018a614610ab6578063733b864f14610acb57806375122adc14610ae05780637628b3d714610b0057600080fd5b806361086b00146109d457806361d027b3146109ea5780636612e66f14610a0a5780636770474b14610a2a57806368da864d14610a4a5780636d40b2f214610a6a57600080fd5b80634a74bb02116103a35780634a74bb02146109345780634bd228a41461095357806354f12f1f146109735780635b8a194a146109895780635f1c31821461099e5780635f6529a3146109b457600080fd5b8063467abe0a146108715780634706240214610891578063480136b3146108a757806349bd5a5e146108c757806349df728c146108e75780634a5d2fb01461090757600080fd5b806322b5accc1161048e5780632d0eeb4f116104475780632d0eeb4f146107ba5780632ecaf675146107da578063313ce567146107f057806332df49641461080c57806334f6ebf51461082c578063395093511461085157600080fd5b806322b5accc146106f857806323b872dd146107185780632ada85ad146107385780632b14ca561461076e5780632baa3c9e146107845780632bb14e1d146107a457600080fd5b8063144cc26b116104e0578063144cc26b14610635578063155e5ef71461066d5780631694505e1461068d57806316eb28b7146106ad57806318160ddd146106c35780631d933a4a146106d857600080fd5b80630359fea91461052857806306fdde03146105515780630753657614610573578063084a6bff146105e3578063095ea7b31461060557600080fd5b3661052357005b600080fd5b34801561053457600080fd5b5061053e60cf5481565b6040519081526020015b60405180910390f35b34801561055d57600080fd5b50610566611102565b6040516105489190614542565b34801561057f57600080fd5b506105bc61058e366004614575565b60db602052600090815260409020805460018201546002909201546001600160a01b03909116919060ff1683565b604080516001600160a01b0390941684526020840192909252151590820152606001610548565b3480156105ef57600080fd5b506106036105fe366004614575565b611194565b005b34801561061157600080fd5b506106256106203660046145b3565b611208565b6040519015158152602001610548565b34801561064157600080fd5b5060ed54610655906001600160a01b031681565b6040516001600160a01b039091168152602001610548565b34801561067957600080fd5b5060ee54610655906001600160a01b031681565b34801561069957600080fd5b5060ca54610655906001600160a01b031681565b3480156106b957600080fd5b5061053e60eb5481565b3480156106cf57600080fd5b5060355461053e565b3480156106e457600080fd5b506106036106f3366004614575565b611220565b34801561070457600080fd5b506106036107133660046145df565b61128e565b34801561072457600080fd5b506106256107333660046145fc565b611322565b34801561074457600080fd5b506106556107533660046145df565b60e0602052600090815260409020546001600160a01b031681565b34801561077a57600080fd5b5061053e60d05481565b34801561079057600080fd5b5061060361079f3660046145df565b6113e1565b3480156107b057600080fd5b5061053e60cd5481565b3480156107c657600080fd5b506106036107d5366004614656565b611481565b3480156107e657600080fd5b5061053e60f55481565b3480156107fc57600080fd5b5060405160128152602001610548565b34801561081857600080fd5b50610603610827366004614575565b61154c565b34801561083857600080fd5b5060f7546106559061010090046001600160a01b031681565b34801561085d57600080fd5b5061062561086c3660046145b3565b6115f5565b34801561087d57600080fd5b5061060361088c366004614575565b611634565b34801561089d57600080fd5b5061053e60d15481565b3480156108b357600080fd5b506106036108c2366004614698565b6116a2565b3480156108d357600080fd5b5060cb54610655906001600160a01b031681565b3480156108f357600080fd5b506106036109023660046145df565b6117eb565b34801561091357600080fd5b5061053e6109223660046145df565b60e16020526000908152604090205481565b34801561094057600080fd5b5060d55461062590610100900460ff1681565b34801561095f57600080fd5b5061060361096e366004614575565b611964565b34801561097f57600080fd5b5061053e60ce5481565b34801561099557600080fd5b506106036119d1565b3480156109aa57600080fd5b5061053e60d65481565b3480156109c057600080fd5b5060f254610655906001600160a01b031681565b3480156109e057600080fd5b5061053e60f65481565b3480156109f657600080fd5b5060cc54610655906001600160a01b031681565b348015610a1657600080fd5b50610603610a253660046146e2565b611a5f565b348015610a3657600080fd5b50610603610a45366004614575565b611ab4565b348015610a5657600080fd5b50610603610a6536600461471b565b611ae3565b348015610a7657600080fd5b5061053e60e25481565b348015610a8c57600080fd5b5061053e610a9b3660046145df565b611bf9565b348015610aac57600080fd5b5061053e60d35481565b348015610ac257600080fd5b50610603611c14565b348015610ad757600080fd5b50610603611c4a565b348015610aec57600080fd5b50610603610afb366004614575565b611c7c565b348015610b0c57600080fd5b5060c954610655906001600160a01b031681565b348015610b2c57600080fd5b50610603610b3b3660046145df565b611ccc565b348015610b4c57600080fd5b5061053e60e35481565b348015610b6257600080fd5b50610625610b713660046145df565b6001600160a01b0316600090815260da602052604090205460ff1690565b348015610b9b57600080fd5b50610603610baa3660046148f9565b611d5d565b348015610bbb57600080fd5b5061053e60e75481565b348015610bd157600080fd5b50610603610be0366004614575565b61221f565b348015610bf157600080fd5b506065546001600160a01b0316610655565b348015610c0f57600080fd5b50610603610c1e3660046145df565b61224e565b348015610c2f57600080fd5b50610603610c3e3660046145b3565b61234f565b348015610c4f57600080fd5b50610603610c5e3660046149d5565b61239f565b348015610c6f57600080fd5b5061056661247d565b348015610c8457600080fd5b50610603610c93366004614575565b61248c565b348015610ca457600080fd5b5060ed5461062590600160a01b900460ff1681565b348015610cc557600080fd5b50610603610cd43660046146e2565b6124bb565b348015610ce557600080fd5b50610603610cf436600461471b565b6125ae565b348015610d0557600080fd5b5061053e60e65481565b348015610d1b57600080fd5b50610625610d2a3660046145df565b60d76020526000908152604090205460ff1681565b348015610d4b57600080fd5b50610603610d5a3660046145df565b6126c4565b348015610d6b57600080fd5b5060ea54610655906001600160a01b031681565b348015610d8b57600080fd5b5061053e60e55481565b348015610da157600080fd5b5060f054610655906001600160a01b031681565b348015610dc157600080fd5b50610625610dd03660046145b3565b61273b565b348015610de157600080fd5b5060ec54610655906001600160a01b031681565b348015610e0157600080fd5b5061053e60e45481565b348015610e1757600080fd5b50610603610e26366004614575565b6127d8565b348015610e3757600080fd5b50610625610e463660046145b3565b6128d7565b348015610e5757600080fd5b50610603612974565b348015610e6c57600080fd5b50610603610e7b366004614575565b612b34565b348015610e8c57600080fd5b50610603612b63565b348015610ea157600080fd5b50610603610eb0366004614a4a565b612c3e565b348015610ec157600080fd5b50610625610ed03660046145df565b60d96020526000908152604090205460ff1681565b348015610ef157600080fd5b50610603610f00366004614adf565b612d0c565b348015610f1157600080fd5b50610603612d50565b348015610f2657600080fd5b5060f7546106259060ff1681565b348015610f4057600080fd5b50610603610f4f3660046146e2565b612dd0565b348015610f6057600080fd5b5060e854610655906001600160a01b031681565b348015610f8057600080fd5b50610603612e25565b348015610f9557600080fd5b50610603610fa43660046146e2565b612f01565b348015610fb557600080fd5b5061053e610fc4366004614afc565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b348015610ffb57600080fd5b5061060361100a3660046145b3565b612f56565b34801561101b57600080fd5b5060ef5461062590600160a01b900460ff1681565b34801561103c57600080fd5b5061053e60d25481565b34801561105257600080fd5b506106036110613660046145df565b612fd0565b34801561107257600080fd5b5061053e60e95481565b34801561108857600080fd5b5061053e60d45481565b34801561109e57600080fd5b5060f154610655906001600160a01b031681565b3480156110be57600080fd5b5060ef54610655906001600160a01b031681565b3480156110de57600080fd5b506106256110ed3660046145df565b60d86020526000908152604090205460ff1681565b60606036805461111190614b2a565b80601f016020809104026020016040519081016040528092919081815260200182805461113d90614b2a565b801561118a5780601f1061115f5761010080835404028352916020019161118a565b820191906000526020600020905b81548152906001019060200180831161116d57829003601f168201915b5050505050905090565b6065546001600160a01b031633146111c75760405162461bcd60e51b81526004016111be90614b65565b60405180910390fd5b606581106112035760405162461bcd60e51b8152602060048201526009602482015268056414c55453e3130360bc1b60448201526064016111be565b60cd55565b60003361121681858561306b565b5060019392505050565b6065546001600160a01b0316331461124a5760405162461bcd60e51b81526004016111be90614b65565b6107d1811061126b5760405162461bcd60e51b81526004016111be90614b9a565b8060d05460d25461127c9190614bd4565b6112869190614beb565b60d25560d055565b6065546001600160a01b031633146112b85760405162461bcd60e51b81526004016111be90614b65565b6001600160a01b0381166113005760405162461bcd60e51b815260206004820152600f60248201526e414444524553535f49535f5a45524f60881b60448201526064016111be565b60f080546001600160a01b0319166001600160a01b0392909216919091179055565b60f75460009084908490849060ff16156113be5760f75461010090046001600160a01b031663379f5c69336040516001600160e01b031960e084901b1681526001600160a01b0391821660048201528187166024820152908516604482015260648101849052608401600060405180830381600087803b1580156113a557600080fd5b505af11580156113b9573d6000803e3d6000fd5b505050505b6113c987338761318f565b6113d4878787613221565b5060019695505050505050565b6065546001600160a01b0316331461140b5760405162461bcd60e51b81526004016111be90614b65565b60f1546001600160a01b038281169116141561145f5760405162461bcd60e51b81526020600482015260136024820152724c45524332305f53414d455f4144445245535360681b60448201526064016111be565b60f180546001600160a01b0319166001600160a01b0392909216919091179055565b6065546001600160a01b031633146114ab5760405162461bcd60e51b81526004016111be90614b65565b60dc8054600090815260db602052604080822080546001600160a01b0319166001600160a01b03881617905582548252808220600101859055825482528120600201805460ff19168415151790558154919061150683614c03565b91905055508160dd600082825461151d9190614beb565b9091555081905061152f576000611531565b815b60de60008282546115429190614beb565b9091555050505050565b6065546001600160a01b031633146115765760405162461bcd60e51b81526004016111be90614b65565b6103e981106115b45760405162461bcd60e51b815260206004820152600a602482015269056414c55453e313030360b41b60448201526064016111be565b8060e25460d3546115c59190614bd4565b6115cf9190614beb565b60d35560e25460d25482916115e391614bd4565b6115ed9190614beb565b60d25560e255565b3360008181526034602090815260408083206001600160a01b0387168452909152812054909190611216908290869061162f908790614beb565b61306b565b6065546001600160a01b0316331461165e5760405162461bcd60e51b81526004016111be90614b65565b6107d1811061167f5760405162461bcd60e51b81526004016111be90614b9a565b8060d15460d3546116909190614bd4565b61169a9190614beb565b60d35560d155565b6065546001600160a01b031633146116cc5760405162461bcd60e51b81526004016111be90614b65565b60dc54841061170a5760405162461bcd60e51b815260206004820152600a6024820152691253959053125117d25160b21b60448201526064016111be565b600084815260db602052604090206001015460dd54839161172a91614bd4565b6117349190614beb565b60dd55600084815260db602052604090206002015460ff1661175757600061176a565b600084815260db60205260409020600101545b60de600082825461177b9190614bd4565b9091555081905061178d57600061178f565b815b60de60008282546117a09190614beb565b9091555050600093845260db602052604090932080546001600160a01b0319166001600160a01b03939093169290921782556001820155600201805460ff1916911515919091179055565b6002609754141561183e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016111be565b600260975533600090815260d7602052604090205460ff1615156001148061187057506065546001600160a01b031633145b61188c5760405162461bcd60e51b81526004016111be90614c1e565b60cc546001600160a01b03166118d75760405162461bcd60e51b815260206004820152601060248201526f1514915054d5549657d393d517d4d15560821b60448201526064016111be565b60cc546040516370a0823160e01b815230600482015261195c916001600160a01b0390811691908416906370a0823190602401602060405180830381865afa158015611927573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061194b9190614c45565b6001600160a01b03841691906135f4565b506001609755565b6065546001600160a01b0316331461198e5760405162461bcd60e51b81526004016111be90614b65565b6103e981106119cc5760405162461bcd60e51b815260206004820152600a602482015269056414c55453e313030360b41b60448201526064016111be565b60e955565b60f2546001600160a01b0316336001600160a01b031614611a045760405162461bcd60e51b81526004016111be90614c5e565b60f75460ff1615611a4b5760405162461bcd60e51b81526020600482015260116024820152702622a92199182fa0a62922a0a22cafa7a760791b60448201526064016111be565b600060f65560f7805460ff19166001179055565b6065546001600160a01b03163314611a895760405162461bcd60e51b81526004016111be90614b65565b6001600160a01b0391909116600090815260da60205260409020805460ff1916911515919091179055565b6065546001600160a01b03163314611ade5760405162461bcd60e51b81526004016111be90614b65565b60d655565b6065546001600160a01b03163314611b0d5760405162461bcd60e51b81526004016111be90614b65565b6001600160a01b038316611b525760405162461bcd60e51b815260206004820152600c60248201526b504149525f49535f5a45524f60a01b60448201526064016111be565b6001600160a01b038216611b995760405162461bcd60e51b815260206004820152600e60248201526d524f555445525f49535f5a45524f60901b60448201526064016111be565b60ee80546001600160a01b039485166001600160a01b03199182161790915560ef805493909416921682178355600091825260da6020526040909120805460ff191660011790558154901515600160a01b0260ff60a01b19909116179055565b6001600160a01b031660009081526033602052604090205490565b6065546001600160a01b03163314611c3e5760405162461bcd60e51b81526004016111be90614b65565b611c486000613646565b565b6065546001600160a01b03163314611c745760405162461bcd60e51b81526004016111be90614b65565b611c48613698565b6065546001600160a01b03163314611ca65760405162461bcd60e51b81526004016111be90614b65565b6107d18110611cc75760405162461bcd60e51b81526004016111be90614b9a565b60ce55565b6065546001600160a01b03163314611cf65760405162461bcd60e51b81526004016111be90614b65565b6001600160a01b038116611d3b5760405162461bcd60e51b815260206004820152600c60248201526b0414444524553535f49535f360a41b60448201526064016111be565b60cc80546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff16611d785760005460ff1615611d7c565b303b155b611ddf5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016111be565b600054610100900460ff16158015611e01576000805461ffff19166101011790555b6001600160a01b038b16611e475760405162461bcd60e51b815260206004820152600d60248201526c054524541535552595f49535f3609c1b60448201526064016111be565b88518a51148015611e59575087518951145b611e9e5760405162461bcd60e51b8152602060048201526016602482015275082a4a482b2be988a9c8ea890be9a92a6a89a82a886960531b60448201526064016111be565b6107d18410611edf5760405162461bcd60e51b815260206004820152600d60248201526c053454c4c4645455f3e3230303609c1b60448201526064016111be565b6107d18310611f1f5760405162461bcd60e51b815260206004820152600c60248201526b04255594645455f3e323030360a41b60448201526064016111be565b611f63604051806040016040528060058152602001644d494e442b60d81b815250604051806040016040528060058152602001644d494e442b60d81b815250613a13565b611f6b613a48565b60005b8a5181101561213d578a8181518110611f8957611f89614c95565b602002602001015160db600060dc54815260200190815260200160002060000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550898181518110611fdf57611fdf614c95565b602002602001015160db600060dc5481526020019081526020016000206001018190555088818151811061201557612015614c95565b60209081029190910181015160dc8054600090815260db90935260408320600201805460ff19169215159290921790915580549161205283614c03565b919050555089818151811061206957612069614c95565b602002602001015160dd60008282546120829190614beb565b9250508190555088818151811061209b5761209b614c95565b60200260200101516120ae5760006120c9565b8981815181106120c0576120c0614c95565b60200260200101515b60de60008282546120da9190614beb565b92505081905550600160da60008d84815181106120f9576120f9614c95565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061213581614c03565b915050611f6e565b5060cc80546001600160a01b0319166001600160a01b038d1690811790915560cd87905560ce86905560d085905560d184905560d384905560d285905561218f906acecb8f27f4200f3a000000613a77565b600087116121ce5760405162461bcd60e51b815260206004820152600c60248201526b535741505f49535f5a45524f60a01b60448201526064016111be565b6121e087670de0b6b3a7640000614cab565b60d65560d5805461ff0019166101008415150217905560f7805460ff191690558015612212576000805461ff00191690555b5050505050505050505050565b6065546001600160a01b031633146122495760405162461bcd60e51b81526004016111be90614b65565b60d455565b6065546001600160a01b031633146122785760405162461bcd60e51b81526004016111be90614b65565b6001600160a01b0381166122ce5760405162461bcd60e51b815260206004820152601960248201527f4c45524332305f434f4e54524f4c4c45525f49535f5a45524f0000000000000060448201526064016111be565b60f7546001600160a01b038281166101009092041614156123275760405162461bcd60e51b81526020600482015260136024820152724c45524332305f53414d455f4144445245535360681b60448201526064016111be565b60f780546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b6065546001600160a01b031633146123795760405162461bcd60e51b81526004016111be90614b65565b60f380546001600160a01b0319166001600160a01b03939093169290921790915560f455565b60f75461010090046001600160a01b0316336001600160a01b0316146124075760405162461bcd60e51b815260206004820152601c60248201527f4c45524332305f4e4f545f4c4f53534c4553535f434f4e54524143540000000060448201526064016111be565b60005b8181101561247857600083838381811061242657612426614c95565b905060200201602081019061243b91906145df565b90506124658160f760019054906101000a90046001600160a01b031661246084611bf9565b613221565b508061247081614c03565b91505061240a565b505050565b60606037805461111190614b2a565b6065546001600160a01b031633146124b65760405162461bcd60e51b81526004016111be90614b65565b60e555565b6065546001600160a01b031633146124e55760405162461bcd60e51b81526004016111be90614b65565b6001600160a01b038216600090815260d9602052604090205460ff16151581151514156125465760405162461bcd60e51b815260206004820152600f60248201526e10535357d053149150511657d4d155608a1b60448201526064016111be565b6001600160a01b038216600081815260d960209081526040808320805486151560ff19918216811790925560da90935281842080549093168117909255519092917fffa9187bf1f18bf477bd0ea1bcbb64e93b6a98132473929edfce215cd9b16fab91a35050565b6065546001600160a01b031633146125d85760405162461bcd60e51b81526004016111be90614b65565b6001600160a01b03831661261d5760405162461bcd60e51b815260206004820152600c60248201526b504149525f49535f5a45524f60a01b60448201526064016111be565b6001600160a01b0382166126645760405162461bcd60e51b815260206004820152600e60248201526d524f555445525f49535f5a45524f60901b60448201526064016111be565b60ec80546001600160a01b039485166001600160a01b03199182161790915560ed805493909416921682178355600091825260da6020526040909120805460ff191660011790558154901515600160a01b0260ff60a01b19909116179055565b336001600160a01b038216141561270c5760405162461bcd60e51b815260206004820152600c60248201526b53414d455f4144445245535360a01b60448201526064016111be565b33600090815260e06020526040902080546001600160a01b0319166001600160a01b0392909216919091179055565b3360008181526034602090815260408083206001600160a01b0387168452909152812054909190838110156127c05760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016111be565b6127cd828686840361306b565b506001949350505050565b33600090815260d7602052604090205460ff1615156001148061280557506065546001600160a01b031633145b6128215760405162461bcd60e51b81526004016111be90614c1e565b600060cf5411801561283557508060cf5410155b6128785760405162461bcd60e51b8152602060048201526014602482015273494e53554646494349454e545f5245574152445360601b60448201526064016111be565b8060cf600082825461288a9190614bd4565b909155505060cc546128a79030906001600160a01b031683613221565b604051819030907f220131c2c88fd7938d05e300783e01c9270654985ad47cd761a1a78aa55d8c3290600090a350565b60f7546000908390839060ff16156129695760f75461010090046001600160a01b0316631ffb811f336040516001600160e01b031960e084901b1681526001600160a01b039182166004820152908516602482015260448101849052606401600060405180830381600087803b15801561295057600080fd5b505af1158015612964573d6000803e3d6000fd5b505050505b6127cd338686613221565b600260975414156129c75760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016111be565b600260975533600090815260d7602052604090205460ff161515600114806129f957506065546001600160a01b031633145b612a155760405162461bcd60e51b81526004016111be90614c1e565b60cc546001600160a01b0316612a605760405162461bcd60e51b815260206004820152601060248201526f1514915054d5549657d393d517d4d15560821b60448201526064016111be565b60cc5460405147916000916001600160a01b039091169083908381818185875af1925050503d8060008114612ab1576040519150601f19603f3d011682016040523d82523d6000602084013e612ab6565b606091505b5050905080612afe5760405162461bcd60e51b81526020600482015260146024820152734641494c45445f53454e44494e475f46554e445360601b60448201526064016111be565b604051829033907ffbd782bf775015428374a2a3913122e400bb832b03851d2749d8a2ed3d4c41e190600090a350506001609755565b6065546001600160a01b03163314612b5e5760405162461bcd60e51b81526004016111be90614b65565b60e655565b60f2546001600160a01b0316336001600160a01b031614612b965760405162461bcd60e51b81526004016111be90614c5e565b60f654612bdb5760405162461bcd60e51b815260206004820152601360248201527213115490cc8c17d393d517d41493d413d4d151606a1b60448201526064016111be565b4260f6541115612c2d5760405162461bcd60e51b815260206004820152601b60248201527f4c45524332305f54494d454c4f434b5f494e5f50524f4752455353000000000060448201526064016111be565b60f7805460ff19169055600060f655565b60f3546001600160a01b0316336001600160a01b031614612c985760405162461bcd60e51b81526020600482015260146024820152734c45524332305f4e4f545f43414e44494441544560601b60448201526064016111be565b60f4548151602083012014612ce45760405162461bcd60e51b81526020600482015260126024820152714c45524332305f494e56414c49445f4b455960701b60448201526064016111be565b5060f3805460f280546001600160a01b03199081166001600160a01b03841617909155169055565b6065546001600160a01b03163314612d365760405162461bcd60e51b81526004016111be90614b65565b60d580549115156101000261ff0019909216919091179055565b6065546001600160a01b03163314612d7a5760405162461bcd60e51b81526004016111be90614b65565b60df5460ff16151560011415612dc15760405162461bcd60e51b815260206004820152600c60248201526b20a62922a0a22cafa7a822a760a11b60448201526064016111be565b60df805460ff19166001179055565b6065546001600160a01b03163314612dfa5760405162461bcd60e51b81526004016111be90614b65565b6001600160a01b0391909116600090815260d760205260409020805460ff1916911515919091179055565b60f2546001600160a01b0316336001600160a01b031614612e585760405162461bcd60e51b81526004016111be90614c5e565b60f65415612ea85760405162461bcd60e51b815260206004820152601760248201527f4c45524332305f414c52454144595f50524f504f53454400000000000000000060448201526064016111be565b60f75460ff16612eef5760405162461bcd60e51b81526020600482015260126024820152712622a92199182fa0a62922a0a22cafa7a32360711b60448201526064016111be565b60f554612efc9042614beb565b60f655565b6065546001600160a01b03163314612f2b5760405162461bcd60e51b81526004016111be90614b65565b6001600160a01b0391909116600090815260d860205260409020805460ff1916911515919091179055565b33600090815260d7602052604090205460ff16151560011480612f8357506065546001600160a01b031633145b612f9f5760405162461bcd60e51b81526004016111be90614c1e565b6001600160a01b038216600090815260e1602052604081208054839290612fc7908490614beb565b90915550505050565b6065546001600160a01b03163314612ffa5760405162461bcd60e51b81526004016111be90614b65565b6001600160a01b03811661305f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016111be565b61306881613646565b50565b6001600160a01b0383166130cd5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016111be565b6001600160a01b03821661312e5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016111be565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03838116600090815260346020908152604080832093861683529290522054600019811461321b578181101561320e5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016111be565b61321b848484840361306b565b50505050565b60df5460ff168061323f57506065546001600160a01b038481169116145b8061325757506065546001600160a01b038381169116145b8061327a57506001600160a01b038316600090815260d7602052604090205460ff165b8061329d57506001600160a01b038216600090815260d7602052604090205460ff165b6132d45760405162461bcd60e51b81526020600482015260086024820152672727aa2fa7a822a760c11b60448201526064016111be565b6001600160a01b0383166133195760405162461bcd60e51b815260206004820152600c60248201526b46524f4d5f49535f5a45524f60a01b60448201526064016111be565b6001600160a01b03821661335c5760405162461bcd60e51b815260206004820152600a602482015269544f5f49535f5a45524f60b01b60448201526064016111be565b6065546001600160a01b038481169116148061338557506065546001600160a01b038381169116145b806133cd57506001600160a01b038316600090815260d8602052604090205460ff161580156133cd57506001600160a01b038216600090815260d8602052604090205460ff16155b6134075760405162461bcd60e51b815260206004820152600b60248201526a10931050d2d31254d5115160aa1b60448201526064016111be565b6001600160a01b038316600090815260da602052604081205481908190849060ff1615801561344e57506001600160a01b038616600090815260d9602052604090205460ff165b156135175760d0546001600160a01b03808916600090815260e0602052604081205460cf549397509091169450600193509061348930611bf9565b116134955760006134ab565b60cf546134a130611bf9565b6134ab9190614bd4565b60d654909150811080159081906134c9575060d554610100900460ff165b80156134d8575060d55460ff16155b80156134ef57506065546001600160a01b03163314155b156135145760d5805460ff19166001179055613509613698565b60d5805460ff191690555b50505b6001600160a01b038616600090815260da602052604090205460ff1615801561355857506001600160a01b038716600090815260d9602052604090205460ff165b156135855760d1546001600160a01b03808816600090815260e06020526040902054919550169250600191505b83156135bf57600061271061359a8688614cab565b6135a49190614cca565b90506135b08183614bd4565b91506135bd883083613b56565b505b81156135e0576135d387848760e254613d24565b6135dd9082614bd4565b90505b6135eb878783613b56565b50505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052612478908490613d9e565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600060cf546136a630611bf9565b116136b25760006136c8565b60cf546136be30611bf9565b6136c89190614bd4565b9050600061271060cd54836136dd9190614cab565b6136e79190614cca565b9050600061271060d454836136fc9190614cab565b6137069190614cca565b9050600061271060ce548561371b9190614cab565b6137259190614cca565b90506000613734600283614cca565b90506000826137438688614bd4565b61374d9190614bd4565b905060008060dd541161376157600061377b565b60dd5460de546137719084614cab565b61377b9190614cca565b905060008161378a8588614beb565b6137949190614beb565b905060006137a182613e70565b905081156137c7576137c785836137b88285614cab565b6137c29190614cca565b613e8d565b60008083116137d75760006137ec565b826137e28584614cab565b6137ec9190614cca565b9050806137f98587614bd4565b9550600060de5460dd5461380d9190614bd4565b90508660005b60dc548110156139ca57600081815260db602052604090206002015460ff161561393a5760008060de5411613849576000613872565b60de54600083815260db60205260409020600101546138689088614cab565b6138729190614cca565b90508481116138815780613883565b845b600083815260db602052604080822054905192935090916001600160a01b039091169083908381818185875af1925050503d80600081146138e0576040519150601f19603f3d011682016040523d82523d6000602084013e6138e5565b606091505b50509050806139275760405162461bcd60e51b815260206004820152600e60248201526d11905253115117d513d7d4d1539160921b60448201526064016111be565b6139318287614bd4565b955050506139b8565b600080841161394a576000613972565b600082815260db60205260409020600101548490613968908c614cab565b6139729190614cca565b90508281116139815780613983565b825b600083815260db60205260409020549091506139aa9030906001600160a01b031683613b56565b6139b48184614bd4565b9250505b806139c281614c03565b915050613813565b506139d430611bf9565b60cf556040518d9033907ff0dc54722eaab17e6bbde4267f8f4f624f2b162091f1618d9167b020bd7e3f7f90600090a350505050505050505050505050565b600054610100900460ff16613a3a5760405162461bcd60e51b81526004016111be90614cec565b613a448282613f95565b5050565b600054610100900460ff16613a6f5760405162461bcd60e51b81526004016111be90614cec565b611c48613fe3565b6001600160a01b038216613acd5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016111be565b8060356000828254613adf9190614beb565b90915550506001600160a01b03821660009081526033602052604081208054839290613b0c908490614beb565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b038316613bba5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016111be565b6001600160a01b038216613c1c5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016111be565b6001600160a01b03831660009081526033602052604090205481811015613c945760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016111be565b6001600160a01b03808516600090815260336020526040808220858503905591851681529081208054849290613ccb908490614beb565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051613d1791815260200190565b60405180910390a361321b565b600081613d3357506000613d96565b613d3c84614013565b9350612710613d4b8385614cab565b613d559190614cca565b90508015613d96576001600160a01b038416600090815260e1602052604081208054839290613d85908490614beb565b90915550613d969050858583613b56565b949350505050565b6000613df3826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166140bf9092919063ffffffff16565b8051909150156124785780806020019051810190613e119190614d37565b6124785760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016111be565b600047613e7c836140ce565b613e868147614bd4565b9392505050565b811580613e98575080155b15613ea1575050565b60ef54613eb99030906001600160a01b03168461306b565b60ef54600160a01b900460ff1615613f555760ef5460cc54604051637c8d9fb960e11b81526001600160a01b039283169263f91b3f72928592613f0b9230928992600092839216904290600401614d54565b60606040518083038185885af1158015613f29573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190613f4e9190614d8f565b5050505050565b60ef5460cc5460405163f305d71960e01b81526001600160a01b039283169263f305d719928592613f0b9230928992600092839216904290600401614d54565b600054610100900460ff16613fbc5760405162461bcd60e51b81526004016111be90614cec565b8151613fcf90603690602085019061447d565b50805161247890603790602084019061447d565b600054610100900460ff1661400a5760405162461bcd60e51b81526004016111be90614cec565b611c4833613646565b60006001600160a01b0382161580614034575060e55461403283611bf9565b105b806140ad575060e65460f0546040516370a0823160e01b81526001600160a01b038581166004830152909116906370a0823190602401602060405180830381865afa158015614087573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140ab9190614c45565b105b6140b757816140b9565b305b92915050565b6060613d968484600085614313565b604080516002808252606082018352600092602083019080368337019050509050308160008151811061410357614103614c95565b6001600160a01b039092166020928302919091019091015260ed5460ff600160a01b909104166141a95760ed60009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015614180573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141a49190614dbd565b614220565b60ed60009054906101000a90046001600160a01b03166001600160a01b03166373b295c26040518163ffffffff1660e01b8152600401602060405180830381865afa1580156141fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142209190614dbd565b8160018151811061423357614233614c95565b6001600160a01b03928316602091820292909201015260ed54614259913091168461306b565b60ed54600160a01b900460ff16156142da5760ed54604051633b158ab160e11b81526001600160a01b039091169063762b1562906142a4908590600090869030904290600401614dda565b600060405180830381600087803b1580156142be57600080fd5b505af11580156142d2573d6000803e3d6000fd5b505050505050565b60ed5460405163791ac94760e01b81526001600160a01b039091169063791ac947906142a4908590600090869030904290600401614dda565b6060824710156143745760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016111be565b6001600160a01b0385163b6143cb5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016111be565b600080866001600160a01b031685876040516143e79190614e4b565b60006040518083038185875af1925050503d8060008114614424576040519150601f19603f3d011682016040523d82523d6000602084013e614429565b606091505b5091509150614439828286614444565b979650505050505050565b60608315614453575081613e86565b8251156144635782518084602001fd5b8160405162461bcd60e51b81526004016111be9190614542565b82805461448990614b2a565b90600052602060002090601f0160209004810192826144ab57600085556144f1565b82601f106144c457805160ff19168380011785556144f1565b828001600101855582156144f1579182015b828111156144f15782518255916020019190600101906144d6565b506144fd929150614501565b5090565b5b808211156144fd5760008155600101614502565b60005b83811015614531578181015183820152602001614519565b8381111561321b5750506000910152565b6020815260008251806020840152614561816040850160208701614516565b601f01601f19169190910160400192915050565b60006020828403121561458757600080fd5b5035919050565b6001600160a01b038116811461306857600080fd5b80356145ae8161458e565b919050565b600080604083850312156145c657600080fd5b82356145d18161458e565b946020939093013593505050565b6000602082840312156145f157600080fd5b8135613e868161458e565b60008060006060848603121561461157600080fd5b833561461c8161458e565b9250602084013561462c8161458e565b929592945050506040919091013590565b801515811461306857600080fd5b80356145ae8161463d565b60008060006060848603121561466b57600080fd5b83356146768161458e565b925060208401359150604084013561468d8161463d565b809150509250925092565b600080600080608085870312156146ae57600080fd5b8435935060208501356146c08161458e565b92506040850135915060608501356146d78161463d565b939692955090935050565b600080604083850312156146f557600080fd5b82356147008161458e565b915060208301356147108161463d565b809150509250929050565b60008060006060848603121561473057600080fd5b833561473b8161458e565b9250602084013561474b8161458e565b9150604084013561468d8161463d565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561479a5761479a61475b565b604052919050565b600067ffffffffffffffff8211156147bc576147bc61475b565b5060051b60200190565b600082601f8301126147d757600080fd5b813560206147ec6147e7836147a2565b614771565b82815260059290921b8401810191818101908684111561480b57600080fd5b8286015b8481101561482f5780356148228161458e565b835291830191830161480f565b509695505050505050565b600082601f83011261484b57600080fd5b8135602061485b6147e7836147a2565b82815260059290921b8401810191818101908684111561487a57600080fd5b8286015b8481101561482f578035835291830191830161487e565b600082601f8301126148a657600080fd5b813560206148b66147e7836147a2565b82815260059290921b840181019181810190868411156148d557600080fd5b8286015b8481101561482f5780356148ec8161463d565b83529183019183016148d9565b6000806000806000806000806000806101408b8d03121561491957600080fd5b6149228b6145a3565b995060208b013567ffffffffffffffff8082111561493f57600080fd5b61494b8e838f016147c6565b9a5060408d013591508082111561496157600080fd5b61496d8e838f0161483a565b995060608d013591508082111561498357600080fd5b506149908d828e01614895565b97505060808b0135955060a08b0135945060c08b0135935060e08b013592506101008b013591506149c46101208c0161464b565b90509295989b9194979a5092959850565b600080602083850312156149e857600080fd5b823567ffffffffffffffff80821115614a0057600080fd5b818501915085601f830112614a1457600080fd5b813581811115614a2357600080fd5b8660208260051b8501011115614a3857600080fd5b60209290920196919550909350505050565b60006020808385031215614a5d57600080fd5b823567ffffffffffffffff80821115614a7557600080fd5b818501915085601f830112614a8957600080fd5b813581811115614a9b57614a9b61475b565b614aad601f8201601f19168501614771565b91508082528684828501011115614ac357600080fd5b8084840185840137600090820190930192909252509392505050565b600060208284031215614af157600080fd5b8135613e868161463d565b60008060408385031215614b0f57600080fd5b8235614b1a8161458e565b915060208301356147108161458e565b600181811c90821680614b3e57607f821691505b60208210811415614b5f57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600a9082015269056414c55453e323030360b41b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600082821015614be657614be6614bbe565b500390565b60008219821115614bfe57614bfe614bbe565b500190565b6000600019821415614c1757614c17614bbe565b5060010190565b6020808252600d908201526c13d3931657d054141493d59151609a1b604082015260600190565b600060208284031215614c5757600080fd5b5051919050565b60208082526019908201527f4c45524332305f4e4f545f5245434f564552595f41444d494e00000000000000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000816000190483118215151615614cc557614cc5614bbe565b500290565b600082614ce757634e487b7160e01b600052601260045260246000fd5b500490565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600060208284031215614d4957600080fd5b8151613e868161463d565b6001600160a01b039687168152602081019590955260408501939093526060840191909152909216608082015260a081019190915260c00190565b600080600060608486031215614da457600080fd5b8351925060208401519150604084015190509250925092565b600060208284031215614dcf57600080fd5b8151613e868161458e565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015614e2a5784516001600160a01b031683529383019391830191600101614e05565b50506001600160a01b03969096166060850152505050608001529392505050565b60008251614e5d818460208701614516565b919091019291505056fea26469706673582212205b4fec1c60ee59d31708cb538fef97ecb3c20fbc25b396bdc23a72cb23b79eaf64736f6c634300080b0033

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