ETH Price: $3,448.76 (+4.15%)

Contract

0x48e06D732f8F1bC4644B0B195A115D5d5a8CE8C9
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60a06040191209192024-01-30 17:49:23301 days ago1706636963IN
 Create: XPERP
0 ETH0.1218668635.03559403

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
XPERP

Compiler Version
v0.8.21+commit.d9974bed

Optimization Enabled:
Yes with 300 runs

Other Settings:
paris EvmVersion
File 1 of 26 : XPERP.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.21;

//  xperp Token
//   ____  _____ ____  ____
//   __  _|  _ \| ____|  _ \|  _ \
//   \ \/ / |_) |  _| | |_) | |_) |
//    >  <|  __/| |___|  _ <|  __/
//   /_/\_\_|   |_____|_| \_\_|
// Go long or short with leverage on @friendtech keys via Telegram
// =====================================
// https://twitter.com/xperptech
// https://xperp.tech
// =====================================
// - Tokenomics: 35% in LP, 10% to Team, 5% to Collateral Partners, 49% for future airdrops
// - Partnership: 1% has been sold to Handz of Gods.
// - Supply: 1M tokens
// - Tax: 3.5% tax on xperp traded (1.5% to revenue share, 2% to team and operating expenses).
// - Revenue Sharing: 30% of trading revenue goes to holders.
// - Eligibility: Holders of xperp tokens are entitled to revenue sharing.

import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";

import "@oz-upgradeable/access/extensions/AccessControlEnumerableUpgradeable.sol";
import "@oz-upgradeable/utils/PausableUpgradeable.sol";
import "@oz-upgradeable/proxy/utils/UUPSUpgradeable.sol";
import "@oz-upgradeable/utils/ReentrancyGuardUpgradeable.sol";
import "@oz-upgradeable/token/ERC20/ERC20Upgradeable.sol";

contract XPERP is ERC20Upgradeable, PausableUpgradeable, AccessControlEnumerableUpgradeable, ReentrancyGuardUpgradeable, UUPSUpgradeable {

    // 1 Million is totalsuppy
    uint256 public constant oneMillion = 1_000_000 * 1 ether;
    // precision mitigation value, 100x100
    uint256 public constant hundredPercent = 10_000;
    IUniswapV2Router02 public constant uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);

    // 1% of total supply, max tranfer amount possible
    uint256 public walletBalanceLimit;
    uint256 public sellLimit;

    // Taxation
    uint256 public totalTax;
    uint256 public teamWalletTax;
    bool public isTaxActive;

    // Claiming vs Airdropping
    bool public isAirDropActive;

    // address of the uniswap pair
    address public uniswapV2Pair;

    // team wallet
    address payable public teamWallet;

    /// @dev Enable trading on Uniswap
    bool public isTradingEnabled;

    // total swap tax collected, completely distributed among token holders, for analytical purposes only
    uint256 public swapTaxCollectedTotalXPERP;

    // revenue sharing tax collected for the distribution in the current snapshot (total tax less liquidity shares)
    uint256 public revShareAndTeamCurrentEpochXPERP;

    // revenue sharing tax collected, completely distributed among token holders, for analytical purposes only
    uint256 public tradingRevenueDistributedTotalETH;

    // Revenue sharing distribution info, 1 is the first epoch.
    struct EpochInfo {
        // Snapshot time
        uint256 epochTimestamp;
        // Snapshot supply
        uint256 epochCirculatingSupply;
        // ETH collected for rewards for re-investors
        uint256 epochRevenueFromSwapTaxCollectedXPERP;
        // Same in ETH
        uint256 epochSwapRevenueETH;
        // Injected 30% revenue from trading
        uint256 epochTradingRevenueETH;
        // Used to calculate holder balances at the time of snapshot
        mapping(address => uint256) depositedInEpoch;
        mapping(address => uint256) withdrawnInEpoch;
    }

    // Epochs array, each epoch contains the snapshot info,
    // 1 is the first epoch,
    // the current value (length-1) is the epoch currently in progress - not snapshotted yet
    // the previous value (length-2) is the last snapshotted epoch
    EpochInfo[] public epochs;

    // Claimed Epochs
    mapping(address => uint256) public lastClaimedEpochs;

    // ========== Events ==========
    event TradingOnUniSwapEnabled();
    event TradingOnUniSwapDisabled();
    event Snapshot(uint256 epoch, uint256 circulatingSupply, uint256 swapTaxCollected, uint256 tradingRevenueCollected);
    event SwappedToEth(uint256 amount, uint256 ethAmount);
    event SwappedToXperp(uint256 amount, uint256 ethAmount);
    event Claimed(address indexed user, uint256 amount);
    event ClaimedBot(address indexed user, uint256 amount);
    event ReceivedEther(address indexed from, uint256 amount);
    event TaxChanged(uint256 tax, uint256 teamWalletTax);
    event TaxActiveChanged(bool isActive);
    event WalletBalanceLimitChanged(uint256 walletBalanceLimit, uint256 sellLimit);
    event TeamWalletUpdated(address teamWallet);
    event AirDropToggled(bool isActive);
    event Taxed(address indexed from, uint256 amountXperp);

    // =========== Constants =======
    /// @notice Admin role for upgrading, fees, and paused state
    bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
    /// @notice Snapshot role for taking snapshots
    bytes32 public constant SNAPSHOT_ROLE = keccak256("SNAPSHOT_ROLE");
    /// @notice Rescue role for rescuing tokens and Eth from the contract
    bytes32 public constant RESCUE_ROLE = keccak256("RESCUE_ROLE");
    /// @notice WhiteList role for listing vesting and other addresses that should be excluded from circulaing supply to not lower the revenue share for participants
    bytes32 public constant EXCLUDED_FROM_CIRCULATION_ROLE = keccak256("EXCLUDED_FROM_CIRCULATION_ROLE");
    /// @notice WhiteList role for untaxed transfer for funding, vesting, and airdrops
    bytes32 public constant EXCLUDED_FROM_TAXATION_ROLE = keccak256("EXCLUDED_FROM_TAXATION_ROLE");

    // =========== Errors ==========
    error ZeroAddress();

    // ========== Proxy ==========

    constructor() {
        _disableInitializers();
    }

    function initialize(address payable _teamWallet) public initializer {
        if (_teamWallet == address(0)) revert ZeroAddress();
        __ERC20_init("xperp", "xperp");
        __AccessControlEnumerable_init();
        __Pausable_init();
        __UUPSUpgradeable_init();
        __ReentrancyGuard_init();
        teamWallet = _teamWallet;
        totalTax = 350;
        teamWalletTax = 150;
        isTaxActive = true;
        isTradingEnabled = false;
        walletBalanceLimit = 10_000 * 1 ether;
        sellLimit = 10_000 * 1 ether;
        isAirDropActive = false;

        // Grant admin role to owner
        _setRoleAdmin(DEFAULT_ADMIN_ROLE, DEFAULT_ADMIN_ROLE);
        _setRoleAdmin(ADMIN_ROLE, ADMIN_ROLE);
        _setRoleAdmin(EXCLUDED_FROM_CIRCULATION_ROLE, ADMIN_ROLE);
        _setRoleAdmin(EXCLUDED_FROM_TAXATION_ROLE, ADMIN_ROLE);
        _setRoleAdmin(SNAPSHOT_ROLE, SNAPSHOT_ROLE);
        _setRoleAdmin(RESCUE_ROLE, ADMIN_ROLE);
        _grantRole(ADMIN_ROLE, msg.sender);
        _grantRole(EXCLUDED_FROM_CIRCULATION_ROLE, msg.sender);
        _grantRole(EXCLUDED_FROM_TAXATION_ROLE, msg.sender);
        _grantRole(SNAPSHOT_ROLE, msg.sender);
        _grantRole(RESCUE_ROLE, msg.sender);
        _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);

        epochs.push();
        epochs.push();
        _mint(msg.sender, oneMillion);
    }

    function initPair() public onlyRole(ADMIN_ROLE) {
        uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(
            address(this),
            uniswapV2Router.WETH()
        );
        // approving uniswap router to spend xperp on behalf of the contract
        _approve(address(this), address(uniswapV2Router), type(uint256).max);
    }

    function pause() public onlyRole(ADMIN_ROLE) {
        _pause();
    }

    function unpause() public onlyRole(ADMIN_ROLE) {
        _unpause();
    }

    function _authorizeUpgrade(address newImplementation)
    internal
    override
    onlyRole(DEFAULT_ADMIN_ROLE)
    {}

    // ========== Configuration ==========

    /// @notice This function is used to set tax on transfers to and from the uniswap pair, xperp is swapped to ETH and prepared for snapshot distribution
    /// @param _tax The amount of totalTax to be applied on transfers to and from the U`niswap pair.
    /// @param _teamWalletTax The amount of tax sent to tresure, the rest (_tax - _teamWalletTax) is the holders' revenue share.
    function setTax(uint256 _tax, uint256 _teamWalletTax) external onlyRole(ADMIN_ROLE) {
        require(_tax <= 10000 && _teamWalletTax >= 0 && _teamWalletTax <= 10000, "Invalid tax");
        totalTax = _tax;
        teamWalletTax = _teamWalletTax;
        emit TaxChanged(_tax, _teamWalletTax);
    }

    /// @notice This function is used to enable or disable tax on transfers to and from the uniswap pair
    /// @param _isTaxActive The new boolean value of isTaxActive
    function setTaxActive(bool _isTaxActive) external onlyRole(ADMIN_ROLE) {
        isTaxActive = _isTaxActive;
        emit TaxActiveChanged(_isTaxActive);
    }

    /// This function is used to set the wallet balance limit
    /// @param _walletBalanceLimit The new wallet balance limit, maximum allowed amount of tokens in a wallet, transfers are not prohibited
    function setWalletBalanceLimit(uint256 _walletBalanceLimit) external onlyRole(ADMIN_ROLE) {
        require(_walletBalanceLimit >= 0 && _walletBalanceLimit <= oneMillion, "Invalid wallet balance limit");
        walletBalanceLimit = _walletBalanceLimit;
        emit WalletBalanceLimitChanged(_walletBalanceLimit, sellLimit);
    }

    /// This function is used to set the sell limit
    /// @param _sellLimit The new sell limit, maximum allowed amount of tokens to be sold in a single transaction
    function setSellLimit(uint256 _sellLimit) external onlyRole(ADMIN_ROLE) {
        require(_sellLimit >= 0 && _sellLimit <= oneMillion, "Invalid sell balance limit");
        sellLimit = _sellLimit;
        emit WalletBalanceLimitChanged(walletBalanceLimit, _sellLimit);
    }

    /// @notice This function is used to set the team wallet
    /// @param _teamWallet The new team wallet getting the _teamWalletTax share from the swaps and trading revenue
    function updateTeamWallet(address payable _teamWallet) external onlyRole(ADMIN_ROLE) {
        require(_teamWallet != address(0), "Invalid team wallet");
        teamWallet = _teamWallet;
        emit TeamWalletUpdated(_teamWallet);
    }

    /// @notice This function is used to enable trading on Uniswap
    function EnableTradingOnUniSwap() external onlyRole(ADMIN_ROLE) {
        isTradingEnabled = true;
        emit TradingOnUniSwapEnabled();
    }

    /// @notice This function is used to disable trading on Uniswap
    function DisableTradingOnUniSwap() external onlyRole(ADMIN_ROLE) {
        isTradingEnabled = false;
        emit TradingOnUniSwapDisabled();
    }

    /// @notice Toggles airdrop mode vs claim by holders
    function toggleAirDrop() external onlyRole(SNAPSHOT_ROLE) {
        isAirDropActive = !isAirDropActive;
        emit AirDropToggled(isAirDropActive);
    }

    // ========== ERC20 Overrides ==========
    /// @notice overriden ERC20 transfer to tax on transfers to and from the uniswap pair, xperp is swapped to ETH and prepared for snapshot distribution
    function _update(address from, address to, uint256 amount) internal override {
        bool isTradingTransfer =
            (from == uniswapV2Pair || to == uniswapV2Pair) &&
            msg.sender != address(uniswapV2Router) &&
            from != address(this) && to != address(this) &&
            !hasRole(EXCLUDED_FROM_TAXATION_ROLE, from) && !hasRole(EXCLUDED_FROM_TAXATION_ROLE, to);

        require(isTradingEnabled || !isTradingTransfer, "Trading is not enabled yet");

        // if trading is enabled, only allow transfers to and from the Uniswap pair
        uint256 amountAfterTax = amount;
        // calculate 5% swap tax
        // owner() is an exception to fund the liquidity pair and revenueDistributionBot as well to fund the revenue distribution to holders
        if (isTradingTransfer) {
            require(isTradingEnabled, "Trading is not enabled yet");
            // Buying tokens
            if (from == uniswapV2Pair && walletBalanceLimit > 0) {
                require(balanceOf(to) + amount <= walletBalanceLimit, "Holding amount after buying exceeds maximum allowed tokens.");
            }
            // Selling tokens
            if (to == uniswapV2Pair && sellLimit > 0) {
                require(amount <= sellLimit, "Selling amount exceeds maximum allowed tokens.");
            }
            // 5% total tax on xperp traded (1% to LP, 2% to revenue share, 2% to team and operating expenses).
            if (isTaxActive) {
                uint256 taxAmountXPERP = (amount * totalTax) / hundredPercent;
                _transfer(from, address(this), taxAmountXPERP);
                emit Taxed(from, taxAmountXPERP);
                amountAfterTax -= taxAmountXPERP;
                swapTaxCollectedTotalXPERP += taxAmountXPERP;
                revShareAndTeamCurrentEpochXPERP += taxAmountXPERP;
            }
        }
        uint256 currentEpoch = epochs.length - 1;
        epochs[currentEpoch].depositedInEpoch[to] += amountAfterTax;
        epochs[currentEpoch].withdrawnInEpoch[from] += amount;
        super._update(from, to, amountAfterTax);
    }

    // ========== Revenue Sharing ==========

    /// @notice Function called by the revenue distribution bot to snapshot the state
    function snapshot() external payable onlyRole(SNAPSHOT_ROLE) nonReentrant {
        EpochInfo storage epoch = epochs[epochs.length - 1];
        epoch.epochTimestamp = block.timestamp;
        uint256 _circulatingSupply = circulatingSupply();
        uint256 xperpToSwap = revShareAndTeamCurrentEpochXPERP;

        require(xperpToSwap > 0 || msg.value > 0, "No tax collected yet and no ETH sent");
        require(balanceOf(address(this)) >= xperpToSwap, "Balance less than required");

        uint256 revAndTeamETH = xperpToSwap > 0 ? swapXPERPToETH(xperpToSwap) : 0;
        // 1.5% to team and operating expenses distributed immediately
        uint256 teamWalletTaxAmountETH = (revAndTeamETH * teamWalletTax) / totalTax;
        uint256 epochSwapRevenueETH = revAndTeamETH - teamWalletTaxAmountETH;
        teamWallet.transfer(teamWalletTaxAmountETH);
        // the rest in ETH is kept on the contract for revenue share distribution
        epoch.epochCirculatingSupply = _circulatingSupply;
        epoch.epochTradingRevenueETH = msg.value;
        epoch.epochRevenueFromSwapTaxCollectedXPERP = xperpToSwap;
        epoch.epochSwapRevenueETH = epochSwapRevenueETH;
        emit Snapshot(epochs.length, _circulatingSupply, epochSwapRevenueETH, msg.value);

        epochs.push();
        revShareAndTeamCurrentEpochXPERP = 0;
    }

    /// @notice Function called by the xperp service to claim the revenue share instead of users
    /// @notice The xperp service does the following:
    /// @notice 1- Collects users in the table (tokentrasferevents) and determins all users.
    /// @notice Does steps 2-5 in batches of 1000 users
    /// @notice 2- Calls the getClaimableOfMulti for these users to get their claimable amount.
    /// @notice 3- Saves these amounts to the database (swaprewards) - wallet - amount
    /// @notice 4- Calls the claimBot function to claim the revenue share for these users with the total amount
    /// @notice 5- If successfull records the claim in the database (swaprewards) - wallet - amount - txhash of the claimbot call
    function claimBot(address payable operationalWallet, address[] memory _recipients) public onlyRole(SNAPSHOT_ROLE) nonReentrant {
        for (uint256 i = 0; i < _recipients.length; i++) {
            lastClaimedEpochs[_recipients[i]] = epochs.length - 2;
        }
        uint256 totalAmount = address(this).balance;
        operationalWallet.transfer(totalAmount);
        emit ClaimedBot(operationalWallet, totalAmount);
    }

    // ========== Internal Functions ==========
    function swapXPERPToETH(uint256 _amount) internal returns (uint256) {
        if (_amount == 0) return 0;
        address[] memory path = new address[](2);
        path[0] = address(this);
        path[1] = uniswapV2Router.WETH();
        uint256 initialETHBalance = address(this).balance;
        uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
            _amount,
            0,
            path,
            address(this),
            block.timestamp
        );
        uint256 finalETHBalance = address(this).balance;
        uint256 ETHReceived = finalETHBalance - initialETHBalance;
        emit SwappedToEth(_amount, ETHReceived);
        return ETHReceived;
    }
    // ========== Airdrop ==========

    /// @notice Mass send function, used for airdrops
    function airdrop(
        address[] memory _recipients,
        uint256[] memory _tokenAmounts,
        uint256[] memory _ethAmounts
    )
    external
    payable
    onlyRole(SNAPSHOT_ROLE)
    {
        require(_recipients.length == _tokenAmounts.length && _recipients.length == _ethAmounts.length, "Invalid input lengths");

        uint256 totalTokenAmount = 0;
        uint256 totalEthAmount = 0;

        for (uint256 i = 0; i < _tokenAmounts.length; i++) {
            totalTokenAmount += _tokenAmounts[i];
        }
        for (uint256 j = 0; j < _ethAmounts.length; j++) {
            totalEthAmount += _ethAmounts[j];
        }

        require(balanceOf(msg.sender) >= totalTokenAmount, "Insufficient token balance");
        require(msg.value >= totalEthAmount, "Insufficient Ether sent");

        for (uint256 i = 0; i < _recipients.length; i++) {
            if (_tokenAmounts[i] > 0)
                _transfer(msg.sender, _recipients[i], _tokenAmounts[i]);
            if (_ethAmounts[i] > 0)
                payable(_recipients[i]).transfer(_ethAmounts[i]);
        }
    }

    // ========== Rescue Functions ==========

    function rescueETH(uint256 _weiAmount) external onlyRole(RESCUE_ROLE) {
        payable(msg.sender).transfer(_weiAmount);
    }

    function rescueERC20(address _tokenAdd, uint256 _amount) external onlyRole(RESCUE_ROLE) {
        IERC20(_tokenAdd).transfer(msg.sender, _amount);
    }

    // ========== Fallbacks ==========


    receive() external payable {
        emit ReceivedEther(msg.sender, msg.value);
    }
    // ========== View functions ==========

    function circulatingSupply() public view returns (uint256) {
        uint256 count = getRoleMemberCount(EXCLUDED_FROM_CIRCULATION_ROLE);
        uint256 excludedBalance = 0;
        for (uint256 i = 0; i < count; i++) {
            excludedBalance += balanceOf(getRoleMember(EXCLUDED_FROM_CIRCULATION_ROLE, i));
        }
        excludedBalance += balanceOf(address(this));
        excludedBalance += balanceOf(uniswapV2Pair);
        return totalSupply() - excludedBalance;
    }

    function getEpochsPassed() public view returns (uint256) {
        return epochs.length;
    }

}

