ETH Price: $3,511.08 (+4.59%)
Gas: 3 Gwei

Token

Zunami ETH APS LP (apsZunETHLP)
 

Overview

Max Total Supply

93.370317314769835115 apsZunETHLP

Holders

13

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Filtered by Token Holder
Null: 0x000...000
Balance
0 apsZunETHLP

Value
$0.00
0x0000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
ZunamiPoolControllerApsZunETH

Compiler Version
v0.8.23+commit.f704f362

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 32 : 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;
        }
    }
}

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

pragma solidity ^0.8.20;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 4 of 32 : IERC5267.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol)

pragma solidity ^0.8.20;

interface IERC5267 {
    /**
     * @dev MAY be emitted to signal that the domain could have changed.
     */
    event EIP712DomainChanged();

    /**
     * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712
     * signature.
     */
    function eip712Domain()
        external
        view
        returns (
            bytes1 fields,
            string memory name,
            string memory version,
            uint256 chainId,
            address verifyingContract,
            bytes32 salt,
            uint256[] memory extensions
        );
}

File 5 of 32 : 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);
            }
        }
    }
}

File 6 of 32 : ERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Permit.sol)

pragma solidity ^0.8.20;

import {IERC20Permit} from "./IERC20Permit.sol";
import {ERC20} from "../ERC20.sol";
import {ECDSA} from "../../../utils/cryptography/ECDSA.sol";
import {EIP712} from "../../../utils/cryptography/EIP712.sol";
import {Nonces} from "../../../utils/Nonces.sol";

/**
 * @dev Implementation 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.
 */
abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712, Nonces {
    bytes32 private constant PERMIT_TYPEHASH =
        keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");

    /**
     * @dev Permit deadline has expired.
     */
    error ERC2612ExpiredSignature(uint256 deadline);

    /**
     * @dev Mismatched signature.
     */
    error ERC2612InvalidSigner(address signer, address owner);

    /**
     * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`.
     *
     * It's a good idea to use the same `name` that is defined as the ERC20 token name.
     */
    constructor(string memory name) EIP712(name, "1") {}

    /**
     * @inheritdoc IERC20Permit
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual {
        if (block.timestamp > deadline) {
            revert ERC2612ExpiredSignature(deadline);
        }

        bytes32 structHash = keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));

        bytes32 hash = _hashTypedDataV4(structHash);

        address signer = ECDSA.recover(hash, v, r, s);
        if (signer != owner) {
            revert ERC2612InvalidSigner(signer, owner);
        }

        _approve(owner, spender, value);
    }

    /**
     * @inheritdoc IERC20Permit
     */
    function nonces(address owner) public view virtual override(IERC20Permit, Nonces) returns (uint256) {
        return super.nonces(owner);
    }

    /**
     * @inheritdoc IERC20Permit
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view virtual returns (bytes32) {
        return _domainSeparatorV4();
    }
}

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

pragma solidity ^0.8.20;

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

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

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

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

File 8 of 32 : 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);
}

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

pragma solidity ^0.8.20;

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

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

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

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

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

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

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

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

File 10 of 32 : 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;
    }
}

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

pragma solidity ^0.8.20;

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

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

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

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

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

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

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

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

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

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

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

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

File 12 of 32 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (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;
    }
}

File 13 of 32 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.20;

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS
    }

    /**
     * @dev The signature derives the `address(0)`.
     */
    error ECDSAInvalidSignature();

    /**
     * @dev The signature has an invalid length.
     */
    error ECDSAInvalidSignatureLength(uint256 length);

    /**
     * @dev The signature has an S value that is in the upper half order.
     */
    error ECDSAInvalidSignatureS(bytes32 s);

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not
     * return address(0) without also returning an error description. Errors are documented using an enum (error type)
     * and a bytes32 providing additional information about the error.
     *
     * If no error is returned, then the address can be used for verification purposes.
     *
     * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            /// @solidity memory-safe-assembly
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);
        _throwError(error, errorArg);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     */
    function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {
        unchecked {
            bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
            // We do not check for an overflow here since the shift operation results in 0 or 1.
            uint8 v = uint8((uint256(vs) >> 255) + 27);
            return tryRecover(hash, v, r, s);
        }
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     */
    function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {
        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);
        _throwError(error, errorArg);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError, bytes32) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS, s);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature, bytes32(0));
        }

        return (signer, RecoverError.NoError, bytes32(0));
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);
        _throwError(error, errorArg);
        return recovered;
    }

    /**
     * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.
     */
    function _throwError(RecoverError error, bytes32 errorArg) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert ECDSAInvalidSignature();
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert ECDSAInvalidSignatureLength(uint256(errorArg));
        } else if (error == RecoverError.InvalidSignatureS) {
            revert ECDSAInvalidSignatureS(errorArg);
        }
    }
}

File 14 of 32 : EIP712.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/EIP712.sol)

pragma solidity ^0.8.20;

import {MessageHashUtils} from "./MessageHashUtils.sol";
import {ShortStrings, ShortString} from "../ShortStrings.sol";
import {IERC5267} from "../../interfaces/IERC5267.sol";

/**
 * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
 *
 * The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose
 * encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract
 * does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to
 * produce the hash of their typed data using a combination of `abi.encode` and `keccak256`.
 *
 * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
 * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
 * ({_hashTypedDataV4}).
 *
 * The implementation of the domain separator was designed to be as efficient as possible while still properly updating
 * the chain id to protect against replay attacks on an eventual fork of the chain.
 *
 * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
 * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
 *
 * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain
 * separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the
 * separator from the immutable values, which is cheaper than accessing a cached version in cold storage.
 *
 * @custom:oz-upgrades-unsafe-allow state-variable-immutable
 */
abstract contract EIP712 is IERC5267 {
    using ShortStrings for *;

    bytes32 private constant TYPE_HASH =
        keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");

    // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
    // invalidate the cached domain separator if the chain id changes.
    bytes32 private immutable _cachedDomainSeparator;
    uint256 private immutable _cachedChainId;
    address private immutable _cachedThis;

    bytes32 private immutable _hashedName;
    bytes32 private immutable _hashedVersion;

    ShortString private immutable _name;
    ShortString private immutable _version;
    string private _nameFallback;
    string private _versionFallback;

    /**
     * @dev Initializes the domain separator and parameter caches.
     *
     * The meaning of `name` and `version` is specified in
     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
     *
     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
     * - `version`: the current major version of the signing domain.
     *
     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
     * contract upgrade].
     */
    constructor(string memory name, string memory version) {
        _name = name.toShortStringWithFallback(_nameFallback);
        _version = version.toShortStringWithFallback(_versionFallback);
        _hashedName = keccak256(bytes(name));
        _hashedVersion = keccak256(bytes(version));

        _cachedChainId = block.chainid;
        _cachedDomainSeparator = _buildDomainSeparator();
        _cachedThis = address(this);
    }

    /**
     * @dev Returns the domain separator for the current chain.
     */
    function _domainSeparatorV4() internal view returns (bytes32) {
        if (address(this) == _cachedThis && block.chainid == _cachedChainId) {
            return _cachedDomainSeparator;
        } else {
            return _buildDomainSeparator();
        }
    }

    function _buildDomainSeparator() private view returns (bytes32) {
        return keccak256(abi.encode(TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this)));
    }

    /**
     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
     * function returns the hash of the fully encoded EIP712 message for this domain.
     *
     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
     *
     * ```solidity
     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
     *     keccak256("Mail(address to,string contents)"),
     *     mailTo,
     *     keccak256(bytes(mailContents))
     * )));
     * address signer = ECDSA.recover(digest, signature);
     * ```
     */
    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
        return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash);
    }

    /**
     * @dev See {IERC-5267}.
     */
    function eip712Domain()
        public
        view
        virtual
        returns (
            bytes1 fields,
            string memory name,
            string memory version,
            uint256 chainId,
            address verifyingContract,
            bytes32 salt,
            uint256[] memory extensions
        )
    {
        return (
            hex"0f", // 01111
            _EIP712Name(),
            _EIP712Version(),
            block.chainid,
            address(this),
            bytes32(0),
            new uint256[](0)
        );
    }

    /**
     * @dev The name parameter for the EIP712 domain.
     *
     * NOTE: By default this function reads _name which is an immutable value.
     * It only reads from storage if necessary (in case the value is too large to fit in a ShortString).
     */
    // solhint-disable-next-line func-name-mixedcase
    function _EIP712Name() internal view returns (string memory) {
        return _name.toStringWithFallback(_nameFallback);
    }

    /**
     * @dev The version parameter for the EIP712 domain.
     *
     * NOTE: By default this function reads _version which is an immutable value.
     * It only reads from storage if necessary (in case the value is too large to fit in a ShortString).
     */
    // solhint-disable-next-line func-name-mixedcase
    function _EIP712Version() internal view returns (string memory) {
        return _version.toStringWithFallback(_versionFallback);
    }
}

File 15 of 32 : MessageHashUtils.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)

pragma solidity ^0.8.20;

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

/**
 * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.
 *
 * The library provides methods for generating a hash of a message that conforms to the
 * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]
 * specifications.
 */
library MessageHashUtils {
    /**
     * @dev Returns the keccak256 digest of an EIP-191 signed data with version
     * `0x45` (`personal_sign` messages).
     *
     * The digest is calculated by prefixing a bytes32 `messageHash` with
     * `"\x19Ethereum Signed Message:\n32"` and hashing the result. It corresponds with the
     * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.
     *
     * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with
     * keccak256, although any bytes32 value can be safely used because the final digest will
     * be re-hashed.
     *
     * See {ECDSA-recover}.
     */
    function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, "\x19Ethereum Signed Message:\n32") // 32 is the bytes-length of messageHash
            mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix
            digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)
        }
    }

    /**
     * @dev Returns the keccak256 digest of an EIP-191 signed data with version
     * `0x45` (`personal_sign` messages).
     *
     * The digest is calculated by prefixing an arbitrary `message` with
     * `"\x19Ethereum Signed Message:\n" + len(message)` and hashing the result. It corresponds with the
     * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.
     *
     * See {ECDSA-recover}.
     */
    function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {
        return
            keccak256(bytes.concat("\x19Ethereum Signed Message:\n", bytes(Strings.toString(message.length)), message));
    }

    /**
     * @dev Returns the keccak256 digest of an EIP-191 signed data with version
     * `0x00` (data with intended validator).
     *
     * The digest is calculated by prefixing an arbitrary `data` with `"\x19\x00"` and the intended
     * `validator` address. Then hashing the result.
     *
     * See {ECDSA-recover}.
     */
    function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked(hex"19_00", validator, data));
    }

    /**
     * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).
     *
     * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with
     * `\x19\x01` and hashing the result. It corresponds to the hash signed by the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.
     *
     * See {ECDSA-recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {
        /// @solidity memory-safe-assembly
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, hex"19_01")
            mstore(add(ptr, 0x02), domainSeparator)
            mstore(add(ptr, 0x22), structHash)
            digest := keccak256(ptr, 0x42)
        }
    }
}

File 16 of 32 : 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;
    }
}

File 17 of 32 : 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);
}

File 18 of 32 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)

pragma solidity ^0.8.20;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Muldiv operation overflow.
     */
    error MathOverflowedMulDiv();

    enum Rounding {
        Floor, // Toward negative infinity
        Ceil, // Toward positive infinity
        Trunc, // Toward zero
        Expand // Away from zero
    }

    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

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

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

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

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds towards infinity instead
     * of rounding towards zero.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        if (b == 0) {
            // Guarantee the same behavior as in a regular Solidity division.
            return a / b;
        }

        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

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

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

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            if (denominator <= prod1) {
                revert MathOverflowedMulDiv();
            }

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

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

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

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

            uint256 twos = denominator & (0 - denominator);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
     */
    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
        return uint8(rounding) % 2 == 1;
    }
}

