ETH Price: $2,494.42 (-1.60%)

Token

F.A.P. Inu (Fap)
 

Overview

Max Total Supply

42,000,000,000,000 Fap

Holders

1

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Balance
42,000,000,000,000 Fap

Value
$0.00
0x3d3D73E3E491BF293D0e410527EC3C69c0a85ec7
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x3FEf234d...FCfC0F8A1
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
TokenFiERC20

Compiler Version
v0.8.23+commit.f704f362

Optimization Enabled:
Yes with 10 runs

Other Settings:
london EvmVersion, MIT license
File 1 of 22 : TokenFiERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;

import { AccessControl } from "@openzeppelin/contracts/access/AccessControl.sol";
import { ERC20, IERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import { EnumerableSet } from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import { IUniswapV2Router02 } from "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";

import { ITokenLauncherERC20 } from "../interfaces/ITokenLauncherERC20.sol";
import { ITokenLauncherLiquidityPoolFactory } from "../interfaces/ITokenLauncherLiquidityPoolFactory.sol";
import { IBuyBackHandler } from "../interfaces/IBuyBackHandler.sol";

contract TokenFiERC20 is ERC20, AccessControl {
    using EnumerableSet for EnumerableSet.AddressSet;
    using SafeERC20 for IERC20;

    bytes32 public constant FEE_MANAGER_ROLE = keccak256("FEE_MANAGER_ROLE");

    address public treasury;
    uint256 public maxSupply;
    string public logo;
    ITokenLauncherERC20.Fees public fees;
    ITokenLauncherLiquidityPoolFactory.BuyBackDetails public buybackDetails;
    address public buybackHandler;
    address public tokenLauncher;
    bool public isReflectionToken;
    uint8 private _decimals;

    address public constant BURN_ADDRESS = 0x000000000000000000000000000000000000dEaD;
    uint256 public constant MULTIPLIER_BASIS = 1e4;

    /// @dev The set of addresses exempt from tax.
    EnumerableSet.AddressSet private _exemptedFromTax;

    /// @dev Set of exchange pool addresses.
    EnumerableSet.AddressSet internal _exchangePools;

    /// @dev Set of Reflection variables
    uint256 public constant MAX = type(uint256).max / 2;

    mapping(address => uint256) private _rOwned;
    mapping(address => uint256) private _tOwned;

    mapping(address => bool) private _isExcludedFromReflectionRewards;
    address[] private _excluded;

    struct TotalReflection {
        uint256 t;
        uint256 r;
        uint256 tFee;
    }
    TotalReflection public totalReflection;

    event ExemptedAdded(address indexed account);
    event ExemptedRemoved(address indexed account);
    event ExchangePoolAdded(address indexed pool);
    event ExchangePoolRemoved(address indexed pool);
    event TokenLauncherUpdated(address indexed newTokenLauncher);
    event TransferTax(address indexed account, address indexed receiver, uint256 amount, string indexed taxType);
    event BuyBackDetailsUpdated(address indexed router, address indexed pairToken, uint256 liquidityBasisPoints, uint256 priceImpactBasisPoints);

    constructor(ITokenLauncherERC20.CreateErc20Input memory _input) ERC20(_input.name, _input.symbol) {
        require(_input.owner != address(0), "TokenFiERC20: owner cannot be Address Zero ");
        require(_input.maxSupply >= _input.initialSupply, "TokenFiERC20: initialSupply cannot be greater than maxSupply");
        treasury = _input.treasury;
        maxSupply = _input.maxSupply;
        logo = _input.logo;
        _decimals = _input.decimals;
        uint256 maxFee = _input.fees.transferFee.percentage + _input.fees.burn.percentage + _input.fees.reflection.percentage + _input.fees.buyback.percentage;
        require(maxFee <= MULTIPLIER_BASIS, "TokenFiERC20: fees sum must be less than 100%");

        fees = _input.fees;
        buybackHandler = _input.buybackHandler;

        if (_input.fees.reflection.percentage > 0) {
            require(_input.initialSupply > 0, "TokenFiERC20.constructor: initialSupply must be greater than 0");
            totalReflection.r = (MAX - (MAX % _input.initialSupply));
            _rOwned[_input.treasury] = totalReflection.r;
            totalReflection.t = _input.initialSupply;
            _tOwned[_input.treasury] = _input.initialSupply;
            isReflectionToken = true;
            emit Transfer(address(0), _input.treasury, _input.initialSupply);
        } else {
            _mint(_input.treasury, _input.initialSupply);
        }

        // Exempt the buyback handler, treasury and burn address
        _exemptedFromTax.add(_input.buybackHandler);

        tokenLauncher = msg.sender;
        _grantRole(DEFAULT_ADMIN_ROLE, _input.owner);
        _grantRole(FEE_MANAGER_ROLE, tokenLauncher);
        _grantRole(DEFAULT_ADMIN_ROLE, _input.tokenStore);
    }

    function decimals() public view override returns (uint8) {
        return _decimals;
    }

    function setBuybackDetails(ITokenLauncherLiquidityPoolFactory.BuyBackDetails memory _buybackDetails) external onlyRole(FEE_MANAGER_ROLE) {
        if (fees.buyback.percentage > 0) {
            require(_buybackDetails.liquidityBasisPoints <= MULTIPLIER_BASIS, "TokenFiERC20: liquidityBasisPoints must be less than 10,000");
            require(_buybackDetails.priceImpactBasisPoints <= MULTIPLIER_BASIS, "TokenFiERC20: priceImpactBasisPoints must be less than 10,000");
            require(_buybackDetails.router != address(0), "TokenFiERC20: router cannot be empty");
            require(_buybackDetails.pairToken != address(0), "TokenFiERC20: pairToken cannot be empty");
        }
        buybackDetails = _buybackDetails;

        emit BuyBackDetailsUpdated(
            _buybackDetails.router,
            _buybackDetails.pairToken,
            _buybackDetails.liquidityBasisPoints,
            _buybackDetails.priceImpactBasisPoints
        );
    }

    function addExchangePool(address pool) external onlyRole(FEE_MANAGER_ROLE) {
        require(pool != address(0), "TokenFiERC20: address cannot be empty");
        _exchangePools.add(pool);
        emit ExchangePoolAdded(pool);
    }

    function addExemptAddress(address account) external onlyRole(FEE_MANAGER_ROLE) {
        _exemptedFromTax.add(account);
        emit ExemptedAdded(account);
    }

    function updateFees(ITokenLauncherERC20.Fees memory _fees) external onlyRole(DEFAULT_ADMIN_ROLE) {
        if (isReflectionToken) {
            require(_fees.reflection.percentage > 0, "TokenFiERC20: reflection percentage must be non-zero");
        } else {
            require(_fees.reflection.percentage == 0, "TokenFiERC20: reflection percentage must be zero");
        }
        uint256 maxFee = _fees.transferFee.percentage + _fees.burn.percentage + _fees.reflection.percentage + _fees.buyback.percentage;
        require(maxFee <= MULTIPLIER_BASIS, "TokenFiERC20: fees sum must be less than 100%");
        fees = _fees;
    }

    function isExemptedFromTax(address account) external view returns (bool) {
        return _exemptedFromTax.contains(account);
    }

    function isExchangePool(address pool) external view returns (bool) {
        return _exchangePools.contains(pool);
    }

    function balanceOf(address account) public view override returns (uint256) {
        if (isReflectionToken) {
            return _balanceOfReflection(account);
        }
        return super.balanceOf(account);
    }

    function totalSupply() public view override returns (uint256) {
        if (isReflectionToken) {
            return totalReflection.t;
        }
        return super.totalSupply();
    }

    /// @dev functions for Reflection

    function isExcludedFromReflectionRewards(address account) public view returns (bool) {
        return _isExcludedFromReflectionRewards[account] || account == address(this);
    }

    function reflect(uint256 tAmount) external onlyReflection {
        address sender = _msgSender();
        require(!isExcludedFromReflectionRewards(sender), "Excluded addresses cannot call this function");
        (uint256 rAmount, , , , ) = _getValues(tAmount, tAmount, false, true);
        _rOwned[sender] = _rOwned[sender] - rAmount;
        totalReflection.r = totalReflection.r - rAmount;
        totalReflection.tFee = totalReflection.tFee + tAmount;
    }

    function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns (uint256) {
        require(tAmount <= totalReflection.t, "Amount must be less than supply");
        if (!deductTransferFee) {
            (uint256 rAmount, , , , ) = _getValues(tAmount, tAmount, false, true);
            return rAmount;
        } else {
            (, uint256 rTransferAmount, , , ) = _getValues(tAmount, tAmount, false, true);
            return rTransferAmount;
        }
    }

    function tokenFromReflection(uint256 rAmount) public view returns (uint256) {
        require(rAmount <= totalReflection.r, "Amount must be less than total reflections");
        uint256 currentRate = _getRate();
        return rAmount / currentRate;
    }

    function excludeAccount(address account) external onlyReflection onlyFromAdminOrLauncher {
        require(!isExcludedFromReflectionRewards(account), "Account is already excluded");
        if (_rOwned[account] > 0) {
            _tOwned[account] = tokenFromReflection(_rOwned[account]);
        }
        _isExcludedFromReflectionRewards[account] = true;
        _excluded.push(account);
    }

    function includeAccount(address account) external onlyReflection onlyFromAdminOrLauncher {
        require(isExcludedFromReflectionRewards(account), "Account is already included");
        for (uint256 i = 0; i < _excluded.length; i++) {
            if (_excluded[i] == account) {
                uint256 currentRate = _getRate();
                totalReflection.r = totalReflection.r - _rOwned[account];
                _rOwned[account] = _tOwned[account] * currentRate;
                _tOwned[account] = 0;
                totalReflection.r = totalReflection.r + _rOwned[account];

                _isExcludedFromReflectionRewards[account] = false;
                _excluded[i] = _excluded[_excluded.length - 1];
                _excluded.pop();
                break;
            }
        }
    }

    function totalFees() public view returns (uint256) {
        return totalReflection.tFee;
    }

    function _balanceOfReflection(address account) private view returns (uint256) {
        if (isExcludedFromReflectionRewards(account)) return _tOwned[account];
        return tokenFromReflection(_rOwned[account]);
    }

    function _transferStandard(
        address sender,
        address recipient,
        // solhint-disable-next-line
        uint256 tAmount,
        // solhint-disable-next-line
        uint256 tTransferAmount,
        uint256 rAmount,
        uint256 rTransferAmount,
        bool shouldReflectFee
    ) private {
        _rOwned[sender] = _rOwned[sender] - rAmount;
        if (shouldReflectFee) {
            _rOwned[recipient] = _rOwned[recipient] + rTransferAmount;
        } else {
            _rOwned[recipient] = _rOwned[recipient] + rAmount;
        }
    }

    function _transferToExcluded(
        address sender,
        address recipient,
        uint256 tAmount,
        uint256 tTransferAmount,
        uint256 rAmount,
        uint256 rTransferAmount,
        bool shouldReflectFee
    ) private {
        _rOwned[sender] = _rOwned[sender] - rAmount;
        if (shouldReflectFee) {
            _tOwned[recipient] = _tOwned[recipient] + tTransferAmount;
            _rOwned[recipient] = _rOwned[recipient] + rTransferAmount;
        } else {
            _tOwned[recipient] = _tOwned[recipient] + tAmount;
            _rOwned[recipient] = _rOwned[recipient] + rAmount;
        }
    }

    function _transferFromExcluded(
        address sender,
        address recipient,
        uint256 tAmount,
        // solhint-disable-next-line
        uint256 tTransferAmount,
        uint256 rAmount,
        uint256 rTransferAmount,
        bool shouldReflectFee
    ) private {
        _tOwned[sender] = _tOwned[sender] - tAmount;
        _rOwned[sender] = _rOwned[sender] - rAmount;
        if (shouldReflectFee) {
            _rOwned[recipient] = _rOwned[recipient] + rTransferAmount;
        } else {
            _rOwned[recipient] = _rOwned[recipient] + rAmount;
        }
    }

    function _transferBothExcluded(
        address sender,
        address recipient,
        uint256 tAmount,
        uint256 tTransferAmount,
        uint256 rAmount,
        uint256 rTransferAmount,
        bool shouldReflectFee
    ) private {
        _tOwned[sender] = _tOwned[sender] - tAmount;
        _rOwned[sender] = _rOwned[sender] - rAmount;
        if (shouldReflectFee) {
            _tOwned[recipient] = _tOwned[recipient] + tTransferAmount;
            _rOwned[recipient] = _rOwned[recipient] + rTransferAmount;
        } else {
            _tOwned[recipient] = _tOwned[recipient] + tAmount;
            _rOwned[recipient] = _rOwned[recipient] + rAmount;
        }
    }

    function _reflectFee(uint256 rFee, uint256 tFee) private {
        totalReflection.r = totalReflection.r - rFee;
        totalReflection.tFee = totalReflection.tFee + tFee;
    }

    function _getValues(
        uint256 tAmount,
        uint256 tAmountOriginal,
        bool isSwap,
        bool shouldReflectFee
    ) private view returns (uint256, uint256, uint256, uint256, uint256) {
        (uint256 tTransferAmount, uint256 tFee) = _getTValues(tAmount, tAmountOriginal, isSwap, shouldReflectFee);

        uint256 currentRate = _getRate();
        (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, currentRate);
        return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee);
    }

    function _getTValues(uint256 tAmount, uint256 tAmountOriginal, bool isSwap, bool shouldReflectFee) private view returns (uint256, uint256) {
        bool shouldReflect = (!fees.reflection.onlyOnSwaps || isSwap);
        if (!shouldReflect || !shouldReflectFee) return (tAmount, 0);
        uint256 tFee = (tAmountOriginal * fees.reflection.percentage) / MULTIPLIER_BASIS;
        uint256 tTransferAmount = tAmount - tFee;
        return (tTransferAmount, tFee);
    }

    function _getRValues(uint256 tAmount, uint256 tFee, uint256 currentRate) private pure returns (uint256, uint256, uint256) {
        uint256 rAmount = tAmount * currentRate;
        uint256 rFee = tFee * currentRate;
        uint256 rTransferAmount = rAmount - rFee;
        return (rAmount, rTransferAmount, rFee);
    }

    function _getRate() private view returns (uint256) {
        (uint256 rSupply, uint256 tSupply) = _getCurrentSupply();
        return rSupply / tSupply;
    }

    function _getCurrentSupply() private view returns (uint256, uint256) {
        uint256 rSupply = totalReflection.r;
        uint256 tSupply = totalReflection.t;
        for (uint256 i = 0; i < _excluded.length; i++) {
            if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (totalReflection.r, totalReflection.t);
            rSupply = rSupply - _rOwned[_excluded[i]];
            tSupply = tSupply - _tOwned[_excluded[i]];
        }
        if (rSupply < totalReflection.r / totalReflection.t) return (totalReflection.r, totalReflection.t);
        return (rSupply, tSupply);
    }

    function removeExchangePool(address pool) external onlyRole(FEE_MANAGER_ROLE) {
        _exchangePools.remove(pool);
        emit ExchangePoolRemoved(pool);
    }

    function removeExemptAddress(address account) external onlyRole(FEE_MANAGER_ROLE) {
        _exemptedFromTax.remove(account);
        emit ExemptedRemoved(account);
    }

    function _transfer(address sender, address recipient, uint256 amount) internal virtual override {
        bool isSwap = _isSwap(sender, recipient);
        bool exemptedFromTax = _isExemptedFromTax(sender, recipient);
        uint256 originalAmount = amount;
        if (fees.transferFee.percentage > 0 && (!fees.transferFee.onlyOnSwaps || isSwap) && !exemptedFromTax) {
            uint256 transferFee = (originalAmount * fees.transferFee.percentage) / MULTIPLIER_BASIS;
            _transferInternal(sender, treasury, transferFee, originalAmount, false);
            amount -= transferFee;
            emit TransferTax(sender, treasury, transferFee, "transferFee");
        }
        if (fees.burn.percentage > 0 && (!fees.burn.onlyOnSwaps || isSwap) && !exemptedFromTax) {
            uint256 burnFee = (originalAmount * fees.burn.percentage) / MULTIPLIER_BASIS;
            _transferInternal(sender, BURN_ADDRESS, burnFee, originalAmount, false);
            amount -= burnFee;
            emit TransferTax(sender, BURN_ADDRESS, burnFee, "burnFee");
        }
        if (fees.buyback.percentage > 0 && (!fees.buyback.onlyOnSwaps || isSwap) && !exemptedFromTax) {
            uint256 buybackFee = (originalAmount * fees.buyback.percentage) / MULTIPLIER_BASIS;
            _transferInternal(sender, buybackHandler, buybackFee, originalAmount, false);
            if (!_exchangePools.contains(sender) && buybackDetails.router != address(0)) {
                IBuyBackHandler(buybackHandler).buyback(treasury, buybackDetails);
            }
            amount -= buybackFee;
            emit TransferTax(sender, buybackHandler, buybackFee, "buybackFee");
        }

        _transferInternal(sender, recipient, amount, originalAmount, true);
    }

    function _transferReflection(address sender, address recipient, uint256 tAmount, uint256 tAmountOriginal, bool shouldReflectFee) private {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");
        require(tAmount > 0, "Transfer amount must be greater than zero");
        bool isSwap = _isSwap(sender, recipient);
        address liquidityPoolFactory = ITokenLauncherERC20(tokenLauncher).liquidityPoolFactory();
        if (sender == liquidityPoolFactory || recipient == liquidityPoolFactory) {
            shouldReflectFee = false;
        }
        (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee) = _getValues(
            tAmount,
            tAmountOriginal,
            isSwap,
            shouldReflectFee
        );

        if (isExcludedFromReflectionRewards(sender) && !isExcludedFromReflectionRewards(recipient)) {
            _transferFromExcluded(sender, recipient, tAmount, tTransferAmount, rAmount, rTransferAmount, shouldReflectFee);
        } else if (!isExcludedFromReflectionRewards(sender) && isExcludedFromReflectionRewards(recipient)) {
            _transferToExcluded(sender, recipient, tAmount, tTransferAmount, rAmount, rTransferAmount, shouldReflectFee);
        } else if (!isExcludedFromReflectionRewards(sender) && !isExcludedFromReflectionRewards(recipient)) {
            _transferStandard(sender, recipient, tAmount, tTransferAmount, rAmount, rTransferAmount, shouldReflectFee);
        } else if (isExcludedFromReflectionRewards(sender) && isExcludedFromReflectionRewards(recipient)) {
            _transferBothExcluded(sender, recipient, tAmount, tTransferAmount, rAmount, rTransferAmount, shouldReflectFee);
        }

        emit Transfer(sender, recipient, tTransferAmount);

        if (shouldReflectFee) {
            _reflectFee(rFee, tFee);
            emit TransferTax(sender, address(0), tFee, "reflectionFee");
        }
    }

    function _transferInternal(address sender, address recipient, uint256 amount, uint256 originalAmount, bool shouldReflectFee) private {
        if (isReflectionToken) {
            _transferReflection(sender, recipient, amount, originalAmount, shouldReflectFee);
        } else {
            super._transfer(sender, recipient, amount);
        }
    }

    function _isSwap(address sender, address recipient) internal view returns (bool) {
        return _exchangePools.contains(sender) || _exchangePools.contains(recipient);
    }

    function _isExemptedFromTax(address sender, address recipient) internal view returns (bool) {
        return _exemptedFromTax.contains(sender) || _exemptedFromTax.contains(recipient);
    }

    function _mintReflection(address account, uint256 amount) private {
        // increase total amounts
        uint256 _rAmount = amount * _getRate();
        totalReflection.t = totalReflection.t + amount;
        totalReflection.r = totalReflection.r + _rAmount;

        // increase tBalance if the receiver address is excluded
        if (isExcludedFromReflectionRewards(account)) {
            _tOwned[account] = _tOwned[account] + amount;
        }
        _rOwned[account] = _rOwned[account] + _rAmount;

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

    function mint(address to, uint256 amount) external onlyRole(DEFAULT_ADMIN_ROLE) {
        require(totalSupply() + amount <= maxSupply, "TokenFiERC20: max supply exceeded");
        if (isReflectionToken) {
            _mintReflection(to, amount);
        } else {
            super._mint(to, amount);
        }
    }

    function updateTokenLauncher(address _newTokenLauncher) external onlyRole(DEFAULT_ADMIN_ROLE) {
        _revokeRole(FEE_MANAGER_ROLE, tokenLauncher);
        tokenLauncher = _newTokenLauncher;

        _grantRole(FEE_MANAGER_ROLE, _newTokenLauncher);
        emit TokenLauncherUpdated(_newTokenLauncher);
    }

    modifier onlyFromAdminOrLauncher() {
        require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender) || msg.sender == tokenLauncher, "TokenFiERC20: must be admin");
        _;
    }

    modifier onlyReflection() {
        require(isReflectionToken, "TokenFiERC20: reflection not enabled");
        _;
    }
}