File 2 of 26 : IUniswapV2Router02.sol
pragma solidity >=0.6.2;

import './IUniswapV2Router01.sol';

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

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

File 3 of 26 : IUniswapV2Pair.sol
pragma solidity >=0.5.0;

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

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

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

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

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

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

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

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

    function initialize(address, address) external;
}

File 4 of 26 : IUniswapV2Factory.sol
pragma solidity >=0.5.0;

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

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

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

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

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

File 5 of 26 : AccessControlEnumerableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/extensions/AccessControlEnumerable.sol)

pragma solidity ^0.8.20;

import {IAccessControlEnumerable} from "@openzeppelin/contracts/access/extensions/IAccessControlEnumerable.sol";
import {AccessControlUpgradeable} from "../AccessControlUpgradeable.sol";
import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import {Initializable} from "../../proxy/utils/Initializable.sol";

/**
 * @dev Extension of {AccessControl} that allows enumerating the members of each role.
 */
abstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerable, AccessControlUpgradeable {
    using EnumerableSet for EnumerableSet.AddressSet;

    /// @custom:storage-location erc7201:openzeppelin.storage.AccessControlEnumerable
    struct AccessControlEnumerableStorage {
        mapping(bytes32 role => EnumerableSet.AddressSet) _roleMembers;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.AccessControlEnumerable")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant AccessControlEnumerableStorageLocation = 0xc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e82371705932000;

    function _getAccessControlEnumerableStorage() private pure returns (AccessControlEnumerableStorage storage $) {
        assembly {
            $.slot := AccessControlEnumerableStorageLocation
        }
    }

    function __AccessControlEnumerable_init() internal onlyInitializing {
    }

    function __AccessControlEnumerable_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) public view virtual returns (address) {
        AccessControlEnumerableStorage storage $ = _getAccessControlEnumerableStorage();
        return $._roleMembers[role].at(index);
    }

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) public view virtual returns (uint256) {
        AccessControlEnumerableStorage storage $ = _getAccessControlEnumerableStorage();
        return $._roleMembers[role].length();
    }

    /**
     * @dev Overload {AccessControl-_grantRole} to track enumerable memberships
     */
    function _grantRole(bytes32 role, address account) internal virtual override returns (bool) {
        AccessControlEnumerableStorage storage $ = _getAccessControlEnumerableStorage();
        bool granted = super._grantRole(role, account);
        if (granted) {
            $._roleMembers[role].add(account);
        }
        return granted;
    }

    /**
     * @dev Overload {AccessControl-_revokeRole} to track enumerable memberships
     */
    function _revokeRole(bytes32 role, address account) internal virtual override returns (bool) {
        AccessControlEnumerableStorage storage $ = _getAccessControlEnumerableStorage();
        bool revoked = super._revokeRole(role, account);
        if (revoked) {
            $._roleMembers[role].remove(account);
        }
        return revoked;
    }
}

File 6 of 26 : PausableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)

pragma solidity ^0.8.20;

import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract PausableUpgradeable is Initializable, ContextUpgradeable {
    /// @custom:storage-location erc7201:openzeppelin.storage.Pausable
    struct PausableStorage {
        bool _paused;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Pausable")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant PausableStorageLocation = 0xcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300;

    function _getPausableStorage() private pure returns (PausableStorage storage $) {
        assembly {
            $.slot := PausableStorageLocation
        }
    }

    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    /**
     * @dev The operation failed because the contract is paused.
     */
    error EnforcedPause();

    /**
     * @dev The operation failed because the contract is not paused.
     */
    error ExpectedPause();

    /**
     * @dev Initializes the contract in unpaused state.
     */
    function __Pausable_init() internal onlyInitializing {
        __Pausable_init_unchained();
    }

    function __Pausable_init_unchained() internal onlyInitializing {
        PausableStorage storage $ = _getPausableStorage();
        $._paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        PausableStorage storage $ = _getPausableStorage();
        return $._paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        if (paused()) {
            revert EnforcedPause();
        }
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        if (!paused()) {
            revert ExpectedPause();
        }
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        PausableStorage storage $ = _getPausableStorage();
        $._paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        PausableStorage storage $ = _getPausableStorage();
        $._paused = false;
        emit Unpaused(_msgSender());
    }
}

File 7 of 26 : UUPSUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/UUPSUpgradeable.sol)

pragma solidity ^0.8.20;

import {IERC1822Proxiable} from "@openzeppelin/contracts/interfaces/draft-IERC1822.sol";
import {ERC1967Utils} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol";
import {Initializable} from "./Initializable.sol";

/**
 * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an
 * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.
 *
 * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is
 * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing
 * `UUPSUpgradeable` with a custom implementation of upgrades.
 *
 * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.
 */
abstract contract UUPSUpgradeable is Initializable, IERC1822Proxiable {
    /// @custom:oz-upgrades-unsafe-allow state-variable-immutable
    address private immutable __self = address(this);

    /**
     * @dev The version of the upgrade interface of the contract. If this getter is missing, both `upgradeTo(address)`
     * and `upgradeToAndCall(address,bytes)` are present, and `upgradeTo` must be used if no function should be called,
     * while `upgradeToAndCall` will invoke the `receive` function if the second argument is the empty byte string.
     * If the getter returns `"5.0.0"`, only `upgradeToAndCall(address,bytes)` is present, and the second argument must
     * be the empty byte string if no function should be called, making it impossible to invoke the `receive` function
     * during an upgrade.
     */
    string public constant UPGRADE_INTERFACE_VERSION = "5.0.0";

    /**
     * @dev The call is from an unauthorized context.
     */
    error UUPSUnauthorizedCallContext();

    /**
     * @dev The storage `slot` is unsupported as a UUID.
     */
    error UUPSUnsupportedProxiableUUID(bytes32 slot);

    /**
     * @dev Check that the execution is being performed through a delegatecall call and that the execution context is
     * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case
     * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a
     * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to
     * fail.
     */
    modifier onlyProxy() {
        _checkProxy();
        _;
    }

    /**
     * @dev Check that the execution is not being performed through a delegate call. This allows a function to be
     * callable on the implementing contract but not through proxies.
     */
    modifier notDelegated() {
        _checkNotDelegated();
        _;
    }

    function __UUPSUpgradeable_init() internal onlyInitializing {
    }

    function __UUPSUpgradeable_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the
     * implementation. It is used to validate the implementation's compatibility when performing an upgrade.
     *
     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
     * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.
     */
    function proxiableUUID() external view virtual notDelegated returns (bytes32) {
        return ERC1967Utils.IMPLEMENTATION_SLOT;
    }

    /**
     * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call
     * encoded in `data`.
     *
     * Calls {_authorizeUpgrade}.
     *
     * Emits an {Upgraded} event.
     *
     * @custom:oz-upgrades-unsafe-allow-reachable delegatecall
     */
    function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy {
        _authorizeUpgrade(newImplementation);
        _upgradeToAndCallUUPS(newImplementation, data);
    }

    /**
     * @dev Reverts if the execution is not performed via delegatecall or the execution
     * context is not of a proxy with an ERC1967-compliant implementation pointing to self.
     * See {_onlyProxy}.
     */
    function _checkProxy() internal view virtual {
        if (
            address(this) == __self || // Must be called through delegatecall
            ERC1967Utils.getImplementation() != __self // Must be called through an active proxy
        ) {
            revert UUPSUnauthorizedCallContext();
        }
    }

    /**
     * @dev Reverts if the execution is performed via delegatecall.
     * See {notDelegated}.
     */
    function _checkNotDelegated() internal view virtual {
        if (address(this) != __self) {
            // Must not be called through delegatecall
            revert UUPSUnauthorizedCallContext();
        }
    }

    /**
     * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by
     * {upgradeToAndCall}.
     *
     * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.
     *
     * ```solidity
     * function _authorizeUpgrade(address) internal onlyOwner {}
     * ```
     */
    function _authorizeUpgrade(address newImplementation) internal virtual;

    /**
     * @dev Performs an implementation upgrade with a security check for UUPS proxies, and additional setup call.
     *
     * As a security check, {proxiableUUID} is invoked in the new implementation, and the return value
     * is expected to be the implementation slot in ERC1967.
     *
     * Emits an {IERC1967-Upgraded} event.
     */
    function _upgradeToAndCallUUPS(address newImplementation, bytes memory data) private {
        try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {
            if (slot != ERC1967Utils.IMPLEMENTATION_SLOT) {
                revert UUPSUnsupportedProxiableUUID(slot);
            }
            ERC1967Utils.upgradeToAndCall(newImplementation, data);
        } catch {
            // The implementation is not UUPS
            revert ERC1967Utils.ERC1967InvalidImplementation(newImplementation);
        }
    }
}