File 19 of 32 : SignedMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.20;

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

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

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

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

File 20 of 32 : Nonces.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Nonces.sol)
pragma solidity ^0.8.20;

/**
 * @dev Provides tracking nonces for addresses. Nonces will only increment.
 */
abstract contract Nonces {
    /**
     * @dev The nonce used for an `account` is not the expected current nonce.
     */
    error InvalidAccountNonce(address account, uint256 currentNonce);

    mapping(address account => uint256) private _nonces;

    /**
     * @dev Returns the next unused nonce for an address.
     */
    function nonces(address owner) public view virtual returns (uint256) {
        return _nonces[owner];
    }

    /**
     * @dev Consumes a nonce.
     *
     * Returns the current value and increments nonce.
     */
    function _useNonce(address owner) internal virtual returns (uint256) {
        // For each account, the nonce has an initial value of 0, can only be incremented by one, and cannot be
        // decremented or reset. This guarantees that the nonce never overflows.
        unchecked {
            // It is important to do x++ and not ++x here.
            return _nonces[owner]++;
        }
    }

    /**
     * @dev Same as {_useNonce} but checking that `nonce` is the next valid for `owner`.
     */
    function _useCheckedNonce(address owner, uint256 nonce) internal virtual {
        uint256 current = _useNonce(owner);
        if (nonce != current) {
            revert InvalidAccountNonce(owner, current);
        }
    }
}

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

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.20;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant NOT_ENTERED = 1;
    uint256 private constant ENTERED = 2;

    uint256 private _status;

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

    constructor() {
        _status = NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

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

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

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

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

File 23 of 32 : ShortStrings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ShortStrings.sol)

pragma solidity ^0.8.20;

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

// | string  | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA   |
// | length  | 0x                                                              BB |
type ShortString is bytes32;

/**
 * @dev This library provides functions to convert short memory strings
 * into a `ShortString` type that can be used as an immutable variable.
 *
 * Strings of arbitrary length can be optimized using this library if
 * they are short enough (up to 31 bytes) by packing them with their
 * length (1 byte) in a single EVM word (32 bytes). Additionally, a
 * fallback mechanism can be used for every other case.
 *
 * Usage example:
 *
 * ```solidity
 * contract Named {
 *     using ShortStrings for *;
 *
 *     ShortString private immutable _name;
 *     string private _nameFallback;
 *
 *     constructor(string memory contractName) {
 *         _name = contractName.toShortStringWithFallback(_nameFallback);
 *     }
 *
 *     function name() external view returns (string memory) {
 *         return _name.toStringWithFallback(_nameFallback);
 *     }
 * }
 * ```
 */
library ShortStrings {
    // Used as an identifier for strings longer than 31 bytes.
    bytes32 private constant FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF;

    error StringTooLong(string str);
    error InvalidShortString();

    /**
     * @dev Encode a string of at most 31 chars into a `ShortString`.
     *
     * This will trigger a `StringTooLong` error is the input string is too long.
     */
    function toShortString(string memory str) internal pure returns (ShortString) {
        bytes memory bstr = bytes(str);
        if (bstr.length > 31) {
            revert StringTooLong(str);
        }
        return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length));
    }

    /**
     * @dev Decode a `ShortString` back to a "normal" string.
     */
    function toString(ShortString sstr) internal pure returns (string memory) {
        uint256 len = byteLength(sstr);
        // using `new string(len)` would work locally but is not memory safe.
        string memory str = new string(32);
        /// @solidity memory-safe-assembly
        assembly {
            mstore(str, len)
            mstore(add(str, 0x20), sstr)
        }
        return str;
    }

    /**
     * @dev Return the length of a `ShortString`.
     */
    function byteLength(ShortString sstr) internal pure returns (uint256) {
        uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF;
        if (result > 31) {
            revert InvalidShortString();
        }
        return result;
    }

    /**
     * @dev Encode a string into a `ShortString`, or write it to storage if it is too long.
     */
    function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) {
        if (bytes(value).length < 32) {
            return toShortString(value);
        } else {
            StorageSlot.getStringSlot(store).value = value;
            return ShortString.wrap(FALLBACK_SENTINEL);
        }
    }

    /**
     * @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}.
     */
    function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) {
        if (ShortString.unwrap(value) != FALLBACK_SENTINEL) {
            return toString(value);
        } else {
            return store;
        }
    }

    /**
     * @dev Return the length of a string that was encoded to `ShortString` or written to storage using
     * {setWithFallback}.
     *
     * WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of
     * actual characters as the UTF-8 encoding of a single character can span over multiple bytes.
     */
    function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) {
        if (ShortString.unwrap(value) != FALLBACK_SENTINEL) {
            return byteLength(value);
        } else {
            return bytes(store).length;
        }
    }
}

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

pragma solidity ^0.8.20;

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

    struct BooleanSlot {
        bool value;
    }

    struct Bytes32Slot {
        bytes32 value;
    }

    struct Uint256Slot {
        uint256 value;
    }

    struct StringSlot {
        string value;
    }

    struct BytesSlot {
        bytes value;
    }

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

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

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

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

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

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

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

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

File 25 of 32 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)

pragma solidity ^0.8.20;

import {Math} from "./math/Math.sol";
import {SignedMath} from "./math/SignedMath.sol";

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

    /**
     * @dev The `value` string doesn't fit in the specified `length`.
     */
    error StringsInsufficientHexLength(uint256 value, uint256 length);

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

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

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

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

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

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

File 26 of 32 : ZunamiPoolControllerApsZunETH.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

import '../../ZunamiPoolCompoundController.sol';

contract ZunamiPoolControllerApsZunETH is ZunamiPoolCompoundController {
    constructor(
        address pool
    ) ZunamiPoolCompoundController(pool, 'Zunami ETH APS LP', 'apsZunETHLP') {}
}

File 27 of 32 : IPool.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

import { IERC20 } from '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import { IStrategy } from './IStrategy.sol';

interface IPool is IERC20 {
    error WrongDeposit(uint256 sid, uint256[5] amounts);
    error AbsentStrategy(uint256 sid);
    error NotStartedStrategy(uint256 sid);
    error DisabledStrategy(uint256 sid);
    error WrongAmount();
    error WrongWithdrawParams(uint256 sid);
    error WrongRatio();
    error ZeroAddress();
    error DuplicatedStrategy();
    error IncorrectArguments();
    error WrongWithdrawPercent();
    error WrongReceiver();
    error IncorrectSid();
    error WrongTokens();
    error WrongDecimalMultipliers();

    struct StrategyInfo {
        IStrategy strategy;
        uint256 startTime;
        uint256 minted;
        bool enabled;
    }

    event Deposited(
        address indexed depositor,
        uint256 deposited,
        uint256[5] amounts,
        uint256 indexed sid
    );

    event Withdrawn(address indexed withdrawer, uint256 withdrawn, uint256 indexed sid);

    event FailedWithdrawal(address indexed withdrawer, uint256[5] amounts, uint256 withdrawn);

    event AddedStrategy(uint256 indexed sid, address indexed strategyAddr, uint256 startTime);
    event ClaimedRewards(address indexed receiver, IERC20[] rewardTokens);
    event ClaimedExtraGains(address indexed receiver, uint256 amount);
    event EnabledStrategy(address indexed pool);
    event DisableStrategy(address indexed pool);
    event UpdatedToken(
        uint256 indexed tid,
        address indexed token,
        uint256 tokenDecimalMultiplier,
        address tokenOld
    );

    function tokens() external view returns (IERC20[5] memory);

    function token(uint256 tid) external view returns (IERC20);

    function tokenDecimalsMultipliers() external view returns (uint256[5] memory);

    function strategyInfo(uint256 sid) external view returns (StrategyInfo memory);

    function claimRewards(address receiver, IERC20[] memory rewardTokens) external;

    function totalHoldings() external view returns (uint256);

    function strategyCount() external view returns (uint256);

    function deposit(
        uint256 sid,
        uint256[5] memory amounts,
        address receiver
    ) external returns (uint256);

    function depositStrategy(uint256 sid, uint256[5] memory amounts) external returns (uint256);

    function withdraw(
        uint256 sid,
        uint256 stableAmount,
        uint256[5] memory minTokenAmounts,
        address receiver
    ) external;

    function mintAndClaimExtraGains(address receiver) external;
}

File 28 of 32 : IRewardManager.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

interface IRewardManager {
    function handle(address reward, uint256 amount, address feeToken) external;

    function valuate(
        address reward,
        uint256 amount,
        address feeToken
    ) external view returns (uint256);
}

File 29 of 32 : IStrategy.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

import { IERC20 } from '@openzeppelin/contracts/token/ERC20/IERC20.sol';

interface IStrategy {
    function deposit(uint256[5] memory amounts) external returns (uint256);

    function withdraw(
        address receiver,
        uint256 userDepositRatio, // multiplied by 1e18
        uint256[5] memory minTokenAmounts
    ) external returns (bool);

    function withdrawAll(uint256[5] memory minTokenAmounts) external;

    function totalHoldings() external view returns (uint256);

    function claimRewards(address receiver, IERC20[] memory rewardTokens) external;

    function calcTokenAmount(
        uint256[5] memory tokenAmounts,
        bool isDeposit
    ) external view returns (uint256 sharesAmount);
}

File 30 of 32 : RewardTokenManager.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import './interfaces/IRewardManager.sol';