File 2 of 22 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.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 AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

    /**
     * @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 override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(account),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @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 override returns (bytes32) {
        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 override 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 override 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 `account`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * May emit a {RoleGranted} event.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

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

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 3 of 22 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @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.
     *
     * _Available since v3.1._
     */
    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 `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 4 of 22 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.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.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

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

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

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the 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 override returns (uint8) {
        return 18;
    }

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

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

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

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

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

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

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

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

        return true;
    }

    /**
     * @dev Moves `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.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(address from, address to, uint256 amount) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
            // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
            // decrementing then incrementing.
            _balances[to] += amount;
        }

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

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

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

        _totalSupply += amount;
        unchecked {
            // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
            _balances[account] += amount;
        }
        emit Transfer(address(0), account, amount);

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

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

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

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
            // Overflow not possible: amount <= accountBalance <= totalSupply.
            _totalSupply -= amount;
        }

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

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

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

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

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

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

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

File 5 of 22 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @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 amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

File 6 of 22 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
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 7 of 22 : IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 *
 * ==== Security Considerations
 *
 * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
 * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
 * considered as an intention to spend the allowance in any specific way. The second is that because permits have
 * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
 * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
 * generally recommended is:
 *
 * ```solidity
 * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
 *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
 *     doThing(..., value);
 * }
 *
 * function doThing(..., uint256 value) public {
 *     token.safeTransferFrom(msg.sender, address(this), value);
 *     ...
 * }
 * ```
 *
 * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
 * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
 * {SafeERC20-safeTransferFrom}).
 *
 * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
 * contracts should have entry points that don't rely on permit.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     *
     * CAUTION: See Security Considerations above.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 8 of 22 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

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

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

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

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

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
     * Revert on invalid signature.
     */
    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

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

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return
            success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
    }
}