File 8 of 26 : ReentrancyGuardUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;
import {Initializable} from "../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;

    /// @custom:storage-location erc7201:openzeppelin.storage.ReentrancyGuard
    struct ReentrancyGuardStorage {
        uint256 _status;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ReentrancyGuard")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant ReentrancyGuardStorageLocation = 0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00;

    function _getReentrancyGuardStorage() private pure returns (ReentrancyGuardStorage storage $) {
        assembly {
            $.slot := ReentrancyGuardStorageLocation
        }
    }

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

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

    function __ReentrancyGuard_init_unchained() internal onlyInitializing {
        ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();
        $._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() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if ($._status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

        // Any calls to nonReentrant after this point will fail
        $._status = ENTERED;
    }

    function _nonReentrantAfter() private {
        ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        $._status = NOT_ENTERED;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();
        return $._status == ENTERED;
    }
}

File 9 of 26 : ERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import {ContextUpgradeable} from "../../utils/ContextUpgradeable.sol";
import {IERC20Errors} from "@openzeppelin/contracts/interfaces/draft-IERC6093.sol";
import {Initializable} from "../../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}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * The default value of {decimals} is 18. To change this, you should override
 * this function so it returns a different value.
 *
 * 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.
 */
abstract contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20, IERC20Metadata, IERC20Errors {
    /// @custom:storage-location erc7201:openzeppelin.storage.ERC20
    struct ERC20Storage {
        mapping(address account => uint256) _balances;

        mapping(address account => mapping(address spender => uint256)) _allowances;

        uint256 _totalSupply;

        string _name;
        string _symbol;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC20")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant ERC20StorageLocation = 0x52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace00;

    function _getERC20Storage() private pure returns (ERC20Storage storage $) {
        assembly {
            $.slot := ERC20StorageLocation
        }
    }

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * 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 {
        ERC20Storage storage $ = _getERC20Storage();
        $._name = name_;
        $._symbol = symbol_;
    }

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

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual returns (string memory) {
        ERC20Storage storage $ = _getERC20Storage();
        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 default value returned by this function, unless
     * it's 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 returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual returns (uint256) {
        ERC20Storage storage $ = _getERC20Storage();
        return $._totalSupply;
    }

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

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

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

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `value` 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 value) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, value);
        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 `value`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `value`.
     */
    function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, value);
        _transfer(from, to, value);
        return true;
    }

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to`.
     *
     * 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.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _transfer(address from, address to, uint256 value) internal {
        if (from == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        if (to == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(from, to, value);
    }

    /**
     * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`
     * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding
     * this function.
     *
     * Emits a {Transfer} event.
     */
    function _update(address from, address to, uint256 value) internal virtual {
        ERC20Storage storage $ = _getERC20Storage();
        if (from == address(0)) {
            // Overflow check required: The rest of the code assumes that totalSupply never overflows
            $._totalSupply += value;
        } else {
            uint256 fromBalance = $._balances[from];
            if (fromBalance < value) {
                revert ERC20InsufficientBalance(from, fromBalance, value);
            }
            unchecked {
                // Overflow not possible: value <= fromBalance <= totalSupply.
                $._balances[from] = fromBalance - value;
            }
        }

        if (to == address(0)) {
            unchecked {
                // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.
                $._totalSupply -= value;
            }
        } else {
            unchecked {
                // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.
                $._balances[to] += value;
            }
        }

        emit Transfer(from, to, value);
    }

    /**
     * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).
     * Relies on the `_update` mechanism
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _mint(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(address(0), account, value);
    }

    /**
     * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.
     * Relies on the `_update` mechanism.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead
     */
    function _burn(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        _update(account, address(0), value);
    }

    /**
     * @dev Sets `value` 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.
     *
     * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
     */
    function _approve(address owner, address spender, uint256 value) internal {
        _approve(owner, spender, value, true);
    }

    /**
     * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.
     *
     * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by
     * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any
     * `Approval` event during `transferFrom` operations.
     *
     * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to
     * true using the following override:
     * ```
     * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {
     *     super._approve(owner, spender, value, true);
     * }
     * ```
     *
     * Requirements are the same as {_approve}.
     */
    function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {
        ERC20Storage storage $ = _getERC20Storage();
        if (owner == address(0)) {
            revert ERC20InvalidApprover(address(0));
        }
        if (spender == address(0)) {
            revert ERC20InvalidSpender(address(0));
        }
        $._allowances[owner][spender] = value;
        if (emitEvent) {
            emit Approval(owner, spender, value);
        }
    }

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `value`.
     *
     * Does not update the allowance value in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Does not emit an {Approval} event.
     */
    function _spendAllowance(address owner, address spender, uint256 value) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            if (currentAllowance < value) {
                revert ERC20InsufficientAllowance(spender, currentAllowance, value);
            }
            unchecked {
                _approve(owner, spender, currentAllowance - value, false);
            }
        }
    }
}

File 10 of 26 : IUniswapV2Router01.sol
pragma solidity >=0.6.2;

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

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

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

File 11 of 26 : IAccessControlEnumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/extensions/IAccessControlEnumerable.sol)

pragma solidity ^0.8.20;

import {IAccessControl} from "../IAccessControl.sol";

/**
 * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.
 */
interface IAccessControlEnumerable is IAccessControl {
    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) external view returns (address);

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) external view returns (uint256);
}

File 12 of 26 : AccessControlUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol)

pragma solidity ^0.8.20;

import {IAccessControl} from "@openzeppelin/contracts/access/IAccessControl.sol";
import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol";
import {ERC165Upgradeable} from "../utils/introspection/ERC165Upgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```solidity
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```solidity
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}
 * to enforce additional security measures for this role.
 */
abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControl, ERC165Upgradeable {
    struct RoleData {
        mapping(address account => bool) hasRole;
        bytes32 adminRole;
    }

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;


    /// @custom:storage-location erc7201:openzeppelin.storage.AccessControl
    struct AccessControlStorage {
        mapping(bytes32 role => RoleData) _roles;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.AccessControl")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant AccessControlStorageLocation = 0x02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800;

    function _getAccessControlStorage() private pure returns (AccessControlStorage storage $) {
        assembly {
            $.slot := AccessControlStorageLocation
        }
    }

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with an {AccessControlUnauthorizedAccount} error including the required role.
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

    function __AccessControl_init() internal onlyInitializing {
    }

    function __AccessControl_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual returns (bool) {
        AccessControlStorage storage $ = _getAccessControlStorage();
        return $._roles[role].hasRole[account];
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`
     * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`
     * is missing `role`.
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert AccessControlUnauthorizedAccount(account, role);
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) {
        AccessControlStorage storage $ = _getAccessControlStorage();
        return $._roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `callerConfirmation`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address callerConfirmation) public virtual {
        if (callerConfirmation != _msgSender()) {
            revert AccessControlBadConfirmation();
        }

        _revokeRole(role, callerConfirmation);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        AccessControlStorage storage $ = _getAccessControlStorage();
        bytes32 previousAdminRole = getRoleAdmin(role);
        $._roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual returns (bool) {
        AccessControlStorage storage $ = _getAccessControlStorage();
        if (!hasRole(role, account)) {
            $._roles[role].hasRole[account] = true;
            emit RoleGranted(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {
        AccessControlStorage storage $ = _getAccessControlStorage();
        if (hasRole(role, account)) {
            $._roles[role].hasRole[account] = false;
            emit RoleRevoked(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }
}

File 13 of 26 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/EnumerableSet.sol)
// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.

pragma solidity ^0.8.20;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```solidity
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 *
 * [WARNING]
 * ====
 * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
 * unusable.
 * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
 * array of EnumerableSet.
 * ====
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

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

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

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

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

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

            if (valueIndex != lastIndex) {
                bytes32 lastValue = set._values[lastIndex];

                // Move the lastValue to the index where the value to delete is
                set._values[valueIndex] = lastValue;
                // Update the tracked position of the lastValue (that was just moved)
                set._positions[lastValue] = position;
            }

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

            // Delete the tracked position for the deleted slot
            delete set._positions[value];

            return true;
        } else {
            return false;
        }
    }

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

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

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

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

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

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

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

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

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

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        bytes32[] memory store = _values(set._inner);
        bytes32[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

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

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

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

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

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

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

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

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

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

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

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

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }
}

File 14 of 26 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.20;

/**
 * @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.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```solidity
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 *
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * 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 prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Storage of the initializable contract.
     *
     * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions
     * when using with upgradeable contracts.
     *
     * @custom:storage-location erc7201:openzeppelin.storage.Initializable
     */
    struct InitializableStorage {
        /**
         * @dev Indicates that the contract has been initialized.
         */
        uint64 _initialized;
        /**
         * @dev Indicates that the contract is in the process of being initialized.
         */
        bool _initializing;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;

    /**
     * @dev The contract is already initialized.
     */
    error InvalidInitialization();

    /**
     * @dev The contract is not initializing.
     */
    error NotInitializing();

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint64 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts.
     *
     * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any
     * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in
     * production.
     *
     * Emits an {Initialized} event.
     */
    modifier initializer() {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        // Cache values to avoid duplicated sloads
        bool isTopLevelCall = !$._initializing;
        uint64 initialized = $._initialized;

        // Allowed calls:
        // - initialSetup: the contract is not in the initializing state and no previous version was
        //                 initialized
        // - construction: the contract is initialized at version 1 (no reininitialization) and the
        //                 current contract is just being deployed
        bool initialSetup = initialized == 0 && isTopLevelCall;
        bool construction = initialized == 1 && address(this).code.length == 0;

        if (!initialSetup && !construction) {
            revert InvalidInitialization();
        }
        $._initialized = 1;
        if (isTopLevelCall) {
            $._initializing = true;
        }
        _;
        if (isTopLevelCall) {
            $._initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * A reinitializer may be used after the original initialization step. This is essential to configure modules that
     * are added through upgrades and that require initialization.
     *
     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
     * cannot be nested. If one is invoked in the context of another, execution will revert.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     *
     * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.
     *
     * Emits an {Initialized} event.
     */
    modifier reinitializer(uint64 version) {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        if ($._initializing || $._initialized >= version) {
            revert InvalidInitialization();
        }
        $._initialized = version;
        $._initializing = true;
        _;
        $._initializing = false;
        emit Initialized(version);
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        _checkInitializing();
        _;
    }

    /**
     * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.
     */
    function _checkInitializing() internal view virtual {
        if (!_isInitializing()) {
            revert NotInitializing();
        }
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     *
     * Emits an {Initialized} event the first time it is successfully executed.
     */
    function _disableInitializers() internal virtual {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        if ($._initializing) {
            revert InvalidInitialization();
        }
        if ($._initialized != type(uint64).max) {
            $._initialized = type(uint64).max;
            emit Initialized(type(uint64).max);
        }
    }

    /**
     * @dev Returns the highest version that has been initialized. See {reinitializer}.
     */
    function _getInitializedVersion() internal view returns (uint64) {
        return _getInitializableStorage()._initialized;
    }

    /**
     * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
     */
    function _isInitializing() internal view returns (bool) {
        return _getInitializableStorage()._initializing;
    }

    /**
     * @dev Returns a pointer to the storage namespace.
     */
    // solhint-disable-next-line var-name-mixedcase
    function _getInitializableStorage() private pure returns (InitializableStorage storage $) {
        assembly {
            $.slot := INITIALIZABLE_STORAGE
        }
    }
}

File 15 of 26 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)

pragma solidity ^0.8.20;
import {Initializable} from "../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;
    }
}

File 16 of 26 : draft-IERC1822.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC1822.sol)

pragma solidity ^0.8.20;

/**
 * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified
 * proxy whose upgrades are fully controlled by the current implementation.
 */
interface IERC1822Proxiable {
    /**
     * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation
     * address.
     *
     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
     * function revert if invoked through a proxy.
     */
    function proxiableUUID() external view returns (bytes32);
}

File 17 of 26 : ERC1967Utils.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/ERC1967/ERC1967Utils.sol)

pragma solidity ^0.8.20;

import {IBeacon} from "../beacon/IBeacon.sol";
import {Address} from "../../utils/Address.sol";
import {StorageSlot} from "../../utils/StorageSlot.sol";

/**
 * @dev This abstract contract provides getters and event emitting update functions for
 * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.
 */
