false
false

Contract Address Details

0x698dd1622f04f566dc76b053b7d3d271aa09101c

Token
SOBY (SOBY)
Creator
0x9b3e22–7b1b49 at 0x5a9ff5–6322bb
Balance
63.001261768777658678 Xai ( )
Tokens
Fetching tokens...
Transactions
12,782 Transactions
Transfers
147,071 Transfers
Gas Used
1,197,685,655
Last Balance Update
45093643
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
SOBY




Optimization enabled
true
Compiler version
v0.8.24+commit.e11b9ed9




Optimization runs
1000
EVM Version
paris




Verified at
2024-05-11T12:01:47.073018Z

Constructor Arguments

0x00000000000000000000000018e621b64d7808c3c47bccbbd7485d23f257d26f0000000000000000000000006a63830e24f9a2f9c295fb2150107d0390ed14480000000000000000000000003fb787101dc6be47cfe18aeee15404dcc842e6af

Arg [0] (address) : 0x18e621b64d7808c3c47bccbbd7485d23f257d26f
Arg [1] (address) : 0x6a63830e24f9a2f9c295fb2150107d0390ed1448
Arg [2] (address) : 0x3fb787101dc6be47cfe18aeee15404dcc842e6af

              

src/Soby/SOBY.sol

//SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

import "./ISwapFactory.sol";
import "./ISwapRouter.sol";
import "./IWXAI.sol";
import "../Pools/Jackpot/Jackpot.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract SOBY is ERC20, Ownable {
    using SafeERC20 for IERC20;
    using EnumerableSet for EnumerableSet.AddressSet;

    event SwapBack(
        uint256 burn,
        uint256 flexible,
        uint256 liquidity,
        uint256 jackpot,
        uint256 development,
        uint timestamp
    );
    event Trade(
        address user,
        address pair,
        uint256 amount,
        uint side,
        uint256 circulatingSupply,
        uint timestamp
    );
    event AddLiquidity(
        uint256 tokenAmount,
        uint256 ethAmount,
        uint256 timestamp
    );

    bool public swapEnabled = true;
    bool public addLiquidityEnabled = true;

    bool public inSwap;
    modifier swapping() {
        inSwap = true;
        _;
        inSwap = false;
    }

    EnumerableSet.AddressSet private _callers;
    modifier onlyCaller() {
        require(_callers.contains(_msgSender()), "onlyCaller");
        _;
    }

    mapping(address => bool) public isFeeExempt;

    uint256 private burnFee;
    uint256 public flexibleFee;
    uint256 private liquidityFee;
    uint256 private jackpotFee;
    uint256 private developmentFee;
    uint256 private totalFee;
    uint256 public feeDenominator = 10000;

    // Buy Fees
    uint256 public burnFeeBuy = 100;
    uint256 public flexibleFeeBuy = 200;
    uint256 public liquidityFeeBuy = 200;
    uint256 public jackpotFeeBuy = 150;
    uint256 public developmentFeeBuy = 150;
    uint256 public totalFeeBuy = 800;
    // Sell Fees
    uint256 public burnFeeSell = 100;
    uint256 public flexibleFeeSell = 200;
    uint256 public liquidityFeeSell = 200;
    uint256 public jackpotFeeSell = 150;
    uint256 public developmentFeeSell = 150;
    uint256 public totalFeeSell = 800;

    // Fees receivers
    address public flexibleWallet;
    Jackpot public jackpotWallet;
    address public developmentWallet;

    bool private initialized;

    ISwapFactory private immutable factory;
    ISwapRouter private immutable swapRouter;
    IWXAI private immutable WXAI;
    address private constant DEAD = 0x000000000000000000000000000000000000dEaD;
    address private constant ZERO = 0x0000000000000000000000000000000000000000;

    EnumerableSet.AddressSet private _pairs;

    constructor(
        address _factory,
        address _swapRouter,
        address _weth
    ) ERC20("SOBY", "SOBY") Ownable(msg.sender) {
        uint256 _totalSupply = 210_000_000_000_000_000 * 1e6;
        isFeeExempt[msg.sender] = true;
        isFeeExempt[address(this)] = true;
        factory = ISwapFactory(_factory);
        swapRouter = ISwapRouter(_swapRouter);
        WXAI = IWXAI(_weth);
        _mint(_msgSender(), _totalSupply);
    }

    function initializePair() external onlyOwner {
        require(!initialized, "Already initialized");
        address pair = factory.createPair(address(WXAI), address(this));
        _pairs.add(pair);
        initialized = true;
    }

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

    function transfer(
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        return _dogTransfer(_msgSender(), to, amount);
    }

    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(sender, spender, amount);
        return _dogTransfer(sender, recipient, amount);
    }

    function _dogTransfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal returns (bool) {
        if (inSwap) {
            _transfer(sender, recipient, amount);
            return true;
        }

        bool shouldTakeFee = (!isFeeExempt[sender] && !isFeeExempt[recipient]);
        uint side = 0;
        address user_ = sender;
        address pair_ = recipient;
        // Set Fees
        if (isPair(sender)) {
            buyFees();
            side = 1;
            user_ = recipient;
            pair_ = sender;
            try jackpotWallet.tradeEvent(sender, amount) {} catch {}
        } else if (isPair(recipient)) {
            sellFees();
            side = 2;
        } else {
            shouldTakeFee = false;
        }

        if (shouldSwapBack()) {
            swapBack();
        }

        uint256 amountReceived = shouldTakeFee
            ? takeFee(sender, amount)
            : amount;
        _transfer(sender, recipient, amountReceived);

        if (side > 0) {
            emit Trade(
                user_,
                pair_,
                amount,
                side,
                getCirculatingSupply(),
                block.timestamp
            );
        }
        return true;
    }
    function shouldSwapBack() internal view returns (bool) {
        return
            !inSwap &&
            swapEnabled &&
            balanceOf(address(this)) > 0 &&
            !isPair(_msgSender());
    }

    function swapBack() internal swapping {
        uint256 taxAmount = balanceOf(address(this));
        _approve(address(this), address(swapRouter), taxAmount);

        uint256 amountDogBurn = (taxAmount * burnFee) / (totalFee);
        uint256 amountDogLp = (taxAmount * liquidityFee) / (totalFee);
        taxAmount -= amountDogBurn;
        taxAmount -= amountDogLp;

        address[] memory path = new address[](2);
        path[0] = address(this);
        path[1] = address(WXAI);

        bool success = false;
        uint256 balanceBefore = address(this).balance;
        try
            swapRouter.swapExactTokensForETHSupportingFeeOnTransferTokens(
                taxAmount,
                0,
                path,
                address(this),
                address(0),
                block.timestamp
            )
        {
            success = true;
        } catch {}
        if (!success) {
            return;
        }

        _transfer(address(this), DEAD, amountDogBurn);

        uint256 amountBackToken = address(this).balance - balanceBefore;
        uint256 backTokenTotalFee = totalFee - burnFee - liquidityFee;
        uint256 amountBackTokenFlexible = (amountBackToken * flexibleFee) /
            (backTokenTotalFee);
        uint256 amountBackTokenJackpot = (amountBackToken * jackpotFee) /
            backTokenTotalFee;
        uint256 amountBackTokenDevelopment = amountBackToken -
            amountBackTokenFlexible -
            amountBackTokenJackpot;

        WXAI.deposit{value: amountBackToken}();
        WXAI.transfer(flexibleWallet, amountBackTokenFlexible);
        WXAI.transfer(address(jackpotWallet), amountBackTokenJackpot);
        WXAI.transfer(developmentWallet, amountBackTokenDevelopment);

        if (addLiquidityEnabled) {
            _doAddLp();
        }

        emit SwapBack(
            amountDogBurn,
            amountBackTokenFlexible,
            amountDogLp,
            amountBackTokenJackpot,
            amountBackTokenDevelopment,
            block.timestamp
        );
    }

    function _doAddLp() internal {
        address[] memory pathEth = new address[](2);
        pathEth[0] = address(this);
        pathEth[1] = address(WXAI);

        uint256 tokenAmount = balanceOf(address(this));
        uint256 half = tokenAmount / 2;
        if (half < 1000) return;

        uint256 ethAmountBefore = address(this).balance;
        bool success = false;
        try
            swapRouter.swapExactTokensForETHSupportingFeeOnTransferTokens(
                half,
                0,
                pathEth,
                address(this),
                address(0),
                block.timestamp
            )
        {
            success = true;
        } catch {}
        if (!success) {
            return;
        }

        uint256 ethAmount = address(this).balance - ethAmountBefore;
        _addLiquidity(half, ethAmount);
    }

    function _addLiquidity(uint256 tokenAmount, uint256 ethAmount) internal {
        _approve(address(this), address(swapRouter), tokenAmount);
        try
            swapRouter.addLiquidityETH{value: ethAmount}(
                address(this),
                tokenAmount,
                0,
                0,
                address(this),
                block.timestamp
            )
        {
            // Burn all LP token
            IERC20 pair = IERC20(factory.getPair(address(WXAI), address(this)));
            uint256 amountLpPairBurn = pair.balanceOf(address(this));
            pair.transfer(DEAD, amountLpPairBurn);

            emit AddLiquidity(tokenAmount, ethAmount, block.timestamp);
        } catch {}
    }

    function doSwapBack() public onlyOwner {
        swapBack();
    }

    function buyFees() internal {
        burnFee = burnFeeBuy;
        flexibleFee = flexibleFeeBuy;
        liquidityFee = liquidityFeeBuy;
        jackpotFee = jackpotFeeBuy;
        developmentFee = developmentFeeBuy;
        totalFee = totalFeeBuy;
    }

    function sellFees() internal {
        burnFee = burnFeeSell;
        flexibleFee = flexibleFeeSell;
        liquidityFee = liquidityFeeSell;
        jackpotFee = jackpotFeeSell;
        developmentFee = developmentFeeSell;
        totalFee = totalFeeSell;
    }

    function takeFee(
        address sender,
        uint256 amount
    ) internal returns (uint256) {
        uint256 feeAmount = (amount * totalFee) / feeDenominator;
        _transfer(sender, address(this), feeAmount);
        return amount - feeAmount;
    }

    function clearStuckEthBalance() external onlyOwner {
        uint256 amountETH = address(this).balance;
        (bool success, ) = payable(_msgSender()).call{value: amountETH}(
            new bytes(0)
        );
        require(success, "ETH_TRANSFER_FAILED");
    }

    function getCirculatingSupply() public view returns (uint256) {
        return totalSupply() - balanceOf(DEAD) - balanceOf(ZERO);
    }

    /*** ADMIN FUNCTIONS ***/
    function setBuyFees(
        uint256 _flexibleFee,
        uint256 _liquidityFee,
        uint256 _jackpotFee,
        uint256 _developmentFee,
        uint256 _burnFee
    ) external onlyOwner {
        uint256 _totalFeeBuy = _flexibleFee +
            _liquidityFee +
            _jackpotFee +
            _developmentFee +
            _burnFee;
        require(_totalFeeBuy <= 2500, "over 25%");

        flexibleFeeBuy = _flexibleFee;
        liquidityFeeBuy = _liquidityFee;
        jackpotFeeBuy = _jackpotFee;
        developmentFeeBuy = _developmentFee;
        burnFeeBuy = _burnFee;
        totalFeeBuy = _totalFeeBuy;
    }

    function setSellFees(
        uint256 _flexibleFee,
        uint256 _liquidityFee,
        uint256 _jackpotFee,
        uint256 _developmentFee,
        uint256 _burnFee
    ) external onlyOwner {
        uint256 _totalFeeSell = _flexibleFee +
            _liquidityFee +
            _jackpotFee +
            _developmentFee +
            _burnFee;
        require(_totalFeeSell <= 2500, "over 25%");

        flexibleFeeSell = _flexibleFee;
        liquidityFeeSell = _liquidityFee;
        jackpotFeeSell = _jackpotFee;
        developmentFeeSell = _developmentFee;
        burnFeeSell = _burnFee;
        totalFeeSell = _totalFeeSell;
    }

    function setFeeReceivers(
        address _flexibleWallet,
        address _jackpotWallet,
        address _devWallet
    ) external onlyOwner {
        flexibleWallet = _flexibleWallet;
        jackpotWallet = Jackpot(payable(_jackpotWallet));
        developmentWallet = _devWallet;
    }

    function setIsFeeExempt(address holder, bool exempt) external onlyOwner {
        isFeeExempt[holder] = exempt;
    }

    function setSwapBackSettings(bool _enabled) external onlyOwner {
        swapEnabled = _enabled;
    }

    function setAddLiquidityEnabled(bool _enabled) external onlyOwner {
        addLiquidityEnabled = _enabled;
    }

    function isPair(address account) public view returns (bool) {
        return _pairs.contains(account);
    }

    function addPair(address pair) public onlyOwner returns (bool) {
        require(pair != address(0), "pair is the zero address");
        return _pairs.add(pair);
    }

    function delPair(address pair) public onlyOwner returns (bool) {
        require(pair != address(0), "pair is the zero address");
        return _pairs.remove(pair);
    }

    function getMinterLength() public view returns (uint256) {
        return _pairs.length();
    }

    function getPair(uint256 index) public view returns (address) {
        require(index <= _pairs.length() - 1, "index out of bounds");
        return _pairs.at(index);
    }

    function addCaller(address val) public onlyOwner {
        require(val != address(0), "val is the zero address");
        _callers.add(val);
    }

    function delCaller(address caller) public onlyOwner returns (bool) {
        require(caller != address(0), "caller is the zero address");
        return _callers.remove(caller);
    }

    function getCallers() public view returns (address[] memory ret) {
        return _callers.values();
    }

    receive() external payable {}
}
        

lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/utils/Address.sol

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

pragma solidity ^0.8.20;

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

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

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

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert AddressInsufficientBalance(address(this));
        }

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

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert AddressInsufficientBalance(address(this));
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

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

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

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

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

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
     */
    function _revert(bytes memory returndata) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert FailedInnerCall();
        }
    }
}
          

lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/access/AccessControl.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol)

pragma solidity ^0.8.20;

import {IAccessControl} from "./IAccessControl.sol";
import {Context} from "../utils/Context.sol";
import {ERC165} from "../utils/introspection/ERC165.sol";

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

    mapping(bytes32 role => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

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

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

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

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

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

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

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

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

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

        _revokeRole(role, callerConfirmation);
    }

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

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

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

lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/access/IAccessControl.sol

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

pragma solidity ^0.8.20;

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

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

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

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

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

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

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

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

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

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

lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/access/Ownable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../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.
 *
 * The initial owner is set to the address provided by the deployer. 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;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @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 {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @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 {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _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);
    }
}
          

lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)

pragma solidity ^0.8.20;

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

lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/interfaces/draft-IERC6093.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "./IERC20.sol";
import {IERC20Metadata} from "./extensions/IERC20Metadata.sol";
import {Context} from "../../utils/Context.sol";
import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * The default value of {decimals} is 18. To change this, you should override
 * this function so it returns a different value.
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 */
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
    mapping(address account => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _transfer(address from, address to, uint256 value) internal {
        if (from == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        if (to == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(from, to, value);
    }

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

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

        emit Transfer(from, to, value);
    }

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

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

    /**
     * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     *
     * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
     */
    function _approve(address owner, address spender, uint256 value) internal {
        _approve(owner, spender, value, true);
    }

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

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

lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol

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

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

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

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

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

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

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

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

lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol

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

pragma solidity ^0.8.20;

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

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

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

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

lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Permit.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.20;

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

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

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

lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC20Permit} from "../extensions/IERC20Permit.sol";
import {Address} from "../../../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 An operation with an ERC20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @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.encodeCall(token.transfer, (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.encodeCall(token.transferFrom, (from, to, 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);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

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

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

    /**
     * @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);
        if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @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(token).code.length > 0;
    }
}
          

lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/utils/Context.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

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

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

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

lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol

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

pragma solidity ^0.8.20;

import {IERC165} from "./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);
 * }
 * ```
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}
          

lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol

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

pragma solidity ^0.8.20;

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

lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol

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

pragma solidity ^0.8.20;

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

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

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

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

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

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

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

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

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

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

            return true;
        } else {
            return false;
        }
    }

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

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

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

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

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

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

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

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

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

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

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

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

        return result;
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

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

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

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

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

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

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

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

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

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

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

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

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

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

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

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

        return result;
    }
}
          

src/Pools/Jackpot/ISwapTools.sol

// SPDX-License-Identifier: UNLICENSED

pragma solidity ^0.8.23;

interface ISwapTools {
    function anchorToken() external view returns (address);

    function getCurrentPriceMule12(
        address token
    ) external view returns (uint256 price);
}
          

src/Pools/Jackpot/Jackpot.sol

//SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import "./ISwapTools.sol";
import "../../libs/SafeMath.sol";

contract Jackpot is AccessControl {
    using EnumerableSet for EnumerableSet.AddressSet;
    using SafeMath for uint256;

    bytes32 private constant ADMIN_ROLE = keccak256("ADMIN_ROLE");

    struct Tick {
        uint256 id;
        address user;
        uint probability;
    }

    struct InfoView {
        uint currentTicks;
        uint256 currentBonusPool;
        uint256 totalBonus;
        uint latestBonusTimestamp;
        uint256 minBonus;
        uint256 maxBonus;
    }

    event Winner(uint256 tickId, address winner, uint256 bonus, uint timestamp);
    event NewTick(
        uint256 tickId,
        address user,
        uint256 probability,
        uint256 amount,
        uint256 amountUSD,
        uint timestamp
    );

    EnumerableSet.AddressSet private _callers;
    IERC20 public bonusToken;

    Tick[] public ticks;
    uint256 public totalProbability;
    uint256 public minBonus;
    uint256 public maxBonus;
    uint[] public tickProbability;
    uint256 public tokenPrice;
    uint256 public tickId;
    uint256 public totalBonus;
    uint public latestBonusTimestamp;
    ISwapTools public swapTools;
    address public tradeToken;

    constructor(
        IERC20 bonusToken_,
        address tradeToken_,
        ISwapTools swapTools_,
        uint256 minBonus_,
        uint256 maxBonus_
    ) {
        _grantRole(DEFAULT_ADMIN_ROLE, _msgSender());
        _grantRole(ADMIN_ROLE, _msgSender());
        bonusToken = bonusToken_;
        tradeToken = tradeToken_;
        swapTools = swapTools_;
        minBonus = minBonus_;
        maxBonus = maxBonus_;
        tickProbability = [
            0,
            100,
            200,
            300,
            400,
            500,
            600,
            700,
            800,
            900,
            1000
        ];
    }

    function lottery() public onlyCaller {
        uint256 bal = bonusToken.balanceOf(address(this));
        if (bal < minBonus) {
            return;
        }
        latestBonusTimestamp = block.timestamp;

        uint256 randomValue = uint256(
            keccak256(abi.encodePacked(block.timestamp, block.number))
        ) % totalProbability;

        uint256 cumulativeProbability = 0;
        for (uint256 i = 0; i < ticks.length; i++) {
            cumulativeProbability += ticks[i].probability;
            if (randomValue < cumulativeProbability) {
                uint256 bonus = bal > maxBonus ? maxBonus : bal;
                bonusToken.transfer(ticks[i].user, bonus);
                totalBonus += bonus;
                emit Winner(ticks[i].id, ticks[i].user, bonus, block.timestamp);
                break;
            }
        }

        totalProbability = 0;
        delete ticks;
    }

    function _addTick(address user, uint256 amount) internal {
        tickId++;
        (uint tick, uint256 amountUSD) = getTickTypeWithTradeAmount(amount);
        ticks.push(
            Tick({id: tickId, user: user, probability: tickProbability[tick]})
        );
        totalProbability += tickProbability[tick];

        emit NewTick(
            tickId,
            user,
            tickProbability[tick],
            amount,
            amountUSD,
            block.timestamp
        );
    }

    function tradeEvent(address, uint256 amount) public onlyCaller {
        _addTick(tx.origin, amount);

        tokenPrice = swapTools.getCurrentPriceMule12(tradeToken);
    }

    function getTickTypeWithTradeAmount(
        uint256 amount
    ) public view returns (uint tp, uint256 amountUSD) {
        uint8 decimals = IERC20Metadata(swapTools.anchorToken()).decimals();
        uint8 tradeTokenDecimals = IERC20Metadata(tradeToken).decimals();
        uint256 value = amount
            .mul(tokenPrice)
            .div(10 ** tradeTokenDecimals)
            .div(10 ** decimals)
            .div(1e12);
        return (getTickTypeWithTradeUsdAmount(value), value);
    }

    function getTickTypeWithTradeUsdAmount(
        uint256 amount
    ) public pure returns (uint256) {
        if (amount > 500) {
            return 10;
        }
        return amount / 50;
    }

    function setMinBouns(uint256 val) public onlyRole(ADMIN_ROLE) {
        require(val < maxBonus, "bad val");
        minBonus = val;
    }

    function setMaxBouns(uint256 val) public onlyRole(ADMIN_ROLE) {
        require(val > minBonus, "bad val");
        maxBonus = val;
    }

    function setLatestBonusTimestamp(uint val) public onlyRole(ADMIN_ROLE) {
        latestBonusTimestamp = val;
    }

    function setTickProbability(
        uint[] memory vals
    ) public onlyRole(ADMIN_ROLE) {
        require(vals.length == tickProbability.length, "bad length");
        tickProbability = vals;
    }

    function setTokenPrice(uint256 price) public onlyRole(ADMIN_ROLE) {
        require(price > 0, "bad price");
        tokenPrice = price;
    }

    function setTradeToken(address val) public onlyRole(ADMIN_ROLE) {
        require(val != address(0), "bad val");
        tradeToken = val;
    }

    function setSwapTools(ISwapTools val) public onlyRole(ADMIN_ROLE) {
        require(address(val) != address(0), "bad val");
        swapTools = val;
    }

    function addCaller(address val) public onlyRole(ADMIN_ROLE) {
        require(val != address(0), "Jackpot: val is the zero address");
        _callers.add(val);
    }

    function delCaller(
        address caller
    ) public onlyRole(ADMIN_ROLE) returns (bool) {
        require(caller != address(0), "Jackpot: caller is the zero address");
        return _callers.remove(caller);
    }

    function getCallers() public view returns (address[] memory ret) {
        return _callers.values();
    }

    function getView() public view returns (InfoView memory) {
        return
            InfoView({
                currentTicks: ticks.length,
                currentBonusPool: bonusToken.balanceOf(address(this)),
                totalBonus: totalBonus,
                latestBonusTimestamp: latestBonusTimestamp,
                minBonus: minBonus,
                maxBonus: maxBonus
            });
    }

    modifier onlyCaller() {
        require(_callers.contains(_msgSender()), "onlyCaller");
        _;
    }

    receive() external payable {}
}
          

src/Soby/ISwapFactory.sol

//SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

interface ISwapFactory {
    event PairCreated(
        address indexed token0,
        address indexed token1,
        address pair,
        uint256
    );

    function owner() external view returns (address);

    function feeTo() external view returns (address);

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

    function allPairs(uint256) external view returns (address pair);

    function allPairsLength() external view returns (uint256);

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

    function setFeeTo(address) external;
}
          

src/Soby/ISwapRouter.sol

//SPDX-License-Identifier: MIT
pragma solidity >=0.6.2;

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

    function WXAI() 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 quote(
        uint amountA,
        uint reserveA,
        uint reserveB
    ) external pure returns (uint amountB);

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

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

    function getAmountsOut(
        uint amountIn,
        address[] calldata path
    ) external returns (uint[] memory);
}
          

src/Soby/IWXAI.sol

//SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

interface IWXAI {
    function totalSupply() external view returns (uint256);

    function balanceOf(address account) external view returns (uint256);

    function allowance(address owner, address spender) external view returns (uint256);

    function approve(address spender, uint256 amount) external returns (bool);

    function deposit() external payable;

    function transfer(address to, uint256 value) external returns (bool);

    function withdraw(uint256) external;
}
          

src/libs/SafeMath.sol

// SPDX-License-Identifier: UNLICENSED

pragma solidity ^0.8.23;

/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {
    /**
     * @dev Multiplies two numbers, throws on overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
        if (a == 0) {
            return 0;
        }
        c = a * b;
        return c;
    }

    /**
     * @dev Integer division of two numbers, truncating the quotient.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        // assert(b > 0); // Solidity automatically throws when dividing by 0
        // uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold
        return a / b;
    }

    /**
     * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Adds two numbers, throws on overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
        c = a + b;
        return c;
    }
}
          

Compiler Settings

{"viaIR":false,"remappings":["@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/","@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/","ds-test/=lib/forge-std/lib/ds-test/src/","erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/","forge-std/=lib/forge-std/src/","murky/=lib/murky/","openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/","openzeppelin-contracts/=lib/openzeppelin-contracts/","openzeppelin-foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/","solidity-stringutils/=lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/","solmate/=lib/solmate/src/"],"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers"]}},"optimizer":{"runs":1000,"enabled":true},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"libraries":{},"evmVersion":"paris"}
              

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_factory","internalType":"address"},{"type":"address","name":"_swapRouter","internalType":"address"},{"type":"address","name":"_weth","internalType":"address"}]},{"type":"error","name":"ERC20InsufficientAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"allowance","internalType":"uint256"},{"type":"uint256","name":"needed","internalType":"uint256"}]},{"type":"error","name":"ERC20InsufficientBalance","inputs":[{"type":"address","name":"sender","internalType":"address"},{"type":"uint256","name":"balance","internalType":"uint256"},{"type":"uint256","name":"needed","internalType":"uint256"}]},{"type":"error","name":"ERC20InvalidApprover","inputs":[{"type":"address","name":"approver","internalType":"address"}]},{"type":"error","name":"ERC20InvalidReceiver","inputs":[{"type":"address","name":"receiver","internalType":"address"}]},{"type":"error","name":"ERC20InvalidSender","inputs":[{"type":"address","name":"sender","internalType":"address"}]},{"type":"error","name":"ERC20InvalidSpender","inputs":[{"type":"address","name":"spender","internalType":"address"}]},{"type":"error","name":"OwnableInvalidOwner","inputs":[{"type":"address","name":"owner","internalType":"address"}]},{"type":"error","name":"OwnableUnauthorizedAccount","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"event","name":"AddLiquidity","inputs":[{"type":"uint256","name":"tokenAmount","internalType":"uint256","indexed":false},{"type":"uint256","name":"ethAmount","internalType":"uint256","indexed":false},{"type":"uint256","name":"timestamp","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"spender","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"SwapBack","inputs":[{"type":"uint256","name":"burn","internalType":"uint256","indexed":false},{"type":"uint256","name":"flexible","internalType":"uint256","indexed":false},{"type":"uint256","name":"liquidity","internalType":"uint256","indexed":false},{"type":"uint256","name":"jackpot","internalType":"uint256","indexed":false},{"type":"uint256","name":"development","internalType":"uint256","indexed":false},{"type":"uint256","name":"timestamp","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Trade","inputs":[{"type":"address","name":"user","internalType":"address","indexed":false},{"type":"address","name":"pair","internalType":"address","indexed":false},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false},{"type":"uint256","name":"side","internalType":"uint256","indexed":false},{"type":"uint256","name":"circulatingSupply","internalType":"uint256","indexed":false},{"type":"uint256","name":"timestamp","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addCaller","inputs":[{"type":"address","name":"val","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"addLiquidityEnabled","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"addPair","inputs":[{"type":"address","name":"pair","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"allowance","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"address","name":"spender","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"approve","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"burnFeeBuy","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"burnFeeSell","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"clearStuckEthBalance","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"decimals","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"delCaller","inputs":[{"type":"address","name":"caller","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"delPair","inputs":[{"type":"address","name":"pair","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"developmentFeeBuy","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"developmentFeeSell","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"developmentWallet","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"doSwapBack","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"feeDenominator","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"flexibleFee","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"flexibleFeeBuy","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"flexibleFeeSell","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"flexibleWallet","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address[]","name":"ret","internalType":"address[]"}],"name":"getCallers","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getCirculatingSupply","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getMinterLength","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getPair","inputs":[{"type":"uint256","name":"index","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"inSwap","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initializePair","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isFeeExempt","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isPair","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"jackpotFeeBuy","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"jackpotFeeSell","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract Jackpot"}],"name":"jackpotWallet","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"liquidityFeeBuy","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"liquidityFeeSell","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setAddLiquidityEnabled","inputs":[{"type":"bool","name":"_enabled","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setBuyFees","inputs":[{"type":"uint256","name":"_flexibleFee","internalType":"uint256"},{"type":"uint256","name":"_liquidityFee","internalType":"uint256"},{"type":"uint256","name":"_jackpotFee","internalType":"uint256"},{"type":"uint256","name":"_developmentFee","internalType":"uint256"},{"type":"uint256","name":"_burnFee","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setFeeReceivers","inputs":[{"type":"address","name":"_flexibleWallet","internalType":"address"},{"type":"address","name":"_jackpotWallet","internalType":"address"},{"type":"address","name":"_devWallet","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setIsFeeExempt","inputs":[{"type":"address","name":"holder","internalType":"address"},{"type":"bool","name":"exempt","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setSellFees","inputs":[{"type":"uint256","name":"_flexibleFee","internalType":"uint256"},{"type":"uint256","name":"_liquidityFee","internalType":"uint256"},{"type":"uint256","name":"_jackpotFee","internalType":"uint256"},{"type":"uint256","name":"_developmentFee","internalType":"uint256"},{"type":"uint256","name":"_burnFee","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setSwapBackSettings","inputs":[{"type":"bool","name":"_enabled","internalType":"bool"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"swapEnabled","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalFeeBuy","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalFeeSell","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSupply","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transfer","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transferFrom","inputs":[{"type":"address","name":"sender","internalType":"address"},{"type":"address","name":"recipient","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"receive","stateMutability":"payable"}]
              

Contract Creation Code

Verify & Publish
0x60e06040526005805461ffff60a01b191661010160a01b179055612710600f556064601081905560c860118190556012819055609660138190556014819055610320601581905560169390935560178290556018919091556019819055601a55601b553480156200006f57600080fd5b5060405162002eb738038062002eb783398101604081905262000092916200036e565b604080518082018252600480825263534f425960e01b602080840182905284518086019095529184529083015233916003620000cf83826200045f565b506004620000de82826200045f565b5050506001600160a01b0381166200011157604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6200011c816200018e565b50336000908152600860205260408082208054600160ff19918216811790925530845291909220805490911690911790556001600160a01b0383811660805282811660a052811660c052692c781f708c509f400000620001846200017d3390565b82620001e0565b5050505062000553565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0382166200020c5760405163ec442f0560e01b81526000600482015260240162000108565b6200021a600083836200021e565b5050565b6001600160a01b0383166200024d5780600260008282546200024191906200052b565b90915550620002c19050565b6001600160a01b03831660009081526020819052604090205481811015620002a25760405163391434e360e21b81526001600160a01b0385166004820152602481018290526044810183905260640162000108565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b038216620002df57600280548290039055620002fe565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516200034491815260200190565b60405180910390a3505050565b80516001600160a01b03811681146200036957600080fd5b919050565b6000806000606084860312156200038457600080fd5b6200038f8462000351565b92506200039f6020850162000351565b9150620003af6040850162000351565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620003e357607f821691505b6020821081036200040457634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200045a576000816000526020600020601f850160051c81016020861015620004355750805b601f850160051c820191505b81811015620004565782815560010162000441565b5050505b505050565b81516001600160401b038111156200047b576200047b620003b8565b62000493816200048c8454620003ce565b846200040a565b602080601f831160018114620004cb5760008415620004b25750858301515b600019600386901b1c1916600185901b17855562000456565b600085815260208120601f198616915b82811015620004fc57888601518255948401946001909101908401620004db565b50858210156200051b5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b808201808211156200054d57634e487b7160e01b600052601160045260246000fd5b92915050565b60805160a05160c0516128e0620005d760003960008181610c250152818161163b015281816117ae01528181611846015281816118e30152818161197c01528181611e74015261228f0152600081816115660152818161169701528181611f060152818161217401526121e9015260008181610c5601526122c101526128e06000f3fe6080604052600436106103385760003560e01c806373431e31116101b0578063b8c61130116100ec578063d7c0103211610095578063dd8d4c401161006f578063dd8d4c40146108d2578063e5e31b13146108f4578063f2fde38b14610914578063fb5f27fb1461093457600080fd5b8063d7c010321461084b578063d83067861461086b578063dd62ed3e1461088c57600080fd5b8063c04a5414116100c6578063c04a5414146107eb578063c1cf53c41461080b578063c2b7bbb61461082b57600080fd5b8063b8c6113014610796578063bdf391cc146107b6578063bfa382b5146107d657600080fd5b80638fbbd75011610159578063a9059cbb11610133578063a9059cbb1461072a578063aac46c951461074a578063b3b0902a1461076a578063b7eed4c41461078057600080fd5b80638fbbd750146106e057806395d89b41146106f5578063a5bc50851461070a57600080fd5b806382d201161161018a57806382d201161461068b57806386013940146106a15780638da5cb5b146106c257600080fd5b806373431e311461063f578063747293fb146106555780637cf848151461067557600080fd5b806323b872dd1161027f5780634fab9e4c116102285780636c470595116102025780636c470595146105bd5780636ddd1713146105d357806370a08231146105f4578063715018a61461062a57600080fd5b80634fab9e4c146105725780635314841614610587578063658d4b7f1461059d57600080fd5b8063313ce56711610259578063313ce567146105045780633f4218e01461052057806347a28b791461055057600080fd5b806323b872dd146104af5780632b112e49146104cf5780632d2f244b146104e457600080fd5b806315674e8e116102e15780631bb61f06116102bb5780631bb61f0614610463578063231a418c14610479578063234a2daa1461049957600080fd5b806315674e8e14610422578063180b0d7e1461043857806318160ddd1461044e57600080fd5b806310d0cc7e1161031257806310d0cc7e146103be5780631107b3a5146103f657806313921f0b1461040c57600080fd5b80630323aac71461034457806306fdde031461036c578063095ea7b31461038e57600080fd5b3661033f57005b600080fd5b34801561035057600080fd5b5061035961094a565b6040519081526020015b60405180910390f35b34801561037857600080fd5b5061038161095b565b6040516103639190612493565b34801561039a57600080fd5b506103ae6103a93660046124db565b6109ed565b6040519015158152602001610363565b3480156103ca57600080fd5b50601c546103de906001600160a01b031681565b6040516001600160a01b039091168152602001610363565b34801561040257600080fd5b5061035960185481565b34801561041857600080fd5b5061035960115481565b34801561042e57600080fd5b5061035960105481565b34801561044457600080fd5b50610359600f5481565b34801561045a57600080fd5b50600254610359565b34801561046f57600080fd5b50610359601a5481565b34801561048557600080fd5b506103ae610494366004612507565b610a07565b3480156104a557600080fd5b5061035960165481565b3480156104bb57600080fd5b506103ae6104ca366004612524565b610a77565b3480156104db57600080fd5b50610359610a9b565b3480156104f057600080fd5b50601d546103de906001600160a01b031681565b34801561051057600080fd5b5060405160068152602001610363565b34801561052c57600080fd5b506103ae61053b366004612507565b60086020526000908152604090205460ff1681565b34801561055c57600080fd5b5061057061056b366004612565565b610b02565b005b34801561057e57600080fd5b50610570610b93565b34801561059357600080fd5b50610359601b5481565b3480156105a957600080fd5b506105706105b83660046125ae565b610ce9565b3480156105c957600080fd5b5061035960135481565b3480156105df57600080fd5b506005546103ae90600160a01b900460ff1681565b34801561060057600080fd5b5061035961060f366004612507565b6001600160a01b031660009081526020819052604090205490565b34801561063657600080fd5b50610570610d1c565b34801561064b57600080fd5b50610359600a5481565b34801561066157600080fd5b50610570610670366004612507565b610d30565b34801561068157600080fd5b5061035960145481565b34801561069757600080fd5b5061035960125481565b3480156106ad57600080fd5b506005546103ae90600160a81b900460ff1681565b3480156106ce57600080fd5b506005546001600160a01b03166103de565b3480156106ec57600080fd5b50610570610d9d565b34801561070157600080fd5b50610381610dad565b34801561071657600080fd5b506103ae610725366004612507565b610dbc565b34801561073657600080fd5b506103ae6107453660046124db565b610e27565b34801561075657600080fd5b506105706107653660046125e7565b610e34565b34801561077657600080fd5b5061035960175481565b34801561078c57600080fd5b5061035960195481565b3480156107a257600080fd5b506105706107b13660046125e7565b610e75565b3480156107c257600080fd5b506103de6107d1366004612604565b610e9b565b3480156107e257600080fd5b50610570610f0d565b3480156107f757600080fd5b50601e546103de906001600160a01b031681565b34801561081757600080fd5b50610570610826366004612565565b610fca565b34801561083757600080fd5b506103ae610846366004612507565b61105b565b34801561085757600080fd5b5061057061086636600461261d565b6110c6565b34801561087757600080fd5b506005546103ae90600160b01b900460ff1681565b34801561089857600080fd5b506103596108a7366004612668565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3480156108de57600080fd5b506108e761111a565b60405161036391906126db565b34801561090057600080fd5b506103ae61090f366004612507565b611126565b34801561092057600080fd5b5061057061092f366004612507565b611133565b34801561094057600080fd5b5061035960155481565b6000610956601f61118a565b905090565b60606003805461096a906126ee565b80601f0160208091040260200160405190810160405280929190818152602001828054610996906126ee565b80156109e35780601f106109b8576101008083540402835291602001916109e3565b820191906000526020600020905b8154815290600101906020018083116109c657829003601f168201915b5050505050905090565b6000336109fb818585611194565b60019150505b92915050565b6000610a116111a6565b6001600160a01b038216610a6c5760405162461bcd60e51b815260206004820152601a60248201527f63616c6c657220697320746865207a65726f206164647265737300000000000060448201526064015b60405180910390fd5b610a016006836111ec565b600033610a85858285611201565b610a90858585611298565b9150505b9392505050565b600060208190527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb55461dead82527f44ad89ba62b98ff34f51403ac22759b55759460c0bb5521eb4b6ee3cff49cf8354600254610af8919061273e565b610956919061273e565b610b0a6111a6565b6000818385610b19888a612751565b610b239190612751565b610b2d9190612751565b610b379190612751565b90506109c4811115610b765760405162461bcd60e51b81526020600482015260086024820152676f7665722032352560c01b6044820152606401610a63565b601195909555601293909355601391909155601455601055601555565b610b9b6111a6565b601e54600160a01b900460ff1615610bf55760405162461bcd60e51b815260206004820152601360248201527f416c726561647920696e697469616c697a6564000000000000000000000000006044820152606401610a63565b6040517fc9c653960000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301523060248301526000917f00000000000000000000000000000000000000000000000000000000000000009091169063c9c65396906044016020604051808303816000875af1158015610ca1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc59190612764565b9050610cd2601f826114c7565b5050601e805460ff60a01b1916600160a01b179055565b610cf16111a6565b6001600160a01b03919091166000908152600860205260409020805460ff1916911515919091179055565b610d246111a6565b610d2e60006114dc565b565b610d386111a6565b6001600160a01b038116610d8e5760405162461bcd60e51b815260206004820152601760248201527f76616c20697320746865207a65726f20616464726573730000000000000000006044820152606401610a63565b610d996006826114c7565b5050565b610da56111a6565b610d2e61153b565b60606004805461096a906126ee565b6000610dc66111a6565b6001600160a01b038216610e1c5760405162461bcd60e51b815260206004820152601860248201527f7061697220697320746865207a65726f206164647265737300000000000000006044820152606401610a63565b610a01601f836111ec565b6000610a94338484611298565b610e3c6111a6565b60058054911515600160a81b027fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff909216919091179055565b610e7d6111a6565b60058054911515600160a01b0260ff60a01b19909216919091179055565b60006001610ea9601f61118a565b610eb3919061273e565b821115610f025760405162461bcd60e51b815260206004820152601360248201527f696e646578206f7574206f6620626f756e6473000000000000000000000000006044820152606401610a63565b610a01601f83611a76565b610f156111a6565b60408051600080825260208201928390524792909133918491610f3791612781565b60006040518083038185875af1925050503d8060008114610f74576040519150601f19603f3d011682016040523d82523d6000602084013e610f79565b606091505b5050905080610d995760405162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c4544000000000000000000000000006044820152606401610a63565b610fd26111a6565b6000818385610fe1888a612751565b610feb9190612751565b610ff59190612751565b610fff9190612751565b90506109c481111561103e5760405162461bcd60e51b81526020600482015260086024820152676f7665722032352560c01b6044820152606401610a63565b601795909555601893909355601991909155601a55601655601b55565b60006110656111a6565b6001600160a01b0382166110bb5760405162461bcd60e51b815260206004820152601860248201527f7061697220697320746865207a65726f206164647265737300000000000000006044820152606401610a63565b610a01601f836114c7565b6110ce6111a6565b601c80546001600160a01b0394851673ffffffffffffffffffffffffffffffffffffffff1991821617909155601d805493851693821693909317909255601e8054919093169116179055565b60606109566006611a82565b6000610a01601f83611a8f565b61113b6111a6565b6001600160a01b03811661117e576040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152602401610a63565b611187816114dc565b50565b6000610a01825490565b6111a18383836001611ab1565b505050565b6005546001600160a01b03163314610d2e576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610a63565b6000610a94836001600160a01b038416611bb8565b6001600160a01b0383811660009081526001602090815260408083209386168352929052205460001981146112925781811015611283576040517ffb8f41b20000000000000000000000000000000000000000000000000000000081526001600160a01b03841660048201526024810182905260448101839052606401610a63565b61129284848484036000611ab1565b50505050565b600554600090600160b01b900460ff16156112c0576112b8848484611cab565b506001610a94565b6001600160a01b03841660009081526008602052604081205460ff1615801561130257506001600160a01b03841660009081526008602052604090205460ff16155b90506000858561131182611126565b156113ca5761133f601054600955601154600a55601254600b55601354600c55601454600d55601554600e55565b5050601d546040517f67d198a60000000000000000000000000000000000000000000000000000000081526001600160a01b0380891660048301526024820187905260019350879289929116906367d198a690604401600060405180830381600087803b1580156113af57600080fd5b505af19250505080156113c0575060015b1561140f5761140f565b6113d387611126565b1561140a57611401601654600955601754600a55601854600b55601954600c55601a54600d55601b54600e55565b6002925061140f565b600093505b611417611d3c565b156114245761142461153b565b600084611431578661143b565b61143b8988611d91565b9050611448898983611cab565b83156114b8577fe6f814da7244d1ae6c61b54b5684858ba39cad7b9a91884be10060664987d7548383898761147b610a9b565b604080516001600160a01b03968716815295909416602086015292840191909152606083015260808201524260a082015260c00160405180910390a15b50600198975050505050505050565b6000610a94836001600160a01b038416611dce565b600580546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6005805460ff60b01b1916600160b01b17905530600090815260208190526040812054905061158b307f000000000000000000000000000000000000000000000000000000000000000083611194565b6000600e546009548361159e919061279d565b6115a891906127b4565b90506000600e54600b54846115bd919061279d565b6115c791906127b4565b90506115d3828461273e565b92506115df818461273e565b60408051600280825260608201835292955060009290916020830190803683370190505090503081600081518110611619576116196127d6565b60200260200101906001600160a01b031690816001600160a01b0316815250507f00000000000000000000000000000000000000000000000000000000000000008160018151811061166d5761166d6127d6565b6001600160a01b039283166020918202929092010152604051632955261160e11b815260009147917f0000000000000000000000000000000000000000000000000000000000000000909116906352aa4c22906116d8908990869088903090839042906004016127ec565b600060405180830381600087803b1580156116f257600080fd5b505af1925050508015611703575060015b1561170d57600191505b8161171d57505050505050611a67565b61172a3061dead87611cab565b6000611736824761273e565b90506000600b54600954600e5461174d919061273e565b611757919061273e565b9050600081600a548461176a919061279d565b61177491906127b4565b9050600082600c5485611787919061279d565b61179191906127b4565b90506000816117a0848761273e565b6117aa919061273e565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0866040518263ffffffff1660e01b81526004016000604051808303818588803b15801561180757600080fd5b505af115801561181b573d6000803e3d6000fd5b5050601c5460405163a9059cbb60e01b81526001600160a01b039182166004820152602481018890527f0000000000000000000000000000000000000000000000000000000000000000909116935063a9059cbb925060440190506020604051808303816000875af1158015611895573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118b99190612830565b50601d5460405163a9059cbb60e01b81526001600160a01b039182166004820152602481018490527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303816000875af115801561192e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119529190612830565b50601e5460405163a9059cbb60e01b81526001600160a01b039182166004820152602481018390527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303816000875af11580156119c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119eb9190612830565b50600554600160a81b900460ff1615611a0657611a06611e1d565b604080518b8152602081018590529081018a905260608101839052608081018290524260a08201527ffc18969df35ccba802c14035d6d6273bf5bb4d8b9de8faa7aba1044c813b13009060c00160405180910390a150505050505050505050505b6005805460ff60b01b19169055565b6000610a948383611fa5565b60606000610a9483611fcf565b6001600160a01b03811660009081526001830160205260408120541515610a94565b6001600160a01b038416611af4576040517fe602df0500000000000000000000000000000000000000000000000000000000815260006004820152602401610a63565b6001600160a01b038316611b37576040517f94280d6200000000000000000000000000000000000000000000000000000000815260006004820152602401610a63565b6001600160a01b038085166000908152600160209081526040808320938716835292905220829055801561129257826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051611baa91815260200190565b60405180910390a350505050565b60008181526001830160205260408120548015611ca1576000611bdc60018361273e565b8554909150600090611bf09060019061273e565b9050808214611c55576000866000018281548110611c1057611c106127d6565b9060005260206000200154905080876000018481548110611c3357611c336127d6565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611c6657611c6661284d565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a01565b6000915050610a01565b6001600160a01b038316611cee576040517f96c6fd1e00000000000000000000000000000000000000000000000000000000815260006004820152602401610a63565b6001600160a01b038216611d31576040517fec442f0500000000000000000000000000000000000000000000000000000000815260006004820152602401610a63565b6111a183838361202b565b600554600090600160b01b900460ff16158015611d625750600554600160a01b900460ff165b8015611d7b575030600090815260208190526040812054115b80156109565750611d8b33611126565b15905090565b600080600f54600e5484611da5919061279d565b611daf91906127b4565b9050611dbc843083611cab565b611dc6818461273e565b949350505050565b6000818152600183016020526040812054611e1557508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a01565b506000610a01565b6040805160028082526060820183526000926020830190803683370190505090503081600081518110611e5257611e526127d6565b60200260200101906001600160a01b031690816001600160a01b0316815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110611ea657611ea66127d6565b6001600160a01b039290921660209283029190910182015230600090815290819052604081205490611ed96002836127b4565b90506103e8811015611eea57505050565b604051632955261160e11b815247906000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906352aa4c2290611f4590869085908a903090839042906004016127ec565b600060405180830381600087803b158015611f5f57600080fd5b505af1925050508015611f70575060015b15611f79575060015b80611f85575050505050565b6000611f91834761273e565b9050611f9d848261216e565b505050505050565b6000826000018281548110611fbc57611fbc6127d6565b9060005260206000200154905092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561201f57602002820191906000526020600020905b81548152602001906001019080831161200b575b50505050509050919050565b6001600160a01b03831661205657806002600082825461204b9190612751565b909155506120e19050565b6001600160a01b038316600090815260208190526040902054818110156120c2576040517fe450d38c0000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024810182905260448101839052606401610a63565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b0382166120fd5760028054829003905561211c565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161216191815260200190565b60405180910390a3505050565b612199307f000000000000000000000000000000000000000000000000000000000000000084611194565b6040517ff305d719000000000000000000000000000000000000000000000000000000008152306004820181905260248201849052600060448301819052606483015260848201524260a48201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f305d71990839060c40160606040518083038185885af193505050508015612258575060408051601f3d908101601f1916820190925261225591810190612863565b60015b15610d995750506040517fe6a439050000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152306024830152600092507f0000000000000000000000000000000000000000000000000000000000000000169063e6a4390590604401602060405180830381865afa158015612308573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061232c9190612764565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529091506000906001600160a01b038316906370a0823190602401602060405180830381865afa15801561238f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123b39190612891565b60405163a9059cbb60e01b815261dead6004820152602481018290529091506001600160a01b0383169063a9059cbb906044016020604051808303816000875af1158015612405573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124299190612830565b506040805185815260208101859052428183015290517ff75993dbe1645872cbbea6395e1feebee76b435baf0e4d62d7eac269c6f57b249181900360600190a150505050565b60005b8381101561248a578181015183820152602001612472565b50506000910152565b60208152600082518060208401526124b281604085016020870161246f565b601f01601f19169190910160400192915050565b6001600160a01b038116811461118757600080fd5b600080604083850312156124ee57600080fd5b82356124f9816124c6565b946020939093013593505050565b60006020828403121561251957600080fd5b8135610a94816124c6565b60008060006060848603121561253957600080fd5b8335612544816124c6565b92506020840135612554816124c6565b929592945050506040919091013590565b600080600080600060a0868803121561257d57600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b801515811461118757600080fd5b600080604083850312156125c157600080fd5b82356125cc816124c6565b915060208301356125dc816125a0565b809150509250929050565b6000602082840312156125f957600080fd5b8135610a94816125a0565b60006020828403121561261657600080fd5b5035919050565b60008060006060848603121561263257600080fd5b833561263d816124c6565b9250602084013561264d816124c6565b9150604084013561265d816124c6565b809150509250925092565b6000806040838503121561267b57600080fd5b8235612686816124c6565b915060208301356125dc816124c6565b60008151808452602080850194506020840160005b838110156126d05781516001600160a01b0316875295820195908201906001016126ab565b509495945050505050565b602081526000610a946020830184612696565b600181811c9082168061270257607f821691505b60208210810361272257634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610a0157610a01612728565b80820180821115610a0157610a01612728565b60006020828403121561277657600080fd5b8151610a94816124c6565b6000825161279381846020870161246f565b9190910192915050565b8082028115828204841417610a0157610a01612728565b6000826127d157634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b86815285602082015260c06040820152600061280b60c0830187612696565b6001600160a01b03958616606084015293909416608082015260a00152949350505050565b60006020828403121561284257600080fd5b8151610a94816125a0565b634e487b7160e01b600052603160045260246000fd5b60008060006060848603121561287857600080fd5b8351925060208401519150604084015190509250925092565b6000602082840312156128a357600080fd5b505191905056fea2646970667358221220e39f6ec40acdf302a94a885a8a3583a8064a899de1daeb1de1b14657b12d2e4964736f6c6343000818003300000000000000000000000018e621b64d7808c3c47bccbbd7485d23f257d26f0000000000000000000000006a63830e24f9a2f9c295fb2150107d0390ed14480000000000000000000000003fb787101dc6be47cfe18aeee15404dcc842e6af

Deployed ByteCode

0x6080604052600436106103385760003560e01c806373431e31116101b0578063b8c61130116100ec578063d7c0103211610095578063dd8d4c401161006f578063dd8d4c40146108d2578063e5e31b13146108f4578063f2fde38b14610914578063fb5f27fb1461093457600080fd5b8063d7c010321461084b578063d83067861461086b578063dd62ed3e1461088c57600080fd5b8063c04a5414116100c6578063c04a5414146107eb578063c1cf53c41461080b578063c2b7bbb61461082b57600080fd5b8063b8c6113014610796578063bdf391cc146107b6578063bfa382b5146107d657600080fd5b80638fbbd75011610159578063a9059cbb11610133578063a9059cbb1461072a578063aac46c951461074a578063b3b0902a1461076a578063b7eed4c41461078057600080fd5b80638fbbd750146106e057806395d89b41146106f5578063a5bc50851461070a57600080fd5b806382d201161161018a57806382d201161461068b57806386013940146106a15780638da5cb5b146106c257600080fd5b806373431e311461063f578063747293fb146106555780637cf848151461067557600080fd5b806323b872dd1161027f5780634fab9e4c116102285780636c470595116102025780636c470595146105bd5780636ddd1713146105d357806370a08231146105f4578063715018a61461062a57600080fd5b80634fab9e4c146105725780635314841614610587578063658d4b7f1461059d57600080fd5b8063313ce56711610259578063313ce567146105045780633f4218e01461052057806347a28b791461055057600080fd5b806323b872dd146104af5780632b112e49146104cf5780632d2f244b146104e457600080fd5b806315674e8e116102e15780631bb61f06116102bb5780631bb61f0614610463578063231a418c14610479578063234a2daa1461049957600080fd5b806315674e8e14610422578063180b0d7e1461043857806318160ddd1461044e57600080fd5b806310d0cc7e1161031257806310d0cc7e146103be5780631107b3a5146103f657806313921f0b1461040c57600080fd5b80630323aac71461034457806306fdde031461036c578063095ea7b31461038e57600080fd5b3661033f57005b600080fd5b34801561035057600080fd5b5061035961094a565b6040519081526020015b60405180910390f35b34801561037857600080fd5b5061038161095b565b6040516103639190612493565b34801561039a57600080fd5b506103ae6103a93660046124db565b6109ed565b6040519015158152602001610363565b3480156103ca57600080fd5b50601c546103de906001600160a01b031681565b6040516001600160a01b039091168152602001610363565b34801561040257600080fd5b5061035960185481565b34801561041857600080fd5b5061035960115481565b34801561042e57600080fd5b5061035960105481565b34801561044457600080fd5b50610359600f5481565b34801561045a57600080fd5b50600254610359565b34801561046f57600080fd5b50610359601a5481565b34801561048557600080fd5b506103ae610494366004612507565b610a07565b3480156104a557600080fd5b5061035960165481565b3480156104bb57600080fd5b506103ae6104ca366004612524565b610a77565b3480156104db57600080fd5b50610359610a9b565b3480156104f057600080fd5b50601d546103de906001600160a01b031681565b34801561051057600080fd5b5060405160068152602001610363565b34801561052c57600080fd5b506103ae61053b366004612507565b60086020526000908152604090205460ff1681565b34801561055c57600080fd5b5061057061056b366004612565565b610b02565b005b34801561057e57600080fd5b50610570610b93565b34801561059357600080fd5b50610359601b5481565b3480156105a957600080fd5b506105706105b83660046125ae565b610ce9565b3480156105c957600080fd5b5061035960135481565b3480156105df57600080fd5b506005546103ae90600160a01b900460ff1681565b34801561060057600080fd5b5061035961060f366004612507565b6001600160a01b031660009081526020819052604090205490565b34801561063657600080fd5b50610570610d1c565b34801561064b57600080fd5b50610359600a5481565b34801561066157600080fd5b50610570610670366004612507565b610d30565b34801561068157600080fd5b5061035960145481565b34801561069757600080fd5b5061035960125481565b3480156106ad57600080fd5b506005546103ae90600160a81b900460ff1681565b3480156106ce57600080fd5b506005546001600160a01b03166103de565b3480156106ec57600080fd5b50610570610d9d565b34801561070157600080fd5b50610381610dad565b34801561071657600080fd5b506103ae610725366004612507565b610dbc565b34801561073657600080fd5b506103ae6107453660046124db565b610e27565b34801561075657600080fd5b506105706107653660046125e7565b610e34565b34801561077657600080fd5b5061035960175481565b34801561078c57600080fd5b5061035960195481565b3480156107a257600080fd5b506105706107b13660046125e7565b610e75565b3480156107c257600080fd5b506103de6107d1366004612604565b610e9b565b3480156107e257600080fd5b50610570610f0d565b3480156107f757600080fd5b50601e546103de906001600160a01b031681565b34801561081757600080fd5b50610570610826366004612565565b610fca565b34801561083757600080fd5b506103ae610846366004612507565b61105b565b34801561085757600080fd5b5061057061086636600461261d565b6110c6565b34801561087757600080fd5b506005546103ae90600160b01b900460ff1681565b34801561089857600080fd5b506103596108a7366004612668565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3480156108de57600080fd5b506108e761111a565b60405161036391906126db565b34801561090057600080fd5b506103ae61090f366004612507565b611126565b34801561092057600080fd5b5061057061092f366004612507565b611133565b34801561094057600080fd5b5061035960155481565b6000610956601f61118a565b905090565b60606003805461096a906126ee565b80601f0160208091040260200160405190810160405280929190818152602001828054610996906126ee565b80156109e35780601f106109b8576101008083540402835291602001916109e3565b820191906000526020600020905b8154815290600101906020018083116109c657829003601f168201915b5050505050905090565b6000336109fb818585611194565b60019150505b92915050565b6000610a116111a6565b6001600160a01b038216610a6c5760405162461bcd60e51b815260206004820152601a60248201527f63616c6c657220697320746865207a65726f206164647265737300000000000060448201526064015b60405180910390fd5b610a016006836111ec565b600033610a85858285611201565b610a90858585611298565b9150505b9392505050565b600060208190527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb55461dead82527f44ad89ba62b98ff34f51403ac22759b55759460c0bb5521eb4b6ee3cff49cf8354600254610af8919061273e565b610956919061273e565b610b0a6111a6565b6000818385610b19888a612751565b610b239190612751565b610b2d9190612751565b610b379190612751565b90506109c4811115610b765760405162461bcd60e51b81526020600482015260086024820152676f7665722032352560c01b6044820152606401610a63565b601195909555601293909355601391909155601455601055601555565b610b9b6111a6565b601e54600160a01b900460ff1615610bf55760405162461bcd60e51b815260206004820152601360248201527f416c726561647920696e697469616c697a6564000000000000000000000000006044820152606401610a63565b6040517fc9c653960000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000003fb787101dc6be47cfe18aeee15404dcc842e6af811660048301523060248301526000917f00000000000000000000000018e621b64d7808c3c47bccbbd7485d23f257d26f9091169063c9c65396906044016020604051808303816000875af1158015610ca1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc59190612764565b9050610cd2601f826114c7565b5050601e805460ff60a01b1916600160a01b179055565b610cf16111a6565b6001600160a01b03919091166000908152600860205260409020805460ff1916911515919091179055565b610d246111a6565b610d2e60006114dc565b565b610d386111a6565b6001600160a01b038116610d8e5760405162461bcd60e51b815260206004820152601760248201527f76616c20697320746865207a65726f20616464726573730000000000000000006044820152606401610a63565b610d996006826114c7565b5050565b610da56111a6565b610d2e61153b565b60606004805461096a906126ee565b6000610dc66111a6565b6001600160a01b038216610e1c5760405162461bcd60e51b815260206004820152601860248201527f7061697220697320746865207a65726f206164647265737300000000000000006044820152606401610a63565b610a01601f836111ec565b6000610a94338484611298565b610e3c6111a6565b60058054911515600160a81b027fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff909216919091179055565b610e7d6111a6565b60058054911515600160a01b0260ff60a01b19909216919091179055565b60006001610ea9601f61118a565b610eb3919061273e565b821115610f025760405162461bcd60e51b815260206004820152601360248201527f696e646578206f7574206f6620626f756e6473000000000000000000000000006044820152606401610a63565b610a01601f83611a76565b610f156111a6565b60408051600080825260208201928390524792909133918491610f3791612781565b60006040518083038185875af1925050503d8060008114610f74576040519150601f19603f3d011682016040523d82523d6000602084013e610f79565b606091505b5050905080610d995760405162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c4544000000000000000000000000006044820152606401610a63565b610fd26111a6565b6000818385610fe1888a612751565b610feb9190612751565b610ff59190612751565b610fff9190612751565b90506109c481111561103e5760405162461bcd60e51b81526020600482015260086024820152676f7665722032352560c01b6044820152606401610a63565b601795909555601893909355601991909155601a55601655601b55565b60006110656111a6565b6001600160a01b0382166110bb5760405162461bcd60e51b815260206004820152601860248201527f7061697220697320746865207a65726f206164647265737300000000000000006044820152606401610a63565b610a01601f836114c7565b6110ce6111a6565b601c80546001600160a01b0394851673ffffffffffffffffffffffffffffffffffffffff1991821617909155601d805493851693821693909317909255601e8054919093169116179055565b60606109566006611a82565b6000610a01601f83611a8f565b61113b6111a6565b6001600160a01b03811661117e576040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152602401610a63565b611187816114dc565b50565b6000610a01825490565b6111a18383836001611ab1565b505050565b6005546001600160a01b03163314610d2e576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610a63565b6000610a94836001600160a01b038416611bb8565b6001600160a01b0383811660009081526001602090815260408083209386168352929052205460001981146112925781811015611283576040517ffb8f41b20000000000000000000000000000000000000000000000000000000081526001600160a01b03841660048201526024810182905260448101839052606401610a63565b61129284848484036000611ab1565b50505050565b600554600090600160b01b900460ff16156112c0576112b8848484611cab565b506001610a94565b6001600160a01b03841660009081526008602052604081205460ff1615801561130257506001600160a01b03841660009081526008602052604090205460ff16155b90506000858561131182611126565b156113ca5761133f601054600955601154600a55601254600b55601354600c55601454600d55601554600e55565b5050601d546040517f67d198a60000000000000000000000000000000000000000000000000000000081526001600160a01b0380891660048301526024820187905260019350879289929116906367d198a690604401600060405180830381600087803b1580156113af57600080fd5b505af19250505080156113c0575060015b1561140f5761140f565b6113d387611126565b1561140a57611401601654600955601754600a55601854600b55601954600c55601a54600d55601b54600e55565b6002925061140f565b600093505b611417611d3c565b156114245761142461153b565b600084611431578661143b565b61143b8988611d91565b9050611448898983611cab565b83156114b8577fe6f814da7244d1ae6c61b54b5684858ba39cad7b9a91884be10060664987d7548383898761147b610a9b565b604080516001600160a01b03968716815295909416602086015292840191909152606083015260808201524260a082015260c00160405180910390a15b50600198975050505050505050565b6000610a94836001600160a01b038416611dce565b600580546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6005805460ff60b01b1916600160b01b17905530600090815260208190526040812054905061158b307f0000000000000000000000006a63830e24f9a2f9c295fb2150107d0390ed144883611194565b6000600e546009548361159e919061279d565b6115a891906127b4565b90506000600e54600b54846115bd919061279d565b6115c791906127b4565b90506115d3828461273e565b92506115df818461273e565b60408051600280825260608201835292955060009290916020830190803683370190505090503081600081518110611619576116196127d6565b60200260200101906001600160a01b031690816001600160a01b0316815250507f0000000000000000000000003fb787101dc6be47cfe18aeee15404dcc842e6af8160018151811061166d5761166d6127d6565b6001600160a01b039283166020918202929092010152604051632955261160e11b815260009147917f0000000000000000000000006a63830e24f9a2f9c295fb2150107d0390ed1448909116906352aa4c22906116d8908990869088903090839042906004016127ec565b600060405180830381600087803b1580156116f257600080fd5b505af1925050508015611703575060015b1561170d57600191505b8161171d57505050505050611a67565b61172a3061dead87611cab565b6000611736824761273e565b90506000600b54600954600e5461174d919061273e565b611757919061273e565b9050600081600a548461176a919061279d565b61177491906127b4565b9050600082600c5485611787919061279d565b61179191906127b4565b90506000816117a0848761273e565b6117aa919061273e565b90507f0000000000000000000000003fb787101dc6be47cfe18aeee15404dcc842e6af6001600160a01b031663d0e30db0866040518263ffffffff1660e01b81526004016000604051808303818588803b15801561180757600080fd5b505af115801561181b573d6000803e3d6000fd5b5050601c5460405163a9059cbb60e01b81526001600160a01b039182166004820152602481018890527f0000000000000000000000003fb787101dc6be47cfe18aeee15404dcc842e6af909116935063a9059cbb925060440190506020604051808303816000875af1158015611895573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118b99190612830565b50601d5460405163a9059cbb60e01b81526001600160a01b039182166004820152602481018490527f0000000000000000000000003fb787101dc6be47cfe18aeee15404dcc842e6af9091169063a9059cbb906044016020604051808303816000875af115801561192e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119529190612830565b50601e5460405163a9059cbb60e01b81526001600160a01b039182166004820152602481018390527f0000000000000000000000003fb787101dc6be47cfe18aeee15404dcc842e6af9091169063a9059cbb906044016020604051808303816000875af11580156119c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119eb9190612830565b50600554600160a81b900460ff1615611a0657611a06611e1d565b604080518b8152602081018590529081018a905260608101839052608081018290524260a08201527ffc18969df35ccba802c14035d6d6273bf5bb4d8b9de8faa7aba1044c813b13009060c00160405180910390a150505050505050505050505b6005805460ff60b01b19169055565b6000610a948383611fa5565b60606000610a9483611fcf565b6001600160a01b03811660009081526001830160205260408120541515610a94565b6001600160a01b038416611af4576040517fe602df0500000000000000000000000000000000000000000000000000000000815260006004820152602401610a63565b6001600160a01b038316611b37576040517f94280d6200000000000000000000000000000000000000000000000000000000815260006004820152602401610a63565b6001600160a01b038085166000908152600160209081526040808320938716835292905220829055801561129257826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051611baa91815260200190565b60405180910390a350505050565b60008181526001830160205260408120548015611ca1576000611bdc60018361273e565b8554909150600090611bf09060019061273e565b9050808214611c55576000866000018281548110611c1057611c106127d6565b9060005260206000200154905080876000018481548110611c3357611c336127d6565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611c6657611c6661284d565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a01565b6000915050610a01565b6001600160a01b038316611cee576040517f96c6fd1e00000000000000000000000000000000000000000000000000000000815260006004820152602401610a63565b6001600160a01b038216611d31576040517fec442f0500000000000000000000000000000000000000000000000000000000815260006004820152602401610a63565b6111a183838361202b565b600554600090600160b01b900460ff16158015611d625750600554600160a01b900460ff165b8015611d7b575030600090815260208190526040812054115b80156109565750611d8b33611126565b15905090565b600080600f54600e5484611da5919061279d565b611daf91906127b4565b9050611dbc843083611cab565b611dc6818461273e565b949350505050565b6000818152600183016020526040812054611e1557508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a01565b506000610a01565b6040805160028082526060820183526000926020830190803683370190505090503081600081518110611e5257611e526127d6565b60200260200101906001600160a01b031690816001600160a01b0316815250507f0000000000000000000000003fb787101dc6be47cfe18aeee15404dcc842e6af81600181518110611ea657611ea66127d6565b6001600160a01b039290921660209283029190910182015230600090815290819052604081205490611ed96002836127b4565b90506103e8811015611eea57505050565b604051632955261160e11b815247906000906001600160a01b037f0000000000000000000000006a63830e24f9a2f9c295fb2150107d0390ed144816906352aa4c2290611f4590869085908a903090839042906004016127ec565b600060405180830381600087803b158015611f5f57600080fd5b505af1925050508015611f70575060015b15611f79575060015b80611f85575050505050565b6000611f91834761273e565b9050611f9d848261216e565b505050505050565b6000826000018281548110611fbc57611fbc6127d6565b9060005260206000200154905092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561201f57602002820191906000526020600020905b81548152602001906001019080831161200b575b50505050509050919050565b6001600160a01b03831661205657806002600082825461204b9190612751565b909155506120e19050565b6001600160a01b038316600090815260208190526040902054818110156120c2576040517fe450d38c0000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024810182905260448101839052606401610a63565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b0382166120fd5760028054829003905561211c565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161216191815260200190565b60405180910390a3505050565b612199307f0000000000000000000000006a63830e24f9a2f9c295fb2150107d0390ed144884611194565b6040517ff305d719000000000000000000000000000000000000000000000000000000008152306004820181905260248201849052600060448301819052606483015260848201524260a48201527f0000000000000000000000006a63830e24f9a2f9c295fb2150107d0390ed14486001600160a01b03169063f305d71990839060c40160606040518083038185885af193505050508015612258575060408051601f3d908101601f1916820190925261225591810190612863565b60015b15610d995750506040517fe6a439050000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000003fb787101dc6be47cfe18aeee15404dcc842e6af81166004830152306024830152600092507f00000000000000000000000018e621b64d7808c3c47bccbbd7485d23f257d26f169063e6a4390590604401602060405180830381865afa158015612308573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061232c9190612764565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529091506000906001600160a01b038316906370a0823190602401602060405180830381865afa15801561238f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123b39190612891565b60405163a9059cbb60e01b815261dead6004820152602481018290529091506001600160a01b0383169063a9059cbb906044016020604051808303816000875af1158015612405573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124299190612830565b506040805185815260208101859052428183015290517ff75993dbe1645872cbbea6395e1feebee76b435baf0e4d62d7eac269c6f57b249181900360600190a150505050565b60005b8381101561248a578181015183820152602001612472565b50506000910152565b60208152600082518060208401526124b281604085016020870161246f565b601f01601f19169190910160400192915050565b6001600160a01b038116811461118757600080fd5b600080604083850312156124ee57600080fd5b82356124f9816124c6565b946020939093013593505050565b60006020828403121561251957600080fd5b8135610a94816124c6565b60008060006060848603121561253957600080fd5b8335612544816124c6565b92506020840135612554816124c6565b929592945050506040919091013590565b600080600080600060a0868803121561257d57600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b801515811461118757600080fd5b600080604083850312156125c157600080fd5b82356125cc816124c6565b915060208301356125dc816125a0565b809150509250929050565b6000602082840312156125f957600080fd5b8135610a94816125a0565b60006020828403121561261657600080fd5b5035919050565b60008060006060848603121561263257600080fd5b833561263d816124c6565b9250602084013561264d816124c6565b9150604084013561265d816124c6565b809150509250925092565b6000806040838503121561267b57600080fd5b8235612686816124c6565b915060208301356125dc816124c6565b60008151808452602080850194506020840160005b838110156126d05781516001600160a01b0316875295820195908201906001016126ab565b509495945050505050565b602081526000610a946020830184612696565b600181811c9082168061270257607f821691505b60208210810361272257634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610a0157610a01612728565b80820180821115610a0157610a01612728565b60006020828403121561277657600080fd5b8151610a94816124c6565b6000825161279381846020870161246f565b9190910192915050565b8082028115828204841417610a0157610a01612728565b6000826127d157634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b86815285602082015260c06040820152600061280b60c0830187612696565b6001600160a01b03958616606084015293909416608082015260a00152949350505050565b60006020828403121561284257600080fd5b8151610a94816125a0565b634e487b7160e01b600052603160045260246000fd5b60008060006060848603121561287857600080fd5b8351925060208401519150604084015190509250925092565b6000602082840312156128a357600080fd5b505191905056fea2646970667358221220e39f6ec40acdf302a94a885a8a3583a8064a899de1daeb1de1b14657b12d2e4964736f6c63430008180033