ETH Price: $2,516.88 (-0.53%)

Shezmu Guardian ()
 

Overview

TokenID

2

Total Transfers

-

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
Guardian

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 24 : Guardian.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;

import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import {SafeERC20} from '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import {IERC20Metadata} from '@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol';
import {ERC1155} from '@openzeppelin/contracts/token/ERC1155/ERC1155.sol';
import {ERC1155Pausable} from '@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Pausable.sol';
import {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';
import {EnumerableSet} from '@openzeppelin/contracts/utils/structs/EnumerableSet.sol';
import {Strings} from '@openzeppelin/contracts/utils/Strings.sol';

import {IRewardRecipient} from '../interfaces/IRewardRecipient.sol';
import {IUniswapV2Router02} from '../interfaces/IUniswapV2Router02.sol';
import {IERC20MintableBurnable} from '../interfaces/IERC20MintableBurnable.sol';

error INVALID_ADDRESS();
error INVALID_AMOUNT();
error INVALID_PARAM();
error INVALID_FEE_TOKEN();

contract Guardian is ERC1155Pausable, Ownable, IRewardRecipient {
    using SafeERC20 for IERC20;
    using EnumerableSet for EnumerableSet.AddressSet;
    using Strings for uint256;

    /* ======== STORAGE ======== */
    struct RewardRate {
        uint256 rewardPerSec;
        uint256 numberOfGuardians;
    }

    struct RewardInfo {
        uint256 debt;
        uint256 pending;
    }

    /// @dev BASE URI
    string private constant BASE_URI = 'https://metadata.shezmu.io/guardian/';

    /// @notice percent multiplier (100%)
    uint256 public constant PRECISION = 10000;

    /// @notice SHEZMU
    IERC20MintableBurnable public immutable SHEZMU;

    /// @notice Fee Token (USDC)
    IERC20 public immutable USDC;

    /// @notice Uniswap Router
    IUniswapV2Router02 public immutable ROUTER;

    /// @notice price per guardian
    uint256 public immutable pricePerGuardian;

    /// @notice treasury wallet
    address public treasury;

    /// @notice txn fee (price)
    uint256 public txnFee;

    /// @notice claim fee (percentage)
    uint256 public claimFee;

    /// @notice mint limit in one txn
    uint256 public mintLimit;

    /// @notice mapping account => total balance
    mapping(address => uint256) public totalBalanceOf;

    /// @notice total supply
    uint256 public totalSupply;

    /// @notice reward rate
    RewardRate public rewardRate;

    /// @dev feeToken tokens (stable coin for txn fee payment)
    EnumerableSet.AddressSet private feeTokens;

    /// @dev TYPE
    uint8 private constant TYPE = 6;

    /// @dev SIZE for each TYPE
    uint8[6] private SIZES;

    /// @dev reward accTokenPerShare
    uint256 private accTokenPerShare;

    /// @dev reward lastUpdate
    uint256 private lastUpdate;

    /// @dev mapping account => reward info
    mapping(address => RewardInfo) private rewardInfoOf;

    /// @dev USDC dividendsPerShare
    uint256 private dividendsPerShare;

    /// @dev mapping account => dividends info
    mapping(address => RewardInfo) private dividendsInfoOf;

    /// @dev dividends multiplier
    uint256 private constant MULTIPLIER = 1e18;

    /* ======== EVENTS ======== */

    event MintLimit(uint256 limit);
    event Treasury(address treasury);
    event TxnFee(uint256 fee);
    event ClaimFee(uint256 fee);
    event AddFeeTokens(address[] tokens);
    event RemoveFeeTokens(address[] tokens);
    event Mint(address indexed from, address indexed to, uint256 amount);
    event Compound(address indexed from, address indexed to, uint256 amount);
    event Split(address indexed from, address indexed to, uint256 amount);
    event Claim(address indexed from, uint256 reward, uint256 dividends);

    /* ======== INITIALIZATION ======== */

    constructor(
        IERC20MintableBurnable shezmu,
        IERC20 usdc,
        IUniswapV2Router02 router,
        address treasury_
    ) ERC1155(BASE_URI) {
        SHEZMU = shezmu;
        USDC = usdc;
        ROUTER = router;

        if (treasury_ == address(0)) revert INVALID_ADDRESS();
        treasury = treasury_;

        // 1 Guardian: Craftsman
        // 5 Guardian: Scribe
        // 10 Guardian: High Priest
        // 25 Guardian: Nobles
        // 50 Guardians: Viziers
        // 100 Guardian: Pharaoh
        SIZES = [1, 5, 10, 25, 50, 100];

        // 12 Shezmu per Guardian
        pricePerGuardian = 12 ether;

        // txn fee $15
        txnFee = 15 ether;
        feeTokens.add(address(usdc));

        // claim fee 20%
        claimFee = 2000;

        // option how many can mint in one txn
        mintLimit = 100;

        // 0.1 Shezmu per day for first 250,000 guardians
        rewardRate.rewardPerSec = uint256(0.1 ether) / uint256(1 days);
        rewardRate.numberOfGuardians = 250000;
    }

    /* ======== MODIFIERS ======== */

    modifier update() {
        if (totalSupply > 0) {
            accTokenPerShare +=
                rewardRate.rewardPerSec *
                (block.timestamp - lastUpdate);
        }
        lastUpdate = block.timestamp;

        _;
    }

    /* ======== POLICY FUNCTIONS ======== */

    function setMintLimit(uint256 limit) external onlyOwner {
        if (limit == 0) revert INVALID_AMOUNT();

        mintLimit = limit;

        emit MintLimit(limit);
    }

    function setTreasury(address treasury_) external onlyOwner {
        if (treasury_ == address(0)) revert INVALID_ADDRESS();

        treasury = treasury_;

        emit Treasury(treasury_);
    }

    function setTxnFee(uint256 fee) external onlyOwner {
        if (fee == 0) revert INVALID_AMOUNT();

        txnFee = fee;

        emit TxnFee(fee);
    }

    function setClaimFee(uint256 fee) external onlyOwner {
        if (fee >= PRECISION / 2) revert INVALID_AMOUNT();

        claimFee = fee;

        emit ClaimFee(fee);
    }

    function addFeeTokens(address[] calldata tokens) external onlyOwner {
        uint256 length = tokens.length;

        for (uint256 i = 0; i < length; ) {
            feeTokens.add(tokens[i]);
            unchecked {
                ++i;
            }
        }

        emit AddFeeTokens(tokens);
    }

    function removeFeeTokens(address[] calldata tokens) external onlyOwner {
        uint256 length = tokens.length;

        for (uint256 i = 0; i < length; ) {
            feeTokens.remove(tokens[i]);
            unchecked {
                ++i;
            }
        }

        emit RemoveFeeTokens(tokens);
    }

    function pause() external onlyOwner {
        _pause();
    }

    function unpause() external onlyOwner {
        _unpause();
    }

    function airdrop(
        address[] calldata tos,
        uint256[] calldata amounts
    ) external onlyOwner update {
        uint256 length = tos.length;
        if (length != amounts.length) revert INVALID_PARAM();

        for (uint256 i = 0; i < length; ) {
            _simpleMint(tos[i], amounts[i]);

            unchecked {
                ++i;
            }
        }
    }

    /* ======== INTERNAL FUNCTIONS ======== */

    function _min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    function _sync(address account) internal {
        uint256 totalBalance = totalBalanceOf[account];

        uint256[] memory ids = new uint256[](TYPE);
        uint256[] memory mintAmounts = new uint256[](TYPE);
        uint256[] memory burnAmounts = new uint256[](TYPE);

        unchecked {
            for (uint256 i = 0; i < TYPE; i++) {
                uint256 index = TYPE - i - 1;
                uint256 newBalance = totalBalance / SIZES[index];
                uint256 oldBalance = balanceOf(account, index);

                ids[index] = index;
                if (newBalance > oldBalance) {
                    mintAmounts[index] = newBalance - oldBalance;
                } else if (newBalance < oldBalance) {
                    burnAmounts[index] = oldBalance - newBalance;
                }

                totalBalance = totalBalance % SIZES[index];
            }
        }

        _mintBatch(account, ids, mintAmounts, '');
        _burnBatch(account, ids, burnAmounts);
    }

    function _updateReward(
        address account
    )
        internal
        returns (
            RewardInfo storage rewardInfo,
            RewardInfo storage dividendsInfo
        )
    {
        uint256 totalBalance = totalBalanceOf[account];

        rewardInfo = rewardInfoOf[account];
        uint256 reward = accTokenPerShare * totalBalance - rewardInfo.debt;
        uint256 fee = (reward * claimFee) / PRECISION;
        rewardInfo.pending += reward - fee;
        SHEZMU.mint(treasury, fee);

        dividendsInfo = dividendsInfoOf[account];
        dividendsInfo.pending +=
            (dividendsPerShare * totalBalance) /
            MULTIPLIER -
            dividendsInfo.debt;
    }

    function _mint(address to, address feeToken, uint256 amount) internal {
        if (to == address(0)) revert INVALID_ADDRESS();
        if (amount == 0 || amount > mintLimit) revert INVALID_AMOUNT();
        if (!feeTokens.contains(feeToken)) revert INVALID_FEE_TOKEN();

        // pay txn fee
        IERC20(feeToken).safeTransferFrom(
            _msgSender(),
            treasury,
            (txnFee * 10 ** IERC20Metadata(feeToken).decimals()) / MULTIPLIER
        );

        _simpleMint(to, amount);
    }

    function _simpleMint(address to, uint256 amount) internal {
        // update reward
        (
            RewardInfo storage rewardInfo,
            RewardInfo storage dividendsInfo
        ) = _updateReward(to);

        // mint Guardian
        unchecked {
            totalBalanceOf[to] += amount;
            totalSupply += amount;
        }

        // update reward rate if exceeds the Guardians number
        if (totalSupply > rewardRate.numberOfGuardians) {
            rewardRate.rewardPerSec /= 2;
            rewardRate.numberOfGuardians *= 2;
        }

        // update reward debt
        rewardInfo.debt = accTokenPerShare * totalBalanceOf[to];
        dividendsInfo.debt =
            (dividendsPerShare * totalBalanceOf[to]) /
            MULTIPLIER;

        // sync Guardians
        _sync(to);
    }

    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual override update {
        super._beforeTokenTransfer(operator, from, to, ids, amounts, data);

        if (from == address(0) || to == address(0)) {
            return;
        }

        // update reward
        (
            RewardInfo storage fromRewardInfo,
            RewardInfo storage fromDividendsInfo
        ) = _updateReward(from);
        (
            RewardInfo storage toRewardInfo,
            RewardInfo storage toDividendsInfo
        ) = _updateReward(to);

        // calculate number of Guardians
        uint256 amount;
        unchecked {
            for (uint256 i = 0; i < ids.length; ++i) {
                amount += SIZES[ids[i]] * amounts[i];
            }
        }

        // update total balance
        unchecked {
            totalBalanceOf[from] -= amount;
            totalBalanceOf[to] += amount;
        }

        // update reward debt
        fromRewardInfo.debt = accTokenPerShare * totalBalanceOf[from];
        fromDividendsInfo.debt =
            (dividendsPerShare * totalBalanceOf[from]) /
            MULTIPLIER;
        toRewardInfo.debt = accTokenPerShare * totalBalanceOf[to];
        toDividendsInfo.debt =
            (dividendsPerShare * totalBalanceOf[to]) /
            MULTIPLIER;
    }

    /* ======== PUBLIC FUNCTIONS ======== */

    function mint(
        address to,
        address feeToken,
        uint256 amount
    ) external update {
        address account = _msgSender();

        // burn Shezmu
        SHEZMU.burnFrom(account, amount * pricePerGuardian);

        // mint Guardian
        _mint(to, feeToken, amount);

        emit Mint(account, to, amount);
    }

    function compound(
        address to,
        address feeToken,
        uint256 amount
    ) external update {
        address account = _msgSender();

        // update reward
        (RewardInfo storage rewardInfo, ) = _updateReward(account);
        rewardInfo.debt = accTokenPerShare * totalBalanceOf[account];

        // burn Shezmu out of rewards
        if (amount > 0) {
            if (rewardInfo.pending < amount * pricePerGuardian)
                revert INVALID_AMOUNT();
            unchecked {
                rewardInfo.pending -= amount * pricePerGuardian;
            }
        } else {
            amount = rewardInfo.pending / pricePerGuardian;
            rewardInfo.pending %= pricePerGuardian;
        }

        // mint Guardian
        _mint(to, feeToken, amount);

        emit Compound(account, to, amount);
    }

    function split(address to, uint256 amount) external update {
        if (to == address(0)) revert INVALID_ADDRESS();
        address from = _msgSender();
        if (totalBalanceOf[from] < amount) revert INVALID_AMOUNT();

        // from
        {
            // update reward
            (
                RewardInfo storage rewardInfo,
                RewardInfo storage dividendsInfo
            ) = _updateReward(from);

            unchecked {
                totalBalanceOf[from] -= amount;
            }

            // update reward debt
            rewardInfo.debt = accTokenPerShare * totalBalanceOf[from];
            dividendsInfo.debt =
                (dividendsPerShare * totalBalanceOf[from]) /
                MULTIPLIER;

            // sync Guardians
            _sync(from);
        }

        // to
        {
            // update reward
            (
                RewardInfo storage rewardInfo,
                RewardInfo storage dividendsInfo
            ) = _updateReward(to);

            unchecked {
                totalBalanceOf[to] += amount;
            }

            // update reward debt
            rewardInfo.debt = accTokenPerShare * totalBalanceOf[to];
            dividendsInfo.debt =
                (dividendsPerShare * totalBalanceOf[to]) /
                MULTIPLIER;

            // sync Guardians
            _sync(to);
        }

        emit Split(from, to, amount);
    }

    function claim() external update {
        address account = _msgSender();
        uint256 totalBalance = totalBalanceOf[account];

        if (totalBalance == 0) return;

        // update reward
        (
            RewardInfo storage rewardInfo,
            RewardInfo storage dividendsInfo
        ) = _updateReward(account);

        rewardInfo.debt = accTokenPerShare * totalBalance;
        dividendsInfo.debt = (dividendsPerShare * totalBalance) / MULTIPLIER;

        // transfer pending (Shezmu)
        uint256 reward = rewardInfo.pending;
        if (reward > 0) {
            rewardInfo.pending = 0;
            SHEZMU.mint(account, reward);
        }

        // transfer pending (USDC)
        uint256 dividends = _min(
            dividendsInfo.pending,
            USDC.balanceOf(address(this))
        );
        if (dividends > 0) {
            unchecked {
                dividendsInfo.pending -= dividends;
            }
            USDC.safeTransfer(account, dividends);
        }

        emit Claim(account, reward, dividends);
    }

    function receiveReward() external payable override {
        if (msg.value == 0) return;

        address[] memory path = new address[](2);
        path[0] = ROUTER.WETH();
        path[1] = address(USDC);

        uint256 balanceBefore = USDC.balanceOf(address(this));
        ROUTER.swapExactETHForTokensSupportingFeeOnTransferTokens{
            value: msg.value
        }(0, path, address(this), block.timestamp);

        uint256 rewardAmount = USDC.balanceOf(address(this)) - balanceBefore;

        if (totalSupply > 0 && rewardAmount > 0) {
            dividendsPerShare += (rewardAmount * MULTIPLIER) / totalSupply;
        }
    }

    /* ======== VIEW FUNCTIONS ======== */

    function uri(
        uint256 tokenId
    ) public view virtual override returns (string memory) {
        return
            tokenId < TYPE
                ? string(
                    abi.encodePacked(BASE_URI, tokenId.toString(), '.json')
                )
                : super.uri(tokenId);
    }

    function allFeeTokens() external view returns (address[] memory) {
        return feeTokens.values();
    }

    function pendingReward(
        address account
    ) external view returns (uint256 reward, uint256 dividends) {
        uint256 totalBalance = totalBalanceOf[account];

        if (totalBalance > 0) {
            // Shezmu reward
            RewardInfo memory rewardInfo = rewardInfoOf[account];
            uint256 newAccTokenPerShare = accTokenPerShare +
                rewardRate.rewardPerSec *
                (block.timestamp - lastUpdate);
            uint256 newReward = newAccTokenPerShare *
                totalBalance -
                rewardInfoOf[account].debt;
            reward =
                rewardInfo.pending +
                newReward -
                (newReward * claimFee) /
                PRECISION;

            // USDC reward
            RewardInfo memory dividendsInfo = dividendsInfoOf[account];
            dividends =
                dividendsInfo.pending +
                (dividendsPerShare * totalBalance) /
                MULTIPLIER -
                dividendsInfo.debt;
        }
    }
}

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

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

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

File 3 of 24 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

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

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

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

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

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

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

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

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

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

pragma solidity ^0.8.0;

import "./IERC1155.sol";
import "./IERC1155Receiver.sol";
import "./extensions/IERC1155MetadataURI.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the basic standard multi-token.
 * See https://eips.ethereum.org/EIPS/eip-1155
 * Originally based on code by Enjin: https://github.com/enjin/erc-1155
 *
 * _Available since v3.1._
 */
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
    using Address for address;

    // Mapping from token ID to account balances
    mapping(uint256 => mapping(address => uint256)) private _balances;

    // Mapping from account to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json
    string private _uri;

    /**
     * @dev See {_setURI}.
     */
    constructor(string memory uri_) {
        _setURI(uri_);
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC1155).interfaceId ||
            interfaceId == type(IERC1155MetadataURI).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC1155MetadataURI-uri}.
     *
     * This implementation returns the same URI for *all* token types. It relies
     * on the token type ID substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * Clients calling this function must replace the `\{id\}` substring with the
     * actual token type ID.
     */
    function uri(uint256) public view virtual override returns (string memory) {
        return _uri;
    }

    /**
     * @dev See {IERC1155-balanceOf}.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {
        require(account != address(0), "ERC1155: address zero is not a valid owner");
        return _balances[id][account];
    }

    /**
     * @dev See {IERC1155-balanceOfBatch}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(
        address[] memory accounts,
        uint256[] memory ids
    ) public view virtual override returns (uint256[] memory) {
        require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch");

        uint256[] memory batchBalances = new uint256[](accounts.length);

        for (uint256 i = 0; i < accounts.length; ++i) {
            batchBalances[i] = balanceOf(accounts[i], ids[i]);
        }

        return batchBalances;
    }

    /**
     * @dev See {IERC1155-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC1155-isApprovedForAll}.
     */
    function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[account][operator];
    }

    /**
     * @dev See {IERC1155-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not token owner or approved"
        );
        _safeTransferFrom(from, to, id, amount, data);
    }

    /**
     * @dev See {IERC1155-safeBatchTransferFrom}.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not token owner or approved"
        );
        _safeBatchTransferFrom(from, to, ids, amounts, data);
    }

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

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

        emit TransferSingle(operator, from, to, id, amount);

        _afterTokenTransfer(operator, from, to, ids, amounts, data);

        _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; ++i) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

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

        emit TransferBatch(operator, from, to, ids, amounts);

        _afterTokenTransfer(operator, from, to, ids, amounts, data);

        _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);
    }

    /**
     * @dev Sets a new URI for all token types, by relying on the token type ID
     * substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * By this mechanism, any occurrence of the `\{id\}` substring in either the
     * URI or any of the amounts in the JSON file at said URI will be replaced by
     * clients with the token type ID.
     *
     * For example, the `https://token-cdn-domain/\{id\}.json` URI would be
     * interpreted by clients as
     * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`
     * for token type ID 0x4cce0.
     *
     * See {uri}.
     *
     * Because these URIs cannot be meaningfully represented by the {URI} event,
     * this function emits no events.
     */
    function _setURI(string memory newuri) internal virtual {
        _uri = newuri;
    }

    /**
     * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        _balances[id][to] += amount;
        emit TransferSingle(operator, address(0), to, id, amount);

        _afterTokenTransfer(operator, address(0), to, ids, amounts, data);

        _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; i++) {
            _balances[ids[i]][to] += amounts[i];
        }

        emit TransferBatch(operator, address(0), to, ids, amounts);

        _afterTokenTransfer(operator, address(0), to, ids, amounts, data);

        _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);
    }

    /**
     * @dev Destroys `amount` tokens of token type `id` from `from`
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `from` must have at least `amount` tokens of token type `id`.
     */
    function _burn(address from, uint256 id, uint256 amount) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, from, address(0), ids, amounts, "");

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }

        emit TransferSingle(operator, from, address(0), id, amount);

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     */
    function _burnBatch(address from, uint256[] memory ids, uint256[] memory amounts) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, address(0), ids, amounts, "");

        for (uint256 i = 0; i < ids.length; i++) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
        }

        emit TransferBatch(operator, from, address(0), ids, amounts);

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits an {ApprovalForAll} event.
     */
    function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {
        require(owner != operator, "ERC1155: setting approval status for self");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `ids` and `amounts` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    /**
     * @dev Hook that is called after any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `id` and `amount` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    function _doSafeTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
                if (response != IERC1155Receiver.onERC1155Received.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non-ERC1155Receiver implementer");
            }
        }
    }

    function _doSafeBatchTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (
                bytes4 response
            ) {
                if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non-ERC1155Receiver implementer");
            }
        }
    }

    function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {
        uint256[] memory array = new uint256[](1);
        array[0] = element;

        return array;
    }
}

File 5 of 24 : ERC1155Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.2) (token/ERC1155/extensions/ERC1155Pausable.sol)

pragma solidity ^0.8.0;

import "../ERC1155.sol";
import "../../../security/Pausable.sol";

/**
 * @dev ERC1155 token with pausable token transfers, minting and burning.
 *
 * Useful for scenarios such as preventing trades until the end of an evaluation
 * period, or having an emergency switch for freezing all token transfers in the
 * event of a large bug.
 *
 * IMPORTANT: This contract does not include public pause and unpause functions. In
 * addition to inheriting this contract, you must define both functions, invoking the
 * {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate
 * access control, e.g. using {AccessControl} or {Ownable}. Not doing so will
 * make the contract unpausable.
 *
 * _Available since v3.1._
 */
abstract contract ERC1155Pausable is ERC1155, Pausable {
    /**
     * @dev See {ERC1155-_beforeTokenTransfer}.
     *
     * Requirements:
     *
     * - the contract must not be paused.
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual override {
        super._beforeTokenTransfer(operator, from, to, ids, amounts, data);

        require(!paused(), "ERC1155Pausable: token transfer while paused");
    }
}

File 6 of 24 : IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)

pragma solidity ^0.8.0;

import "../IERC1155.sol";

/**
 * @dev Interface of the optional ERC1155MetadataExtension interface, as defined
 * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155MetadataURI is IERC1155 {
    /**
     * @dev Returns the URI for token type `id`.
     *
     * If the `\{id\}` substring is present in the URI, it must be replaced by
     * clients with the actual token type ID.
     */
    function uri(uint256 id) external view returns (string memory);
}

File 7 of 24 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(
        address[] calldata accounts,
        uint256[] calldata ids
    ) external view returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

File 8 of 24 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {
    /**
     * @dev Handles the receipt of a single ERC1155 token type. This function is
     * called at the end of a `safeTransferFrom` after the balance has been updated.
     *
     * NOTE: To accept the transfer, this must return
     * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61, or its own function selector).
     *
     * @param operator The address which initiated the transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param id The ID of the token being transferred
     * @param value The amount of tokens being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @dev Handles the receipt of a multiple ERC1155 token types. This function
     * is called at the end of a `safeBatchTransferFrom` after the balances have
     * been updated.
     *
     * NOTE: To accept the transfer(s), this must return
     * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     * (i.e. 0xbc197c81, or its own function selector).
     *
     * @param operator The address which initiated the batch transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param ids An array containing ids of each token being transferred (order and length must match values array)
     * @param values An array containing amounts of each token being transferred (order and length must match ids array)
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

File 9 of 24 : 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 10 of 24 : IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (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.
 */
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].
     */
    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 11 of 24 : 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 12 of 24 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (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. Compatible with tokens that require the approval to be set to
     * 0 before setting it to a non-zero value.
     */
    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 13 of 24 : 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 14 of 24 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

File 15 of 24 : 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 16 of 24 : 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 17 of 24 : 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 18 of 24 : 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 19 of 24 : 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 20 of 24 : 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 21 of 24 : IERC20MintableBurnable.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;

interface IERC20MintableBurnable {
    function mint(address to, uint256 amount) external;

    function burn(uint256 amount) external;

    function burnFrom(address account, uint256 amount) external;
}

File 22 of 24 : IRewardRecipient.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;

interface IRewardRecipient {
    function receiveReward() external payable;
}

File 23 of 24 : IUniswapV2Router01.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;

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 24 of 24 : IUniswapV2Router02.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;

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;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20MintableBurnable","name":"shezmu","type":"address"},{"internalType":"contract IERC20","name":"usdc","type":"address"},{"internalType":"contract IUniswapV2Router02","name":"router","type":"address"},{"internalType":"address","name":"treasury_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"INVALID_ADDRESS","type":"error"},{"inputs":[],"name":"INVALID_AMOUNT","type":"error"},{"inputs":[],"name":"INVALID_FEE_TOKEN","type":"error"},{"inputs":[],"name":"INVALID_PARAM","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"AddFeeTokens","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"dividends","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"ClaimFee","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":"amount","type":"uint256"}],"name":"Compound","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":"amount","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"limit","type":"uint256"}],"name":"MintLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"RemoveFeeTokens","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":"amount","type":"uint256"}],"name":"Split","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"treasury","type":"address"}],"name":"Treasury","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"TxnFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROUTER","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SHEZMU","outputs":[{"internalType":"contract IERC20MintableBurnable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDC","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"addFeeTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tos","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"allFeeTokens","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"feeToken","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"compound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"feeToken","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"pendingReward","outputs":[{"internalType":"uint256","name":"reward","type":"uint256"},{"internalType":"uint256","name":"dividends","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pricePerGuardian","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"receiveReward","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"removeFeeTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"rewardPerSec","type":"uint256"},{"internalType":"uint256","name":"numberOfGuardians","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"setClaimFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"setMintLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"treasury_","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"setTxnFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"split","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":[{"internalType":"address","name":"","type":"address"}],"name":"totalBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"txnFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]

6101006040523480156200001257600080fd5b50604051620048573803806200485783398101604081905262000035916200031a565b60405180606001604052806024815260200162004833602491396200005a8162000172565b506003805460ff19169055620000703362000184565b6001600160a01b0380851660805283811660a05282811660c0528116620000aa57604051635963709b60e01b815260040160405180910390fd5b600480546001600160a01b0319166001600160a01b0383161790556040805160c0810182526001815260056020820152600a918101919091526019606082015260326080820152606460a08201526200010890600e90600662000250565b5067a688906bd8b0000060e05267d02ab486cedc00006005556200013a600c84620001de602090811b62001af717901c565b506107d060065560646007556200015d6201518067016345785d8a000062000382565b600a5550506203d090600b5550620005169050565b60026200018082826200044a565b5050565b600380546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000620001f5836001600160a01b038416620001fe565b90505b92915050565b60008181526001830160205260408120546200024757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620001f8565b506000620001f8565b600183019183908215620002d85791602002820160005b83821115620002a757835183826101000a81548160ff021916908360ff160217905550926020019260010160208160000104928301926001030262000267565b8015620002d65782816101000a81549060ff0219169055600101602081600001049283019260010302620002a7565b505b50620002e6929150620002ea565b5090565b5b80821115620002e65760008155600101620002eb565b6001600160a01b03811681146200031757600080fd5b50565b600080600080608085870312156200033157600080fd5b84516200033e8162000301565b6020860151909450620003518162000301565b6040860151909350620003648162000301565b6060860151909250620003778162000301565b939692955090935050565b600082620003a057634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620003d057607f821691505b602082108103620003f157634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200044557600081815260208120601f850160051c81016020861015620004205750805b601f850160051c820191505b8181101562000441578281556001016200042c565b5050505b505050565b81516001600160401b03811115620004665762000466620003a5565b6200047e81620004778454620003bb565b84620003f7565b602080601f831160018114620004b657600084156200049d5750858301515b600019600386901b1c1916600185901b17855562000441565b600085815260208120601f198616915b82811015620004e757888601518255948401946001909101908401620004c6565b5085821015620005065787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05160e05161427a620005b96000396000818161033901528181610b2301528181610b7401528181610ba001528181610bd201526114530152600081816103ad0152818161180401526119880152600081816105a501528181610f0001528181610f90015281816118b9015281816119190152611a2d0152600081816105fc01528181610e7a015281816114200152611f04015261427a6000f3fe60806040526004361061023a5760003560e01c8063715018a61161012e578063a22cb465116100ab578063f0f442601161006f578063f0f442601461072b578063f242432a1461074b578063f2fde38b1461076b578063f40f0f521461078b578063ff3d9e4f146107ab57600080fd5b8063a22cb4651461066a578063aaf5eb681461068a578063c2c2fd47146106a0578063c6c3bbe6146106c2578063e985e9c5146106e257600080fd5b80638da5cb5b116100f25780638da5cb5b146105c75780638de43c1f146105ea578063996517cf1461061e57806399d32fc4146106345780639e6a1d7d1461064a57600080fd5b8063715018a6146105195780637b0a47ee1461052e5780637b984e181461055e5780638456cb591461057e57806389a302711461059357600080fd5b80633e232dcf116101bc5780634f6cb1cd116101805780634f6cb1cd1461048b5780635c975abb146104a15780635d1e2d1b146104b957806361d027b3146104d957806367243482146104f957600080fd5b80633e232dcf146103e75780633f4ba83a146104075780634b0ee02a1461041c5780634e1273f4146104495780634e71d92d1461047657600080fd5b806327f84a231161020357806327f84a23146103075780632b166a21146103275780632e75ab501461035b5780632eb2c2d61461037b57806332fe7b261461039b57600080fd5b8062fdd58e1461023f57806301ffc9a714610272578063080d711a146102a25780630e89341c146102c457806318160ddd146102f1575b600080fd5b34801561024b57600080fd5b5061025f61025a36600461356c565b6107b3565b6040519081526020015b60405180910390f35b34801561027e57600080fd5b5061029261028d3660046135ae565b61084c565b6040519015158152602001610269565b3480156102ae57600080fd5b506102c26102bd366004613617565b61089c565b005b3480156102d057600080fd5b506102e46102df366004613659565b61092a565b60405161026991906136c2565b3480156102fd57600080fd5b5061025f60095481565b34801561031357600080fd5b506102c2610322366004613659565b61098a565b34801561033357600080fd5b5061025f7f000000000000000000000000000000000000000000000000000000000000000081565b34801561036757600080fd5b506102c2610376366004613659565b6109ef565b34801561038757600080fd5b506102c2610396366004613821565b610a58565b3480156103a757600080fd5b506103cf7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610269565b3480156103f357600080fd5b506102c26104023660046138cf565b610aa4565b34801561041357600080fd5b506102c2610c69565b34801561042857600080fd5b5061025f610437366004613910565b60086020526000908152604090205481565b34801561045557600080fd5b5061046961046436600461392d565b610c7b565b6040516102699190613a35565b34801561048257600080fd5b506102c2610da5565b34801561049757600080fd5b5061025f60055481565b3480156104ad57600080fd5b5060035460ff16610292565b3480156104c557600080fd5b506102c26104d436600461356c565b611003565b3480156104e557600080fd5b506004546103cf906001600160a01b031681565b34801561050557600080fd5b506102c2610514366004613a48565b6111f6565b34801561052557600080fd5b506102c26112bf565b34801561053a57600080fd5b50600a54600b54610549919082565b60408051928352602083019190915201610269565b34801561056a57600080fd5b506102c2610579366004613617565b6112d1565b34801561058a57600080fd5b506102c2611352565b34801561059f57600080fd5b506103cf7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105d357600080fd5b5060035461010090046001600160a01b03166103cf565b3480156105f657600080fd5b506103cf7f000000000000000000000000000000000000000000000000000000000000000081565b34801561062a57600080fd5b5061025f60075481565b34801561064057600080fd5b5061025f60065481565b34801561065657600080fd5b506102c2610665366004613659565b611362565b34801561067657600080fd5b506102c2610685366004613ac2565b6113c0565b34801561069657600080fd5b5061025f61271081565b3480156106ac57600080fd5b506106b56113cf565b6040516102699190613b34565b3480156106ce57600080fd5b506102c26106dd3660046138cf565b6113e0565b3480156106ee57600080fd5b506102926106fd366004613b47565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b34801561073757600080fd5b506102c2610746366004613910565b611534565b34801561075757600080fd5b506102c2610766366004613b75565b6115b1565b34801561077757600080fd5b506102c2610786366004613910565b6115f6565b34801561079757600080fd5b506105496107a6366004613910565b61166f565b6102c26117d7565b60006001600160a01b0383166108235760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b148061087d57506001600160e01b031982166303a24d0760e21b145b8061084657506301ffc9a760e01b6001600160e01b0319831614610846565b6108a4611b13565b8060005b818110156108eb576108e28484838181106108c5576108c5613bde565b90506020020160208101906108da9190613910565b600c90611b73565b506001016108a8565b507f2af8e725041af05e7616f64607221994cf28b2614abd44dc19aec09836669269838360405161091d929190613bf4565b60405180910390a1505050565b6060600682106109425761093d82611b88565b610846565b6040518060600160405280602481526020016142216024913961096483611c1c565b604051602001610975929190613c37565b60405160208183030381529060405292915050565b610992611b13565b806000036109b35760405163fae8279160e01b815260040160405180910390fd5b60058190556040518181527f47b76c6fd21a7e3afc433c6b06c1d804c7e070b3a522e25078f4cb09734027a7906020015b60405180910390a150565b6109f7611b13565b610a046002612710613ca2565b8110610a235760405163fae8279160e01b815260040160405180910390fd5b60068190556040518181527ff0f9e33722220fdcabe8003eb48d6c0c29121a045e723c954982fe1c5713c70d906020016109e4565b6001600160a01b038516331480610a745750610a7485336106fd565b610a905760405162461bcd60e51b815260040161081a90613cb6565b610a9d8585858585611caf565b5050505050565b60095415610add57601054610ab99042613d04565b600a54610ac69190613d17565b600f6000828254610ad79190613d2e565b90915550505b42601055336000610aed82611e51565b506001600160a01b038316600090815260086020526040902054600f54919250610b1691613d17565b81558215610b9e57610b487f000000000000000000000000000000000000000000000000000000000000000084613d17565b81600101541015610b6c5760405163fae8279160e01b815260040160405180910390fd5b6001810180547f0000000000000000000000000000000000000000000000000000000000000000850290039055610c0a565b7f00000000000000000000000000000000000000000000000000000000000000008160010154610bce9190613ca2565b92507f0000000000000000000000000000000000000000000000000000000000000000816001016000828254610c049190613d41565b90915550505b610c15858585611fcc565b846001600160a01b0316826001600160a01b03167f6c7e7d4cb83a668aef31739dd35dc3fc3d5f31d62b69e438b7b24d35b40dcc6385604051610c5a91815260200190565b60405180910390a35050505050565b610c71611b13565b610c7961210a565b565b60608151835114610ce05760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b606482015260840161081a565b6000835167ffffffffffffffff811115610cfc57610cfc6136d5565b604051908082528060200260200182016040528015610d25578160200160208202803683370190505b50905060005b8451811015610d9d57610d70858281518110610d4957610d49613bde565b6020026020010151858381518110610d6357610d63613bde565b60200260200101516107b3565b828281518110610d8257610d82613bde565b6020908102919091010152610d9681613d55565b9050610d2b565b509392505050565b60095415610dde57601054610dba9042613d04565b600a54610dc79190613d17565b600f6000828254610dd89190613d2e565b90915550505b426010553360008181526008602052604081205490819003610dfe575050565b600080610e0a84611e51565b9150915082600f54610e1c9190613d17565b8255601254670de0b6b3a764000090610e36908590613d17565b610e409190613ca2565b815560018201548015610ed757600060018401556040516340c10f1960e01b81526001600160a01b038681166004830152602482018390527f000000000000000000000000000000000000000000000000000000000000000016906340c10f1990604401600060405180830381600087803b158015610ebe57600080fd5b505af1158015610ed2573d6000803e3d6000fd5b505050505b60018201546040516370a0823160e01b8152306004820152600091610f70916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015610f47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6b9190613d6e565b61215c565b90508015610fb7576001830180548290039055610fb76001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168783612172565b60408051838152602081018390526001600160a01b038816917f34fcbac0073d7c3d388e51312faf357774904998eeb8fca628b9e6f65ee1cbf7910160405180910390a2505050505050565b6009541561103c576010546110189042613d04565b600a546110259190613d17565b600f60008282546110369190613d2e565b90915550505b426010556001600160a01b03821661106757604051635963709b60e01b815260040160405180910390fd5b336000818152600860205260409020548211156110975760405163fae8279160e01b815260040160405180910390fd5b6000806110a383611e51565b6001600160a01b0385166000908152600860205260409020805487900390819055600f549294509092506110d691613d17565b82556001600160a01b038316600090815260086020526040902054601254670de0b6b3a76400009161110791613d17565b6111119190613ca2565b815561111c836121d5565b505060008061112a85611e51565b6001600160a01b03871660009081526008602052604090208054870190819055600f5492945090925061115c91613d17565b82556001600160a01b038516600090815260086020526040902054601254670de0b6b3a76400009161118d91613d17565b6111979190613ca2565b81556111a2856121d5565b5050826001600160a01b0316816001600160a01b03167f56b138798bd325f6cc79f626c4644aa2fd6703ecb0ab0fb168f883caed75bf32846040516111e991815260200190565b60405180910390a3505050565b6111fe611b13565b60095415611237576010546112139042613d04565b600a546112209190613d17565b600f60008282546112319190613d2e565b90915550505b426010558281811461125c576040516322ee6ae760e01b815260040160405180910390fd5b60005b818110156112b7576112af86868381811061127c5761127c613bde565b90506020020160208101906112919190613910565b8585848181106112a3576112a3613bde565b905060200201356123a5565b60010161125f565b505050505050565b6112c7611b13565b610c796000612491565b6112d9611b13565b8060005b81811015611320576113178484838181106112fa576112fa613bde565b905060200201602081019061130f9190613910565b600c90611af7565b506001016112dd565b507fccb0a951adeec2b600e22533ea11a7aed53b518d6b6633101ad5a4a78065831c838360405161091d929190613bf4565b61135a611b13565b610c796124eb565b61136a611b13565b8060000361138b5760405163fae8279160e01b815260040160405180910390fd5b60078190556040518181527f03bbcf0896b4f83d0039a26c11ebb96733a8e027d9aa71d95753b6168dbb10ab906020016109e4565b6113cb338383612528565b5050565b60606113db600c612600565b905090565b60095415611419576010546113f59042613d04565b600a546114029190613d17565b600f60008282546114139190613d2e565b90915550505b42601055337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166379cc6790826114787f000000000000000000000000000000000000000000000000000000000000000086613d17565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b1580156114be57600080fd5b505af11580156114d2573d6000803e3d6000fd5b505050506114e1848484611fcc565b836001600160a01b0316816001600160a01b03167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f88460405161152691815260200190565b60405180910390a350505050565b61153c611b13565b6001600160a01b03811661156357604051635963709b60e01b815260040160405180910390fd5b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527ffb26c00f7d7dba814173c8a2db3466cb26ee25fdcec8867af7da3aa1f296addd906020016109e4565b6001600160a01b0385163314806115cd57506115cd85336106fd565b6115e95760405162461bcd60e51b815260040161081a90613cb6565b610a9d858585858561260d565b6115fe611b13565b6001600160a01b0381166116635760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161081a565b61166c81612491565b50565b6001600160a01b038116600090815260086020526040812054819080156117d1576001600160a01b038416600090815260116020908152604080832081518083019092528054825260010154918101919091526010549091906116d29042613d04565b600a546116df9190613d17565b600f546116ec9190613d2e565b6001600160a01b038716600090815260116020526040812054919250906117138584613d17565b61171d9190613d04565b9050612710600654826117309190613d17565b61173a9190613ca2565b81846020015161174a9190613d2e565b6117549190613d04565b6001600160a01b03881660009081526013602090815260409182902082518084019093528054808452600190910154918301919091526012549298509091670de0b6b3a7640000906117a7908890613d17565b6117b19190613ca2565b82602001516117c09190613d2e565b6117ca9190613d04565b9550505050505b50915091565b346000036117e157565b6040805160028082526060820183526000926020830190803683370190505090507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611860573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118849190613d87565b8160008151811061189757611897613bde565b60200260200101906001600160a01b031690816001600160a01b0316815250507f0000000000000000000000000000000000000000000000000000000000000000816001815181106118eb576118eb613bde565b6001600160a01b0392831660209182029290920101526040516370a0823160e01b81523060048201526000917f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015611960573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119849190613d6e565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b6f9de953460008530426040518663ffffffff1660e01b81526004016119da9493929190613da4565b6000604051808303818588803b1580156119f357600080fd5b505af1158015611a07573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600093508492506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691506370a0823190602401602060405180830381865afa158015611a75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a999190613d6e565b611aa39190613d04565b90506000600954118015611ab75750600081115b15611af257600954611ad1670de0b6b3a764000083613d17565b611adb9190613ca2565b60126000828254611aec9190613d2e565b90915550505b505050565b6000611b0c836001600160a01b038416612745565b9392505050565b6003546001600160a01b03610100909104163314610c795760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161081a565b6000611b0c836001600160a01b038416612794565b606060028054611b9790613dd9565b80601f0160208091040260200160405190810160405280929190818152602001828054611bc390613dd9565b8015611c105780601f10611be557610100808354040283529160200191611c10565b820191906000526020600020905b815481529060010190602001808311611bf357829003601f168201915b50505050509050919050565b60606000611c2983612887565b600101905060008167ffffffffffffffff811115611c4957611c496136d5565b6040519080825280601f01601f191660200182016040528015611c73576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084611c7d57509392505050565b8151835114611cd05760405162461bcd60e51b815260040161081a90613e13565b6001600160a01b038416611cf65760405162461bcd60e51b815260040161081a90613e5b565b33611d0581878787878761295f565b60005b8451811015611deb576000858281518110611d2557611d25613bde565b602002602001015190506000858381518110611d4357611d43613bde565b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015611d935760405162461bcd60e51b815260040161081a90613ea0565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611dd0908490613d2e565b9250508190555050505080611de490613d55565b9050611d08565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611e3b929190613eea565b60405180910390a46112b7818787878787612b4e565b6001600160a01b038116600090815260086020908152604080832054601190925282208054600f5491939291839190611e8b908490613d17565b611e959190613d04565b9050600061271060065483611eaa9190613d17565b611eb49190613ca2565b9050611ec08183613d04565b856001016000828254611ed39190613d2e565b9091555050600480546040516340c10f1960e01b81526001600160a01b0391821692810192909252602482018390527f000000000000000000000000000000000000000000000000000000000000000016906340c10f1990604401600060405180830381600087803b158015611f4857600080fd5b505af1158015611f5c573d6000803e3d6000fd5b5050506001600160a01b038716600090815260136020526040902080546012549196509150670de0b6b3a764000090611f96908690613d17565b611fa09190613ca2565b611faa9190613d04565b846001016000828254611fbd9190613d2e565b92505081905550505050915091565b6001600160a01b038316611ff357604051635963709b60e01b815260040160405180910390fd5b801580612001575060075481115b1561201f5760405163fae8279160e01b815260040160405180910390fd5b61202a600c83612cb2565b6120475760405163bc7fd0cf60e01b815260040160405180910390fd5b61210033600460009054906101000a90046001600160a01b0316670de0b6b3a7640000856001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156120a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120cc9190613f18565b6120d790600a61401f565b6005546120e49190613d17565b6120ee9190613ca2565b6001600160a01b038616929190612cd4565b611af283826123a5565b612112612d0c565b6003805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600081831061216b5781611b0c565b5090919050565b6040516001600160a01b038316602482015260448101829052611af290849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612d55565b6001600160a01b038116600090815260086020526040808220548151600680825260e08201909352909291816020016020820280368337505060408051600680825260e0820190925292935060009291506020820160c080368337505060408051600680825260e0820190925292935060009291506020820160c08036833701905050905060005b600681101561237e576000600182600660ff16030390506000600e826006811061228957612289613bde565b602081049091015460ff601f9092166101000a90041687816122ad576122ad613c76565b04905060006122bc89846107b3565b9050828784815181106122d1576122d1613bde565b6020026020010181815250508082111561230b578082038684815181106122fa576122fa613bde565b602002602001018181525050612335565b808210156123355781810385848151811061232857612328613bde565b6020026020010181815250505b600e836006811061234857612348613bde565b602081049091015460ff601f9092166101000a900416888161236c5761236c613c76565b069750506001909201915061225d9050565b5061239a85848460405180602001604052806000815250612e2a565b610a9d858483612fbe565b6000806123b184611e51565b6001600160a01b038616600090815260086020526040902080548601905560098054860190819055600b54929450909250111561241f576002600a60000160008282546123fe9190613ca2565b9091555050600b805460029190600090612419908490613d17565b90915550505b6001600160a01b038416600090815260086020526040902054600f546124459190613d17565b82556001600160a01b038416600090815260086020526040902054601254670de0b6b3a76400009161247691613d17565b6124809190613ca2565b815561248b846121d5565b50505050565b600380546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6124f36131d2565b6003805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861213f3390565b816001600160a01b0316836001600160a01b03160361259b5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b606482015260840161081a565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3191016111e9565b60606000611b0c83613218565b6001600160a01b0384166126335760405162461bcd60e51b815260040161081a90613e5b565b33600061263f85613273565b9050600061264c85613273565b905061265c83898985858961295f565b6000868152602081815260408083206001600160a01b038c1684529091529020548581101561269d5760405162461bcd60e51b815260040161081a90613ea0565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906126da908490613d2e565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461273a848a8a8a8a8a6132be565b505050505050505050565b600081815260018301602052604081205461278c57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610846565b506000610846565b6000818152600183016020526040812054801561287d5760006127b8600183613d04565b85549091506000906127cc90600190613d04565b90508181146128315760008660000182815481106127ec576127ec613bde565b906000526020600020015490508087600001848154811061280f5761280f613bde565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806128425761284261402e565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610846565b6000915050610846565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106128c65772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106128f2576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061291057662386f26fc10000830492506010015b6305f5e1008310612928576305f5e100830492506008015b612710831061293c57612710830492506004015b6064831061294e576064830492506002015b600a83106108465760010192915050565b60095415612998576010546129749042613d04565b600a546129819190613d17565b600f60008282546129929190613d2e565b90915550505b426010556129aa868686868686613379565b6001600160a01b03851615806129c757506001600160a01b038416155b6112b7576000806129d787611e51565b915091506000806129e788611e51565b90925090506000805b8851811015612a6357878181518110612a0b57612a0b613bde565b6020026020010151600e8a8381518110612a2757612a27613bde565b602002602001015160068110612a3f57612a3f613bde565b602081049091015460ff601f9092166101000a9004160291909101906001016129f0565b506001600160a01b03808b1660008181526008602052604080822080548690038155938d16825281208054850190555254600f54612aa19190613d17565b85556001600160a01b038a16600090815260086020526040902054601254670de0b6b3a764000091612ad291613d17565b612adc9190613ca2565b84556001600160a01b038916600090815260086020526040902054600f54612b049190613d17565b83556001600160a01b038916600090815260086020526040902054601254670de0b6b3a764000091612b3591613d17565b612b3f9190613ca2565b90915550505050505050505050565b6001600160a01b0384163b156112b75760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190612b929089908990889088908890600401614044565b6020604051808303816000875af1925050508015612bcd575060408051601f3d908101601f19168201909252612bca918101906140a2565b60015b612c7957612bd96140bf565b806308c379a003612c125750612bed6140db565b80612bf85750612c14565b8060405162461bcd60e51b815260040161081a91906136c2565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b606482015260840161081a565b6001600160e01b0319811663bc197c8160e01b14612ca95760405162461bcd60e51b815260040161081a90614165565b50505050505050565b6001600160a01b03811660009081526001830160205260408120541515611b0c565b6040516001600160a01b038085166024830152831660448201526064810182905261248b9085906323b872dd60e01b9060840161219e565b60035460ff16610c795760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161081a565b6000612daa826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166133e19092919063ffffffff16565b9050805160001480612dcb575080806020019051810190612dcb91906141ad565b611af25760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161081a565b6001600160a01b038416612e8a5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b606482015260840161081a565b8151835114612eab5760405162461bcd60e51b815260040161081a90613e13565b33612ebb8160008787878761295f565b60005b8451811015612f5657838181518110612ed957612ed9613bde565b6020026020010151600080878481518110612ef657612ef6613bde565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254612f3e9190613d2e565b90915550819050612f4e81613d55565b915050612ebe565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612fa7929190613eea565b60405180910390a4610a9d81600087878787612b4e565b6001600160a01b0383166130205760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b606482015260840161081a565b80518251146130415760405162461bcd60e51b815260040161081a90613e13565b60003390506130648185600086866040518060200160405280600081525061295f565b60005b835181101561316557600084828151811061308457613084613bde565b6020026020010151905060008483815181106130a2576130a2613bde565b602090810291909101810151600084815280835260408082206001600160a01b038c16835290935291909120549091508181101561312e5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b606482015260840161081a565b6000928352602083815260408085206001600160a01b038b168652909152909220910390558061315d81613d55565b915050613067565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516131b6929190613eea565b60405180910390a460408051602081019091526000905261248b565b60035460ff1615610c795760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161081a565b606081600001805480602002602001604051908101604052809291908181526020018280548015611c1057602002820191906000526020600020905b8154815260200190600101908083116132545750505050509050919050565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106132ad576132ad613bde565b602090810291909101015292915050565b6001600160a01b0384163b156112b75760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061330290899089908890889088906004016141ca565b6020604051808303816000875af192505050801561333d575060408051601f3d908101601f1916820190925261333a918101906140a2565b60015b61334957612bd96140bf565b6001600160e01b0319811663f23a6e6160e01b14612ca95760405162461bcd60e51b815260040161081a90614165565b60035460ff16156112b75760405162461bcd60e51b815260206004820152602c60248201527f455243313135355061757361626c653a20746f6b656e207472616e736665722060448201526b1dda1a5b19481c185d5cd95960a21b606482015260840161081a565b60606133f084846000856133f8565b949350505050565b6060824710156134595760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161081a565b600080866001600160a01b031685876040516134759190614204565b60006040518083038185875af1925050503d80600081146134b2576040519150601f19603f3d011682016040523d82523d6000602084013e6134b7565b606091505b50915091506134c8878383876134d3565b979650505050505050565b6060831561354257825160000361353b576001600160a01b0385163b61353b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161081a565b50816133f0565b6133f08383815115612bf85781518083602001fd5b6001600160a01b038116811461166c57600080fd5b6000806040838503121561357f57600080fd5b823561358a81613557565b946020939093013593505050565b6001600160e01b03198116811461166c57600080fd5b6000602082840312156135c057600080fd5b8135611b0c81613598565b60008083601f8401126135dd57600080fd5b50813567ffffffffffffffff8111156135f557600080fd5b6020830191508360208260051b850101111561361057600080fd5b9250929050565b6000806020838503121561362a57600080fd5b823567ffffffffffffffff81111561364157600080fd5b61364d858286016135cb565b90969095509350505050565b60006020828403121561366b57600080fd5b5035919050565b60005b8381101561368d578181015183820152602001613675565b50506000910152565b600081518084526136ae816020860160208601613672565b601f01601f19169290920160200192915050565b602081526000611b0c6020830184613696565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715613711576137116136d5565b6040525050565b600067ffffffffffffffff821115613732576137326136d5565b5060051b60200190565b600082601f83011261374d57600080fd5b8135602061375a82613718565b60405161376782826136eb565b83815260059390931b850182019282810191508684111561378757600080fd5b8286015b848110156137a2578035835291830191830161378b565b509695505050505050565b600082601f8301126137be57600080fd5b813567ffffffffffffffff8111156137d8576137d86136d5565b6040516137ef601f8301601f1916602001826136eb565b81815284602083860101111561380457600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561383957600080fd5b853561384481613557565b9450602086013561385481613557565b9350604086013567ffffffffffffffff8082111561387157600080fd5b61387d89838a0161373c565b9450606088013591508082111561389357600080fd5b61389f89838a0161373c565b935060808801359150808211156138b557600080fd5b506138c2888289016137ad565b9150509295509295909350565b6000806000606084860312156138e457600080fd5b83356138ef81613557565b925060208401356138ff81613557565b929592945050506040919091013590565b60006020828403121561392257600080fd5b8135611b0c81613557565b6000806040838503121561394057600080fd5b823567ffffffffffffffff8082111561395857600080fd5b818501915085601f83011261396c57600080fd5b8135602061397982613718565b60405161398682826136eb565b83815260059390931b85018201928281019150898411156139a657600080fd5b948201945b838610156139cd5785356139be81613557565b825294820194908201906139ab565b965050860135925050808211156139e357600080fd5b506139f08582860161373c565b9150509250929050565b600081518084526020808501945080840160005b83811015613a2a57815187529582019590820190600101613a0e565b509495945050505050565b602081526000611b0c60208301846139fa565b60008060008060408587031215613a5e57600080fd5b843567ffffffffffffffff80821115613a7657600080fd5b613a82888389016135cb565b90965094506020870135915080821115613a9b57600080fd5b50613aa8878288016135cb565b95989497509550505050565b801515811461166c57600080fd5b60008060408385031215613ad557600080fd5b8235613ae081613557565b91506020830135613af081613ab4565b809150509250929050565b600081518084526020808501945080840160005b83811015613a2a5781516001600160a01b031687529582019590820190600101613b0f565b602081526000611b0c6020830184613afb565b60008060408385031215613b5a57600080fd5b8235613b6581613557565b91506020830135613af081613557565b600080600080600060a08688031215613b8d57600080fd5b8535613b9881613557565b94506020860135613ba881613557565b93506040860135925060608601359150608086013567ffffffffffffffff811115613bd257600080fd5b6138c2888289016137ad565b634e487b7160e01b600052603260045260246000fd5b60208082528181018390526000908460408401835b868110156137a2578235613c1c81613557565b6001600160a01b031682529183019190830190600101613c09565b60008351613c49818460208801613672565b835190830190613c5d818360208801613672565b64173539b7b760d91b9101908152600501949350505050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082613cb157613cb1613c76565b500490565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b8181038181111561084657610846613c8c565b808202811582820484141761084657610846613c8c565b8082018082111561084657610846613c8c565b600082613d5057613d50613c76565b500690565b600060018201613d6757613d67613c8c565b5060010190565b600060208284031215613d8057600080fd5b5051919050565b600060208284031215613d9957600080fd5b8151611b0c81613557565b848152608060208201526000613dbd6080830186613afb565b6001600160a01b03949094166040830152506060015292915050565b600181811c90821680613ded57607f821691505b602082108103613e0d57634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b604081526000613efd60408301856139fa565b8281036020840152613f0f81856139fa565b95945050505050565b600060208284031215613f2a57600080fd5b815160ff81168114611b0c57600080fd5b600181815b80851115613f76578160001904821115613f5c57613f5c613c8c565b80851615613f6957918102915b93841c9390800290613f40565b509250929050565b600082613f8d57506001610846565b81613f9a57506000610846565b8160018114613fb05760028114613fba57613fd6565b6001915050610846565b60ff841115613fcb57613fcb613c8c565b50506001821b610846565b5060208310610133831016604e8410600b8410161715613ff9575081810a610846565b6140038383613f3b565b806000190482111561401757614017613c8c565b029392505050565b6000611b0c60ff841683613f7e565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b0386811682528516602082015260a060408201819052600090614070908301866139fa565b828103606084015261408281866139fa565b905082810360808401526140968185613696565b98975050505050505050565b6000602082840312156140b457600080fd5b8151611b0c81613598565b600060033d11156140d85760046000803e5060005160e01c5b90565b600060443d10156140e95790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561411957505050505090565b82850191508151818111156141315750505050505090565b843d870101602082850101111561414b5750505050505090565b61415a602082860101876136eb565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6000602082840312156141bf57600080fd5b8151611b0c81613ab4565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906134c890830184613696565b60008251614216818460208701613672565b919091019291505056fe68747470733a2f2f6d657461646174612e7368657a6d752e696f2f677561726469616e2fa264697066735822122096b22c581b1a79db0f55c58ba3d1c2103c503946a817adc1911ec144ad9fad4b64736f6c6343000811003368747470733a2f2f6d657461646174612e7368657a6d752e696f2f677561726469616e2f0000000000000000000000005fe72ed557d8a02fff49b3b826792c765d5ce162000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d00000000000000000000000041ace13e264cb43397ea181d8d1d4a2af281c596

Deployed Bytecode

0x60806040526004361061023a5760003560e01c8063715018a61161012e578063a22cb465116100ab578063f0f442601161006f578063f0f442601461072b578063f242432a1461074b578063f2fde38b1461076b578063f40f0f521461078b578063ff3d9e4f146107ab57600080fd5b8063a22cb4651461066a578063aaf5eb681461068a578063c2c2fd47146106a0578063c6c3bbe6146106c2578063e985e9c5146106e257600080fd5b80638da5cb5b116100f25780638da5cb5b146105c75780638de43c1f146105ea578063996517cf1461061e57806399d32fc4146106345780639e6a1d7d1461064a57600080fd5b8063715018a6146105195780637b0a47ee1461052e5780637b984e181461055e5780638456cb591461057e57806389a302711461059357600080fd5b80633e232dcf116101bc5780634f6cb1cd116101805780634f6cb1cd1461048b5780635c975abb146104a15780635d1e2d1b146104b957806361d027b3146104d957806367243482146104f957600080fd5b80633e232dcf146103e75780633f4ba83a146104075780634b0ee02a1461041c5780634e1273f4146104495780634e71d92d1461047657600080fd5b806327f84a231161020357806327f84a23146103075780632b166a21146103275780632e75ab501461035b5780632eb2c2d61461037b57806332fe7b261461039b57600080fd5b8062fdd58e1461023f57806301ffc9a714610272578063080d711a146102a25780630e89341c146102c457806318160ddd146102f1575b600080fd5b34801561024b57600080fd5b5061025f61025a36600461356c565b6107b3565b6040519081526020015b60405180910390f35b34801561027e57600080fd5b5061029261028d3660046135ae565b61084c565b6040519015158152602001610269565b3480156102ae57600080fd5b506102c26102bd366004613617565b61089c565b005b3480156102d057600080fd5b506102e46102df366004613659565b61092a565b60405161026991906136c2565b3480156102fd57600080fd5b5061025f60095481565b34801561031357600080fd5b506102c2610322366004613659565b61098a565b34801561033357600080fd5b5061025f7f000000000000000000000000000000000000000000000000a688906bd8b0000081565b34801561036757600080fd5b506102c2610376366004613659565b6109ef565b34801561038757600080fd5b506102c2610396366004613821565b610a58565b3480156103a757600080fd5b506103cf7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b6040516001600160a01b039091168152602001610269565b3480156103f357600080fd5b506102c26104023660046138cf565b610aa4565b34801561041357600080fd5b506102c2610c69565b34801561042857600080fd5b5061025f610437366004613910565b60086020526000908152604090205481565b34801561045557600080fd5b5061046961046436600461392d565b610c7b565b6040516102699190613a35565b34801561048257600080fd5b506102c2610da5565b34801561049757600080fd5b5061025f60055481565b3480156104ad57600080fd5b5060035460ff16610292565b3480156104c557600080fd5b506102c26104d436600461356c565b611003565b3480156104e557600080fd5b506004546103cf906001600160a01b031681565b34801561050557600080fd5b506102c2610514366004613a48565b6111f6565b34801561052557600080fd5b506102c26112bf565b34801561053a57600080fd5b50600a54600b54610549919082565b60408051928352602083019190915201610269565b34801561056a57600080fd5b506102c2610579366004613617565b6112d1565b34801561058a57600080fd5b506102c2611352565b34801561059f57600080fd5b506103cf7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b3480156105d357600080fd5b5060035461010090046001600160a01b03166103cf565b3480156105f657600080fd5b506103cf7f0000000000000000000000005fe72ed557d8a02fff49b3b826792c765d5ce16281565b34801561062a57600080fd5b5061025f60075481565b34801561064057600080fd5b5061025f60065481565b34801561065657600080fd5b506102c2610665366004613659565b611362565b34801561067657600080fd5b506102c2610685366004613ac2565b6113c0565b34801561069657600080fd5b5061025f61271081565b3480156106ac57600080fd5b506106b56113cf565b6040516102699190613b34565b3480156106ce57600080fd5b506102c26106dd3660046138cf565b6113e0565b3480156106ee57600080fd5b506102926106fd366004613b47565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b34801561073757600080fd5b506102c2610746366004613910565b611534565b34801561075757600080fd5b506102c2610766366004613b75565b6115b1565b34801561077757600080fd5b506102c2610786366004613910565b6115f6565b34801561079757600080fd5b506105496107a6366004613910565b61166f565b6102c26117d7565b60006001600160a01b0383166108235760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b148061087d57506001600160e01b031982166303a24d0760e21b145b8061084657506301ffc9a760e01b6001600160e01b0319831614610846565b6108a4611b13565b8060005b818110156108eb576108e28484838181106108c5576108c5613bde565b90506020020160208101906108da9190613910565b600c90611b73565b506001016108a8565b507f2af8e725041af05e7616f64607221994cf28b2614abd44dc19aec09836669269838360405161091d929190613bf4565b60405180910390a1505050565b6060600682106109425761093d82611b88565b610846565b6040518060600160405280602481526020016142216024913961096483611c1c565b604051602001610975929190613c37565b60405160208183030381529060405292915050565b610992611b13565b806000036109b35760405163fae8279160e01b815260040160405180910390fd5b60058190556040518181527f47b76c6fd21a7e3afc433c6b06c1d804c7e070b3a522e25078f4cb09734027a7906020015b60405180910390a150565b6109f7611b13565b610a046002612710613ca2565b8110610a235760405163fae8279160e01b815260040160405180910390fd5b60068190556040518181527ff0f9e33722220fdcabe8003eb48d6c0c29121a045e723c954982fe1c5713c70d906020016109e4565b6001600160a01b038516331480610a745750610a7485336106fd565b610a905760405162461bcd60e51b815260040161081a90613cb6565b610a9d8585858585611caf565b5050505050565b60095415610add57601054610ab99042613d04565b600a54610ac69190613d17565b600f6000828254610ad79190613d2e565b90915550505b42601055336000610aed82611e51565b506001600160a01b038316600090815260086020526040902054600f54919250610b1691613d17565b81558215610b9e57610b487f000000000000000000000000000000000000000000000000a688906bd8b0000084613d17565b81600101541015610b6c5760405163fae8279160e01b815260040160405180910390fd5b6001810180547f000000000000000000000000000000000000000000000000a688906bd8b00000850290039055610c0a565b7f000000000000000000000000000000000000000000000000a688906bd8b000008160010154610bce9190613ca2565b92507f000000000000000000000000000000000000000000000000a688906bd8b00000816001016000828254610c049190613d41565b90915550505b610c15858585611fcc565b846001600160a01b0316826001600160a01b03167f6c7e7d4cb83a668aef31739dd35dc3fc3d5f31d62b69e438b7b24d35b40dcc6385604051610c5a91815260200190565b60405180910390a35050505050565b610c71611b13565b610c7961210a565b565b60608151835114610ce05760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b606482015260840161081a565b6000835167ffffffffffffffff811115610cfc57610cfc6136d5565b604051908082528060200260200182016040528015610d25578160200160208202803683370190505b50905060005b8451811015610d9d57610d70858281518110610d4957610d49613bde565b6020026020010151858381518110610d6357610d63613bde565b60200260200101516107b3565b828281518110610d8257610d82613bde565b6020908102919091010152610d9681613d55565b9050610d2b565b509392505050565b60095415610dde57601054610dba9042613d04565b600a54610dc79190613d17565b600f6000828254610dd89190613d2e565b90915550505b426010553360008181526008602052604081205490819003610dfe575050565b600080610e0a84611e51565b9150915082600f54610e1c9190613d17565b8255601254670de0b6b3a764000090610e36908590613d17565b610e409190613ca2565b815560018201548015610ed757600060018401556040516340c10f1960e01b81526001600160a01b038681166004830152602482018390527f0000000000000000000000005fe72ed557d8a02fff49b3b826792c765d5ce16216906340c10f1990604401600060405180830381600087803b158015610ebe57600080fd5b505af1158015610ed2573d6000803e3d6000fd5b505050505b60018201546040516370a0823160e01b8152306004820152600091610f70916001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4816906370a0823190602401602060405180830381865afa158015610f47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6b9190613d6e565b61215c565b90508015610fb7576001830180548290039055610fb76001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48168783612172565b60408051838152602081018390526001600160a01b038816917f34fcbac0073d7c3d388e51312faf357774904998eeb8fca628b9e6f65ee1cbf7910160405180910390a2505050505050565b6009541561103c576010546110189042613d04565b600a546110259190613d17565b600f60008282546110369190613d2e565b90915550505b426010556001600160a01b03821661106757604051635963709b60e01b815260040160405180910390fd5b336000818152600860205260409020548211156110975760405163fae8279160e01b815260040160405180910390fd5b6000806110a383611e51565b6001600160a01b0385166000908152600860205260409020805487900390819055600f549294509092506110d691613d17565b82556001600160a01b038316600090815260086020526040902054601254670de0b6b3a76400009161110791613d17565b6111119190613ca2565b815561111c836121d5565b505060008061112a85611e51565b6001600160a01b03871660009081526008602052604090208054870190819055600f5492945090925061115c91613d17565b82556001600160a01b038516600090815260086020526040902054601254670de0b6b3a76400009161118d91613d17565b6111979190613ca2565b81556111a2856121d5565b5050826001600160a01b0316816001600160a01b03167f56b138798bd325f6cc79f626c4644aa2fd6703ecb0ab0fb168f883caed75bf32846040516111e991815260200190565b60405180910390a3505050565b6111fe611b13565b60095415611237576010546112139042613d04565b600a546112209190613d17565b600f60008282546112319190613d2e565b90915550505b426010558281811461125c576040516322ee6ae760e01b815260040160405180910390fd5b60005b818110156112b7576112af86868381811061127c5761127c613bde565b90506020020160208101906112919190613910565b8585848181106112a3576112a3613bde565b905060200201356123a5565b60010161125f565b505050505050565b6112c7611b13565b610c796000612491565b6112d9611b13565b8060005b81811015611320576113178484838181106112fa576112fa613bde565b905060200201602081019061130f9190613910565b600c90611af7565b506001016112dd565b507fccb0a951adeec2b600e22533ea11a7aed53b518d6b6633101ad5a4a78065831c838360405161091d929190613bf4565b61135a611b13565b610c796124eb565b61136a611b13565b8060000361138b5760405163fae8279160e01b815260040160405180910390fd5b60078190556040518181527f03bbcf0896b4f83d0039a26c11ebb96733a8e027d9aa71d95753b6168dbb10ab906020016109e4565b6113cb338383612528565b5050565b60606113db600c612600565b905090565b60095415611419576010546113f59042613d04565b600a546114029190613d17565b600f60008282546114139190613d2e565b90915550505b42601055337f0000000000000000000000005fe72ed557d8a02fff49b3b826792c765d5ce1626001600160a01b03166379cc6790826114787f000000000000000000000000000000000000000000000000a688906bd8b0000086613d17565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b1580156114be57600080fd5b505af11580156114d2573d6000803e3d6000fd5b505050506114e1848484611fcc565b836001600160a01b0316816001600160a01b03167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f88460405161152691815260200190565b60405180910390a350505050565b61153c611b13565b6001600160a01b03811661156357604051635963709b60e01b815260040160405180910390fd5b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527ffb26c00f7d7dba814173c8a2db3466cb26ee25fdcec8867af7da3aa1f296addd906020016109e4565b6001600160a01b0385163314806115cd57506115cd85336106fd565b6115e95760405162461bcd60e51b815260040161081a90613cb6565b610a9d858585858561260d565b6115fe611b13565b6001600160a01b0381166116635760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161081a565b61166c81612491565b50565b6001600160a01b038116600090815260086020526040812054819080156117d1576001600160a01b038416600090815260116020908152604080832081518083019092528054825260010154918101919091526010549091906116d29042613d04565b600a546116df9190613d17565b600f546116ec9190613d2e565b6001600160a01b038716600090815260116020526040812054919250906117138584613d17565b61171d9190613d04565b9050612710600654826117309190613d17565b61173a9190613ca2565b81846020015161174a9190613d2e565b6117549190613d04565b6001600160a01b03881660009081526013602090815260409182902082518084019093528054808452600190910154918301919091526012549298509091670de0b6b3a7640000906117a7908890613d17565b6117b19190613ca2565b82602001516117c09190613d2e565b6117ca9190613d04565b9550505050505b50915091565b346000036117e157565b6040805160028082526060820183526000926020830190803683370190505090507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611860573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118849190613d87565b8160008151811061189757611897613bde565b60200260200101906001600160a01b031690816001600160a01b0316815250507f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48816001815181106118eb576118eb613bde565b6001600160a01b0392831660209182029290920101526040516370a0823160e01b81523060048201526000917f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4816906370a0823190602401602060405180830381865afa158015611960573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119849190613d6e565b90507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663b6f9de953460008530426040518663ffffffff1660e01b81526004016119da9493929190613da4565b6000604051808303818588803b1580156119f357600080fd5b505af1158015611a07573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600093508492506001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb481691506370a0823190602401602060405180830381865afa158015611a75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a999190613d6e565b611aa39190613d04565b90506000600954118015611ab75750600081115b15611af257600954611ad1670de0b6b3a764000083613d17565b611adb9190613ca2565b60126000828254611aec9190613d2e565b90915550505b505050565b6000611b0c836001600160a01b038416612745565b9392505050565b6003546001600160a01b03610100909104163314610c795760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161081a565b6000611b0c836001600160a01b038416612794565b606060028054611b9790613dd9565b80601f0160208091040260200160405190810160405280929190818152602001828054611bc390613dd9565b8015611c105780601f10611be557610100808354040283529160200191611c10565b820191906000526020600020905b815481529060010190602001808311611bf357829003601f168201915b50505050509050919050565b60606000611c2983612887565b600101905060008167ffffffffffffffff811115611c4957611c496136d5565b6040519080825280601f01601f191660200182016040528015611c73576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084611c7d57509392505050565b8151835114611cd05760405162461bcd60e51b815260040161081a90613e13565b6001600160a01b038416611cf65760405162461bcd60e51b815260040161081a90613e5b565b33611d0581878787878761295f565b60005b8451811015611deb576000858281518110611d2557611d25613bde565b602002602001015190506000858381518110611d4357611d43613bde565b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015611d935760405162461bcd60e51b815260040161081a90613ea0565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611dd0908490613d2e565b9250508190555050505080611de490613d55565b9050611d08565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611e3b929190613eea565b60405180910390a46112b7818787878787612b4e565b6001600160a01b038116600090815260086020908152604080832054601190925282208054600f5491939291839190611e8b908490613d17565b611e959190613d04565b9050600061271060065483611eaa9190613d17565b611eb49190613ca2565b9050611ec08183613d04565b856001016000828254611ed39190613d2e565b9091555050600480546040516340c10f1960e01b81526001600160a01b0391821692810192909252602482018390527f0000000000000000000000005fe72ed557d8a02fff49b3b826792c765d5ce16216906340c10f1990604401600060405180830381600087803b158015611f4857600080fd5b505af1158015611f5c573d6000803e3d6000fd5b5050506001600160a01b038716600090815260136020526040902080546012549196509150670de0b6b3a764000090611f96908690613d17565b611fa09190613ca2565b611faa9190613d04565b846001016000828254611fbd9190613d2e565b92505081905550505050915091565b6001600160a01b038316611ff357604051635963709b60e01b815260040160405180910390fd5b801580612001575060075481115b1561201f5760405163fae8279160e01b815260040160405180910390fd5b61202a600c83612cb2565b6120475760405163bc7fd0cf60e01b815260040160405180910390fd5b61210033600460009054906101000a90046001600160a01b0316670de0b6b3a7640000856001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156120a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120cc9190613f18565b6120d790600a61401f565b6005546120e49190613d17565b6120ee9190613ca2565b6001600160a01b038616929190612cd4565b611af283826123a5565b612112612d0c565b6003805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600081831061216b5781611b0c565b5090919050565b6040516001600160a01b038316602482015260448101829052611af290849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612d55565b6001600160a01b038116600090815260086020526040808220548151600680825260e08201909352909291816020016020820280368337505060408051600680825260e0820190925292935060009291506020820160c080368337505060408051600680825260e0820190925292935060009291506020820160c08036833701905050905060005b600681101561237e576000600182600660ff16030390506000600e826006811061228957612289613bde565b602081049091015460ff601f9092166101000a90041687816122ad576122ad613c76565b04905060006122bc89846107b3565b9050828784815181106122d1576122d1613bde565b6020026020010181815250508082111561230b578082038684815181106122fa576122fa613bde565b602002602001018181525050612335565b808210156123355781810385848151811061232857612328613bde565b6020026020010181815250505b600e836006811061234857612348613bde565b602081049091015460ff601f9092166101000a900416888161236c5761236c613c76565b069750506001909201915061225d9050565b5061239a85848460405180602001604052806000815250612e2a565b610a9d858483612fbe565b6000806123b184611e51565b6001600160a01b038616600090815260086020526040902080548601905560098054860190819055600b54929450909250111561241f576002600a60000160008282546123fe9190613ca2565b9091555050600b805460029190600090612419908490613d17565b90915550505b6001600160a01b038416600090815260086020526040902054600f546124459190613d17565b82556001600160a01b038416600090815260086020526040902054601254670de0b6b3a76400009161247691613d17565b6124809190613ca2565b815561248b846121d5565b50505050565b600380546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6124f36131d2565b6003805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861213f3390565b816001600160a01b0316836001600160a01b03160361259b5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b606482015260840161081a565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3191016111e9565b60606000611b0c83613218565b6001600160a01b0384166126335760405162461bcd60e51b815260040161081a90613e5b565b33600061263f85613273565b9050600061264c85613273565b905061265c83898985858961295f565b6000868152602081815260408083206001600160a01b038c1684529091529020548581101561269d5760405162461bcd60e51b815260040161081a90613ea0565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906126da908490613d2e565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461273a848a8a8a8a8a6132be565b505050505050505050565b600081815260018301602052604081205461278c57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610846565b506000610846565b6000818152600183016020526040812054801561287d5760006127b8600183613d04565b85549091506000906127cc90600190613d04565b90508181146128315760008660000182815481106127ec576127ec613bde565b906000526020600020015490508087600001848154811061280f5761280f613bde565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806128425761284261402e565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610846565b6000915050610846565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106128c65772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106128f2576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061291057662386f26fc10000830492506010015b6305f5e1008310612928576305f5e100830492506008015b612710831061293c57612710830492506004015b6064831061294e576064830492506002015b600a83106108465760010192915050565b60095415612998576010546129749042613d04565b600a546129819190613d17565b600f60008282546129929190613d2e565b90915550505b426010556129aa868686868686613379565b6001600160a01b03851615806129c757506001600160a01b038416155b6112b7576000806129d787611e51565b915091506000806129e788611e51565b90925090506000805b8851811015612a6357878181518110612a0b57612a0b613bde565b6020026020010151600e8a8381518110612a2757612a27613bde565b602002602001015160068110612a3f57612a3f613bde565b602081049091015460ff601f9092166101000a9004160291909101906001016129f0565b506001600160a01b03808b1660008181526008602052604080822080548690038155938d16825281208054850190555254600f54612aa19190613d17565b85556001600160a01b038a16600090815260086020526040902054601254670de0b6b3a764000091612ad291613d17565b612adc9190613ca2565b84556001600160a01b038916600090815260086020526040902054600f54612b049190613d17565b83556001600160a01b038916600090815260086020526040902054601254670de0b6b3a764000091612b3591613d17565b612b3f9190613ca2565b90915550505050505050505050565b6001600160a01b0384163b156112b75760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190612b929089908990889088908890600401614044565b6020604051808303816000875af1925050508015612bcd575060408051601f3d908101601f19168201909252612bca918101906140a2565b60015b612c7957612bd96140bf565b806308c379a003612c125750612bed6140db565b80612bf85750612c14565b8060405162461bcd60e51b815260040161081a91906136c2565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b606482015260840161081a565b6001600160e01b0319811663bc197c8160e01b14612ca95760405162461bcd60e51b815260040161081a90614165565b50505050505050565b6001600160a01b03811660009081526001830160205260408120541515611b0c565b6040516001600160a01b038085166024830152831660448201526064810182905261248b9085906323b872dd60e01b9060840161219e565b60035460ff16610c795760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161081a565b6000612daa826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166133e19092919063ffffffff16565b9050805160001480612dcb575080806020019051810190612dcb91906141ad565b611af25760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161081a565b6001600160a01b038416612e8a5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b606482015260840161081a565b8151835114612eab5760405162461bcd60e51b815260040161081a90613e13565b33612ebb8160008787878761295f565b60005b8451811015612f5657838181518110612ed957612ed9613bde565b6020026020010151600080878481518110612ef657612ef6613bde565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254612f3e9190613d2e565b90915550819050612f4e81613d55565b915050612ebe565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612fa7929190613eea565b60405180910390a4610a9d81600087878787612b4e565b6001600160a01b0383166130205760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b606482015260840161081a565b80518251146130415760405162461bcd60e51b815260040161081a90613e13565b60003390506130648185600086866040518060200160405280600081525061295f565b60005b835181101561316557600084828151811061308457613084613bde565b6020026020010151905060008483815181106130a2576130a2613bde565b602090810291909101810151600084815280835260408082206001600160a01b038c16835290935291909120549091508181101561312e5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b606482015260840161081a565b6000928352602083815260408085206001600160a01b038b168652909152909220910390558061315d81613d55565b915050613067565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516131b6929190613eea565b60405180910390a460408051602081019091526000905261248b565b60035460ff1615610c795760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161081a565b606081600001805480602002602001604051908101604052809291908181526020018280548015611c1057602002820191906000526020600020905b8154815260200190600101908083116132545750505050509050919050565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106132ad576132ad613bde565b602090810291909101015292915050565b6001600160a01b0384163b156112b75760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061330290899089908890889088906004016141ca565b6020604051808303816000875af192505050801561333d575060408051601f3d908101601f1916820190925261333a918101906140a2565b60015b61334957612bd96140bf565b6001600160e01b0319811663f23a6e6160e01b14612ca95760405162461bcd60e51b815260040161081a90614165565b60035460ff16156112b75760405162461bcd60e51b815260206004820152602c60248201527f455243313135355061757361626c653a20746f6b656e207472616e736665722060448201526b1dda1a5b19481c185d5cd95960a21b606482015260840161081a565b60606133f084846000856133f8565b949350505050565b6060824710156134595760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161081a565b600080866001600160a01b031685876040516134759190614204565b60006040518083038185875af1925050503d80600081146134b2576040519150601f19603f3d011682016040523d82523d6000602084013e6134b7565b606091505b50915091506134c8878383876134d3565b979650505050505050565b6060831561354257825160000361353b576001600160a01b0385163b61353b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161081a565b50816133f0565b6133f08383815115612bf85781518083602001fd5b6001600160a01b038116811461166c57600080fd5b6000806040838503121561357f57600080fd5b823561358a81613557565b946020939093013593505050565b6001600160e01b03198116811461166c57600080fd5b6000602082840312156135c057600080fd5b8135611b0c81613598565b60008083601f8401126135dd57600080fd5b50813567ffffffffffffffff8111156135f557600080fd5b6020830191508360208260051b850101111561361057600080fd5b9250929050565b6000806020838503121561362a57600080fd5b823567ffffffffffffffff81111561364157600080fd5b61364d858286016135cb565b90969095509350505050565b60006020828403121561366b57600080fd5b5035919050565b60005b8381101561368d578181015183820152602001613675565b50506000910152565b600081518084526136ae816020860160208601613672565b601f01601f19169290920160200192915050565b602081526000611b0c6020830184613696565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715613711576137116136d5565b6040525050565b600067ffffffffffffffff821115613732576137326136d5565b5060051b60200190565b600082601f83011261374d57600080fd5b8135602061375a82613718565b60405161376782826136eb565b83815260059390931b850182019282810191508684111561378757600080fd5b8286015b848110156137a2578035835291830191830161378b565b509695505050505050565b600082601f8301126137be57600080fd5b813567ffffffffffffffff8111156137d8576137d86136d5565b6040516137ef601f8301601f1916602001826136eb565b81815284602083860101111561380457600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561383957600080fd5b853561384481613557565b9450602086013561385481613557565b9350604086013567ffffffffffffffff8082111561387157600080fd5b61387d89838a0161373c565b9450606088013591508082111561389357600080fd5b61389f89838a0161373c565b935060808801359150808211156138b557600080fd5b506138c2888289016137ad565b9150509295509295909350565b6000806000606084860312156138e457600080fd5b83356138ef81613557565b925060208401356138ff81613557565b929592945050506040919091013590565b60006020828403121561392257600080fd5b8135611b0c81613557565b6000806040838503121561394057600080fd5b823567ffffffffffffffff8082111561395857600080fd5b818501915085601f83011261396c57600080fd5b8135602061397982613718565b60405161398682826136eb565b83815260059390931b85018201928281019150898411156139a657600080fd5b948201945b838610156139cd5785356139be81613557565b825294820194908201906139ab565b965050860135925050808211156139e357600080fd5b506139f08582860161373c565b9150509250929050565b600081518084526020808501945080840160005b83811015613a2a57815187529582019590820190600101613a0e565b509495945050505050565b602081526000611b0c60208301846139fa565b60008060008060408587031215613a5e57600080fd5b843567ffffffffffffffff80821115613a7657600080fd5b613a82888389016135cb565b90965094506020870135915080821115613a9b57600080fd5b50613aa8878288016135cb565b95989497509550505050565b801515811461166c57600080fd5b60008060408385031215613ad557600080fd5b8235613ae081613557565b91506020830135613af081613ab4565b809150509250929050565b600081518084526020808501945080840160005b83811015613a2a5781516001600160a01b031687529582019590820190600101613b0f565b602081526000611b0c6020830184613afb565b60008060408385031215613b5a57600080fd5b8235613b6581613557565b91506020830135613af081613557565b600080600080600060a08688031215613b8d57600080fd5b8535613b9881613557565b94506020860135613ba881613557565b93506040860135925060608601359150608086013567ffffffffffffffff811115613bd257600080fd5b6138c2888289016137ad565b634e487b7160e01b600052603260045260246000fd5b60208082528181018390526000908460408401835b868110156137a2578235613c1c81613557565b6001600160a01b031682529183019190830190600101613c09565b60008351613c49818460208801613672565b835190830190613c5d818360208801613672565b64173539b7b760d91b9101908152600501949350505050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082613cb157613cb1613c76565b500490565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b8181038181111561084657610846613c8c565b808202811582820484141761084657610846613c8c565b8082018082111561084657610846613c8c565b600082613d5057613d50613c76565b500690565b600060018201613d6757613d67613c8c565b5060010190565b600060208284031215613d8057600080fd5b5051919050565b600060208284031215613d9957600080fd5b8151611b0c81613557565b848152608060208201526000613dbd6080830186613afb565b6001600160a01b03949094166040830152506060015292915050565b600181811c90821680613ded57607f821691505b602082108103613e0d57634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b604081526000613efd60408301856139fa565b8281036020840152613f0f81856139fa565b95945050505050565b600060208284031215613f2a57600080fd5b815160ff81168114611b0c57600080fd5b600181815b80851115613f76578160001904821115613f5c57613f5c613c8c565b80851615613f6957918102915b93841c9390800290613f40565b509250929050565b600082613f8d57506001610846565b81613f9a57506000610846565b8160018114613fb05760028114613fba57613fd6565b6001915050610846565b60ff841115613fcb57613fcb613c8c565b50506001821b610846565b5060208310610133831016604e8410600b8410161715613ff9575081810a610846565b6140038383613f3b565b806000190482111561401757614017613c8c565b029392505050565b6000611b0c60ff841683613f7e565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b0386811682528516602082015260a060408201819052600090614070908301866139fa565b828103606084015261408281866139fa565b905082810360808401526140968185613696565b98975050505050505050565b6000602082840312156140b457600080fd5b8151611b0c81613598565b600060033d11156140d85760046000803e5060005160e01c5b90565b600060443d10156140e95790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561411957505050505090565b82850191508151818111156141315750505050505090565b843d870101602082850101111561414b5750505050505090565b61415a602082860101876136eb565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6000602082840312156141bf57600080fd5b8151611b0c81613ab4565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906134c890830184613696565b60008251614216818460208701613672565b919091019291505056fe68747470733a2f2f6d657461646174612e7368657a6d752e696f2f677561726469616e2fa264697066735822122096b22c581b1a79db0f55c58ba3d1c2103c503946a817adc1911ec144ad9fad4b64736f6c63430008110033

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

0000000000000000000000005fe72ed557d8a02fff49b3b826792c765d5ce162000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d00000000000000000000000041ace13e264cb43397ea181d8d1d4a2af281c596

-----Decoded View---------------
Arg [0] : shezmu (address): 0x5fE72ed557d8a02FFf49B3B826792c765d5cE162
Arg [1] : usdc (address): 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
Arg [2] : router (address): 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
Arg [3] : treasury_ (address): 0x41aCE13e264cB43397EA181d8D1d4a2Af281c596

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000005fe72ed557d8a02fff49b3b826792c765d5ce162
Arg [1] : 000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
Arg [2] : 0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d
Arg [3] : 00000000000000000000000041ace13e264cb43397ea181d8d1d4a2af281c596


Loading...
Loading
Loading...
Loading
[ 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.