library ERC1967Utils {
    // We re-declare ERC-1967 events here because they can't be used directly from IERC1967.
    // This will be fixed in Solidity 0.8.21. At that point we should remove these events.
    /**
     * @dev Emitted when the implementation is upgraded.
     */
    event Upgraded(address indexed implementation);

    /**
     * @dev Emitted when the admin account has changed.
     */
    event AdminChanged(address previousAdmin, address newAdmin);

    /**
     * @dev Emitted when the beacon is changed.
     */
    event BeaconUpgraded(address indexed beacon);

    /**
     * @dev Storage slot with the address of the current implementation.
     * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1.
     */
    // solhint-disable-next-line private-vars-leading-underscore
    bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;

    /**
     * @dev The `implementation` of the proxy is invalid.
     */
    error ERC1967InvalidImplementation(address implementation);

    /**
     * @dev The `admin` of the proxy is invalid.
     */
    error ERC1967InvalidAdmin(address admin);

    /**
     * @dev The `beacon` of the proxy is invalid.
     */
    error ERC1967InvalidBeacon(address beacon);

    /**
     * @dev An upgrade function sees `msg.value > 0` that may be lost.
     */
    error ERC1967NonPayable();

    /**
     * @dev Returns the current implementation address.
     */
    function getImplementation() internal view returns (address) {
        return StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value;
    }

    /**
     * @dev Stores a new address in the EIP1967 implementation slot.
     */
    function _setImplementation(address newImplementation) private {
        if (newImplementation.code.length == 0) {
            revert ERC1967InvalidImplementation(newImplementation);
        }
        StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value = newImplementation;
    }

    /**
     * @dev Performs implementation upgrade with additional setup call if data is nonempty.
     * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected
     * to avoid stuck value in the contract.
     *
     * Emits an {IERC1967-Upgraded} event.
     */
    function upgradeToAndCall(address newImplementation, bytes memory data) internal {
        _setImplementation(newImplementation);
        emit Upgraded(newImplementation);

        if (data.length > 0) {
            Address.functionDelegateCall(newImplementation, data);
        } else {
            _checkNonPayable();
        }
    }

    /**
     * @dev Storage slot with the admin of the contract.
     * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1.
     */
    // solhint-disable-next-line private-vars-leading-underscore
    bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;

    /**
     * @dev Returns the current admin.
     *
     * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using
     * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.
     * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`
     */
    function getAdmin() internal view returns (address) {
        return StorageSlot.getAddressSlot(ADMIN_SLOT).value;
    }

    /**
     * @dev Stores a new address in the EIP1967 admin slot.
     */
    function _setAdmin(address newAdmin) private {
        if (newAdmin == address(0)) {
            revert ERC1967InvalidAdmin(address(0));
        }
        StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin;
    }

    /**
     * @dev Changes the admin of the proxy.
     *
     * Emits an {IERC1967-AdminChanged} event.
     */
    function changeAdmin(address newAdmin) internal {
        emit AdminChanged(getAdmin(), newAdmin);
        _setAdmin(newAdmin);
    }

    /**
     * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.
     * This is the keccak-256 hash of "eip1967.proxy.beacon" subtracted by 1.
     */
    // solhint-disable-next-line private-vars-leading-underscore
    bytes32 internal constant BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;

    /**
     * @dev Returns the current beacon.
     */
    function getBeacon() internal view returns (address) {
        return StorageSlot.getAddressSlot(BEACON_SLOT).value;
    }

    /**
     * @dev Stores a new beacon in the EIP1967 beacon slot.
     */
    function _setBeacon(address newBeacon) private {
        if (newBeacon.code.length == 0) {
            revert ERC1967InvalidBeacon(newBeacon);
        }

        StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon;

        address beaconImplementation = IBeacon(newBeacon).implementation();
        if (beaconImplementation.code.length == 0) {
            revert ERC1967InvalidImplementation(beaconImplementation);
        }
    }

    /**
     * @dev Change the beacon and trigger a setup call if data is nonempty.
     * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected
     * to avoid stuck value in the contract.
     *
     * Emits an {IERC1967-BeaconUpgraded} event.
     *
     * CAUTION: Invoking this function has no effect on an instance of {BeaconProxy} since v5, since
     * it uses an immutable beacon without looking at the value of the ERC-1967 beacon slot for
     * efficiency.
     */
    function upgradeBeaconToAndCall(address newBeacon, bytes memory data) internal {
        _setBeacon(newBeacon);
        emit BeaconUpgraded(newBeacon);

        if (data.length > 0) {
            Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);
        } else {
            _checkNonPayable();
        }
    }

    /**
     * @dev Reverts if `msg.value` is not zero. It can be used to avoid `msg.value` stuck in the contract
     * if an upgrade doesn't perform an initialization call.
     */
    function _checkNonPayable() private {
        if (msg.value > 0) {
            revert ERC1967NonPayable();
        }
    }
}

File 18 of 26 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

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

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

    /**
     * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` 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 value) external returns (bool);
}

File 19 of 26 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 */
interface IERC20Metadata is IERC20 {
    /**
     * @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 20 of 26 : draft-IERC6093.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;

/**
 * @dev Standard ERC20 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.
 */
interface IERC20Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC20InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC20InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     * @param allowance Amount of tokens a `spender` is allowed to operate with.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC20InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `spender` to be approved. Used in approvals.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC20InvalidSpender(address spender);
}

/**
 * @dev Standard ERC721 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.
 */
interface IERC721Errors {
    /**
     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.
     * Used in balance queries.
     * @param owner Address of the current owner of a token.
     */
    error ERC721InvalidOwner(address owner);

    /**
     * @dev Indicates a `tokenId` whose `owner` is the zero address.
     * @param tokenId Identifier number of a token.
     */
    error ERC721NonexistentToken(uint256 tokenId);

    /**
     * @dev Indicates an error related to the ownership over a particular token. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param tokenId Identifier number of a token.
     * @param owner Address of the current owner of a token.
     */
    error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC721InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC721InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param tokenId Identifier number of a token.
     */
    error ERC721InsufficientApproval(address operator, uint256 tokenId);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC721InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC721InvalidOperator(address operator);
}

/**
 * @dev Standard ERC1155 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.
 */
interface IERC1155Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     * @param tokenId Identifier number of a token.
     */
    error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC1155InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC1155InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param owner Address of the current owner of a token.
     */
    error ERC1155MissingApprovalForAll(address operator, address owner);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC1155InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC1155InvalidOperator(address operator);

    /**
     * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
     * Used in batch transfers.
     * @param idsLength Length of the array of token identifiers
     * @param valuesLength Length of the array of token amounts
     */
    error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}

File 21 of 26 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol)

pragma solidity ^0.8.20;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev The `account` is missing a role.
     */
    error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);

    /**
     * @dev The caller of a function is not the expected one.
     *
     * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.
     */
    error AccessControlBadConfirmation();

    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `callerConfirmation`.
     */
    function renounceRole(bytes32 role, address callerConfirmation) external;
}

File 22 of 26 : ERC165Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import {Initializable} from "../../proxy/utils/Initializable.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 */
abstract contract ERC165Upgradeable is Initializable, IERC165 {
    function __ERC165_init() internal onlyInitializing {
    }

    function __ERC165_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 23 of 26 : IBeacon.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/IBeacon.sol)

pragma solidity ^0.8.20;

/**
 * @dev This is the interface that {BeaconProxy} expects of its beacon.
 */
interface IBeacon {
    /**
     * @dev Must return an address that can be used as a delegate call target.
     *
     * {UpgradeableBeacon} will check that this address is a contract.
     */
    function implementation() external view returns (address);
}

File 24 of 26 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)

pragma solidity ^0.8.20;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error AddressInsufficientBalance(address account);

    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedInnerCall();

    /**
     * @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://consensys.net/diligence/blog/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.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert AddressInsufficientBalance(address(this));
        }

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert FailedInnerCall();
        }
    }

    /**
     * @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 or custom error, it is bubbled
     * up by this function (like regular Solidity function calls). However, if
     * the call reverted with no returned reason, this function reverts with a
     * {FailedInnerCall} error.
     *
     * 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.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0);
    }

    /**
     * @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`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert AddressInsufficientBalance(address(this));
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
     * unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {FailedInnerCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
     */
    function _revert(bytes memory returndata) private pure {
        // 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
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert FailedInnerCall();
        }
    }
}

File 25 of 26 : StorageSlot.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.

pragma solidity ^0.8.20;

/**
 * @dev Library for reading and writing primitive types to specific storage slots.
 *
 * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
 * This library helps with reading and writing to such slots without the need for inline assembly.
 *
 * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
 *
 * Example usage to set ERC1967 implementation slot:
 * ```solidity
 * contract ERC1967 {
 *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
 *
 *     function _getImplementation() internal view returns (address) {
 *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
 *     }
 *
 *     function _setImplementation(address newImplementation) internal {
 *         require(newImplementation.code.length > 0);
 *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
 *     }
 * }
 * ```
 */
