{"file_path":"contracts/EmberProtocolConfig.sol","creation_status":"success","source_code":"/*\n  Copyright (c) 2026 Ember Protocol Inc.\n  Proprietary Smart Contract License – All Rights Reserved.\n\n  This source code is provided for transparency and verification only.\n  Use, modification, reproduction, or redeployment of this code \n  requires prior written permission from the Ember Protocol Inc.\n*/\n\npragma solidity ^0.8.22;\n\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol\";\nimport \"./interfaces/IAtomicLiquidity.sol\";\nimport \"./interfaces/IEmberProtocolConfig.sol\";\nimport \"./interfaces/IEmberVault.sol\";\nimport \"./interfaces/IEmberVaultValidator.sol\";\n\n/// @title Ember Protocol Configuration\n/// @notice Stores configuration parameters that govern the vault system and manages vault admin operations\ncontract EmberProtocolConfig is\n  Initializable,\n  UUPSUpgradeable,\n  OwnableUpgradeable,\n  ReentrancyGuardUpgradeable,\n  IEmberProtocolConfig\n{\n  // Constants\n  uint256 public constant MIN_RATE = 250_000_000_000_000_000;\n  uint256 public constant MAX_RATE = 5_000_000_000_000_000_000;\n  uint256 public constant DEFAULT_RATE = 1_000_000_000_000_000_000;\n  uint256 public constant MIN_RATE_INTERVAL = 60 * 60 * 1000; // 1 hour in milliseconds\n  uint256 public constant MAX_RATE_INTERVAL = 24 * 60 * 60 * 1000; // 1 day in milliseconds\n  uint256 public constant MAX_FEE_PERCENTAGE = 100_000_000_000_000_000;\n  /// @dev L-5: hard ceiling on withdrawal fees (50%, in 1e18 fixed-point), enforced both\n  ///      individually and combined (permanent + time-based). The prior `< 1e18` bound only\n  ///      prevented the net-payout underflow, so a confiscatory 99% withdrawal fee was settable.\n  uint256 public constant MAX_WITHDRAWAL_FEE_PERCENTAGE = 500_000_000_000_000_000;\n\n  // Structs\n  struct ProtocolConfig {\n    bool pause;\n    address platformFeeRecipient;\n    uint256 minRate;\n    uint256 maxRate;\n    uint256 defaultRate;\n    uint256 minRateInterval;\n    uint256 maxRateInterval;\n    uint256 maxFeePercentage;\n  }\n\n  // State variables\n  ProtocolConfig public protocolConfig;\n\n  /// @notice list of all blacklisted addresses\n  mapping(address => bool) public blacklistedAccounts;\n\n  /// @notice Emergency-response role with a narrow surface (blacklist + pause).\n  ///         Settable by `setGuardian` (onlyOwner). When set to address(0)\n  ///         the guardian-gated functions are unreachable.\n  address public guardian;\n\n  /**\n   * @dev Reserved storage gap for future upgrades.\n   * This allows adding new state variables without shifting storage slots.\n   * See: https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable#storage-gaps\n   */\n  uint256[49] private __gap;\n\n  // Events are inherited from IEmberProtocolConfig\n\n  /// @notice Restricts a function to the configured guardian. If `guardian`\n  ///         is address(0) (unset), this naturally rejects all callers.\n  modifier onlyGuardian() {\n    if (msg.sender != guardian) revert Unauthorized();\n    _;\n  }\n\n  /// @custom:oz-upgrades-unsafe-allow constructor\n  constructor() {\n    _disableInitializers();\n  }\n\n  /// @param _platformFeeRecipient Recipient for all platform fees\n  /**\n   * @dev Initialize function replaces constructor for upgradeable contracts\n   * @param initialOwner Address of the contract owner\n   * @param _platformFeeRecipient Recipient for all platform fees\n   */\n  function initialize(address initialOwner, address _platformFeeRecipient) public initializer {\n    __Ownable_init(initialOwner);\n    __UUPSUpgradeable_init();\n    __ReentrancyGuard_init();\n\n    if (_platformFeeRecipient == address(0)) revert ZeroAddress();\n\n    protocolConfig = ProtocolConfig({\n      pause: false,\n      platformFeeRecipient: _platformFeeRecipient,\n      minRate: MIN_RATE,\n      maxRate: MAX_RATE,\n      defaultRate: DEFAULT_RATE,\n      minRateInterval: MIN_RATE_INTERVAL,\n      maxRateInterval: MAX_RATE_INTERVAL,\n      maxFeePercentage: MAX_FEE_PERCENTAGE\n    });\n  }\n\n  /// @notice Pauses or unpauses non-admin operations\n  /// @param pauseFlag True to pause, false to resume\n  function pauseNonAdminOperations(bool pauseFlag) external nonReentrant onlyOwner {\n    if (pauseFlag == protocolConfig.pause) revert SameValue();\n    protocolConfig.pause = pauseFlag;\n    emit PauseNonAdminOperations(pauseFlag);\n  }\n\n  /// @notice Updates where platform fees are sent\n  function updatePlatformFeeRecipient(address recipient) external nonReentrant onlyOwner {\n    if (recipient == address(0)) revert ZeroAddress();\n    if (recipient == protocolConfig.platformFeeRecipient) revert SameValue();\n    address previous = protocolConfig.platformFeeRecipient;\n    protocolConfig.platformFeeRecipient = recipient;\n    emit PlatformFeeRecipientUpdated(previous, recipient);\n  }\n\n  /// @notice Updates the minimum allowable rate\n  function updateMinRate(uint256 minRate_) external nonReentrant onlyOwner {\n    if (minRate_ == 0 || minRate_ > protocolConfig.maxRate || minRate_ > protocolConfig.defaultRate)\n      revert InvalidRate();\n    if (minRate_ == protocolConfig.minRate) revert SameValue();\n    uint256 previous = protocolConfig.minRate;\n    protocolConfig.minRate = minRate_;\n    emit MinRateUpdated(previous, minRate_);\n  }\n\n  /// @notice Updates the maximum allowable rate\n  function updateMaxRate(uint256 maxRate_) external nonReentrant onlyOwner {\n    if (maxRate_ < protocolConfig.minRate || maxRate_ < protocolConfig.defaultRate)\n      revert InvalidRate();\n    if (maxRate_ == protocolConfig.maxRate) revert SameValue();\n    uint256 previous = protocolConfig.maxRate;\n    protocolConfig.maxRate = maxRate_;\n    emit MaxRateUpdated(previous, maxRate_);\n  }\n\n  /// @notice Updates the default rate applied to new vaults\n  function updateDefaultRate(uint256 defaultRate_) external nonReentrant onlyOwner {\n    if (defaultRate_ < protocolConfig.minRate || defaultRate_ > protocolConfig.maxRate)\n      revert InvalidRate();\n    if (defaultRate_ == protocolConfig.defaultRate) revert SameValue();\n    uint256 previous = protocolConfig.defaultRate;\n    protocolConfig.defaultRate = defaultRate_;\n    emit DefaultRateUpdated(previous, defaultRate_);\n  }\n\n  /// @notice Updates the maximum fee percentage\n  function updateMaxFeePercentage(uint256 maxFeePercentage_) external nonReentrant onlyOwner {\n    if (maxFeePercentage_ > MAX_FEE_PERCENTAGE) revert InvalidFeePercentage();\n    if (maxFeePercentage_ == protocolConfig.maxFeePercentage) revert SameValue();\n    uint256 previous = protocolConfig.maxFeePercentage;\n    protocolConfig.maxFeePercentage = maxFeePercentage_;\n    emit MaxAllowedFeePercentageUpdated(previous, maxFeePercentage_);\n  }\n\n  /// @notice Updates the minimum interval for rate changes\n  /// @dev Lower-bounded by the protocol-level MIN_RATE_INTERVAL constant (1 hour) so the\n  ///      configurable floor cannot fall below the policy default.\n  function updateMinRateInterval(uint256 minRateInterval_) external nonReentrant onlyOwner {\n    if (minRateInterval_ < MIN_RATE_INTERVAL || minRateInterval_ > protocolConfig.maxRateInterval)\n      revert InvalidInterval();\n    if (minRateInterval_ == protocolConfig.minRateInterval) revert SameValue();\n    uint256 previous = protocolConfig.minRateInterval;\n    protocolConfig.minRateInterval = minRateInterval_;\n    emit MinRateIntervalUpdated(previous, minRateInterval_);\n  }\n\n  /// @notice Updates the maximum interval for rate changes\n  function updateMaxRateInterval(uint256 maxRateInterval_) external nonReentrant onlyOwner {\n    if (maxRateInterval_ < protocolConfig.minRateInterval || maxRateInterval_ > MAX_RATE_INTERVAL)\n      revert InvalidInterval();\n    if (maxRateInterval_ == protocolConfig.maxRateInterval) revert SameValue();\n    uint256 previous = protocolConfig.maxRateInterval;\n    protocolConfig.maxRateInterval = maxRateInterval_;\n    emit MaxRateIntervalUpdated(previous, maxRateInterval_);\n  }\n\n  /// @notice Adds or removes an account from the blacklist\n  function setBlacklistedAccount(\n    address account,\n    bool blacklisted\n  ) external nonReentrant onlyOwner {\n    if (account == address(0)) revert ZeroAddress();\n    if (blacklistedAccounts[account] == blacklisted) revert SameValue();\n    blacklistedAccounts[account] = blacklisted;\n    emit BlacklistedAccountUpdated(account, blacklisted);\n  }\n\n  // ============================================\n  // Guardian Functions\n  // ============================================\n\n  /// @notice Sets the guardian address. Pass address(0) to disable\n  ///         guardian-gated functions entirely.\n  function setGuardian(address newGuardian) external nonReentrant onlyOwner {\n    if (newGuardian == guardian) revert SameValue();\n    address previous = guardian;\n    guardian = newGuardian;\n    emit GuardianUpdated(previous, newGuardian);\n  }\n\n  /// @notice Guardian fast-path for `pauseNonAdminOperations`. Behaves\n  ///         identically to the owner version but is callable without\n  ///         going through the timelock.\n  function guardianPauseNonAdminOperations(bool pauseFlag) external nonReentrant onlyGuardian {\n    if (pauseFlag == protocolConfig.pause) revert SameValue();\n    protocolConfig.pause = pauseFlag;\n    emit PauseNonAdminOperations(pauseFlag);\n  }\n\n  /// @notice Guardian fast-path for `setBlacklistedAccount`. Behaves\n  ///         identically to the owner version but is callable without\n  ///         going through the timelock.\n  function guardianSetBlacklistedAccount(\n    address account,\n    bool blacklisted\n  ) external nonReentrant onlyGuardian {\n    if (account == address(0)) revert ZeroAddress();\n    if (blacklistedAccounts[account] == blacklisted) revert SameValue();\n    blacklistedAccounts[account] = blacklisted;\n    emit BlacklistedAccountUpdated(account, blacklisted);\n  }\n\n  // ============================================\n  // Vault Admin Functions\n  // ============================================\n  // These functions validate parameters then forward to the vault with the original caller.\n  // The vault verifies the caller has the required role (admin/owner).\n\n  /// @notice Updates the max TVL of a vault\n  /// @dev Validates parameters, then forwards to vault which verifies caller is admin\n  /// @param vault The vault address\n  /// @param newMaxTVL The new maximum total value locked\n  function updateVaultMaxTVL(address vault, uint256 newMaxTVL) external nonReentrant {\n    if (newMaxTVL == 0) revert InvalidValue();\n    if (newMaxTVL == IEmberVault(vault).maxTVL()) revert SameValue();\n\n    uint256 currentTVL = IEmberVault(vault).totalAssets();\n    if (currentTVL > newMaxTVL) revert InvalidValue();\n\n    IEmberVault(vault).setMaxTVL(msg.sender, newMaxTVL);\n  }\n\n  /// @notice Changes the vault rate update interval\n  /// @dev Validates parameters, then forwards to vault which verifies caller is admin\n  /// @param vault The vault address\n  /// @param newInterval The new rate update interval (in milliseconds)\n  function updateVaultRateUpdateInterval(address vault, uint256 newInterval) external nonReentrant {\n    if (\n      newInterval < protocolConfig.minRateInterval || newInterval > protocolConfig.maxRateInterval\n    ) revert InvalidInterval();\n    if (newInterval == IEmberVault(vault).rate().rateUpdateInterval) revert SameValue();\n\n    IEmberVault(vault).setRateUpdateInterval(msg.sender, newInterval);\n  }\n\n  /// @notice Changes the vault max rate change per update\n  /// @dev Validates parameters, then forwards to vault which verifies caller is admin\n  /// @param vault The vault address\n  /// @param newMaxRateChangePerUpdate The new max rate change allowed per update (1e18 = 100%)\n  function updateVaultMaxRateChangePerUpdate(\n    address vault,\n    uint256 newMaxRateChangePerUpdate\n  ) external nonReentrant {\n    if (newMaxRateChangePerUpdate == 0) revert InvalidRate();\n    if (newMaxRateChangePerUpdate == IEmberVault(vault).rate().maxRateChangePerUpdate)\n      revert SameValue();\n\n    IEmberVault(vault).setMaxRateChangePerUpdate(msg.sender, newMaxRateChangePerUpdate);\n  }\n\n  /// @notice Changes the vault admin\n  /// @dev Validates parameters, then forwards to vault which verifies caller is owner\n  /// @param vault The vault address\n  /// @param newAdmin The new admin address\n  function updateVaultAdmin(address vault, address newAdmin) external nonReentrant {\n    if (newAdmin == address(0)) revert ZeroAddress();\n\n    IEmberVault.Roles memory vaultRoles = IEmberVault(vault).roles();\n    if (newAdmin == vaultRoles.admin) revert SameValue();\n    if (newAdmin == vaultRoles.rateManager || newAdmin == vaultRoles.operator)\n      revert InvalidValue();\n    if (IEmberVault(vault).subAccounts(newAdmin)) revert InvalidValue();\n    if (blacklistedAccounts[newAdmin]) revert Blacklisted();\n\n    IEmberVault(vault).setAdmin(msg.sender, newAdmin);\n  }\n\n  /// @notice Changes the vault operator\n  /// @dev Validates parameters, then forwards to vault which verifies caller is admin\n  /// @param vault The vault address\n  /// @param newOperator The new operator address\n  function updateVaultOperator(address vault, address newOperator) external nonReentrant {\n    if (newOperator == address(0)) revert ZeroAddress();\n\n    IEmberVault.Roles memory vaultRoles = IEmberVault(vault).roles();\n    if (newOperator == vaultRoles.operator) revert SameValue();\n    if (newOperator == vaultRoles.rateManager || newOperator == vaultRoles.admin)\n      revert InvalidValue();\n    if (IEmberVault(vault).subAccounts(newOperator)) revert InvalidValue();\n    if (blacklistedAccounts[newOperator]) revert Blacklisted();\n\n    IEmberVault(vault).setOperator(msg.sender, newOperator);\n  }\n\n  /// @notice Updates the address of the vault rate manager\n  /// @dev Validates parameters, then forwards to vault which verifies caller is admin\n  /// @param vault The vault address\n  /// @param newRateManager The new rate manager address\n  function updateVaultRateManager(address vault, address newRateManager) external nonReentrant {\n    if (newRateManager == address(0)) revert ZeroAddress();\n\n    IEmberVault.Roles memory vaultRoles = IEmberVault(vault).roles();\n    if (newRateManager == vaultRoles.rateManager) revert SameValue();\n    if (newRateManager == vaultRoles.admin || newRateManager == vaultRoles.operator)\n      revert InvalidValue();\n    if (IEmberVault(vault).subAccounts(newRateManager)) revert InvalidValue();\n    if (blacklistedAccounts[newRateManager]) revert Blacklisted();\n\n    IEmberVault(vault).setRateManager(msg.sender, newRateManager);\n  }\n\n  /// @notice Updates the vault fee percentage\n  /// @dev Validates parameters, then forwards to vault which verifies caller is admin\n  /// @param vault The vault address\n  /// @param newFeePercentage The new fee percentage\n  function updateVaultFeePercentage(address vault, uint256 newFeePercentage) external nonReentrant {\n    if (newFeePercentage > protocolConfig.maxFeePercentage) {\n      revert InvalidFeePercentage();\n    }\n    if (newFeePercentage == IEmberVault(vault).platformFee().platformFeePercentage) {\n      revert SameValue();\n    }\n    IEmberVault(vault).setFeePercentage(msg.sender, newFeePercentage);\n  }\n\n  /// @notice Updates the vault name\n  /// @dev Validates parameters, then forwards to vault which verifies caller is admin\n  /// @param vault The vault address\n  /// @param newName The new vault name\n  function updateVaultName(address vault, string calldata newName) external nonReentrant {\n    if (bytes(newName).length == 0) revert InvalidValue();\n\n    IEmberVault(vault).setVaultName(msg.sender, newName);\n  }\n\n  /// @notice Updates the minimum withdrawable shares\n  /// @dev Validates parameters, then forwards to vault which verifies caller is admin\n  /// @param vault The vault address\n  /// @param newMinWithdrawableShares The new minimum withdrawable shares amount\n  function updateVaultMinWithdrawableShares(\n    address vault,\n    uint256 newMinWithdrawableShares\n  ) external nonReentrant {\n    if (newMinWithdrawableShares == 0) revert InvalidValue();\n    if (newMinWithdrawableShares == IEmberVault(vault).minWithdrawableShares()) revert SameValue();\n\n    IEmberVault(vault).setMinWithdrawableShares(msg.sender, newMinWithdrawableShares);\n  }\n\n  /// @notice Sets or removes a sub-account for a vault\n  /// @dev Validates parameters, then forwards to vault which verifies caller is admin\n  /// @param vault The vault address\n  /// @param account The account address to set or remove\n  /// @param isSubAccount True to add as sub-account, false to remove\n  function setVaultSubAccount(\n    address vault,\n    address account,\n    bool isSubAccount\n  ) external nonReentrant {\n    if (account == address(0)) revert ZeroAddress();\n\n    if (isSubAccount) {\n      // Adding sub-account\n      if (IEmberVault(vault).subAccounts(account)) revert SameValue();\n\n      // Check it's not a role\n      IEmberVault.Roles memory vaultRoles = IEmberVault(vault).roles();\n      if (\n        account == vaultRoles.admin ||\n        account == vaultRoles.operator ||\n        account == vaultRoles.rateManager\n      ) revert InvalidValue();\n\n      // Check it's not blacklisted\n      if (blacklistedAccounts[account]) revert Blacklisted();\n    } else {\n      // Removing sub-account\n      if (!IEmberVault(vault).subAccounts(account)) revert InvalidValue();\n    }\n\n    IEmberVault(vault).setSubAccountStatus(msg.sender, account, isSubAccount);\n  }\n\n  /// @notice Sets the pause status for a specific operation on a vault\n  /// @dev Gated by the protocol guardian (not vault admin) so emergency pause\n  ///      stays instant even after the vault admin role is moved behind the\n  ///      timelock. The vault itself only checks `onlyProtocolConfig` — the\n  ///      authorization is enforced here.\n  /// @param vault The vault address\n  /// @param operation The operation to pause/unpause: \"deposits\", \"withdrawals\", or \"privilegedOperations\"\n  /// @param paused True to pause, false to unpause\n  function setVaultPausedStatus(\n    address vault,\n    string calldata operation,\n    bool paused\n  ) external nonReentrant onlyGuardian {\n    IEmberVault(vault).setPausedStatus(msg.sender, operation, paused);\n  }\n\n  /// @notice Sets the bridge adapter for a vault's cross-chain operations\n  /// @dev Validates parameters, then forwards to vault which verifies caller is admin\n  /// @param vault The vault address\n  /// @param newAdapter The new bridge adapter address (can be zero to disable)\n  function setVaultBridgeAdapter(address vault, address newAdapter) external nonReentrant {\n    // No validation needed - adapter can be any address or zero to disable\n    // Vault will verify caller is admin\n    IEmberVault(vault).setBridgeAdapter(msg.sender, newAdapter);\n  }\n\n  /// @notice Sets the bridge amount limits for a vault\n  /// @dev Validates parameters, then forwards to vault which verifies caller is admin\n  /// @param vault The vault address\n  /// @param minAmount The minimum bridge amount (0 = no minimum)\n  /// @param maxAmount The maximum bridge amount (0 = no maximum)\n  function setVaultBridgeLimits(\n    address vault,\n    uint256 minAmount,\n    uint256 maxAmount\n  ) external nonReentrant {\n    if (\n      minAmount == IEmberVault(vault).minBridgeAmount() &&\n      maxAmount == IEmberVault(vault).maxBridgeAmount()\n    ) revert SameValue();\n    if (maxAmount > 0 && minAmount > maxAmount) revert InvalidValue();\n\n    IEmberVault(vault).setBridgeLimits(msg.sender, minAmount, maxAmount);\n  }\n\n  // ============================================\n  // Withdrawal Fee & Deposit Allow List Functions (via Validator)\n  // ============================================\n\n  /// @notice Sets the vault validator contract address for a vault\n  function setVaultValidator(address vault, address validator) external nonReentrant {\n    IEmberVault(vault).setVaultValidator(msg.sender, validator);\n  }\n\n  /// @notice Sets (or clears) the deposit parking lot for a vault\n  /// @dev Forwards to vault which verifies caller is the vault admin. Passing\n  ///      address(0) disables the parking-lot gate and restores permissionless\n  ///      deposits.\n  /// @param vault The vault address\n  /// @param newParkingLot The parking lot address, or address(0) to disable gating\n  function setVaultParkingLot(address vault, address newParkingLot) external nonReentrant {\n    IEmberVault(vault).setParkingLot(msg.sender, newParkingLot);\n  }\n\n  function setVaultDepositAllowList(\n    address vault,\n    address user,\n    bool status\n  ) external nonReentrant {\n    if (user == address(0)) revert ZeroAddress();\n    IEmberVaultValidator validator = IEmberVault(vault).vaultValidator();\n    if (validator.depositAllowList(vault, user) == status) revert SameValue();\n\n    if (status) {\n      IEmberVault.Roles memory vaultRoles = IEmberVault(vault).roles();\n      if (user == vaultRoles.admin || user == vaultRoles.operator || user == vaultRoles.rateManager)\n        revert InvalidValue();\n      if (blacklistedAccounts[user]) revert Blacklisted();\n    }\n\n    validator.setDepositAllowListStatus(msg.sender, vault, user, status);\n  }\n\n  function setVaultFeeExemptionList(\n    address vault,\n    address user,\n    bool status\n  ) external nonReentrant {\n    if (user == address(0)) revert ZeroAddress();\n    IEmberVaultValidator validator = IEmberVault(vault).vaultValidator();\n    if (validator.feeExemptAccounts(vault, user) == status) revert SameValue();\n\n    if (status) {\n      IEmberVault.Roles memory vaultRoles = IEmberVault(vault).roles();\n      if (user == vaultRoles.admin || user == vaultRoles.operator || user == vaultRoles.rateManager)\n        revert InvalidValue();\n      if (blacklistedAccounts[user]) revert Blacklisted();\n    }\n\n    validator.setFeeExemptionListStatus(msg.sender, vault, user, status);\n  }\n\n  function updateVaultPermanentFeePercentage(\n    address vault,\n    uint256 newPercentage\n  ) external nonReentrant {\n    IEmberVaultValidator validator = IEmberVault(vault).vaultValidator();\n    IEmberVaultValidator.WithdrawalFee memory fee = validator.withdrawalFee(vault);\n    if (newPercentage == fee.permanentFeePercentage) revert SameValue();\n    // L-5: cap the sum of permanent + time-based at 50% (not merely < 100%) so withdrawal\n    // fees can't be set confiscatorily. Also keeps the net-payout subtraction from underflowing.\n    // Strictly dominates an individual `newPercentage > MAX` check (fee.timeBasedFeePercentage\n    // is already ≤ MAX by the same invariant applied on its own setter).\n    if (newPercentage + fee.timeBasedFeePercentage > MAX_WITHDRAWAL_FEE_PERCENTAGE)\n      revert InvalidValue();\n    validator.setPermanentFeePercentage(msg.sender, vault, newPercentage);\n  }\n\n  function updateVaultTimeBasedFeePercentage(\n    address vault,\n    uint256 newPercentage\n  ) external nonReentrant {\n    IEmberVaultValidator validator = IEmberVault(vault).vaultValidator();\n    IEmberVaultValidator.WithdrawalFee memory fee = validator.withdrawalFee(vault);\n    if (newPercentage == fee.timeBasedFeePercentage) revert SameValue();\n    // L-5: 50% joint cap with permanent fee — see updateVaultPermanentFeePercentage.\n    if (newPercentage + fee.permanentFeePercentage > MAX_WITHDRAWAL_FEE_PERCENTAGE)\n      revert InvalidValue();\n    validator.setTimeBasedFeePercentage(msg.sender, vault, newPercentage);\n  }\n\n  function updateVaultTimeBasedFeeThreshold(\n    address vault,\n    uint256 newThreshold\n  ) external nonReentrant {\n    IEmberVaultValidator validator = IEmberVault(vault).vaultValidator();\n    if (newThreshold == validator.withdrawalFee(vault).timeBasedFeeThreshold) revert SameValue();\n    validator.setTimeBasedFeeThreshold(msg.sender, vault, newThreshold);\n  }\n\n  // ============================================\n  // Atomic Liquidity Vault Forwarders\n  // ============================================\n  // AtomicLiquidity's admin setters are gated by `onlyProtocolConfig` and forward the\n  // original caller back to the vault for role validation. These functions are the\n  // only entry points that can reach those setters on-chain.\n\n  /// @notice Sets (or clears) the external ERC-4626 strategy on an atomic vault.\n  function setVaultStrategy(address vault, address newStrategy) external nonReentrant {\n    IAtomicLiquidity(vault).setStrategy(msg.sender, newStrategy);\n  }\n\n  /// @notice Sets the cumulative cap (in shares) for instantWithdraw redemptions.\n  function setVaultMaxInstantWithdrawShares(address vault, uint256 newMax) external nonReentrant {\n    IAtomicLiquidity(vault).setMaxInstantWithdrawShares(msg.sender, newMax);\n  }\n\n  /// @notice Sets the fee percentage charged on instant withdrawals (1e18 = 100%).\n  function setVaultInstantWithdrawFeePercentage(\n    address vault,\n    uint256 newFeePercentage\n  ) external nonReentrant {\n    IAtomicLiquidity(vault).setInstantWithdrawFeePercentage(msg.sender, newFeePercentage);\n  }\n\n  /// @notice Whitelists (or de-lists) an EmberVault share for the cross-vault instant swap.\n  function setVaultEmberShareWhitelist(\n    address vault,\n    address share,\n    bool whitelisted,\n    uint256 feePercentage,\n    uint256 maxCapacityPercentage,\n    uint256 holdbackPercentage,\n    uint256 maxUtilizationPercentage,\n    uint256 minSwapGross,\n    uint256 maxHeldValueAbsolute\n  ) external nonReentrant {\n    IAtomicLiquidity(vault).setEmberShareWhitelist(\n      msg.sender,\n      share,\n      whitelisted,\n      feePercentage,\n      maxCapacityPercentage,\n      holdbackPercentage,\n      maxUtilizationPercentage,\n      minSwapGross,\n      maxHeldValueAbsolute\n    );\n  }\n\n  /// @notice Sets per-address fee and holdback waivers for the EmberShare cross-vault swap.\n  function setVaultSwapWaiver(\n    address vault,\n    address account,\n    bool feeWaived,\n    bool holdbackWaived\n  ) external nonReentrant {\n    IAtomicLiquidity(vault).setSwapWaiver(msg.sender, account, feeWaived, holdbackWaived);\n  }\n\n  /// @notice Adds, updates, or removes a fee-multiplier curve tier for an EmberShare.\n  function updateVaultEmberShareFeeMultiplierTier(\n    address vault,\n    address share,\n    uint256 threshold,\n    uint256 multiplier,\n    bool remove\n  ) external nonReentrant {\n    IAtomicLiquidity(vault).updateEmberShareFeeMultiplierTier(\n      msg.sender,\n      share,\n      threshold,\n      multiplier,\n      remove\n    );\n  }\n\n  // ============================================\n  // Getter Functions\n  // ============================================\n\n  /// @notice Returns whether the protocol is paused for non-admins\n  function getProtocolPauseStatus() external view returns (bool) {\n    return protocolConfig.pause;\n  }\n\n  /// @notice Returns the current platform fee recipient\n  function getPlatformFeeRecipient() external view returns (address) {\n    return protocolConfig.platformFeeRecipient;\n  }\n\n  function getMinRate() external view returns (uint256) {\n    return protocolConfig.minRate;\n  }\n\n  function getMaxRate() external view returns (uint256) {\n    return protocolConfig.maxRate;\n  }\n\n  function getDefaultRate() external view returns (uint256) {\n    return protocolConfig.defaultRate;\n  }\n\n  function getMinRateInterval() external view returns (uint256) {\n    return protocolConfig.minRateInterval;\n  }\n\n  function getMaxRateInterval() external view returns (uint256) {\n    return protocolConfig.maxRateInterval;\n  }\n\n  function getMaxAllowedFeePercentage() external view returns (uint256) {\n    return protocolConfig.maxFeePercentage;\n  }\n\n  /// @notice Checks if an account is blacklisted\n  function isAccountBlacklisted(address account) external view returns (bool) {\n    return blacklistedAccounts[account];\n  }\n\n  /**\n   * @dev Get the contract version\n   * @return Version number\n   */\n  function version() external pure virtual returns (string memory) {\n    return \"v2.2.2\";\n  }\n\n  /// @notice Verifies that the protocol is not paused\n  ///\n  /// Aborts with:\n  /// - ProtocolPaused: If the protocol is paused.\n  function verifyProtocolNotPaused() external view {\n    if (protocolConfig.pause) revert ProtocolPaused();\n  }\n\n  /// @notice Verifies that an account is not blacklisted\n  /// @param account The account to verify\n  ///\n  /// Aborts with:\n  /// - Blacklisted: If the account is blacklisted.\n  function verifyAccountNotBlacklisted(address account) external view {\n    if (blacklistedAccounts[account]) revert Blacklisted();\n  }\n  /**\n   * @dev Function that authorizes an upgrade to a new implementation.\n   *      Authorization is handled by the onlyOwner modifier.\n   * @param newImplementation Address of the new implementation (unused, validated by UUPS)\n   */\n  function _authorizeUpgrade(address newImplementation) internal override onlyOwner {\n    // solhint-disable-next-line no-empty-blocks\n    // Authorization is handled by onlyOwner modifier; no additional logic needed\n  }\n}\n","deployed_bytecode":"0x6080604081815260048036101561001557600080fd5b600092833560e01c908163033b66ba14612cfb57508063052268b014612c665780630f1d76c11461087957806311583b1b14612c435780631779267814612c245780631edbf55114612b3957806322ed501f14612a0c578063233d91e7146129335780633ecdbce514612914578063452a9320146128eb5780634827d32d1461284a578063485cc955146126085780634bbfc6a0146125bd5780634f1ef2861461238057806352d1902d1461231957806354fd4d50146122db578063558e44d3146122b85780635add639f146122245780635b759279146121f85780635e6e6389146120e2578063615cd86c146120c357806361a32ac314611f865780636347b4f714611f69578381636b98a62114611f0e5781636c6d68d914611eae575080636d7c35ce14611e0457806370ff1b3814611d5a578063715018a614611cef5780637591590714611c9857806375a9f79914611ad75780637a0c2b7014611a455780637a2165f7146119035780637a7efd06146118e45780637af619c0146118215780637bbc1efd146116e55780637f517d71146114cb5780638137926414611484578381638920510a14611424575080638a0dac4a1461138a5780638d097eb4146113505780638da5cb5b1461131a57806394614b33146110b75780639635e53d14610fe1578063989332e714610ee157806398fb50d514610e4d578063a3e860fe14610e2a578063aa12543714610e0b578063ad3cb1cc14610dca578063bcc9397314610d3257838163bd5d576814610cd257508063bfdb1cb014610b90578063c24dbebd14610b6d578063c67fbb9e146109e6578063d2a6e002146109c7578063d3ae9e28146109a9578063d819bfef1461098657838163e2e0ff7a146108b757508063e511069214610879578063e85ba9cc14610832578063e9f061d414610806578063f2fde38b146107d9578063f385b5451461062357838163f3c386a8146105c357508063f5efbb4f14610557578063f5fe7f7114610483578063facdc09e146103bc5763fed2ac011461030e57600080fd5b8291346103b857806003193601126103b857610328612d1a565b91610331612d30565b9261033a6131b5565b6001600160a01b031692833b156103b45761036d9385928385518097819582946372cb5d9760e01b845233908401613003565b03925af19081156103ab5750610394575b5060016000805160206133038339815191525580f35b61039d90612da0565b6103a857803861037e565b80fd5b513d84823e3d90fd5b8480fd5b5050fd5b5091903461047f57602036600319011261047f5782356103da6131b5565b6103e26131e5565b80158015610474575b8015610469575b6104595760015490818114610449577f61dbc3bb3261cc877408c2634609c45e2503c4fa4c09a3d78ca071a62123b7359394508060015582519182526020820152a160016000805160206133038339815191525580f35b825163c23f6ccb60e01b81528590fd5b8151636a43f8d160e01b81528490fd5b5060035481116103f2565b5060025481116103eb565b5080fd5b5082903461047f57602036600319011261047f5761049f612d1a565b906104a86131b5565b6104b06131e5565b6001600160a01b03828116918215610549578454918260081c1680931461053b5750610100600160a81b031916600883901b610100600160a81b0316178355925191927faf04973bb8004e313cfd09017b963bee1e6f6ffb9be88c07a0c5ce5fafe9340392918291610523919083613003565b0390a160016000805160206133038339815191525580f35b855163c23f6ccb60e01b8152fd5b855163d92e233d60e01b8152fd5b5090346105bf57826003193601126105bf576101009254916001549060025490600354905491600554936006549580519760ff81161515895260018060a01b039060081c1660208901528701526060860152608085015260a084015260c083015260e0820152f35b8280fd5b929050346103b857806003193601126103b8576105de612d1a565b6105e66131b5565b6001600160a01b0316803b1561061e578151632c656bc960e01b8152928491849182908490829061036d906024359033908401612f89565b505050fd5b5091903461047f578060031936011261047f5761063e612d1a565b90610647612d30565b61064f6131b5565b6001600160a01b03928184169081156107c9578351630e4bd7d960e21b8152908516946060828981895afa9182156107bf57879261078e575b5080602083015116831461077e578085830151168314918215610771575b505061072857825163368d094360e21b8152868101829052602081602481885afa908115610767578691610738575b50610728578452600760205260ff828520541661071857938394833b156103b45761036d9385928385518097819582946378f5689360e11b845233908401613003565b81516309550c7760e01b81528590fd5b8251632a9ffab760e21b81528690fd5b61075a915060203d602011610760575b6107528183612dff565b8101906130a4565b386106d5565b503d610748565b84513d88823e3d90fd5b51168214905038806106a6565b845163c23f6ccb60e01b81528890fd5b6107b191925060603d6060116107b8575b6107a98183612dff565b8101906130d0565b9038610688565b503d61079f565b85513d89823e3d90fd5b835163d92e233d60e01b81528790fd5b83346103a85760203660031901126103a8576108036107f6612d1a565b6107fe6131e5565b613141565b80f35b50503461047f578160031936011261047f579054905160089190911c6001600160a01b03168152602090f35b83346103a85760203660031901126103a85761086461084f612d82565b6108576131b5565b61085f6131e5565b612fa4565b60016000805160206133038339815191525580f35b50503461047f57602036600319011261047f5760209160ff9082906001600160a01b036108a4612d1a565b1681526007855220541690519015158152f35b929050346103b8576101203660031901126103b8576108d4612d1a565b916108dd612d30565b6108e5612d73565b91610104906108f26131b5565b6001600160a01b0395861693843b156109825787946101249386928851998a9788966310dbbd1760e01b88523390880152166024860152151560448501526064356064850152608435608485015260a43560a485015260c43560c485015260e43560e48501528035908401525af19081156103ab5750610394575060016000805160206133038339815191525580f35b8780fd5b50503461047f578160031936011261047f57602090516703782dace9d900008152f35b50503461047f578160031936011261047f57602090516236ee808152f35b50503461047f578160031936011261047f576020906002549051908152f35b5091903461047f57606036600319011261047f57610a02612d1a565b906024359360443592610a136131b5565b825163c3c2247560e01b81526001600160a01b03919091169590602090818185818b5afa9081156107bf578791610b40575b5082149081610adf575b50610ad05783151580610ac7575b610ab8578585963b15610ab457859283606492865197889586946318e836ab60e21b86523390860152602485015260448401525af19081156103ab5750610394575060016000805160206133038339815191525580f35b8580fd5b509051632a9ffab760e21b8152fd5b50838111610a5d565b50905163c23f6ccb60e01b8152fd5b8451631804cb2760e21b8152909150818185818b5afa9182156107bf578792610b0d575b5050841438610a4f565b90809250813d8311610b39575b610b248183612dff565b81010312610b3457513880610b03565b600080fd5b503d610b1a565b90508181813d8311610b66575b610b578183612dff565b81010312610b34575138610a45565b503d610b4d565b50503461047f578160031936011261047f5760209051674563918244f400008152f35b5091903461047f578060031936011261047f57610bab612d1a565b90610bb4612d30565b610bbc6131b5565b6001600160a01b03928184169081156107c9578351630e4bd7d960e21b8152908516946060828981895afa9182156107bf578792610cb1575b50808583015116831461077e57808251168314918215610ca1575b505061072857825163368d094360e21b8152868101829052602081602481885afa908115610767578691610c82575b50610728578452600760205260ff828520541661071857938394833b156103b45761036d938592838551809781958294639707df4d60e01b845233908401613003565b610c9b915060203d602011610760576107528183612dff565b38610c3f565b6020015116821490503880610c10565b610ccb91925060603d6060116107b8576107a98183612dff565b9038610bf5565b929050346103b857806003193601126103b857610ced612d1a565b91610cf6612d30565b92610cff6131b5565b6001600160a01b031692833b156103b45761036d9385928385518097819582946317abaaed60e31b845233908401613003565b5091903461047f57602036600319011261047f578235610d506131b5565b610d586131e5565b67016345785d8a00008111610dba5760065490818114610449577fe9bcd3aa21241bd6922e4684c950425edd128358ad7b30f11d596a889b5232c39394508060065582519182526020820152a160016000805160206133038339815191525580f35b815163390edff560e11b81528490fd5b50503461047f578160031936011261047f578051610e0791610deb82612de4565b60058252640352e302e360dc1b60208301525191829182612e3b565b0390f35b50503461047f578160031936011261047f576020906003549051908152f35b50503461047f578160031936011261047f5760209051670de0b6b3a76400008152f35b5091903461047f57602036600319011261047f578235610e6b6131b5565b610e736131e5565b60015481108015610ed6575b6104595760035490818114610449577ff5a71b50122870af64c64adf8404af2029395e58592f1f97fd58da4dca004a049394508060035582519182526020820152a160016000805160206133038339815191525580f35b506002548111610e7f565b5091903461047f578060031936011261047f57610efc612d1a565b9060243591610f096131b5565b6006548311610fd1578151631311951760e11b81526001600160a01b039190911692906060818781875afa908115610fc7579083918691610f8a575b5001518114610f7a57938394833b156103b45761036d9385928385518097819582946365f0098760e11b845233908401612f89565b815163c23f6ccb60e01b81528590fd5b91505060603d606011610fc0575b610fa28183612dff565b810190606081830312610ab4578391610fba91612ec4565b38610f45565b503d610f98565b83513d87823e3d90fd5b815163390edff560e11b81528590fd5b5091903461047f578060031936011261047f57610ffc612d1a565b90602435916110096131b5565b82156110a7578151631627391760e11b81526001600160a01b039190911692906080818781875afa908115610fc757906020918691611078575b5001518114610f7a57938394833b156103b45761036d938592838551809781958294635c7a68b360e01b845233908401612f89565b61109a915060803d6080116110a0575b6110928183612dff565b810190612f3b565b38611043565b503d611088565b8151636a43f8d160e01b81528590fd5b5082903461047f57606036600319011261047f576110d3612d1a565b926110dc612d30565b916110e5612d73565b926110ee6131b5565b6001600160a01b0381811690811561130a5784516316d0402960e11b815288821692602092909183818881885afa90811561129c579082918b916112dd575b50169361114f84878d8b5193849283926355aebb6d60e11b84528d8401613003565b0381895afa9081156112d3578b916112b6575b501515891515146112a657886111e0575b505050508596813b156111dc578680946111a28751988996879586946366239a1360e01b865233908601613116565b03925af19081156103ab57506111c8575060016000805160206133038339815191525580f35b6111d190612da0565b6103a857808261037e565b8680fd5b9060608792895193848092630e4bd7d960e21b82525afa91821561129c578a9261127b575b508781835116841492831561126c575b831561125d575b50505061124d578752600790528386205460ff1661123d5787808080611173565b83516309550c7760e01b81528390fd5b8551632a9ffab760e21b81528590fd5b015116821490508a878161121c565b85810151831685149350611215565b61129591925060603d6060116107b8576107a98183612dff565b908b611205565b88513d8c823e3d90fd5b875163c23f6ccb60e01b81528790fd5b6112cd9150853d8711610760576107528183612dff565b8c611162565b89513d8d823e3d90fd5b6112fd9150853d8711611303575b6112f58183612dff565b810190612ea5565b8c61112d565b503d6112eb565b845163d92e233d60e01b81528490fd5b50503461047f578160031936011261047f576000805160206132c38339815191525490516001600160a01b039091168152602090f35b50503461047f573660031901126103a85761086461136c612d1a565b611374612d91565b9061137d6131b5565b6113856131e5565b61301d565b50346105bf5760203660031901126105bf576113a4612d1a565b906113ad6131b5565b6113b56131e5565b6008549060018060a01b038083169316938385146114175750506001600160a01b03191682176008557f064d28d3d3071c5cbc271a261c10c2f0f0d9e319390397101aa0eb23c6bad9098380a360016000805160206133038339815191525580f35b5163c23f6ccb60e01b8152fd5b929050346103b857806003193601126103b85761143f612d1a565b91611448612d30565b926114516131b5565b6001600160a01b031692833b156103b45761036d938592838551809781958294630fd8128f60e31b845233908401613003565b5090346105bf5760203660031901126105bf576001600160a01b036114a7612d1a565b168352600760205260ff81842054166114be578280f35b516309550c7760e01b8152fd5b5082903461047f57606036600319011261047f576114e7612d1a565b926114f0612d30565b916114f9612d73565b926115026131b5565b6001600160a01b039081169081156116d557841561167e57808716845163368d094360e21b81528385820152602081602481855afa908115611674578891611655575b506116455760608491865192838092630e4bd7d960e21b82525afa9081156107bf578791611626575b508185818351168514928315611616575b8315611607575b5050506115f757818652600760205260ff848720541661123d5785965b16803b15610ab457859283606492865197889586946366a3ae2d60e11b865233908601526024850152151560448401525af19081156103ab57506111c8575060016000805160206133038339815191525580f35b8351632a9ffab760e21b81528390fd5b0151168314905081858a611586565b602081015183168614935061157f565b61163f915060603d6060116107b8576107a98183612dff565b8861156e565b845163c23f6ccb60e01b81528490fd5b61166e915060203d602011610760576107528183612dff565b89611545565b86513d8a823e3d90fd5b835163368d094360e21b81528381018390526020816024818b86165afa9081156107bf5787916116b6575b50156115f75785966115a3565b6116cf915060203d602011610760576107528183612dff565b886116a9565b835163d92e233d60e01b81528390fd5b5091903461047f578060031936011261047f57611700612d1a565b906024359161170d6131b5565b82156117a357815163d2045f6d60e01b81526001600160a01b0391909116929060209081818881885afa9081156107675786916117f4575b5082146117e45782516278744560e21b815281818881885afa918215610767579083929187926117b3575b5050116117a357938394833b156103b45761036d938592838551809781958294632ebc39cd60e11b845233908401612f89565b8151632a9ffab760e21b81528590fd5b8193508092503d83116117dd575b6117cb8183612dff565b81010312610b34578190513880611770565b503d6117c1565b825163c23f6ccb60e01b81528690fd5b90508181813d831161181a575b61180b8183612dff565b81010312610b34575138611745565b503d611801565b5091903461047f578060031936011261047f5761183c612d1a565b90602435916118496131b5565b82156117a35781516364737b0b60e01b81526001600160a01b039190911692906020818781875afa908115610fc75785916118b2575b508114610f7a57938394833b156103b45761036d93859283855180978195829463249c279d60e21b845233908401612f89565b90506020813d6020116118dc575b816118cd60209383612dff565b81010312610b3457513861187f565b3d91506118c0565b50503461047f578160031936011261047f576020906006549051908152f35b5091903461047f578060031936011261047f5761191e612d1a565b90611927612d30565b61192f6131b5565b6001600160a01b03928184169081156107c9578351630e4bd7d960e21b8152908516946060828981895afa9182156107bf578792611a24575b5080825116831461077e578085830151168314918215611a14575b505061072857825163368d094360e21b8152868101829052602081602481885afa9081156107675786916119f5575b50610728578452600760205260ff828520541661071857938394833b156103b45761036d93859283855180978195829463c55b6bb760e01b845233908401613003565b611a0e915060203d602011610760576107528183612dff565b386119b2565b6020015116821490503880611983565b611a3e91925060603d6060116107b8576107a98183612dff565b9038611968565b5082903461047f578260031936011261047f57611a60612d1a565b926024356001600160401b038111611ad357611a7f9036908401612d46565b9290611a896131b5565b8315610ab85793948594906001600160a01b0316803b15610ab4576111a29486809486519788958694859363a2cdb40760e01b855233908501528960248501526044840191612e84565b8380fd5b5082903461047f57606036600319011261047f57611af3612d1a565b92611afc612d30565b91611b05612d73565b92611b0e6131b5565b6001600160a01b0381811690811561130a5784516316d0402960e11b815288821692602092909183818881885afa90811561129c579082918b91611c7b575b501693611b6f84878d8b519384928392630b25a48960e01b84528d8401613003565b0381895afa9081156112d3578b91611c5e575b501515891515146112a65788611bc2575b505050508596813b156111dc578680946111a2875198899687958694637fd0d99760e11b865233908601613116565b9060608792895193848092630e4bd7d960e21b82525afa91821561129c578a92611c3d575b5087818351168414928315611c2e575b8315611c1f575b50505061124d578752600790528386205460ff1661123d5787808080611b93565b015116821490508a8781611bfe565b85810151831685149350611bf7565b611c5791925060603d6060116107b8576107a98183612dff565b908b611be7565b611c759150853d8711610760576107528183612dff565b8c611b82565b611c929150853d8711611303576112f58183612dff565b8c611b4d565b5091903461047f578060031936011261047f57611cb3612d1a565b611cbb612d91565b91611cc46131b5565b6008546001600160a01b03163303611ce15750906108649161301d565b516282b42960e81b81528490fd5b83346103a857806003193601126103a857611d086131e5565b6000805160206132c383398151915280546001600160a01b031981169091556000906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b5090346105bf5760a03660031901126105bf57611d75612d1a565b90611d7e612d30565b60843590811515809203610b34578594611d966131b5565b6001600160a01b0394851690813b156111dc578660a49281958751988996879563ede4ab5760e01b875233908701521660248501526044356044850152606435606485015260848401525af19081156103ab5750610394575060016000805160206133038339815191525580f35b5090346105bf5760803660031901126105bf57611e1f612d1a565b90611e28612d30565b611e30612d73565b90606435801515809103610b34578695611e486131b5565b6001600160a01b0395861693843b1561098257879460849386928851998a978896630eff1e4360e41b885233908801521660248601521515604485015260648401525af19081156103ab5750610394575060016000805160206133038339815191525580f35b929050346103b857806003193601126103b857611ec9612d1a565b91611ed2612d30565b92611edb6131b5565b6001600160a01b031692833b156103b45761036d93859283855180978195829463e126430360e01b845233908401613003565b929050346103b857806003193601126103b857611f29612d1a565b611f316131b5565b6001600160a01b0316803b1561061e578151632582fe1360e01b8152928491849182908490829061036d906024359033908401612f89565b50346105bf57826003193601126105bf5760209250549051908152f35b5091903461047f578060031936011261047f57611fa1612d1a565b9060243593611fae6131b5565b81516316d0402960e11b81526001600160a01b03848116969160208185818b5afa9081156107bf5787916120a4575b50169583519063baa29ceb60e01b8252838201526060816024818a5afa908115610767578691612069575b50805182146120595761202860206706f05b59d3b2000092015183612ef6565b11610ab8578585963b15610ab45761036d948680948651978895869485936354c461a560e11b855233908501612f19565b835163c23f6ccb60e01b81528390fd5b905060603d60601161209d575b6120808183612dff565b8101906060818303126111dc579061209791612ec4565b38612008565b503d612076565b6120bd915060203d602011611303576112f58183612dff565b38611fdd565b50503461047f578160031936011261047f576020906005549051908152f35b5091903461047f578060031936011261047f576120fd612d1a565b906024359361210a6131b5565b81516316d0402960e11b81526001600160a01b03848116969160208185818b5afa9081156107bf5787916121d9575b50169583519063baa29ceb60e01b8252838201526060816024818a5afa90811561076757908491879161219c575b5001518114610ad0578585963b15610ab45761036d94868094865197889586948593633577818160e01b855233908501612f19565b91505060603d6060116121d2575b6121b48183612dff565b8101906060818303126111dc5784916121cc91612ec4565b38612167565b503d6121aa565b6121f2915060203d602011611303576112f58183612dff565b38612139565b5090346105bf57826003193601126105bf5760ff835416612217578280f35b51634427925560e01b8152fd5b5091903461047f57602036600319011261047f5782356122426131b5565b61224a6131e5565b600154811080156122ad575b6104595760025490818114610449577f39787d7ea4008505c060b31a371d9d4eefc0f178ee47d39e3b647b0c266cc6219394508060025582519182526020820152a160016000805160206133038339815191525580f35b506003548110612256565b50503461047f578160031936011261047f576020905167016345785d8a00008152f35b50503461047f578160031936011261047f578051610e07916122fc82612de4565b60068252653b191719171960d11b60208301525191829182612e3b565b5091346103a857806003193601126103a857507f000000000000000000000000540db273e41587a748365f01f35adb095b58bfeb6001600160a01b0316300361237357602090516000805160206132e38339815191528152f35b5163703e46dd60e11b8152fd5b5090806003193601126105bf57612395612d1a565b9060249384356001600160401b03811161047f573660238201121561047f57808501356123c181612e20565b946123ce85519687612dff565b81865260209182870193368a8383010111610ab4578186928b8693018737880101526001600160a01b037f000000000000000000000000540db273e41587a748365f01f35adb095b58bfeb81163081149081156125a1575b50612591576124336131e5565b81169585516352d1902d60e01b815283818a818b5afa869181612562575b5061246d575050505050505191634c9c8ce360e01b8352820152fd5b9088888894938c6000805160206132e38339815191529182810361254d5750853b15612539575080546001600160a01b031916821790558451889392917fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8580a282511561251b57505061250d9582915190845af4913d15612511573d6124ff6124f682612e20565b92519283612dff565b81528581943d92013e61325f565b5080f35b506060925061325f565b95509550505050503461252d57505080f35b63b398979f60e01b8152fd5b8651634c9c8ce360e01b8152808501849052fd5b8751632a87526960e21b815280860191909152fd5b9091508481813d831161258a575b61257a8183612dff565b810103126111dc57519038612451565b503d612570565b855163703e46dd60e11b81528890fd5b9050816000805160206132e38339815191525416141538612426565b50346105bf5760203660031901126105bf576125d7612d82565b916125e06131b5565b6008546001600160a01b031633036125fc578361086484612fa4565b516282b42960e81b8152fd5b50346105bf57816003193601126105bf57612621612d1a565b612629612d30565b917ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a009283549160ff83871c1615936001600160401b039384811680159081612842575b6001149081612838575b15908161282f575b5061281f5767ffffffffffffffff19811660011787556126b0919086612800575b506126a861321e565b6107fe61321e565b6126b861321e565b6126c061321e565b6126c861321e565b6001600080516020613303833981519152556001600160a01b03821680156127f1578651936101008501908111858210176127dc579060e094939291885288845260208401526703782dace9d900008088850152674563918244f40000806060860152670de0b6b3a7640000918260808701526236ee80948560a08801526305265c00968760c082015267016345785d8a0000988991015260005490610100600160a81b039060081b169060ff8d1515169060018060a81b0319161717600055600155600255600355556005556006556127a0578280f35b805460ff60401b1916905551600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a138808280f35b604183634e487b7160e01b6000525260246000fd5b50855163d92e233d60e01b8152fd5b68ffffffffffffffffff1916680100000000000000011787553861269f565b875163f92ee8a960e01b81528390fd5b9050153861267e565b303b159150612676565b87915061266c565b5091903461047f57602036600319011261047f5782356128686131b5565b6128706131e5565b6236ee80811080156128e0575b6128d05783549081811461044957807f21a40a12d0e7a76377e962e9ce90abcb030d3fc9fcee4b2566a46a7715ca683294955582519182526020820152a160016000805160206133038339815191525580f35b81516305fabb6160e41b81528490fd5b50600554811161287d565b50503461047f578160031936011261047f5760085490516001600160a01b039091168152602090f35b50503461047f578160031936011261047f57602090516305265c008152f35b5091903461047f578060031936011261047f5761294e612d1a565b906024359161295b6131b5565b845483108015612a01575b6129f1578151631627391760e11b81526001600160a01b039190911692906080818781875afa908115610fc75790839186916129d2575b5001518114610f7a57938394833b156103b45761036d93859283855180978195829463145f178360e31b845233908401612f89565b6129eb915060803d6080116110a0576110928183612dff565b3861299d565b81516305fabb6160e41b81528590fd5b506005548311612966565b5091903461047f578060031936011261047f57612a27612d1a565b9060243593612a346131b5565b81516316d0402960e11b81526001600160a01b03848116969160208185818b5afa9081156107bf578791612b1a575b50169583519063baa29ceb60e01b8252838201526060816024818a5afa908115610767578691612adf575b506020810151821461205957612aae6706f05b59d3b20000915183612ef6565b11610ab8578585963b15610ab45761036d948680948651978895869485936311db933960e11b855233908501612f19565b905060603d606011612b13575b612af68183612dff565b8101906060818303126111dc5790612b0d91612ec4565b38612a8e565b503d612aec565b612b33915060203d602011611303576112f58183612dff565b38612a63565b5090346105bf5760603660031901126105bf57612b54612d1a565b6024356001600160401b0381116103b457612b729036908501612d46565b612b7d929192612d73565b91612b866131b5565b6008546001600160a01b03919082163303612c155787949391169190823b156103b457612bd896859187519889968795869463694f0aad60e11b86523390860152606060248601526064850191612e84565b901515604483015203925af19081156103ab5750612c06575060016000805160206133038339815191525580f35b612c0f90612da0565b3861037e565b85516282b42960e81b81528790fd5b50503461047f578160031936011261047f576020906001549051908152f35b50503461047f578160031936011261047f57602090516706f05b59d3b200008152f35b5091903461047f57602036600319011261047f578235612c846131b5565b612c8c6131e5565b835481108015612cee575b6128d05760055490818114610449577fbaeeac8f8a689e49b9757e4fe1ca7f9ad3d59c82438cc1133c96a7bed80223119394508060055582519182526020820152a160016000805160206133038339815191525580f35b506305265c008111612c97565b84903461047f578160031936011261047f5760ff602092541615158152f35b600435906001600160a01b0382168203610b3457565b602435906001600160a01b0382168203610b3457565b9181601f84011215610b34578235916001600160401b038311610b345760208381860195010111610b3457565b604435908115158203610b3457565b600435908115158203610b3457565b602435908115158203610b3457565b6001600160401b038111612db357604052565b634e487b7160e01b600052604160045260246000fd5b606081019081106001600160401b03821117612db357604052565b604081019081106001600160401b03821117612db357604052565b90601f801991011681019081106001600160401b03821117612db357604052565b6001600160401b038111612db357601f01601f191660200190565b6020808252825181830181905290939260005b828110612e7057505060409293506000838284010152601f8019910116010190565b818101860151848201604001528501612e4e565b908060209392818452848401376000828201840152601f01601f1916010190565b90816020910312610b3457516001600160a01b0381168103610b345790565b9190826060910312610b3457604051612edc81612dc9565b604080829480518452602081015160208501520151910152565b91908201809211612f0357565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03918216815291166020820152604081019190915260600190565b90816080910312610b34576040519060808201908282106001600160401b03831117612db3576060916040528051835260208101516020840152604081015160408401520151606082015290565b6001600160a01b039091168152602081019190915260400190565b6000549015159060ff811615158214612ff15760ff191660ff8216176000556040519081527fa639e9716593d8bac9384b64b5619d86364f2cd4bbedbae60088c058442b0c4e90602090a1565b60405163c23f6ccb60e01b8152600490fd5b6001600160a01b0391821681529116602082015260400190565b6001600160a01b03169081156130925781600052600760205260ff604060002054169015158091151514612ff15760207f56b7e599ad39f8ce732b1f0d62c5c93895f6684714a589efff937f691978d37c918360005260078252604060002060ff1981541660ff8316179055604051908152a2565b60405163d92e233d60e01b8152600490fd5b90816020910312610b3457518015158103610b345790565b51906001600160a01b0382168203610b3457565b90816060910312610b345761310e60408051926130ec84612dc9565b6130f5816130bc565b8452613103602082016130bc565b6020850152016130bc565b604082015290565b6001600160a01b03918216815291811660208301529091166040820152901515606082015260800190565b6001600160a01b0390811690811561319c576000805160206132c383398151915280546001600160a01b031981168417909155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b604051631e4fbdf760e01b815260006004820152602490fd5b60008051602061330383398151915260028154146131d35760029055565b604051633ee5aeb560e01b8152600490fd5b6000805160206132c3833981519152546001600160a01b0316330361320657565b60405163118cdaa760e01b8152336004820152602490fd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c161561324d57565b604051631afcd79f60e31b8152600490fd5b90613286575080511561327457602081519101fd5b60405163d6bda27560e01b8152600490fd5b815115806132b9575b613297575090565b604051639996b31560e01b81526001600160a01b039091166004820152602490fd5b50803b1561328f56fe9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00a26469706673582212209c7aa10e8bcacd183ead3163de7b104dc1b88c25b270ab85a4fb98b3f96a037964736f6c63430008160033","optimization_enabled":true,"verified_twin_address_hash":null,"is_verified":true,"compiler_settings":{"evmVersion":"paris","libraries":{},"optimizer":{"enabled":true,"runs":100},"outputSelection":{"*":{"":["*"],"*":["*"]}},"viaIR":true},"optimization_runs":100,"sourcify_repo_url":null,"decoded_constructor_args":null,"compiler_version":"v0.8.22+commit.4fc1097e","is_verified_via_verifier_alliance":false,"verified_at":"2026-08-12T13:23:27.579558Z","implementations":[],"proxy_type":null,"external_libraries":[],"creation_bytecode":"0x60a080604052346100cd57306080527ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a009081549060ff8260401c166100be57506001600160401b036002600160401b031982821601610079575b6040516133589081620000d3823960805181818161232e01526123fa0152f35b6001600160401b031990911681179091556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a1388080610059565b63f92ee8a960e01b8152600490fd5b600080fdfe6080604081815260048036101561001557600080fd5b600092833560e01c908163033b66ba14612cfb57508063052268b014612c665780630f1d76c11461087957806311583b1b14612c435780631779267814612c245780631edbf55114612b3957806322ed501f14612a0c578063233d91e7146129335780633ecdbce514612914578063452a9320146128eb5780634827d32d1461284a578063485cc955146126085780634bbfc6a0146125bd5780634f1ef2861461238057806352d1902d1461231957806354fd4d50146122db578063558e44d3146122b85780635add639f146122245780635b759279146121f85780635e6e6389146120e2578063615cd86c146120c357806361a32ac314611f865780636347b4f714611f69578381636b98a62114611f0e5781636c6d68d914611eae575080636d7c35ce14611e0457806370ff1b3814611d5a578063715018a614611cef5780637591590714611c9857806375a9f79914611ad75780637a0c2b7014611a455780637a2165f7146119035780637a7efd06146118e45780637af619c0146118215780637bbc1efd146116e55780637f517d71146114cb5780638137926414611484578381638920510a14611424575080638a0dac4a1461138a5780638d097eb4146113505780638da5cb5b1461131a57806394614b33146110b75780639635e53d14610fe1578063989332e714610ee157806398fb50d514610e4d578063a3e860fe14610e2a578063aa12543714610e0b578063ad3cb1cc14610dca578063bcc9397314610d3257838163bd5d576814610cd257508063bfdb1cb014610b90578063c24dbebd14610b6d578063c67fbb9e146109e6578063d2a6e002146109c7578063d3ae9e28146109a9578063d819bfef1461098657838163e2e0ff7a146108b757508063e511069214610879578063e85ba9cc14610832578063e9f061d414610806578063f2fde38b146107d9578063f385b5451461062357838163f3c386a8146105c357508063f5efbb4f14610557578063f5fe7f7114610483578063facdc09e146103bc5763fed2ac011461030e57600080fd5b8291346103b857806003193601126103b857610328612d1a565b91610331612d30565b9261033a6131b5565b6001600160a01b031692833b156103b45761036d9385928385518097819582946372cb5d9760e01b845233908401613003565b03925af19081156103ab5750610394575b5060016000805160206133038339815191525580f35b61039d90612da0565b6103a857803861037e565b80fd5b513d84823e3d90fd5b8480fd5b5050fd5b5091903461047f57602036600319011261047f5782356103da6131b5565b6103e26131e5565b80158015610474575b8015610469575b6104595760015490818114610449577f61dbc3bb3261cc877408c2634609c45e2503c4fa4c09a3d78ca071a62123b7359394508060015582519182526020820152a160016000805160206133038339815191525580f35b825163c23f6ccb60e01b81528590fd5b8151636a43f8d160e01b81528490fd5b5060035481116103f2565b5060025481116103eb565b5080fd5b5082903461047f57602036600319011261047f5761049f612d1a565b906104a86131b5565b6104b06131e5565b6001600160a01b03828116918215610549578454918260081c1680931461053b5750610100600160a81b031916600883901b610100600160a81b0316178355925191927faf04973bb8004e313cfd09017b963bee1e6f6ffb9be88c07a0c5ce5fafe9340392918291610523919083613003565b0390a160016000805160206133038339815191525580f35b855163c23f6ccb60e01b8152fd5b855163d92e233d60e01b8152fd5b5090346105bf57826003193601126105bf576101009254916001549060025490600354905491600554936006549580519760ff81161515895260018060a01b039060081c1660208901528701526060860152608085015260a084015260c083015260e0820152f35b8280fd5b929050346103b857806003193601126103b8576105de612d1a565b6105e66131b5565b6001600160a01b0316803b1561061e578151632c656bc960e01b8152928491849182908490829061036d906024359033908401612f89565b505050fd5b5091903461047f578060031936011261047f5761063e612d1a565b90610647612d30565b61064f6131b5565b6001600160a01b03928184169081156107c9578351630e4bd7d960e21b8152908516946060828981895afa9182156107bf57879261078e575b5080602083015116831461077e578085830151168314918215610771575b505061072857825163368d094360e21b8152868101829052602081602481885afa908115610767578691610738575b50610728578452600760205260ff828520541661071857938394833b156103b45761036d9385928385518097819582946378f5689360e11b845233908401613003565b81516309550c7760e01b81528590fd5b8251632a9ffab760e21b81528690fd5b61075a915060203d602011610760575b6107528183612dff565b8101906130a4565b386106d5565b503d610748565b84513d88823e3d90fd5b51168214905038806106a6565b845163c23f6ccb60e01b81528890fd5b6107b191925060603d6060116107b8575b6107a98183612dff565b8101906130d0565b9038610688565b503d61079f565b85513d89823e3d90fd5b835163d92e233d60e01b81528790fd5b83346103a85760203660031901126103a8576108036107f6612d1a565b6107fe6131e5565b613141565b80f35b50503461047f578160031936011261047f579054905160089190911c6001600160a01b03168152602090f35b83346103a85760203660031901126103a85761086461084f612d82565b6108576131b5565b61085f6131e5565b612fa4565b60016000805160206133038339815191525580f35b50503461047f57602036600319011261047f5760209160ff9082906001600160a01b036108a4612d1a565b1681526007855220541690519015158152f35b929050346103b8576101203660031901126103b8576108d4612d1a565b916108dd612d30565b6108e5612d73565b91610104906108f26131b5565b6001600160a01b0395861693843b156109825787946101249386928851998a9788966310dbbd1760e01b88523390880152166024860152151560448501526064356064850152608435608485015260a43560a485015260c43560c485015260e43560e48501528035908401525af19081156103ab5750610394575060016000805160206133038339815191525580f35b8780fd5b50503461047f578160031936011261047f57602090516703782dace9d900008152f35b50503461047f578160031936011261047f57602090516236ee808152f35b50503461047f578160031936011261047f576020906002549051908152f35b5091903461047f57606036600319011261047f57610a02612d1a565b906024359360443592610a136131b5565b825163c3c2247560e01b81526001600160a01b03919091169590602090818185818b5afa9081156107bf578791610b40575b5082149081610adf575b50610ad05783151580610ac7575b610ab8578585963b15610ab457859283606492865197889586946318e836ab60e21b86523390860152602485015260448401525af19081156103ab5750610394575060016000805160206133038339815191525580f35b8580fd5b509051632a9ffab760e21b8152fd5b50838111610a5d565b50905163c23f6ccb60e01b8152fd5b8451631804cb2760e21b8152909150818185818b5afa9182156107bf578792610b0d575b5050841438610a4f565b90809250813d8311610b39575b610b248183612dff565b81010312610b3457513880610b03565b600080fd5b503d610b1a565b90508181813d8311610b66575b610b578183612dff565b81010312610b34575138610a45565b503d610b4d565b50503461047f578160031936011261047f5760209051674563918244f400008152f35b5091903461047f578060031936011261047f57610bab612d1a565b90610bb4612d30565b610bbc6131b5565b6001600160a01b03928184169081156107c9578351630e4bd7d960e21b8152908516946060828981895afa9182156107bf578792610cb1575b50808583015116831461077e57808251168314918215610ca1575b505061072857825163368d094360e21b8152868101829052602081602481885afa908115610767578691610c82575b50610728578452600760205260ff828520541661071857938394833b156103b45761036d938592838551809781958294639707df4d60e01b845233908401613003565b610c9b915060203d602011610760576107528183612dff565b38610c3f565b6020015116821490503880610c10565b610ccb91925060603d6060116107b8576107a98183612dff565b9038610bf5565b929050346103b857806003193601126103b857610ced612d1a565b91610cf6612d30565b92610cff6131b5565b6001600160a01b031692833b156103b45761036d9385928385518097819582946317abaaed60e31b845233908401613003565b5091903461047f57602036600319011261047f578235610d506131b5565b610d586131e5565b67016345785d8a00008111610dba5760065490818114610449577fe9bcd3aa21241bd6922e4684c950425edd128358ad7b30f11d596a889b5232c39394508060065582519182526020820152a160016000805160206133038339815191525580f35b815163390edff560e11b81528490fd5b50503461047f578160031936011261047f578051610e0791610deb82612de4565b60058252640352e302e360dc1b60208301525191829182612e3b565b0390f35b50503461047f578160031936011261047f576020906003549051908152f35b50503461047f578160031936011261047f5760209051670de0b6b3a76400008152f35b5091903461047f57602036600319011261047f578235610e6b6131b5565b610e736131e5565b60015481108015610ed6575b6104595760035490818114610449577ff5a71b50122870af64c64adf8404af2029395e58592f1f97fd58da4dca004a049394508060035582519182526020820152a160016000805160206133038339815191525580f35b506002548111610e7f565b5091903461047f578060031936011261047f57610efc612d1a565b9060243591610f096131b5565b6006548311610fd1578151631311951760e11b81526001600160a01b039190911692906060818781875afa908115610fc7579083918691610f8a575b5001518114610f7a57938394833b156103b45761036d9385928385518097819582946365f0098760e11b845233908401612f89565b815163c23f6ccb60e01b81528590fd5b91505060603d606011610fc0575b610fa28183612dff565b810190606081830312610ab4578391610fba91612ec4565b38610f45565b503d610f98565b83513d87823e3d90fd5b815163390edff560e11b81528590fd5b5091903461047f578060031936011261047f57610ffc612d1a565b90602435916110096131b5565b82156110a7578151631627391760e11b81526001600160a01b039190911692906080818781875afa908115610fc757906020918691611078575b5001518114610f7a57938394833b156103b45761036d938592838551809781958294635c7a68b360e01b845233908401612f89565b61109a915060803d6080116110a0575b6110928183612dff565b810190612f3b565b38611043565b503d611088565b8151636a43f8d160e01b81528590fd5b5082903461047f57606036600319011261047f576110d3612d1a565b926110dc612d30565b916110e5612d73565b926110ee6131b5565b6001600160a01b0381811690811561130a5784516316d0402960e11b815288821692602092909183818881885afa90811561129c579082918b916112dd575b50169361114f84878d8b5193849283926355aebb6d60e11b84528d8401613003565b0381895afa9081156112d3578b916112b6575b501515891515146112a657886111e0575b505050508596813b156111dc578680946111a28751988996879586946366239a1360e01b865233908601613116565b03925af19081156103ab57506111c8575060016000805160206133038339815191525580f35b6111d190612da0565b6103a857808261037e565b8680fd5b9060608792895193848092630e4bd7d960e21b82525afa91821561129c578a9261127b575b508781835116841492831561126c575b831561125d575b50505061124d578752600790528386205460ff1661123d5787808080611173565b83516309550c7760e01b81528390fd5b8551632a9ffab760e21b81528590fd5b015116821490508a878161121c565b85810151831685149350611215565b61129591925060603d6060116107b8576107a98183612dff565b908b611205565b88513d8c823e3d90fd5b875163c23f6ccb60e01b81528790fd5b6112cd9150853d8711610760576107528183612dff565b8c611162565b89513d8d823e3d90fd5b6112fd9150853d8711611303575b6112f58183612dff565b810190612ea5565b8c61112d565b503d6112eb565b845163d92e233d60e01b81528490fd5b50503461047f578160031936011261047f576000805160206132c38339815191525490516001600160a01b039091168152602090f35b50503461047f573660031901126103a85761086461136c612d1a565b611374612d91565b9061137d6131b5565b6113856131e5565b61301d565b50346105bf5760203660031901126105bf576113a4612d1a565b906113ad6131b5565b6113b56131e5565b6008549060018060a01b038083169316938385146114175750506001600160a01b03191682176008557f064d28d3d3071c5cbc271a261c10c2f0f0d9e319390397101aa0eb23c6bad9098380a360016000805160206133038339815191525580f35b5163c23f6ccb60e01b8152fd5b929050346103b857806003193601126103b85761143f612d1a565b91611448612d30565b926114516131b5565b6001600160a01b031692833b156103b45761036d938592838551809781958294630fd8128f60e31b845233908401613003565b5090346105bf5760203660031901126105bf576001600160a01b036114a7612d1a565b168352600760205260ff81842054166114be578280f35b516309550c7760e01b8152fd5b5082903461047f57606036600319011261047f576114e7612d1a565b926114f0612d30565b916114f9612d73565b926115026131b5565b6001600160a01b039081169081156116d557841561167e57808716845163368d094360e21b81528385820152602081602481855afa908115611674578891611655575b506116455760608491865192838092630e4bd7d960e21b82525afa9081156107bf578791611626575b508185818351168514928315611616575b8315611607575b5050506115f757818652600760205260ff848720541661123d5785965b16803b15610ab457859283606492865197889586946366a3ae2d60e11b865233908601526024850152151560448401525af19081156103ab57506111c8575060016000805160206133038339815191525580f35b8351632a9ffab760e21b81528390fd5b0151168314905081858a611586565b602081015183168614935061157f565b61163f915060603d6060116107b8576107a98183612dff565b8861156e565b845163c23f6ccb60e01b81528490fd5b61166e915060203d602011610760576107528183612dff565b89611545565b86513d8a823e3d90fd5b835163368d094360e21b81528381018390526020816024818b86165afa9081156107bf5787916116b6575b50156115f75785966115a3565b6116cf915060203d602011610760576107528183612dff565b886116a9565b835163d92e233d60e01b81528390fd5b5091903461047f578060031936011261047f57611700612d1a565b906024359161170d6131b5565b82156117a357815163d2045f6d60e01b81526001600160a01b0391909116929060209081818881885afa9081156107675786916117f4575b5082146117e45782516278744560e21b815281818881885afa918215610767579083929187926117b3575b5050116117a357938394833b156103b45761036d938592838551809781958294632ebc39cd60e11b845233908401612f89565b8151632a9ffab760e21b81528590fd5b8193508092503d83116117dd575b6117cb8183612dff565b81010312610b34578190513880611770565b503d6117c1565b825163c23f6ccb60e01b81528690fd5b90508181813d831161181a575b61180b8183612dff565b81010312610b34575138611745565b503d611801565b5091903461047f578060031936011261047f5761183c612d1a565b90602435916118496131b5565b82156117a35781516364737b0b60e01b81526001600160a01b039190911692906020818781875afa908115610fc75785916118b2575b508114610f7a57938394833b156103b45761036d93859283855180978195829463249c279d60e21b845233908401612f89565b90506020813d6020116118dc575b816118cd60209383612dff565b81010312610b3457513861187f565b3d91506118c0565b50503461047f578160031936011261047f576020906006549051908152f35b5091903461047f578060031936011261047f5761191e612d1a565b90611927612d30565b61192f6131b5565b6001600160a01b03928184169081156107c9578351630e4bd7d960e21b8152908516946060828981895afa9182156107bf578792611a24575b5080825116831461077e578085830151168314918215611a14575b505061072857825163368d094360e21b8152868101829052602081602481885afa9081156107675786916119f5575b50610728578452600760205260ff828520541661071857938394833b156103b45761036d93859283855180978195829463c55b6bb760e01b845233908401613003565b611a0e915060203d602011610760576107528183612dff565b386119b2565b6020015116821490503880611983565b611a3e91925060603d6060116107b8576107a98183612dff565b9038611968565b5082903461047f578260031936011261047f57611a60612d1a565b926024356001600160401b038111611ad357611a7f9036908401612d46565b9290611a896131b5565b8315610ab85793948594906001600160a01b0316803b15610ab4576111a29486809486519788958694859363a2cdb40760e01b855233908501528960248501526044840191612e84565b8380fd5b5082903461047f57606036600319011261047f57611af3612d1a565b92611afc612d30565b91611b05612d73565b92611b0e6131b5565b6001600160a01b0381811690811561130a5784516316d0402960e11b815288821692602092909183818881885afa90811561129c579082918b91611c7b575b501693611b6f84878d8b519384928392630b25a48960e01b84528d8401613003565b0381895afa9081156112d3578b91611c5e575b501515891515146112a65788611bc2575b505050508596813b156111dc578680946111a2875198899687958694637fd0d99760e11b865233908601613116565b9060608792895193848092630e4bd7d960e21b82525afa91821561129c578a92611c3d575b5087818351168414928315611c2e575b8315611c1f575b50505061124d578752600790528386205460ff1661123d5787808080611b93565b015116821490508a8781611bfe565b85810151831685149350611bf7565b611c5791925060603d6060116107b8576107a98183612dff565b908b611be7565b611c759150853d8711610760576107528183612dff565b8c611b82565b611c929150853d8711611303576112f58183612dff565b8c611b4d565b5091903461047f578060031936011261047f57611cb3612d1a565b611cbb612d91565b91611cc46131b5565b6008546001600160a01b03163303611ce15750906108649161301d565b516282b42960e81b81528490fd5b83346103a857806003193601126103a857611d086131e5565b6000805160206132c383398151915280546001600160a01b031981169091556000906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b5090346105bf5760a03660031901126105bf57611d75612d1a565b90611d7e612d30565b60843590811515809203610b34578594611d966131b5565b6001600160a01b0394851690813b156111dc578660a49281958751988996879563ede4ab5760e01b875233908701521660248501526044356044850152606435606485015260848401525af19081156103ab5750610394575060016000805160206133038339815191525580f35b5090346105bf5760803660031901126105bf57611e1f612d1a565b90611e28612d30565b611e30612d73565b90606435801515809103610b34578695611e486131b5565b6001600160a01b0395861693843b1561098257879460849386928851998a978896630eff1e4360e41b885233908801521660248601521515604485015260648401525af19081156103ab5750610394575060016000805160206133038339815191525580f35b929050346103b857806003193601126103b857611ec9612d1a565b91611ed2612d30565b92611edb6131b5565b6001600160a01b031692833b156103b45761036d93859283855180978195829463e126430360e01b845233908401613003565b929050346103b857806003193601126103b857611f29612d1a565b611f316131b5565b6001600160a01b0316803b1561061e578151632582fe1360e01b8152928491849182908490829061036d906024359033908401612f89565b50346105bf57826003193601126105bf5760209250549051908152f35b5091903461047f578060031936011261047f57611fa1612d1a565b9060243593611fae6131b5565b81516316d0402960e11b81526001600160a01b03848116969160208185818b5afa9081156107bf5787916120a4575b50169583519063baa29ceb60e01b8252838201526060816024818a5afa908115610767578691612069575b50805182146120595761202860206706f05b59d3b2000092015183612ef6565b11610ab8578585963b15610ab45761036d948680948651978895869485936354c461a560e11b855233908501612f19565b835163c23f6ccb60e01b81528390fd5b905060603d60601161209d575b6120808183612dff565b8101906060818303126111dc579061209791612ec4565b38612008565b503d612076565b6120bd915060203d602011611303576112f58183612dff565b38611fdd565b50503461047f578160031936011261047f576020906005549051908152f35b5091903461047f578060031936011261047f576120fd612d1a565b906024359361210a6131b5565b81516316d0402960e11b81526001600160a01b03848116969160208185818b5afa9081156107bf5787916121d9575b50169583519063baa29ceb60e01b8252838201526060816024818a5afa90811561076757908491879161219c575b5001518114610ad0578585963b15610ab45761036d94868094865197889586948593633577818160e01b855233908501612f19565b91505060603d6060116121d2575b6121b48183612dff565b8101906060818303126111dc5784916121cc91612ec4565b38612167565b503d6121aa565b6121f2915060203d602011611303576112f58183612dff565b38612139565b5090346105bf57826003193601126105bf5760ff835416612217578280f35b51634427925560e01b8152fd5b5091903461047f57602036600319011261047f5782356122426131b5565b61224a6131e5565b600154811080156122ad575b6104595760025490818114610449577f39787d7ea4008505c060b31a371d9d4eefc0f178ee47d39e3b647b0c266cc6219394508060025582519182526020820152a160016000805160206133038339815191525580f35b506003548110612256565b50503461047f578160031936011261047f576020905167016345785d8a00008152f35b50503461047f578160031936011261047f578051610e07916122fc82612de4565b60068252653b191719171960d11b60208301525191829182612e3b565b5091346103a857806003193601126103a857507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316300361237357602090516000805160206132e38339815191528152f35b5163703e46dd60e11b8152fd5b5090806003193601126105bf57612395612d1a565b9060249384356001600160401b03811161047f573660238201121561047f57808501356123c181612e20565b946123ce85519687612dff565b81865260209182870193368a8383010111610ab4578186928b8693018737880101526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081163081149081156125a1575b50612591576124336131e5565b81169585516352d1902d60e01b815283818a818b5afa869181612562575b5061246d575050505050505191634c9c8ce360e01b8352820152fd5b9088888894938c6000805160206132e38339815191529182810361254d5750853b15612539575080546001600160a01b031916821790558451889392917fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8580a282511561251b57505061250d9582915190845af4913d15612511573d6124ff6124f682612e20565b92519283612dff565b81528581943d92013e61325f565b5080f35b506060925061325f565b95509550505050503461252d57505080f35b63b398979f60e01b8152fd5b8651634c9c8ce360e01b8152808501849052fd5b8751632a87526960e21b815280860191909152fd5b9091508481813d831161258a575b61257a8183612dff565b810103126111dc57519038612451565b503d612570565b855163703e46dd60e11b81528890fd5b9050816000805160206132e38339815191525416141538612426565b50346105bf5760203660031901126105bf576125d7612d82565b916125e06131b5565b6008546001600160a01b031633036125fc578361086484612fa4565b516282b42960e81b8152fd5b50346105bf57816003193601126105bf57612621612d1a565b612629612d30565b917ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a009283549160ff83871c1615936001600160401b039384811680159081612842575b6001149081612838575b15908161282f575b5061281f5767ffffffffffffffff19811660011787556126b0919086612800575b506126a861321e565b6107fe61321e565b6126b861321e565b6126c061321e565b6126c861321e565b6001600080516020613303833981519152556001600160a01b03821680156127f1578651936101008501908111858210176127dc579060e094939291885288845260208401526703782dace9d900008088850152674563918244f40000806060860152670de0b6b3a7640000918260808701526236ee80948560a08801526305265c00968760c082015267016345785d8a0000988991015260005490610100600160a81b039060081b169060ff8d1515169060018060a81b0319161717600055600155600255600355556005556006556127a0578280f35b805460ff60401b1916905551600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a138808280f35b604183634e487b7160e01b6000525260246000fd5b50855163d92e233d60e01b8152fd5b68ffffffffffffffffff1916680100000000000000011787553861269f565b875163f92ee8a960e01b81528390fd5b9050153861267e565b303b159150612676565b87915061266c565b5091903461047f57602036600319011261047f5782356128686131b5565b6128706131e5565b6236ee80811080156128e0575b6128d05783549081811461044957807f21a40a12d0e7a76377e962e9ce90abcb030d3fc9fcee4b2566a46a7715ca683294955582519182526020820152a160016000805160206133038339815191525580f35b81516305fabb6160e41b81528490fd5b50600554811161287d565b50503461047f578160031936011261047f5760085490516001600160a01b039091168152602090f35b50503461047f578160031936011261047f57602090516305265c008152f35b5091903461047f578060031936011261047f5761294e612d1a565b906024359161295b6131b5565b845483108015612a01575b6129f1578151631627391760e11b81526001600160a01b039190911692906080818781875afa908115610fc75790839186916129d2575b5001518114610f7a57938394833b156103b45761036d93859283855180978195829463145f178360e31b845233908401612f89565b6129eb915060803d6080116110a0576110928183612dff565b3861299d565b81516305fabb6160e41b81528590fd5b506005548311612966565b5091903461047f578060031936011261047f57612a27612d1a565b9060243593612a346131b5565b81516316d0402960e11b81526001600160a01b03848116969160208185818b5afa9081156107bf578791612b1a575b50169583519063baa29ceb60e01b8252838201526060816024818a5afa908115610767578691612adf575b506020810151821461205957612aae6706f05b59d3b20000915183612ef6565b11610ab8578585963b15610ab45761036d948680948651978895869485936311db933960e11b855233908501612f19565b905060603d606011612b13575b612af68183612dff565b8101906060818303126111dc5790612b0d91612ec4565b38612a8e565b503d612aec565b612b33915060203d602011611303576112f58183612dff565b38612a63565b5090346105bf5760603660031901126105bf57612b54612d1a565b6024356001600160401b0381116103b457612b729036908501612d46565b612b7d929192612d73565b91612b866131b5565b6008546001600160a01b03919082163303612c155787949391169190823b156103b457612bd896859187519889968795869463694f0aad60e11b86523390860152606060248601526064850191612e84565b901515604483015203925af19081156103ab5750612c06575060016000805160206133038339815191525580f35b612c0f90612da0565b3861037e565b85516282b42960e81b81528790fd5b50503461047f578160031936011261047f576020906001549051908152f35b50503461047f578160031936011261047f57602090516706f05b59d3b200008152f35b5091903461047f57602036600319011261047f578235612c846131b5565b612c8c6131e5565b835481108015612cee575b6128d05760055490818114610449577fbaeeac8f8a689e49b9757e4fe1ca7f9ad3d59c82438cc1133c96a7bed80223119394508060055582519182526020820152a160016000805160206133038339815191525580f35b506305265c008111612c97565b84903461047f578160031936011261047f5760ff602092541615158152f35b600435906001600160a01b0382168203610b3457565b602435906001600160a01b0382168203610b3457565b9181601f84011215610b34578235916001600160401b038311610b345760208381860195010111610b3457565b604435908115158203610b3457565b600435908115158203610b3457565b602435908115158203610b3457565b6001600160401b038111612db357604052565b634e487b7160e01b600052604160045260246000fd5b606081019081106001600160401b03821117612db357604052565b604081019081106001600160401b03821117612db357604052565b90601f801991011681019081106001600160401b03821117612db357604052565b6001600160401b038111612db357601f01601f191660200190565b6020808252825181830181905290939260005b828110612e7057505060409293506000838284010152601f8019910116010190565b818101860151848201604001528501612e4e565b908060209392818452848401376000828201840152601f01601f1916010190565b90816020910312610b3457516001600160a01b0381168103610b345790565b9190826060910312610b3457604051612edc81612dc9565b604080829480518452602081015160208501520151910152565b91908201809211612f0357565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03918216815291166020820152604081019190915260600190565b90816080910312610b34576040519060808201908282106001600160401b03831117612db3576060916040528051835260208101516020840152604081015160408401520151606082015290565b6001600160a01b039091168152602081019190915260400190565b6000549015159060ff811615158214612ff15760ff191660ff8216176000556040519081527fa639e9716593d8bac9384b64b5619d86364f2cd4bbedbae60088c058442b0c4e90602090a1565b60405163c23f6ccb60e01b8152600490fd5b6001600160a01b0391821681529116602082015260400190565b6001600160a01b03169081156130925781600052600760205260ff604060002054169015158091151514612ff15760207f56b7e599ad39f8ce732b1f0d62c5c93895f6684714a589efff937f691978d37c918360005260078252604060002060ff1981541660ff8316179055604051908152a2565b60405163d92e233d60e01b8152600490fd5b90816020910312610b3457518015158103610b345790565b51906001600160a01b0382168203610b3457565b90816060910312610b345761310e60408051926130ec84612dc9565b6130f5816130bc565b8452613103602082016130bc565b6020850152016130bc565b604082015290565b6001600160a01b03918216815291811660208301529091166040820152901515606082015260800190565b6001600160a01b0390811690811561319c576000805160206132c383398151915280546001600160a01b031981168417909155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b604051631e4fbdf760e01b815260006004820152602490fd5b60008051602061330383398151915260028154146131d35760029055565b604051633ee5aeb560e01b8152600490fd5b6000805160206132c3833981519152546001600160a01b0316330361320657565b60405163118cdaa760e01b8152336004820152602490fd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c161561324d57565b604051631afcd79f60e31b8152600490fd5b90613286575080511561327457602081519101fd5b60405163d6bda27560e01b8152600490fd5b815115806132b9575b613297575090565b604051639996b31560e01b81526001600160a01b039091166004820152602490fd5b50803b1561328f56fe9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00a26469706673582212209c7aa10e8bcacd183ead3163de7b104dc1b88c25b270ab85a4fb98b3f96a037964736f6c63430008160033","name":"EmberProtocolConfig","is_blueprint":false,"license_type":"none","is_fully_verified":true,"is_verified_via_eth_bytecode_db":false,"language":"solidity","evm_version":"paris","can_be_visualized_via_sol2uml":true,"is_verified_via_sourcify":false,"additional_sources":[{"file_path":"@openzeppelin/contracts/interfaces/draft-IERC1822.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/draft-IERC1822.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev ERC-1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\n * proxy whose upgrades are fully controlled by the current implementation.\n */\ninterface IERC1822Proxiable {\n    /**\n     * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\n     * address.\n     *\n     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n     * function revert if invoked through a proxy.\n     */\n    function proxiableUUID() external view returns (bytes32);\n}\n"},{"file_path":"@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (proxy/ERC1967/ERC1967Utils.sol)\n\npragma solidity ^0.8.21;\n\nimport {IBeacon} from \"../beacon/IBeacon.sol\";\nimport {IERC1967} from \"../../interfaces/IERC1967.sol\";\nimport {Address} from \"../../utils/Address.sol\";\nimport {StorageSlot} from \"../../utils/StorageSlot.sol\";\n\n/**\n * @dev This library provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[ERC-1967] slots.\n */\nlibrary ERC1967Utils {\n    /**\n     * @dev Storage slot with the address of the current implementation.\n     * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1.\n     */\n    // solhint-disable-next-line private-vars-leading-underscore\n    bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n    /**\n     * @dev The `implementation` of the proxy is invalid.\n     */\n    error ERC1967InvalidImplementation(address implementation);\n\n    /**\n     * @dev The `admin` of the proxy is invalid.\n     */\n    error ERC1967InvalidAdmin(address admin);\n\n    /**\n     * @dev The `beacon` of the proxy is invalid.\n     */\n    error ERC1967InvalidBeacon(address beacon);\n\n    /**\n     * @dev An upgrade function sees `msg.value > 0` that may be lost.\n     */\n    error ERC1967NonPayable();\n\n    /**\n     * @dev Returns the current implementation address.\n     */\n    function getImplementation() internal view returns (address) {\n        return StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value;\n    }\n\n    /**\n     * @dev Stores a new address in the ERC-1967 implementation slot.\n     */\n    function _setImplementation(address newImplementation) private {\n        if (newImplementation.code.length == 0) {\n            revert ERC1967InvalidImplementation(newImplementation);\n        }\n        StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value = newImplementation;\n    }\n\n    /**\n     * @dev Performs implementation upgrade with additional setup call if data is nonempty.\n     * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected\n     * to avoid stuck value in the contract.\n     *\n     * Emits an {IERC1967-Upgraded} event.\n     */\n    function upgradeToAndCall(address newImplementation, bytes memory data) internal {\n        _setImplementation(newImplementation);\n        emit IERC1967.Upgraded(newImplementation);\n\n        if (data.length > 0) {\n            Address.functionDelegateCall(newImplementation, data);\n        } else {\n            _checkNonPayable();\n        }\n    }\n\n    /**\n     * @dev Storage slot with the admin of the contract.\n     * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1.\n     */\n    // solhint-disable-next-line private-vars-leading-underscore\n    bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n    /**\n     * @dev Returns the current admin.\n     *\n     * TIP: To get this value clients can read directly from the storage slot shown below (specified by ERC-1967) using\n     * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n     * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\n     */\n    function getAdmin() internal view returns (address) {\n        return StorageSlot.getAddressSlot(ADMIN_SLOT).value;\n    }\n\n    /**\n     * @dev Stores a new address in the ERC-1967 admin slot.\n     */\n    function _setAdmin(address newAdmin) private {\n        if (newAdmin == address(0)) {\n            revert ERC1967InvalidAdmin(address(0));\n        }\n        StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin;\n    }\n\n    /**\n     * @dev Changes the admin of the proxy.\n     *\n     * Emits an {IERC1967-AdminChanged} event.\n     */\n    function changeAdmin(address newAdmin) internal {\n        emit IERC1967.AdminChanged(getAdmin(), newAdmin);\n        _setAdmin(newAdmin);\n    }\n\n    /**\n     * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n     * This is the keccak-256 hash of \"eip1967.proxy.beacon\" subtracted by 1.\n     */\n    // solhint-disable-next-line private-vars-leading-underscore\n    bytes32 internal constant BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n    /**\n     * @dev Returns the current beacon.\n     */\n    function getBeacon() internal view returns (address) {\n        return StorageSlot.getAddressSlot(BEACON_SLOT).value;\n    }\n\n    /**\n     * @dev Stores a new beacon in the ERC-1967 beacon slot.\n     */\n    function _setBeacon(address newBeacon) private {\n        if (newBeacon.code.length == 0) {\n            revert ERC1967InvalidBeacon(newBeacon);\n        }\n\n        StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon;\n\n        address beaconImplementation = IBeacon(newBeacon).implementation();\n        if (beaconImplementation.code.length == 0) {\n            revert ERC1967InvalidImplementation(beaconImplementation);\n        }\n    }\n\n    /**\n     * @dev Change the beacon and trigger a setup call if data is nonempty.\n     * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected\n     * to avoid stuck value in the contract.\n     *\n     * Emits an {IERC1967-BeaconUpgraded} event.\n     *\n     * CAUTION: Invoking this function has no effect on an instance of {BeaconProxy} since v5, since\n     * it uses an immutable beacon without looking at the value of the ERC-1967 beacon slot for\n     * efficiency.\n     */\n    function upgradeBeaconToAndCall(address newBeacon, bytes memory data) internal {\n        _setBeacon(newBeacon);\n        emit IERC1967.BeaconUpgraded(newBeacon);\n\n        if (data.length > 0) {\n            Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n        } else {\n            _checkNonPayable();\n        }\n    }\n\n    /**\n     * @dev Reverts if `msg.value` is not zero. It can be used to avoid `msg.value` stuck in the contract\n     * if an upgrade doesn't perform an initialization call.\n     */\n    function _checkNonPayable() private {\n        if (msg.value > 0) {\n            revert ERC1967NonPayable();\n        }\n    }\n}\n"},{"file_path":"@openzeppelin/contracts/proxy/beacon/IBeacon.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (proxy/beacon/IBeacon.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n    /**\n     * @dev Must return an address that can be used as a delegate call target.\n     *\n     * {UpgradeableBeacon} will check that this address is a contract.\n     */\n    function implementation() external view returns (address);\n}\n"},{"file_path":"@openzeppelin/contracts/utils/Address.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/Address.sol)\n\npragma solidity ^0.8.20;\n\nimport {Errors} from \"./Errors.sol\";\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n    /**\n     * @dev There's no code at `target` (it is not a contract).\n     */\n    error AddressEmptyCode(address target);\n\n    /**\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n     * `recipient`, forwarding all available gas and reverting on errors.\n     *\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\n     * imposed by `transfer`, making them unable to receive funds via\n     * `transfer`. {sendValue} removes this limitation.\n     *\n     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n     *\n     * IMPORTANT: because control is transferred to `recipient`, care must be\n     * taken to not create reentrancy vulnerabilities. Consider using\n     * {ReentrancyGuard} or the\n     * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n     */\n    function sendValue(address payable recipient, uint256 amount) internal {\n        if (address(this).balance < amount) {\n            revert Errors.InsufficientBalance(address(this).balance, amount);\n        }\n\n        (bool success, bytes memory returndata) = recipient.call{value: amount}(\"\");\n        if (!success) {\n            _revert(returndata);\n        }\n    }\n\n    /**\n     * @dev Performs a Solidity function call using a low level `call`. A\n     * plain `call` is an unsafe replacement for a function call: use this\n     * function instead.\n     *\n     * If `target` reverts with a revert reason or custom error, it is bubbled\n     * up by this function (like regular Solidity function calls). However, if\n     * the call reverted with no returned reason, this function reverts with a\n     * {Errors.FailedCall} error.\n     *\n     * Returns the raw returned data. To convert to the expected return value,\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n     *\n     * Requirements:\n     *\n     * - `target` must be a contract.\n     * - calling `target` with `data` must not revert.\n     */\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but also transferring `value` wei to `target`.\n     *\n     * Requirements:\n     *\n     * - the calling contract must have an ETH balance of at least `value`.\n     * - the called Solidity function must be `payable`.\n     */\n    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n        if (address(this).balance < value) {\n            revert Errors.InsufficientBalance(address(this).balance, value);\n        }\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResultFromTarget(target, success, returndata);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a static call.\n     */\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResultFromTarget(target, success, returndata);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a delegate call.\n     */\n    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n        (bool success, bytes memory returndata) = target.delegatecall(data);\n        return verifyCallResultFromTarget(target, success, returndata);\n    }\n\n    /**\n     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target\n     * was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case\n     * of an unsuccessful call.\n     */\n    function verifyCallResultFromTarget(\n        address target,\n        bool success,\n        bytes memory returndata\n    ) internal view returns (bytes memory) {\n        if (!success) {\n            _revert(returndata);\n        } else {\n            // only check if target is a contract if the call was successful and the return data is empty\n            // otherwise we already know that it was a contract\n            if (returndata.length == 0 && target.code.length == 0) {\n                revert AddressEmptyCode(target);\n            }\n            return returndata;\n        }\n    }\n\n    /**\n     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the\n     * revert reason or with a default {Errors.FailedCall} error.\n     */\n    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {\n        if (!success) {\n            _revert(returndata);\n        } else {\n            return returndata;\n        }\n    }\n\n    /**\n     * @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}.\n     */\n    function _revert(bytes memory returndata) private pure {\n        // Look for revert reason and bubble it up if present\n        if (returndata.length > 0) {\n            // The easiest way to bubble the revert reason is using memory via assembly\n            assembly (\"memory-safe\") {\n                revert(add(returndata, 0x20), mload(returndata))\n            }\n        } else {\n            revert Errors.FailedCall();\n        }\n    }\n}\n"},{"file_path":"@openzeppelin/contracts/utils/Errors.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Collection of common custom errors used in multiple contracts\n *\n * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.\n * It is recommended to avoid relying on the error API for critical functionality.\n *\n * _Available since v5.1._\n */\nlibrary Errors {\n    /**\n     * @dev The ETH balance of the account is not enough to perform the operation.\n     */\n    error InsufficientBalance(uint256 balance, uint256 needed);\n\n    /**\n     * @dev A call to an address target failed. The target may have reverted.\n     */\n    error FailedCall();\n\n    /**\n     * @dev The deployment failed.\n     */\n    error FailedDeployment();\n\n    /**\n     * @dev A necessary precompile is missing.\n     */\n    error MissingPrecompile(address);\n}\n"},{"file_path":"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {ContextUpgradeable} from \"../utils/ContextUpgradeable.sol\";\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n    /// @custom:storage-location erc7201:openzeppelin.storage.Ownable\n    struct OwnableStorage {\n        address _owner;\n    }\n\n    // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Ownable\")) - 1)) & ~bytes32(uint256(0xff))\n    bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;\n\n    function _getOwnableStorage() private pure returns (OwnableStorage storage $) {\n        assembly {\n            $.slot := OwnableStorageLocation\n        }\n    }\n\n    /**\n     * @dev The caller account is not authorized to perform an operation.\n     */\n    error OwnableUnauthorizedAccount(address account);\n\n    /**\n     * @dev The owner is not a valid owner account. (eg. `address(0)`)\n     */\n    error OwnableInvalidOwner(address owner);\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n     */\n    function __Ownable_init(address initialOwner) internal onlyInitializing {\n        __Ownable_init_unchained(initialOwner);\n    }\n\n    function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {\n        if (initialOwner == address(0)) {\n            revert OwnableInvalidOwner(address(0));\n        }\n        _transferOwnership(initialOwner);\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        _checkOwner();\n        _;\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        OwnableStorage storage $ = _getOwnableStorage();\n        return $._owner;\n    }\n\n    /**\n     * @dev Throws if the sender is not the owner.\n     */\n    function _checkOwner() internal view virtual {\n        if (owner() != _msgSender()) {\n            revert OwnableUnauthorizedAccount(_msgSender());\n        }\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby disabling any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        if (newOwner == address(0)) {\n            revert OwnableInvalidOwner(address(0));\n        }\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        OwnableStorage storage $ = _getOwnableStorage();\n        address oldOwner = $._owner;\n        $._owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n}\n"},{"file_path":"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n *     function initialize() initializer public {\n *         __ERC20_init(\"MyToken\", \"MTK\");\n *     }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n *     function initializeV2() reinitializer(2) public {\n *         __ERC20Permit_init(\"MyToken\");\n *     }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n *     _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n    /**\n     * @dev Storage of the initializable contract.\n     *\n     * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\n     * when using with upgradeable contracts.\n     *\n     * @custom:storage-location erc7201:openzeppelin.storage.Initializable\n     */\n    struct InitializableStorage {\n        /**\n         * @dev Indicates that the contract has been initialized.\n         */\n        uint64 _initialized;\n        /**\n         * @dev Indicates that the contract is in the process of being initialized.\n         */\n        bool _initializing;\n    }\n\n    // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Initializable\")) - 1)) & ~bytes32(uint256(0xff))\n    bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;\n\n    /**\n     * @dev The contract is already initialized.\n     */\n    error InvalidInitialization();\n\n    /**\n     * @dev The contract is not initializing.\n     */\n    error NotInitializing();\n\n    /**\n     * @dev Triggered when the contract has been initialized or reinitialized.\n     */\n    event Initialized(uint64 version);\n\n    /**\n     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n     * `onlyInitializing` functions can be used to initialize parent contracts.\n     *\n     * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any\n     * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in\n     * production.\n     *\n     * Emits an {Initialized} event.\n     */\n    modifier initializer() {\n        // solhint-disable-next-line var-name-mixedcase\n        InitializableStorage storage $ = _getInitializableStorage();\n\n        // Cache values to avoid duplicated sloads\n        bool isTopLevelCall = !$._initializing;\n        uint64 initialized = $._initialized;\n\n        // Allowed calls:\n        // - initialSetup: the contract is not in the initializing state and no previous version was\n        //                 initialized\n        // - construction: the contract is initialized at version 1 (no reinitialization) and the\n        //                 current contract is just being deployed\n        bool initialSetup = initialized == 0 && isTopLevelCall;\n        bool construction = initialized == 1 && address(this).code.length == 0;\n\n        if (!initialSetup && !construction) {\n            revert InvalidInitialization();\n        }\n        $._initialized = 1;\n        if (isTopLevelCall) {\n            $._initializing = true;\n        }\n        _;\n        if (isTopLevelCall) {\n            $._initializing = false;\n            emit Initialized(1);\n        }\n    }\n\n    /**\n     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n     * used to initialize parent contracts.\n     *\n     * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n     * are added through upgrades and that require initialization.\n     *\n     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n     * cannot be nested. If one is invoked in the context of another, execution will revert.\n     *\n     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n     * a contract, executing them in the right order is up to the developer or operator.\n     *\n     * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.\n     *\n     * Emits an {Initialized} event.\n     */\n    modifier reinitializer(uint64 version) {\n        // solhint-disable-next-line var-name-mixedcase\n        InitializableStorage storage $ = _getInitializableStorage();\n\n        if ($._initializing || $._initialized >= version) {\n            revert InvalidInitialization();\n        }\n        $._initialized = version;\n        $._initializing = true;\n        _;\n        $._initializing = false;\n        emit Initialized(version);\n    }\n\n    /**\n     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n     * {initializer} and {reinitializer} modifiers, directly or indirectly.\n     */\n    modifier onlyInitializing() {\n        _checkInitializing();\n        _;\n    }\n\n    /**\n     * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\n     */\n    function _checkInitializing() internal view virtual {\n        if (!_isInitializing()) {\n            revert NotInitializing();\n        }\n    }\n\n    /**\n     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n     * through proxies.\n     *\n     * Emits an {Initialized} event the first time it is successfully executed.\n     */\n    function _disableInitializers() internal virtual {\n        // solhint-disable-next-line var-name-mixedcase\n        InitializableStorage storage $ = _getInitializableStorage();\n\n        if ($._initializing) {\n            revert InvalidInitialization();\n        }\n        if ($._initialized != type(uint64).max) {\n            $._initialized = type(uint64).max;\n            emit Initialized(type(uint64).max);\n        }\n    }\n\n    /**\n     * @dev Returns the highest version that has been initialized. See {reinitializer}.\n     */\n    function _getInitializedVersion() internal view returns (uint64) {\n        return _getInitializableStorage()._initialized;\n    }\n\n    /**\n     * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n     */\n    function _isInitializing() internal view returns (bool) {\n        return _getInitializableStorage()._initializing;\n    }\n\n    /**\n     * @dev Pointer to storage slot. Allows integrators to override it with a custom storage location.\n     *\n     * NOTE: Consider following the ERC-7201 formula to derive storage locations.\n     */\n    function _initializableStorageSlot() internal pure virtual returns (bytes32) {\n        return INITIALIZABLE_STORAGE;\n    }\n\n    /**\n     * @dev Returns a pointer to the storage namespace.\n     */\n    // solhint-disable-next-line var-name-mixedcase\n    function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\n        bytes32 slot = _initializableStorageSlot();\n        assembly {\n            $.slot := slot\n        }\n    }\n}\n"},{"file_path":"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (proxy/utils/UUPSUpgradeable.sol)\n\npragma solidity ^0.8.22;\n\nimport {IERC1822Proxiable} from \"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\";\nimport {ERC1967Utils} from \"@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol\";\nimport {Initializable} from \"./Initializable.sol\";\n\n/**\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\n *\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\n * `UUPSUpgradeable` with a custom implementation of upgrades.\n *\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\n */\nabstract contract UUPSUpgradeable is Initializable, IERC1822Proxiable {\n    /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n    address private immutable __self = address(this);\n\n    /**\n     * @dev The version of the upgrade interface of the contract. If this getter is missing, both `upgradeTo(address)`\n     * and `upgradeToAndCall(address,bytes)` are present, and `upgradeTo` must be used if no function should be called,\n     * while `upgradeToAndCall` will invoke the `receive` function if the second argument is the empty byte string.\n     * If the getter returns `\"5.0.0\"`, only `upgradeToAndCall(address,bytes)` is present, and the second argument must\n     * be the empty byte string if no function should be called, making it impossible to invoke the `receive` function\n     * during an upgrade.\n     */\n    string public constant UPGRADE_INTERFACE_VERSION = \"5.0.0\";\n\n    /**\n     * @dev The call is from an unauthorized context.\n     */\n    error UUPSUnauthorizedCallContext();\n\n    /**\n     * @dev The storage `slot` is unsupported as a UUID.\n     */\n    error UUPSUnsupportedProxiableUUID(bytes32 slot);\n\n    /**\n     * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\n     * a proxy contract with an implementation (as defined in ERC-1967) pointing to self. This should only be the case\n     * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\n     * function through ERC-1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\n     * fail.\n     */\n    modifier onlyProxy() {\n        _checkProxy();\n        _;\n    }\n\n    /**\n     * @dev Check that the execution is not being performed through a delegate call. This allows a function to be\n     * callable on the implementing contract but not through proxies.\n     */\n    modifier notDelegated() {\n        _checkNotDelegated();\n        _;\n    }\n\n    function __UUPSUpgradeable_init() internal onlyInitializing {\n    }\n\n    function __UUPSUpgradeable_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev Implementation of the ERC-1822 {proxiableUUID} function. This returns the storage slot used by the\n     * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\n     *\n     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n     * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\n     */\n    function proxiableUUID() external view virtual notDelegated returns (bytes32) {\n        return ERC1967Utils.IMPLEMENTATION_SLOT;\n    }\n\n    /**\n     * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\n     * encoded in `data`.\n     *\n     * Calls {_authorizeUpgrade}.\n     *\n     * Emits an {Upgraded} event.\n     *\n     * @custom:oz-upgrades-unsafe-allow-reachable delegatecall\n     */\n    function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy {\n        _authorizeUpgrade(newImplementation);\n        _upgradeToAndCallUUPS(newImplementation, data);\n    }\n\n    /**\n     * @dev Reverts if the execution is not performed via delegatecall or the execution\n     * context is not of a proxy with an ERC-1967 compliant implementation pointing to self.\n     */\n    function _checkProxy() internal view virtual {\n        if (\n            address(this) == __self || // Must be called through delegatecall\n            ERC1967Utils.getImplementation() != __self // Must be called through an active proxy\n        ) {\n            revert UUPSUnauthorizedCallContext();\n        }\n    }\n\n    /**\n     * @dev Reverts if the execution is performed via delegatecall.\n     * See {notDelegated}.\n     */\n    function _checkNotDelegated() internal view virtual {\n        if (address(this) != __self) {\n            // Must not be called through delegatecall\n            revert UUPSUnauthorizedCallContext();\n        }\n    }\n\n    /**\n     * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\n     * {upgradeToAndCall}.\n     *\n     * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\n     *\n     * ```solidity\n     * function _authorizeUpgrade(address) internal onlyOwner {}\n     * ```\n     */\n    function _authorizeUpgrade(address newImplementation) internal virtual;\n\n    /**\n     * @dev Performs an implementation upgrade with a security check for UUPS proxies, and additional setup call.\n     *\n     * As a security check, {proxiableUUID} is invoked in the new implementation, and the return value\n     * is expected to be the implementation slot in ERC-1967.\n     *\n     * Emits an {IERC1967-Upgraded} event.\n     */\n    function _upgradeToAndCallUUPS(address newImplementation, bytes memory data) private {\n        try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n            if (slot != ERC1967Utils.IMPLEMENTATION_SLOT) {\n                revert UUPSUnsupportedProxiableUUID(slot);\n            }\n            ERC1967Utils.upgradeToAndCall(newImplementation, data);\n        } catch {\n            // The implementation is not UUPS\n            revert ERC1967Utils.ERC1967InvalidImplementation(newImplementation);\n        }\n    }\n}\n"},{"file_path":"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\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 ContextUpgradeable is Initializable {\n    function __Context_init() internal onlyInitializing {\n    }\n\n    function __Context_init_unchained() internal onlyInitializing {\n    }\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":"@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\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 EIP-1153 (transient storage) is available on the chain you're deploying at,\n * consider using {ReentrancyGuardTransient} instead.\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 ReentrancyGuardUpgradeable is Initializable {\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    /// @custom:storage-location erc7201:openzeppelin.storage.ReentrancyGuard\n    struct ReentrancyGuardStorage {\n        uint256 _status;\n    }\n\n    // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.ReentrancyGuard\")) - 1)) & ~bytes32(uint256(0xff))\n    bytes32 private constant ReentrancyGuardStorageLocation = 0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00;\n\n    function _getReentrancyGuardStorage() private pure returns (ReentrancyGuardStorage storage $) {\n        assembly {\n            $.slot := ReentrancyGuardStorageLocation\n        }\n    }\n\n    /**\n     * @dev Unauthorized reentrant call.\n     */\n    error ReentrancyGuardReentrantCall();\n\n    function __ReentrancyGuard_init() internal onlyInitializing {\n        __ReentrancyGuard_init_unchained();\n    }\n\n    function __ReentrancyGuard_init_unchained() internal onlyInitializing {\n        ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\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        ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\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        ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\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        ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\n        return $._status == ENTERED;\n    }\n}\n"},{"file_path":"@openzeppelin/contracts/interfaces/IERC1967.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1967.sol)\n\npragma solidity >=0.4.11;\n\n/**\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\n */\ninterface IERC1967 {\n    /**\n     * @dev Emitted when the implementation is upgraded.\n     */\n    event Upgraded(address indexed implementation);\n\n    /**\n     * @dev Emitted when the admin account has changed.\n     */\n    event AdminChanged(address previousAdmin, address newAdmin);\n\n    /**\n     * @dev Emitted when the beacon is changed.\n     */\n    event BeaconUpgraded(address indexed beacon);\n}\n"},{"file_path":"@openzeppelin/contracts/utils/StorageSlot.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/StorageSlot.sol)\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC-1967 implementation slot:\n * ```solidity\n * contract ERC1967 {\n *     // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.\n *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n *     function _getImplementation() internal view returns (address) {\n *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n *     }\n *\n *     function _setImplementation(address newImplementation) internal {\n *         require(newImplementation.code.length > 0);\n *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n *     }\n * }\n * ```\n *\n * TIP: Consider using this library along with {SlotDerivation}.\n */\nlibrary StorageSlot {\n    struct AddressSlot {\n        address value;\n    }\n\n    struct BooleanSlot {\n        bool value;\n    }\n\n    struct Bytes32Slot {\n        bytes32 value;\n    }\n\n    struct Uint256Slot {\n        uint256 value;\n    }\n\n    struct Int256Slot {\n        int256 value;\n    }\n\n    struct StringSlot {\n        string value;\n    }\n\n    struct BytesSlot {\n        bytes value;\n    }\n\n    /**\n     * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n     */\n    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns a `BooleanSlot` with member `value` located at `slot`.\n     */\n    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns a `Bytes32Slot` with member `value` located at `slot`.\n     */\n    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns a `Uint256Slot` with member `value` located at `slot`.\n     */\n    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns a `Int256Slot` with member `value` located at `slot`.\n     */\n    function getInt256Slot(bytes32 slot) internal pure returns (Int256Slot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns a `StringSlot` with member `value` located at `slot`.\n     */\n    function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\n     */\n    function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := store.slot\n        }\n    }\n\n    /**\n     * @dev Returns a `BytesSlot` with member `value` located at `slot`.\n     */\n    function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\n     */\n    function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := store.slot\n        }\n    }\n}\n"},{"file_path":"contracts/interfaces/IAtomicLiquidity.sol","source_code":"/*\n  Copyright (c) 2026 Ember Protocol Inc.\n  Proprietary Smart Contract License – All Rights Reserved.\n\n  This source code is provided for transparency and verification only.\n  Use, modification, reproduction, or redeployment of this code\n  requires prior written permission from the Ember Protocol Inc.\n*/\n\npragma solidity ^0.8.22;\n\n/// @title Atomic Liquidity Vault Interface\n/// @notice Subset of AtomicLiquidity's external surface that EmberProtocolConfig calls\n///         when forwarding admin operations. Mirrors the `caller`-as-first-arg pattern\n///         used by IEmberVault — the vault re-verifies the caller's role on its side.\ninterface IAtomicLiquidity {\n  /// @notice Sets (or clears) the external ERC-4626 strategy.\n  function setStrategy(address caller, address newStrategy) external;\n\n  /// @notice Sets the cumulative cap (in shares) for instantWithdraw redemptions.\n  function setMaxInstantWithdrawShares(address caller, uint256 newMax) external;\n\n  /// @notice Sets the fee percentage charged on instant withdrawals (1e18 = 100%).\n  function setInstantWithdrawFeePercentage(address caller, uint256 newFeePercentage) external;\n\n  /// @notice Whitelists (or de-lists) an EmberVault share for the cross-vault instant swap.\n  function setEmberShareWhitelist(\n    address caller,\n    address share,\n    bool whitelisted,\n    uint256 feePercentage,\n    uint256 maxCapacityPercentage,\n    uint256 holdbackPercentage,\n    uint256 maxUtilizationPercentage,\n    uint256 minSwapGross,\n    uint256 maxHeldValueAbsolute\n  ) external;\n\n  /// @notice Sets per-address fee and holdback waivers for the EmberShare cross-vault swap.\n  function setSwapWaiver(\n    address caller,\n    address account,\n    bool feeWaived,\n    bool holdbackWaived\n  ) external;\n\n  /// @notice Adds, updates, or removes a fee-multiplier curve tier for an EmberShare.\n  function updateEmberShareFeeMultiplierTier(\n    address caller,\n    address share,\n    uint256 threshold,\n    uint256 multiplier,\n    bool remove\n  ) external;\n}\n"},{"file_path":"contracts/interfaces/IEmberProtocolConfig.sol","source_code":"/*\n  Copyright (c) 2026 Ember Protocol Inc.\n  Proprietary Smart Contract License – All Rights Reserved.\n\n  This source code is provided for transparency and verification only.\n  Use, modification, reproduction, or redeployment of this code \n  requires prior written permission from the Ember Protocol Inc.\n*/\n\npragma solidity ^0.8.22;\n\n// Custom errors\nerror Unauthorized();\nerror ZeroAddress();\nerror InvalidValue();\nerror SameValue();\nerror ProtocolPaused();\nerror Blacklisted();\nerror InvalidInterval();\nerror InvalidRate();\nerror InvalidFeePercentage();\n\n/// @title Ember Protocol Config Interface\n/// @notice Describes the functions/events exposed by `EmberProtocolConfig`\ninterface IEmberProtocolConfig {\n  /// @dev Replicates the initializer that must be called for upgradeable proxies.\n  function initialize(address initialOwner, address _platformFeeRecipient) external;\n\n  function version() external pure returns (string memory);\n\n  // Protocol admin functions (owner only)\n  function pauseNonAdminOperations(bool pauseFlag) external;\n  function updatePlatformFeeRecipient(address recipient) external;\n  function updateMinRate(uint256 minRate_) external;\n  function updateMaxRate(uint256 maxRate_) external;\n  function updateDefaultRate(uint256 defaultRate_) external;\n  function updateMaxFeePercentage(uint256 maxFeePercentage_) external;\n  function updateMinRateInterval(uint256 minRateInterval_) external;\n  function updateMaxRateInterval(uint256 maxRateInterval_) external;\n  function setBlacklistedAccount(address account, bool blacklisted) external;\n\n  // Guardian functions\n  function guardian() external view returns (address);\n  function setGuardian(address newGuardian) external;\n  function guardianPauseNonAdminOperations(bool pauseFlag) external;\n  function guardianSetBlacklistedAccount(address account, bool blacklisted) external;\n\n  // Vault admin functions\n  function updateVaultMaxTVL(address vault, uint256 newMaxTVL) external;\n  function updateVaultRateUpdateInterval(address vault, uint256 newInterval) external;\n  function updateVaultMaxRateChangePerUpdate(\n    address vault,\n    uint256 newMaxRateChangePerUpdate\n  ) external;\n  function updateVaultAdmin(address vault, address newAdmin) external;\n  function updateVaultOperator(address vault, address newOperator) external;\n  function updateVaultRateManager(address vault, address newRateManager) external;\n  function updateVaultFeePercentage(address vault, uint256 newFeePercentage) external;\n  function updateVaultName(address vault, string calldata newName) external;\n  function updateVaultMinWithdrawableShares(\n    address vault,\n    uint256 newMinWithdrawableShares\n  ) external;\n  function setVaultSubAccount(address vault, address account, bool isSubAccount) external;\n  function setVaultPausedStatus(address vault, string calldata operation, bool paused) external;\n\n  // Getter functions\n  function isAccountBlacklisted(address account) external view returns (bool);\n  function getProtocolPauseStatus() external view returns (bool);\n  function getPlatformFeeRecipient() external view returns (address);\n  function getMinRate() external view returns (uint256);\n  function getMaxRate() external view returns (uint256);\n  function getDefaultRate() external view returns (uint256);\n  function getMinRateInterval() external view returns (uint256);\n  function getMaxRateInterval() external view returns (uint256);\n  function getMaxAllowedFeePercentage() external view returns (uint256);\n  function verifyProtocolNotPaused() external view;\n  function verifyAccountNotBlacklisted(address account) external view;\n\n  // Events\n  event PauseNonAdminOperations(bool paused);\n  event SupportedVersionUpdated(uint256 previousVersion, uint256 newVersion);\n  event PlatformFeeRecipientUpdated(address previousRecipient, address newRecipient);\n  event MinRateUpdated(uint256 previousRate, uint256 newRate);\n  event MaxRateUpdated(uint256 previousRate, uint256 newRate);\n  event DefaultRateUpdated(uint256 previousRate, uint256 newRate);\n  event MinRateIntervalUpdated(uint256 previousInterval, uint256 newInterval);\n  event MaxRateIntervalUpdated(uint256 previousInterval, uint256 newInterval);\n  event MaxAllowedFeePercentageUpdated(uint256 previousFee, uint256 newFee);\n  event BlacklistedAccountUpdated(address indexed account, bool isBlacklisted);\n  event GuardianUpdated(address indexed previousGuardian, address indexed newGuardian);\n}\n"},{"file_path":"contracts/interfaces/IEmberVault.sol","source_code":"/*\n  Copyright (c) 2026 Ember Protocol Inc.\n  Proprietary Smart Contract License – All Rights Reserved.\n\n  This source code is provided for transparency and verification only.\n  Use, modification, reproduction, or redeployment of this code \n  requires prior written permission from the Ember Protocol Inc.\n*/\n\npragma solidity ^0.8.22;\n\nimport \"./IEmberVaultValidator.sol\";\n\n/// @title Ember Vault Interface\n/// @notice Interface for EmberVault functions called by EmberProtocolConfig\ninterface IEmberVault {\n  // Structs (must match EmberVault)\n  struct Roles {\n    address admin;\n    address operator;\n    address rateManager;\n  }\n\n  struct PauseStatus {\n    bool deposits;\n    bool withdrawals;\n    bool privilegedOperations;\n  }\n\n  struct Rate {\n    uint256 value;\n    uint256 maxRateChangePerUpdate;\n    uint256 rateUpdateInterval;\n    uint256 lastUpdatedAt;\n  }\n\n  struct PlatformFee {\n    uint256 accrued;\n    uint256 lastChargedAt;\n    uint256 platformFeePercentage;\n  }\n\n  // Getter functions for authorization checks\n  function roles() external view returns (Roles memory);\n  function owner() external view returns (address);\n  function subAccounts(address account) external view returns (bool);\n  function maxTVL() external view returns (uint256);\n  function minWithdrawableShares() external view returns (uint256);\n  function totalAssets() external view returns (uint256);\n  function rate() external view returns (Rate memory);\n  function platformFee() external view returns (PlatformFee memory);\n  function sequenceNumber() external view returns (uint256);\n  function vaultValidator() external view returns (IEmberVaultValidator);\n\n  // Setter functions called by EmberProtocolConfig\n  // Each function receives the original caller for authorization verification\n  // The vault verifies: (1) msg.sender is protocol config, (2) caller has required role\n\n  /// @notice Sets the max TVL of the vault (requires admin role)\n  function setMaxTVL(address caller, uint256 newMaxTVL) external;\n\n  /// @notice Sets the vault rate update interval (requires admin role)\n  function setRateUpdateInterval(address caller, uint256 newInterval) external;\n\n  /// @notice Sets the maximum allowed rate change per update (requires admin role)\n  function setMaxRateChangePerUpdate(address caller, uint256 newMaxRateChangePerUpdate) external;\n\n  /// @notice Sets the vault admin (requires owner role)\n  function setAdmin(address caller, address newAdmin) external;\n\n  /// @notice Sets the vault operator (requires admin role)\n  function setOperator(address caller, address newOperator) external;\n\n  /// @notice Sets the vault rate manager (requires admin role)\n  function setRateManager(address caller, address newRateManager) external;\n\n  /// @notice Sets the vault fee percentage (requires admin role)\n  function setFeePercentage(address caller, uint256 newFeePercentage) external;\n\n  /// @notice Updates the vault name (requires admin role)\n  function setVaultName(address caller, string calldata newName) external;\n\n  /// @notice Updates the minimum withdrawable shares (requires admin role)\n  function setMinWithdrawableShares(address caller, uint256 newMinWithdrawableShares) external;\n\n  /// @notice Sets or removes a sub-account (requires admin role)\n  function setSubAccountStatus(address caller, address account, bool isSubAccount) external;\n\n  /// @notice Sets the pause status for a specific operation (requires admin role)\n  function setPausedStatus(address caller, string calldata operation, bool paused) external;\n\n  /// @notice Sets the bridge adapter for cross-chain operations (requires admin role)\n  function setBridgeAdapter(address caller, address newAdapter) external;\n\n  /// @notice Sets the bridge amount limits (requires admin role)\n  function setBridgeLimits(address caller, uint256 minAmount, uint256 maxAmount) external;\n\n  /// @notice Returns the current bridge adapter address\n  function bridgeAdapter() external view returns (address);\n\n  /// @notice Returns the minimum bridge amount\n  function minBridgeAmount() external view returns (uint256);\n\n  /// @notice Returns the maximum bridge amount\n  function maxBridgeAmount() external view returns (uint256);\n\n  /// @notice Sets the vault validator contract address (requires admin role)\n  function setVaultValidator(address caller, address _validator) external;\n\n  /// @notice Sets or clears the vault's deposit parking lot (requires admin role)\n  function setParkingLot(address caller, address newParkingLot) external;\n}\n"},{"file_path":"contracts/interfaces/IEmberVaultValidator.sol","source_code":"pragma solidity ^0.8.22;\n\nerror DepositNotAllowed();\n\n/// @title Ember Vault Validator Interface\n/// @notice Interface for the validator contract that manages withdrawal fees and deposit allow lists\ninterface IEmberVaultValidator {\n  struct WithdrawalFee {\n    uint256 permanentFeePercentage;\n    uint256 timeBasedFeePercentage;\n    uint256 timeBasedFeeThreshold;\n  }\n\n  // ============================================\n  // Getter Functions\n  // ============================================\n\n  function withdrawalFee(address vault) external view returns (WithdrawalFee memory);\n  function feeExemptAccounts(address vault, address account) external view returns (bool);\n  function depositAllowList(address vault, address account) external view returns (bool);\n  function lastDepositTimestamp(address vault, address account) external view returns (uint256);\n  function depositAllowListCount(address vault) external view returns (uint256);\n\n  // ============================================\n  // Vault-Called Functions\n  // ============================================\n\n  /// @notice Validates whether a depositor is allowed to deposit\n  /// @dev Called by the vault during deposit. Reverts if not allowed.\n  function validateDeposit(address vault, address depositor) external view;\n\n  /// @notice Records the last deposit timestamp for the receiver\n  /// @dev Called by the vault after a successful deposit\n  function recordDeposit(address vault, address depositor, uint256 timestamp) external;\n\n  /// @notice Records the last-deposit timestamp on behalf of the original depositor\n  ///         for parking-lot-forwarded deposits. Callable only by the vault's\n  ///         registered parking lot.\n  function recordDepositFor(address vault, address depositor, uint256 timestamp) external;\n\n  /// @notice M-3: amount-weighted anti-JIT clock update, keyed by the share RECEIVER.\n  /// @dev Called by AtomicLiquidity after a deposit. Blends `timestamp` into the receiver's\n  ///      stored clock by share weight (see the implementation), so a fresh top-up can't let\n  ///      new shares inherit an aged clock, and a dust deposit can't reset a victim's clock.\n  function recordWeightedDeposit(\n    address vault,\n    address receiver,\n    uint256 oldWeight,\n    uint256 newShares,\n    uint256 timestamp\n  ) external;\n\n  /// @notice Calculates withdrawal fees for a given owner and amount\n  /// @dev Called by the vault during withdrawal processing\n  /// @return permanentFeeCharged The permanent fee amount\n  /// @return timeBasedFeeCharged The time-based fee amount\n  function calculateWithdrawalFees(\n    address vault,\n    address owner,\n    uint256 withdrawAmount,\n    uint256 currentTime\n  ) external view returns (uint256 permanentFeeCharged, uint256 timeBasedFeeCharged);\n\n  // ============================================\n  // ProtocolConfig-Called Setter Functions\n  // ============================================\n\n  function setDepositAllowListStatus(\n    address caller,\n    address vault,\n    address user,\n    bool status\n  ) external;\n  function setFeeExemptionListStatus(\n    address caller,\n    address vault,\n    address user,\n    bool status\n  ) external;\n  function setPermanentFeePercentage(address caller, address vault, uint256 newPercentage) external;\n  function setTimeBasedFeePercentage(address caller, address vault, uint256 newPercentage) external;\n  function setTimeBasedFeeThreshold(address caller, address vault, uint256 newThreshold) external;\n}\n"}],"certified":false,"conflicting_implementations":null,"abi":[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[],"name":"Blacklisted","type":"error"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"ERC1967InvalidImplementation","type":"error"},{"inputs":[],"name":"ERC1967NonPayable","type":"error"},{"inputs":[],"name":"FailedCall","type":"error"},{"inputs":[],"name":"InvalidFeePercentage","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"InvalidInterval","type":"error"},{"inputs":[],"name":"InvalidRate","type":"error"},{"inputs":[],"name":"InvalidValue","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ProtocolPaused","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[],"name":"SameValue","type":"error"},{"inputs":[],"name":"UUPSUnauthorizedCallContext","type":"error"},{"inputs":[{"internalType":"bytes32","name":"slot","type":"bytes32"}],"name":"UUPSUnsupportedProxiableUUID","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"isBlacklisted","type":"bool"}],"name":"BlacklistedAccountUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"previousRate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newRate","type":"uint256"}],"name":"DefaultRateUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousGuardian","type":"address"},{"indexed":true,"internalType":"address","name":"newGuardian","type":"address"}],"name":"GuardianUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"previousFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"MaxAllowedFeePercentageUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"previousInterval","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newInterval","type":"uint256"}],"name":"MaxRateIntervalUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"previousRate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newRate","type":"uint256"}],"name":"MaxRateUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"previousInterval","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newInterval","type":"uint256"}],"name":"MinRateIntervalUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"previousRate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newRate","type":"uint256"}],"name":"MinRateUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"paused","type":"bool"}],"name":"PauseNonAdminOperations","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousRecipient","type":"address"},{"indexed":false,"internalType":"address","name":"newRecipient","type":"address"}],"name":"PlatformFeeRecipientUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"previousVersion","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newVersion","type":"uint256"}],"name":"SupportedVersionUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"DEFAULT_RATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_FEE_PERCENTAGE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_RATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_RATE_INTERVAL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_WITHDRAWAL_FEE_PERCENTAGE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_RATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_RATE_INTERVAL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UPGRADE_INTERFACE_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"blacklistedAccounts","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDefaultRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaxAllowedFeePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaxRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaxRateInterval","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMinRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMinRateInterval","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPlatformFeeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getProtocolPauseStatus","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"guardian","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"pauseFlag","type":"bool"}],"name":"guardianPauseNonAdminOperations","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"blacklisted","type":"bool"}],"name":"guardianSetBlacklistedAccount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"initialOwner","type":"address"},{"internalType":"address","name":"_platformFeeRecipient","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isAccountBlacklisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"pauseFlag","type":"bool"}],"name":"pauseNonAdminOperations","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"protocolConfig","outputs":[{"internalType":"bool","name":"pause","type":"bool"},{"internalType":"address","name":"platformFeeRecipient","type":"address"},{"internalType":"uint256","name":"minRate","type":"uint256"},{"internalType":"uint256","name":"maxRate","type":"uint256"},{"internalType":"uint256","name":"defaultRate","type":"uint256"},{"internalType":"uint256","name":"minRateInterval","type":"uint256"},{"internalType":"uint256","name":"maxRateInterval","type":"uint256"},{"internalType":"uint256","name":"maxFeePercentage","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"blacklisted","type":"bool"}],"name":"setBlacklistedAccount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newGuardian","type":"address"}],"name":"setGuardian","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"address","name":"newAdapter","type":"address"}],"name":"setVaultBridgeAdapter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"uint256","name":"minAmount","type":"uint256"},{"internalType":"uint256","name":"maxAmount","type":"uint256"}],"name":"setVaultBridgeLimits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"address","name":"user","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"setVaultDepositAllowList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"address","name":"share","type":"address"},{"internalType":"bool","name":"whitelisted","type":"bool"},{"internalType":"uint256","name":"feePercentage","type":"uint256"},{"internalType":"uint256","name":"maxCapacityPercentage","type":"uint256"},{"internalType":"uint256","name":"holdbackPercentage","type":"uint256"},{"internalType":"uint256","name":"maxUtilizationPercentage","type":"uint256"},{"internalType":"uint256","name":"minSwapGross","type":"uint256"},{"internalType":"uint256","name":"maxHeldValueAbsolute","type":"uint256"}],"name":"setVaultEmberShareWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"address","name":"user","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"setVaultFeeExemptionList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"uint256","name":"newFeePercentage","type":"uint256"}],"name":"setVaultInstantWithdrawFeePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"uint256","name":"newMax","type":"uint256"}],"name":"setVaultMaxInstantWithdrawShares","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"address","name":"newParkingLot","type":"address"}],"name":"setVaultParkingLot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"string","name":"operation","type":"string"},{"internalType":"bool","name":"paused","type":"bool"}],"name":"setVaultPausedStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"address","name":"newStrategy","type":"address"}],"name":"setVaultStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"isSubAccount","type":"bool"}],"name":"setVaultSubAccount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"feeWaived","type":"bool"},{"internalType":"bool","name":"holdbackWaived","type":"bool"}],"name":"setVaultSwapWaiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"address","name":"validator","type":"address"}],"name":"setVaultValidator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"defaultRate_","type":"uint256"}],"name":"updateDefaultRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"maxFeePercentage_","type":"uint256"}],"name":"updateMaxFeePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"maxRate_","type":"uint256"}],"name":"updateMaxRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"maxRateInterval_","type":"uint256"}],"name":"updateMaxRateInterval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"minRate_","type":"uint256"}],"name":"updateMinRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"minRateInterval_","type":"uint256"}],"name":"updateMinRateInterval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"updatePlatformFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"address","name":"newAdmin","type":"address"}],"name":"updateVaultAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"address","name":"share","type":"address"},{"internalType":"uint256","name":"threshold","type":"uint256"},{"internalType":"uint256","name":"multiplier","type":"uint256"},{"internalType":"bool","name":"remove","type":"bool"}],"name":"updateVaultEmberShareFeeMultiplierTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"uint256","name":"newFeePercentage","type":"uint256"}],"name":"updateVaultFeePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"uint256","name":"newMaxRateChangePerUpdate","type":"uint256"}],"name":"updateVaultMaxRateChangePerUpdate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"uint256","name":"newMaxTVL","type":"uint256"}],"name":"updateVaultMaxTVL","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"uint256","name":"newMinWithdrawableShares","type":"uint256"}],"name":"updateVaultMinWithdrawableShares","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"string","name":"newName","type":"string"}],"name":"updateVaultName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"address","name":"newOperator","type":"address"}],"name":"updateVaultOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"uint256","name":"newPercentage","type":"uint256"}],"name":"updateVaultPermanentFeePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"address","name":"newRateManager","type":"address"}],"name":"updateVaultRateManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"uint256","name":"newInterval","type":"uint256"}],"name":"updateVaultRateUpdateInterval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"uint256","name":"newPercentage","type":"uint256"}],"name":"updateVaultTimeBasedFeePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"uint256","name":"newThreshold","type":"uint256"}],"name":"updateVaultTimeBasedFeeThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"verifyAccountNotBlacklisted","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[],"name":"verifyProtocolNotPaused","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"}],"is_changed_bytecode":false,"is_partially_verified":false,"constructor_args":null}