File 9 of 22 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://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.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

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

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

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

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

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

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

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) 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(errorMessage);
        }
    }
}

File 10 of 22 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

File 11 of 22 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";
import "./math/SignedMath.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toString(int256 value) internal pure returns (string memory) {
        return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value))));
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

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

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }

    /**
     * @dev Returns true if the two strings are equal.
     */
    function equal(string memory a, string memory b) internal pure returns (bool) {
        return keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

File 12 of 22 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.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);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface 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);
}

File 14 of 22 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1, "Math: mulDiv overflow");

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10 ** 64) {
                value /= 10 ** 64;
                result += 64;
            }
            if (value >= 10 ** 32) {
                value /= 10 ** 32;
                result += 32;
            }
            if (value >= 10 ** 16) {
                value /= 10 ** 16;
                result += 16;
            }
            if (value >= 10 ** 8) {
                value /= 10 ** 8;
                result += 8;
            }
            if (value >= 10 ** 4) {
                value /= 10 ** 4;
                result += 4;
            }
            if (value >= 10 ** 2) {
                value /= 10 ** 2;
                result += 2;
            }
            if (value >= 10 ** 1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
        }
    }
}

File 15 of 22 : SignedMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard signed math utilities missing in the Solidity language.
 */
library SignedMath {
    /**
     * @dev Returns the largest of two signed numbers.
     */
    function max(int256 a, int256 b) internal pure returns (int256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two signed numbers.
     */
    function min(int256 a, int256 b) internal pure returns (int256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two signed numbers without overflow.
     * The result is rounded towards zero.
     */
    function average(int256 a, int256 b) internal pure returns (int256) {
        // Formula from the book "Hacker's Delight"
        int256 x = (a & b) + ((a ^ b) >> 1);
        return x + (int256(uint256(x) >> 255) & (a ^ b));
    }

    /**
     * @dev Returns the absolute unsigned value of a signed value.
     */
    function abs(int256 n) internal pure returns (uint256) {
        unchecked {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}

File 16 of 22 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)
// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```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 of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

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

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

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

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

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

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastValue;
                // Update the index for the moved value
                set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex
            }

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

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

            return true;
        } else {
            return false;
        }
    }

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

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

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        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 17 of 22 : 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 18 of 22 : 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 19 of 22 : IBuyBackHandler.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;

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

interface IBuyBackHandler {
    // solhint-disable-next-line
    function BUYBACK_CALLER_ROLE() external view returns (bytes32);

    function buyback(address treasury, ITokenLauncherLiquidityPoolFactory.BuyBackDetails memory buybackDetails) external;

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

File 20 of 22 : ITokenLauncherCommon.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;

interface ITokenLauncherCommon {
    enum TokenType {
        ERC20,
        ERC721,
        ERC1155
    }

    enum PaymentMethod {
        NATIVE,
        USD,
        FLOKI
    }
}

File 21 of 22 : ITokenLauncherERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;

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

interface ITokenLauncherERC20 is ITokenLauncherCommon {
    struct FeeDetails {
        uint256 percentage;
        bool onlyOnSwaps;
    }

    struct Fees {
        FeeDetails transferFee;
        FeeDetails burn;
        FeeDetails reflection;
        FeeDetails buyback;
    }

    struct CreateErc20Input {
        string name;
        string symbol;
        string logo;
        uint8 decimals;
        uint256 initialSupply;
        uint256 maxSupply;
        address treasury;
        address owner;
        address referrer;
        address tokenStore;
        Fees fees;
        address buybackHandler;
        PaymentMethod paymentMethod;
    }

    function tokenLauncherStore() external returns (address);

    function liquidityPoolFactory() external returns (address);

    function buybackHandler() external returns (address);

    function createErc20(CreateErc20Input memory input) external payable;
}

File 22 of 22 : ITokenLauncherLiquidityPoolFactory.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;

interface ITokenLauncherLiquidityPoolFactory {
    struct LiquidityPoolDetails {
        address sourceToken;
        address pairedToken;
        uint256 amountSourceToken;
        uint256 amountPairedToken;
        address routerAddress;
    }

    struct LockLPDetails {
        uint256 lockLPTokenPercentage;
        uint256 unlockTimestamp;
        address beneficiary;
        bool isVesting;
    }

    struct BuyBackDetails {
        address pairToken;
        address router;
        uint256 liquidityBasisPoints;
        uint256 priceImpactBasisPoints;
    }

    struct CreateV2Input {
        address owner;
        address treasury;
        LiquidityPoolDetails liquidityPoolDetails;
        LockLPDetails lockLPDetails;
        BuyBackDetails buybackDetails;
    }

    struct CreateV2Output {
        address liquidityPoolToken;
        uint256 liquidity;
    }