library StorageSlot {
    struct AddressSlot {
        address value;
    }

    struct BooleanSlot {
        bool value;
    }

    struct Bytes32Slot {
        bytes32 value;
    }

    struct Uint256Slot {
        uint256 value;
    }

    struct StringSlot {
        string value;
    }

    struct BytesSlot {
        bytes value;
    }

    /**
     * @dev Returns an `AddressSlot` with member `value` located at `slot`.
     */
    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `BooleanSlot` with member `value` located at `slot`.
     */
    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
     */
    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Uint256Slot` with member `value` located at `slot`.
     */
    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `StringSlot` with member `value` located at `slot`.
     */
    function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `StringSlot` representation of the string storage pointer `store`.
     */
    function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := store.slot
        }
    }

    /**
     * @dev Returns an `BytesSlot` with member `value` located at `slot`.
     */
    function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
     */
    function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := store.slot
        }
    }
}

File 26 of 26 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @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 IERC165 {
    /**
     * @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
{
  "remappings": [
    "@openzeppelin/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/",
    "@prb/test/=lib/prb-test/src/",
    "forge-std/=lib/forge-std/src/",
    "@oz-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "@std/=lib/forge-std/src/",
    "@uniswap/v2-core/=lib/v2-core/",
    "@uniswap/v2-periphery/=lib/v2-periphery/",
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "openzeppelin/=lib/openzeppelin-contracts/contracts/",
    "prb-test/=lib/prb-test/src/",
    "v2-core/=lib/v2-core/contracts/",
    "v2-periphery/=lib/v2-periphery/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 300
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "none",
    "appendCBOR": false
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"ERC1967InvalidImplementation","type":"error"},{"inputs":[],"name":"ERC1967NonPayable","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[],"name":"UUPSUnauthorizedCallContext","type":"error"},{"inputs":[{"internalType":"bytes32","name":"slot","type":"bytes32"}],"name":"UUPSUnsupportedProxiableUUID","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isActive","type":"bool"}],"name":"AirDropToggled","type":"event"},{"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":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ClaimedBot","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ReceivedEther","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"circulatingSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"swapTaxCollected","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tradingRevenueCollected","type":"uint256"}],"name":"Snapshot","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ethAmount","type":"uint256"}],"name":"SwappedToEth","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ethAmount","type":"uint256"}],"name":"SwappedToXperp","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isActive","type":"bool"}],"name":"TaxActiveChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tax","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"teamWalletTax","type":"uint256"}],"name":"TaxChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountXperp","type":"uint256"}],"name":"Taxed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"teamWallet","type":"address"}],"name":"TeamWalletUpdated","type":"event"},{"anonymous":false,"inputs":[],"name":"TradingOnUniSwapDisabled","type":"event"},{"anonymous":false,"inputs":[],"name":"TradingOnUniSwapEnabled","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":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"walletBalanceLimit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sellLimit","type":"uint256"}],"name":"WalletBalanceLimitChanged","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DisableTradingOnUniSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"EXCLUDED_FROM_CIRCULATION_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EXCLUDED_FROM_TAXATION_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EnableTradingOnUniSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"RESCUE_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SNAPSHOT_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UPGRADE_INTERFACE_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_recipients","type":"address[]"},{"internalType":"uint256[]","name":"_tokenAmounts","type":"uint256[]"},{"internalType":"uint256[]","name":"_ethAmounts","type":"uint256[]"}],"name":"airdrop","outputs":[],"stateMutability":"payable","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":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"circulatingSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"operationalWallet","type":"address"},{"internalType":"address[]","name":"_recipients","type":"address[]"}],"name":"claimBot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"epochs","outputs":[{"internalType":"uint256","name":"epochTimestamp","type":"uint256"},{"internalType":"uint256","name":"epochCirculatingSupply","type":"uint256"},{"internalType":"uint256","name":"epochRevenueFromSwapTaxCollectedXPERP","type":"uint256"},{"internalType":"uint256","name":"epochSwapRevenueETH","type":"uint256"},{"internalType":"uint256","name":"epochTradingRevenueETH","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getEpochsPassed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hundredPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initPair","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_teamWallet","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isAirDropActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isTaxActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isTradingEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastClaimedEpochs","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":"oneMillion","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAdd","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"rescueERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_weiAmount","type":"uint256"}],"name":"rescueETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revShareAndTeamCurrentEpochXPERP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sellLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_sellLimit","type":"uint256"}],"name":"setSellLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tax","type":"uint256"},{"internalType":"uint256","name":"_teamWalletTax","type":"uint256"}],"name":"setTax","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isTaxActive","type":"bool"}],"name":"setTaxActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_walletBalanceLimit","type":"uint256"}],"name":"setWalletBalanceLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"snapshot","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapTaxCollectedTotalXPERP","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":"teamWallet","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"teamWalletTax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleAirDrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tradingRevenueDistributedTotalETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uniswapV2Pair","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uniswapV2Router","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_teamWallet","type":"address"}],"name":"updateTeamWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"walletBalanceLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60a0604052306080523480156200001557600080fd5b506200002062000026565b620000da565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff1615620000775760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b0390811614620000d75780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051613d80620001046000396000818161239f015281816123c801526125320152613d806000f3fe6080604052600436106103bc5760003560e01c80637028e2cd116101f25780639e252f001161010d578063c6b61e4c116100a0578063dd62ed3e1161006f578063dd62ed3e14610b3a578063e4ef93b814610b9f578063fe85b42b14610bbf578063feb1dfcc14610bd557600080fd5b8063c6b61e4c14610a93578063ca15c87314610adb578063d547741f14610afb578063d9a553aa14610b1b57600080fd5b8063ad3cb1cc116100dc578063ad3cb1cc146109f3578063b131646014610a24578063b1a9f80914610a51578063c4d66de814610a7357600080fd5b80639e252f001461097e578063a217fddf1461099e578063a9059cbb146109b3578063a9bf2c09146109d357600080fd5b80638a9cb361116101855780639358928b116101545780639358928b1461093257806395d89b41146109475780639711715a1461095c57806398a0dd091461096457600080fd5b80638a9cb361146108bc5780638cd4426d146108d25780639010d07c146108f257806391d148541461091257600080fd5b80637ff976c7116101c15780637ff976c7146108675780638456cb591461087c578063853755fc146108915780638817f6f1146108a657600080fd5b80637028e2cd146107e357806370a082311461080557806375b238fc146108255780637cb332bb1461084757600080fd5b80632ffc1628116102e257806349cb380f1161027557806352d1902d1161024457806352d1902d14610769578063599270441461077e5780635c975abb1461079e578063667f6526146107c357600080fd5b806349cb380f146107085780634e2fe61f1461071e5780634f1ef286146107405780634f91e48c1461075357600080fd5b806337c279dc116102b157806337c279dc146106995780633f4ba83a146106af578063413e920d146106c457806349bd5a5e146106e257600080fd5b80632ffc1628146106275780633059f35614610647578063313ce5671461065d57806336568abe1461067957600080fd5b80631bf2907b1161035a57806323bf6bc61161032957806323bf6bc614610588578063244519fa146105a8578063248a9ca3146105ca5780632f2ff15d1461060757600080fd5b80631bf2907b1461052a5780631c73bca41461053d578063233edfe71461055257806323b872dd1461056857600080fd5b806306fdde031161039657806306fdde031461046a578063095ea7b31461048c5780631694505e146104ac57806318160ddd146104ec57600080fd5b806301ffc9a7146103fd57806303c051c314610432578063064a59d01461044957600080fd5b366103f85760405134815233907fa419615bc8fda4c87663805ee2a3597a6d71c1d476911d9892f340d965bc7bf19060200160405180910390a2005b600080fd5b34801561040957600080fd5b5061041d610418366004613507565b610bea565b60405190151581526020015b60405180910390f35b34801561043e57600080fd5b50610447610c15565b005b34801561045557600080fd5b5060055461041d90600160a01b900460ff1681565b34801561047657600080fd5b5061047f610c66565b6040516104299190613555565b34801561049857600080fd5b5061041d6104a736600461359d565b610d29565b3480156104b857600080fd5b506104d4737a250d5630b4cf539739df2c5dacb4c659f2488d81565b6040516001600160a01b039091168152602001610429565b3480156104f857600080fd5b507f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace02545b604051908152602001610429565b610447610538366004613703565b610d41565b34801561054957600080fd5b5060095461051c565b34801561055e57600080fd5b5061051c60075481565b34801561057457600080fd5b5061041d61058336600461378b565b611008565b34801561059457600080fd5b506104476105a33660046137cc565b61102e565b3480156105b457600080fd5b5061051c600080516020613d6083398151915281565b3480156105d657600080fd5b5061051c6105e536600461381c565b6000908152600080516020613ce0833981519152602052604090206001015490565b34801561061357600080fd5b50610447610622366004613835565b61116a565b34801561063357600080fd5b50610447610642366004613873565b6111a2565b34801561065357600080fd5b5061051c60035481565b34801561066957600080fd5b5060405160128152602001610429565b34801561068557600080fd5b50610447610694366004613835565b611203565b3480156106a557600080fd5b5061051c60065481565b3480156106bb57600080fd5b50610447611236565b3480156106d057600080fd5b5061051c69d3c21bcecceda100000081565b3480156106ee57600080fd5b506004546104d4906201000090046001600160a01b031681565b34801561071457600080fd5b5061051c60085481565b34801561072a57600080fd5b5061051c600080516020613c8083398151915281565b61044761074e366004613890565b611259565b34801561075f57600080fd5b5061051c60015481565b34801561077557600080fd5b5061051c611278565b34801561078a57600080fd5b506005546104d4906001600160a01b031681565b3480156107aa57600080fd5b50600080516020613d008339815191525460ff1661041d565b3480156107cf57600080fd5b506104476107de366004613938565b6112a7565b3480156107ef57600080fd5b5061051c600080516020613cc083398151915281565b34801561081157600080fd5b5061051c61082036600461395a565b61135f565b34801561083157600080fd5b5061051c600080516020613d2083398151915281565b34801561085357600080fd5b5061044761086236600461395a565b611387565b34801561087357600080fd5b50610447611439565b34801561088857600080fd5b50610447611490565b34801561089d57600080fd5b506104476114b0565b3480156108b257600080fd5b5061051c60005481565b3480156108c857600080fd5b5061051c61271081565b3480156108de57600080fd5b506104476108ed36600461359d565b61152b565b3480156108fe57600080fd5b506104d461090d366004613938565b6115b4565b34801561091e57600080fd5b5061041d61092d366004613835565b6115f5565b34801561093e57600080fd5b5061051c61162d565b34801561095357600080fd5b5061047f611706565b610447611745565b34801561097057600080fd5b5060045461041d9060ff1681565b34801561098a57600080fd5b5061044761099936600461381c565b611975565b3480156109aa57600080fd5b5061051c600081565b3480156109bf57600080fd5b5061041d6109ce36600461359d565b6119ba565b3480156109df57600080fd5b506104476109ee36600461381c565b6119c8565b3480156109ff57600080fd5b5061047f604051806040016040528060058152602001640352e302e360dc1b81525081565b348015610a3057600080fd5b5061051c610a3f36600461395a565b600a6020526000908152604090205481565b348015610a5d57600080fd5b5061051c600080516020613d4083398151915281565b348015610a7f57600080fd5b50610447610a8e36600461395a565b611a78565b348015610a9f57600080fd5b50610ab3610aae36600461381c565b611dbc565b604080519586526020860194909452928401919091526060830152608082015260a001610429565b348015610ae757600080fd5b5061051c610af636600461381c565b611dfd565b348015610b0757600080fd5b50610447610b16366004613835565b611e35565b348015610b2757600080fd5b5060045461041d90610100900460ff1681565b348015610b4657600080fd5b5061051c610b55366004613977565b6001600160a01b0391821660009081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace016020908152604080832093909416825291909152205490565b348015610bab57600080fd5b50610447610bba36600461381c565b611e67565b348015610bcb57600080fd5b5061051c60025481565b348015610be157600080fd5b50610447611f18565b60006001600160e01b03198216635a05180f60e01b1480610c0f5750610c0f826120e3565b92915050565b600080516020613d20833981519152610c2d81612118565b6005805460ff60a01b191690556040517ff6c0da004e5c54863f4e9c53375139d02174b08a4b6d00edcc264f31ce57092d90600090a150565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace038054606091600080516020613ca083398151915291610ca5906139a5565b80601f0160208091040260200160405190810160405280929190818152602001828054610cd1906139a5565b8015610d1e5780601f10610cf357610100808354040283529160200191610d1e565b820191906000526020600020905b815481529060010190602001808311610d0157829003601f168201915b505050505091505090565b600033610d37818585612122565b5060019392505050565b600080516020613cc0833981519152610d5981612118565b82518451148015610d6b575081518451145b610dbc5760405162461bcd60e51b815260206004820152601560248201527f496e76616c696420696e707574206c656e67746873000000000000000000000060448201526064015b60405180910390fd5b60008060005b8551811015610e0457858181518110610ddd57610ddd6139df565b602002602001015183610df09190613a0b565b925080610dfc81613a1e565b915050610dc2565b5060005b8451811015610e4a57848181518110610e2357610e236139df565b602002602001015182610e369190613a0b565b915080610e4281613a1e565b915050610e08565b5081610e553361135f565b1015610ea35760405162461bcd60e51b815260206004820152601a60248201527f496e73756666696369656e7420746f6b656e2062616c616e63650000000000006044820152606401610db3565b80341015610ef35760405162461bcd60e51b815260206004820152601760248201527f496e73756666696369656e742045746865722073656e740000000000000000006044820152606401610db3565b60005b8651811015610fff576000868281518110610f1357610f136139df565b60200260200101511115610f5e57610f5e33888381518110610f3757610f376139df565b6020026020010151888481518110610f5157610f516139df565b602002602001015161212f565b6000858281518110610f7257610f726139df565b60200260200101511115610fed57868181518110610f9257610f926139df565b60200260200101516001600160a01b03166108fc868381518110610fb857610fb86139df565b60200260200101519081150290604051600060405180830381858888f19350505050158015610feb573d6000803e3d6000fd5b505b80610ff781613a1e565b915050610ef6565b50505050505050565b60003361101685828561218e565b61102185858561212f565b60019150505b9392505050565b600080516020613cc083398151915261104681612118565b61104e612225565b60005b82518110156110be5760095461106990600290613a37565b600a600085848151811061107f5761107f6139df565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000208190555080806110b690613a1e565b915050611051565b5060405147906001600160a01b0385169082156108fc029083906000818181858888f193505050501580156110f7573d6000803e3d6000fd5b50836001600160a01b03167fdfe185ebaf59643e75abd7c7f4e5afcb58aa0bef1bdb941d1c23265bb89dcfce8260405161113391815260200190565b60405180910390a25061116560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b6000828152600080516020613ce0833981519152602052604090206001015461119281612118565b61119c8383612295565b50505050565b600080516020613d208339815191526111ba81612118565b6004805460ff19168315159081179091556040519081527f540a527e51aeab0dddfb9797856930b60ffa5937b1d134ccf4e271a797dbe70a906020015b60405180910390a15050565b6001600160a01b038116331461122c5760405163334bd91960e11b815260040160405180910390fd5b61116582826122ec565b600080516020613d2083398151915261124e81612118565b61125661233a565b50565b611261612394565b61126a8261244d565b6112748282612458565b5050565b6000611282612527565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b600080516020613d208339815191526112bf81612118565b61271083111580156112cf575060015b80156112dd57506127108211155b6113175760405162461bcd60e51b815260206004820152600b60248201526a092dcecc2d8d2c840e8c2f60ab1b6044820152606401610db3565b6002839055600382905560408051848152602081018490527f4ac0d6b0d694ec6c120242feaca94cfb6fbfe646756cd7026301e3a5984f0450910160405180910390a1505050565b6001600160a01b03166000908152600080516020613ca0833981519152602052604090205490565b600080516020613d2083398151915261139f81612118565b6001600160a01b0382166113eb5760405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a59081d19585b481dd85b1b195d606a1b6044820152606401610db3565b600580546001600160a01b0319166001600160a01b0384169081179091556040519081527ff6215f245bfd24e51265c56ef650fdd856aa4ece6221ee1ef395bbe0a5558010906020016111f7565b600080516020613d2083398151915261145181612118565b6005805460ff60a01b1916600160a01b1790556040517f2d4fd5bae8f53dd83c59664d82f3c9a17a251e2ac3b1af3d85d6bec37d098f9f90600090a150565b600080516020613d208339815191526114a881612118565b611256612570565b600080516020613cc08339815191526114c881612118565b6004805460ff610100808304821615810261ff001990931692909217928390556040517f406c46ebfaaea47203daefc50a4298117dc2a4d07342d50b54b526c8316b0d8f936115209390049091161515815260200190565b60405180910390a150565b600080516020613d4083398151915261154381612118565b60405163a9059cbb60e01b8152336004820152602481018390526001600160a01b0384169063a9059cbb906044016020604051808303816000875af1158015611590573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119c9190613a4a565b60008281527fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e823717059320006020819052604082206115ed90846125b9565b949350505050565b6000918252600080516020613ce0833981519152602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600080611647600080516020613c80833981519152611dfd565b90506000805b8281101561168e57611670610820600080516020613c80833981519152836115b4565b61167a9083613a0b565b91508061168681613a1e565b91505061164d565b506116983061135f565b6116a29082613a0b565b6004549091506116c0906201000090046001600160a01b031661135f565b6116ca9082613a0b565b9050806116f57f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace025490565b6116ff9190613a37565b9250505090565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace048054606091600080516020613ca083398151915291610ca5906139a5565b600080516020613cc083398151915261175d81612118565b611765612225565b600980546000919061177990600190613a37565b81548110611789576117896139df565b6000918252602082204260079092020190815591506117a661162d565b600754909150801515806117ba5750600034115b6118125760405162461bcd60e51b8152602060048201526024808201527f4e6f2074617820636f6c6c65637465642079657420616e64206e6f20455448206044820152631cd95b9d60e21b6064820152608401610db3565b8061181c3061135f565b101561186a5760405162461bcd60e51b815260206004820152601a60248201527f42616c616e6365206c657373207468616e2072657175697265640000000000006044820152606401610db3565b600080821161187a576000611883565b611883826125c5565b90506000600254600354836118989190613a67565b6118a29190613a7e565b905060006118b08284613a37565b6005546040519192506001600160a01b03169083156108fc029084906000818181858888f193505050501580156118eb573d6000803e3d6000fd5b5060018601859055346004870181905560028701859055600387018290556009546040805191825260208201889052810183905260608101919091527f2b7e220b2babc392b7f28bbfb51e48a8ae7ab8d75e59253607e2483dd411edb79060800160405180910390a15050600980546001018155600090815260075550611256925061226f915050565b600080516020613d4083398151915261198d81612118565b604051339083156108fc029084906000818181858888f19350505050158015611165573d6000803e3d6000fd5b600033610d3781858561212f565b600080516020613d208339815191526119e081612118565b69d3c21bcecceda1000000821115611a3a5760405162461bcd60e51b815260206004820152601a60248201527f496e76616c69642073656c6c2062616c616e6365206c696d69740000000000006044820152606401610db3565b600182905560005460408051918252602082018490527f71d2b4d3f228f2d75fd480fb859115900b1af3df7a4f93fdff075e55271d808191016111f7565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff16600081158015611abe5750825b905060008267ffffffffffffffff166001148015611adb5750303b155b905081158015611ae9575080155b15611b075760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315611b3157845460ff60401b1916600160401b1785555b6001600160a01b038616611b585760405163d92e233d60e01b815260040160405180910390fd5b611b9c60405180604001604052806005815260200164078706572760dc1b81525060405180604001604052806005815260200164078706572760dc1b815250612796565b611ba46127a8565b611bac6127b0565b611bb46127a8565b611bbc6127c0565b6005805461015e60025560966003556004805474ffffffffffffffffffffffffffffffffffffffffff199092166001600160a01b038a161790925569021e19e0c9bab24000006000818155600191825561ffff1990921617909155611c2190806127d0565b611c39600080516020613d20833981519152806127d0565b611c5f600080516020613c80833981519152600080516020613d208339815191526127d0565b611c85600080516020613d60833981519152600080516020613d208339815191526127d0565b611c9d600080516020613cc0833981519152806127d0565b611cc3600080516020613d40833981519152600080516020613d208339815191526127d0565b611cdb600080516020613d2083398151915233612295565b50611cf4600080516020613c8083398151915233612295565b50611d0d600080516020613d6083398151915233612295565b50611d26600080516020613cc083398151915233612295565b50611d3f600080516020613d4083398151915233612295565b50611d4b600033612295565b506009805460008290526002019055611d6e3369d3c21bcecceda1000000612850565b8315611db457845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050565b60098181548110611dcc57600080fd5b6000918252602090912060079091020180546001820154600283015460038401546004909401549294509092909185565b60008181527fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e8237170593200060208190526040822061102790612886565b6000828152600080516020613ce08339815191526020526040902060010154611e5d81612118565b61119c83836122ec565b600080516020613d20833981519152611e7f81612118565b69d3c21bcecceda1000000821115611ed95760405162461bcd60e51b815260206004820152601c60248201527f496e76616c69642077616c6c65742062616c616e6365206c696d6974000000006044820152606401610db3565b60008290556001546040805184815260208101929092527f71d2b4d3f228f2d75fd480fb859115900b1af3df7a4f93fdff075e55271d808191016111f7565b600080516020613d20833981519152611f3081612118565b737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fa69190613aa0565b6001600160a01b031663c9c6539630737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015612007573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061202b9190613aa0565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015612078573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061209c9190613aa0565b600460026101000a8154816001600160a01b0302191690836001600160a01b0316021790555061125630737a250d5630b4cf539739df2c5dacb4c659f2488d600019612122565b60006001600160e01b03198216637965db0b60e01b1480610c0f57506301ffc9a760e01b6001600160e01b0319831614610c0f565b6112568133612890565b61116583838360016128c9565b6001600160a01b03831661215957604051634b637e8f60e11b815260006004820152602401610db3565b6001600160a01b0382166121835760405163ec442f0560e01b815260006004820152602401610db3565b6111658383836129b1565b6001600160a01b0383811660009081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace016020908152604080832093861683529290522054600019811461119c578181101561221657604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610db3565b61119c848484840360006128c9565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0080546001190161226957604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b60007fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e82371705932000816122c38585612e11565b905080156115ed5760008581526020839052604090206122e39085612eb6565b50949350505050565b60007fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e823717059320008161231a8585612ecb565b905080156115ed5760008581526020839052604090206122e39085612f47565b612342612f5c565b600080516020613d00833981519152805460ff191681557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b039091168152602001611520565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061242d57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166124217f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614155b1561244b5760405163703e46dd60e11b815260040160405180910390fd5b565b600061127481612118565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156124b2575060408051601f3d908101601f191682019092526124af91810190613abd565b60015b6124da57604051634c9c8ce360e01b81526001600160a01b0383166004820152602401610db3565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc811461251d57604051632a87526960e21b815260048101829052602401610db3565b6111658383612f8c565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461244b5760405163703e46dd60e11b815260040160405180910390fd5b612578612fe2565b600080516020613d00833981519152805460ff191660011781557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2583361237c565b60006110278383613013565b6000816000036125d757506000919050565b604080516002808252606082018352600092602083019080368337019050509050308160008151811061260c5761260c6139df565b60200260200101906001600160a01b031690816001600160a01b031681525050737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561267e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126a29190613aa0565b816001815181106126b5576126b56139df565b6001600160a01b039092166020928302919091019091015260405163791ac94760e01b81524790737a250d5630b4cf539739df2c5dacb4c659f2488d9063791ac9479061270f908790600090879030904290600401613ad6565b600060405180830381600087803b15801561272957600080fd5b505af115801561273d573d6000803e3d6000fd5b504792506000915061275190508383613a37565b60408051888152602081018390529192507fa0948473da2b862876c9b294bc55a32b178b0e3c6c9da3c91555924ec8017ee9910160405180910390a195945050505050565b61279e61303d565b6112748282613086565b61244b61303d565b6127b861303d565b61244b6130d7565b6127c861303d565b61244b6130f8565b600080516020613ce08339815191526000612807846000908152600080516020613ce0833981519152602052604090206001015490565b600085815260208490526040808220600101869055519192508491839187917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a450505050565b6001600160a01b03821661287a5760405163ec442f0560e01b815260006004820152602401610db3565b611274600083836129b1565b6000610c0f825490565b61289a82826115f5565b6112745760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610db3565b600080516020613ca08339815191526001600160a01b0385166129025760405163e602df0560e01b815260006004820152602401610db3565b6001600160a01b03841661292c57604051634a1406b160e11b815260006004820152602401610db3565b6001600160a01b038086166000908152600183016020908152604080832093881683529290522083905581156129aa57836001600160a01b0316856001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925856040516129a191815260200190565b60405180910390a35b5050505050565b6004546000906001600160a01b03858116620100009092041614806129e957506004546001600160a01b038481166201000090920416145b8015612a09575033737a250d5630b4cf539739df2c5dacb4c659f2488d14155b8015612a1e57506001600160a01b0384163014155b8015612a3357506001600160a01b0383163014155b8015612a545750612a52600080516020613d60833981519152856115f5565b155b8015612a755750612a73600080516020613d60833981519152846115f5565b155b600554909150600160a01b900460ff1680612a8e575080155b612ada5760405162461bcd60e51b815260206004820152601a60248201527f54726164696e67206973206e6f7420656e61626c6564207965740000000000006044820152606401610db3565b818115612d3757600554600160a01b900460ff16612b3a5760405162461bcd60e51b815260206004820152601a60248201527f54726164696e67206973206e6f7420656e61626c6564207965740000000000006044820152606401610db3565b6004546001600160a01b038681166201000090920416148015612b5e575060008054115b15612bee5760005483612b708661135f565b612b7a9190613a0b565b1115612bee5760405162461bcd60e51b815260206004820152603b60248201527f486f6c64696e6720616d6f756e7420616674657220627579696e67206578636560448201527f656473206d6178696d756d20616c6c6f77656420746f6b656e732e00000000006064820152608401610db3565b6004546001600160a01b038581166201000090920416148015612c1357506000600154115b15612c8157600154831115612c815760405162461bcd60e51b815260206004820152602e60248201527f53656c6c696e6720616d6f756e742065786365656473206d6178696d756d206160448201526d363637bbb2b2103a37b5b2b7399760911b6064820152608401610db3565b60045460ff1615612d3757600061271060025485612c9f9190613a67565b612ca99190613a7e565b9050612cb686308361212f565b856001600160a01b03167f9174fcf222375951e43519967bd54a1083271e61dab0b523b644cdf98c975f3482604051612cf191815260200190565b60405180910390a2612d038183613a37565b91508060066000828254612d179190613a0b565b925050819055508060076000828254612d309190613a0b565b9091555050505b600954600090612d4990600190613a37565b90508160098281548110612d5f57612d5f6139df565b90600052602060002090600702016005016000876001600160a01b03166001600160a01b031681526020019081526020016000206000828254612da29190613a0b565b925050819055508360098281548110612dbd57612dbd6139df565b90600052602060002090600702016006016000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254612e009190613a0b565b90915550611db49050868684613100565b6000600080516020613ce0833981519152612e2c84846115f5565b612eac576000848152602082815260408083206001600160a01b03871684529091529020805460ff19166001179055612e623390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001915050610c0f565b6000915050610c0f565b6000611027836001600160a01b03841661323e565b6000600080516020613ce0833981519152612ee684846115f5565b15612eac576000848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a46001915050610c0f565b6000611027836001600160a01b03841661328d565b600080516020613d008339815191525460ff1661244b57604051638dfc202b60e01b815260040160405180910390fd5b612f9582613376565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115612fda5761116582826133ed565b611274613463565b600080516020613d008339815191525460ff161561244b5760405163d93c066560e01b815260040160405180910390fd5b600082600001828154811061302a5761302a6139df565b9060005260206000200154905092915050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661244b57604051631afcd79f60e31b815260040160405180910390fd5b61308e61303d565b600080516020613ca08339815191527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace036130c88482613b8d565b506004810161119c8382613b8d565b6130df61303d565b600080516020613d00833981519152805460ff19169055565b61226f61303d565b600080516020613ca08339815191526001600160a01b03841661313c57818160020160008282546131319190613a0b565b909155506131ae9050565b6001600160a01b0384166000908152602082905260409020548281101561318f5760405163391434e360e21b81526001600160a01b03861660048201526024810182905260448101849052606401610db3565b6001600160a01b03851660009081526020839052604090209083900390555b6001600160a01b0383166131cc5760028101805483900390556131eb565b6001600160a01b03831660009081526020829052604090208054830190555b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161323091815260200190565b60405180910390a350505050565b600081815260018301602052604081205461328557508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610c0f565b506000610c0f565b60008181526001830160205260408120548015612eac5760006132b1600183613a37565b85549091506000906132c590600190613a37565b905080821461332a5760008660000182815481106132e5576132e56139df565b9060005260206000200154905080876000018481548110613308576133086139df565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061333b5761333b613c4d565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610c0f565b806001600160a01b03163b6000036133ac57604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610db3565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b03168460405161340a9190613c63565b600060405180830381855af49150503d8060008114613445576040519150601f19603f3d011682016040523d82523d6000602084013e61344a565b606091505b509150915061345a858383613482565b95945050505050565b341561244b5760405163b398979f60e01b815260040160405180910390fd5b60608261349757613492826134de565b611027565b81511580156134ae57506001600160a01b0384163b155b156134d757604051639996b31560e01b81526001600160a01b0385166004820152602401610db3565b5080611027565b8051156134ee5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b60006020828403121561351957600080fd5b81356001600160e01b03198116811461102757600080fd5b60005b8381101561354c578181015183820152602001613534565b50506000910152565b6020815260008251806020840152613574816040850160208701613531565b601f01601f19169190910160400192915050565b6001600160a01b038116811461125657600080fd5b600080604083850312156135b057600080fd5b82356135bb81613588565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613608576136086135c9565b604052919050565b600067ffffffffffffffff82111561362a5761362a6135c9565b5060051b60200190565b600082601f83011261364557600080fd5b8135602061365a61365583613610565b6135df565b82815260059290921b8401810191818101908684111561367957600080fd5b8286015b8481101561369d57803561369081613588565b835291830191830161367d565b509695505050505050565b600082601f8301126136b957600080fd5b813560206136c961365583613610565b82815260059290921b840181019181810190868411156136e857600080fd5b8286015b8481101561369d57803583529183019183016136ec565b60008060006060848603121561371857600080fd5b833567ffffffffffffffff8082111561373057600080fd5b61373c87838801613634565b9450602086013591508082111561375257600080fd5b61375e878388016136a8565b9350604086013591508082111561377457600080fd5b50613781868287016136a8565b9150509250925092565b6000806000606084860312156137a057600080fd5b83356137ab81613588565b925060208401356137bb81613588565b929592945050506040919091013590565b600080604083850312156137df57600080fd5b82356137ea81613588565b9150602083013567ffffffffffffffff81111561380657600080fd5b61381285828601613634565b9150509250929050565b60006020828403121561382e57600080fd5b5035919050565b6000806040838503121561384857600080fd5b82359150602083013561385a81613588565b809150509250929050565b801515811461125657600080fd5b60006020828403121561388557600080fd5b813561102781613865565b600080604083850312156138a357600080fd5b82356138ae81613588565b915060208381013567ffffffffffffffff808211156138cc57600080fd5b818601915086601f8301126138e057600080fd5b8135818111156138f2576138f26135c9565b613904601f8201601f191685016135df565b9150808252878482850101111561391a57600080fd5b80848401858401376000848284010152508093505050509250929050565b6000806040838503121561394b57600080fd5b50508035926020909101359150565b60006020828403121561396c57600080fd5b813561102781613588565b6000806040838503121561398a57600080fd5b823561399581613588565b9150602083013561385a81613588565b600181811c908216806139b957607f821691505b6020821081036139d957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610c0f57610c0f6139f5565b600060018201613a3057613a306139f5565b5060010190565b81810381811115610c0f57610c0f6139f5565b600060208284031215613a5c57600080fd5b815161102781613865565b8082028115828204841417610c0f57610c0f6139f5565b600082613a9b57634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215613ab257600080fd5b815161102781613588565b600060208284031215613acf57600080fd5b5051919050565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015613b265784516001600160a01b031683529383019391830191600101613b01565b50506001600160a01b03969096166060850152505050608001529392505050565b601f82111561116557600081815260208120601f850160051c81016020861015613b6e5750805b601f850160051c820191505b81811015611db457828155600101613b7a565b815167ffffffffffffffff811115613ba757613ba76135c9565b613bbb81613bb584546139a5565b84613b47565b602080601f831160018114613bf05760008415613bd85750858301515b600019600386901b1c1916600185901b178555611db4565b600085815260208120601f198616915b82811015613c1f57888601518255948401946001909101908401613c00565b5085821015613c3d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603160045260246000fd5b60008251613c75818460208701613531565b919091019291505056fe2bfa5424769abb48caa3faa232f6faec62b33e75ed1d06512252216b523808d652c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace005fdbd35e8da83ee755d5e62a539e5ed7f47126abede0b8b10f9ea43dc6eed07f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800cd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300a49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775c4c453d647953c0fd35db5a34ee76e60fb4abc3a8fb891a25936b70b38f29253df112b612e9caae17b7645f3b1b08e97332b1641a13ce63785457f40efa3f27c

Deployed Bytecode

0x6080604052600436106103bc5760003560e01c80637028e2cd116101f25780639e252f001161010d578063c6b61e4c116100a0578063dd62ed3e1161006f578063dd62ed3e14610b3a578063e4ef93b814610b9f578063fe85b42b14610bbf578063feb1dfcc14610bd557600080fd5b8063c6b61e4c14610a93578063ca15c87314610adb578063d547741f14610afb578063d9a553aa14610b1b57600080fd5b8063ad3cb1cc116100dc578063ad3cb1cc146109f3578063b131646014610a24578063b1a9f80914610a51578063c4d66de814610a7357600080fd5b80639e252f001461097e578063a217fddf1461099e578063a9059cbb146109b3578063a9bf2c09146109d357600080fd5b80638a9cb361116101855780639358928b116101545780639358928b1461093257806395d89b41146109475780639711715a1461095c57806398a0dd091461096457600080fd5b80638a9cb361146108bc5780638cd4426d146108d25780639010d07c146108f257806391d148541461091257600080fd5b80637ff976c7116101c15780637ff976c7146108675780638456cb591461087c578063853755fc146108915780638817f6f1146108a657600080fd5b80637028e2cd146107e357806370a082311461080557806375b238fc146108255780637cb332bb1461084757600080fd5b80632ffc1628116102e257806349cb380f1161027557806352d1902d1161024457806352d1902d14610769578063599270441461077e5780635c975abb1461079e578063667f6526146107c357600080fd5b806349cb380f146107085780634e2fe61f1461071e5780634f1ef286146107405780634f91e48c1461075357600080fd5b806337c279dc116102b157806337c279dc146106995780633f4ba83a146106af578063413e920d146106c457806349bd5a5e146106e257600080fd5b80632ffc1628146106275780633059f35614610647578063313ce5671461065d57806336568abe1461067957600080fd5b80631bf2907b1161035a57806323bf6bc61161032957806323bf6bc614610588578063244519fa146105a8578063248a9ca3146105ca5780632f2ff15d1461060757600080fd5b80631bf2907b1461052a5780631c73bca41461053d578063233edfe71461055257806323b872dd1461056857600080fd5b806306fdde031161039657806306fdde031461046a578063095ea7b31461048c5780631694505e146104ac57806318160ddd146104ec57600080fd5b806301ffc9a7146103fd57806303c051c314610432578063064a59d01461044957600080fd5b366103f85760405134815233907fa419615bc8fda4c87663805ee2a3597a6d71c1d476911d9892f340d965bc7bf19060200160405180910390a2005b600080fd5b34801561040957600080fd5b5061041d610418366004613507565b610bea565b60405190151581526020015b60405180910390f35b34801561043e57600080fd5b50610447610c15565b005b34801561045557600080fd5b5060055461041d90600160a01b900460ff1681565b34801561047657600080fd5b5061047f610c66565b6040516104299190613555565b34801561049857600080fd5b5061041d6104a736600461359d565b610d29565b3480156104b857600080fd5b506104d4737a250d5630b4cf539739df2c5dacb4c659f2488d81565b6040516001600160a01b039091168152602001610429565b3480156104f857600080fd5b507f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace02545b604051908152602001610429565b610447610538366004613703565b610d41565b34801561054957600080fd5b5060095461051c565b34801561055e57600080fd5b5061051c60075481565b34801561057457600080fd5b5061041d61058336600461378b565b611008565b34801561059457600080fd5b506104476105a33660046137cc565b61102e565b3480156105b457600080fd5b5061051c600080516020613d6083398151915281565b3480156105d657600080fd5b5061051c6105e536600461381c565b6000908152600080516020613ce0833981519152602052604090206001015490565b34801561061357600080fd5b50610447610622366004613835565b61116a565b34801561063357600080fd5b50610447610642366004613873565b6111a2565b34801561065357600080fd5b5061051c60035481565b34801561066957600080fd5b5060405160128152602001610429565b34801561068557600080fd5b50610447610694366004613835565b611203565b3480156106a557600080fd5b5061051c60065481565b3480156106bb57600080fd5b50610447611236565b3480156106d057600080fd5b5061051c69d3c21bcecceda100000081565b3480156106ee57600080fd5b506004546104d4906201000090046001600160a01b031681565b34801561071457600080fd5b5061051c60085481565b34801561072a57600080fd5b5061051c600080516020613c8083398151915281565b61044761074e366004613890565b611259565b34801561075f57600080fd5b5061051c60015481565b34801561077557600080fd5b5061051c611278565b34801561078a57600080fd5b506005546104d4906001600160a01b031681565b3480156107aa57600080fd5b50600080516020613d008339815191525460ff1661041d565b3480156107cf57600080fd5b506104476107de366004613938565b6112a7565b3480156107ef57600080fd5b5061051c600080516020613cc083398151915281565b34801561081157600080fd5b5061051c61082036600461395a565b61135f565b34801561083157600080fd5b5061051c600080516020613d2083398151915281565b34801561085357600080fd5b5061044761086236600461395a565b611387565b34801561087357600080fd5b50610447611439565b34801561088857600080fd5b50610447611490565b34801561089d57600080fd5b506104476114b0565b3480156108b257600080fd5b5061051c60005481565b3480156108c857600080fd5b5061051c61271081565b3480156108de57600080fd5b506104476108ed36600461359d565b61152b565b3480156108fe57600080fd5b506104d461090d366004613938565b6115b4565b34801561091e57600080fd5b5061041d61092d366004613835565b6115f5565b34801561093e57600080fd5b5061051c61162d565b34801561095357600080fd5b5061047f611706565b610447611745565b34801561097057600080fd5b5060045461041d9060ff1681565b34801561098a57600080fd5b5061044761099936600461381c565b611975565b3480156109aa57600080fd5b5061051c600081565b3480156109bf57600080fd5b5061041d6109ce36600461359d565b6119ba565b3480156109df57600080fd5b506104476109ee36600461381c565b6119c8565b3480156109ff57600080fd5b5061047f604051806040016040528060058152602001640352e302e360dc1b81525081565b348015610a3057600080fd5b5061051c610a3f36600461395a565b600a6020526000908152604090205481565b348015610a5d57600080fd5b5061051c600080516020613d4083398151915281565b348015610a7f57600080fd5b50610447610a8e36600461395a565b611a78565b348015610a9f57600080fd5b50610ab3610aae36600461381c565b611dbc565b604080519586526020860194909452928401919091526060830152608082015260a001610429565b348015610ae757600080fd5b5061051c610af636600461381c565b611dfd565b348015610b0757600080fd5b50610447610b16366004613835565b611e35565b348015610b2757600080fd5b5060045461041d90610100900460ff1681565b348015610b4657600080fd5b5061051c610b55366004613977565b6001600160a01b0391821660009081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace016020908152604080832093909416825291909152205490565b348015610bab57600080fd5b50610447610bba36600461381c565b611e67565b348015610bcb57600080fd5b5061051c60025481565b348015610be157600080fd5b50610447611f18565b60006001600160e01b03198216635a05180f60e01b1480610c0f5750610c0f826120e3565b92915050565b600080516020613d20833981519152610c2d81612118565b6005805460ff60a01b191690556040517ff6c0da004e5c54863f4e9c53375139d02174b08a4b6d00edcc264f31ce57092d90600090a150565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace038054606091600080516020613ca083398151915291610ca5906139a5565b80601f0160208091040260200160405190810160405280929190818152602001828054610cd1906139a5565b8015610d1e5780601f10610cf357610100808354040283529160200191610d1e565b820191906000526020600020905b815481529060010190602001808311610d0157829003601f168201915b505050505091505090565b600033610d37818585612122565b5060019392505050565b600080516020613cc0833981519152610d5981612118565b82518451148015610d6b575081518451145b610dbc5760405162461bcd60e51b815260206004820152601560248201527f496e76616c696420696e707574206c656e67746873000000000000000000000060448201526064015b60405180910390fd5b60008060005b8551811015610e0457858181518110610ddd57610ddd6139df565b602002602001015183610df09190613a0b565b925080610dfc81613a1e565b915050610dc2565b5060005b8451811015610e4a57848181518110610e2357610e236139df565b602002602001015182610e369190613a0b565b915080610e4281613a1e565b915050610e08565b5081610e553361135f565b1015610ea35760405162461bcd60e51b815260206004820152601a60248201527f496e73756666696369656e7420746f6b656e2062616c616e63650000000000006044820152606401610db3565b80341015610ef35760405162461bcd60e51b815260206004820152601760248201527f496e73756666696369656e742045746865722073656e740000000000000000006044820152606401610db3565b60005b8651811015610fff576000868281518110610f1357610f136139df565b60200260200101511115610f5e57610f5e33888381518110610f3757610f376139df565b6020026020010151888481518110610f5157610f516139df565b602002602001015161212f565b6000858281518110610f7257610f726139df565b60200260200101511115610fed57868181518110610f9257610f926139df565b60200260200101516001600160a01b03166108fc868381518110610fb857610fb86139df565b60200260200101519081150290604051600060405180830381858888f19350505050158015610feb573d6000803e3d6000fd5b505b80610ff781613a1e565b915050610ef6565b50505050505050565b60003361101685828561218e565b61102185858561212f565b60019150505b9392505050565b600080516020613cc083398151915261104681612118565b61104e612225565b60005b82518110156110be5760095461106990600290613a37565b600a600085848151811061107f5761107f6139df565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000208190555080806110b690613a1e565b915050611051565b5060405147906001600160a01b0385169082156108fc029083906000818181858888f193505050501580156110f7573d6000803e3d6000fd5b50836001600160a01b03167fdfe185ebaf59643e75abd7c7f4e5afcb58aa0bef1bdb941d1c23265bb89dcfce8260405161113391815260200190565b60405180910390a25061116560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b6000828152600080516020613ce0833981519152602052604090206001015461119281612118565b61119c8383612295565b50505050565b600080516020613d208339815191526111ba81612118565b6004805460ff19168315159081179091556040519081527f540a527e51aeab0dddfb9797856930b60ffa5937b1d134ccf4e271a797dbe70a906020015b60405180910390a15050565b6001600160a01b038116331461122c5760405163334bd91960e11b815260040160405180910390fd5b61116582826122ec565b600080516020613d2083398151915261124e81612118565b61125661233a565b50565b611261612394565b61126a8261244d565b6112748282612458565b5050565b6000611282612527565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b600080516020613d208339815191526112bf81612118565b61271083111580156112cf575060015b80156112dd57506127108211155b6113175760405162461bcd60e51b815260206004820152600b60248201526a092dcecc2d8d2c840e8c2f60ab1b6044820152606401610db3565b6002839055600382905560408051848152602081018490527f4ac0d6b0d694ec6c120242feaca94cfb6fbfe646756cd7026301e3a5984f0450910160405180910390a1505050565b6001600160a01b03166000908152600080516020613ca0833981519152602052604090205490565b600080516020613d2083398151915261139f81612118565b6001600160a01b0382166113eb5760405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a59081d19585b481dd85b1b195d606a1b6044820152606401610db3565b600580546001600160a01b0319166001600160a01b0384169081179091556040519081527ff6215f245bfd24e51265c56ef650fdd856aa4ece6221ee1ef395bbe0a5558010906020016111f7565b600080516020613d2083398151915261145181612118565b6005805460ff60a01b1916600160a01b1790556040517f2d4fd5bae8f53dd83c59664d82f3c9a17a251e2ac3b1af3d85d6bec37d098f9f90600090a150565b600080516020613d208339815191526114a881612118565b611256612570565b600080516020613cc08339815191526114c881612118565b6004805460ff610100808304821615810261ff001990931692909217928390556040517f406c46ebfaaea47203daefc50a4298117dc2a4d07342d50b54b526c8316b0d8f936115209390049091161515815260200190565b60405180910390a150565b600080516020613d4083398151915261154381612118565b60405163a9059cbb60e01b8152336004820152602481018390526001600160a01b0384169063a9059cbb906044016020604051808303816000875af1158015611590573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119c9190613a4a565b60008281527fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e823717059320006020819052604082206115ed90846125b9565b949350505050565b6000918252600080516020613ce0833981519152602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600080611647600080516020613c80833981519152611dfd565b90506000805b8281101561168e57611670610820600080516020613c80833981519152836115b4565b61167a9083613a0b565b91508061168681613a1e565b91505061164d565b506116983061135f565b6116a29082613a0b565b6004549091506116c0906201000090046001600160a01b031661135f565b6116ca9082613a0b565b9050806116f57f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace025490565b6116ff9190613a37565b9250505090565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace048054606091600080516020613ca083398151915291610ca5906139a5565b600080516020613cc083398151915261175d81612118565b611765612225565b600980546000919061177990600190613a37565b81548110611789576117896139df565b6000918252602082204260079092020190815591506117a661162d565b600754909150801515806117ba5750600034115b6118125760405162461bcd60e51b8152602060048201526024808201527f4e6f2074617820636f6c6c65637465642079657420616e64206e6f20455448206044820152631cd95b9d60e21b6064820152608401610db3565b8061181c3061135f565b101561186a5760405162461bcd60e51b815260206004820152601a60248201527f42616c616e6365206c657373207468616e2072657175697265640000000000006044820152606401610db3565b600080821161187a576000611883565b611883826125c5565b90506000600254600354836118989190613a67565b6118a29190613a7e565b905060006118b08284613a37565b6005546040519192506001600160a01b03169083156108fc029084906000818181858888f193505050501580156118eb573d6000803e3d6000fd5b5060018601859055346004870181905560028701859055600387018290556009546040805191825260208201889052810183905260608101919091527f2b7e220b2babc392b7f28bbfb51e48a8ae7ab8d75e59253607e2483dd411edb79060800160405180910390a15050600980546001018155600090815260075550611256925061226f915050565b600080516020613d4083398151915261198d81612118565b604051339083156108fc029084906000818181858888f19350505050158015611165573d6000803e3d6000fd5b600033610d3781858561212f565b600080516020613d208339815191526119e081612118565b69d3c21bcecceda1000000821115611a3a5760405162461bcd60e51b815260206004820152601a60248201527f496e76616c69642073656c6c2062616c616e6365206c696d69740000000000006044820152606401610db3565b600182905560005460408051918252602082018490527f71d2b4d3f228f2d75fd480fb859115900b1af3df7a4f93fdff075e55271d808191016111f7565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff16600081158015611abe5750825b905060008267ffffffffffffffff166001148015611adb5750303b155b905081158015611ae9575080155b15611b075760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315611b3157845460ff60401b1916600160401b1785555b6001600160a01b038616611b585760405163d92e233d60e01b815260040160405180910390fd5b611b9c60405180604001604052806005815260200164078706572760dc1b81525060405180604001604052806005815260200164078706572760dc1b815250612796565b611ba46127a8565b611bac6127b0565b611bb46127a8565b611bbc6127c0565b6005805461015e60025560966003556004805474ffffffffffffffffffffffffffffffffffffffffff199092166001600160a01b038a161790925569021e19e0c9bab24000006000818155600191825561ffff1990921617909155611c2190806127d0565b611c39600080516020613d20833981519152806127d0565b611c5f600080516020613c80833981519152600080516020613d208339815191526127d0565b611c85600080516020613d60833981519152600080516020613d208339815191526127d0565b611c9d600080516020613cc0833981519152806127d0565b611cc3600080516020613d40833981519152600080516020613d208339815191526127d0565b611cdb600080516020613d2083398151915233612295565b50611cf4600080516020613c8083398151915233612295565b50611d0d600080516020613d6083398151915233612295565b50611d26600080516020613cc083398151915233612295565b50611d3f600080516020613d4083398151915233612295565b50611d4b600033612295565b506009805460008290526002019055611d6e3369d3c21bcecceda1000000612850565b8315611db457845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050565b60098181548110611dcc57600080fd5b6000918252602090912060079091020180546001820154600283015460038401546004909401549294509092909185565b60008181527fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e8237170593200060208190526040822061102790612886565b6000828152600080516020613ce08339815191526020526040902060010154611e5d81612118565b61119c83836122ec565b600080516020613d20833981519152611e7f81612118565b69d3c21bcecceda1000000821115611ed95760405162461bcd60e51b815260206004820152601c60248201527f496e76616c69642077616c6c65742062616c616e6365206c696d6974000000006044820152606401610db3565b60008290556001546040805184815260208101929092527f71d2b4d3f228f2d75fd480fb859115900b1af3df7a4f93fdff075e55271d808191016111f7565b600080516020613d20833981519152611f3081612118565b737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fa69190613aa0565b6001600160a01b031663c9c6539630737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015612007573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061202b9190613aa0565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015612078573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061209c9190613aa0565b600460026101000a8154816001600160a01b0302191690836001600160a01b0316021790555061125630737a250d5630b4cf539739df2c5dacb4c659f2488d600019612122565b60006001600160e01b03198216637965db0b60e01b1480610c0f57506301ffc9a760e01b6001600160e01b0319831614610c0f565b6112568133612890565b61116583838360016128c9565b6001600160a01b03831661215957604051634b637e8f60e11b815260006004820152602401610db3565b6001600160a01b0382166121835760405163ec442f0560e01b815260006004820152602401610db3565b6111658383836129b1565b6001600160a01b0383811660009081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace016020908152604080832093861683529290522054600019811461119c578181101561221657604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610db3565b61119c848484840360006128c9565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0080546001190161226957604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b60007fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e82371705932000816122c38585612e11565b905080156115ed5760008581526020839052604090206122e39085612eb6565b50949350505050565b60007fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e823717059320008161231a8585612ecb565b905080156115ed5760008581526020839052604090206122e39085612f47565b612342612f5c565b600080516020613d00833981519152805460ff191681557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b039091168152602001611520565b306001600160a01b037f00000000000000000000000048e06d732f8f1bc4644b0b195a115d5d5a8ce8c916148061242d57507f00000000000000000000000048e06d732f8f1bc4644b0b195a115d5d5a8ce8c96001600160a01b03166124217f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614155b1561244b5760405163703e46dd60e11b815260040160405180910390fd5b565b600061127481612118565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156124b2575060408051601f3d908101601f191682019092526124af91810190613abd565b60015b6124da57604051634c9c8ce360e01b81526001600160a01b0383166004820152602401610db3565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc811461251d57604051632a87526960e21b815260048101829052602401610db3565b6111658383612f8c565b306001600160a01b037f00000000000000000000000048e06d732f8f1bc4644b0b195a115d5d5a8ce8c9161461244b5760405163703e46dd60e11b815260040160405180910390fd5b612578612fe2565b600080516020613d00833981519152805460ff191660011781557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2583361237c565b60006110278383613013565b6000816000036125d757506000919050565b604080516002808252606082018352600092602083019080368337019050509050308160008151811061260c5761260c6139df565b60200260200101906001600160a01b031690816001600160a01b031681525050737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561267e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126a29190613aa0565b816001815181106126b5576126b56139df565b6001600160a01b039092166020928302919091019091015260405163791ac94760e01b81524790737a250d5630b4cf539739df2c5dacb4c659f2488d9063791ac9479061270f908790600090879030904290600401613ad6565b600060405180830381600087803b15801561272957600080fd5b505af115801561273d573d6000803e3d6000fd5b504792506000915061275190508383613a37565b60408051888152602081018390529192507fa0948473da2b862876c9b294bc55a32b178b0e3c6c9da3c91555924ec8017ee9910160405180910390a195945050505050565b61279e61303d565b6112748282613086565b61244b61303d565b6127b861303d565b61244b6130d7565b6127c861303d565b61244b6130f8565b600080516020613ce08339815191526000612807846000908152600080516020613ce0833981519152602052604090206001015490565b600085815260208490526040808220600101869055519192508491839187917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a450505050565b6001600160a01b03821661287a5760405163ec442f0560e01b815260006004820152602401610db3565b611274600083836129b1565b6000610c0f825490565b61289a82826115f5565b6112745760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610db3565b600080516020613ca08339815191526001600160a01b0385166129025760405163e602df0560e01b815260006004820152602401610db3565b6001600160a01b03841661292c57604051634a1406b160e11b815260006004820152602401610db3565b6001600160a01b038086166000908152600183016020908152604080832093881683529290522083905581156129aa57836001600160a01b0316856001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925856040516129a191815260200190565b60405180910390a35b5050505050565b6004546000906001600160a01b03858116620100009092041614806129e957506004546001600160a01b038481166201000090920416145b8015612a09575033737a250d5630b4cf539739df2c5dacb4c659f2488d14155b8015612a1e57506001600160a01b0384163014155b8015612a3357506001600160a01b0383163014155b8015612a545750612a52600080516020613d60833981519152856115f5565b155b8015612a755750612a73600080516020613d60833981519152846115f5565b155b600554909150600160a01b900460ff1680612a8e575080155b612ada5760405162461bcd60e51b815260206004820152601a60248201527f54726164696e67206973206e6f7420656e61626c6564207965740000000000006044820152606401610db3565b818115612d3757600554600160a01b900460ff16612b3a5760405162461bcd60e51b815260206004820152601a60248201527f54726164696e67206973206e6f7420656e61626c6564207965740000000000006044820152606401610db3565b6004546001600160a01b038681166201000090920416148015612b5e575060008054115b15612bee5760005483612b708661135f565b612b7a9190613a0b565b1115612bee5760405162461bcd60e51b815260206004820152603b60248201527f486f6c64696e6720616d6f756e7420616674657220627579696e67206578636560448201527f656473206d6178696d756d20616c6c6f77656420746f6b656e732e00000000006064820152608401610db3565b6004546001600160a01b038581166201000090920416148015612c1357506000600154115b15612c8157600154831115612c815760405162461bcd60e51b815260206004820152602e60248201527f53656c6c696e6720616d6f756e742065786365656473206d6178696d756d206160448201526d363637bbb2b2103a37b5b2b7399760911b6064820152608401610db3565b60045460ff1615612d3757600061271060025485612c9f9190613a67565b612ca99190613a7e565b9050612cb686308361212f565b856001600160a01b03167f9174fcf222375951e43519967bd54a1083271e61dab0b523b644cdf98c975f3482604051612cf191815260200190565b60405180910390a2612d038183613a37565b91508060066000828254612d179190613a0b565b925050819055508060076000828254612d309190613a0b565b9091555050505b600954600090612d4990600190613a37565b90508160098281548110612d5f57612d5f6139df565b90600052602060002090600702016005016000876001600160a01b03166001600160a01b031681526020019081526020016000206000828254612da29190613a0b565b925050819055508360098281548110612dbd57612dbd6139df565b90600052602060002090600702016006016000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254612e009190613a0b565b90915550611db49050868684613100565b6000600080516020613ce0833981519152612e2c84846115f5565b612eac576000848152602082815260408083206001600160a01b03871684529091529020805460ff19166001179055612e623390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001915050610c0f565b6000915050610c0f565b6000611027836001600160a01b03841661323e565b6000600080516020613ce0833981519152612ee684846115f5565b15612eac576000848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a46001915050610c0f565b6000611027836001600160a01b03841661328d565b600080516020613d008339815191525460ff1661244b57604051638dfc202b60e01b815260040160405180910390fd5b612f9582613376565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115612fda5761116582826133ed565b611274613463565b600080516020613d008339815191525460ff161561244b5760405163d93c066560e01b815260040160405180910390fd5b600082600001828154811061302a5761302a6139df565b9060005260206000200154905092915050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661244b57604051631afcd79f60e31b815260040160405180910390fd5b61308e61303d565b600080516020613ca08339815191527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace036130c88482613b8d565b506004810161119c8382613b8d565b6130df61303d565b600080516020613d00833981519152805460ff19169055565b61226f61303d565b600080516020613ca08339815191526001600160a01b03841661313c57818160020160008282546131319190613a0b565b909155506131ae9050565b6001600160a01b0384166000908152602082905260409020548281101561318f5760405163391434e360e21b81526001600160a01b03861660048201526024810182905260448101849052606401610db3565b6001600160a01b03851660009081526020839052604090209083900390555b6001600160a01b0383166131cc5760028101805483900390556131eb565b6001600160a01b03831660009081526020829052604090208054830190555b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161323091815260200190565b60405180910390a350505050565b600081815260018301602052604081205461328557508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610c0f565b506000610c0f565b60008181526001830160205260408120548015612eac5760006132b1600183613a37565b85549091506000906132c590600190613a37565b905080821461332a5760008660000182815481106132e5576132e56139df565b9060005260206000200154905080876000018481548110613308576133086139df565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061333b5761333b613c4d565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610c0f565b806001600160a01b03163b6000036133ac57604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610db3565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b03168460405161340a9190613c63565b600060405180830381855af49150503d8060008114613445576040519150601f19603f3d011682016040523d82523d6000602084013e61344a565b606091505b509150915061345a858383613482565b95945050505050565b341561244b5760405163b398979f60e01b815260040160405180910390fd5b60608261349757613492826134de565b611027565b81511580156134ae57506001600160a01b0384163b155b156134d757604051639996b31560e01b81526001600160a01b0385166004820152602401610db3565b5080611027565b8051156134ee5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b60006020828403121561351957600080fd5b81356001600160e01b03198116811461102757600080fd5b60005b8381101561354c578181015183820152602001613534565b50506000910152565b6020815260008251806020840152613574816040850160208701613531565b601f01601f19169190910160400192915050565b6001600160a01b038116811461125657600080fd5b600080604083850312156135b057600080fd5b82356135bb81613588565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613608576136086135c9565b604052919050565b600067ffffffffffffffff82111561362a5761362a6135c9565b5060051b60200190565b600082601f83011261364557600080fd5b8135602061365a61365583613610565b6135df565b82815260059290921b8401810191818101908684111561367957600080fd5b8286015b8481101561369d57803561369081613588565b835291830191830161367d565b509695505050505050565b600082601f8301126136b957600080fd5b813560206136c961365583613610565b82815260059290921b840181019181810190868411156136e857600080fd5b8286015b8481101561369d57803583529183019183016136ec565b60008060006060848603121561371857600080fd5b833567ffffffffffffffff8082111561373057600080fd5b61373c87838801613634565b9450602086013591508082111561375257600080fd5b61375e878388016136a8565b9350604086013591508082111561377457600080fd5b50613781868287016136a8565b9150509250925092565b6000806000606084860312156137a057600080fd5b83356137ab81613588565b925060208401356137bb81613588565b929592945050506040919091013590565b600080604083850312156137df57600080fd5b82356137ea81613588565b9150602083013567ffffffffffffffff81111561380657600080fd5b61381285828601613634565b9150509250929050565b60006020828403121561382e57600080fd5b5035919050565b6000806040838503121561384857600080fd5b82359150602083013561385a81613588565b809150509250929050565b801515811461125657600080fd5b60006020828403121561388557600080fd5b813561102781613865565b600080604083850312156138a357600080fd5b82356138ae81613588565b915060208381013567ffffffffffffffff808211156138cc57600080fd5b818601915086601f8301126138e057600080fd5b8135818111156138f2576138f26135c9565b613904601f8201601f191685016135df565b9150808252878482850101111561391a57600080fd5b80848401858401376000848284010152508093505050509250929050565b6000806040838503121561394b57600080fd5b50508035926020909101359150565b60006020828403121561396c57600080fd5b813561102781613588565b6000806040838503121561398a57600080fd5b823561399581613588565b9150602083013561385a81613588565b600181811c908216806139b957607f821691505b6020821081036139d957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610c0f57610c0f6139f5565b600060018201613a3057613a306139f5565b5060010190565b81810381811115610c0f57610c0f6139f5565b600060208284031215613a5c57600080fd5b815161102781613865565b8082028115828204841417610c0f57610c0f6139f5565b600082613a9b57634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215613ab257600080fd5b815161102781613588565b600060208284031215613acf57600080fd5b5051919050565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015613b265784516001600160a01b031683529383019391830191600101613b01565b50506001600160a01b03969096166060850152505050608001529392505050565b601f82111561116557600081815260208120601f850160051c81016020861015613b6e5750805b601f850160051c820191505b81811015611db457828155600101613b7a565b815167ffffffffffffffff811115613ba757613ba76135c9565b613bbb81613bb584546139a5565b84613b47565b602080601f831160018114613bf05760008415613bd85750858301515b600019600386901b1c1916600185901b178555611db4565b600085815260208120601f198616915b82811015613c1f57888601518255948401946001909101908401613c00565b5085821015613c3d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603160045260246000fd5b60008251613c75818460208701613531565b919091019291505056fe2bfa5424769abb48caa3faa232f6faec62b33e75ed1d06512252216b523808d652c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace005fdbd35e8da83ee755d5e62a539e5ed7f47126abede0b8b10f9ea43dc6eed07f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800cd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300a49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775c4c453d647953c0fd35db5a34ee76e60fb4abc3a8fb891a25936b70b38f29253df112b612e9caae17b7645f3b1b08e97332b1641a13ce63785457f40efa3f27c

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.