abstract contract RewardTokenManager {
    using SafeERC20 for IERC20;

    error WrongRewardTokens(IERC20[] rewardTokens);
    error WrongRewardTokensLength(uint256 length);
    error ZeroRewardManager();
    error ZeroTokenAddress(uint256 index);

    IERC20[] public rewardTokens;

    event SetRewardTokens(IERC20[] rewardTokens);

    function _setRewardTokens(IERC20[] memory rewardTokens_) internal virtual {
        if (rewardTokens_.length == 0) revert WrongRewardTokens(rewardTokens_);

        for (uint256 i = 0; i < rewardTokens_.length; i++) {
            if (address(rewardTokens_[i]) == address(0)) revert ZeroTokenAddress(i);
        }

        rewardTokens = rewardTokens_;
        emit SetRewardTokens(rewardTokens);
    }

    function _sellRewardsAll(
        IRewardManager rewardManager,
        IERC20 feeToken,
        uint256 rewardTokenFrozen
    ) internal returns (uint256) {
        if (address(rewardManager) == address(0)) revert ZeroRewardManager();

        uint256 rewardsLength_ = rewardTokens.length;
        uint256[] memory rewardBalances = new uint256[](rewardsLength_);
        bool allRewardsEmpty = true;

        for (uint256 i = 0; i < rewardsLength_; i++) {
            IERC20 rewardToken = rewardTokens[i];
            rewardBalances[i] = rewardToken.balanceOf(address(this));
            if (feeToken == rewardToken) {
                rewardBalances[i] -= rewardTokenFrozen;
            }
            if (rewardBalances[i] > 0) {
                allRewardsEmpty = false;
            }
        }
        if (allRewardsEmpty) {
            return 0;
        }

        return _sellRewards(rewardManager, rewardsLength_, feeToken, rewardBalances);
    }

    function _sellRewardsByAmounts(
        IRewardManager rewardManager,
        IERC20 feeToken,
        uint256[] memory rewardAmounts
    ) internal returns (uint256) {
        if (address(rewardManager) == address(0)) revert ZeroRewardManager();
        uint256 rewardsLength_ = rewardTokens.length;
        if (rewardsLength_ != rewardAmounts.length) revert WrongRewardTokensLength(rewardsLength_);

        return _sellRewards(rewardManager, rewardsLength_, feeToken, rewardAmounts);
    }

    function _sellRewards(
        IRewardManager rewardManager,
        uint256 rewardsLength,
        IERC20 feeToken,
        uint256[] memory rewardAmounts
    ) private returns (uint256) {
        uint256 feeTokenBalanceBefore = feeToken.balanceOf(address(this));

        IERC20 rewardToken_;
        for (uint256 i = 0; i < rewardsLength; i++) {
            if (rewardAmounts[i] == 0) continue;
            rewardToken_ = rewardTokens[i];
            //don't sell fee token itself as reward
            if (rewardToken_ == feeToken) {
                //reduce current fee token balance by it's reward balance
                feeTokenBalanceBefore -= rewardAmounts[i];
                continue;
            }
            _sellToken(rewardManager, rewardToken_, rewardAmounts[i], address(feeToken));
        }

        return feeToken.balanceOf(address(this)) - feeTokenBalanceBefore;
    }

    function _sellToken(
        IRewardManager rewardManager,
        IERC20 sellingToken,
        uint256 sellingTokenAmount,
        address receivedToken
    ) internal {
        sellingToken.safeTransfer(address(rewardManager), sellingTokenAmount);
        rewardManager.handle(address(sellingToken), sellingTokenAmount, receivedToken);
    }
}

File 31 of 32 : ZunamiPoolCompoundController.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import '@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol';

import './interfaces/IRewardManager.sol';
import './ZunamiPoolControllerBase.sol';

contract ZunamiPoolCompoundController is ERC20Permit, ZunamiPoolControllerBase {
    using SafeERC20 for IERC20;

    error WrongFee();
    error WrongTokenId(uint256 tid);
    error ZeroTokenById(uint256 tid);
    error FeeMustBeWithdrawn();
    error ZeroFeeTokenAddress();

    uint256 public constant PRICE_MULTIPLIER = 1e18;
    uint256 public constant FEE_DENOMINATOR = 1000;
    uint256 public constant MAX_FEE = 300; // 30%
    uint256 public constant MINIMUM_LIQUIDITY = 1e3;
    address public constant MINIMUM_LIQUIDITY_LOCKER = 0x000000000000000000000000000000000000dEaD;

    uint256 public managementFeePercent = 150; // 15%

    uint256 public feeTokenId;
    address public feeDistributor;

    uint256 public collectedManagementFee;

    IRewardManager public rewardManager;

    event ManagementFeePercentSet(uint256 oldManagementFee, uint256 newManagementFee);
    event FeeDistributorSet(address oldFeeDistributor, address newFeeDistributor);
    event SetFeeTokenId(uint256 tid);
    event SetRewardManager(address rewardManager);
    event ClaimedManagementFee(address feeToken, uint256 feeValue);
    event AutoCompoundedAll(uint256 compoundedValue);
    event Deposited(address indexed receiver, uint256 assets, uint256 shares, uint256 sid);
    event Withdrawn(address indexed withdrawer, uint256 shares, uint256 assets, uint256 sid);

    constructor(
        address pool_,
        string memory name_,
        string memory symbol_
    ) ERC20(name_, symbol_) ERC20Permit(name_) ZunamiPoolControllerBase(pool_) {
        feeDistributor = msg.sender;
    }

    function setRewardManager(address rewardManagerAddr) external onlyRole(DEFAULT_ADMIN_ROLE) {
        if (rewardManagerAddr == address(0)) revert ZeroAddress();

        rewardManager = IRewardManager(rewardManagerAddr);
        emit SetRewardManager(rewardManagerAddr);
    }

    function setManagementFeePercent(
        uint256 newManagementFeePercent
    ) external onlyRole(DEFAULT_ADMIN_ROLE) {
        if (newManagementFeePercent > MAX_FEE) revert WrongFee();
        emit ManagementFeePercentSet(managementFeePercent, newManagementFeePercent);
        autoCompoundAll();
        managementFeePercent = newManagementFeePercent;
    }

    function setFeeTokenId(uint256 _tokenId) external onlyRole(DEFAULT_ADMIN_ROLE) {
        if (_tokenId >= pool.tokens().length || address(pool.token(_tokenId)) == address(0))
            revert WrongTokenId(_tokenId);
        if (collectedManagementFee != 0) revert FeeMustBeWithdrawn();

        feeTokenId = _tokenId;
        emit SetFeeTokenId(_tokenId);
    }

    function setFeeDistributor(address _feeDistributor) external onlyRole(DEFAULT_ADMIN_ROLE) {
        if (_feeDistributor == address(0)) revert ZeroAddress();
        emit FeeDistributorSet(feeDistributor, _feeDistributor);
        feeDistributor = _feeDistributor;
    }

    function claimManagementFee() external nonReentrant {
        IERC20 feeToken_ = IERC20(pool.token(feeTokenId));
        if (address(feeToken_) == address(0)) revert ZeroFeeTokenAddress();

        uint256 collectedManagementFee_ = collectedManagementFee;
        uint256 feeTokenBalance = feeToken_.balanceOf(address(this));
        uint256 transferBalance = collectedManagementFee_ > feeTokenBalance
            ? feeTokenBalance
            : collectedManagementFee_;

        collectedManagementFee -= transferBalance;

        if (transferBalance > 0) {
            feeToken_.safeTransfer(feeDistributor, transferBalance);
        }

        emit ClaimedManagementFee(address(feeToken_), transferBalance);
    }

    function autoCompoundAll() public whenNotPaused nonReentrant {
        claimPoolRewards(address(this));

        IERC20 feeToken = pool.token(feeTokenId);
        if (address(feeToken) == address(0)) revert ZeroFeeTokenAddress();

        uint256 received = sellRewards(feeToken);
        if (received == 0) return;

        uint256[POOL_ASSETS] memory amounts;
        amounts[feeTokenId] = received;
        feeToken.safeTransfer(address(pool), amounts[feeTokenId]);

        uint256 depositedValue = pool.deposit(defaultDepositSid, amounts, address(this));

        emit AutoCompoundedAll(depositedValue);
    }

    function sellRewards(IERC20 feeToken) internal virtual returns (uint256) {
        uint256 received = _sellRewardsAll(rewardManager, feeToken, collectedManagementFee);
        uint256 managementFee = calcManagementFee(received);
        collectedManagementFee += managementFee;
        return received - managementFee;
    }

    function calcManagementFee(uint256 amount) internal view returns (uint256) {
        return (amount * managementFeePercent) / FEE_DENOMINATOR;
    }

    function tokenPrice() public view returns (uint256) {
        return calcTokenPrice(pool.totalSupply(), totalSupply());
    }

    function calcTokenPrice(uint256 _holdings, uint256 _tokens) public pure returns (uint256) {
        return (_holdings * PRICE_MULTIPLIER) / _tokens;
    }

    function depositPool(
        uint256[POOL_ASSETS] memory amounts,
        address receiver
    ) internal override returns (uint256 shares) {
        pool.mintAndClaimExtraGains(address(this));

        uint256 stableBefore = pool.balanceOf(address(this));

        uint256 assets = depositDefaultPool(amounts, address(this));

        uint256 locked = 0;
        if (totalSupply() == 0) {
            shares = assets;
            locked = MINIMUM_LIQUIDITY;
            _mint(MINIMUM_LIQUIDITY_LOCKER, MINIMUM_LIQUIDITY); // permanently lock the first MINIMUM_LIQUIDITY tokens
        } else {
            shares = (totalSupply() * assets) / stableBefore;
        }

        _mint(receiver, shares - locked);
        emit Deposited(receiver, assets, shares, defaultDepositSid);
    }

    function withdrawPool(
        address user,
        uint256 shares,
        uint256[POOL_ASSETS] memory minTokenAmounts,
        address receiver
    ) internal override {
        pool.mintAndClaimExtraGains(address(this));

        uint256 assets = (pool.balanceOf(address(this)) * shares) / totalSupply();
        withdrawDefaultPool(assets, minTokenAmounts, receiver);
        _burn(user, shares);
        emit Withdrawn(user, shares, assets, defaultWithdrawSid);
    }
}

File 32 of 32 : ZunamiPoolControllerBase.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import '@openzeppelin/contracts/utils/Pausable.sol';
import '@openzeppelin/contracts/access/AccessControl.sol';
import '@openzeppelin/contracts/utils/ReentrancyGuard.sol';

import './interfaces/IPool.sol';
import './RewardTokenManager.sol';