    function createV2LiquidityPool(CreateV2Input memory input) external payable returns (CreateV2Output memory);
}

Settings
{
  "evmVersion": "london",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "none",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 10
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"logo","type":"string"},{"internalType":"uint8","name":"decimals","type":"uint8"},{"internalType":"uint256","name":"initialSupply","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"address","name":"treasury","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"referrer","type":"address"},{"internalType":"address","name":"tokenStore","type":"address"},{"components":[{"components":[{"internalType":"uint256","name":"percentage","type":"uint256"},{"internalType":"bool","name":"onlyOnSwaps","type":"bool"}],"internalType":"struct ITokenLauncherERC20.FeeDetails","name":"transferFee","type":"tuple"},{"components":[{"internalType":"uint256","name":"percentage","type":"uint256"},{"internalType":"bool","name":"onlyOnSwaps","type":"bool"}],"internalType":"struct ITokenLauncherERC20.FeeDetails","name":"burn","type":"tuple"},{"components":[{"internalType":"uint256","name":"percentage","type":"uint256"},{"internalType":"bool","name":"onlyOnSwaps","type":"bool"}],"internalType":"struct ITokenLauncherERC20.FeeDetails","name":"reflection","type":"tuple"},{"components":[{"internalType":"uint256","name":"percentage","type":"uint256"},{"internalType":"bool","name":"onlyOnSwaps","type":"bool"}],"internalType":"struct ITokenLauncherERC20.FeeDetails","name":"buyback","type":"tuple"}],"internalType":"struct ITokenLauncherERC20.Fees","name":"fees","type":"tuple"},{"internalType":"address","name":"buybackHandler","type":"address"},{"internalType":"enum ITokenLauncherCommon.PaymentMethod","name":"paymentMethod","type":"uint8"}],"internalType":"struct ITokenLauncherERC20.CreateErc20Input","name":"_input","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"router","type":"address"},{"indexed":true,"internalType":"address","name":"pairToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"liquidityBasisPoints","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"priceImpactBasisPoints","type":"uint256"}],"name":"BuyBackDetailsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pool","type":"address"}],"name":"ExchangePoolAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pool","type":"address"}],"name":"ExchangePoolRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"ExemptedAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"ExemptedRemoved","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":true,"internalType":"address","name":"newTokenLauncher","type":"address"}],"name":"TokenLauncherUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"string","name":"taxType","type":"string"}],"name":"TransferTax","type":"event"},{"inputs":[],"name":"BURN_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEE_MANAGER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MULTIPLIER_BASIS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"}],"name":"addExchangePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"addExemptAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buybackDetails","outputs":[{"internalType":"address","name":"pairToken","type":"address"},{"internalType":"address","name":"router","type":"address"},{"internalType":"uint256","name":"liquidityBasisPoints","type":"uint256"},{"internalType":"uint256","name":"priceImpactBasisPoints","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buybackHandler","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"excludeAccount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fees","outputs":[{"components":[{"internalType":"uint256","name":"percentage","type":"uint256"},{"internalType":"bool","name":"onlyOnSwaps","type":"bool"}],"internalType":"struct ITokenLauncherERC20.FeeDetails","name":"transferFee","type":"tuple"},{"components":[{"internalType":"uint256","name":"percentage","type":"uint256"},{"internalType":"bool","name":"onlyOnSwaps","type":"bool"}],"internalType":"struct ITokenLauncherERC20.FeeDetails","name":"burn","type":"tuple"},{"components":[{"internalType":"uint256","name":"percentage","type":"uint256"},{"internalType":"bool","name":"onlyOnSwaps","type":"bool"}],"internalType":"struct ITokenLauncherERC20.FeeDetails","name":"reflection","type":"tuple"},{"components":[{"internalType":"uint256","name":"percentage","type":"uint256"},{"internalType":"bool","name":"onlyOnSwaps","type":"bool"}],"internalType":"struct ITokenLauncherERC20.FeeDetails","name":"buyback","type":"tuple"}],"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":"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":[{"internalType":"address","name":"account","type":"address"}],"name":"includeAccount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"}],"name":"isExchangePool","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isExcludedFromReflectionRewards","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isExemptedFromTax","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isReflectionToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"logo","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tAmount","type":"uint256"}],"name":"reflect","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tAmount","type":"uint256"},{"internalType":"bool","name":"deductTransferFee","type":"bool"}],"name":"reflectionFromToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"}],"name":"removeExchangePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"removeExemptAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"pairToken","type":"address"},{"internalType":"address","name":"router","type":"address"},{"internalType":"uint256","name":"liquidityBasisPoints","type":"uint256"},{"internalType":"uint256","name":"priceImpactBasisPoints","type":"uint256"}],"internalType":"struct ITokenLauncherLiquidityPoolFactory.BuyBackDetails","name":"_buybackDetails","type":"tuple"}],"name":"setBuybackDetails","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"rAmount","type":"uint256"}],"name":"tokenFromReflection","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenLauncher","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReflection","outputs":[{"internalType":"uint256","name":"t","type":"uint256"},{"internalType":"uint256","name":"r","type":"uint256"},{"internalType":"uint256","name":"tFee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","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":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"uint256","name":"percentage","type":"uint256"},{"internalType":"bool","name":"onlyOnSwaps","type":"bool"}],"internalType":"struct ITokenLauncherERC20.FeeDetails","name":"transferFee","type":"tuple"},{"components":[{"internalType":"uint256","name":"percentage","type":"uint256"},{"internalType":"bool","name":"onlyOnSwaps","type":"bool"}],"internalType":"struct ITokenLauncherERC20.FeeDetails","name":"burn","type":"tuple"},{"components":[{"internalType":"uint256","name":"percentage","type":"uint256"},{"internalType":"bool","name":"onlyOnSwaps","type":"bool"}],"internalType":"struct ITokenLauncherERC20.FeeDetails","name":"reflection","type":"tuple"},{"components":[{"internalType":"uint256","name":"percentage","type":"uint256"},{"internalType":"bool","name":"onlyOnSwaps","type":"bool"}],"internalType":"struct ITokenLauncherERC20.FeeDetails","name":"buyback","type":"tuple"}],"internalType":"struct ITokenLauncherERC20.Fees","name":"_fees","type":"tuple"}],"name":"updateFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newTokenLauncher","type":"address"}],"name":"updateTokenLauncher","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b5060405162004034380380620040348339810160408190526200003491620008ed565b80516020820151600362000049838262000afa565b50600462000058828262000afa565b50505060e08101516001600160a01b0316620000cf5760405162461bcd60e51b815260206004820152602b60248201527f546f6b656e466945524332303a206f776e65722063616e6e6f7420626520416460448201526a0323932b9b9902d32b937960ad1b60648201526084015b60405180910390fd5b80608001518160a0015110156200014f5760405162461bcd60e51b815260206004820152603c60248201527f546f6b656e466945524332303a20696e697469616c537570706c792063616e6e60448201527f6f742062652067726561746572207468616e206d6178537570706c79000000006064820152608401620000c6565b60c0810151600680546001600160a01b0319166001600160a01b0390921691909117905560a081015160075560408101516008906200018f908262000afa565b506060808201516016805460ff909216600160a81b0260ff60a81b199092169190911790556101408201519081015151604082015151602083015151925151600093620001dc9162000bdc565b620001e8919062000bdc565b620001f4919062000bdc565b9050612710811115620002605760405162461bcd60e51b815260206004820152602d60248201527f546f6b656e466945524332303a20666565732073756d206d757374206265206c60448201526c657373207468616e203130302560981b6064820152608401620000c6565b61014082015180518051600955602090810151600a805460ff19908116921515929092179055818301518051600b55820151600c8054831691151591909117905560408301518051600d81905590830151600e805484169115159190911790556060909301518051600f559091015160108054909216901515179055610160830151601580546001600160a01b0319166001600160a01b039092169190911790551562000440576000826080015111620003835760405162461bcd60e51b815260206004820152603e60248201527f546f6b656e466945524332302e636f6e7374727563746f723a20696e6974696160448201527f6c537570706c79206d7573742062652067726561746572207468616e203000006064820152608401620000c6565b608082015162000397600260001962000c08565b620003a3919062000c1f565b620003b2600260001962000c08565b620003be919062000c36565b602081815560c0840180516001600160a01b039081166000908152601b8452604080822095909555608087018051601f819055845184168352601c8652868320556016805460ff60a01b1916600160a01b179055925192519451948552911692909160008051602062004014833981519152910160405180910390a36200045a565b6200045a8260c001518360800151620004e960201b60201c565b6101608201516200046e906017906200059c565b50601680546001600160a01b0319163317905560e08201516200049490600090620005bc565b601654620004cd907f6c0757dc3e6b28b2580c03fd9e96c274acf4f99d91fbec9b418fa1d70604ff1c906001600160a01b0316620005bc565b610120820151620004e190600090620005bc565b505062000c4c565b6001600160a01b038216620005415760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401620000c6565b806002600082825462000555919062000bdc565b90915550506001600160a01b0382166000818152602081815260408083208054860190555184815260008051602062004014833981519152910160405180910390a35b5050565b6000620005b3836001600160a01b03841662000665565b90505b92915050565b60008281526005602090815260408083206001600160a01b038516845290915290205460ff16620005985760008281526005602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200061c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b505050565b6000818152600183016020526040812054620006ae57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620005b6565b506000620005b6565b634e487b7160e01b600052604160045260246000fd5b6040516101a081016001600160401b0381118282101715620006f357620006f3620006b7565b60405290565b604051601f8201601f191681016001600160401b0381118282101715620007245762000724620006b7565b604052919050565b600082601f8301126200073e57600080fd5b81516001600160401b038111156200075a576200075a620006b7565b602062000770601f8301601f19168201620006f9565b82815285828487010111156200078557600080fd5b60005b83811015620007a557858101830151828201840152820162000788565b506000928101909101919091529392505050565b805160ff81168114620007cb57600080fd5b919050565b80516001600160a01b0381168114620007cb57600080fd5b600060408284031215620007fb57600080fd5b604080519081016001600160401b0381118282101715620008205762000820620006b7565b806040525080915082518152602083015180151581146200084057600080fd5b6020919091015292915050565b600061010082840312156200086157600080fd5b604051608081016001600160401b0381118282101715620008865762000886620006b7565b604052905080620008988484620007e8565b8152620008a98460408501620007e8565b6020820152620008bd8460808501620007e8565b6040820152620008d18460c08501620007e8565b60608201525092915050565b805160038110620007cb57600080fd5b6000602082840312156200090057600080fd5b81516001600160401b03808211156200091857600080fd5b9083019061028082860312156200092e57600080fd5b62000938620006cd565b8251828111156200094857600080fd5b62000956878286016200072c565b8252506020830151828111156200096c57600080fd5b6200097a878286016200072c565b6020830152506040830151828111156200099357600080fd5b620009a1878286016200072c565b604083015250620009b560608401620007b9565b60608201526080830151608082015260a083015160a0820152620009dc60c08401620007d0565b60c0820152620009ef60e08401620007d0565b60e0820152610100915062000a06828401620007d0565b82820152610120915062000a1c828401620007d0565b82820152610140915062000a33868385016200084d565b8282015262000a466102408401620007d0565b61016082015262000a5b6102608401620008dd565b61018082015295945050505050565b600181811c9082168062000a7f57607f821691505b60208210810362000aa057634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000660576000816000526020600020601f850160051c8101602086101562000ad15750805b601f850160051c820191505b8181101562000af25782815560010162000add565b505050505050565b81516001600160401b0381111562000b165762000b16620006b7565b62000b2e8162000b27845462000a6a565b8462000aa6565b602080601f83116001811462000b66576000841562000b4d5750858301515b600019600386901b1c1916600185901b17855562000af2565b600085815260208120601f198616915b8281101562000b975788860151825594840194600190910190840162000b76565b508582101562000bb65787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b80820180821115620005b657620005b662000bc6565b634e487b7160e01b600052601260045260246000fd5b60008262000c1a5762000c1a62000bf2565b500490565b60008262000c315762000c3162000bf2565b500690565b81810381811115620005b657620005b662000bc6565b6133b88062000c5c6000396000f3fe608060405234801561001057600080fd5b50600436106102305760003560e01c806301ffc9a714610235578063053ab1821461025d57806305db2f411461027257806306fdde0314610295578063095ea7b3146102aa57806311c565df146102bd57806313114a9d146102e857806318160ddd146102f057806318f60b69146102f8578063228497201461030b57806322aafef21461033857806323b872dd1461034b578063248a9ca31461035e5780632d838119146103715780632f2ff15d14610384578063313ce5671461039757806336568abe146103b657806339509351146103c957806340a8d39f146103dc57806340c10f19146103e55780634549b039146103f857806358dc10f21461040b5780636078c0f91461041e57806361d027b3146104315780636fda79ce1461044457806370a08231146104915780637543a3aa146104a4578063795c7ebe146104b75780637b1c359c146104ca5780638b4dd060146104dd57806391d14854146104f057806395d89b4114610503578063997d0feb1461050b5780639af1d35a1461051f578063a217fddf146105a4578063a457c2d7146105ac578063a9059cbb146105bf578063b6044b68146105d2578063bc02a108146105e5578063c2510346146105f8578063d49d51811461060b578063d547741f14610613578063d5abeb0114610626578063dd62ed3e1461062f578063f2cc0c1814610642578063f84354f114610655578063fb7f21eb14610668578063fccc281314610670575b600080fd5b610248610243366004612d19565b610679565b60405190151581526020015b60405180910390f35b61027061026b366004612d43565b6106b0565b005b61028760008051602061332c83398151915281565b604051908152602001610254565b61029d6107cd565b6040516102549190612d80565b6102486102b8366004612dc8565b61085f565b6015546102d0906001600160a01b031681565b6040516001600160a01b039091168152602001610254565b602154610287565b610287610877565b610248610306366004612df4565b61089a565b601f5460205460215461031d92919083565b60408051938452602084019290925290820152606001610254565b610248610346366004612df4565b6108a7565b610248610359366004612e11565b6108b4565b61028761036c366004612d43565b6108d8565b61028761037f366004612d43565b6108ed565b610270610392366004612e52565b610972565b601654600160a81b900460ff1660405160ff9091168152602001610254565b6102706103c4366004612e52565b610993565b6102486103d7366004612dc8565b610a11565b61028761271081565b6102706103f3366004612dc8565b610a33565b610287610406366004612e97565b610ad2565b6016546102d0906001600160a01b031681565b61027061042c366004612df4565b610b68565b6006546102d0906001600160a01b031681565b601154601254601354601454610466936001600160a01b039081169316919084565b604080516001600160a01b039586168152949093166020850152918301526060820152608001610254565b61028761049f366004612df4565b610bc4565b6102706104b2366004612f0f565b610c00565b6102706104c5366004612fca565b610e72565b6102706104d8366004612df4565b611061565b6102486104eb366004612df4565b6110bd565b6102486104fe366004612e52565b6110f1565b61029d61111c565b60165461024890600160a01b900460ff1681565b6040805180820182526009548152600a5460ff908116151560208084019190915283518085018552600b548152600c54831615158183015284518086018652600d548152600e5484161515818401528551808701909652600f5486526010549093161515918501919091526105949390919084565b604051610254949392919061303f565b610287600081565b6102486105ba366004612dc8565b61112b565b6102486105cd366004612dc8565b6111a6565b6102706105e0366004612df4565b6111b4565b6102706105f3366004612df4565b611274565b610270610606366004612df4565b61130f565b61028761136b565b610270610621366004612e52565b61137b565b61028760075481565b61028761063d36600461307e565b611397565b610270610650366004612df4565b6113c2565b610270610663366004612df4565b61153b565b61029d6117ab565b6102d061dead81565b60006001600160e01b03198216637965db0b60e01b14806106aa57506301ffc9a760e01b6001600160e01b03198316145b92915050565b601654600160a01b900460ff166106e25760405162461bcd60e51b81526004016106d9906130ac565b60405180910390fd5b336106ec816110bd565b1561074e5760405162461bcd60e51b815260206004820152602c60248201527f4578636c75646564206164647265737365732063616e6e6f742063616c6c207460448201526b3434b990333ab731ba34b7b760a11b60648201526084016106d9565b600061075e838460006001611839565b5050506001600160a01b0384166000908152601b602052604090205491925061078991839150613106565b6001600160a01b0383166000908152601b6020908152604090912091909155546107b4908290613106565b6020556021546107c5908490613119565b602155505050565b6060600380546107dc9061312c565b80601f01602080910402602001604051908101604052809291908181526020018280546108089061312c565b80156108555780601f1061082a57610100808354040283529160200191610855565b820191906000526020600020905b81548152906001019060200180831161083857829003601f168201915b5050505050905090565b60003361086d81858561188c565b5060019392505050565b601654600090600160a01b900460ff16156108935750601f5490565b5060025490565b60006106aa6019836119b1565b60006106aa6017836119b1565b6000336108c28582856119c6565b6108cd858585611a40565b506001949350505050565b60009081526005602052604090206001015490565b6020546000908211156109555760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016106d9565b600061095f611d62565b905061096b8184613166565b9392505050565b61097b826108d8565b61098481611d85565b61098e8383611d92565b505050565b6001600160a01b0381163314610a035760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016106d9565b610a0d8282611e18565b5050565b60003361086d818585610a248383611397565b610a2e9190613119565b61188c565b6000610a3e81611d85565b60075482610a4a610877565b610a549190613119565b1115610aac5760405162461bcd60e51b815260206004820152602160248201527f546f6b656e466945524332303a206d617820737570706c7920657863656564656044820152601960fa1b60648201526084016106d9565b601654600160a01b900460ff1615610ac85761098e8383611e7f565b61098e8383611f67565b601f54600090831115610b275760405162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d757374206265206c657373207468616e20737570706c790060448201526064016106d9565b81610b4a576000610b3c848560006001611839565b509294506106aa9350505050565b6000610b5a848560006001611839565b509194506106aa9350505050565b60008051602061332c833981519152610b8081611d85565b610b8b601783612014565b506040516001600160a01b038316907f1a8d12c6c584c93207352b4fb4b4a1d352b1d54b5879f90a7a31ca8a70bcfed290600090a25050565b601654600090600160a01b900460ff1615610be2576106aa82612029565b6001600160a01b0382166000908152602081905260409020546106aa565b60008051602061332c833981519152610c1881611d85565b600f5415610de35761271082604001511115610c9a5760405162461bcd60e51b815260206004820152603b60248201527f546f6b656e466945524332303a206c69717569646974794261736973506f696e60448201527a07473206d757374206265206c657373207468616e2031302c30303602c1b60648201526084016106d9565b61271082606001511115610d165760405162461bcd60e51b815260206004820152603d60248201527f546f6b656e466945524332303a207072696365496d706163744261736973506f60448201527f696e7473206d757374206265206c657373207468616e2031302c30303000000060648201526084016106d9565b60208201516001600160a01b0316610d7c5760405162461bcd60e51b8152602060048201526024808201527f546f6b656e466945524332303a20726f757465722063616e6e6f7420626520656044820152636d70747960e01b60648201526084016106d9565b81516001600160a01b0316610de35760405162461bcd60e51b815260206004820152602760248201527f546f6b656e466945524332303a2070616972546f6b656e2063616e6e6f7420626044820152666520656d70747960c81b60648201526084016106d9565b8151601180546001600160a01b039283166001600160a01b03199182168117909255602085015160128054919094169116811790925560408085015160138190556060860151601481905591519293927f0984d5f2e8e58132b97a7c66d9c5a2df53eb8f8a7b78b241b1db4fdc7a503a5d92610e66928252602082015260400190565b60405180910390a35050565b6000610e7d81611d85565b601654600160a01b900460ff1615610ef157604082015151610eec5760405162461bcd60e51b8152602060048201526034602482015260008051602061338c833981519152604482015273616765206d757374206265206e6f6e2d7a65726f60601b60648201526084016106d9565b610f4b565b60408201515115610f4b5760405162461bcd60e51b8152602060048201526030602482015260008051602061338c83398151915260448201526f616765206d757374206265207a65726f60801b60648201526084016106d9565b6060820151516040830151516020840151518451516000939291610f6e91613119565b610f789190613119565b610f829190613119565b9050612710811115610fec5760405162461bcd60e51b815260206004820152602d60248201527f546f6b656e466945524332303a20666565732073756d206d757374206265206c60448201526c657373207468616e203130302560981b60648201526084016106d9565b505080518051600955602090810151600a805491151560ff19928316179055818301518051600b55820151600c805491151591831691909117905560408301518051600d55820151600e80549115159183169190911790556060909201518051600f5501516010805491151591909216179055565b60008051602061332c83398151915261107981611d85565b611084601783612077565b506040516001600160a01b038316907ffaaeeffad2a7c67db50de0c0861de690ae617c059e77b13b96ee1bfea1463e8790600090a25050565b6001600160a01b0381166000908152601d602052604081205460ff16806106aa57506001600160a01b038216301492915050565b60009182526005602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600480546107dc9061312c565b600033816111398286611397565b9050838110156111995760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016106d9565b6108cd828686840361188c565b60003361086d818585611a40565b60008051602061332c8339815191526111cc81611d85565b6001600160a01b0382166112305760405162461bcd60e51b815260206004820152602560248201527f546f6b656e466945524332303a20616464726573732063616e6e6f7420626520604482015264656d70747960d81b60648201526084016106d9565b61123b601983612014565b506040516001600160a01b038316907f1caec4f1ef0e654f520edf2d95d3d035ea6382500dbdd179d37017442e53528490600090a25050565b600061127f81611d85565b6016546112a49060008051602061332c833981519152906001600160a01b0316611e18565b601680546001600160a01b0319166001600160a01b0384161790556112d760008051602061332c83398151915283611d92565b6040516001600160a01b038316907fdba835207229fba1418844b6c6462472e5f6db972a6e9a8d0b7ebf6c7326da4d90600090a25050565b60008051602061332c83398151915261132781611d85565b611332601983612077565b506040516001600160a01b038316907f3186e21fde26faa448666270e7a0d53c887d8f040950e4330a2b622e34ed6f4490600090a25050565b6113786002600019613166565b81565b611384826108d8565b61138d81611d85565b61098e8383611e18565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b601654600160a01b900460ff166113eb5760405162461bcd60e51b81526004016106d9906130ac565b6113f66000336110f1565b8061140b57506016546001600160a01b031633145b6114275760405162461bcd60e51b81526004016106d990613188565b611430816110bd565b1561147b5760405162461bcd60e51b815260206004820152601b60248201527a1058d8dbdd5b9d081a5cc8185b1c9958591e48195e18db1d591959602a1b60448201526064016106d9565b6001600160a01b0381166000908152601b6020526040902054156114d5576001600160a01b0381166000908152601b60205260409020546114bb906108ed565b6001600160a01b0382166000908152601c60205260409020555b6001600160a01b03166000818152601d60205260408120805460ff19166001908117909155601e805491820181559091527f50bb669a95c7b50b7e8a6f09454034b2b14cf2b85c730dca9a539ca82cb6e3500180546001600160a01b0319169091179055565b601654600160a01b900460ff166115645760405162461bcd60e51b81526004016106d9906130ac565b61156f6000336110f1565b8061158457506016546001600160a01b031633145b6115a05760405162461bcd60e51b81526004016106d990613188565b6115a9816110bd565b6115f35760405162461bcd60e51b815260206004820152601b60248201527a1058d8dbdd5b9d081a5cc8185b1c9958591e481a5b98db1d591959602a1b60448201526064016106d9565b60005b601e54811015610a0d57816001600160a01b0316601e828154811061161d5761161d6131bd565b6000918252602090912001546001600160a01b0316036117a3576000611641611d62565b6001600160a01b0384166000908152601b6020908152604090912054905491925061166b91613106565b60209081556001600160a01b0384166000908152601c90915260409020546116949082906131d3565b6001600160a01b0384166000908152601b60208181526040808420948555601c82528320929092558152905490546116cc9190613119565b60209081556001600160a01b0384166000908152601d90915260409020805460ff19169055601e805461170190600190613106565b81548110611711576117116131bd565b600091825260209091200154601e80546001600160a01b03909216918490811061173d5761173d6131bd565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550601e80548061177c5761177c6131ea565b600082815260209020810160001990810180546001600160a01b0319169055019055505050565b6001016115f6565b600880546117b89061312c565b80601f01602080910402602001604051908101604052809291908181526020018280546117e49061312c565b80156118315780601f1061180657610100808354040283529160200191611831565b820191906000526020600020905b81548152906001019060200180831161181457829003601f168201915b505050505081565b60008060008060008060006118508b8b8b8b61208c565b91509150600061185e611d62565b905060008060006118708f86866120fe565b919c509a50985094965092945050505050945094509450945094565b6001600160a01b0383166118ee5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016106d9565b6001600160a01b03821661194f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016106d9565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b600061096b836001600160a01b03841661213a565b60006119d28484611397565b90506000198114611a3a5781811015611a2d5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016106d9565b611a3a848484840361188c565b50505050565b6000611a4c8484612152565b90506000611a5a8585612170565b600954909150839015801590611a7a5750600a5460ff161580611a7a5750825b8015611a84575081155b15611b265760095460009061271090611a9d90846131d3565b611aa79190613166565b600654909150611ac59088906001600160a01b03168385600061218e565b611acf8186613106565b6040516a7472616e7366657246656560a81b8152909550600b0160405190819003812060065483835290916001600160a01b03918216918a169060008051602061334c8339815191529060200160405180910390a4505b600b5415801590611b415750600c5460ff161580611b415750825b8015611b4b575081155b15611bd957600b5460009061271090611b6490846131d3565b611b6e9190613166565b9050611b808761dead8385600061218e565b611b8a8186613106565b604051666275726e46656560c81b81529095506007016040519081900381208282529061dead906001600160a01b038a169060008051602061334c8339815191529060200160405180910390a4505b600f5415801590611bf4575060105460ff161580611bf45750825b8015611bfe575081155b15611d4c57600f5460009061271090611c1790846131d3565b611c219190613166565b601554909150611c3f9088906001600160a01b03168385600061218e565b611c4a6019886119b1565b158015611c6157506012546001600160a01b031615155b15611cec5760155460065460405163f7fd85c160e01b81526001600160a01b03918216600482015260115482166024820152601254821660448201526013546064820152601454608482015291169063f7fd85c19060a401600060405180830381600087803b158015611cd357600080fd5b505af1158015611ce7573d6000803e3d6000fd5b505050505b611cf68186613106565b604051696275796261636b46656560b01b8152909550600a0160405190819003812060155483835290916001600160a01b03918216918a169060008051602061334c8339815191529060200160405180910390a4505b611d5a86868684600161218e565b505050505050565b6000806000611d6f6121c4565b9092509050611d7e8183613166565b9250505090565b611d8f813361233f565b50565b611d9c82826110f1565b610a0d5760008281526005602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611dd43390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611e2282826110f1565b15610a0d5760008281526005602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000611e89611d62565b611e9390836131d3565b601f54909150611ea4908390613119565b601f55602054611eb5908290613119565b602055611ec1836110bd565b15611f04576001600160a01b0383166000908152601c6020526040902054611eea908390613119565b6001600160a01b0384166000908152601c60205260409020555b6001600160a01b0383166000908152601b6020526040902054611f28908290613119565b6001600160a01b0384166000818152601b602052604080822093909355915190919060008051602061336c833981519152906119a49086815260200190565b6001600160a01b038216611fbd5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016106d9565b8060026000828254611fcf9190613119565b90915550506001600160a01b0382166000818152602081815260408083208054860190555184815260008051602061336c833981519152910160405180910390a35050565b600061096b836001600160a01b038416612398565b6000612034826110bd565b1561205557506001600160a01b03166000908152601c602052604090205490565b6001600160a01b0382166000908152601b60205260409020546106aa906108ed565b600061096b836001600160a01b0384166123e2565b600e546000908190819060ff1615806120a25750845b90508015806120af575083155b156120c15786600092509250506120f5565b600d54600090612710906120d590896131d3565b6120df9190613166565b905060006120ed828a613106565b945090925050505b94509492505050565b600080808061210d85886131d3565b9050600061211b86886131d3565b905060006121298284613106565b929992985090965090945050505050565b60009081526001919091016020526040902054151590565b600061215f6019846119b1565b8061096b575061096b6019836119b1565b600061217d6017846119b1565b8061096b575061096b6017836119b1565b601654600160a01b900460ff16156121b2576121ad85858585856124d5565b6121bd565b6121bd8585856127cf565b5050505050565b602054601f546000918291825b601e5481101561230d5782601b6000601e84815481106121f3576121f36131bd565b60009182526020808320909101546001600160a01b03168352820192909252604001902054118061225e575081601c6000601e8481548110612237576122376131bd565b60009182526020808320909101546001600160a01b03168352820192909252604001902054115b15612275575050602054601f549094909350915050565b601b6000601e838154811061228c5761228c6131bd565b60009182526020808320909101546001600160a01b031683528201929092526040019020546122bb9084613106565b9250601c6000601e83815481106122d4576122d46131bd565b60009182526020808320909101546001600160a01b031683528201929092526040019020546123039083613106565b91506001016121d1565b50601f5460205461231e9190613166565b821015612336575050602054601f5490939092509050565b90939092509050565b61234982826110f1565b610a0d57612356816128e7565b6123618360206128f9565b604051602001612372929190613200565b60408051601f198184030181529082905262461bcd60e51b82526106d991600401612d80565b60006123a4838361213a565b6123da575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556106aa565b5060006106aa565b600081815260018301602052604081205480156124cb576000612406600183613106565b855490915060009061241a90600190613106565b905081811461247f57600086600001828154811061243a5761243a6131bd565b906000526020600020015490508087600001848154811061245d5761245d6131bd565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612490576124906131ea565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506106aa565b60009150506106aa565b6001600160a01b0385166124fb5760405162461bcd60e51b81526004016106d99061326f565b6001600160a01b0384166125215760405162461bcd60e51b81526004016106d9906132b4565b600083116125835760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016106d9565b600061258f8686612152565b90506000601660009054906101000a90046001600160a01b03166001600160a01b031663e75d75d56040518163ffffffff1660e01b81526004016020604051808303816000875af11580156125e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061260c91906132f7565b9050806001600160a01b0316876001600160a01b0316148061263f5750806001600160a01b0316866001600160a01b0316145b1561264957600092505b600080600080600061265d8a8a898b611839565b945094509450945094506126708c6110bd565b801561268257506126808b6110bd565b155b1561269b576126968c8c8c8589898e612a94565b612726565b6126a48c6110bd565b1580156126b557506126b58b6110bd565b156126c9576126968c8c8c8589898e612b90565b6126d28c6110bd565b1580156126e557506126e38b6110bd565b155b156126f9576126968c8c8c8589898e612c7b565b6127028c6110bd565b801561271257506127128b6110bd565b15612726576127268c8c8c8589898e612c9f565b8a6001600160a01b03168c6001600160a01b031660008051602061336c8339815191528460405161275991815260200190565b60405180910390a387156127c1576127718382612cf3565b6040516c7265666c656374696f6e46656560981b8152600d01604051908190038120828252906000906001600160a01b038f169060008051602061334c8339815191529060200160405180910390a45b505050505050505050505050565b6001600160a01b0383166127f55760405162461bcd60e51b81526004016106d99061326f565b6001600160a01b03821661281b5760405162461bcd60e51b81526004016106d9906132b4565b6001600160a01b038316600090815260208190526040902054818110156128935760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016106d9565b6001600160a01b038481166000818152602081815260408083208787039055938716808352918490208054870190559251858152909260008051602061336c833981519152910160405180910390a3611a3a565b60606106aa6001600160a01b03831660145b606060006129088360026131d3565b612913906002613119565b6001600160401b0381111561292a5761292a612ec3565b6040519080825280601f01601f191660200182016040528015612954576020820181803683370190505b509050600360fc1b8160008151811061296f5761296f6131bd565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061299e5761299e6131bd565b60200101906001600160f81b031916908160001a90535060006129c28460026131d3565b6129cd906001613119565b90505b6001811115612a45576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612a0157612a016131bd565b1a60f81b828281518110612a1757612a176131bd565b60200101906001600160f81b031916908160001a90535060049490941c93612a3e81613314565b90506129d0565b50831561096b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106d9565b6001600160a01b0387166000908152601c6020526040902054612ab8908690613106565b6001600160a01b0388166000908152601c6020908152604080832093909355601b90522054612ae8908490613106565b6001600160a01b0388166000908152601b60205260409020558015612b49576001600160a01b0386166000908152601b6020526040902054612b2b908390613119565b6001600160a01b0387166000908152601b6020526040902055612b87565b6001600160a01b0386166000908152601b6020526040902054612b6d908490613119565b6001600160a01b0387166000908152601b60205260409020555b50505050505050565b6001600160a01b0387166000908152601b6020526040902054612bb4908490613106565b6001600160a01b0388166000908152601b60205260409020558015612c27576001600160a01b0386166000908152601c6020526040902054612bf7908590613119565b6001600160a01b0387166000908152601c6020908152604080832093909355601b90522054612b2b908390613119565b6001600160a01b0386166000908152601c6020526040902054612c4b908690613119565b6001600160a01b0387166000908152601c6020908152604080832093909355601b90522054612b6d908490613119565b6001600160a01b0387166000908152601b6020526040902054612ae8908490613106565b6001600160a01b0387166000908152601c6020526040902054612cc3908690613106565b6001600160a01b0388166000908152601c6020908152604080832093909355601b90522054612bb4908490613106565b602054612d01908390613106565b602055602154612d12908290613119565b6021555050565b600060208284031215612d2b57600080fd5b81356001600160e01b03198116811461096b57600080fd5b600060208284031215612d5557600080fd5b5035919050565b60005b83811015612d77578181015183820152602001612d5f565b50506000910152565b6020815260008251806020840152612d9f816040850160208701612d5c565b601f01601f19169190910160400192915050565b6001600160a01b0381168114611d8f57600080fd5b60008060408385031215612ddb57600080fd5b8235612de681612db3565b946020939093013593505050565b600060208284031215612e0657600080fd5b813561096b81612db3565b600080600060608486031215612e2657600080fd5b8335612e3181612db3565b92506020840135612e4181612db3565b929592945050506040919091013590565b60008060408385031215612e6557600080fd5b823591506020830135612e7781612db3565b809150509250929050565b80358015158114612e9257600080fd5b919050565b60008060408385031215612eaa57600080fd5b82359150612eba60208401612e82565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b0381118282101715612f0957634e487b7160e01b600052604160045260246000fd5b60405290565b600060808284031215612f2157600080fd5b612f29612ed9565b8235612f3481612db3565b81526020830135612f4481612db3565b6020820152604083810135908201526060928301359281019290925250919050565b600060408284031215612f7857600080fd5b604080519081016001600160401b0381118282101715612fa857634e487b7160e01b600052604160045260246000fd5b60405282358152905080612fbe60208401612e82565b60208201525092915050565b60006101008284031215612fdd57600080fd5b612fe5612ed9565b612fef8484612f66565b8152612ffe8460408501612f66565b60208201526130108460808501612f66565b60408201526130228460c08501612f66565b60608201529392505050565b805182526020908101511515910152565b610100810161304e828761302e565b61305b604083018661302e565b613068608083018561302e565b61307560c083018461302e565b95945050505050565b6000806040838503121561309157600080fd5b823561309c81612db3565b91506020830135612e7781612db3565b60208082526024908201527f546f6b656e466945524332303a207265666c656374696f6e206e6f7420656e61604082015263189b195960e21b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b818103818111156106aa576106aa6130f0565b808201808211156106aa576106aa6130f0565b600181811c9082168061314057607f821691505b60208210810361316057634e487b7160e01b600052602260045260246000fd5b50919050565b60008261318357634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601b908201527a2a37b5b2b72334a2a92199181d1036bab9ba1031329030b236b4b760291b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b80820281158282048414176106aa576106aa6130f0565b634e487b7160e01b600052603160045260246000fd5b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b815260008351613232816017850160208801612d5c565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613263816028840160208801612d5c565b01602801949350505050565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60006020828403121561330957600080fd5b815161096b81612db3565b600081613323576133236130f0565b50600019019056fe6c0757dc3e6b28b2580c03fd9e96c274acf4f99d91fbec9b418fa1d70604ff1c2022773e2291f2fc9298b5ad7d60fae5174151fe00b975c5bdbbe737ba1bfc2fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef546f6b656e466945524332303a207265666c656374696f6e2070657263656e74a164736f6c6343000817000addf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000028000000000000000000000000000000000000000000000000000000000000002c00000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000000900000000000000000000000000000000000000000000003635c9adc5dea0000000000000000000000000000000000000000000000000021e19e0c9bab2400000000000000000000000000000623997085642c1d5483bb8ee76d08b56cd3d3675000000000000000000000000623997085642c1d5483bb8ee76d08b56cd3d36750000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007546f6b656e4669000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005544f4b454e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002168747470733a2f2f666c6f6b6966692e636f6d2f6c6f676f2d6f6e6c792e73766700000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102305760003560e01c806301ffc9a714610235578063053ab1821461025d57806305db2f411461027257806306fdde0314610295578063095ea7b3146102aa57806311c565df146102bd57806313114a9d146102e857806318160ddd146102f057806318f60b69146102f8578063228497201461030b57806322aafef21461033857806323b872dd1461034b578063248a9ca31461035e5780632d838119146103715780632f2ff15d14610384578063313ce5671461039757806336568abe146103b657806339509351146103c957806340a8d39f146103dc57806340c10f19146103e55780634549b039146103f857806358dc10f21461040b5780636078c0f91461041e57806361d027b3146104315780636fda79ce1461044457806370a08231146104915780637543a3aa146104a4578063795c7ebe146104b75780637b1c359c146104ca5780638b4dd060146104dd57806391d14854146104f057806395d89b4114610503578063997d0feb1461050b5780639af1d35a1461051f578063a217fddf146105a4578063a457c2d7146105ac578063a9059cbb146105bf578063b6044b68146105d2578063bc02a108146105e5578063c2510346146105f8578063d49d51811461060b578063d547741f14610613578063d5abeb0114610626578063dd62ed3e1461062f578063f2cc0c1814610642578063f84354f114610655578063fb7f21eb14610668578063fccc281314610670575b600080fd5b610248610243366004612d19565b610679565b60405190151581526020015b60405180910390f35b61027061026b366004612d43565b6106b0565b005b61028760008051602061332c83398151915281565b604051908152602001610254565b61029d6107cd565b6040516102549190612d80565b6102486102b8366004612dc8565b61085f565b6015546102d0906001600160a01b031681565b6040516001600160a01b039091168152602001610254565b602154610287565b610287610877565b610248610306366004612df4565b61089a565b601f5460205460215461031d92919083565b60408051938452602084019290925290820152606001610254565b610248610346366004612df4565b6108a7565b610248610359366004612e11565b6108b4565b61028761036c366004612d43565b6108d8565b61028761037f366004612d43565b6108ed565b610270610392366004612e52565b610972565b601654600160a81b900460ff1660405160ff9091168152602001610254565b6102706103c4366004612e52565b610993565b6102486103d7366004612dc8565b610a11565b61028761271081565b6102706103f3366004612dc8565b610a33565b610287610406366004612e97565b610ad2565b6016546102d0906001600160a01b031681565b61027061042c366004612df4565b610b68565b6006546102d0906001600160a01b031681565b601154601254601354601454610466936001600160a01b039081169316919084565b604080516001600160a01b039586168152949093166020850152918301526060820152608001610254565b61028761049f366004612df4565b610bc4565b6102706104b2366004612f0f565b610c00565b6102706104c5366004612fca565b610e72565b6102706104d8366004612df4565b611061565b6102486104eb366004612df4565b6110bd565b6102486104fe366004612e52565b6110f1565b61029d61111c565b60165461024890600160a01b900460ff1681565b6040805180820182526009548152600a5460ff908116151560208084019190915283518085018552600b548152600c54831615158183015284518086018652600d548152600e5484161515818401528551808701909652600f5486526010549093161515918501919091526105949390919084565b604051610254949392919061303f565b610287600081565b6102486105ba366004612dc8565b61112b565b6102486105cd366004612dc8565b6111a6565b6102706105e0366004612df4565b6111b4565b6102706105f3366004612df4565b611274565b610270610606366004612df4565b61130f565b61028761136b565b610270610621366004612e52565b61137b565b61028760075481565b61028761063d36600461307e565b611397565b610270610650366004612df4565b6113c2565b610270610663366004612df4565b61153b565b61029d6117ab565b6102d061dead81565b60006001600160e01b03198216637965db0b60e01b14806106aa57506301ffc9a760e01b6001600160e01b03198316145b92915050565b601654600160a01b900460ff166106e25760405162461bcd60e51b81526004016106d9906130ac565b60405180910390fd5b336106ec816110bd565b1561074e5760405162461bcd60e51b815260206004820152602c60248201527f4578636c75646564206164647265737365732063616e6e6f742063616c6c207460448201526b3434b990333ab731ba34b7b760a11b60648201526084016106d9565b600061075e838460006001611839565b5050506001600160a01b0384166000908152601b602052604090205491925061078991839150613106565b6001600160a01b0383166000908152601b6020908152604090912091909155546107b4908290613106565b6020556021546107c5908490613119565b602155505050565b6060600380546107dc9061312c565b80601f01602080910402602001604051908101604052809291908181526020018280546108089061312c565b80156108555780601f1061082a57610100808354040283529160200191610855565b820191906000526020600020905b81548152906001019060200180831161083857829003601f168201915b5050505050905090565b60003361086d81858561188c565b5060019392505050565b601654600090600160a01b900460ff16156108935750601f5490565b5060025490565b60006106aa6019836119b1565b60006106aa6017836119b1565b6000336108c28582856119c6565b6108cd858585611a40565b506001949350505050565b60009081526005602052604090206001015490565b6020546000908211156109555760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016106d9565b600061095f611d62565b905061096b8184613166565b9392505050565b61097b826108d8565b61098481611d85565b61098e8383611d92565b505050565b6001600160a01b0381163314610a035760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016106d9565b610a0d8282611e18565b5050565b60003361086d818585610a248383611397565b610a2e9190613119565b61188c565b6000610a3e81611d85565b60075482610a4a610877565b610a549190613119565b1115610aac5760405162461bcd60e51b815260206004820152602160248201527f546f6b656e466945524332303a206d617820737570706c7920657863656564656044820152601960fa1b60648201526084016106d9565b601654600160a01b900460ff1615610ac85761098e8383611e7f565b61098e8383611f67565b601f54600090831115610b275760405162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d757374206265206c657373207468616e20737570706c790060448201526064016106d9565b81610b4a576000610b3c848560006001611839565b509294506106aa9350505050565b6000610b5a848560006001611839565b509194506106aa9350505050565b60008051602061332c833981519152610b8081611d85565b610b8b601783612014565b506040516001600160a01b038316907f1a8d12c6c584c93207352b4fb4b4a1d352b1d54b5879f90a7a31ca8a70bcfed290600090a25050565b601654600090600160a01b900460ff1615610be2576106aa82612029565b6001600160a01b0382166000908152602081905260409020546106aa565b60008051602061332c833981519152610c1881611d85565b600f5415610de35761271082604001511115610c9a5760405162461bcd60e51b815260206004820152603b60248201527f546f6b656e466945524332303a206c69717569646974794261736973506f696e60448201527a07473206d757374206265206c657373207468616e2031302c30303602c1b60648201526084016106d9565b61271082606001511115610d165760405162461bcd60e51b815260206004820152603d60248201527f546f6b656e466945524332303a207072696365496d706163744261736973506f60448201527f696e7473206d757374206265206c657373207468616e2031302c30303000000060648201526084016106d9565b60208201516001600160a01b0316610d7c5760405162461bcd60e51b8152602060048201526024808201527f546f6b656e466945524332303a20726f757465722063616e6e6f7420626520656044820152636d70747960e01b60648201526084016106d9565b81516001600160a01b0316610de35760405162461bcd60e51b815260206004820152602760248201527f546f6b656e466945524332303a2070616972546f6b656e2063616e6e6f7420626044820152666520656d70747960c81b60648201526084016106d9565b8151601180546001600160a01b039283166001600160a01b03199182168117909255602085015160128054919094169116811790925560408085015160138190556060860151601481905591519293927f0984d5f2e8e58132b97a7c66d9c5a2df53eb8f8a7b78b241b1db4fdc7a503a5d92610e66928252602082015260400190565b60405180910390a35050565b6000610e7d81611d85565b601654600160a01b900460ff1615610ef157604082015151610eec5760405162461bcd60e51b8152602060048201526034602482015260008051602061338c833981519152604482015273616765206d757374206265206e6f6e2d7a65726f60601b60648201526084016106d9565b610f4b565b60408201515115610f4b5760405162461bcd60e51b8152602060048201526030602482015260008051602061338c83398151915260448201526f616765206d757374206265207a65726f60801b60648201526084016106d9565b6060820151516040830151516020840151518451516000939291610f6e91613119565b610f789190613119565b610f829190613119565b9050612710811115610fec5760405162461bcd60e51b815260206004820152602d60248201527f546f6b656e466945524332303a20666565732073756d206d757374206265206c60448201526c657373207468616e203130302560981b60648201526084016106d9565b505080518051600955602090810151600a805491151560ff19928316179055818301518051600b55820151600c805491151591831691909117905560408301518051600d55820151600e80549115159183169190911790556060909201518051600f5501516010805491151591909216179055565b60008051602061332c83398151915261107981611d85565b611084601783612077565b506040516001600160a01b038316907ffaaeeffad2a7c67db50de0c0861de690ae617c059e77b13b96ee1bfea1463e8790600090a25050565b6001600160a01b0381166000908152601d602052604081205460ff16806106aa57506001600160a01b038216301492915050565b60009182526005602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600480546107dc9061312c565b600033816111398286611397565b9050838110156111995760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016106d9565b6108cd828686840361188c565b60003361086d818585611a40565b60008051602061332c8339815191526111cc81611d85565b6001600160a01b0382166112305760405162461bcd60e51b815260206004820152602560248201527f546f6b656e466945524332303a20616464726573732063616e6e6f7420626520604482015264656d70747960d81b60648201526084016106d9565b61123b601983612014565b506040516001600160a01b038316907f1caec4f1ef0e654f520edf2d95d3d035ea6382500dbdd179d37017442e53528490600090a25050565b600061127f81611d85565b6016546112a49060008051602061332c833981519152906001600160a01b0316611e18565b601680546001600160a01b0319166001600160a01b0384161790556112d760008051602061332c83398151915283611d92565b6040516001600160a01b038316907fdba835207229fba1418844b6c6462472e5f6db972a6e9a8d0b7ebf6c7326da4d90600090a25050565b60008051602061332c83398151915261132781611d85565b611332601983612077565b506040516001600160a01b038316907f3186e21fde26faa448666270e7a0d53c887d8f040950e4330a2b622e34ed6f4490600090a25050565b6113786002600019613166565b81565b611384826108d8565b61138d81611d85565b61098e8383611e18565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b601654600160a01b900460ff166113eb5760405162461bcd60e51b81526004016106d9906130ac565b6113f66000336110f1565b8061140b57506016546001600160a01b031633145b6114275760405162461bcd60e51b81526004016106d990613188565b611430816110bd565b1561147b5760405162461bcd60e51b815260206004820152601b60248201527a1058d8dbdd5b9d081a5cc8185b1c9958591e48195e18db1d591959602a1b60448201526064016106d9565b6001600160a01b0381166000908152601b6020526040902054156114d5576001600160a01b0381166000908152601b60205260409020546114bb906108ed565b6001600160a01b0382166000908152601c60205260409020555b6001600160a01b03166000818152601d60205260408120805460ff19166001908117909155601e805491820181559091527f50bb669a95c7b50b7e8a6f09454034b2b14cf2b85c730dca9a539ca82cb6e3500180546001600160a01b0319169091179055565b601654600160a01b900460ff166115645760405162461bcd60e51b81526004016106d9906130ac565b61156f6000336110f1565b8061158457506016546001600160a01b031633145b6115a05760405162461bcd60e51b81526004016106d990613188565b6115a9816110bd565b6115f35760405162461bcd60e51b815260206004820152601b60248201527a1058d8dbdd5b9d081a5cc8185b1c9958591e481a5b98db1d591959602a1b60448201526064016106d9565b60005b601e54811015610a0d57816001600160a01b0316601e828154811061161d5761161d6131bd565b6000918252602090912001546001600160a01b0316036117a3576000611641611d62565b6001600160a01b0384166000908152601b6020908152604090912054905491925061166b91613106565b60209081556001600160a01b0384166000908152601c90915260409020546116949082906131d3565b6001600160a01b0384166000908152601b60208181526040808420948555601c82528320929092558152905490546116cc9190613119565b60209081556001600160a01b0384166000908152601d90915260409020805460ff19169055601e805461170190600190613106565b81548110611711576117116131bd565b600091825260209091200154601e80546001600160a01b03909216918490811061173d5761173d6131bd565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550601e80548061177c5761177c6131ea565b600082815260209020810160001990810180546001600160a01b0319169055019055505050565b6001016115f6565b600880546117b89061312c565b80601f01602080910402602001604051908101604052809291908181526020018280546117e49061312c565b80156118315780601f1061180657610100808354040283529160200191611831565b820191906000526020600020905b81548152906001019060200180831161181457829003601f168201915b505050505081565b60008060008060008060006118508b8b8b8b61208c565b91509150600061185e611d62565b905060008060006118708f86866120fe565b919c509a50985094965092945050505050945094509450945094565b6001600160a01b0383166118ee5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016106d9565b6001600160a01b03821661194f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016106d9565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b600061096b836001600160a01b03841661213a565b60006119d28484611397565b90506000198114611a3a5781811015611a2d5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016106d9565b611a3a848484840361188c565b50505050565b6000611a4c8484612152565b90506000611a5a8585612170565b600954909150839015801590611a7a5750600a5460ff161580611a7a5750825b8015611a84575081155b15611b265760095460009061271090611a9d90846131d3565b611aa79190613166565b600654909150611ac59088906001600160a01b03168385600061218e565b611acf8186613106565b6040516a7472616e7366657246656560a81b8152909550600b0160405190819003812060065483835290916001600160a01b03918216918a169060008051602061334c8339815191529060200160405180910390a4505b600b5415801590611b415750600c5460ff161580611b415750825b8015611b4b575081155b15611bd957600b5460009061271090611b6490846131d3565b611b6e9190613166565b9050611b808761dead8385600061218e565b611b8a8186613106565b604051666275726e46656560c81b81529095506007016040519081900381208282529061dead906001600160a01b038a169060008051602061334c8339815191529060200160405180910390a4505b600f5415801590611bf4575060105460ff161580611bf45750825b8015611bfe575081155b15611d4c57600f5460009061271090611c1790846131d3565b611c219190613166565b601554909150611c3f9088906001600160a01b03168385600061218e565b611c4a6019886119b1565b158015611c6157506012546001600160a01b031615155b15611cec5760155460065460405163f7fd85c160e01b81526001600160a01b03918216600482015260115482166024820152601254821660448201526013546064820152601454608482015291169063f7fd85c19060a401600060405180830381600087803b158015611cd357600080fd5b505af1158015611ce7573d6000803e3d6000fd5b505050505b611cf68186613106565b604051696275796261636b46656560b01b8152909550600a0160405190819003812060155483835290916001600160a01b03918216918a169060008051602061334c8339815191529060200160405180910390a4505b611d5a86868684600161218e565b505050505050565b6000806000611d6f6121c4565b9092509050611d7e8183613166565b9250505090565b611d8f813361233f565b50565b611d9c82826110f1565b610a0d5760008281526005602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611dd43390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611e2282826110f1565b15610a0d5760008281526005602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000611e89611d62565b611e9390836131d3565b601f54909150611ea4908390613119565b601f55602054611eb5908290613119565b602055611ec1836110bd565b15611f04576001600160a01b0383166000908152601c6020526040902054611eea908390613119565b6001600160a01b0384166000908152601c60205260409020555b6001600160a01b0383166000908152601b6020526040902054611f28908290613119565b6001600160a01b0384166000818152601b602052604080822093909355915190919060008051602061336c833981519152906119a49086815260200190565b6001600160a01b038216611fbd5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016106d9565b8060026000828254611fcf9190613119565b90915550506001600160a01b0382166000818152602081815260408083208054860190555184815260008051602061336c833981519152910160405180910390a35050565b600061096b836001600160a01b038416612398565b6000612034826110bd565b1561205557506001600160a01b03166000908152601c602052604090205490565b6001600160a01b0382166000908152601b60205260409020546106aa906108ed565b600061096b836001600160a01b0384166123e2565b600e546000908190819060ff1615806120a25750845b90508015806120af575083155b156120c15786600092509250506120f5565b600d54600090612710906120d590896131d3565b6120df9190613166565b905060006120ed828a613106565b945090925050505b94509492505050565b600080808061210d85886131d3565b9050600061211b86886131d3565b905060006121298284613106565b929992985090965090945050505050565b60009081526001919091016020526040902054151590565b600061215f6019846119b1565b8061096b575061096b6019836119b1565b600061217d6017846119b1565b8061096b575061096b6017836119b1565b601654600160a01b900460ff16156121b2576121ad85858585856124d5565b6121bd565b6121bd8585856127cf565b5050505050565b602054601f546000918291825b601e5481101561230d5782601b6000601e84815481106121f3576121f36131bd565b60009182526020808320909101546001600160a01b03168352820192909252604001902054118061225e575081601c6000601e8481548110612237576122376131bd565b60009182526020808320909101546001600160a01b03168352820192909252604001902054115b15612275575050602054601f549094909350915050565b601b6000601e838154811061228c5761228c6131bd565b60009182526020808320909101546001600160a01b031683528201929092526040019020546122bb9084613106565b9250601c6000601e83815481106122d4576122d46131bd565b60009182526020808320909101546001600160a01b031683528201929092526040019020546123039083613106565b91506001016121d1565b50601f5460205461231e9190613166565b821015612336575050602054601f5490939092509050565b90939092509050565b61234982826110f1565b610a0d57612356816128e7565b6123618360206128f9565b604051602001612372929190613200565b60408051601f198184030181529082905262461bcd60e51b82526106d991600401612d80565b60006123a4838361213a565b6123da575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556106aa565b5060006106aa565b600081815260018301602052604081205480156124cb576000612406600183613106565b855490915060009061241a90600190613106565b905081811461247f57600086600001828154811061243a5761243a6131bd565b906000526020600020015490508087600001848154811061245d5761245d6131bd565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612490576124906131ea565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506106aa565b60009150506106aa565b6001600160a01b0385166124fb5760405162461bcd60e51b81526004016106d99061326f565b6001600160a01b0384166125215760405162461bcd60e51b81526004016106d9906132b4565b600083116125835760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016106d9565b600061258f8686612152565b90506000601660009054906101000a90046001600160a01b03166001600160a01b031663e75d75d56040518163ffffffff1660e01b81526004016020604051808303816000875af11580156125e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061260c91906132f7565b9050806001600160a01b0316876001600160a01b0316148061263f5750806001600160a01b0316866001600160a01b0316145b1561264957600092505b600080600080600061265d8a8a898b611839565b945094509450945094506126708c6110bd565b801561268257506126808b6110bd565b155b1561269b576126968c8c8c8589898e612a94565b612726565b6126a48c6110bd565b1580156126b557506126b58b6110bd565b156126c9576126968c8c8c8589898e612b90565b6126d28c6110bd565b1580156126e557506126e38b6110bd565b155b156126f9576126968c8c8c8589898e612c7b565b6127028c6110bd565b801561271257506127128b6110bd565b15612726576127268c8c8c8589898e612c9f565b8a6001600160a01b03168c6001600160a01b031660008051602061336c8339815191528460405161275991815260200190565b60405180910390a387156127c1576127718382612cf3565b6040516c7265666c656374696f6e46656560981b8152600d01604051908190038120828252906000906001600160a01b038f169060008051602061334c8339815191529060200160405180910390a45b505050505050505050505050565b6001600160a01b0383166127f55760405162461bcd60e51b81526004016106d99061326f565b6001600160a01b03821661281b5760405162461bcd60e51b81526004016106d9906132b4565b6001600160a01b038316600090815260208190526040902054818110156128935760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016106d9565b6001600160a01b038481166000818152602081815260408083208787039055938716808352918490208054870190559251858152909260008051602061336c833981519152910160405180910390a3611a3a565b60606106aa6001600160a01b03831660145b606060006129088360026131d3565b612913906002613119565b6001600160401b0381111561292a5761292a612ec3565b6040519080825280601f01601f191660200182016040528015612954576020820181803683370190505b509050600360fc1b8160008151811061296f5761296f6131bd565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061299e5761299e6131bd565b60200101906001600160f81b031916908160001a90535060006129c28460026131d3565b6129cd906001613119565b90505b6001811115612a45576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612a0157612a016131bd565b1a60f81b828281518110612a1757612a176131bd565b60200101906001600160f81b031916908160001a90535060049490941c93612a3e81613314565b90506129d0565b50831561096b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106d9565b6001600160a01b0387166000908152601c6020526040902054612ab8908690613106565b6001600160a01b0388166000908152601c6020908152604080832093909355601b90522054612ae8908490613106565b6001600160a01b0388166000908152601b60205260409020558015612b49576001600160a01b0386166000908152601b6020526040902054612b2b908390613119565b6001600160a01b0387166000908152601b6020526040902055612b87565b6001600160a01b0386166000908152601b6020526040902054612b6d908490613119565b6001600160a01b0387166000908152601b60205260409020555b50505050505050565b6001600160a01b0387166000908152601b6020526040902054612bb4908490613106565b6001600160a01b0388166000908152601b60205260409020558015612c27576001600160a01b0386166000908152601c6020526040902054612bf7908590613119565b6001600160a01b0387166000908152601c6020908152604080832093909355601b90522054612b2b908390613119565b6001600160a01b0386166000908152601c6020526040902054612c4b908690613119565b6001600160a01b0387166000908152601c6020908152604080832093909355601b90522054612b6d908490613119565b6001600160a01b0387166000908152601b6020526040902054612ae8908490613106565b6001600160a01b0387166000908152601c6020526040902054612cc3908690613106565b6001600160a01b0388166000908152601c6020908152604080832093909355601b90522054612bb4908490613106565b602054612d01908390613106565b602055602154612d12908290613119565b6021555050565b600060208284031215612d2b57600080fd5b81356001600160e01b03198116811461096b57600080fd5b600060208284031215612d5557600080fd5b5035919050565b60005b83811015612d77578181015183820152602001612d5f565b50506000910152565b6020815260008251806020840152612d9f816040850160208701612d5c565b601f01601f19169190910160400192915050565b6001600160a01b0381168114611d8f57600080fd5b60008060408385031215612ddb57600080fd5b8235612de681612db3565b946020939093013593505050565b600060208284031215612e0657600080fd5b813561096b81612db3565b600080600060608486031215612e2657600080fd5b8335612e3181612db3565b92506020840135612e4181612db3565b929592945050506040919091013590565b60008060408385031215612e6557600080fd5b823591506020830135612e7781612db3565b809150509250929050565b80358015158114612e9257600080fd5b919050565b60008060408385031215612eaa57600080fd5b82359150612eba60208401612e82565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b0381118282101715612f0957634e487b7160e01b600052604160045260246000fd5b60405290565b600060808284031215612f2157600080fd5b612f29612ed9565b8235612f3481612db3565b81526020830135612f4481612db3565b6020820152604083810135908201526060928301359281019290925250919050565b600060408284031215612f7857600080fd5b604080519081016001600160401b0381118282101715612fa857634e487b7160e01b600052604160045260246000fd5b60405282358152905080612fbe60208401612e82565b60208201525092915050565b60006101008284031215612fdd57600080fd5b612fe5612ed9565b612fef8484612f66565b8152612ffe8460408501612f66565b60208201526130108460808501612f66565b60408201526130228460c08501612f66565b60608201529392505050565b805182526020908101511515910152565b610100810161304e828761302e565b61305b604083018661302e565b613068608083018561302e565b61307560c083018461302e565b95945050505050565b6000806040838503121561309157600080fd5b823561309c81612db3565b91506020830135612e7781612db3565b60208082526024908201527f546f6b656e466945524332303a207265666c656374696f6e206e6f7420656e61604082015263189b195960e21b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b818103818111156106aa576106aa6130f0565b808201808211156106aa576106aa6130f0565b600181811c9082168061314057607f821691505b60208210810361316057634e487b7160e01b600052602260045260246000fd5b50919050565b60008261318357634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601b908201527a2a37b5b2b72334a2a92199181d1036bab9ba1031329030b236b4b760291b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b80820281158282048414176106aa576106aa6130f0565b634e487b7160e01b600052603160045260246000fd5b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b815260008351613232816017850160208801612d5c565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613263816028840160208801612d5c565b01602801949350505050565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60006020828403121561330957600080fd5b815161096b81612db3565b600081613323576133236130f0565b50600019019056fe6c0757dc3e6b28b2580c03fd9e96c274acf4f99d91fbec9b418fa1d70604ff1c2022773e2291f2fc9298b5ad7d60fae5174151fe00b975c5bdbbe737ba1bfc2fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef546f6b656e466945524332303a207265666c656374696f6e2070657263656e74a164736f6c6343000817000a

Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.