{"constructor_args":"0x0000000000000000000000002d83f5bfc83cf0b09b8884101c015fa9c74c32f30000000000000000000000006cd42e64630d25406bfc51cca65cffa7cd495fb1","is_partially_verified":false,"is_changed_bytecode":false,"abi":[{"inputs":[{"internalType":"address","name":"_lpToken","type":"address"},{"internalType":"address","name":"_oracleConfigurator","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":[],"name":"ArrayIndexOutOfBounds","type":"error"},{"inputs":[],"name":"InsufficientOutputAmount","type":"error"},{"inputs":[],"name":"InvalidArrayLength","type":"error"},{"inputs":[],"name":"InvalidDecimals","type":"error"},{"inputs":[],"name":"InvalidFeeRate","type":"error"},{"inputs":[],"name":"InvalidOracle","type":"error"},{"inputs":[],"name":"InvalidReceipt","type":"error"},{"inputs":[],"name":"InvalidToken","type":"error"},{"inputs":[],"name":"NoFeeRecipient","type":"error"},{"inputs":[],"name":"NonEmptySupportedToken","type":"error"},{"inputs":[],"name":"NotWhitelisted","type":"error"},{"inputs":[],"name":"Paused","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[],"name":"TokenAlreadyAdd","type":"error"},{"inputs":[],"name":"WrongRequester","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"inputs":[],"name":"ZeroAmount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lpAmount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"address[]","name":"tokens","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"tokenAmounts","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"lpAmount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"FeeCharged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"curator","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RepayToVault","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":"rate","type":"uint256"}],"name":"SetDepositFeeRate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"bool","name":"paused","type":"bool"}],"name":"SetDepositPause","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"recipient","type":"address"}],"name":"SetFeeRecipient","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"bool","name":"allowed","type":"bool"}],"name":"SetWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"bool","name":"whitelistMode","type":"bool"}],"name":"SetWhitelistMode","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"rate","type":"uint256"}],"name":"SetWithdrawFeeRate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"bool","name":"paused","type":"bool"}],"name":"SetWithdrawPause","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"}],"name":"TokenAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"}],"name":"TokenRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"curator","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawFromVault","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"requester","type":"address"},{"indexed":true,"internalType":"address","name":"requestToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lpAmount","type":"uint256"}],"name":"WithdrawalCancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"requester","type":"address"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"address","name":"requestToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"lpAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"finalizedAmount","type":"uint256"}],"name":"WithdrawalProcessed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"requester","type":"address"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"address","name":"requestToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lpAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"minReceiveAmount","type":"uint256"}],"name":"WithdrawalRequested","type":"event"},{"inputs":[],"name":"ASSETS_MANAGEMENT_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"D18","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"D2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"D4","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEE_SETTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MARKET_MAKER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSE_OPERATION_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SUPPORTED_TOKEN_OPERATION_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WHITELIST_OPERATION_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WITHDRAWAL_PROCESS_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"addUnderlyingToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"cancelWithdrawal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_minLpAmount","type":"uint256"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"mintAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositFeeRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_tokens","type":"address[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"},{"internalType":"uint256","name":"_minLpAmount","type":"uint256"}],"name":"depositMultiple","outputs":[{"internalType":"uint256","name":"totalMintAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"depositPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"depositWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRequestWithdrawals","outputs":[{"components":[{"internalType":"address","name":"requester","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"requestToken","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"lpAmount","type":"uint256"},{"internalType":"uint256","name":"minReceiveAmount","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"internalType":"struct AssetVault.WithdrawalRequest[]","name":"allWithdrawalRequests","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRequestsLength","outputs":[{"internalType":"uint256","name":"length","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":[],"name":"getUnderlyings","outputs":[{"internalType":"address[]","name":"underlyings","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"idToWithdrawalRequest","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isUnderlyingToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpToken","outputs":[{"internalType":"contract Token","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oracleConfigurator","outputs":[{"internalType":"contract OracleConfigurator","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"processAllWithdrawal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"processWithdrawal","outputs":[{"internalType":"address","name":"requestToken","type":"address"},{"internalType":"uint256","name":"finalizedAmount","type":"uint256"},{"internalType":"uint256","name":"lpAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"removeUnderlyingToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_tokens","type":"address[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"}],"name":"repayToVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_requestToken","type":"address"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_lpAmount","type":"uint256"},{"internalType":"uint256","name":"_minReceiveAmount","type":"uint256"}],"name":"requestWithdraw","outputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"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":[{"internalType":"uint256","name":"_rate","type":"uint256"}],"name":"setDepositFeeRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"bool","name":"_pause","type":"bool"}],"name":"setDepositPause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_minter","type":"address"},{"internalType":"bool","name":"_allowed","type":"bool"}],"name":"setWhitelistAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"bool","name":"_applyWhitelist","type":"bool"}],"name":"setWhitelistMode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rate","type":"uint256"}],"name":"setWithdrawFeeRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"bool","name":"_pause","type":"bool"}],"name":"setWithdrawPause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokenDecimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"underlyingTokens","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistMode","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawFeeRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_tokens","type":"address[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"}],"name":"withdrawFromVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"withdrawPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawalCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"withdrawalRequests","outputs":[{"internalType":"address","name":"requester","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"requestToken","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"lpAmount","type":"uint256"},{"internalType":"uint256","name":"minReceiveAmount","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"stateMutability":"view","type":"function"}],"conflicting_implementations":null,"certified":false,"additional_sources":[{"file_path":"lib/openzeppelin-contracts/contracts/access/AccessControl.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol)\n\npragma solidity ^0.8.20;\n\nimport {IAccessControl} from \"./IAccessControl.sol\";\nimport {Context} from \"../utils/Context.sol\";\nimport {ERC165} from \"../utils/introspection/ERC165.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```solidity\n * bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```solidity\n * function foo() public {\n *     require(hasRole(MY_ROLE, msg.sender));\n *     ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}\n * to enforce additional security measures for this role.\n */\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\n    struct RoleData {\n        mapping(address account => bool) hasRole;\n        bytes32 adminRole;\n    }\n\n    mapping(bytes32 role => RoleData) private _roles;\n\n    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n\n    /**\n     * @dev Modifier that checks that an account has a specific role. Reverts\n     * with an {AccessControlUnauthorizedAccount} error including the required role.\n     */\n    modifier onlyRole(bytes32 role) {\n        _checkRole(role);\n        _;\n    }\n\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @dev Returns `true` if `account` has been granted `role`.\n     */\n    function hasRole(bytes32 role, address account) public view virtual returns (bool) {\n        return _roles[role].hasRole[account];\n    }\n\n    /**\n     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`\n     * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.\n     */\n    function _checkRole(bytes32 role) internal view virtual {\n        _checkRole(role, _msgSender());\n    }\n\n    /**\n     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`\n     * is missing `role`.\n     */\n    function _checkRole(bytes32 role, address account) internal view virtual {\n        if (!hasRole(role, account)) {\n            revert AccessControlUnauthorizedAccount(account, role);\n        }\n    }\n\n    /**\n     * @dev Returns the admin role that controls `role`. See {grantRole} and\n     * {revokeRole}.\n     *\n     * To change a role's admin, use {_setRoleAdmin}.\n     */\n    function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) {\n        return _roles[role].adminRole;\n    }\n\n    /**\n     * @dev Grants `role` to `account`.\n     *\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     *\n     * May emit a {RoleGranted} event.\n     */\n    function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {\n        _grantRole(role, account);\n    }\n\n    /**\n     * @dev Revokes `role` from `account`.\n     *\n     * If `account` had been granted `role`, emits a {RoleRevoked} event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     *\n     * May emit a {RoleRevoked} event.\n     */\n    function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {\n        _revokeRole(role, account);\n    }\n\n    /**\n     * @dev Revokes `role` from the calling account.\n     *\n     * Roles are often managed via {grantRole} and {revokeRole}: this function's\n     * purpose is to provide a mechanism for accounts to lose their privileges\n     * if they are compromised (such as when a trusted device is misplaced).\n     *\n     * If the calling account had been revoked `role`, emits a {RoleRevoked}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must be `callerConfirmation`.\n     *\n     * May emit a {RoleRevoked} event.\n     */\n    function renounceRole(bytes32 role, address callerConfirmation) public virtual {\n        if (callerConfirmation != _msgSender()) {\n            revert AccessControlBadConfirmation();\n        }\n\n        _revokeRole(role, callerConfirmation);\n    }\n\n    /**\n     * @dev Sets `adminRole` as ``role``'s admin role.\n     *\n     * Emits a {RoleAdminChanged} event.\n     */\n    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\n        bytes32 previousAdminRole = getRoleAdmin(role);\n        _roles[role].adminRole = adminRole;\n        emit RoleAdminChanged(role, previousAdminRole, adminRole);\n    }\n\n    /**\n     * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.\n     *\n     * Internal function without access restriction.\n     *\n     * May emit a {RoleGranted} event.\n     */\n    function _grantRole(bytes32 role, address account) internal virtual returns (bool) {\n        if (!hasRole(role, account)) {\n            _roles[role].hasRole[account] = true;\n            emit RoleGranted(role, account, _msgSender());\n            return true;\n        } else {\n            return false;\n        }\n    }\n\n    /**\n     * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked.\n     *\n     * Internal function without access restriction.\n     *\n     * May emit a {RoleRevoked} event.\n     */\n    function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {\n        if (hasRole(role, account)) {\n            _roles[role].hasRole[account] = false;\n            emit RoleRevoked(role, account, _msgSender());\n            return true;\n        } else {\n            return false;\n        }\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControl {\n    /**\n     * @dev The `account` is missing a role.\n     */\n    error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);\n\n    /**\n     * @dev The caller of a function is not the expected one.\n     *\n     * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.\n     */\n    error AccessControlBadConfirmation();\n\n    /**\n     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n     *\n     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n     * {RoleAdminChanged} not being emitted signaling this.\n     */\n    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n    /**\n     * @dev Emitted when `account` is granted `role`.\n     *\n     * `sender` is the account that originated the contract call, an admin role\n     * bearer except when using {AccessControl-_setupRole}.\n     */\n    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n    /**\n     * @dev Emitted when `account` is revoked `role`.\n     *\n     * `sender` is the account that originated the contract call:\n     *   - if using `revokeRole`, it is the admin role bearer\n     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)\n     */\n    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n    /**\n     * @dev Returns `true` if `account` has been granted `role`.\n     */\n    function hasRole(bytes32 role, address account) external view returns (bool);\n\n    /**\n     * @dev Returns the admin role that controls `role`. See {grantRole} and\n     * {revokeRole}.\n     *\n     * To change a role's admin, use {AccessControl-_setRoleAdmin}.\n     */\n    function getRoleAdmin(bytes32 role) external view returns (bytes32);\n\n    /**\n     * @dev Grants `role` to `account`.\n     *\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     */\n    function grantRole(bytes32 role, address account) external;\n\n    /**\n     * @dev Revokes `role` from `account`.\n     *\n     * If `account` had been granted `role`, emits a {RoleRevoked} event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     */\n    function revokeRole(bytes32 role, address account) external;\n\n    /**\n     * @dev Revokes `role` from the calling account.\n     *\n     * Roles are often managed via {grantRole} and {revokeRole}: this function's\n     * purpose is to provide a mechanism for accounts to lose their privileges\n     * if they are compromised (such as when a trusted device is misplaced).\n     *\n     * If the calling account had been granted `role`, emits a {RoleRevoked}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must be `callerConfirmation`.\n     */\n    function renounceRole(bytes32 role, address callerConfirmation) external;\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC6093.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard ERC20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.\n */\ninterface IERC20Errors {\n    /**\n     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     * @param balance Current balance for the interacting account.\n     * @param needed Minimum amount required to perform a transfer.\n     */\n    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n    /**\n     * @dev Indicates a failure with the token `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     */\n    error ERC20InvalidSender(address sender);\n\n    /**\n     * @dev Indicates a failure with the token `receiver`. Used in transfers.\n     * @param receiver Address to which tokens are being transferred.\n     */\n    error ERC20InvalidReceiver(address receiver);\n\n    /**\n     * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n     * @param spender Address that may be allowed to operate on tokens without being their owner.\n     * @param allowance Amount of tokens a `spender` is allowed to operate with.\n     * @param needed Minimum amount required to perform a transfer.\n     */\n    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n    /**\n     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n     * @param approver Address initiating an approval operation.\n     */\n    error ERC20InvalidApprover(address approver);\n\n    /**\n     * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n     * @param spender Address that may be allowed to operate on tokens without being their owner.\n     */\n    error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.\n */\ninterface IERC721Errors {\n    /**\n     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.\n     * Used in balance queries.\n     * @param owner Address of the current owner of a token.\n     */\n    error ERC721InvalidOwner(address owner);\n\n    /**\n     * @dev Indicates a `tokenId` whose `owner` is the zero address.\n     * @param tokenId Identifier number of a token.\n     */\n    error ERC721NonexistentToken(uint256 tokenId);\n\n    /**\n     * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     * @param tokenId Identifier number of a token.\n     * @param owner Address of the current owner of a token.\n     */\n    error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n    /**\n     * @dev Indicates a failure with the token `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     */\n    error ERC721InvalidSender(address sender);\n\n    /**\n     * @dev Indicates a failure with the token `receiver`. Used in transfers.\n     * @param receiver Address to which tokens are being transferred.\n     */\n    error ERC721InvalidReceiver(address receiver);\n\n    /**\n     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n     * @param operator Address that may be allowed to operate on tokens without being their owner.\n     * @param tokenId Identifier number of a token.\n     */\n    error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n    /**\n     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n     * @param approver Address initiating an approval operation.\n     */\n    error ERC721InvalidApprover(address approver);\n\n    /**\n     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n     * @param operator Address that may be allowed to operate on tokens without being their owner.\n     */\n    error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.\n */\ninterface IERC1155Errors {\n    /**\n     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     * @param balance Current balance for the interacting account.\n     * @param needed Minimum amount required to perform a transfer.\n     * @param tokenId Identifier number of a token.\n     */\n    error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n    /**\n     * @dev Indicates a failure with the token `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     */\n    error ERC1155InvalidSender(address sender);\n\n    /**\n     * @dev Indicates a failure with the token `receiver`. Used in transfers.\n     * @param receiver Address to which tokens are being transferred.\n     */\n    error ERC1155InvalidReceiver(address receiver);\n\n    /**\n     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n     * @param operator Address that may be allowed to operate on tokens without being their owner.\n     * @param owner Address of the current owner of a token.\n     */\n    error ERC1155MissingApprovalForAll(address operator, address owner);\n\n    /**\n     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n     * @param approver Address initiating an approval operation.\n     */\n    error ERC1155InvalidApprover(address approver);\n\n    /**\n     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n     * @param operator Address that may be allowed to operate on tokens without being their owner.\n     */\n    error ERC1155InvalidOperator(address operator);\n\n    /**\n     * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n     * Used in batch transfers.\n     * @param idsLength Length of the array of token identifiers\n     * @param valuesLength Length of the array of token amounts\n     */\n    error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC20Metadata} from \"./extensions/IERC20Metadata.sol\";\nimport {Context} from \"../../utils/Context.sol\";\nimport {IERC20Errors} from \"../../interfaces/draft-IERC6093.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n */\nabstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\n    mapping(address account => uint256) private _balances;\n\n    mapping(address account => mapping(address spender => uint256)) private _allowances;\n\n    uint256 private _totalSupply;\n\n    string private _name;\n    string private _symbol;\n\n    /**\n     * @dev Sets the values for {name} and {symbol}.\n     *\n     * All two of these values are immutable: they can only be set once during\n     * construction.\n     */\n    constructor(string memory name_, string memory symbol_) {\n        _name = name_;\n        _symbol = symbol_;\n    }\n\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() public view virtual returns (string memory) {\n        return _name;\n    }\n\n    /**\n     * @dev Returns the symbol of the token, usually a shorter version of the\n     * name.\n     */\n    function symbol() public view virtual returns (string memory) {\n        return _symbol;\n    }\n\n    /**\n     * @dev Returns the number of decimals used to get its user representation.\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\n     * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n     *\n     * Tokens usually opt for a value of 18, imitating the relationship between\n     * Ether and Wei. This is the default value returned by this function, unless\n     * it's overridden.\n     *\n     * NOTE: This information is only used for _display_ purposes: it in\n     * no way affects any of the arithmetic of the contract, including\n     * {IERC20-balanceOf} and {IERC20-transfer}.\n     */\n    function decimals() public view virtual returns (uint8) {\n        return 18;\n    }\n\n    /**\n     * @dev See {IERC20-totalSupply}.\n     */\n    function totalSupply() public view virtual returns (uint256) {\n        return _totalSupply;\n    }\n\n    /**\n     * @dev See {IERC20-balanceOf}.\n     */\n    function balanceOf(address account) public view virtual returns (uint256) {\n        return _balances[account];\n    }\n\n    /**\n     * @dev See {IERC20-transfer}.\n     *\n     * Requirements:\n     *\n     * - `to` cannot be the zero address.\n     * - the caller must have a balance of at least `value`.\n     */\n    function transfer(address to, uint256 value) public virtual returns (bool) {\n        address owner = _msgSender();\n        _transfer(owner, to, value);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-allowance}.\n     */\n    function allowance(address owner, address spender) public view virtual returns (uint256) {\n        return _allowances[owner][spender];\n    }\n\n    /**\n     * @dev See {IERC20-approve}.\n     *\n     * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n     * `transferFrom`. This is semantically equivalent to an infinite approval.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     */\n    function approve(address spender, uint256 value) public virtual returns (bool) {\n        address owner = _msgSender();\n        _approve(owner, spender, value);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-transferFrom}.\n     *\n     * Emits an {Approval} event indicating the updated allowance. This is not\n     * required by the EIP. See the note at the beginning of {ERC20}.\n     *\n     * NOTE: Does not update the allowance if the current allowance\n     * is the maximum `uint256`.\n     *\n     * Requirements:\n     *\n     * - `from` and `to` cannot be the zero address.\n     * - `from` must have a balance of at least `value`.\n     * - the caller must have allowance for ``from``'s tokens of at least\n     * `value`.\n     */\n    function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\n        address spender = _msgSender();\n        _spendAllowance(from, spender, value);\n        _transfer(from, to, value);\n        return true;\n    }\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to`.\n     *\n     * This internal function is equivalent to {transfer}, and can be used to\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\n     *\n     * Emits a {Transfer} event.\n     *\n     * NOTE: This function is not virtual, {_update} should be overridden instead.\n     */\n    function _transfer(address from, address to, uint256 value) internal {\n        if (from == address(0)) {\n            revert ERC20InvalidSender(address(0));\n        }\n        if (to == address(0)) {\n            revert ERC20InvalidReceiver(address(0));\n        }\n        _update(from, to, value);\n    }\n\n    /**\n     * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n     * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n     * this function.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _update(address from, address to, uint256 value) internal virtual {\n        if (from == address(0)) {\n            // Overflow check required: The rest of the code assumes that totalSupply never overflows\n            _totalSupply += value;\n        } else {\n            uint256 fromBalance = _balances[from];\n            if (fromBalance < value) {\n                revert ERC20InsufficientBalance(from, fromBalance, value);\n            }\n            unchecked {\n                // Overflow not possible: value <= fromBalance <= totalSupply.\n                _balances[from] = fromBalance - value;\n            }\n        }\n\n        if (to == address(0)) {\n            unchecked {\n                // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\n                _totalSupply -= value;\n            }\n        } else {\n            unchecked {\n                // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\n                _balances[to] += value;\n            }\n        }\n\n        emit Transfer(from, to, value);\n    }\n\n    /**\n     * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n     * Relies on the `_update` mechanism\n     *\n     * Emits a {Transfer} event with `from` set to the zero address.\n     *\n     * NOTE: This function is not virtual, {_update} should be overridden instead.\n     */\n    function _mint(address account, uint256 value) internal {\n        if (account == address(0)) {\n            revert ERC20InvalidReceiver(address(0));\n        }\n        _update(address(0), account, value);\n    }\n\n    /**\n     * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n     * Relies on the `_update` mechanism.\n     *\n     * Emits a {Transfer} event with `to` set to the zero address.\n     *\n     * NOTE: This function is not virtual, {_update} should be overridden instead\n     */\n    function _burn(address account, uint256 value) internal {\n        if (account == address(0)) {\n            revert ERC20InvalidSender(address(0));\n        }\n        _update(account, address(0), value);\n    }\n\n    /**\n     * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.\n     *\n     * This internal function is equivalent to `approve`, and can be used to\n     * e.g. set automatic allowances for certain subsystems, etc.\n     *\n     * Emits an {Approval} event.\n     *\n     * Requirements:\n     *\n     * - `owner` cannot be the zero address.\n     * - `spender` cannot be the zero address.\n     *\n     * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n     */\n    function _approve(address owner, address spender, uint256 value) internal {\n        _approve(owner, spender, value, true);\n    }\n\n    /**\n     * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n     *\n     * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n     * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\n     * `Approval` event during `transferFrom` operations.\n     *\n     * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\n     * true using the following override:\n     * ```\n     * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n     *     super._approve(owner, spender, value, true);\n     * }\n     * ```\n     *\n     * Requirements are the same as {_approve}.\n     */\n    function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\n        if (owner == address(0)) {\n            revert ERC20InvalidApprover(address(0));\n        }\n        if (spender == address(0)) {\n            revert ERC20InvalidSpender(address(0));\n        }\n        _allowances[owner][spender] = value;\n        if (emitEvent) {\n            emit Approval(owner, spender, value);\n        }\n    }\n\n    /**\n     * @dev Updates `owner` s allowance for `spender` based on spent `value`.\n     *\n     * Does not update the allowance value in case of infinite allowance.\n     * Revert if not enough allowance is available.\n     *\n     * Does not emit an {Approval} event.\n     */\n    function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\n        uint256 currentAllowance = allowance(owner, spender);\n        if (currentAllowance != type(uint256).max) {\n            if (currentAllowance < value) {\n                revert ERC20InsufficientAllowance(spender, currentAllowance, value);\n            }\n            unchecked {\n                _approve(owner, spender, currentAllowance - value, false);\n            }\n        }\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n\n    /**\n     * @dev Returns the value of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the value of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the\n     * allowance mechanism. `value` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @dev Returns the symbol of the token.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @dev Returns the decimals places of the token.\n     */\n    function decimals() external view returns (uint8);\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/utils/Context.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n\n    function _contextSuffixLength() internal view virtual returns (uint256) {\n        return 0;\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/utils/ReentrancyGuard.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuard {\n    // Booleans are more expensive than uint256 or any type that takes up a full\n    // word because each write operation emits an extra SLOAD to first read the\n    // slot's contents, replace the bits taken up by the boolean, and then write\n    // back. This is the compiler's defense against contract upgrades and\n    // pointer aliasing, and it cannot be disabled.\n\n    // The values being non-zero value makes deployment a bit more expensive,\n    // but in exchange the refund on every call to nonReentrant will be lower in\n    // amount. Since refunds are capped to a percentage of the total\n    // transaction's gas, it is best to keep them low in cases like this one, to\n    // increase the likelihood of the full refund coming into effect.\n    uint256 private constant NOT_ENTERED = 1;\n    uint256 private constant ENTERED = 2;\n\n    uint256 private _status;\n\n    /**\n     * @dev Unauthorized reentrant call.\n     */\n    error ReentrancyGuardReentrantCall();\n\n    constructor() {\n        _status = NOT_ENTERED;\n    }\n\n    /**\n     * @dev Prevents a contract from calling itself, directly or indirectly.\n     * Calling a `nonReentrant` function from another `nonReentrant`\n     * function is not supported. It is possible to prevent this from happening\n     * by making the `nonReentrant` function external, and making it call a\n     * `private` function that does the actual work.\n     */\n    modifier nonReentrant() {\n        _nonReentrantBefore();\n        _;\n        _nonReentrantAfter();\n    }\n\n    function _nonReentrantBefore() private {\n        // On the first call to nonReentrant, _status will be NOT_ENTERED\n        if (_status == ENTERED) {\n            revert ReentrancyGuardReentrantCall();\n        }\n\n        // Any calls to nonReentrant after this point will fail\n        _status = ENTERED;\n    }\n\n    function _nonReentrantAfter() private {\n        // By storing the original value once again, a refund is triggered (see\n        // https://eips.ethereum.org/EIPS/eip-2200)\n        _status = NOT_ENTERED;\n    }\n\n    /**\n     * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n     * `nonReentrant` function in the call stack.\n     */\n    function _reentrancyGuardEntered() internal view returns (bool) {\n        return _status == ENTERED;\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n */\nabstract contract ERC165 is IERC165 {\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n        return interfaceId == type(IERC165).interfaceId;\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n    /**\n     * @dev Returns true if this contract implements the interface defined by\n     * `interfaceId`. See the corresponding\n     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n     * to learn more about how these ids are created.\n     *\n     * This function call must use less than 30 000 gas.\n     */\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"},{"file_path":"lib/v3-periphery/contracts/libraries/TransferHelper.sol","source_code":"// SPDX-License-Identifier: GPL-2.0-or-later\npragma solidity >=0.6.0;\n\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\n\nlibrary TransferHelper {\n    /// @notice Transfers tokens from the targeted address to the given destination\n    /// @notice Errors with 'STF' if transfer fails\n    /// @param token The contract address of the token to be transferred\n    /// @param from The originating address from which the tokens will be transferred\n    /// @param to The destination address of the transfer\n    /// @param value The amount to be transferred\n    function safeTransferFrom(\n        address token,\n        address from,\n        address to,\n        uint256 value\n    ) internal {\n        (bool success, bytes memory data) =\n            token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, value));\n        require(success && (data.length == 0 || abi.decode(data, (bool))), 'STF');\n    }\n\n    /// @notice Transfers tokens from msg.sender to a recipient\n    /// @dev Errors with ST if transfer fails\n    /// @param token The contract address of the token which will be transferred\n    /// @param to The recipient of the transfer\n    /// @param value The value of the transfer\n    function safeTransfer(\n        address token,\n        address to,\n        uint256 value\n    ) internal {\n        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, value));\n        require(success && (data.length == 0 || abi.decode(data, (bool))), 'ST');\n    }\n\n    /// @notice Approves the stipulated contract to spend the given allowance in the given token\n    /// @dev Errors with 'SA' if transfer fails\n    /// @param token The contract address of the token to be approved\n    /// @param to The target of the approval\n    /// @param value The amount of the given token the target will be allowed to spend\n    function safeApprove(\n        address token,\n        address to,\n        uint256 value\n    ) internal {\n        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.approve.selector, to, value));\n        require(success && (data.length == 0 || abi.decode(data, (bool))), 'SA');\n    }\n\n    /// @notice Transfers ETH to the recipient address\n    /// @dev Fails with `STE`\n    /// @param to The destination of the transfer\n    /// @param value The value to be transferred\n    function safeTransferETH(address to, uint256 value) internal {\n        (bool success, ) = to.call{value: value}(new bytes(0));\n        require(success, 'STE');\n    }\n}\n"},{"file_path":"src/oracle/Oracle.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\npragma solidity 0.8.26;\n\nabstract contract Oracle {\n    address public immutable token;\n\n    string public name;\n\n    constructor(address _token, string memory _name) {\n        token = _token;\n        name = _name;\n    }\n\n    function getPrice() external view virtual returns (uint256 price) {}\n}\n"},{"file_path":"src/oracle/OracleConfigurator.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\npragma solidity 0.8.26;\n\nimport {AccessControl} from \"@openzeppelin/contracts/access/AccessControl.sol\";\n\nimport {Oracle} from \"./Oracle.sol\";\nimport \"../utils/Errors.sol\";\n\ncontract OracleConfigurator is AccessControl {\n    bytes32 public constant ORACLE_MANAGER_ROLE =\n        keccak256(\"ORACLE_MANAGER_ROLE\");\n\n    mapping(address => address) public oracles;\n\n    event OracleUpdated(address oldOracle, address newOracle);\n\n    constructor() {\n        _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\n    }\n\n    function updateOracle(\n        address _token,\n        address _oracle\n    ) external onlyRole(ORACLE_MANAGER_ROLE) {\n        if (_token == address(0)) revert InvalidToken();\n        if (_oracle == address(0)) revert InvalidOracle();\n\n        emit OracleUpdated(oracles[_token], _oracle);\n\n        oracles[_token] = _oracle;\n    }\n\n    function getPrice(address _token) external view returns (uint256 price) {\n        address oracle = oracles[_token];\n\n        if (_token == address(0) || oracle == address(0)) revert InvalidToken();\n\n        price = Oracle(oracle).getPrice();\n    }\n}\n"},{"file_path":"src/token/Token.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\npragma solidity 0.8.26;\n\nimport {ERC20} from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport {AccessControl} from \"@openzeppelin/contracts/access/AccessControl.sol\";\n\nimport \"../utils/Errors.sol\";\n\ncontract Token is ERC20, AccessControl {\n    bytes32 public constant MINTER_ROLE = keccak256(\"MINTER_ROLE\");\n    bytes32 public constant BURNER_ROLE = keccak256(\"BURNER_ROLE\");\n\n    constructor(\n        string memory _name,\n        string memory _symbol\n    ) ERC20(_name, _symbol) {\n        _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\n    }\n\n    function mint(address _to, uint256 _amount) external onlyRole(MINTER_ROLE) {\n        _mint(_to, _amount);\n    }\n\n    function burn(\n        address _from,\n        uint256 _amount\n    ) external onlyRole(BURNER_ROLE) {\n        _burn(_from, _amount);\n    }\n}\n"},{"file_path":"src/utils/Errors.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\npragma solidity 0.8.26;\n\nerror InvalidToken();\n\nerror TokenAlreadyAdd();\n\nerror InvalidOracle();\n\nerror NonEmptySupportedToken();\n\nerror InvalidDecimals();\n\nerror Paused();\n\nerror NotWhitelisted();\n\nerror NoFeeRecipient();\n\nerror InvalidFeeRate();\n\nerror InsufficientOutputAmount();\n\nerror ZeroAmount();\n\nerror ZeroAddress();\n\nerror InvalidArrayLength();\n\nerror ArrayIndexOutOfBounds();\n\nerror WrongRequester();\n\nerror InsufficientFunds();\n\nerror InvalidAmount();\n\nerror InvalidRequester();\n\nerror InvalidReceipt();\n\nerror NotZeroAddress();\n\nerror InValidCaller();\n\nerror WithdrawalJustUpdated();\n"}],"is_verified_via_sourcify":false,"can_be_visualized_via_sol2uml":true,"evm_version":"paris","language":"solidity","is_verified_via_eth_bytecode_db":true,"is_fully_verified":true,"license_type":"none","is_blueprint":false,"name":"AssetVault","creation_bytecode":"0x60c060405234801561001057600080fd5b50604051613e16380380613e1683398101604081905261002f916101af565b6001805561003e6000336100e7565b506001600160a01b03828116608081905290821660a081905260405163addd509960e01b8152600481019290925260009163addd509990602401602060405180830381865afa158015610095573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100b991906101e2565b6001600160a01b0316036100e057604051639589a27d60e01b815260040160405180910390fd5b5050610204565b6000828152602081815260408083206001600160a01b038516845290915281205460ff16610189576000838152602081815260408083206001600160a01b03861684529091529020805460ff191660011790556101413390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161018d565b5060005b92915050565b80516001600160a01b03811681146101aa57600080fd5b919050565b600080604083850312156101c257600080fd5b6101cb83610193565b91506101d960208401610193565b90509250929050565b6000602082840312156101f457600080fd5b6101fd82610193565b9392505050565b60805160a051613b536102c36000396000818161057c01528181610aae01528181610b4001528181611611015281816117f901528181611df601528181612237015281816125610152612fd601526000818161052e01528181610a8301528181610c4e01528181610d36015281816111db0152818161134f015281816115e60152818161192401528181611a0c01528181611dcb0152818161218901528181612536015281816130b30152818161312a015261320d0152613b536000f3fe608060405234801561001057600080fd5b506004361061030c5760003560e01c80638c6320381161019d578063c8cf4722116100e9578063e9347683116100a2578063effd529b1161007c578063effd529b1461080e578063f27c914c14610821578063f65baefa14610841578063f71aa5c61461085657600080fd5b8063e9347683146107dd578063ea99e689146107f2578063eec3ba11146107fb57600080fd5b8063c8cf472214610745578063cd2689f01461074d578063d547741f14610785578063d9f19a3a14610798578063e3f5aeb9146107bb578063e74b981b146107ca57600080fd5b8063937b258111610156578063a8bad20711610130578063a8bad207146106c1578063a90255c4146106e4578063b56beccb1461070b578063be827a751461073257600080fd5b8063937b25811461064d578063a217fddf146106a6578063a3bf224b146106ae57600080fd5b80638c632038146105a75780638d7890e5146105af5780638e691b9a146105dd5780638ee573ac146105f0578063905c45121461062557806391d148541461063a57600080fd5b806340ccf2561161025c5780634b9fa038116102155780635fcbd285116101ef5780635fcbd2851461052957806379c3ae8814610550578063844f31bf14610577578063852cb9b81461059e57600080fd5b80634b9fa038146104fa5780635017bf8a146105035780635b88a2e11461051657600080fd5b806340ccf2561461045057806342083f8814610473578063424dc5e21461048657806346904840146104995780634a34a55d146104c45780634acde420146104e757600080fd5b8063248a9ca3116102c95780632f2ff15d116102a35780632f2ff15d146103f057806336568abe146104035780633942d15b146104165780633efcfda41461043d57600080fd5b8063248a9ca314610393578063252ca2b5146103b65780632c59a890146103c957600080fd5b806301ffc9a714610311578063066cb65414610339578063096015b01461034f5780630efe6a8b146103645780631486ed731461037757806320d786b51461038a575b600080fd5b61032461031f366004613347565b61087d565b60405190151581526020015b60405180910390f35b610341606481565b604051908152602001610330565b61036261035d366004613378565b6108b4565b005b6103416103723660046133a6565b610962565b6103626103853660046133e9565b610df0565b61034160095481565b6103416103a1366004613378565b60009081526020819052604090206001015490565b6103626103c43660046133e9565b610e7f565b6103417f0fd370bdc55a460bf805fa6d11e2342877c72cac346cd28c6567e4d0f0a42afe81565b6103626103fe366004613422565b610f05565b610362610411366004613422565b610f30565b6103417f15df3a627bc06ddfcc673648644239a40b603eb92648c972fc171056a9890e6081565b61036261044b366004613378565b610f68565b61032461045e366004613447565b600c6020526000908152604090205460ff1681565b610341610481366004613464565b611263565b6103416104943660046135e9565b61159e565b600a546104ac906001600160a01b031681565b6040516001600160a01b039091168152602001610330565b6103246104d2366004613447565b600b6020526000908152604090205460ff1681565b6103626104f536600461365c565b611ac6565b61034161271081565b6103626105113660046136a7565b611b6d565b6103626105243660046136a7565b611c68565b6104ac7f000000000000000000000000000000000000000000000000000000000000000081565b6103417faeb3682ce22b96c24491c7d95d6526a9029d8983c8ab68b1c1da57f4aed400aa81565b6104ac7f000000000000000000000000000000000000000000000000000000000000000081565b61034160065481565b610362611d5d565b6103246105bd366004613710565b600e60209081526000928352604080842090915290825290205460ff1681565b6103626105eb366004613378565b611f48565b6106136105fe366004613447565b60056020526000908152604090205460ff1681565b60405160ff9091168152602001610330565b61062d611fee565b604051610330919061373e565b610324610648366004613422565b61209d565b61066061065b366004613378565b6120c6565b604080516001600160a01b039889168152968816602088015294909616938501939093526060840191909152608083015260a082015260c081019190915260e001610330565b610341600081565b6104ac6106bc366004613378565b612122565b6103246106cf366004613447565b60046020526000908152604090205460ff1681565b6103417f34ce126d258e4c12f038d16ca6e5c12e441ad13c3146f5a99754dabb0dedbd2381565b6103417f75e5bf8b7de9fd9f24c97951733c6410a040b7a07b543096cb36c6dda365aa8b81565b610362610740366004613447565b61214c565b600354610341565b61076061075b366004613378565b612400565b604080516001600160a01b039094168452602084019290925290820152606001610330565b610362610793366004613422565b61278a565b6103246107a6366004613447565b600d6020526000908152604090205460ff1681565b610341670de0b6b3a764000081565b6103626107d8366004613447565b6127af565b610341600080516020613afe83398151915281565b61034160075481565b610362610809366004613447565b612897565b61036261081c3660046133e9565b612b44565b61034161082f366004613378565b60086020526000908152604090205481565b610849612bca565b604051610330919061381a565b6103417fddc6431fb8cc9968b6149c68294b1486c85021422e96da6ec1d538f61bc6e7d081565b60006001600160e01b03198216637965db0b60e01b14806108ae57506301ffc9a760e01b6001600160e01b03198316145b92915050565b600080516020613afe8339815191526108cc81612c2c565b6000821180156108e55750600a546001600160a01b0316155b1561090357604051630ef97d8160e11b815260040160405180910390fd5b606482111561092557604051630adad23360e31b815260040160405180910390fd5b60078290556040518281527fcb2a45476ee4bb089f23575e002268eacd380c059b2963f71e6a6e74d9a1a6b2906020015b60405180910390a15050565b6001600160a01b03831660009081526004602052604081205460ff1661099b5760405163c1ab6dc160e01b815260040160405180910390fd5b6001600160a01b0384166000908152600b602052604090205460ff16156109d5576040516313d0ff5960e31b815260040160405180910390fd5b826000036109f657604051631f2a200560e01b815260040160405180910390fd5b6001600160a01b0384166000908152600d602052604090205460ff168015610a4257506001600160a01b0384166000908152600e6020908152604080832033845290915290205460ff16155b15610a6057604051630b094f2760e31b815260040160405180910390fd5b610a6c84333086612c39565b6040516341976e0960e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906341976e0990602401602060405180830381865afa158015610af7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1b919061382d565b6040516341976e0960e01b81526001600160a01b0387811660048301529192506000917f000000000000000000000000000000000000000000000000000000000000000016906341976e0990602401602060405180830381865afa158015610b87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bab919061382d565b6001600160a01b03871660009081526005602052604090205490915082908290610bd99060ff16601261385c565b610be490600a61395c565b610bee908861396b565b610bf8919061396b565b610c029190613982565b600654600a54919450906001600160a01b03168115610cfe576000612710610c2a848861396b565b610c349190613982565b6040516340c10f1960e01b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340c10f1990610c8590859085906004016139a4565b600060405180830381600087803b158015610c9f57600080fd5b505af1158015610cb3573d6000803e3d6000fd5b505050507f55bb3cade9d43b798a4fe5ffdd05024b2d7870df53920673bfc7e68047cd0ab18282604051610ce89291906139a4565b60405180910390a1610cfa81876139bd565b9550505b85851015610d1f576040516342301c2360e01b815260040160405180910390fd5b6040516340c10f1960e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340c10f1990610d6d90339089906004016139a4565b600060405180830381600087803b158015610d8757600080fd5b505af1158015610d9b573d6000803e3d6000fd5b5050604080518a8152602081018990526001600160a01b038c1693503392507fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3505050509392505050565b7faeb3682ce22b96c24491c7d95d6526a9029d8983c8ab68b1c1da57f4aed400aa610e1a81612c2c565b6001600160a01b0383166000818152600c6020908152604091829020805460ff19168615159081179091558251938452908301527fecf2ec8bc09cfc94d9b0cc72b459f9b27753097a9ef969fe6e71a534b866078991015b60405180910390a1505050565b7faeb3682ce22b96c24491c7d95d6526a9029d8983c8ab68b1c1da57f4aed400aa610ea981612c2c565b6001600160a01b0383166000818152600b6020908152604091829020805460ff19168615159081179091558251938452908301527f61aef471b728d4736f9a33247c01f625010034871921f090899ed871abf695229101610e72565b600082815260208190526040902060010154610f2081612c2c565b610f2a8383612d48565b50505050565b6001600160a01b0381163314610f595760405163334bd91960e11b815260040160405180910390fd5b610f638282612dda565b505050565b6000818152600860205260409020546003548082101580610f8b57506009548310155b15610fa95760405163ef4224b360e01b815260040160405180910390fd5b600060038381548110610fbe57610fbe6139d0565b60009182526020918290206040805160e081018252600790930290910180546001600160a01b039081168085526001830154821695850195909552600282015416918301919091526003810154606083015260048101546080830152600581015460a08301526006015460c0820152915033811461104f5760405163e21a202d60e01b815260040160405180910390fd5b600085815260086020819052604082206000199055859160036110736001886139bd565b81548110611083576110836139d0565b90600052602060002090600702016003015481526020019081526020016000208190555060036001846110b691906139bd565b815481106110c6576110c66139d0565b9060005260206000209060070201600385815481106110e7576110e76139d0565b60009182526020909120825460079092020180546001600160a01b039283166001600160a01b03199182161782556001808501549083018054918516918316919091179055600280850154908301805491909416911617909155600380830154818301556004808401549083015560058084015490830155600692830154929091019190915580548061117c5761117c6139e6565b60008281526020812060076000199093019283020180546001600160a01b0319908116825560018201805482169055600282018054909116905560038101829055600481018290556005810182905560060155905560808201516112017f00000000000000000000000000000000000000000000000000000000000000008383612e45565b82604001516001600160a01b0316826001600160a01b03167fc0b6b4b152b639767dd4ffd28f2a0f05b4ffd672264a6c4d34447185a03cc5178884604051611253929190918252602082015260400190565b60405180910390a3505050505050565b60007f75e5bf8b7de9fd9f24c97951733c6410a040b7a07b543096cb36c6dda365aa8b61128f81612c2c565b6001600160a01b0385166112b65760405163d92e233d60e01b815260040160405180910390fd5b836000036112d757604051631f2a200560e01b815260040160405180910390fd5b6001600160a01b03861660009081526004602052604090205460ff166113105760405163c1ab6dc160e01b815260040160405180910390fd5b6001600160a01b0386166000908152600c602052604090205460ff161561134a576040516313d0ff5960e31b815260040160405180910390fd5b6113767f0000000000000000000000000000000000000000000000000000000000000000333087612c39565b6040805160e0810182523381526001600160a01b03878116602083019081528982169383019384526009805460608501908152608085018a815260a086018a81524260c088019081526003805460018181018355600092909252985160079099027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b810180549a8a166001600160a01b03199b8c1617905596517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c88018054918a16918b1691909117905598517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d870180549190981698169790971790955590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85e840155517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85f83015591517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f86082015591517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f8619092019190915554925061151e9083906139fc565b600955600354611530906001906139bd565b60008381526008602090815260409182902092909255805184815291820186905281018490526001600160a01b03808816919087169033907f92072c627ec1da81f8268b3cfb3c02bbbeedc12c21134faf44574691476199479060600160405180910390a450949350505050565b82516000908015806115b1575080845114155b156115cf57604051634ec4810560e11b815260040160405180910390fd5b6040516341976e0960e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906341976e0990602401602060405180830381865afa15801561165a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061167e919061382d565b905060005b828110156118dc57600087828151811061169f5761169f6139d0565b6020908102919091018101516001600160a01b0381166000908152600490925260409091205490915060ff166116e85760405163c1ab6dc160e01b815260040160405180910390fd5b6001600160a01b0381166000908152600b602052604090205460ff1615611722576040516313d0ff5960e31b815260040160405180910390fd5b6001600160a01b0381166000908152600d602052604090205460ff16801561176e57506001600160a01b0381166000908152600e6020908152604080832033845290915290205460ff16155b1561178c57604051630b094f2760e31b815260040160405180910390fd5b60008783815181106117a0576117a06139d0565b60200260200101519050806000036117cb57604051631f2a200560e01b815260040160405180910390fd5b6117d782333084612c39565b6040516341976e0960e01b81526001600160a01b0383811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906341976e0990602401602060405180830381865afa158015611842573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611866919061382d565b6001600160a01b03841660009081526005602052604081205491925090869083906118959060ff16601261385c565b6118a090600a61395c565b6118aa908661396b565b6118b4919061396b565b6118be9190613982565b90506118ca81896139fc565b97505060019093019250611683915050565b600654600a546001600160a01b031681156119d4576000612710611900848961396b565b61190a9190613982565b6040516340c10f1960e01b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340c10f199061195b90859085906004016139a4565b600060405180830381600087803b15801561197557600080fd5b505af1158015611989573d6000803e3d6000fd5b505050507f55bb3cade9d43b798a4fe5ffdd05024b2d7870df53920673bfc7e68047cd0ab182826040516119be9291906139a4565b60405180910390a16119d081886139bd565b9650505b868610156119f5576040516342301c2360e01b815260040160405180910390fd5b6040516340c10f1960e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340c10f1990611a439033908a906004016139a4565b600060405180830381600087803b158015611a5d57600080fd5b505af1158015611a71573d6000803e3d6000fd5b50505050336001600160a01b03167f8a0e0d2e597a2c18e7266d384fcd37c696485c4f2d04f8f90cebe3cf9453a15b8a8a89604051611ab293929190613a0f565b60405180910390a250505050509392505050565b7f15df3a627bc06ddfcc673648644239a40b603eb92648c972fc171056a9890e60611af081612c2c565b6001600160a01b038481166000818152600e6020908152604080832094881680845294825291829020805460ff19168715159081179091558251938452908301939093528101919091527fa45211a1faa0b217e3982b8fb0ea784253379fd6c908fc7e0a659c1c5a54d13e9060600160405180910390a150505050565b7fddc6431fb8cc9968b6149c68294b1486c85021422e96da6ec1d538f61bc6e7d0611b9781612c2c565b8251801580611ba7575082518114155b15611bc557604051634ec4810560e11b815260040160405180910390fd5b60005b81811015611c61576000858281518110611be457611be46139d0565b602002602001015190506000858381518110611c0257611c026139d0565b60200260200101519050611c17823383612e45565b6040518181526001600160a01b0383169033907ff77bbfe58c940481be63e90da9212a6bdeed12dd1d4b10fa66aebcdc94bc55e19060200160405180910390a35050600101611bc8565b5050505050565b7fddc6431fb8cc9968b6149c68294b1486c85021422e96da6ec1d538f61bc6e7d0611c9281612c2c565b8251801580611ca2575082518114155b15611cc057604051634ec4810560e11b815260040160405180910390fd5b60005b81811015611c61576000858281518110611cdf57611cdf6139d0565b602002602001015190506000858381518110611cfd57611cfd6139d0565b60200260200101519050611d1382333084612c39565b6040518181526001600160a01b0383169033907f58ba0f5eda9462d867a17399a0dfd1cb38c2539283af2d86e77f6d0a7ed4117c9060200160405180910390a35050600101611cc3565b611d65612f48565b7f0fd370bdc55a460bf805fa6d11e2342877c72cac346cd28c6567e4d0f0a42afe611d8f81612c2c565b6003546000819003611db457604051634ec4810560e11b815260040160405180910390fd5b6040516341976e0960e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906341976e0990602401602060405180830381865afa158015611e3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e63919061382d565b905060005b82811015611f2d57600060038281548110611e8557611e856139d0565b60009182526020918290206040805160e081018252600793840290920180546001600160a01b039081168452600182015481169584019590955260028101548516918301919091526003810154606083015260048101546080830152600581015460a08301526006015460c08201529054600a54919350611f0b92849287929116612f72565b5050506060015160009081526008602052604090206000199055600101611e68565b611f39600360006132d5565b50505050611f4660018055565b565b600080516020613afe833981519152611f6081612c2c565b600082118015611f795750600a546001600160a01b0316155b15611f9757604051630ef97d8160e11b815260040160405180910390fd5b6064821115611fb957604051630adad23360e31b815260040160405180910390fd5b60068290556040518281527f0c99ac3fb50ed38bae14c79bd1ad27552c2129c75b9c1849b6577140388c03ee90602001610956565b60606003805480602002602001604051908101604052809291908181526020016000905b828210156120945760008481526020908190206040805160e0810182526007860290920180546001600160a01b0390811684526001808301548216858701526002830154909116928401929092526003810154606084015260048101546080840152600581015460a08401526006015460c08301529083529092019101612012565b50505050905090565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b600381815481106120d657600080fd5b600091825260209091206007909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b039586169750938516959490921693909287565b6002818154811061213257600080fd5b6000918252602090912001546001600160a01b0316905081565b7f34ce126d258e4c12f038d16ca6e5c12e441ad13c3146f5a99754dabb0dedbd2361217681612c2c565b6001600160a01b03821615806121bd57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316145b156121db5760405163c1ab6dc160e01b815260040160405180910390fd5b6001600160a01b03821660009081526004602052604090205460ff161561221557604051636c1945b560e01b815260040160405180910390fd5b60405163addd509960e01b81526001600160a01b0383811660048301526000917f00000000000000000000000000000000000000000000000000000000000000009091169063addd509990602401602060405180830381865afa158015612280573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122a49190613a71565b6001600160a01b0316036122cb57604051639589a27d60e01b815260040160405180910390fd5b6000826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561230b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061232f9190613a8e565b905060128160ff16111561235657604051630692acc560e51b815260040160405180910390fd5b6001600160a01b03831660008181526004602090815260408083208054600160ff19918216811790925560058452828520805490911660ff88161790556002805491820181559093527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace90920180546001600160a01b0319168417905590519182527f784c8f4dbf0ffedd6e72c76501c545a70f8b203b30a26ce542bf92ba87c248a49101610e72565b600080600061240d612f48565b7f0fd370bdc55a460bf805fa6d11e2342877c72cac346cd28c6567e4d0f0a42afe61243781612c2c565b600085815260086020526040902054600354808210158061245a57506009548710155b156124785760405163ef4224b360e01b815260040160405180910390fd5b60006003838154811061248d5761248d6139d0565b60009182526020918290206040805160e081018252600790930290910180546001600160a01b039081168452600182015481169484019490945260028101549093169082015260038201546060820181905260048301546080830152600583015460a083015260069092015460c08201529150881461251f5760405163300262ab60e21b815260040160405180910390fd5b6040516341976e0960e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906341976e0990602401602060405180830381865afa1580156125aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125ce919061382d565b600754600a549192506125ed91849184916001600160a01b0316612f72565b91995097509550836008600060036126066001886139bd565b81548110612616576126166139d0565b60009182526020808320600360079093020182015484528381019490945260409283018220949094558c81526008909252902060001990556126596001856139bd565b81548110612669576126696139d0565b90600052602060002090600702016003858154811061268a5761268a6139d0565b60009182526020909120825460079092020180546001600160a01b039283166001600160a01b03199182161782556001808501549083018054918516918316919091179055600280850154908301805491909416911617909155600380830154818301556004808401549083015560058084015490830155600692830154929091019190915580548061271f5761271f6139e6565b60008281526020812060076000199093019283020180546001600160a01b031990811682556001820180548216905560028201805490911690556003810182905560048101829055600581018290556006015590555061278393506132a092505050565b9193909250565b6000828152602081905260409020600101546127a581612c2c565b610f2a8383612dda565b600080516020613afe8339815191526127c781612c2c565b6001600160a01b038216612849576000600681905560078190556040519081527f0c99ac3fb50ed38bae14c79bd1ad27552c2129c75b9c1849b6577140388c03ee9060200160405180910390a1604051600081527fcb2a45476ee4bb089f23575e002268eacd380c059b2963f71e6a6e74d9a1a6b29060200160405180910390a15b600a80546001600160a01b0319166001600160a01b0384169081179091556040519081527f2e979f80fe4d43055c584cf4a8467c55875ea36728fc37176c05acd784eb7a7390602001610956565b7f34ce126d258e4c12f038d16ca6e5c12e441ad13c3146f5a99754dabb0dedbd236128c181612c2c565b6001600160a01b03821660009081526004602052604090205460ff166128fa5760405163c1ab6dc160e01b815260040160405180910390fd5b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa15801561293e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612962919061382d565b1561298057604051636984206f60e11b815260040160405180910390fd5b600060028054806020026020016040519081016040528092919081815260200182805480156129d857602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116129ba575b505083519394506000925050505b81811015612ad757846001600160a01b0316838281518110612a0a57612a0a6139d0565b60200260200101516001600160a01b031603612acf576002612a2d6001846139bd565b81548110612a3d57612a3d6139d0565b600091825260209091200154600280546001600160a01b039092169183908110612a6957612a696139d0565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506002805480612aa857612aa86139e6565b600082815260209020810160001990810180546001600160a01b0319169055019055612ad7565b6001016129e6565b6001600160a01b0385166000818152600460209081526040808320805460ff199081169091556005835292819020805490931690925590519182527f4c910b69fe65a61f7531b9c5042b2329ca7179c77290aa7e2eb3afa3c8511fd3910160405180910390a15050505050565b7f15df3a627bc06ddfcc673648644239a40b603eb92648c972fc171056a9890e60612b6e81612c2c565b6001600160a01b0383166000818152600d6020908152604091829020805460ff19168615159081179091558251938452908301527f5fad9775e677916452d719f68d07ee2a9f503d5b8241f877283e9be79ad430779101610e72565b60606002805480602002602001604051908101604052809291908181526020018280548015612c2257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612c04575b5050505050905090565b612c3681336132a6565b50565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092839290881691612c9d9190613ab1565b6000604051808303816000865af19150503d8060008114612cda576040519150601f19603f3d011682016040523d82523d6000602084013e612cdf565b606091505b5091509150818015612d09575080511580612d09575080806020019051810190612d099190613ae0565b612d405760405162461bcd60e51b815260206004820152600360248201526229aa2360e91b60448201526064015b60405180910390fd5b505050505050565b6000612d54838361209d565b612dd2576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055612d8a3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016108ae565b5060006108ae565b6000612de6838361209d565b15612dd2576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016108ae565b600080846001600160a01b031663a9059cbb60e01b8585604051602401612e6d9291906139a4565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051612eab9190613ab1565b6000604051808303816000865af19150503d8060008114612ee8576040519150601f19603f3d011682016040523d82523d6000602084013e612eed565b606091505b5091509150818015612f17575080511580612f17575080806020019051810190612f179190613ae0565b611c615760405162461bcd60e51b815260206004820152600260248201526114d560f21b6044820152606401612d37565b600260015403612f6b57604051633ee5aeb560e01b815260040160405180910390fd5b6002600155565b60a084015160408501516080860151909160009190828615612fb457612710612f9b888561396b565b612fa59190613982565b9050612fb181846139bd565b92505b6040516341976e0960e01b81526001600160a01b0386811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906341976e0990602401602060405180830381865afa15801561301f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613043919061382d565b6001600160a01b03871660009081526005602052604090205490915061306d9060ff16601261385c565b61307890600a61395c565b816130838b8761396b565b61308d9190613982565b6130979190613982565b8a519095508386106132045760208b01518315613113576130d97f00000000000000000000000000000000000000000000000000000000000000008a86612e45565b7f55bb3cade9d43b798a4fe5ffdd05024b2d7870df53920673bfc7e68047cd0ab1898560405161310a9291906139a4565b60405180910390a15b604051632770a7eb60e21b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690639dc29fac906131619030908a906004016139a4565b600060405180830381600087803b15801561317b57600080fd5b505af115801561318f573d6000803e3d6000fd5b5050505061319e888289612e45565b876001600160a01b0316816001600160a01b0316836001600160a01b03167f0c36dae1f39b464778dcec62b4435ff14d934d164f85cb48995f9536fa4a9c72898b6040516131f6929190918252602082015260400190565b60405180910390a450613292565b600095506132377f0000000000000000000000000000000000000000000000000000000000000000828d60800151612e45565b866001600160a01b0316816001600160a01b03167fc0b6b4b152b639767dd4ffd28f2a0f05b4ffd672264a6c4d34447185a03cc5178d6060015188604051613289929190918252602082015260400190565b60405180910390a35b505050509450945094915050565b60018055565b6132b0828261209d565b6132d157808260405163e2517d3f60e01b8152600401612d379291906139a4565b5050565b5080546000825560070290600052602060002090810190612c3691905b808211156133435780546001600160a01b03199081168255600182018054821690556002820180549091169055600060038201819055600482018190556005820181905560068201556007016132f2565b5090565b60006020828403121561335957600080fd5b81356001600160e01b03198116811461337157600080fd5b9392505050565b60006020828403121561338a57600080fd5b5035919050565b6001600160a01b0381168114612c3657600080fd5b6000806000606084860312156133bb57600080fd5b83356133c681613391565b95602085013595506040909401359392505050565b8015158114612c3657600080fd5b600080604083850312156133fc57600080fd5b823561340781613391565b91506020830135613417816133db565b809150509250929050565b6000806040838503121561343557600080fd5b82359150602083013561341781613391565b60006020828403121561345957600080fd5b813561337181613391565b6000806000806080858703121561347a57600080fd5b843561348581613391565b9350602085013561349581613391565b93969395505050506040820135916060013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156134e9576134e96134aa565b604052919050565b600067ffffffffffffffff82111561350b5761350b6134aa565b5060051b60200190565b600082601f83011261352657600080fd5b8135613539613534826134f1565b6134c0565b8082825260208201915060208360051b86010192508583111561355b57600080fd5b602085015b8381101561358157803561357381613391565b835260209283019201613560565b5095945050505050565b600082601f83011261359c57600080fd5b81356135aa613534826134f1565b8082825260208201915060208360051b8601019250858311156135cc57600080fd5b602085015b838110156135815780358352602092830192016135d1565b6000806000606084860312156135fe57600080fd5b833567ffffffffffffffff81111561361557600080fd5b61362186828701613515565b935050602084013567ffffffffffffffff81111561363e57600080fd5b61364a8682870161358b565b93969395505050506040919091013590565b60008060006060848603121561367157600080fd5b833561367c81613391565b9250602084013561368c81613391565b9150604084013561369c816133db565b809150509250925092565b600080604083850312156136ba57600080fd5b823567ffffffffffffffff8111156136d157600080fd5b6136dd85828601613515565b925050602083013567ffffffffffffffff8111156136fa57600080fd5b6137068582860161358b565b9150509250929050565b6000806040838503121561372357600080fd5b823561372e81613391565b9150602083013561341781613391565b602080825282518282018190526000918401906040840190835b818110156137ca57835180516001600160a01b03908116855260208083015182168187015260408084015190921691860191909152606080830151908601526080808301519086015260a0808301519086015260c091820151918501919091529093019260e090920191600101613758565b509095945050505050565b600081518084526020840193506020830160005b828110156138105781516001600160a01b03168652602095860195909101906001016137e9565b5093949350505050565b60208152600061337160208301846137d5565b60006020828403121561383f57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60ff82811682821603908111156108ae576108ae613846565b6001815b60018411156138b05780850481111561389457613894613846565b60018416156138a257908102905b60019390931c928002613879565b935093915050565b6000826138c7575060016108ae565b816138d4575060006108ae565b81600181146138ea57600281146138f457613910565b60019150506108ae565b60ff84111561390557613905613846565b50506001821b6108ae565b5060208310610133831016604e8410600b8410161715613933575081810a6108ae565b6139406000198484613875565b806000190482111561395457613954613846565b029392505050565b600061337160ff8416836138b8565b80820281158282048414176108ae576108ae613846565b60008261399f57634e487b7160e01b600052601260045260246000fd5b500490565b6001600160a01b03929092168252602082015260400190565b818103818111156108ae576108ae613846565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b808201808211156108ae576108ae613846565b606081526000613a2260608301866137d5565b828103602084015280855180835260208301915060208701925060005b81811015613a5d578351835260209384019390920191600101613a3f565b505060409390930193909352509392505050565b600060208284031215613a8357600080fd5b815161337181613391565b600060208284031215613aa057600080fd5b815160ff8116811461337157600080fd5b6000825160005b81811015613ad25760208186018101518583015201613ab8565b506000920191825250919050565b600060208284031215613af257600080fd5b8151613371816133db56fee6ad9a47fbda1dc18de1eb5eeb7d935e5e81b4748f3cfc61e233e64f88182060a2646970667358221220eb8559fb7155ad00de790b2f4bf8be44bf33b5e7c8c8fb687ee52dd787f9bf2064736f6c634300081a00330000000000000000000000002d83f5bfc83cf0b09b8884101c015fa9c74c32f30000000000000000000000006cd42e64630d25406bfc51cca65cffa7cd495fb1","external_libraries":[],"proxy_type":null,"implementations":[],"verified_at":"2025-02-18T11:27:14.882893Z","is_verified_via_verifier_alliance":true,"compiler_version":"0.8.26+commit.8a97fa7a","decoded_constructor_args":[["0x2D83F5BfC83cF0B09B8884101C015FA9c74c32F3",{"internalType":"address","name":"_lpToken","type":"address"}],["0x6cD42e64630d25406bFC51CcA65cFfa7Cd495FB1",{"internalType":"address","name":"_oracleConfigurator","type":"address"}]],"sourcify_repo_url":null,"optimization_runs":200,"compiler_settings":{"evmVersion":"paris","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":true,"runs":200},"remappings":[":@chainlink/contracts/src/=lib/chainlink/contracts/src/",":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",":@uniswap/v3-periphery/contracts/=lib/v3-periphery/contracts/",":chainlink/=lib/chainlink/",":ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",":forge-std/=lib/forge-std/src/",":openzeppelin-contracts/=lib/openzeppelin-contracts/",":v3-periphery/=lib/v3-periphery/contracts/"]},"is_verified":true,"verified_twin_address_hash":null,"optimization_enabled":true,"deployed_bytecode":"0x608060405234801561001057600080fd5b506004361061030c5760003560e01c80638c6320381161019d578063c8cf4722116100e9578063e9347683116100a2578063effd529b1161007c578063effd529b1461080e578063f27c914c14610821578063f65baefa14610841578063f71aa5c61461085657600080fd5b8063e9347683146107dd578063ea99e689146107f2578063eec3ba11146107fb57600080fd5b8063c8cf472214610745578063cd2689f01461074d578063d547741f14610785578063d9f19a3a14610798578063e3f5aeb9146107bb578063e74b981b146107ca57600080fd5b8063937b258111610156578063a8bad20711610130578063a8bad207146106c1578063a90255c4146106e4578063b56beccb1461070b578063be827a751461073257600080fd5b8063937b25811461064d578063a217fddf146106a6578063a3bf224b146106ae57600080fd5b80638c632038146105a75780638d7890e5146105af5780638e691b9a146105dd5780638ee573ac146105f0578063905c45121461062557806391d148541461063a57600080fd5b806340ccf2561161025c5780634b9fa038116102155780635fcbd285116101ef5780635fcbd2851461052957806379c3ae8814610550578063844f31bf14610577578063852cb9b81461059e57600080fd5b80634b9fa038146104fa5780635017bf8a146105035780635b88a2e11461051657600080fd5b806340ccf2561461045057806342083f8814610473578063424dc5e21461048657806346904840146104995780634a34a55d146104c45780634acde420146104e757600080fd5b8063248a9ca3116102c95780632f2ff15d116102a35780632f2ff15d146103f057806336568abe146104035780633942d15b146104165780633efcfda41461043d57600080fd5b8063248a9ca314610393578063252ca2b5146103b65780632c59a890146103c957600080fd5b806301ffc9a714610311578063066cb65414610339578063096015b01461034f5780630efe6a8b146103645780631486ed731461037757806320d786b51461038a575b600080fd5b61032461031f366004613347565b61087d565b60405190151581526020015b60405180910390f35b610341606481565b604051908152602001610330565b61036261035d366004613378565b6108b4565b005b6103416103723660046133a6565b610962565b6103626103853660046133e9565b610df0565b61034160095481565b6103416103a1366004613378565b60009081526020819052604090206001015490565b6103626103c43660046133e9565b610e7f565b6103417f0fd370bdc55a460bf805fa6d11e2342877c72cac346cd28c6567e4d0f0a42afe81565b6103626103fe366004613422565b610f05565b610362610411366004613422565b610f30565b6103417f15df3a627bc06ddfcc673648644239a40b603eb92648c972fc171056a9890e6081565b61036261044b366004613378565b610f68565b61032461045e366004613447565b600c6020526000908152604090205460ff1681565b610341610481366004613464565b611263565b6103416104943660046135e9565b61159e565b600a546104ac906001600160a01b031681565b6040516001600160a01b039091168152602001610330565b6103246104d2366004613447565b600b6020526000908152604090205460ff1681565b6103626104f536600461365c565b611ac6565b61034161271081565b6103626105113660046136a7565b611b6d565b6103626105243660046136a7565b611c68565b6104ac7f0000000000000000000000002d83f5bfc83cf0b09b8884101c015fa9c74c32f381565b6103417faeb3682ce22b96c24491c7d95d6526a9029d8983c8ab68b1c1da57f4aed400aa81565b6104ac7f0000000000000000000000006cd42e64630d25406bfc51cca65cffa7cd495fb181565b61034160065481565b610362611d5d565b6103246105bd366004613710565b600e60209081526000928352604080842090915290825290205460ff1681565b6103626105eb366004613378565b611f48565b6106136105fe366004613447565b60056020526000908152604090205460ff1681565b60405160ff9091168152602001610330565b61062d611fee565b604051610330919061373e565b610324610648366004613422565b61209d565b61066061065b366004613378565b6120c6565b604080516001600160a01b039889168152968816602088015294909616938501939093526060840191909152608083015260a082015260c081019190915260e001610330565b610341600081565b6104ac6106bc366004613378565b612122565b6103246106cf366004613447565b60046020526000908152604090205460ff1681565b6103417f34ce126d258e4c12f038d16ca6e5c12e441ad13c3146f5a99754dabb0dedbd2381565b6103417f75e5bf8b7de9fd9f24c97951733c6410a040b7a07b543096cb36c6dda365aa8b81565b610362610740366004613447565b61214c565b600354610341565b61076061075b366004613378565b612400565b604080516001600160a01b039094168452602084019290925290820152606001610330565b610362610793366004613422565b61278a565b6103246107a6366004613447565b600d6020526000908152604090205460ff1681565b610341670de0b6b3a764000081565b6103626107d8366004613447565b6127af565b610341600080516020613afe83398151915281565b61034160075481565b610362610809366004613447565b612897565b61036261081c3660046133e9565b612b44565b61034161082f366004613378565b60086020526000908152604090205481565b610849612bca565b604051610330919061381a565b6103417fddc6431fb8cc9968b6149c68294b1486c85021422e96da6ec1d538f61bc6e7d081565b60006001600160e01b03198216637965db0b60e01b14806108ae57506301ffc9a760e01b6001600160e01b03198316145b92915050565b600080516020613afe8339815191526108cc81612c2c565b6000821180156108e55750600a546001600160a01b0316155b1561090357604051630ef97d8160e11b815260040160405180910390fd5b606482111561092557604051630adad23360e31b815260040160405180910390fd5b60078290556040518281527fcb2a45476ee4bb089f23575e002268eacd380c059b2963f71e6a6e74d9a1a6b2906020015b60405180910390a15050565b6001600160a01b03831660009081526004602052604081205460ff1661099b5760405163c1ab6dc160e01b815260040160405180910390fd5b6001600160a01b0384166000908152600b602052604090205460ff16156109d5576040516313d0ff5960e31b815260040160405180910390fd5b826000036109f657604051631f2a200560e01b815260040160405180910390fd5b6001600160a01b0384166000908152600d602052604090205460ff168015610a4257506001600160a01b0384166000908152600e6020908152604080832033845290915290205460ff16155b15610a6057604051630b094f2760e31b815260040160405180910390fd5b610a6c84333086612c39565b6040516341976e0960e01b81526001600160a01b037f0000000000000000000000002d83f5bfc83cf0b09b8884101c015fa9c74c32f3811660048301526000917f0000000000000000000000006cd42e64630d25406bfc51cca65cffa7cd495fb1909116906341976e0990602401602060405180830381865afa158015610af7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1b919061382d565b6040516341976e0960e01b81526001600160a01b0387811660048301529192506000917f0000000000000000000000006cd42e64630d25406bfc51cca65cffa7cd495fb116906341976e0990602401602060405180830381865afa158015610b87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bab919061382d565b6001600160a01b03871660009081526005602052604090205490915082908290610bd99060ff16601261385c565b610be490600a61395c565b610bee908861396b565b610bf8919061396b565b610c029190613982565b600654600a54919450906001600160a01b03168115610cfe576000612710610c2a848861396b565b610c349190613982565b6040516340c10f1960e01b81529091506001600160a01b037f0000000000000000000000002d83f5bfc83cf0b09b8884101c015fa9c74c32f316906340c10f1990610c8590859085906004016139a4565b600060405180830381600087803b158015610c9f57600080fd5b505af1158015610cb3573d6000803e3d6000fd5b505050507f55bb3cade9d43b798a4fe5ffdd05024b2d7870df53920673bfc7e68047cd0ab18282604051610ce89291906139a4565b60405180910390a1610cfa81876139bd565b9550505b85851015610d1f576040516342301c2360e01b815260040160405180910390fd5b6040516340c10f1960e01b81526001600160a01b037f0000000000000000000000002d83f5bfc83cf0b09b8884101c015fa9c74c32f316906340c10f1990610d6d90339089906004016139a4565b600060405180830381600087803b158015610d8757600080fd5b505af1158015610d9b573d6000803e3d6000fd5b5050604080518a8152602081018990526001600160a01b038c1693503392507fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3505050509392505050565b7faeb3682ce22b96c24491c7d95d6526a9029d8983c8ab68b1c1da57f4aed400aa610e1a81612c2c565b6001600160a01b0383166000818152600c6020908152604091829020805460ff19168615159081179091558251938452908301527fecf2ec8bc09cfc94d9b0cc72b459f9b27753097a9ef969fe6e71a534b866078991015b60405180910390a1505050565b7faeb3682ce22b96c24491c7d95d6526a9029d8983c8ab68b1c1da57f4aed400aa610ea981612c2c565b6001600160a01b0383166000818152600b6020908152604091829020805460ff19168615159081179091558251938452908301527f61aef471b728d4736f9a33247c01f625010034871921f090899ed871abf695229101610e72565b600082815260208190526040902060010154610f2081612c2c565b610f2a8383612d48565b50505050565b6001600160a01b0381163314610f595760405163334bd91960e11b815260040160405180910390fd5b610f638282612dda565b505050565b6000818152600860205260409020546003548082101580610f8b57506009548310155b15610fa95760405163ef4224b360e01b815260040160405180910390fd5b600060038381548110610fbe57610fbe6139d0565b60009182526020918290206040805160e081018252600790930290910180546001600160a01b039081168085526001830154821695850195909552600282015416918301919091526003810154606083015260048101546080830152600581015460a08301526006015460c0820152915033811461104f5760405163e21a202d60e01b815260040160405180910390fd5b600085815260086020819052604082206000199055859160036110736001886139bd565b81548110611083576110836139d0565b90600052602060002090600702016003015481526020019081526020016000208190555060036001846110b691906139bd565b815481106110c6576110c66139d0565b9060005260206000209060070201600385815481106110e7576110e76139d0565b60009182526020909120825460079092020180546001600160a01b039283166001600160a01b03199182161782556001808501549083018054918516918316919091179055600280850154908301805491909416911617909155600380830154818301556004808401549083015560058084015490830155600692830154929091019190915580548061117c5761117c6139e6565b60008281526020812060076000199093019283020180546001600160a01b0319908116825560018201805482169055600282018054909116905560038101829055600481018290556005810182905560060155905560808201516112017f0000000000000000000000002d83f5bfc83cf0b09b8884101c015fa9c74c32f38383612e45565b82604001516001600160a01b0316826001600160a01b03167fc0b6b4b152b639767dd4ffd28f2a0f05b4ffd672264a6c4d34447185a03cc5178884604051611253929190918252602082015260400190565b60405180910390a3505050505050565b60007f75e5bf8b7de9fd9f24c97951733c6410a040b7a07b543096cb36c6dda365aa8b61128f81612c2c565b6001600160a01b0385166112b65760405163d92e233d60e01b815260040160405180910390fd5b836000036112d757604051631f2a200560e01b815260040160405180910390fd5b6001600160a01b03861660009081526004602052604090205460ff166113105760405163c1ab6dc160e01b815260040160405180910390fd5b6001600160a01b0386166000908152600c602052604090205460ff161561134a576040516313d0ff5960e31b815260040160405180910390fd5b6113767f0000000000000000000000002d83f5bfc83cf0b09b8884101c015fa9c74c32f3333087612c39565b6040805160e0810182523381526001600160a01b03878116602083019081528982169383019384526009805460608501908152608085018a815260a086018a81524260c088019081526003805460018181018355600092909252985160079099027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b810180549a8a166001600160a01b03199b8c1617905596517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c88018054918a16918b1691909117905598517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d870180549190981698169790971790955590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85e840155517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85f83015591517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f86082015591517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f8619092019190915554925061151e9083906139fc565b600955600354611530906001906139bd565b60008381526008602090815260409182902092909255805184815291820186905281018490526001600160a01b03808816919087169033907f92072c627ec1da81f8268b3cfb3c02bbbeedc12c21134faf44574691476199479060600160405180910390a450949350505050565b82516000908015806115b1575080845114155b156115cf57604051634ec4810560e11b815260040160405180910390fd5b6040516341976e0960e01b81526001600160a01b037f0000000000000000000000002d83f5bfc83cf0b09b8884101c015fa9c74c32f3811660048301526000917f0000000000000000000000006cd42e64630d25406bfc51cca65cffa7cd495fb1909116906341976e0990602401602060405180830381865afa15801561165a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061167e919061382d565b905060005b828110156118dc57600087828151811061169f5761169f6139d0565b6020908102919091018101516001600160a01b0381166000908152600490925260409091205490915060ff166116e85760405163c1ab6dc160e01b815260040160405180910390fd5b6001600160a01b0381166000908152600b602052604090205460ff1615611722576040516313d0ff5960e31b815260040160405180910390fd5b6001600160a01b0381166000908152600d602052604090205460ff16801561176e57506001600160a01b0381166000908152600e6020908152604080832033845290915290205460ff16155b1561178c57604051630b094f2760e31b815260040160405180910390fd5b60008783815181106117a0576117a06139d0565b60200260200101519050806000036117cb57604051631f2a200560e01b815260040160405180910390fd5b6117d782333084612c39565b6040516341976e0960e01b81526001600160a01b0383811660048301526000917f0000000000000000000000006cd42e64630d25406bfc51cca65cffa7cd495fb1909116906341976e0990602401602060405180830381865afa158015611842573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611866919061382d565b6001600160a01b03841660009081526005602052604081205491925090869083906118959060ff16601261385c565b6118a090600a61395c565b6118aa908661396b565b6118b4919061396b565b6118be9190613982565b90506118ca81896139fc565b97505060019093019250611683915050565b600654600a546001600160a01b031681156119d4576000612710611900848961396b565b61190a9190613982565b6040516340c10f1960e01b81529091506001600160a01b037f0000000000000000000000002d83f5bfc83cf0b09b8884101c015fa9c74c32f316906340c10f199061195b90859085906004016139a4565b600060405180830381600087803b15801561197557600080fd5b505af1158015611989573d6000803e3d6000fd5b505050507f55bb3cade9d43b798a4fe5ffdd05024b2d7870df53920673bfc7e68047cd0ab182826040516119be9291906139a4565b60405180910390a16119d081886139bd565b9650505b868610156119f5576040516342301c2360e01b815260040160405180910390fd5b6040516340c10f1960e01b81526001600160a01b037f0000000000000000000000002d83f5bfc83cf0b09b8884101c015fa9c74c32f316906340c10f1990611a439033908a906004016139a4565b600060405180830381600087803b158015611a5d57600080fd5b505af1158015611a71573d6000803e3d6000fd5b50505050336001600160a01b03167f8a0e0d2e597a2c18e7266d384fcd37c696485c4f2d04f8f90cebe3cf9453a15b8a8a89604051611ab293929190613a0f565b60405180910390a250505050509392505050565b7f15df3a627bc06ddfcc673648644239a40b603eb92648c972fc171056a9890e60611af081612c2c565b6001600160a01b038481166000818152600e6020908152604080832094881680845294825291829020805460ff19168715159081179091558251938452908301939093528101919091527fa45211a1faa0b217e3982b8fb0ea784253379fd6c908fc7e0a659c1c5a54d13e9060600160405180910390a150505050565b7fddc6431fb8cc9968b6149c68294b1486c85021422e96da6ec1d538f61bc6e7d0611b9781612c2c565b8251801580611ba7575082518114155b15611bc557604051634ec4810560e11b815260040160405180910390fd5b60005b81811015611c61576000858281518110611be457611be46139d0565b602002602001015190506000858381518110611c0257611c026139d0565b60200260200101519050611c17823383612e45565b6040518181526001600160a01b0383169033907ff77bbfe58c940481be63e90da9212a6bdeed12dd1d4b10fa66aebcdc94bc55e19060200160405180910390a35050600101611bc8565b5050505050565b7fddc6431fb8cc9968b6149c68294b1486c85021422e96da6ec1d538f61bc6e7d0611c9281612c2c565b8251801580611ca2575082518114155b15611cc057604051634ec4810560e11b815260040160405180910390fd5b60005b81811015611c61576000858281518110611cdf57611cdf6139d0565b602002602001015190506000858381518110611cfd57611cfd6139d0565b60200260200101519050611d1382333084612c39565b6040518181526001600160a01b0383169033907f58ba0f5eda9462d867a17399a0dfd1cb38c2539283af2d86e77f6d0a7ed4117c9060200160405180910390a35050600101611cc3565b611d65612f48565b7f0fd370bdc55a460bf805fa6d11e2342877c72cac346cd28c6567e4d0f0a42afe611d8f81612c2c565b6003546000819003611db457604051634ec4810560e11b815260040160405180910390fd5b6040516341976e0960e01b81526001600160a01b037f0000000000000000000000002d83f5bfc83cf0b09b8884101c015fa9c74c32f3811660048301526000917f0000000000000000000000006cd42e64630d25406bfc51cca65cffa7cd495fb1909116906341976e0990602401602060405180830381865afa158015611e3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e63919061382d565b905060005b82811015611f2d57600060038281548110611e8557611e856139d0565b60009182526020918290206040805160e081018252600793840290920180546001600160a01b039081168452600182015481169584019590955260028101548516918301919091526003810154606083015260048101546080830152600581015460a08301526006015460c08201529054600a54919350611f0b92849287929116612f72565b5050506060015160009081526008602052604090206000199055600101611e68565b611f39600360006132d5565b50505050611f4660018055565b565b600080516020613afe833981519152611f6081612c2c565b600082118015611f795750600a546001600160a01b0316155b15611f9757604051630ef97d8160e11b815260040160405180910390fd5b6064821115611fb957604051630adad23360e31b815260040160405180910390fd5b60068290556040518281527f0c99ac3fb50ed38bae14c79bd1ad27552c2129c75b9c1849b6577140388c03ee90602001610956565b60606003805480602002602001604051908101604052809291908181526020016000905b828210156120945760008481526020908190206040805160e0810182526007860290920180546001600160a01b0390811684526001808301548216858701526002830154909116928401929092526003810154606084015260048101546080840152600581015460a08401526006015460c08301529083529092019101612012565b50505050905090565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b600381815481106120d657600080fd5b600091825260209091206007909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b039586169750938516959490921693909287565b6002818154811061213257600080fd5b6000918252602090912001546001600160a01b0316905081565b7f34ce126d258e4c12f038d16ca6e5c12e441ad13c3146f5a99754dabb0dedbd2361217681612c2c565b6001600160a01b03821615806121bd57507f0000000000000000000000002d83f5bfc83cf0b09b8884101c015fa9c74c32f36001600160a01b0316826001600160a01b0316145b156121db5760405163c1ab6dc160e01b815260040160405180910390fd5b6001600160a01b03821660009081526004602052604090205460ff161561221557604051636c1945b560e01b815260040160405180910390fd5b60405163addd509960e01b81526001600160a01b0383811660048301526000917f0000000000000000000000006cd42e64630d25406bfc51cca65cffa7cd495fb19091169063addd509990602401602060405180830381865afa158015612280573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122a49190613a71565b6001600160a01b0316036122cb57604051639589a27d60e01b815260040160405180910390fd5b6000826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561230b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061232f9190613a8e565b905060128160ff16111561235657604051630692acc560e51b815260040160405180910390fd5b6001600160a01b03831660008181526004602090815260408083208054600160ff19918216811790925560058452828520805490911660ff88161790556002805491820181559093527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace90920180546001600160a01b0319168417905590519182527f784c8f4dbf0ffedd6e72c76501c545a70f8b203b30a26ce542bf92ba87c248a49101610e72565b600080600061240d612f48565b7f0fd370bdc55a460bf805fa6d11e2342877c72cac346cd28c6567e4d0f0a42afe61243781612c2c565b600085815260086020526040902054600354808210158061245a57506009548710155b156124785760405163ef4224b360e01b815260040160405180910390fd5b60006003838154811061248d5761248d6139d0565b60009182526020918290206040805160e081018252600790930290910180546001600160a01b039081168452600182015481169484019490945260028101549093169082015260038201546060820181905260048301546080830152600583015460a083015260069092015460c08201529150881461251f5760405163300262ab60e21b815260040160405180910390fd5b6040516341976e0960e01b81526001600160a01b037f0000000000000000000000002d83f5bfc83cf0b09b8884101c015fa9c74c32f3811660048301526000917f0000000000000000000000006cd42e64630d25406bfc51cca65cffa7cd495fb1909116906341976e0990602401602060405180830381865afa1580156125aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125ce919061382d565b600754600a549192506125ed91849184916001600160a01b0316612f72565b91995097509550836008600060036126066001886139bd565b81548110612616576126166139d0565b60009182526020808320600360079093020182015484528381019490945260409283018220949094558c81526008909252902060001990556126596001856139bd565b81548110612669576126696139d0565b90600052602060002090600702016003858154811061268a5761268a6139d0565b60009182526020909120825460079092020180546001600160a01b039283166001600160a01b03199182161782556001808501549083018054918516918316919091179055600280850154908301805491909416911617909155600380830154818301556004808401549083015560058084015490830155600692830154929091019190915580548061271f5761271f6139e6565b60008281526020812060076000199093019283020180546001600160a01b031990811682556001820180548216905560028201805490911690556003810182905560048101829055600581018290556006015590555061278393506132a092505050565b9193909250565b6000828152602081905260409020600101546127a581612c2c565b610f2a8383612dda565b600080516020613afe8339815191526127c781612c2c565b6001600160a01b038216612849576000600681905560078190556040519081527f0c99ac3fb50ed38bae14c79bd1ad27552c2129c75b9c1849b6577140388c03ee9060200160405180910390a1604051600081527fcb2a45476ee4bb089f23575e002268eacd380c059b2963f71e6a6e74d9a1a6b29060200160405180910390a15b600a80546001600160a01b0319166001600160a01b0384169081179091556040519081527f2e979f80fe4d43055c584cf4a8467c55875ea36728fc37176c05acd784eb7a7390602001610956565b7f34ce126d258e4c12f038d16ca6e5c12e441ad13c3146f5a99754dabb0dedbd236128c181612c2c565b6001600160a01b03821660009081526004602052604090205460ff166128fa5760405163c1ab6dc160e01b815260040160405180910390fd5b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa15801561293e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612962919061382d565b1561298057604051636984206f60e11b815260040160405180910390fd5b600060028054806020026020016040519081016040528092919081815260200182805480156129d857602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116129ba575b505083519394506000925050505b81811015612ad757846001600160a01b0316838281518110612a0a57612a0a6139d0565b60200260200101516001600160a01b031603612acf576002612a2d6001846139bd565b81548110612a3d57612a3d6139d0565b600091825260209091200154600280546001600160a01b039092169183908110612a6957612a696139d0565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506002805480612aa857612aa86139e6565b600082815260209020810160001990810180546001600160a01b0319169055019055612ad7565b6001016129e6565b6001600160a01b0385166000818152600460209081526040808320805460ff199081169091556005835292819020805490931690925590519182527f4c910b69fe65a61f7531b9c5042b2329ca7179c77290aa7e2eb3afa3c8511fd3910160405180910390a15050505050565b7f15df3a627bc06ddfcc673648644239a40b603eb92648c972fc171056a9890e60612b6e81612c2c565b6001600160a01b0383166000818152600d6020908152604091829020805460ff19168615159081179091558251938452908301527f5fad9775e677916452d719f68d07ee2a9f503d5b8241f877283e9be79ad430779101610e72565b60606002805480602002602001604051908101604052809291908181526020018280548015612c2257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612c04575b5050505050905090565b612c3681336132a6565b50565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092839290881691612c9d9190613ab1565b6000604051808303816000865af19150503d8060008114612cda576040519150601f19603f3d011682016040523d82523d6000602084013e612cdf565b606091505b5091509150818015612d09575080511580612d09575080806020019051810190612d099190613ae0565b612d405760405162461bcd60e51b815260206004820152600360248201526229aa2360e91b60448201526064015b60405180910390fd5b505050505050565b6000612d54838361209d565b612dd2576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055612d8a3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016108ae565b5060006108ae565b6000612de6838361209d565b15612dd2576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016108ae565b600080846001600160a01b031663a9059cbb60e01b8585604051602401612e6d9291906139a4565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051612eab9190613ab1565b6000604051808303816000865af19150503d8060008114612ee8576040519150601f19603f3d011682016040523d82523d6000602084013e612eed565b606091505b5091509150818015612f17575080511580612f17575080806020019051810190612f179190613ae0565b611c615760405162461bcd60e51b815260206004820152600260248201526114d560f21b6044820152606401612d37565b600260015403612f6b57604051633ee5aeb560e01b815260040160405180910390fd5b6002600155565b60a084015160408501516080860151909160009190828615612fb457612710612f9b888561396b565b612fa59190613982565b9050612fb181846139bd565b92505b6040516341976e0960e01b81526001600160a01b0386811660048301526000917f0000000000000000000000006cd42e64630d25406bfc51cca65cffa7cd495fb1909116906341976e0990602401602060405180830381865afa15801561301f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613043919061382d565b6001600160a01b03871660009081526005602052604090205490915061306d9060ff16601261385c565b61307890600a61395c565b816130838b8761396b565b61308d9190613982565b6130979190613982565b8a519095508386106132045760208b01518315613113576130d97f0000000000000000000000002d83f5bfc83cf0b09b8884101c015fa9c74c32f38a86612e45565b7f55bb3cade9d43b798a4fe5ffdd05024b2d7870df53920673bfc7e68047cd0ab1898560405161310a9291906139a4565b60405180910390a15b604051632770a7eb60e21b81526001600160a01b037f0000000000000000000000002d83f5bfc83cf0b09b8884101c015fa9c74c32f31690639dc29fac906131619030908a906004016139a4565b600060405180830381600087803b15801561317b57600080fd5b505af115801561318f573d6000803e3d6000fd5b5050505061319e888289612e45565b876001600160a01b0316816001600160a01b0316836001600160a01b03167f0c36dae1f39b464778dcec62b4435ff14d934d164f85cb48995f9536fa4a9c72898b6040516131f6929190918252602082015260400190565b60405180910390a450613292565b600095506132377f0000000000000000000000002d83f5bfc83cf0b09b8884101c015fa9c74c32f3828d60800151612e45565b866001600160a01b0316816001600160a01b03167fc0b6b4b152b639767dd4ffd28f2a0f05b4ffd672264a6c4d34447185a03cc5178d6060015188604051613289929190918252602082015260400190565b60405180910390a35b505050509450945094915050565b60018055565b6132b0828261209d565b6132d157808260405163e2517d3f60e01b8152600401612d379291906139a4565b5050565b5080546000825560070290600052602060002090810190612c3691905b808211156133435780546001600160a01b03199081168255600182018054821690556002820180549091169055600060038201819055600482018190556005820181905560068201556007016132f2565b5090565b60006020828403121561335957600080fd5b81356001600160e01b03198116811461337157600080fd5b9392505050565b60006020828403121561338a57600080fd5b5035919050565b6001600160a01b0381168114612c3657600080fd5b6000806000606084860312156133bb57600080fd5b83356133c681613391565b95602085013595506040909401359392505050565b8015158114612c3657600080fd5b600080604083850312156133fc57600080fd5b823561340781613391565b91506020830135613417816133db565b809150509250929050565b6000806040838503121561343557600080fd5b82359150602083013561341781613391565b60006020828403121561345957600080fd5b813561337181613391565b6000806000806080858703121561347a57600080fd5b843561348581613391565b9350602085013561349581613391565b93969395505050506040820135916060013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156134e9576134e96134aa565b604052919050565b600067ffffffffffffffff82111561350b5761350b6134aa565b5060051b60200190565b600082601f83011261352657600080fd5b8135613539613534826134f1565b6134c0565b8082825260208201915060208360051b86010192508583111561355b57600080fd5b602085015b8381101561358157803561357381613391565b835260209283019201613560565b5095945050505050565b600082601f83011261359c57600080fd5b81356135aa613534826134f1565b8082825260208201915060208360051b8601019250858311156135cc57600080fd5b602085015b838110156135815780358352602092830192016135d1565b6000806000606084860312156135fe57600080fd5b833567ffffffffffffffff81111561361557600080fd5b61362186828701613515565b935050602084013567ffffffffffffffff81111561363e57600080fd5b61364a8682870161358b565b93969395505050506040919091013590565b60008060006060848603121561367157600080fd5b833561367c81613391565b9250602084013561368c81613391565b9150604084013561369c816133db565b809150509250925092565b600080604083850312156136ba57600080fd5b823567ffffffffffffffff8111156136d157600080fd5b6136dd85828601613515565b925050602083013567ffffffffffffffff8111156136fa57600080fd5b6137068582860161358b565b9150509250929050565b6000806040838503121561372357600080fd5b823561372e81613391565b9150602083013561341781613391565b602080825282518282018190526000918401906040840190835b818110156137ca57835180516001600160a01b03908116855260208083015182168187015260408084015190921691860191909152606080830151908601526080808301519086015260a0808301519086015260c091820151918501919091529093019260e090920191600101613758565b509095945050505050565b600081518084526020840193506020830160005b828110156138105781516001600160a01b03168652602095860195909101906001016137e9565b5093949350505050565b60208152600061337160208301846137d5565b60006020828403121561383f57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60ff82811682821603908111156108ae576108ae613846565b6001815b60018411156138b05780850481111561389457613894613846565b60018416156138a257908102905b60019390931c928002613879565b935093915050565b6000826138c7575060016108ae565b816138d4575060006108ae565b81600181146138ea57600281146138f457613910565b60019150506108ae565b60ff84111561390557613905613846565b50506001821b6108ae565b5060208310610133831016604e8410600b8410161715613933575081810a6108ae565b6139406000198484613875565b806000190482111561395457613954613846565b029392505050565b600061337160ff8416836138b8565b80820281158282048414176108ae576108ae613846565b60008261399f57634e487b7160e01b600052601260045260246000fd5b500490565b6001600160a01b03929092168252602082015260400190565b818103818111156108ae576108ae613846565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b808201808211156108ae576108ae613846565b606081526000613a2260608301866137d5565b828103602084015280855180835260208301915060208701925060005b81811015613a5d578351835260209384019390920191600101613a3f565b505060409390930193909352509392505050565b600060208284031215613a8357600080fd5b815161337181613391565b600060208284031215613aa057600080fd5b815160ff8116811461337157600080fd5b6000825160005b81811015613ad25760208186018101518583015201613ab8565b506000920191825250919050565b600060208284031215613af257600080fd5b8151613371816133db56fee6ad9a47fbda1dc18de1eb5eeb7d935e5e81b4748f3cfc61e233e64f88182060a2646970667358221220eb8559fb7155ad00de790b2f4bf8be44bf33b5e7c8c8fb687ee52dd787f9bf2064736f6c634300081a0033","source_code":"// SPDX-License-Identifier: BUSL-1.1\npragma solidity 0.8.26;\n\nimport {AccessControl} from \"@openzeppelin/contracts/access/AccessControl.sol\";\nimport {ReentrancyGuard} from \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\nimport {ERC20} from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport {TransferHelper} from \"@uniswap/v3-periphery/contracts/libraries/TransferHelper.sol\";\n\nimport {OracleConfigurator} from \"../oracle/OracleConfigurator.sol\";\nimport {Token} from \"../token/Token.sol\";\nimport \"../utils/Errors.sol\";\n\ncontract AssetVault is AccessControl, ReentrancyGuard {\n    bytes32 public constant SUPPORTED_TOKEN_OPERATION_ROLE =\n        keccak256(\"SUPPORTED_TOKEN_OPERATION_ROLE\");\n    bytes32 public constant PAUSE_OPERATION_ROLE =\n        keccak256(\"PAUSE_OPERATION_ROLE\");\n    bytes32 public constant WHITELIST_OPERATION_ROLE =\n        keccak256(\"WHITELIST_OPERATION_ROLE\");\n    bytes32 public constant WITHDRAWAL_PROCESS_ROLE =\n        keccak256(\"WITHDRAWAL_PROCESS_ROLE\");\n    bytes32 public constant ASSETS_MANAGEMENT_ROLE =\n        keccak256(\"ASSETS_MANAGEMENT_ROLE\");\n    bytes32 public constant FEE_SETTER_ROLE = keccak256(\"FEE_SETTER_ROLE\");\n    bytes32 public constant MARKET_MAKER_ROLE = keccak256(\"MARKET_MAKER_ROLE\");\n\n    uint256 public constant D2 = 1e2;\n    uint256 public constant D4 = 1e4;\n    uint256 public constant D18 = 1e18;\n\n    Token public immutable lpToken;\n    OracleConfigurator public immutable oracleConfigurator;\n\n    address[] public underlyingTokens;\n\n    WithdrawalRequest[] public withdrawalRequests;\n\n    mapping(address => bool) public isUnderlyingToken;\n    mapping(address => uint8) public tokenDecimals;\n\n    uint256 public depositFeeRate;\n    uint256 public withdrawFeeRate;\n\n    mapping(uint256 => uint256) public idToWithdrawalRequest;\n\n    uint256 public withdrawalCounter;\n\n    address public feeRecipient;\n\n    mapping(address => bool) public depositPaused;\n    mapping(address => bool) public withdrawPaused;\n\n    mapping(address => bool) public whitelistMode;\n    mapping(address => mapping(address => bool)) public depositWhitelist;\n\n    struct WithdrawalRequest {\n        address requester;\n        address receiver;\n        address requestToken;\n        uint256 id;\n        uint256 lpAmount;\n        uint256 minReceiveAmount;\n        uint256 timestamp;\n    }\n    event Deposit(\n        address indexed account,\n        address indexed token,\n        uint256 tokenAmount,\n        uint256 lpAmount\n    );\n    event Deposit(\n        address indexed account,\n        address[] tokens,\n        uint256[] tokenAmounts,\n        uint256 lpAmount\n    );\n    event WithdrawalRequested(\n        address indexed requester,\n        address indexed receiver,\n        address indexed requestToken,\n        uint256 id,\n        uint256 lpAmount,\n        uint256 minReceiveAmount\n    );\n    event WithdrawalCancelled(\n        address indexed requester,\n        address indexed requestToken,\n        uint256 id,\n        uint256 lpAmount\n    );\n    event WithdrawalProcessed(\n        address indexed requester,\n        address indexed receiver,\n        address indexed requestToken,\n        uint256 lpAmount,\n        uint256 finalizedAmount\n    );\n    event WithdrawFromVault(\n        address indexed curator,\n        address indexed token,\n        uint256 amount\n    );\n    event RepayToVault(\n        address indexed curator,\n        address indexed token,\n        uint256 amount\n    );\n    event TokenAdded(address token);\n    event TokenRemoved(address token);\n    event SetDepositPause(address token, bool paused);\n    event SetWithdrawPause(address token, bool paused);\n    event SetWhitelistMode(address token, bool whitelistMode);\n    event SetWhitelist(address token, address user, bool allowed);\n    event SetWithdrawFeeRate(uint256 rate);\n    event SetDepositFeeRate(uint256 rate);\n    event SetFeeRecipient(address recipient);\n    event FeeCharged(address recipient, uint256 amount);\n\n    constructor(address _lpToken, address _oracleConfigurator) {\n        _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\n        lpToken = Token(_lpToken);\n        oracleConfigurator = OracleConfigurator(_oracleConfigurator);\n\n        if (oracleConfigurator.oracles(address(lpToken)) == address(0))\n            revert InvalidOracle();\n    }\n\n    function deposit(\n        address _token,\n        uint256 _amount,\n        uint256 _minLpAmount\n    ) external returns (uint256 mintAmount) {\n        if (!isUnderlyingToken[_token]) revert InvalidToken();\n        if (depositPaused[_token]) revert Paused();\n        if (_amount == 0) revert ZeroAmount();\n        if (whitelistMode[_token] && !depositWhitelist[_token][msg.sender])\n            revert NotWhitelisted();\n\n        TransferHelper.safeTransferFrom(\n            _token,\n            msg.sender,\n            address(this),\n            _amount\n        );\n\n        uint256 lpPrice = oracleConfigurator.getPrice(address(lpToken));\n        uint256 underlyingPrice = oracleConfigurator.getPrice(_token);\n\n        mintAmount =\n            (_amount * 10 ** (18 - tokenDecimals[_token]) * underlyingPrice) /\n            lpPrice;\n\n        uint256 feeRate = depositFeeRate;\n        address recipient = feeRecipient;\n        if (feeRate > 0) {\n            uint256 fee = (mintAmount * feeRate) / D4;\n            lpToken.mint(recipient, fee);\n\n            emit FeeCharged(recipient, fee);\n            mintAmount = mintAmount - fee;\n        }\n\n        if (mintAmount < _minLpAmount) revert InsufficientOutputAmount();\n\n        lpToken.mint(msg.sender, mintAmount);\n\n        emit Deposit(msg.sender, _token, _amount, mintAmount);\n    }\n\n    function depositMultiple(\n        address[] memory _tokens,\n        uint256[] memory _amounts,\n        uint256 _minLpAmount\n    ) external returns (uint256 totalMintAmount) {\n        uint256 length = _tokens.length;\n        if (length == 0 || _amounts.length != length)\n            revert InvalidArrayLength();\n\n        uint256 lpPrice = oracleConfigurator.getPrice(address(lpToken));\n\n        uint256 i;\n        for (i; i < length; i++) {\n            address token = _tokens[i];\n            if (!isUnderlyingToken[token]) revert InvalidToken();\n            if (depositPaused[token]) revert Paused();\n            if (whitelistMode[token] && !depositWhitelist[token][msg.sender])\n                revert NotWhitelisted();\n\n            uint256 amount = _amounts[i];\n            if (amount == 0) revert ZeroAmount();\n\n            TransferHelper.safeTransferFrom(\n                token,\n                msg.sender,\n                address(this),\n                amount\n            );\n\n            uint256 underlyingPrice = oracleConfigurator.getPrice(token);\n\n            uint256 mintAmount = (amount *\n                10 ** (18 - tokenDecimals[token]) *\n                underlyingPrice) / lpPrice;\n            totalMintAmount += mintAmount;\n        }\n\n        uint256 feeRate = depositFeeRate;\n        address recipient = feeRecipient;\n        if (feeRate > 0) {\n            uint256 fee = (totalMintAmount * feeRate) / D4;\n            lpToken.mint(recipient, fee);\n\n            emit FeeCharged(recipient, fee);\n            totalMintAmount = totalMintAmount - fee;\n        }\n\n        if (totalMintAmount < _minLpAmount) revert InsufficientOutputAmount();\n\n        lpToken.mint(msg.sender, totalMintAmount);\n\n        emit Deposit(msg.sender, _tokens, _amounts, totalMintAmount);\n    }\n\n    function requestWithdraw(\n        address _requestToken,\n        address _receiver,\n        uint256 _lpAmount,\n        uint256 _minReceiveAmount\n    ) external onlyRole(MARKET_MAKER_ROLE) returns (uint256 id) {\n        if (_receiver == address(0)) revert ZeroAddress();\n        if (_lpAmount == 0) revert ZeroAmount();\n        if (!isUnderlyingToken[_requestToken]) revert InvalidToken();\n        if (withdrawPaused[_requestToken]) revert Paused();\n\n        TransferHelper.safeTransferFrom(\n            address(lpToken),\n            msg.sender,\n            address(this),\n            _lpAmount\n        );\n\n        withdrawalRequests.push(\n            WithdrawalRequest({\n                requester: msg.sender,\n                receiver: _receiver,\n                requestToken: _requestToken,\n                id: withdrawalCounter,\n                lpAmount: _lpAmount,\n                minReceiveAmount: _minReceiveAmount,\n                timestamp: block.timestamp\n            })\n        );\n        id = withdrawalCounter;\n        withdrawalCounter = withdrawalCounter + 1;\n        idToWithdrawalRequest[id] = withdrawalRequests.length - 1;\n\n        emit WithdrawalRequested(\n            msg.sender,\n            _receiver,\n            _requestToken,\n            id,\n            _lpAmount,\n            _minReceiveAmount\n        );\n    }\n\n    function cancelWithdrawal(uint256 _id) external {\n        uint256 index = idToWithdrawalRequest[_id];\n        uint256 length = withdrawalRequests.length;\n        if (index >= length || _id >= withdrawalCounter)\n            revert ArrayIndexOutOfBounds();\n\n        WithdrawalRequest memory withdrawalRequest = withdrawalRequests[index];\n        address requester = withdrawalRequest.requester;\n        if (msg.sender != requester) revert WrongRequester();\n\n        idToWithdrawalRequest[_id] = type(uint256).max;\n        idToWithdrawalRequest[withdrawalRequests[length - 1].id] = index;\n        withdrawalRequests[index] = withdrawalRequests[length - 1];\n        withdrawalRequests.pop();\n\n        uint256 lpAmount = withdrawalRequest.lpAmount;\n\n        TransferHelper.safeTransfer(address(lpToken), requester, lpAmount);\n\n        emit WithdrawalCancelled(\n            requester,\n            withdrawalRequest.requestToken,\n            _id,\n            lpAmount\n        );\n    }\n\n    function processWithdrawal(\n        uint256 _id\n    )\n        external\n        nonReentrant\n        onlyRole(WITHDRAWAL_PROCESS_ROLE)\n        returns (\n            address requestToken,\n            uint256 finalizedAmount,\n            uint256 lpAmount\n        )\n    {\n        uint256 index = idToWithdrawalRequest[_id];\n        uint256 length = withdrawalRequests.length;\n        if (index >= length || _id >= withdrawalCounter)\n            revert ArrayIndexOutOfBounds();\n\n        WithdrawalRequest memory withdrawalRequest = withdrawalRequests[index];\n        if (_id != withdrawalRequest.id) revert InvalidReceipt();\n\n        uint256 lpPrice = oracleConfigurator.getPrice(address(lpToken));\n\n        (requestToken, finalizedAmount, lpAmount) = _finalizeWithdraw(\n            withdrawalRequest,\n            lpPrice,\n            withdrawFeeRate,\n            feeRecipient\n        );\n\n        idToWithdrawalRequest[withdrawalRequests[length - 1].id] = index;\n        idToWithdrawalRequest[_id] = type(uint256).max;\n\n        withdrawalRequests[index] = withdrawalRequests[length - 1];\n        withdrawalRequests.pop();\n    }\n\n    function processAllWithdrawal()\n        external\n        nonReentrant\n        onlyRole(WITHDRAWAL_PROCESS_ROLE)\n    {\n        uint256 length = withdrawalRequests.length;\n        if (length == 0) revert InvalidArrayLength();\n\n        uint256 lpPrice = oracleConfigurator.getPrice(address(lpToken));\n\n        uint256 i;\n        for (i; i < length; i++) {\n            WithdrawalRequest memory withdrawalRequest = withdrawalRequests[i];\n\n            _finalizeWithdraw(\n                withdrawalRequest,\n                lpPrice,\n                withdrawFeeRate,\n                feeRecipient\n            );\n\n            idToWithdrawalRequest[withdrawalRequest.id] = type(uint256).max;\n        }\n\n        delete withdrawalRequests;\n    }\n\n    function _finalizeWithdraw(\n        WithdrawalRequest memory _withdrawalRequest,\n        uint256 _lpPrice,\n        uint256 _withdrawFeeRate,\n        address _feeRecipient\n    )\n        internal\n        returns (\n            address requestToken,\n            uint256 finalizedAmount,\n            uint256 lpAmount\n        )\n    {\n        uint256 minReceiveAmount = _withdrawalRequest.minReceiveAmount;\n        requestToken = _withdrawalRequest.requestToken;\n\n        lpAmount = _withdrawalRequest.lpAmount;\n\n        uint256 fee;\n        if (_withdrawFeeRate > 0) {\n            fee = (lpAmount * _withdrawFeeRate) / D4;\n            lpAmount = lpAmount - fee;\n        }\n\n        uint256 underlyingPrice = oracleConfigurator.getPrice(requestToken);\n\n        finalizedAmount =\n            (lpAmount * _lpPrice) /\n            underlyingPrice /\n            (10 ** (18 - tokenDecimals[requestToken]));\n\n        address requester = _withdrawalRequest.requester;\n        if (finalizedAmount >= minReceiveAmount) {\n            address receiver = _withdrawalRequest.receiver;\n\n            if (fee > 0) {\n                TransferHelper.safeTransfer(\n                    address(lpToken),\n                    _feeRecipient,\n                    fee\n                );\n\n                emit FeeCharged(_feeRecipient, fee);\n            }\n\n            lpToken.burn(address(this), lpAmount);\n\n            TransferHelper.safeTransfer(\n                address(requestToken),\n                receiver,\n                finalizedAmount\n            );\n            emit WithdrawalProcessed(\n                requester,\n                receiver,\n                requestToken,\n                lpAmount,\n                finalizedAmount\n            );\n        } else {\n            finalizedAmount = 0;\n\n            TransferHelper.safeTransfer(\n                address(lpToken),\n                requester,\n                _withdrawalRequest.lpAmount\n            );\n            emit WithdrawalCancelled(\n                requester,\n                requestToken,\n                _withdrawalRequest.id,\n                lpAmount\n            );\n        }\n    }\n\n    function withdrawFromVault(\n        address[] memory _tokens,\n        uint256[] memory _amounts\n    ) external onlyRole(ASSETS_MANAGEMENT_ROLE) {\n        uint256 length = _tokens.length;\n        if (length == 0 || length != _amounts.length)\n            revert InvalidArrayLength();\n\n        uint256 i;\n        for (i; i < length; i++) {\n            address token = _tokens[i];\n            uint256 amount = _amounts[i];\n            TransferHelper.safeTransfer(token, msg.sender, amount);\n\n            emit WithdrawFromVault(msg.sender, token, amount);\n        }\n    }\n\n    function repayToVault(\n        address[] memory _tokens,\n        uint256[] memory _amounts\n    ) external onlyRole(ASSETS_MANAGEMENT_ROLE) {\n        uint256 length = _tokens.length;\n        if (length == 0 || length != _amounts.length)\n            revert InvalidArrayLength();\n\n        uint256 i;\n        for (i; i < length; i++) {\n            address token = _tokens[i];\n            uint256 amount = _amounts[i];\n            TransferHelper.safeTransferFrom(\n                token,\n                msg.sender,\n                address(this),\n                amount\n            );\n\n            emit RepayToVault(msg.sender, token, amount);\n        }\n    }\n\n    function addUnderlyingToken(\n        address _token\n    ) external onlyRole(SUPPORTED_TOKEN_OPERATION_ROLE) {\n        if (_token == address(0) || _token == address(lpToken))\n            revert InvalidToken();\n        if (isUnderlyingToken[_token]) revert TokenAlreadyAdd();\n        if (oracleConfigurator.oracles(_token) == address(0))\n            revert InvalidOracle();\n\n        uint8 decimals = ERC20(_token).decimals();\n        if (decimals > 18) revert InvalidDecimals();\n\n        isUnderlyingToken[_token] = true;\n        tokenDecimals[_token] = decimals;\n        underlyingTokens.push(_token);\n\n        emit TokenAdded(_token);\n    }\n\n    function removeUnderlyingToken(\n        address _token\n    ) external onlyRole(SUPPORTED_TOKEN_OPERATION_ROLE) {\n        if (!isUnderlyingToken[_token]) revert InvalidToken();\n        if (ERC20(_token).balanceOf(address(this)) != 0)\n            revert NonEmptySupportedToken();\n\n        address[] memory tokens = underlyingTokens;\n\n        uint256 length = tokens.length;\n        uint256 i;\n        for (i; i < length; i++) {\n            if (tokens[i] == _token) {\n                underlyingTokens[i] = underlyingTokens[length - 1];\n                underlyingTokens.pop();\n                break;\n            }\n        }\n        isUnderlyingToken[_token] = false;\n        delete tokenDecimals[_token];\n\n        emit TokenRemoved(_token);\n    }\n\n    function setDepositPause(\n        address _token,\n        bool _pause\n    ) external onlyRole(PAUSE_OPERATION_ROLE) {\n        depositPaused[_token] = _pause;\n        emit SetDepositPause(_token, _pause);\n    }\n\n    function setWithdrawPause(\n        address _token,\n        bool _pause\n    ) external onlyRole(PAUSE_OPERATION_ROLE) {\n        withdrawPaused[_token] = _pause;\n        emit SetWithdrawPause(_token, _pause);\n    }\n\n    function setWhitelistMode(\n        address _token,\n        bool _applyWhitelist\n    ) external onlyRole(WHITELIST_OPERATION_ROLE) {\n        whitelistMode[_token] = _applyWhitelist;\n        emit SetWhitelistMode(_token, _applyWhitelist);\n    }\n\n    function setWhitelistAddress(\n        address _token,\n        address _minter,\n        bool _allowed\n    ) external onlyRole(WHITELIST_OPERATION_ROLE) {\n        depositWhitelist[_token][_minter] = _allowed;\n        emit SetWhitelist(_token, _minter, _allowed);\n    }\n\n    function setWithdrawFeeRate(\n        uint256 _rate\n    ) external onlyRole(FEE_SETTER_ROLE) {\n        if (_rate > 0 && feeRecipient == address(0)) revert NoFeeRecipient();\n        if (_rate > D2) revert InvalidFeeRate();\n        withdrawFeeRate = _rate;\n        emit SetWithdrawFeeRate(_rate);\n    }\n\n    function setDepositFeeRate(\n        uint256 _rate\n    ) external onlyRole(FEE_SETTER_ROLE) {\n        if (_rate > 0 && feeRecipient == address(0)) revert NoFeeRecipient();\n        if (_rate > D2) revert InvalidFeeRate();\n        depositFeeRate = _rate;\n        emit SetDepositFeeRate(_rate);\n    }\n\n    function setFeeRecipient(\n        address _address\n    ) external onlyRole(FEE_SETTER_ROLE) {\n        if (_address == address(0)) {\n            depositFeeRate = 0;\n            withdrawFeeRate = 0;\n\n            emit SetDepositFeeRate(0);\n            emit SetWithdrawFeeRate(0);\n        }\n        feeRecipient = _address;\n        emit SetFeeRecipient(_address);\n    }\n\n    function getUnderlyings()\n        external\n        view\n        returns (address[] memory underlyings)\n    {\n        return underlyingTokens;\n    }\n\n    function getRequestsLength() external view returns (uint256 length) {\n        length = withdrawalRequests.length;\n    }\n\n    function getRequestWithdrawals()\n        external\n        view\n        returns (WithdrawalRequest[] memory allWithdrawalRequests)\n    {\n        return withdrawalRequests;\n    }\n}\n","creation_status":"success","file_path":"src/vault/AssetVault.sol"}