abstract contract ZunamiPoolControllerBase is
    Pausable,
    AccessControl,
    ReentrancyGuard,
    RewardTokenManager
{
    using SafeERC20 for IERC20;

    error ZeroAddress();
    error WrongSid();

    uint8 public constant POOL_ASSETS = 5;

    uint256 public defaultDepositSid;
    uint256 public defaultWithdrawSid;

    IPool public immutable pool;

    event SetDefaultDepositSid(uint256 sid);
    event SetDefaultWithdrawSid(uint256 sid);

    constructor(address pool_) {
        if (pool_ == address(0)) revert ZeroAddress();
        pool = IPool(pool_);

        _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
    }

    function setRewardTokens(IERC20[] memory rewardTokens_) external onlyRole(DEFAULT_ADMIN_ROLE) {
        _setRewardTokens(rewardTokens_);
    }

    function pause() external onlyRole(DEFAULT_ADMIN_ROLE) {
        _pause();
    }

    function unpause() external onlyRole(DEFAULT_ADMIN_ROLE) {
        _unpause();
    }

    function setDefaultDepositSid(uint256 _newPoolId) external onlyRole(DEFAULT_ADMIN_ROLE) {
        if (_newPoolId >= pool.strategyCount()) revert WrongSid();

        defaultDepositSid = _newPoolId;
        emit SetDefaultDepositSid(_newPoolId);
    }

    function setDefaultWithdrawSid(uint256 _newPoolId) external onlyRole(DEFAULT_ADMIN_ROLE) {
        if (_newPoolId >= pool.strategyCount()) revert WrongSid();

        defaultWithdrawSid = _newPoolId;
        emit SetDefaultWithdrawSid(_newPoolId);
    }

    function claimPoolRewards(address collector) internal {
        pool.claimRewards(collector, rewardTokens);
    }

    function deposit(
        uint256[POOL_ASSETS] memory amounts,
        address receiver
    ) external whenNotPaused nonReentrant returns (uint256 shares) {
        if (receiver == address(0)) {
            receiver = _msgSender();
        }

        IERC20[5] memory tokens = pool.tokens();
        for (uint256 i = 0; i < amounts.length; i++) {
            IERC20 token = tokens[i];
            if (address(token) != address(0) && amounts[i] > 0) {
                IERC20(tokens[i]).safeTransferFrom(_msgSender(), address(pool), amounts[i]);
            }
        }

        return depositPool(amounts, receiver);
    }

    function depositPool(
        uint256[POOL_ASSETS] memory amounts,
        address receiver
    ) internal virtual returns (uint256);

    function depositDefaultPool(
        uint256[POOL_ASSETS] memory amounts,
        address receiver
    ) internal returns (uint256) {
        return pool.deposit(defaultDepositSid, amounts, receiver);
    }

    function withdraw(
        uint256 shares,
        uint256[POOL_ASSETS] memory minTokenAmounts,
        address receiver
    ) external whenNotPaused nonReentrant {
        if (receiver == address(0)) {
            receiver = _msgSender();
        }
        withdrawPool(_msgSender(), shares, minTokenAmounts, receiver);
    }

    function withdrawDefaultPool(
        uint256 shares,
        uint256[POOL_ASSETS] memory minTokenAmounts,
        address receiver
    ) internal virtual {
        pool.withdraw(defaultWithdrawSid, shares, minTokenAmounts, receiver);
    }

    function withdrawPool(
        address user,
        uint256 shares,
        uint256[POOL_ASSETS] memory minTokenAmounts,
        address receiver
    ) internal virtual;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"pool","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"ECDSAInvalidSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"name":"ECDSAInvalidSignatureLength","type":"error"},{"inputs":[{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"ECDSAInvalidSignatureS","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"inputs":[{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"ERC2612ExpiredSignature","type":"error"},{"inputs":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC2612InvalidSigner","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"FeeMustBeWithdrawn","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"currentNonce","type":"uint256"}],"name":"InvalidAccountNonce","type":"error"},{"inputs":[],"name":"InvalidShortString","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"StringTooLong","type":"error"},{"inputs":[],"name":"WrongFee","type":"error"},{"inputs":[{"internalType":"contract IERC20[]","name":"rewardTokens","type":"address[]"}],"name":"WrongRewardTokens","type":"error"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"name":"WrongRewardTokensLength","type":"error"},{"inputs":[],"name":"WrongSid","type":"error"},{"inputs":[{"internalType":"uint256","name":"tid","type":"uint256"}],"name":"WrongTokenId","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"inputs":[],"name":"ZeroFeeTokenAddress","type":"error"},{"inputs":[],"name":"ZeroRewardManager","type":"error"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"ZeroTokenAddress","type":"error"},{"inputs":[{"internalType":"uint256","name":"tid","type":"uint256"}],"name":"ZeroTokenById","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"compoundedValue","type":"uint256"}],"name":"AutoCompoundedAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"feeToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"feeValue","type":"uint256"}],"name":"ClaimedManagementFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"assets","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sid","type":"uint256"}],"name":"Deposited","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldFeeDistributor","type":"address"},{"indexed":false,"internalType":"address","name":"newFeeDistributor","type":"address"}],"name":"FeeDistributorSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldManagementFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newManagementFee","type":"uint256"}],"name":"ManagementFeePercentSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"sid","type":"uint256"}],"name":"SetDefaultDepositSid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"sid","type":"uint256"}],"name":"SetDefaultWithdrawSid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tid","type":"uint256"}],"name":"SetFeeTokenId","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"rewardManager","type":"address"}],"name":"SetRewardManager","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IERC20[]","name":"rewardTokens","type":"address[]"}],"name":"SetRewardTokens","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"withdrawer","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"assets","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sid","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEE_DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINIMUM_LIQUIDITY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINIMUM_LIQUIDITY_LOCKER","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"POOL_ASSETS","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICE_MULTIPLIER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"autoCompoundAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_holdings","type":"uint256"},{"internalType":"uint256","name":"_tokens","type":"uint256"}],"name":"calcTokenPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"claimManagementFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"collectedManagementFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultDepositSid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultWithdrawSid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[5]","name":"amounts","type":"uint256[5]"},{"internalType":"address","name":"receiver","type":"address"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeDistributor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"managementFeePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pool","outputs":[{"internalType":"contract IPool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardManager","outputs":[{"internalType":"contract IRewardManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardTokens","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPoolId","type":"uint256"}],"name":"setDefaultDepositSid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPoolId","type":"uint256"}],"name":"setDefaultWithdrawSid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeDistributor","type":"address"}],"name":"setFeeDistributor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"setFeeTokenId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newManagementFeePercent","type":"uint256"}],"name":"setManagementFeePercent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"rewardManagerAddr","type":"address"}],"name":"setRewardManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20[]","name":"rewardTokens_","type":"address[]"}],"name":"setRewardTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"},{"internalType":"uint256[5]","name":"minTokenAmounts","type":"uint256[5]"},{"internalType":"address","name":"receiver","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6101806040526096600e553480156200001757600080fd5b5060405162003b1738038062003b178339810160408190526200003a916200032b565b806040518060400160405280601181526020017005a756e616d692045544820415053204c5607c1b8152506040518060400160405280600b81526020016a06170735a756e4554484c560ac1b815250828280604051806040016040528060018152602001603160f81b81525085858160039081620000b9919062000404565b506004620000c8828262000404565b50620000da91508390506005620001f4565b61012052620000eb816006620001f4565b61014052815160208084019190912060e052815190820120610100524660a0526200017960e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60805250503060c052506008805460ff191690556001600a556001600160a01b038116620001ba5760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b03811661016052620001d56000336200022d565b5050601080546001600160a01b03191633179055506200054692505050565b600060208351101562000214576200020c83620002df565b905062000227565b8162000221848262000404565b5060ff90505b92915050565b60008281526009602090815260408083206001600160a01b038516845290915281205460ff16620002d65760008381526009602090815260408083206001600160a01b03861684529091529020805460ff191660011790556200028d3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600162000227565b50600062000227565b600080829050601f8151111562000316578260405163305a27a960e01b81526004016200030d9190620004d0565b60405180910390fd5b8051620003238262000521565b179392505050565b6000602082840312156200033e57600080fd5b81516001600160a01b03811681146200035657600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200038857607f821691505b602082108103620003a957634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620003ff576000816000526020600020601f850160051c81016020861015620003da5750805b601f850160051c820191505b81811015620003fb57828155600101620003e6565b5050505b505050565b81516001600160401b038111156200042057620004206200035d565b620004388162000431845462000373565b84620003af565b602080601f831160018114620004705760008415620004575750858301515b600019600386901b1c1916600185901b178555620003fb565b600085815260208120601f198616915b82811015620004a15788860151825594840194600190910190840162000480565b5085821015620004c05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006020808352835180602085015260005b818110156200050057858101830151858201604001528201620004e2565b506000604082860101526040601f19601f8301168501019250505092915050565b80516020808301519190811015620003a95760001960209190910360031b1b16919050565b60805160a05160c05160e051610100516101205161014051610160516134ed6200062a600039600081816103bb0152818161085a0152818161093c01528181610ae701528181610bc801528181610ca901528181610d5601528181610e9701528181610fe5015281816113fb015281816114e301528181611548015281816118910152818161190c01528181611da301528181611e2901528181611f900152818161230e01526124a601526000611d3701526000611d0a01526000611bb601526000611b8e01526000611ae901526000611b1301526000611b3d01526134ed6000f3fe608060405234801561001057600080fd5b50600436106102f15760003560e01c8063686f6b511161019d578063a217fddf116100e9578063ca54be3b116100a2578063d547741f1161007c578063d547741f14610637578063d73792a9146105e3578063dd62ed3e1461064a578063f66f807b1461068357600080fd5b8063ca54be3b146105fe578063ccfc2e8d14610611578063d505accf1461062457600080fd5b8063a217fddf146105c0578063a9059cbb146105c8578063b44f9b48146105db578063ba9a7a56146105e3578063bc063e1a146105ec578063c37d913d146105f557600080fd5b80637ecebe001161015657806384b0196e1161013057806384b0196e1461058157806391d148541461059c57806395d89b41146105af57806399ec9246146105b757600080fd5b80637ecebe001461055e5780637ff9b596146105715780638456cb591461057957600080fd5b8063686f6b51146104eb57806370a08231146104fe57806370a106b91461052757806373f351c81461053a57806375451b4f146105435780637bb7bed11461054b57600080fd5b80632d62af2f1161025c5780633a8051ac116102155780633f4ba83a116101ef5780633f4ba83a146104bc57806352d0b768146104c45780635920192a146104d75780635c975abb146104e057600080fd5b80633a8051ac1461048d5780633dbb53e9146104965780633f22fdf0146104a957600080fd5b80632d62af2f1461042e5780632f2ff15d14610441578063313ce567146104545780633644e5151461046957806336568abe1461047157806339fb71931461048457600080fd5b8063153ee554116102ae578063153ee554146103a157806316f0115b146103b657806318160ddd146103dd578063201e81a8146103e557806323b872dd146103f8578063248a9ca31461040b57600080fd5b806301ffc9a7146102f657806306fdde031461031e578063095ea7b3146103335780630d43e8ad146103465780630f4ef8a614610371578063113990b814610384575b600080fd5b610309610304366004612d0d565b61068b565b60405190151581526020015b60405180910390f35b6103266106c2565b6040516103159190612d87565b610309610341366004612daf565b610754565b601054610359906001600160a01b031681565b6040516001600160a01b039091168152602001610315565b601254610359906001600160a01b031681565b610393670de0b6b3a764000081565b604051908152602001610315565b6103b46103af366004612ddb565b61076c565b005b6103597f000000000000000000000000000000000000000000000000000000000000000081565b600254610393565b6103b46103f3366004612e68565b6107f4565b610309610406366004612f1a565b61080c565b610393610419366004612f5b565b60009081526009602052604090206001015490565b61039361043c366004612fc4565b610832565b6103b461044f366004612ffc565b6109bb565b60125b60405160ff9091168152602001610315565b6103936109e6565b6103b461047f366004612ffc565b6109f5565b61039360115481565b610393600d5481565b6103936104a4366004613021565b610a2d565b6103b46104b7366004612f5b565b610a4c565b6103b4610ac4565b6103b46104d2366004612f5b565b610ada565b61035961dead81565b60085460ff16610309565b6103b46104f9366004612f5b565b610bbb565b61039361050c366004612ddb565b6001600160a01b031660009081526020819052604090205490565b6103b4610535366004612f5b565b610c9c565b610393600e5481565b610457600581565b610359610559366004612f5b565b610e48565b61039361056c366004612ddb565b610e72565b610393610e90565b6103b4610f1f565b610589610f32565b6040516103159796959493929190613043565b6103096105aa366004612ffc565b610f78565b610326610fa3565b610393600c5481565b610393600081565b6103096105d6366004612daf565b610fb2565b6103b4610fc0565b6103936103e881565b61039361012c81565b610393600f5481565b6103b461060c3660046130dc565b611193565b6103b461061f366004612ddb565b6111ca565b6103b461063236600461311d565b611266565b6103b4610645366004612ffc565b6113a0565b610393610658366004613194565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6103b46113c5565b60006001600160e01b03198216637965db0b60e01b14806106bc57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600380546106d1906131c2565b80601f01602080910402602001604051908101604052809291908181526020018280546106fd906131c2565b801561074a5780601f1061071f5761010080835404028352916020019161074a565b820191906000526020600020905b81548152906001019060200180831161072d57829003601f168201915b5050505050905090565b6000336107628185856115ff565b5060019392505050565b60006107778161160c565b6001600160a01b03821661079e5760405163d92e233d60e01b815260040160405180910390fd5b601280546001600160a01b0319166001600160a01b0384169081179091556040519081527fc05fa79926cd5600b1cc95c8d9d908b7685d3f058c34ea011f8ae3490968ad30906020015b60405180910390a15050565b60006107ff8161160c565b61080882611616565b5050565b60003361081a8582856116ed565b610825858585611765565b60019150505b9392505050565b600061083c6117c4565b6108446117e8565b6001600160a01b038216610856573391505b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639d63848a6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156108b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108da91906131fc565b905060005b60058110156109a35760008282600581106108fc576108fc61325a565b602002015190506001600160a01b038116158015906109315750600086836005811061092a5761092a61325a565b6020020151115b1561099a5761099a337f000000000000000000000000000000000000000000000000000000000000000088856005811061096d5761096d61325a565b60200201518686600581106109845761098461325a565b60200201516001600160a01b0316929190611812565b506001016108df565b506109ae8484611879565b9150506106bc6001600a55565b6000828152600960205260409020600101546109d68161160c565b6109e08383611a48565b50505050565b60006109f0611adc565b905090565b6001600160a01b0381163314610a1e5760405163334bd91960e11b815260040160405180910390fd5b610a288282611c07565b505050565b600081610a42670de0b6b3a764000085613286565b61082b919061329d565b6000610a578161160c565b61012c821115610a7a57604051634d0419db60e11b815260040160405180910390fd5b600e5460408051918252602082018490527f4b9e3389cd92257d5111fc1cd43ed1fab1a6a790024c9cec0acfad96886eeee7910160405180910390a1610abe6113c5565b50600e55565b6000610acf8161160c565b610ad7611c74565b50565b6000610ae58161160c565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166322068b446040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6791906132bf565b8210610b8657604051634dd76a3360e01b815260040160405180910390fd5b600d8290556040518281527f1263b39fe165b48c204de3a3d752e6c7a129670cbe325757bdf76562664ef8d1906020016107e8565b6000610bc68161160c565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166322068b446040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4891906132bf565b8210610c6757604051634dd76a3360e01b815260040160405180910390fd5b600c8290556040518281527fdefccea87e6a6ac5c177a3e0318456cf032572ae03a96d9f44c4664a92999aef906020016107e8565b6000610ca78161160c565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639d63848a6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610d05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2991906131fc565b50600582101580610dcc57506040516302210ae360e11b8152600481018390526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063044215c690602401602060405180830381865afa158015610d9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dc191906132d8565b6001600160a01b0316145b15610df2576040516311fbc14560e11b8152600481018390526024015b60405180910390fd5b60115415610e1357604051635125b48560e01b815260040160405180910390fd5b600f8290556040518281527f734ef387ad5aca687c870a01e23a5e8dec0499f3d83912614a8bf06a539049ec906020016107e8565b600b8181548110610e5857600080fd5b6000918252602090912001546001600160a01b0316905081565b6001600160a01b0381166000908152600760205260408120546106bc565b60006109f07f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ef3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1791906132bf565b600254610a2d565b6000610f2a8161160c565b610ad7611cc6565b600060608060008060006060610f46611d03565b610f4e611d30565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b60009182526009602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600480546106d1906131c2565b600033610762818585611765565b610fc86117e8565b600f546040516302210ae360e11b81526000916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163044215c69161101c9160040190815260200190565b602060405180830381865afa158015611039573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105d91906132d8565b90506001600160a01b038116611086576040516323f3a9b760e01b815260040160405180910390fd5b6011546040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa1580156110d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f491906132bf565b905060008183116111055782611107565b815b9050806011600082825461111b91906132f5565b9091555050801561114057601054611140906001600160a01b03868116911683611d5d565b604080516001600160a01b0386168152602081018390527f15a050976823afd82c639feaf4828ec3e700c0011eeb105b53f6f6f1c8fe7bc891015b60405180910390a1505050506111916001600a55565b565b61119b6117c4565b6111a36117e8565b6001600160a01b0381166111b45750335b6111c033848484611d8e565b610a286001600a55565b60006111d58161160c565b6001600160a01b0382166111fc5760405163d92e233d60e01b815260040160405180910390fd5b601054604080516001600160a01b03928316815291841660208301527f14ea07ac6324369bb3f11ebf255d527e848b1099791d10d5d82a5e4fc9288cbf910160405180910390a150601080546001600160a01b0319166001600160a01b0392909216919091179055565b8342111561128a5760405163313c898160e11b815260048101859052602401610de9565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98888886112d78c6001600160a01b0316600090815260076020526040902080546001810190915590565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e001604051602081830303815290604052805190602001209050600061133282611f1e565b9050600061134282878787611f4b565b9050896001600160a01b0316816001600160a01b031614611389576040516325c0072360e11b81526001600160a01b0380831660048301528b166024820152604401610de9565b6113948a8a8a6115ff565b50505050505050505050565b6000828152600960205260409020600101546113bb8161160c565b6109e08383611c07565b6113cd6117c4565b6113d56117e8565b6113de30611f79565b600f546040516302210ae360e11b81526000916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163044215c6916114329160040190815260200190565b602060405180830381865afa15801561144f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061147391906132d8565b90506001600160a01b03811661149c576040516323f3a9b760e01b815260040160405180910390fd5b60006114a782611ffd565b9050806000036114b85750506115f5565b6114c0612c75565b8181600f54600581106114d5576114d561325a565b6020020152600f5461152b907f0000000000000000000000000000000000000000000000000000000000000000908390600581106115155761151561325a565b60200201516001600160a01b0386169190611d5d565b600c54604051636766ea0f60e01b81526000916001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691636766ea0f9161157f918690309060040161332b565b6020604051808303816000875af115801561159e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115c291906132bf565b90507f1a66222d9f5ba56428c4d1cd5c0127998bf6e8c1ab86f3027227b0f1319a6a028160405161117b91815260200190565b6111916001600a55565b610a288383836001612056565b610ad7813361212b565b805160000361163a5780604051630362609760e51b8152600401610de99190613358565b60005b815181101561169d5760006001600160a01b03168282815181106116635761166361325a565b60200260200101516001600160a01b0316036116955760405163af7bbf6960e01b815260048101829052602401610de9565b60010161163d565b5080516116b190600b906020840190612c93565b507f69be44b81d4f8b6cf7825a37f020b264079658f3d72856eeb0a0efed09c7d392600b6040516116e291906133e3565b60405180910390a150565b6001600160a01b0383811660009081526001602090815260408083209386168352929052205460001981146109e0578181101561175657604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610de9565b6109e084848484036000612056565b6001600160a01b03831661178f57604051634b637e8f60e11b815260006004820152602401610de9565b6001600160a01b0382166117b95760405163ec442f0560e01b815260006004820152602401610de9565b610a28838383612164565b60085460ff16156111915760405163d93c066560e01b815260040160405180910390fd5b6002600a540361180b57604051633ee5aeb560e01b815260040160405180910390fd5b6002600a55565b6040516001600160a01b0384811660248301528381166044830152606482018390526109e09186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b03838183161783525050505061228e565b60405163297a77b960e21b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a5e9dee490602401600060405180830381600087803b1580156118dd57600080fd5b505af11580156118f1573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600092507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691506370a0823190602401602060405180830381865afa15801561195c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061198091906132bf565b9050600061198e85306122f1565b9050600061199b60025490565b6000036119ba57509150816103e86119b561dead82612388565b6119dc565b82826119c560025490565b6119cf9190613286565b6119d9919061329d565b93505b6119ef856119ea83876132f5565b612388565b600c546040805184815260208101879052908101919091526001600160a01b038616907f91ede45f04a37a7c170f5c1207df3b6bc748dc1e04ad5e917a241d0f52feada39060600160405180910390a250505092915050565b6000611a548383610f78565b611ad45760008381526009602090815260408083206001600160a01b03861684529091529020805460ff19166001179055611a8c3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016106bc565b5060006106bc565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015611b3557507f000000000000000000000000000000000000000000000000000000000000000046145b15611b5f57507f000000000000000000000000000000000000000000000000000000000000000090565b6109f0604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b6000611c138383610f78565b15611ad45760008381526009602090815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016106bc565b611c7c6123be565b6008805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b611cce6117c4565b6008805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611ca93390565b60606109f07f000000000000000000000000000000000000000000000000000000000000000060056123e1565b60606109f07f000000000000000000000000000000000000000000000000000000000000000060066123e1565b6040516001600160a01b03838116602483015260448201839052610a2891859182169063a9059cbb90606401611847565b60405163297a77b960e21b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a5e9dee490602401600060405180830381600087803b158015611def57600080fd5b505af1158015611e03573d6000803e3d6000fd5b505050506000611e1260025490565b6040516370a0823160e01b815230600482015285907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015611e78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e9c91906132bf565b611ea69190613286565b611eb0919061329d565b9050611ebd81848461248c565b611ec78585612517565b600d546040805186815260208101849052908101919091526001600160a01b038616907f75e161b3e824b114fc1a33274bd7091918dd4e639cede50b78b15a4eea956a219060600160405180910390a25050505050565b60006106bc611f2b611adc565b8360405161190160f01b8152600281019290925260228201526042902090565b600080600080611f5d8888888861254d565b925092509250611f6d828261261c565b50909695505050505050565b604051632026ffa360e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690632026ffa390611fc8908490600b906004016133f6565b600060405180830381600087803b158015611fe257600080fd5b505af1158015611ff6573d6000803e3d6000fd5b5050505050565b601254601154600091829161201d916001600160a01b03169085906126d5565b9050600061202a8261289e565b9050806011600082825461203e919061341a565b9091555061204e905081836132f5565b949350505050565b6001600160a01b0384166120805760405163e602df0560e01b815260006004820152602401610de9565b6001600160a01b0383166120aa57604051634a1406b160e11b815260006004820152602401610de9565b6001600160a01b03808516600090815260016020908152604080832093871683529290522082905580156109e057826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161211d91815260200190565b60405180910390a350505050565b6121358282610f78565b6108085760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610de9565b6001600160a01b03831661218f578060026000828254612184919061341a565b909155506122019050565b6001600160a01b038316600090815260208190526040902054818110156121e25760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401610de9565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b03821661221d5760028054829003905561223c565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161228191815260200190565b60405180910390a3505050565b60006122a36001600160a01b038416836128bb565b905080516000141580156122c85750808060200190518101906122c6919061342d565b155b15610a2857604051635274afe760e01b81526001600160a01b0384166004820152602401610de9565b600c54604051636766ea0f60e01b81526000916001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691636766ea0f91612345918790879060040161332b565b6020604051808303816000875af1158015612364573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082b91906132bf565b6001600160a01b0382166123b25760405163ec442f0560e01b815260006004820152602401610de9565b61080860008383612164565b60085460ff1661119157604051638dfc202b60e01b815260040160405180910390fd5b606060ff83146123fb576123f4836128c9565b90506106bc565b818054612407906131c2565b80601f0160208091040260200160405190810160405280929190818152602001828054612433906131c2565b80156124805780601f1061245557610100808354040283529160200191612480565b820191906000526020600020905b81548152906001019060200180831161246357829003601f168201915b505050505090506106bc565b600d54604051632d526f8f60e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163b549be3c916124e0919087908790879060040161344f565b600060405180830381600087803b1580156124fa57600080fd5b505af115801561250e573d6000803e3d6000fd5b50505050505050565b6001600160a01b03821661254157604051634b637e8f60e11b815260006004820152602401610de9565b61080882600083612164565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156125885750600091506003905082612612565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa1580156125dc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661260857506000925060019150829050612612565b9250600091508190505b9450945094915050565b600082600381111561263057612630613485565b03612639575050565b600182600381111561264d5761264d613485565b0361266b5760405163f645eedf60e01b815260040160405180910390fd5b600282600381111561267f5761267f613485565b036126a05760405163fce698f760e01b815260048101829052602401610de9565b60038260038111156126b4576126b4613485565b03610808576040516335e2f38360e21b815260048101829052602401610de9565b60006001600160a01b0384166126fe576040516310994b1b60e01b815260040160405180910390fd5b600b5460008167ffffffffffffffff81111561271c5761271c612df8565b604051908082528060200260200182016040528015612745578160200160208202803683370190505b509050600160005b83811015612874576000600b828154811061276a5761276a61325a565b6000918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116915081906370a0823190602401602060405180830381865afa1580156127be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127e291906132bf565b8483815181106127f4576127f461325a565b602002602001018181525050806001600160a01b0316886001600160a01b031603612844578684838151811061282c5761282c61325a565b6020026020010181815161284091906132f5565b9052505b60008483815181106128585761285861325a565b6020026020010151111561286b57600092505b5060010161274d565b508015612887576000935050505061082b565b61289387848885612908565b979650505050505050565b60006103e8600e54836128b19190613286565b6106bc919061329d565b606061082b83836000612aa7565b606060006128d683612b44565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015612951573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061297591906132bf565b90506000805b86811015612a32578481815181106129955761299561325a565b602002602001015160000315612a2a57600b81815481106129b8576129b861325a565b6000918252602090912001546001600160a01b03908116925086168203612a05578481815181106129eb576129eb61325a565b6020026020010151836129fe91906132f5565b9250612a2a565b612a2a8883878481518110612a1c57612a1c61325a565b602002602001015189612b6c565b60010161297b565b506040516370a0823160e01b815230600482015282906001600160a01b038716906370a0823190602401602060405180830381865afa158015612a79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a9d91906132bf565b61289391906132f5565b606081471015612acc5760405163cd78605960e01b8152306004820152602401610de9565b600080856001600160a01b03168486604051612ae8919061349b565b60006040518083038185875af1925050503d8060008114612b25576040519150601f19603f3d011682016040523d82523d6000602084013e612b2a565b606091505b5091509150612b3a868383612bf0565b9695505050505050565b600060ff8216601f8111156106bc57604051632cd44ac360e21b815260040160405180910390fd5b612b806001600160a01b0384168584611d5d565b604051631099a22f60e21b81526001600160a01b03848116600483015260248201849052828116604483015285169063426688bc90606401600060405180830381600087803b158015612bd257600080fd5b505af1158015612be6573d6000803e3d6000fd5b5050505050505050565b606082612c0557612c0082612c4c565b61082b565b8151158015612c1c57506001600160a01b0384163b155b15612c4557604051639996b31560e01b81526001600160a01b0385166004820152602401610de9565b508061082b565b805115612c5c5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6040518060a001604052806005906020820280368337509192915050565b828054828255906000526020600020908101928215612ce8579160200282015b82811115612ce857825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612cb3565b50612cf4929150612cf8565b5090565b5b80821115612cf45760008155600101612cf9565b600060208284031215612d1f57600080fd5b81356001600160e01b03198116811461082b57600080fd5b60005b83811015612d52578181015183820152602001612d3a565b50506000910152565b60008151808452612d73816020860160208601612d37565b601f01601f19169290920160200192915050565b60208152600061082b6020830184612d5b565b6001600160a01b0381168114610ad757600080fd5b60008060408385031215612dc257600080fd5b8235612dcd81612d9a565b946020939093013593505050565b600060208284031215612ded57600080fd5b813561082b81612d9a565b634e487b7160e01b600052604160045260246000fd5b60405160a0810167ffffffffffffffff81118282101715612e3157612e31612df8565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612e6057612e60612df8565b604052919050565b60006020808385031215612e7b57600080fd5b823567ffffffffffffffff80821115612e9357600080fd5b818501915085601f830112612ea757600080fd5b813581811115612eb957612eb9612df8565b8060051b9150612eca848301612e37565b8181529183018401918481019088841115612ee457600080fd5b938501935b83851015612f0e5784359250612efe83612d9a565b8282529385019390850190612ee9565b98975050505050505050565b600080600060608486031215612f2f57600080fd5b8335612f3a81612d9a565b92506020840135612f4a81612d9a565b929592945050506040919091013590565b600060208284031215612f6d57600080fd5b5035919050565b600082601f830112612f8557600080fd5b612f8d612e0e565b8060a0840185811115612f9f57600080fd5b845b81811015612fb9578035845260209384019301612fa1565b509095945050505050565b60008060c08385031215612fd757600080fd5b612fe18484612f74565b915060a0830135612ff181612d9a565b809150509250929050565b6000806040838503121561300f57600080fd5b823591506020830135612ff181612d9a565b6000806040838503121561303457600080fd5b50508035926020909101359150565b60ff60f81b881681526000602060e0602084015261306460e084018a612d5b565b8381036040850152613076818a612d5b565b606085018990526001600160a01b038816608086015260a0850187905284810360c08601528551808252602080880193509091019060005b818110156130ca578351835292840192918401916001016130ae565b50909c9b505050505050505050505050565b600080600060e084860312156130f157600080fd5b833592506131028560208601612f74565b915060c084013561311281612d9a565b809150509250925092565b600080600080600080600060e0888a03121561313857600080fd5b873561314381612d9a565b9650602088013561315381612d9a565b95506040880135945060608801359350608088013560ff8116811461317757600080fd5b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156131a757600080fd5b82356131b281612d9a565b91506020830135612ff181612d9a565b600181811c908216806131d657607f821691505b6020821081036131f657634e487b7160e01b600052602260045260246000fd5b50919050565b600060a0828403121561320e57600080fd5b82601f83011261321d57600080fd5b613225612e0e565b8060a084018581111561323757600080fd5b845b81811015612fb957805161324c81612d9a565b845260209384019301613239565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176106bc576106bc613270565b6000826132ba57634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156132d157600080fd5b5051919050565b6000602082840312156132ea57600080fd5b815161082b81612d9a565b818103818111156106bc576106bc613270565b8060005b60058110156109e057815184526020938401939091019060010161330c565b83815260e0810161333f6020830185613308565b6001600160a01b039290921660c0919091015292915050565b6020808252825182820181905260009190848201906040850190845b81811015611f6d5783516001600160a01b031683529284019291840191600101613374565b600081548084526020808501945083600052602060002060005b838110156133d85781546001600160a01b0316875295820195600191820191016133b3565b509495945050505050565b60208152600061082b6020830184613399565b6001600160a01b038316815260406020820181905260009061204e90830184613399565b808201808211156106bc576106bc613270565b60006020828403121561343f57600080fd5b8151801515811461082b57600080fd5b84815260208101849052610100810161346b6040830185613308565b6001600160a01b039290921660e091909101529392505050565b634e487b7160e01b600052602160045260246000fd5b600082516134ad818460208701612d37565b919091019291505056fea26469706673582212208ab323e6d98c4b113e1d876833ec80d5acf1096320e6f23d4cff53914f6bb40064736f6c634300081700330000000000000000000000005ab3aa11a40eb34f1d2733f08596532871bd28e2

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102f15760003560e01c8063686f6b511161019d578063a217fddf116100e9578063ca54be3b116100a2578063d547741f1161007c578063d547741f14610637578063d73792a9146105e3578063dd62ed3e1461064a578063f66f807b1461068357600080fd5b8063ca54be3b146105fe578063ccfc2e8d14610611578063d505accf1461062457600080fd5b8063a217fddf146105c0578063a9059cbb146105c8578063b44f9b48146105db578063ba9a7a56146105e3578063bc063e1a146105ec578063c37d913d146105f557600080fd5b80637ecebe001161015657806384b0196e1161013057806384b0196e1461058157806391d148541461059c57806395d89b41146105af57806399ec9246146105b757600080fd5b80637ecebe001461055e5780637ff9b596146105715780638456cb591461057957600080fd5b8063686f6b51146104eb57806370a08231146104fe57806370a106b91461052757806373f351c81461053a57806375451b4f146105435780637bb7bed11461054b57600080fd5b80632d62af2f1161025c5780633a8051ac116102155780633f4ba83a116101ef5780633f4ba83a146104bc57806352d0b768146104c45780635920192a146104d75780635c975abb146104e057600080fd5b80633a8051ac1461048d5780633dbb53e9146104965780633f22fdf0146104a957600080fd5b80632d62af2f1461042e5780632f2ff15d14610441578063313ce567146104545780633644e5151461046957806336568abe1461047157806339fb71931461048457600080fd5b8063153ee554116102ae578063153ee554146103a157806316f0115b146103b657806318160ddd146103dd578063201e81a8146103e557806323b872dd146103f8578063248a9ca31461040b57600080fd5b806301ffc9a7146102f657806306fdde031461031e578063095ea7b3146103335780630d43e8ad146103465780630f4ef8a614610371578063113990b814610384575b600080fd5b610309610304366004612d0d565b61068b565b60405190151581526020015b60405180910390f35b6103266106c2565b6040516103159190612d87565b610309610341366004612daf565b610754565b601054610359906001600160a01b031681565b6040516001600160a01b039091168152602001610315565b601254610359906001600160a01b031681565b610393670de0b6b3a764000081565b604051908152602001610315565b6103b46103af366004612ddb565b61076c565b005b6103597f0000000000000000000000005ab3aa11a40eb34f1d2733f08596532871bd28e281565b600254610393565b6103b46103f3366004612e68565b6107f4565b610309610406366004612f1a565b61080c565b610393610419366004612f5b565b60009081526009602052604090206001015490565b61039361043c366004612fc4565b610832565b6103b461044f366004612ffc565b6109bb565b60125b60405160ff9091168152602001610315565b6103936109e6565b6103b461047f366004612ffc565b6109f5565b61039360115481565b610393600d5481565b6103936104a4366004613021565b610a2d565b6103b46104b7366004612f5b565b610a4c565b6103b4610ac4565b6103b46104d2366004612f5b565b610ada565b61035961dead81565b60085460ff16610309565b6103b46104f9366004612f5b565b610bbb565b61039361050c366004612ddb565b6001600160a01b031660009081526020819052604090205490565b6103b4610535366004612f5b565b610c9c565b610393600e5481565b610457600581565b610359610559366004612f5b565b610e48565b61039361056c366004612ddb565b610e72565b610393610e90565b6103b4610f1f565b610589610f32565b6040516103159796959493929190613043565b6103096105aa366004612ffc565b610f78565b610326610fa3565b610393600c5481565b610393600081565b6103096105d6366004612daf565b610fb2565b6103b4610fc0565b6103936103e881565b61039361012c81565b610393600f5481565b6103b461060c3660046130dc565b611193565b6103b461061f366004612ddb565b6111ca565b6103b461063236600461311d565b611266565b6103b4610645366004612ffc565b6113a0565b610393610658366004613194565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6103b46113c5565b60006001600160e01b03198216637965db0b60e01b14806106bc57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600380546106d1906131c2565b80601f01602080910402602001604051908101604052809291908181526020018280546106fd906131c2565b801561074a5780601f1061071f5761010080835404028352916020019161074a565b820191906000526020600020905b81548152906001019060200180831161072d57829003601f168201915b5050505050905090565b6000336107628185856115ff565b5060019392505050565b60006107778161160c565b6001600160a01b03821661079e5760405163d92e233d60e01b815260040160405180910390fd5b601280546001600160a01b0319166001600160a01b0384169081179091556040519081527fc05fa79926cd5600b1cc95c8d9d908b7685d3f058c34ea011f8ae3490968ad30906020015b60405180910390a15050565b60006107ff8161160c565b61080882611616565b5050565b60003361081a8582856116ed565b610825858585611765565b60019150505b9392505050565b600061083c6117c4565b6108446117e8565b6001600160a01b038216610856573391505b60007f0000000000000000000000005ab3aa11a40eb34f1d2733f08596532871bd28e26001600160a01b0316639d63848a6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156108b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108da91906131fc565b905060005b60058110156109a35760008282600581106108fc576108fc61325a565b602002015190506001600160a01b038116158015906109315750600086836005811061092a5761092a61325a565b6020020151115b1561099a5761099a337f0000000000000000000000005ab3aa11a40eb34f1d2733f08596532871bd28e288856005811061096d5761096d61325a565b60200201518686600581106109845761098461325a565b60200201516001600160a01b0316929190611812565b506001016108df565b506109ae8484611879565b9150506106bc6001600a55565b6000828152600960205260409020600101546109d68161160c565b6109e08383611a48565b50505050565b60006109f0611adc565b905090565b6001600160a01b0381163314610a1e5760405163334bd91960e11b815260040160405180910390fd5b610a288282611c07565b505050565b600081610a42670de0b6b3a764000085613286565b61082b919061329d565b6000610a578161160c565b61012c821115610a7a57604051634d0419db60e11b815260040160405180910390fd5b600e5460408051918252602082018490527f4b9e3389cd92257d5111fc1cd43ed1fab1a6a790024c9cec0acfad96886eeee7910160405180910390a1610abe6113c5565b50600e55565b6000610acf8161160c565b610ad7611c74565b50565b6000610ae58161160c565b7f0000000000000000000000005ab3aa11a40eb34f1d2733f08596532871bd28e26001600160a01b03166322068b446040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6791906132bf565b8210610b8657604051634dd76a3360e01b815260040160405180910390fd5b600d8290556040518281527f1263b39fe165b48c204de3a3d752e6c7a129670cbe325757bdf76562664ef8d1906020016107e8565b6000610bc68161160c565b7f0000000000000000000000005ab3aa11a40eb34f1d2733f08596532871bd28e26001600160a01b03166322068b446040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4891906132bf565b8210610c6757604051634dd76a3360e01b815260040160405180910390fd5b600c8290556040518281527fdefccea87e6a6ac5c177a3e0318456cf032572ae03a96d9f44c4664a92999aef906020016107e8565b6000610ca78161160c565b7f0000000000000000000000005ab3aa11a40eb34f1d2733f08596532871bd28e26001600160a01b0316639d63848a6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610d05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2991906131fc565b50600582101580610dcc57506040516302210ae360e11b8152600481018390526000906001600160a01b037f0000000000000000000000005ab3aa11a40eb34f1d2733f08596532871bd28e2169063044215c690602401602060405180830381865afa158015610d9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dc191906132d8565b6001600160a01b0316145b15610df2576040516311fbc14560e11b8152600481018390526024015b60405180910390fd5b60115415610e1357604051635125b48560e01b815260040160405180910390fd5b600f8290556040518281527f734ef387ad5aca687c870a01e23a5e8dec0499f3d83912614a8bf06a539049ec906020016107e8565b600b8181548110610e5857600080fd5b6000918252602090912001546001600160a01b0316905081565b6001600160a01b0381166000908152600760205260408120546106bc565b60006109f07f0000000000000000000000005ab3aa11a40eb34f1d2733f08596532871bd28e26001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ef3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1791906132bf565b600254610a2d565b6000610f2a8161160c565b610ad7611cc6565b600060608060008060006060610f46611d03565b610f4e611d30565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b60009182526009602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600480546106d1906131c2565b600033610762818585611765565b610fc86117e8565b600f546040516302210ae360e11b81526000916001600160a01b037f0000000000000000000000005ab3aa11a40eb34f1d2733f08596532871bd28e2169163044215c69161101c9160040190815260200190565b602060405180830381865afa158015611039573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105d91906132d8565b90506001600160a01b038116611086576040516323f3a9b760e01b815260040160405180910390fd5b6011546040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa1580156110d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f491906132bf565b905060008183116111055782611107565b815b9050806011600082825461111b91906132f5565b9091555050801561114057601054611140906001600160a01b03868116911683611d5d565b604080516001600160a01b0386168152602081018390527f15a050976823afd82c639feaf4828ec3e700c0011eeb105b53f6f6f1c8fe7bc891015b60405180910390a1505050506111916001600a55565b565b61119b6117c4565b6111a36117e8565b6001600160a01b0381166111b45750335b6111c033848484611d8e565b610a286001600a55565b60006111d58161160c565b6001600160a01b0382166111fc5760405163d92e233d60e01b815260040160405180910390fd5b601054604080516001600160a01b03928316815291841660208301527f14ea07ac6324369bb3f11ebf255d527e848b1099791d10d5d82a5e4fc9288cbf910160405180910390a150601080546001600160a01b0319166001600160a01b0392909216919091179055565b8342111561128a5760405163313c898160e11b815260048101859052602401610de9565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98888886112d78c6001600160a01b0316600090815260076020526040902080546001810190915590565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e001604051602081830303815290604052805190602001209050600061133282611f1e565b9050600061134282878787611f4b565b9050896001600160a01b0316816001600160a01b031614611389576040516325c0072360e11b81526001600160a01b0380831660048301528b166024820152604401610de9565b6113948a8a8a6115ff565b50505050505050505050565b6000828152600960205260409020600101546113bb8161160c565b6109e08383611c07565b6113cd6117c4565b6113d56117e8565b6113de30611f79565b600f546040516302210ae360e11b81526000916001600160a01b037f0000000000000000000000005ab3aa11a40eb34f1d2733f08596532871bd28e2169163044215c6916114329160040190815260200190565b602060405180830381865afa15801561144f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061147391906132d8565b90506001600160a01b03811661149c576040516323f3a9b760e01b815260040160405180910390fd5b60006114a782611ffd565b9050806000036114b85750506115f5565b6114c0612c75565b8181600f54600581106114d5576114d561325a565b6020020152600f5461152b907f0000000000000000000000005ab3aa11a40eb34f1d2733f08596532871bd28e2908390600581106115155761151561325a565b60200201516001600160a01b0386169190611d5d565b600c54604051636766ea0f60e01b81526000916001600160a01b037f0000000000000000000000005ab3aa11a40eb34f1d2733f08596532871bd28e21691636766ea0f9161157f918690309060040161332b565b6020604051808303816000875af115801561159e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115c291906132bf565b90507f1a66222d9f5ba56428c4d1cd5c0127998bf6e8c1ab86f3027227b0f1319a6a028160405161117b91815260200190565b6111916001600a55565b610a288383836001612056565b610ad7813361212b565b805160000361163a5780604051630362609760e51b8152600401610de99190613358565b60005b815181101561169d5760006001600160a01b03168282815181106116635761166361325a565b60200260200101516001600160a01b0316036116955760405163af7bbf6960e01b815260048101829052602401610de9565b60010161163d565b5080516116b190600b906020840190612c93565b507f69be44b81d4f8b6cf7825a37f020b264079658f3d72856eeb0a0efed09c7d392600b6040516116e291906133e3565b60405180910390a150565b6001600160a01b0383811660009081526001602090815260408083209386168352929052205460001981146109e0578181101561175657604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610de9565b6109e084848484036000612056565b6001600160a01b03831661178f57604051634b637e8f60e11b815260006004820152602401610de9565b6001600160a01b0382166117b95760405163ec442f0560e01b815260006004820152602401610de9565b610a28838383612164565b60085460ff16156111915760405163d93c066560e01b815260040160405180910390fd5b6002600a540361180b57604051633ee5aeb560e01b815260040160405180910390fd5b6002600a55565b6040516001600160a01b0384811660248301528381166044830152606482018390526109e09186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b03838183161783525050505061228e565b60405163297a77b960e21b81523060048201526000907f0000000000000000000000005ab3aa11a40eb34f1d2733f08596532871bd28e26001600160a01b03169063a5e9dee490602401600060405180830381600087803b1580156118dd57600080fd5b505af11580156118f1573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600092507f0000000000000000000000005ab3aa11a40eb34f1d2733f08596532871bd28e26001600160a01b031691506370a0823190602401602060405180830381865afa15801561195c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061198091906132bf565b9050600061198e85306122f1565b9050600061199b60025490565b6000036119ba57509150816103e86119b561dead82612388565b6119dc565b82826119c560025490565b6119cf9190613286565b6119d9919061329d565b93505b6119ef856119ea83876132f5565b612388565b600c546040805184815260208101879052908101919091526001600160a01b038616907f91ede45f04a37a7c170f5c1207df3b6bc748dc1e04ad5e917a241d0f52feada39060600160405180910390a250505092915050565b6000611a548383610f78565b611ad45760008381526009602090815260408083206001600160a01b03861684529091529020805460ff19166001179055611a8c3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016106bc565b5060006106bc565b6000306001600160a01b037f000000000000000000000000d8132d8cfca9ed8c95e46cb59ae6e2c9963da61f16148015611b3557507f000000000000000000000000000000000000000000000000000000000000000146145b15611b5f57507fb360e5d1dfe98bc7a9c41af41ad45cb7c2eb0b13f2ece0d8fc9bd6e1d93de53b90565b6109f0604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f7a9ec6b723bfcc9a40da4f4cfd4ef64b41870d85a917b75f42078bfb4a97b255918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b6000611c138383610f78565b15611ad45760008381526009602090815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016106bc565b611c7c6123be565b6008805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b611cce6117c4565b6008805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611ca93390565b60606109f07f5a756e616d692045544820415053204c5000000000000000000000000000001160056123e1565b60606109f07f310000000000000000000000000000000000000000000000000000000000000160066123e1565b6040516001600160a01b03838116602483015260448201839052610a2891859182169063a9059cbb90606401611847565b60405163297a77b960e21b81523060048201527f0000000000000000000000005ab3aa11a40eb34f1d2733f08596532871bd28e26001600160a01b03169063a5e9dee490602401600060405180830381600087803b158015611def57600080fd5b505af1158015611e03573d6000803e3d6000fd5b505050506000611e1260025490565b6040516370a0823160e01b815230600482015285907f0000000000000000000000005ab3aa11a40eb34f1d2733f08596532871bd28e26001600160a01b0316906370a0823190602401602060405180830381865afa158015611e78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e9c91906132bf565b611ea69190613286565b611eb0919061329d565b9050611ebd81848461248c565b611ec78585612517565b600d546040805186815260208101849052908101919091526001600160a01b038616907f75e161b3e824b114fc1a33274bd7091918dd4e639cede50b78b15a4eea956a219060600160405180910390a25050505050565b60006106bc611f2b611adc565b8360405161190160f01b8152600281019290925260228201526042902090565b600080600080611f5d8888888861254d565b925092509250611f6d828261261c565b50909695505050505050565b604051632026ffa360e01b81526001600160a01b037f0000000000000000000000005ab3aa11a40eb34f1d2733f08596532871bd28e21690632026ffa390611fc8908490600b906004016133f6565b600060405180830381600087803b158015611fe257600080fd5b505af1158015611ff6573d6000803e3d6000fd5b5050505050565b601254601154600091829161201d916001600160a01b03169085906126d5565b9050600061202a8261289e565b9050806011600082825461203e919061341a565b9091555061204e905081836132f5565b949350505050565b6001600160a01b0384166120805760405163e602df0560e01b815260006004820152602401610de9565b6001600160a01b0383166120aa57604051634a1406b160e11b815260006004820152602401610de9565b6001600160a01b03808516600090815260016020908152604080832093871683529290522082905580156109e057826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161211d91815260200190565b60405180910390a350505050565b6121358282610f78565b6108085760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610de9565b6001600160a01b03831661218f578060026000828254612184919061341a565b909155506122019050565b6001600160a01b038316600090815260208190526040902054818110156121e25760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401610de9565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b03821661221d5760028054829003905561223c565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161228191815260200190565b60405180910390a3505050565b60006122a36001600160a01b038416836128bb565b905080516000141580156122c85750808060200190518101906122c6919061342d565b155b15610a2857604051635274afe760e01b81526001600160a01b0384166004820152602401610de9565b600c54604051636766ea0f60e01b81526000916001600160a01b037f0000000000000000000000005ab3aa11a40eb34f1d2733f08596532871bd28e21691636766ea0f91612345918790879060040161332b565b6020604051808303816000875af1158015612364573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082b91906132bf565b6001600160a01b0382166123b25760405163ec442f0560e01b815260006004820152602401610de9565b61080860008383612164565b60085460ff1661119157604051638dfc202b60e01b815260040160405180910390fd5b606060ff83146123fb576123f4836128c9565b90506106bc565b818054612407906131c2565b80601f0160208091040260200160405190810160405280929190818152602001828054612433906131c2565b80156124805780601f1061245557610100808354040283529160200191612480565b820191906000526020600020905b81548152906001019060200180831161246357829003601f168201915b505050505090506106bc565b600d54604051632d526f8f60e21b81526001600160a01b037f0000000000000000000000005ab3aa11a40eb34f1d2733f08596532871bd28e2169163b549be3c916124e0919087908790879060040161344f565b600060405180830381600087803b1580156124fa57600080fd5b505af115801561250e573d6000803e3d6000fd5b50505050505050565b6001600160a01b03821661254157604051634b637e8f60e11b815260006004820152602401610de9565b61080882600083612164565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156125885750600091506003905082612612565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa1580156125dc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661260857506000925060019150829050612612565b9250600091508190505b9450945094915050565b600082600381111561263057612630613485565b03612639575050565b600182600381111561264d5761264d613485565b0361266b5760405163f645eedf60e01b815260040160405180910390fd5b600282600381111561267f5761267f613485565b036126a05760405163fce698f760e01b815260048101829052602401610de9565b60038260038111156126b4576126b4613485565b03610808576040516335e2f38360e21b815260048101829052602401610de9565b60006001600160a01b0384166126fe576040516310994b1b60e01b815260040160405180910390fd5b600b5460008167ffffffffffffffff81111561271c5761271c612df8565b604051908082528060200260200182016040528015612745578160200160208202803683370190505b509050600160005b83811015612874576000600b828154811061276a5761276a61325a565b6000918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116915081906370a0823190602401602060405180830381865afa1580156127be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127e291906132bf565b8483815181106127f4576127f461325a565b602002602001018181525050806001600160a01b0316886001600160a01b031603612844578684838151811061282c5761282c61325a565b6020026020010181815161284091906132f5565b9052505b60008483815181106128585761285861325a565b6020026020010151111561286b57600092505b5060010161274d565b508015612887576000935050505061082b565b61289387848885612908565b979650505050505050565b60006103e8600e54836128b19190613286565b6106bc919061329d565b606061082b83836000612aa7565b606060006128d683612b44565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015612951573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061297591906132bf565b90506000805b86811015612a32578481815181106129955761299561325a565b602002602001015160000315612a2a57600b81815481106129b8576129b861325a565b6000918252602090912001546001600160a01b03908116925086168203612a05578481815181106129eb576129eb61325a565b6020026020010151836129fe91906132f5565b9250612a2a565b612a2a8883878481518110612a1c57612a1c61325a565b602002602001015189612b6c565b60010161297b565b506040516370a0823160e01b815230600482015282906001600160a01b038716906370a0823190602401602060405180830381865afa158015612a79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a9d91906132bf565b61289391906132f5565b606081471015612acc5760405163cd78605960e01b8152306004820152602401610de9565b600080856001600160a01b03168486604051612ae8919061349b565b60006040518083038185875af1925050503d8060008114612b25576040519150601f19603f3d011682016040523d82523d6000602084013e612b2a565b606091505b5091509150612b3a868383612bf0565b9695505050505050565b600060ff8216601f8111156106bc57604051632cd44ac360e21b815260040160405180910390fd5b612b806001600160a01b0384168584611d5d565b604051631099a22f60e21b81526001600160a01b03848116600483015260248201849052828116604483015285169063426688bc90606401600060405180830381600087803b158015612bd257600080fd5b505af1158015612be6573d6000803e3d6000fd5b5050505050505050565b606082612c0557612c0082612c4c565b61082b565b8151158015612c1c57506001600160a01b0384163b155b15612c4557604051639996b31560e01b81526001600160a01b0385166004820152602401610de9565b508061082b565b805115612c5c5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6040518060a001604052806005906020820280368337509192915050565b828054828255906000526020600020908101928215612ce8579160200282015b82811115612ce857825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612cb3565b50612cf4929150612cf8565b5090565b5b80821115612cf45760008155600101612cf9565b600060208284031215612d1f57600080fd5b81356001600160e01b03198116811461082b57600080fd5b60005b83811015612d52578181015183820152602001612d3a565b50506000910152565b60008151808452612d73816020860160208601612d37565b601f01601f19169290920160200192915050565b60208152600061082b6020830184612d5b565b6001600160a01b0381168114610ad757600080fd5b60008060408385031215612dc257600080fd5b8235612dcd81612d9a565b946020939093013593505050565b600060208284031215612ded57600080fd5b813561082b81612d9a565b634e487b7160e01b600052604160045260246000fd5b60405160a0810167ffffffffffffffff81118282101715612e3157612e31612df8565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612e6057612e60612df8565b604052919050565b60006020808385031215612e7b57600080fd5b823567ffffffffffffffff80821115612e9357600080fd5b818501915085601f830112612ea757600080fd5b813581811115612eb957612eb9612df8565b8060051b9150612eca848301612e37565b8181529183018401918481019088841115612ee457600080fd5b938501935b83851015612f0e5784359250612efe83612d9a565b8282529385019390850190612ee9565b98975050505050505050565b600080600060608486031215612f2f57600080fd5b8335612f3a81612d9a565b92506020840135612f4a81612d9a565b929592945050506040919091013590565b600060208284031215612f6d57600080fd5b5035919050565b600082601f830112612f8557600080fd5b612f8d612e0e565b8060a0840185811115612f9f57600080fd5b845b81811015612fb9578035845260209384019301612fa1565b509095945050505050565b60008060c08385031215612fd757600080fd5b612fe18484612f74565b915060a0830135612ff181612d9a565b809150509250929050565b6000806040838503121561300f57600080fd5b823591506020830135612ff181612d9a565b6000806040838503121561303457600080fd5b50508035926020909101359150565b60ff60f81b881681526000602060e0602084015261306460e084018a612d5b565b8381036040850152613076818a612d5b565b606085018990526001600160a01b038816608086015260a0850187905284810360c08601528551808252602080880193509091019060005b818110156130ca578351835292840192918401916001016130ae565b50909c9b505050505050505050505050565b600080600060e084860312156130f157600080fd5b833592506131028560208601612f74565b915060c084013561311281612d9a565b809150509250925092565b600080600080600080600060e0888a03121561313857600080fd5b873561314381612d9a565b9650602088013561315381612d9a565b95506040880135945060608801359350608088013560ff8116811461317757600080fd5b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156131a757600080fd5b82356131b281612d9a565b91506020830135612ff181612d9a565b600181811c908216806131d657607f821691505b6020821081036131f657634e487b7160e01b600052602260045260246000fd5b50919050565b600060a0828403121561320e57600080fd5b82601f83011261321d57600080fd5b613225612e0e565b8060a084018581111561323757600080fd5b845b81811015612fb957805161324c81612d9a565b845260209384019301613239565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176106bc576106bc613270565b6000826132ba57634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156132d157600080fd5b5051919050565b6000602082840312156132ea57600080fd5b815161082b81612d9a565b818103818111156106bc576106bc613270565b8060005b60058110156109e057815184526020938401939091019060010161330c565b83815260e0810161333f6020830185613308565b6001600160a01b039290921660c0919091015292915050565b6020808252825182820181905260009190848201906040850190845b81811015611f6d5783516001600160a01b031683529284019291840191600101613374565b600081548084526020808501945083600052602060002060005b838110156133d85781546001600160a01b0316875295820195600191820191016133b3565b509495945050505050565b60208152600061082b6020830184613399565b6001600160a01b038316815260406020820181905260009061204e90830184613399565b808201808211156106bc576106bc613270565b60006020828403121561343f57600080fd5b8151801515811461082b57600080fd5b84815260208101849052610100810161346b6040830185613308565b6001600160a01b039290921660e091909101529392505050565b634e487b7160e01b600052602160045260246000fd5b600082516134ad818460208701612d37565b919091019291505056fea26469706673582212208ab323e6d98c4b113e1d876833ec80d5acf1096320e6f23d4cff53914f6bb40064736f6c63430008170033

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

0000000000000000000000005ab3aa11a40eb34f1d2733f08596532871bd28e2

-----Decoded View---------------
Arg [0] : pool (address): 0x5Ab3aa11a40eB34f1d2733f08596532871bd28e2

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000005ab3aa11a40eb34f1d2733f08596532871bd28e2


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

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