{"file_path":"src/v2/StakedUSDat.sol","creation_status":"success","source_code":"// SPDX-License-Identifier: MIT\npragma solidity 0.8.36;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {IERC20Metadata} from \"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\";\nimport {IERC4626} from \"@openzeppelin/contracts/interfaces/IERC4626.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {Math} from \"@openzeppelin/contracts/utils/math/Math.sol\";\n\nimport {Initializable} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport {UUPSUpgradeable} from \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\nimport {AccessControlUpgradeable} from \"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\";\nimport {ReentrancyGuard} from \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\nimport {PausableUpgradeable} from \"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\";\nimport {ERC20Upgradeable} from \"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\";\nimport {\n    ERC20PermitUpgradeable\n} from \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol\";\nimport {ERC4626Upgradeable} from \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC4626Upgradeable.sol\";\n\nimport {IWithdrawalQueueERC721} from \"./interfaces/IWithdrawalQueueERC721.sol\";\nimport {IStakedUSDat} from \"./interfaces/IStakedUSDat.sol\";\nimport {ISTRConExecutionPolicy} from \"./interfaces/ISTRConExecutionPolicy.sol\";\nimport {IUSDat} from \"./interfaces/IUSDat.sol\";\nimport {IERC20PermitExtended} from \"./interfaces/IERC20PermitExtended.sol\";\nimport {ISTRCMirrorModule} from \"./interfaces/modules/ISTRCMirrorModule.sol\";\nimport {ISTRConModule} from \"./interfaces/modules/ISTRConModule.sol\";\nimport {STRConTradeExecutionLogic} from \"./libraries/STRConTradeExecutionLogic.sol\";\n\n/**\n * @title StakedUSDat\n * @author Saturn\n * @notice Implementation of the IStakedUSDat interface.\n * @dev See {IStakedUSDat} for full documentation.\n */\ncontract StakedUSDat is\n    Initializable,\n    AccessControlUpgradeable,\n    ReentrancyGuard,\n    ERC20PermitUpgradeable,\n    ERC4626Upgradeable,\n    PausableUpgradeable,\n    UUPSUpgradeable,\n    IStakedUSDat\n{\n    using SafeERC20 for IERC20;\n\n    /// @notice Role identifier for parameter tuning\n    bytes32 public constant PARAMETER_MANAGER_ROLE = keccak256(\"PARAMETER_MANAGER_ROLE\");\n\n    /// @notice Role identifier for vault operations that move assets.\n    bytes32 public constant OPERATOR_ROLE = keccak256(\"OPERATOR_ROLE\");\n\n    /// @notice Role identifier for transferring surplus into the vault.\n    bytes32 public constant SURPLUS_MANAGER_ROLE = keccak256(\"SURPLUS_MANAGER_ROLE\");\n\n    /// @notice Role identifier for selecting the current market mode\n    bytes32 public constant MARKET_MODE_MANAGER_ROLE = keccak256(\"MARKET_MODE_MANAGER_ROLE\");\n\n    /// @notice Role identifier for blacklist add/remove (freeze only, never moves funds)\n    bytes32 public constant BLACKLISTER_ROLE = keccak256(\"BLACKLISTER_ROLE\");\n\n    /// @notice Role identifier for enforcement actions against blacklisted holders\n    bytes32 public constant ENFORCER_ROLE = keccak256(\"ENFORCER_ROLE\");\n\n    /// @notice Role identifier for pausing (cannot unpause)\n    bytes32 public constant PAUSER_ROLE = keccak256(\"PAUSER_ROLE\");\n\n    /// @notice Role identifier for unpausing (cannot pause)\n    bytes32 public constant UNPAUSER_ROLE = keccak256(\"UNPAUSER_ROLE\");\n\n    /// @dev The WithdrawalQueue contract (immutable, stored in implementation bytecode)\n    IWithdrawalQueueERC721 private immutable WITHDRAWAL_QUEUE;\n\n    /// @dev Transaction-scoped queued-redemption price snapshot.\n    uint256 private transient _redemptionBatchAssetBasis;\n    uint256 private transient _redemptionBatchShareBasis;\n\n    /// @dev Mapping of blacklisted addresses\n    mapping(address account => bool isBlacklisted) private _blacklisted;\n\n    /// @dev Retired v1 slot (was vestingAmount); do not reuse\n    // forge-lint: disable-next-line(mixed-case-variable)\n    uint256 private __deprecatedVestingAmount;\n\n    /// @dev Retired v1 slot (was lastDistributionTimestamp); do not reuse\n    // forge-lint: disable-next-line(mixed-case-variable)\n    uint256 private __deprecatedLastDistributionTimestamp;\n\n    /// @dev Retired v1 slot (was vestingPeriod); do not reuse\n    // forge-lint: disable-next-line(mixed-case-variable)\n    uint256 private __deprecatedVestingPeriod;\n\n    /// @notice Minimum redemption request size (10 sUSDat shares, 18 decimals).\n    /// Share-denominated so requestRedeem never prices.\n    uint256 public constant MIN_REQUEST_SHARES = 10e18;\n\n    /// @notice Basis points denominator.\n    uint256 public constant BPS_DENOMINATOR = 10_000;\n\n    /// @notice Maximum redemption fee (5%).\n    uint16 public constant MAX_REDEMPTION_FEE_BPS = 500;\n\n    /// @notice Maximum elevated deposit fee (5%).\n    uint256 public constant MAX_DEPOSIT_FEE_BPS = 500;\n\n    /// @notice Maximum whole-vault NAV change permitted during migration (5%).\n    uint16 public constant MAX_MIGRATION_TOLERANCE_BPS = 500;\n\n    /// @notice Maximum duration of a Regular-mode authorization.\n    uint64 public constant MAX_REGULAR_MODE_VALIDITY = 8 hours;\n\n    /// @notice Maximum surplus intake per tranche (5% of pre-transfer NAV).\n    uint256 public constant MAX_SURPLUS_BPS = 500;\n\n    /// @notice Maximum surplus vesting period.\n    uint256 public constant MAX_SURPLUS_VESTING_PERIOD = 7 days;\n\n    /// @dev Retired v1 slot (was toleranceBps); do not reuse\n    // forge-lint: disable-next-line(mixed-case-variable)\n    uint256 private __deprecatedToleranceBps;\n\n    /// @inheritdoc IStakedUSDat\n    /// @custom:oz-renamed-from depositFeeBps\n    uint256 public override elevatedDepositFeeBps;\n\n    /// @dev Retired v1 slot (was feeRecipient); reserved and unused\n    // forge-lint: disable-next-line(mixed-case-variable)\n    address private __deprecatedFeeRecipient;\n\n    /// @notice Internally tracked USDat balance (6 decimals)\n    uint256 public usdatBalance;\n\n    /// @dev Retired v1 slot (was strcBalance); do not reuse\n    // forge-lint: disable-next-line(mixed-case-variable)\n    uint256 private __deprecatedStrcBalance;\n\n    /// @dev Retired v1 slot (was maxRewardsBps); do not reuse\n    // forge-lint: disable-next-line(mixed-case-variable)\n    uint256 private __deprecatedMaxRewardsBps;\n\n    /// @notice Canonical destination for seized shares and withdrawal requests\n    address public recoveryAddress;\n\n    /// @dev Configured mode before applying Regular-mode expiry.\n    /// @custom:oz-renamed-from marketMode\n    MarketMode private _configuredMarketMode;\n\n    /// @inheritdoc IStakedUSDat\n    uint16 public override baseRedemptionFeeBps;\n\n    /// @inheritdoc IStakedUSDat\n    uint16 public override elevatedRedemptionFeeBps;\n\n    /// @inheritdoc IStakedUSDat\n    ISTRCMirrorModule public override strcMirrorModule;\n\n    /// @inheritdoc IStakedUSDat\n    ISTRConModule public override strconModule;\n\n    /// @inheritdoc IStakedUSDat\n    uint256 public override surplusVestingAmount;\n\n    /// @inheritdoc IStakedUSDat\n    uint256 public override surplusVestingStartTimestamp;\n\n    /// @inheritdoc IStakedUSDat\n    uint256 public override surplusVestingPeriod;\n\n    /// @inheritdoc IStakedUSDat\n    address public override surplusSource;\n\n    /// @inheritdoc IStakedUSDat\n    ISTRConExecutionPolicy public override executionPolicy;\n\n    /// @inheritdoc IStakedUSDat\n    uint16 public migrationToleranceBps;\n\n    /// @inheritdoc IStakedUSDat\n    uint64 public override regularModeValidUntil;\n\n    /// @dev Portion of the active surplus tranche already folded into usdatBalance.\n    uint256 private _surplusSwept;\n\n    modifier notZero(uint256 amount) {\n        _notZero(amount);\n        _;\n    }\n\n    modifier whenNotRestrictedMarketMode() {\n        _requireNotRestrictedMarketMode();\n        _;\n    }\n\n    /// @dev Contract-relationship gate: immutable address check, deliberately not a\n    /// grantable role.\n    modifier onlyWithdrawalQueue() {\n        _requireWithdrawalQueue();\n        _;\n    }\n\n    /// @dev Lifts an active pause for the duration of the call (enforcement actions\n    /// work while paused).\n    // Pre-call pause state must remain available after the modified function runs.\n    modifier whileUnpaused() {\n        bool wasPaused = paused();\n        if (wasPaused) _unpause();\n        _;\n        if (wasPaused) _pause();\n    }\n\n    /// @dev Reverts if the given amount is zero.\n    function _notZero(uint256 amount) internal pure {\n        require(amount != 0, ZeroAmount());\n    }\n\n    function _requireNotRestrictedMarketMode() internal view {\n        require(marketMode() != MarketMode.Restricted, MarketRestricted());\n    }\n\n    function _requireWithdrawalQueue() internal view {\n        require(msg.sender == address(WITHDRAWAL_QUEUE), OperationNotAllowed());\n    }\n\n    /// @dev Reverts once the caller-supplied execution deadline has passed.\n    function _requireUnexpiredDeadline(uint256 deadline) internal view {\n        require(block.timestamp <= deadline, DeadlineExpired());\n    }\n\n    /// @custom:oz-upgrades-unsafe-allow constructor\n    constructor(IWithdrawalQueueERC721 withdrawalQueue) {\n        require(address(withdrawalQueue) != address(0), InvalidZeroAddress());\n        WITHDRAWAL_QUEUE = withdrawalQueue;\n        _disableInitializers();\n    }\n\n    /// @notice Initializes the contract (called once via proxy)\n    /// @dev Grants only DEFAULT_ADMIN_ROLE; the admin grants the operational roles (§2.8)\n    /// after deployment.\n    /// @param defaultAdmin The default admin of the contract\n    /// @param usdat USDat contract address\n    function initialize(address defaultAdmin, IERC20 usdat) external initializer {\n        require(defaultAdmin != address(0) && address(usdat) != address(0), InvalidZeroAddress());\n\n        __AccessControl_init();\n        __Pausable_init();\n        __ERC20_init(\"Staked USDat\", \"sUSDat\");\n        __ERC20Permit_init(\"Staked USDat\");\n        __ERC4626_init(usdat);\n\n        _grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin);\n    }\n\n    /// @inheritdoc IStakedUSDat\n    function initializeV2(V2Config calldata config, V2Roles calldata roles)\n        external\n        onlyRole(DEFAULT_ADMIN_ROLE)\n        reinitializer(2)\n    {\n        _validateV2Modules(config);\n\n        config.strcMirrorModule\n            .seed(\n                __deprecatedStrcBalance,\n                __deprecatedVestingAmount,\n                __deprecatedLastDistributionTimestamp,\n                __deprecatedVestingPeriod,\n                __deprecatedMaxRewardsBps\n            );\n\n        strcMirrorModule = config.strcMirrorModule;\n        strconModule = config.strconModule;\n        executionPolicy = config.executionPolicy;\n        _setSurplusSource(config.surplusSource);\n        _setRecoveryAddress(config.recoveryAddress);\n        _setRedemptionFees(config.baseRedemptionFeeBps, config.elevatedRedemptionFeeBps);\n        _setElevatedDepositFee(config.elevatedDepositFeeBps);\n        _setMigrationTolerance(config.migrationToleranceBps);\n        surplusVestingPeriod = 3 days;\n        _configuredMarketMode = MarketMode.Elevated;\n        regularModeValidUntil = 0;\n        config.executionPolicy\n            .initialize(\n                config.executionVehicle,\n                config.executionToleranceBps,\n                config.initialExecutionCapacity,\n                config.initialExecutionRefillPerDay\n            );\n\n        _grantV2Role(PARAMETER_MANAGER_ROLE, roles.parameterManager);\n        _grantV2Role(MARKET_MODE_MANAGER_ROLE, roles.marketModeManager);\n        _grantV2Role(OPERATOR_ROLE, roles.operator);\n        _grantV2Role(SURPLUS_MANAGER_ROLE, roles.surplusManager);\n        _grantV2Role(BLACKLISTER_ROLE, roles.blacklister);\n        _grantV2Role(ENFORCER_ROLE, roles.enforcer);\n        _grantV2Role(PAUSER_ROLE, roles.pauser);\n        _grantV2Role(UNPAUSER_ROLE, roles.unpauser);\n    }\n\n    function _grantV2Role(bytes32 role, address holder) private {\n        require(holder != address(0), InvalidZeroAddress());\n        _grantRole(role, holder);\n    }\n\n    /// @dev Validates the fixed module bindings, which have no reusable setters.\n    function _validateV2Modules(V2Config calldata config) private view {\n        require(\n            config.strcMirrorModule.VAULT() == address(this) && config.strconModule.VAULT() == address(this)\n                && config.strconModule.balance() == 0 && config.executionPolicy.VAULT() == address(this)\n                && address(config.executionPolicy.STRCON_MODULE()) == address(config.strconModule),\n            InvalidModule()\n        );\n    }\n\n    /// @dev Authorizes an upgrade to a new implementation. Only callable by DEFAULT_ADMIN_ROLE.\n    function _authorizeUpgrade(address) internal override onlyRole(DEFAULT_ADMIN_ROLE) {}\n\n    // ============ Blacklist Functions ============\n\n    /// @inheritdoc IStakedUSDat\n    function addToBlacklist(address target) external onlyRole(BLACKLISTER_ROLE) {\n        require(!hasRole(DEFAULT_ADMIN_ROLE, target), CannotBlacklistAdmin());\n        require(!_blacklisted[target], AddressBlacklisted());\n        _blacklisted[target] = true;\n        emit Blacklisted(target);\n    }\n\n    /// @inheritdoc IStakedUSDat\n    function removeFromBlacklist(address target) external onlyRole(BLACKLISTER_ROLE) {\n        require(_blacklisted[target], AddressNotBlacklisted());\n        _blacklisted[target] = false;\n        emit UnBlacklisted(target);\n    }\n\n    /// @dev Reverts if the given account is blacklisted on sUSDat or frozen on USDat.\n    function _requireNotRestricted(address account) internal view {\n        require(!isRestricted(account), AddressBlacklisted());\n    }\n\n    /// @inheritdoc IStakedUSDat\n    function isBlacklisted(address account) external view returns (bool) {\n        return _blacklisted[account];\n    }\n\n    /// @inheritdoc IStakedUSDat\n    function isRestricted(address account) public view returns (bool) {\n        return _blacklisted[account] || IUSDat(asset()).isFrozen(account);\n    }\n\n    /// @inheritdoc IERC20\n    function transfer(address to, uint256 amount) public override(ERC20Upgradeable, IERC20) returns (bool) {\n        _requireNotRestricted(msg.sender);\n        _requireNotRestricted(to);\n        return super.transfer(to, amount);\n    }\n\n    /// @inheritdoc IERC20\n    function transferFrom(address from, address to, uint256 amount)\n        public\n        override(ERC20Upgradeable, IERC20)\n        returns (bool)\n    {\n        _requireNotRestricted(msg.sender);\n        _requireNotRestricted(from);\n        _requireNotRestricted(to);\n        return super.transferFrom(from, to, amount);\n    }\n\n    // ============ ERC4626 Overrides ============\n\n    /// @inheritdoc IERC4626\n    /// @dev Adds cash, vested surplus, and both fixed module values.\n    /// Module pricing failures deliberately propagate.\n    function totalAssets() public view override(ERC4626Upgradeable, IERC4626) returns (uint256) {\n        uint256 vestedSurplus = _unsweptSurplus() - getUnvestedSurplus();\n        return usdatBalance + vestedSurplus + strcMirrorModule.recognizedValue() + strconModule.recognizedValue();\n    }\n\n    /// @inheritdoc IStakedUSDat\n    function getUnvestedSurplus() public view returns (uint256) {\n        uint256 amount = surplusVestingAmount;\n        if (amount == 0) return 0;\n\n        uint256 period = surplusVestingPeriod;\n        uint256 elapsed = block.timestamp - surplusVestingStartTimestamp;\n        if (elapsed >= period) return 0;\n\n        return Math.mulDiv(period - elapsed, amount, period, Math.Rounding.Ceil);\n    }\n\n    /// @inheritdoc IERC20Metadata\n    function decimals() public pure override(ERC4626Upgradeable, ERC20Upgradeable, IERC20Metadata) returns (uint8) {\n        return 18;\n    }\n\n    /// @dev Returns a non-zero offset to protect against ERC4626 inflation attacks.\n    function _decimalsOffset() internal pure override returns (uint8) {\n        return 12;\n    }\n\n    /// @inheritdoc IERC4626\n    /// @dev Applies the mode-derived fee to gross assets, rounding the fee up.\n    function previewDeposit(uint256 assets) public view override(ERC4626Upgradeable, IERC4626) returns (uint256) {\n        uint256 feeBps = depositFeeBps();\n        if (feeBps == 0) return super.previewDeposit(assets);\n\n        uint256 fee = Math.mulDiv(assets, feeBps, BPS_DENOMINATOR, Math.Rounding.Ceil);\n        return super.previewDeposit(assets - fee);\n    }\n\n    /// @inheritdoc IERC4626\n    /// @dev Grosses up the net assets required for the requested shares.\n    function previewMint(uint256 shares) public view override(ERC4626Upgradeable, IERC4626) returns (uint256) {\n        uint256 netAssets = super.previewMint(shares);\n        uint256 feeBps = depositFeeBps();\n        if (feeBps == 0) return netAssets;\n\n        return Math.mulDiv(netAssets, BPS_DENOMINATOR, BPS_DENOMINATOR - feeBps, Math.Rounding.Ceil);\n    }\n\n    /// @inheritdoc IERC4626\n    /// @dev Returns 0 when paused, deposits are restricted, or NAV cannot be priced.\n    function maxDeposit(address receiver) public view override(ERC4626Upgradeable, IERC4626) returns (uint256) {\n        if (isRestricted(receiver) || paused() || marketMode() == MarketMode.Restricted) return 0;\n        return _canPriceTotalAssets() ? type(uint256).max : 0;\n    }\n\n    /// @inheritdoc IERC4626\n    /// @dev Returns 0 when paused, mints are restricted, or NAV cannot be priced.\n    function maxMint(address receiver) public view override(ERC4626Upgradeable, IERC4626) returns (uint256) {\n        if (isRestricted(receiver) || paused() || marketMode() == MarketMode.Restricted) return 0;\n        return _canPriceTotalAssets() ? type(uint256).max : 0;\n    }\n\n    /// @inheritdoc IERC4626\n    /// @dev Always returns 0 - use requestRedeem instead.\n    function maxWithdraw(address) public pure override(ERC4626Upgradeable, IERC4626) returns (uint256) {\n        return 0;\n    }\n\n    /// @inheritdoc IERC4626\n    /// @dev Returns 0 when the owner is restricted or the vault is paused per ERC4626 spec.\n    function maxRedeem(address owner) public view override(ERC4626Upgradeable, IERC4626) returns (uint256) {\n        return (isRestricted(owner) || paused()) ? 0 : balanceOf(owner);\n    }\n\n    // ============ Surplus Functions ============\n\n    /// @inheritdoc IStakedUSDat\n    function transferInSurplus(uint256 amount)\n        external\n        nonReentrant\n        whenNotPaused\n        onlyRole(SURPLUS_MANAGER_ROLE)\n        notZero(amount)\n    {\n        _sweep();\n        require(surplusVestingAmount == 0, StillVesting());\n\n        uint256 maximumSurplus = Math.mulDiv(totalAssets(), MAX_SURPLUS_BPS, BPS_DENOMINATOR);\n        require(amount <= maximumSurplus, SurplusExceedsMax());\n\n        IERC20(asset()).safeTransferFrom(surplusSource, address(this), amount);\n\n        surplusVestingAmount = amount;\n        surplusVestingStartTimestamp = block.timestamp;\n\n        emit SurplusReceived(amount);\n    }\n\n    /// @inheritdoc IStakedUSDat\n    function sweep() external nonReentrant {\n        _sweep();\n    }\n\n    /// @dev Moves newly vested surplus into the spendable USDat balance.\n    function _sweep() private {\n        uint256 amount = surplusVestingAmount;\n        if (amount == 0) return;\n\n        uint256 unvested = getUnvestedSurplus();\n        uint256 vested = amount - unvested;\n        uint256 releasable = vested - _surplusSwept;\n\n        if (releasable != 0) {\n            _surplusSwept = vested;\n            usdatBalance += releasable;\n\n            emit SurplusSwept(releasable);\n        }\n\n        if (unvested == 0) {\n            surplusVestingAmount = 0;\n            _surplusSwept = 0;\n        }\n    }\n\n    /// @dev Returns the portion of the active tranche not yet folded into usdatBalance.\n    function _unsweptSurplus() private view returns (uint256) {\n        return surplusVestingAmount - _surplusSwept;\n    }\n\n    // ============ Migration Functions ============\n\n    /// @inheritdoc IStakedUSDat\n    function migrate(uint256 expectedStrcon, uint256 deadline)\n        external\n        nonReentrant\n        whenNotPaused\n        onlyRole(PARAMETER_MANAGER_ROLE)\n        notZero(expectedStrcon)\n    {\n        _requireUnexpiredDeadline(deadline);\n        require(strconModule.balance() == 0, InvalidModule());\n        STRConTradeExecutionLogic.executeMigration(\n            strcMirrorModule, strconModule, executionPolicy.executionVehicle(), expectedStrcon, migrationToleranceBps\n        );\n    }\n\n    // ============ Rotation Functions ============\n\n    /// @inheritdoc IStakedUSDat\n    function buy(uint256 usdatPaid, uint256 assetReceived, address expectedVehicle, uint256 deadline)\n        external\n        nonReentrant\n        whenNotPaused\n        whenNotRestrictedMarketMode\n        onlyRole(OPERATOR_ROLE)\n        notZero(usdatPaid)\n        notZero(assetReceived)\n    {\n        _requireUnexpiredDeadline(deadline);\n        _sweep();\n        require(usdatBalance >= usdatPaid, InsufficientBalance());\n\n        // Rotations fail closed when either fixed module cannot price (§2.2).\n        totalAssets();\n\n        usdatBalance -= usdatPaid;\n        STRConTradeExecutionLogic.executeBuy(\n            executionPolicy,\n            IERC20(asset()),\n            strconModule,\n            expectedVehicle,\n            usdatPaid,\n            assetReceived,\n            usdatBalance,\n            _unsweptSurplus()\n        );\n    }\n\n    /// @inheritdoc IStakedUSDat\n    function sell(uint256 assetDelivered, uint256 usdatReceived, address expectedVehicle, uint256 deadline)\n        external\n        nonReentrant\n        whenNotPaused\n        whenNotRestrictedMarketMode\n        onlyRole(OPERATOR_ROLE)\n        notZero(assetDelivered)\n        notZero(usdatReceived)\n    {\n        _requireUnexpiredDeadline(deadline);\n        _sweep();\n\n        // Rotations fail closed when either fixed module cannot price (§2.2).\n        totalAssets();\n\n        usdatBalance += usdatReceived;\n        STRConTradeExecutionLogic.executeSell(\n            executionPolicy,\n            IERC20(asset()),\n            strconModule,\n            expectedVehicle,\n            assetDelivered,\n            usdatReceived,\n            usdatBalance,\n            _unsweptSurplus()\n        );\n    }\n\n    // ============ Deposit Functions ============\n\n    /// @dev Deposit/mint common workflow with account-restriction checks.\n    function _deposit(address caller, address receiver, uint256 assets, uint256 shares)\n        internal\n        override\n        nonReentrant\n        whenNotRestrictedMarketMode\n        notZero(assets)\n        notZero(shares)\n    {\n        _requireNotRestricted(caller);\n        _requireNotRestricted(receiver);\n\n        _sweep();\n        usdatBalance += assets;\n\n        super._deposit(caller, receiver, assets, shares);\n    }\n\n    /// @inheritdoc IStakedUSDat\n    function depositWithMinShares(uint256 assets, address receiver, uint256 minShares) public returns (uint256 shares) {\n        uint256 maxAssets = maxDeposit(receiver);\n        if (assets > maxAssets) {\n            revert ERC4626ExceededMaxDeposit(receiver, assets, maxAssets);\n        }\n        shares = previewDeposit(assets);\n        require(shares >= minShares, SlippageExceeded());\n        _deposit(msg.sender, receiver, assets, shares);\n    }\n\n    /// @inheritdoc IStakedUSDat\n    function mintWithMaxAssets(uint256 shares, address receiver, uint256 maxAssets) public returns (uint256 assets) {\n        uint256 maxShares = maxMint(receiver);\n        if (shares > maxShares) {\n            revert ERC4626ExceededMaxMint(receiver, shares, maxShares);\n        }\n        assets = previewMint(shares);\n        require(assets <= maxAssets, SlippageExceeded());\n        _deposit(msg.sender, receiver, assets, shares);\n    }\n\n    /// @inheritdoc IStakedUSDat\n    /// @dev Uses try-catch to handle permit front-running gracefully. If permit fails\n    /// (e.g., already used by front-runner), the deposit proceeds if allowance is sufficient.\n    function depositWithPermit(\n        uint256 assets,\n        address receiver,\n        uint256 minShares,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) external returns (uint256 shares) {\n        try IERC20PermitExtended(asset()).permit(msg.sender, address(this), assets, deadline, v, r, s) {} catch {}\n\n        return depositWithMinShares(assets, receiver, minShares);\n    }\n\n    /// @inheritdoc IStakedUSDat\n    /// @dev Uses try-catch to handle permit front-running gracefully. If permit fails\n    /// (e.g., already used by front-runner), the mint proceeds if allowance is sufficient.\n    function mintWithPermit(\n        uint256 shares,\n        address receiver,\n        uint256 maxAssets,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) external returns (uint256 assets) {\n        try IERC20PermitExtended(asset()).permit(msg.sender, address(this), maxAssets, deadline, v, r, s) {} catch {}\n\n        return mintWithMaxAssets(shares, receiver, maxAssets);\n    }\n\n    /// @inheritdoc IStakedUSDat\n    /// @dev EIP-1271 compatible permit for smart contract wallets (e.g., Gnosis Safe, Argent).\n    /// Uses try-catch to handle permit front-running gracefully.\n    function depositWithPermit(\n        uint256 assets,\n        address receiver,\n        uint256 minShares,\n        uint256 deadline,\n        bytes memory signature\n    ) external returns (uint256 shares) {\n        try IERC20PermitExtended(asset()).permit(msg.sender, address(this), assets, deadline, signature) {} catch {}\n\n        return depositWithMinShares(assets, receiver, minShares);\n    }\n\n    /// @inheritdoc IStakedUSDat\n    /// @dev EIP-1271 compatible permit for smart contract wallets (e.g., Gnosis Safe, Argent).\n    /// Uses try-catch to handle permit front-running gracefully.\n    function mintWithPermit(\n        uint256 shares,\n        address receiver,\n        uint256 maxAssets,\n        uint256 deadline,\n        bytes memory signature\n    ) external returns (uint256 assets) {\n        try IERC20PermitExtended(asset()).permit(msg.sender, address(this), maxAssets, deadline, signature) {} catch {}\n\n        return mintWithMaxAssets(shares, receiver, maxAssets);\n    }\n\n    // ============ Withdrawal Functions ============\n\n    /// @inheritdoc IERC4626\n    /// @dev Returns zero because exact-asset withdrawals are disabled.\n    function previewWithdraw(uint256) public pure override(ERC4626Upgradeable, IERC4626) returns (uint256) {\n        return 0;\n    }\n\n    /// @inheritdoc IERC4626\n    /// @dev Returns the net queued-redemption payout after the active fee.\n    function previewRedeem(uint256 shares) public view override(ERC4626Upgradeable, IERC4626) returns (uint256 net) {\n        return _quoteQueuedRedemption(shares, totalAssets() + 1, totalSupply() + 10 ** _decimalsOffset());\n    }\n\n    /// @inheritdoc IERC4626\n    /// @dev Disabled - use requestRedeem instead.\n    function withdraw(uint256, address, address) public pure override(ERC4626Upgradeable, IERC4626) returns (uint256) {\n        revert OperationNotAllowed();\n    }\n\n    /// @inheritdoc IERC4626\n    /// @dev Disabled - use requestRedeem instead.\n    function redeem(uint256, address, address) public pure override(ERC4626Upgradeable, IERC4626) returns (uint256) {\n        revert OperationNotAllowed();\n    }\n\n    /// @inheritdoc IStakedUSDat\n    /// @dev Never prices.\n    function requestRedeem(uint256 shares, uint256 minSharePrice) external returns (uint256 requestId) {\n        uint256 maxShares = maxRedeem(msg.sender);\n        if (shares > maxShares) {\n            revert ERC4626ExceededMaxRedeem(msg.sender, shares, maxShares);\n        }\n\n        requestId = _processWithdrawal(msg.sender, msg.sender, shares, minSharePrice);\n    }\n\n    /// @inheritdoc IStakedUSDat\n    function beginRedemptionBatch()\n        external\n        nonReentrant\n        onlyWithdrawalQueue\n        whenNotPaused\n        whenNotRestrictedMarketMode\n    {\n        require(_redemptionBatchShareBasis == 0, InvalidRedemptionBatch());\n\n        _sweep();\n        _redemptionBatchAssetBasis = totalAssets() + 1;\n        _redemptionBatchShareBasis = totalSupply() + 10 ** _decimalsOffset();\n    }\n\n    /// @dev Processes a withdrawal request by escrowing shares in the withdrawal queue.\n    function _processWithdrawal(address caller, address owner, uint256 shares, uint256 minSharePrice)\n        internal\n        nonReentrant\n        returns (uint256 requestId)\n    {\n        _requireNotRestricted(caller);\n        _requireNotRestricted(owner);\n        require(shares >= MIN_REQUEST_SHARES, WithdrawalTooSmall());\n\n        _transfer(owner, address(WITHDRAWAL_QUEUE), shares);\n\n        requestId = WITHDRAWAL_QUEUE.addRequest(owner, shares, minSharePrice);\n    }\n\n    /// @inheritdoc IStakedUSDat\n    /// @dev The queue's single settlement primitive: price, deduct the fee, validate\n    /// the net payout per share, burn, and transfer a complete request in one call.\n    /// The fee stays in the vault and immediately accrues to the remaining shares.\n    function redeemQueuedShares(uint256 shares, uint256 minSharePrice)\n        external\n        nonReentrant\n        onlyWithdrawalQueue\n        whenNotPaused\n        whenNotRestrictedMarketMode\n        notZero(shares)\n        returns (RedemptionResult result, uint256 net)\n    {\n        uint256 shareBasis = _redemptionBatchShareBasis;\n        require(shareBasis != 0, InvalidRedemptionBatch());\n\n        net = _quoteQueuedRedemption(shares, _redemptionBatchAssetBasis, shareBasis);\n\n        uint256 netSharePrice = Math.mulDiv(net, 1e18, shares, Math.Rounding.Floor);\n        if (netSharePrice < minSharePrice) {\n            return (RedemptionResult.BelowLimit, 0);\n        }\n\n        if (usdatBalance < net) {\n            return (RedemptionResult.InsufficientLiquidity, 0);\n        }\n\n        usdatBalance -= net;\n        _burn(address(WITHDRAWAL_QUEUE), shares);\n\n        IERC20(asset()).safeTransfer(address(WITHDRAWAL_QUEUE), net);\n\n        return (RedemptionResult.Settled, net);\n    }\n\n    /// @inheritdoc IStakedUSDat\n    function endRedemptionBatch() external onlyWithdrawalQueue {\n        require(_redemptionBatchShareBasis != 0, InvalidRedemptionBatch());\n\n        _redemptionBatchShareBasis = 0;\n        _redemptionBatchAssetBasis = 0;\n    }\n\n    /// @dev Returns the net payout using one exact ERC4626 conversion basis and the active fee tier.\n    function _quoteQueuedRedemption(uint256 shares, uint256 assetBasis, uint256 shareBasis)\n        private\n        view\n        returns (uint256 net)\n    {\n        uint256 gross = Math.mulDiv(shares, assetBasis, shareBasis, Math.Rounding.Floor);\n        uint256 fee = Math.mulDiv(gross, redemptionFeeBps(), BPS_DENOMINATOR, Math.Rounding.Ceil);\n        net = gross - fee;\n    }\n\n    /// @inheritdoc IStakedUSDat\n    function redemptionFeeBps() public view returns (uint16) {\n        return marketMode() == MarketMode.Regular ? baseRedemptionFeeBps : elevatedRedemptionFeeBps;\n    }\n\n    /// @inheritdoc IStakedUSDat\n    function depositFeeBps() public view returns (uint256) {\n        return marketMode() == MarketMode.Regular ? 0 : elevatedDepositFeeBps;\n    }\n\n    /// @dev Returns whether every fixed NAV leg can currently be priced.\n    function _canPriceTotalAssets() private view returns (bool) {\n        try this.totalAssets() returns (uint256) {\n            return true;\n        } catch {\n            return false;\n        }\n    }\n\n    // ============ View Functions ============\n\n    /// @inheritdoc IStakedUSDat\n    function getWithdrawalQueue() external view returns (address) {\n        return address(WITHDRAWAL_QUEUE);\n    }\n\n    // ========== Enforcer Functions ==========\n\n    /// @inheritdoc IStakedUSDat\n    /// @dev Moves shares from a locally blacklisted holder, no burn, no liquidity needed —\n    /// value-preserving enforcement (e.g. court-directed recovery). A USDat freeze alone\n    /// does not authorize seizure.\n    function seize(address from) external nonReentrant onlyRole(ENFORCER_ROLE) whileUnpaused {\n        require(_blacklisted[from], AddressNotBlacklisted());\n\n        uint256 amount = balanceOf(from);\n        require(amount > 0, ZeroAmount());\n\n        address to = recoveryAddress;\n        _requireValidRecoveryAddress(to);\n\n        _transfer(from, to, amount);\n\n        emit Seized(from, to, amount);\n    }\n\n    /// @inheritdoc IStakedUSDat\n    function rescueTokens(address token, uint256 amount) external nonReentrant onlyRole(ENFORCER_ROLE) {\n        address to = recoveryAddress;\n        _requireValidRecoveryAddress(to);\n\n        uint256 protectedBalance;\n        if (token == asset()) {\n            protectedBalance = usdatBalance + _unsweptSurplus();\n        }\n\n        ISTRConModule module = strconModule;\n        if (token == module.asset()) {\n            protectedBalance += module.balance();\n        }\n\n        uint256 actualBalance = IERC20(token).balanceOf(address(this));\n        require(actualBalance >= protectedBalance, ExceedsRescuable());\n        require(amount <= actualBalance - protectedBalance, ExceedsRescuable());\n\n        IERC20(token).safeTransfer(to, amount);\n    }\n\n    // ============ Admin Functions ============\n\n    /// @inheritdoc IStakedUSDat\n    function setRecoveryAddress(address newRecoveryAddress) external onlyRole(PARAMETER_MANAGER_ROLE) {\n        _setRecoveryAddress(newRecoveryAddress);\n    }\n\n    /// @inheritdoc IStakedUSDat\n    function setSurplusSource(address newSource) external onlyRole(PARAMETER_MANAGER_ROLE) {\n        _setSurplusSource(newSource);\n    }\n\n    /// @inheritdoc IStakedUSDat\n    function setMigrationTolerance(uint16 newBps) external onlyRole(PARAMETER_MANAGER_ROLE) {\n        _setMigrationTolerance(newBps);\n    }\n\n    function _setMigrationTolerance(uint16 newBps) private {\n        require(newBps <= MAX_MIGRATION_TOLERANCE_BPS, InvalidMigrationTolerance());\n        uint16 oldBps = migrationToleranceBps;\n        migrationToleranceBps = newBps;\n\n        emit MigrationToleranceUpdated(oldBps, newBps);\n    }\n\n    /// @inheritdoc IStakedUSDat\n    function setMarketMode(MarketMode newMode) external onlyRole(MARKET_MODE_MANAGER_ROLE) {\n        require(newMode != MarketMode.Regular, InvalidRegularModeAuthorization());\n\n        MarketMode oldMode = marketMode();\n        _configuredMarketMode = newMode;\n        regularModeValidUntil = 0;\n\n        emit MarketModeChanged(oldMode, newMode);\n    }\n\n    /// @inheritdoc IStakedUSDat\n    function authorizeRegularMode(uint64 validUntil) external onlyRole(MARKET_MODE_MANAGER_ROLE) {\n        _authorizeRegularMode(validUntil);\n    }\n\n    /// @dev Installs a fresh bounded Regular-mode authorization.\n    function _authorizeRegularMode(uint64 validUntil) private {\n        require(\n            block.timestamp < validUntil && validUntil <= block.timestamp + MAX_REGULAR_MODE_VALIDITY,\n            InvalidRegularModeAuthorization()\n        );\n\n        MarketMode oldMode = marketMode();\n        _configuredMarketMode = MarketMode.Regular;\n        regularModeValidUntil = validUntil;\n\n        emit MarketModeChanged(oldMode, MarketMode.Regular);\n        emit RegularModeAuthorized(validUntil);\n    }\n\n    /// @inheritdoc IStakedUSDat\n    function setRedemptionFees(uint16 baseBps, uint16 elevatedBps) external onlyRole(PARAMETER_MANAGER_ROLE) {\n        _setRedemptionFees(baseBps, elevatedBps);\n    }\n\n    /// @inheritdoc IStakedUSDat\n    function setElevatedDepositFee(uint256 newFeeBps) external onlyRole(PARAMETER_MANAGER_ROLE) {\n        _setElevatedDepositFee(newFeeBps);\n    }\n\n    /// @inheritdoc IStakedUSDat\n    function setSurplusVestingPeriod(uint256 newPeriod) external onlyRole(PARAMETER_MANAGER_ROLE) {\n        require(newPeriod != 0 && newPeriod <= MAX_SURPLUS_VESTING_PERIOD, InvalidVestingPeriod());\n\n        _sweep();\n        require(surplusVestingAmount == 0, StillVesting());\n\n        uint256 oldPeriod = surplusVestingPeriod;\n        surplusVestingPeriod = newPeriod;\n\n        emit SurplusVestingPeriodUpdated(oldPeriod, newPeriod);\n    }\n\n    /// @dev Validates and updates both redemption fee tiers.\n    function _setRedemptionFees(uint16 baseBps, uint16 elevatedBps) internal {\n        require(baseBps <= elevatedBps && elevatedBps <= MAX_REDEMPTION_FEE_BPS, InvalidFee());\n        baseRedemptionFeeBps = baseBps;\n        elevatedRedemptionFeeBps = elevatedBps;\n\n        emit RedemptionFeesUpdated(baseBps, elevatedBps);\n    }\n\n    /// @dev Validates and updates the elevated deposit fee.\n    function _setElevatedDepositFee(uint256 newFeeBps) internal {\n        require(newFeeBps <= MAX_DEPOSIT_FEE_BPS, InvalidFee());\n        elevatedDepositFeeBps = newFeeBps;\n\n        emit DepositFeeUpdated(newFeeBps);\n    }\n\n    /// @dev Validates and updates the canonical seizure destination.\n    function _setRecoveryAddress(address newRecoveryAddress) internal {\n        _requireValidRecoveryAddress(newRecoveryAddress);\n        address oldRecoveryAddress = recoveryAddress;\n        recoveryAddress = newRecoveryAddress;\n\n        emit RecoveryAddressUpdated(oldRecoveryAddress, newRecoveryAddress);\n    }\n\n    /// @dev Validates and updates the surplus source.\n    function _setSurplusSource(address newSource) private {\n        require(newSource != address(0), InvalidZeroAddress());\n        require(newSource != address(this), InvalidSurplusSource());\n        require(newSource != address(WITHDRAWAL_QUEUE), InvalidSurplusSource());\n        _requireNotRestricted(newSource);\n\n        address oldSource = surplusSource;\n        surplusSource = newSource;\n\n        emit SurplusSourceUpdated(oldSource, newSource);\n    }\n\n    /// @dev Reverts unless an address is a valid seizure destination now.\n    function _requireValidRecoveryAddress(address account) internal view {\n        require(account != address(0), InvalidZeroAddress());\n        _requireNotRestricted(account);\n    }\n\n    /// @inheritdoc IStakedUSDat\n    function marketMode() public view returns (MarketMode) {\n        MarketMode configuredMode = _configuredMarketMode;\n        if (configuredMode == MarketMode.Regular && block.timestamp >= regularModeValidUntil) {\n            return MarketMode.Elevated;\n        }\n        return configuredMode;\n    }\n\n    /// @inheritdoc IStakedUSDat\n    function pause() external onlyRole(PAUSER_ROLE) {\n        _pause();\n    }\n\n    /// @inheritdoc IStakedUSDat\n    function unpause() external onlyRole(UNPAUSER_ROLE) {\n        _unpause();\n    }\n\n    /// @dev Blocks all token movements when paused, except enforcement actions executed through whileUnpaused.\n    function _update(address from, address to, uint256 value) internal override(ERC20Upgradeable) whenNotPaused {\n        super._update(from, to, value);\n    }\n}\n","deployed_bytecode":"0x608060405260043610610597575f3560e01c806372a426fb116102db578063c01bc98211610181578063db2a163d116100df578063f515e6f21161008e578063f515e6f2146110da578063f5b541a6146110fa578063fb1bb9de1461111a578063fb3ee5711461113a578063fdeeb28714611159578063fe575a8714611178578063ff6be926146111af575f5ffd5b8063db2a163d14611022578063dd62ed3e14611048578063e1a4521814611067578063e63ab1e91461107c578063ef8b30f71461109c578063f25af13c14610c23578063f3c2e5ed146110bb575f5ffd5b8063d503db751161013b578063d503db7514610688578063d505accf14610f7e578063d547741f14610f9d578063d62b40e614610fbc578063d68002f314610fdb578063d7f9195b14610fef578063d905777e14611003575f5ffd5b8063c01bc98214610ee8578063c4d1bdb814610f07578063c63d75b614610960578063c6e6f59214610f26578063c87d7e8d14610f45578063ce96cb7714610f64575f5ffd5b8063a217fddf11610239578063b3d7f6b9116101e8578063b3d7f6b914610e41578063b460af9414610e60578063b72ef31014610e7f578063ba08765214610e60578063bd662f5814610e9f578063bfb74d7114610ebe578063bfc5726c14610ed3575f5ffd5b8063a217fddf14610d78578063a31d90f614610d8b578063a4cfac1c14610daa578063a9059cbb14610dbf578063ab87982714610dde578063ac07b60b14610df2578063ad3cb1cc14610e11575f5ffd5b80638945257c116102955780638945257c14610cbf5780638a038a5414610cde5780638efab6e114610cfd578063900c886814610d1257806391d1485414610d2657806394bf804d14610d4557806395d89b4114610d64575f5ffd5b806372a426fb14610c045780637ce48d9914610c235780637ecebe0014610c385780638456cb5914610c5757806384b0196e14610c6b57806387eb6f0d14610c92575f5ffd5b8063380994c9116104405780634ef404061161039e57806360dd37d91161034d57806360dd37d914610b265780636439fd7514610b4557806367946b6414610b655780636e31081a14610b865780636e553f6514610ba757806370a0823114610bc6578063710eb26c14610be5575f5ffd5b80634ef4040614610a6d5780634f1ef28614610a8c57806352d1902d14610a9f578063537df3b614610ab35780635737619814610ad25780635bf3cb6c14610af15780635c975abb14610b12575f5ffd5b806344337ea1116103fa57806344337ea11461099e578063485cc955146109bd57806349efe5ae146109dc5780634a1cd8c2146109fb5780634c47fa1014610a1a5780634cdad50614610a395780634d73992b14610a58575f5ffd5b8063380994c9146108ec57806338d52e0f146109195780633e54bacb1461092d5780633f4ba83a1461094c578063402d267d1461096057806340e7e3da1461097f575f5ffd5b80630e73ecef116104f8578063248a9ca3116104a7578063248a9ca31461082d5780632f2ff15d1461084c578063313ce5671461086b578063330a74861461088657806335faa416146108a55780633644e515146108b957806336568abe146108cd575f5ffd5b80630e73ecef1461075a578063141de4de1461078c57806318160ddd146107ac5780631842e1bb146107c05780631b5013c6146107db5780631d9bf381146107fa57806323b872dd1461080e575f5ffd5b806307a2d13a1161055457806307a2d13a146106695780630824e0691461068857806308e4d105146106b057806309596655146106cf578063095ea7b3146106f05780630a28a4771461070f5780630b60091a1461072e575f5ffd5b806301e1d1141461059b57806301ffc9a7146105c2578063054fd355146105f1578063057a087614610612578063059d157b1461062857806306fdde0314610648575b5f5ffd5b3480156105a6575f5ffd5b506105af6111ce565b6040519081526020015b60405180910390f35b3480156105cd575f5ffd5b506105e16105dc3660046150c0565b6112fc565b60405190151581526020016105b9565b3480156105fc575f5ffd5b5061061061060b3660046150f8565b611332565b005b34801561061d575f5ffd5b506105af62093a8081565b348015610633575f5ffd5b506105af5f516020615b015f395f51905f5281565b348015610653575f5ffd5b5061065c611358565b6040516105b99190615157565b348015610674575f5ffd5b506105af610683366004615169565b6113f6565b348015610693575f5ffd5b5061069d6101f481565b60405161ffff90911681526020016105b9565b3480156106bb575f5ffd5b506106106106ca366004615180565b611401565b3480156106da575f5ffd5b50600a5461069d90600160a81b900461ffff1681565b3480156106fb575f5ffd5b506105e161070a3660046151ad565b611425565b34801561071a575f5ffd5b506105af610729366004615169565b505f90565b348015610739575f5ffd5b5060105461074d906001600160a01b031681565b6040516105b991906151d7565b348015610765575f5ffd5b507f0000000000000000000000004bc9fec04f0f95e9b42a3ef18f3c96fb57923d2e61074d565b348015610797575f5ffd5b506105af5f516020615c215f395f51905f5281565b3480156107b7575f5ffd5b506105af61143c565b3480156107cb575f5ffd5b506105af678ac7230489e8000081565b3480156107e6575f5ffd5b506105af6107f5366004615288565b611450565b348015610805575f5ffd5b506105af6114ca565b348015610819575f5ffd5b506105e16108283660046152ef565b61151f565b348015610838575f5ffd5b506105af610847366004615169565b611550565b348015610857575f5ffd5b5061061061086636600461532d565b611570565b348015610876575f5ffd5b50604051601281526020016105b9565b348015610891575f5ffd5b506106106108a0366004615169565b611592565b3480156108b0575f5ffd5b506106106115b2565b3480156108c4575f5ffd5b506105af6115cc565b3480156108d8575f5ffd5b506106106108e736600461532d565b6115da565b3480156108f7575f5ffd5b5061090161708081565b6040516001600160401b0390911681526020016105b9565b348015610924575f5ffd5b5061074d61160d565b348015610938575f5ffd5b5061061061094736600461535b565b61163b565b348015610957575f5ffd5b50610610611823565b34801561096b575f5ffd5b506105af61097a36600461537b565b611845565b34801561098a575f5ffd5b506105af610999366004615288565b6118a6565b3480156109a9575f5ffd5b506106106109b836600461537b565b611916565b3480156109c8575f5ffd5b506106106109d7366004615396565b6119da565b3480156109e7575f5ffd5b506106106109f636600461537b565b611ba3565b348015610a06575f5ffd5b50610610610a153660046153c2565b611bc3565b348015610a25575f5ffd5b506105af610a34366004615408565b612057565b348015610a44575f5ffd5b506105af610a53366004615169565b6120d4565b348015610a63575f5ffd5b506105af600f5481565b348015610a78575f5ffd5b50610610610a8736600461542c565b61210f565b610610610a9a366004615452565b61212f565b348015610aaa575f5ffd5b506105af61214a565b348015610abe575f5ffd5b50610610610acd36600461537b565b612165565b348015610add575f5ffd5b50610610610aec3660046151ad565b6121fd565b348015610afc575f5ffd5b50600a5461069d90600160b81b900461ffff1681565b348015610b1d575f5ffd5b506105e1612437565b348015610b31575f5ffd5b506105af610b403660046154ae565b61244c565b348015610b50575f5ffd5b506105af5f516020615c015f395f51905f5281565b348015610b70575f5ffd5b50610b796124cc565b6040516105b9919061553f565b348015610b91575f5ffd5b5060115461069d90600160a01b900461ffff1681565b348015610bb2575f5ffd5b506105af610bc136600461532d565b61251f565b348015610bd1575f5ffd5b506105af610be036600461537b565b612573565b348015610bf0575f5ffd5b50600a5461074d906001600160a01b031681565b348015610c0f575f5ffd5b50610610610c1e366004615169565b61259c565b348015610c2e575f5ffd5b506105af6101f481565b348015610c43575f5ffd5b506105af610c5236600461537b565b612651565b348015610c62575f5ffd5b5061061061265b565b348015610c76575f5ffd5b50610c7f61267a565b6040516105b99796959493929190615552565b348015610c9d575f5ffd5b50610cb1610cac36600461535b565b61271e565b6040516105b99291906155e8565b348015610cca575f5ffd5b50610610610cd93660046155ff565b612855565b348015610ce9575f5ffd5b50610610610cf83660046155ff565b6129cd565b348015610d08575f5ffd5b506105af600e5481565b348015610d1d575f5ffd5b50610610612a70565b348015610d31575f5ffd5b506105e1610d4036600461532d565b612aa7565b348015610d50575f5ffd5b506105af610d5f36600461532d565b612add565b348015610d6f575f5ffd5b5061065c612b29565b348015610d83575f5ffd5b506105af5f81565b348015610d96575f5ffd5b50610610610da5366004615169565b612b45565b348015610db5575f5ffd5b506105af60055481565b348015610dca575f5ffd5b506105e1610dd93660046151ad565b612c4a565b348015610de9575f5ffd5b506105af612c67565b348015610dfd575f5ffd5b50610610610e0c36600461537b565b612c8e565b348015610e1c575f5ffd5b5061065c604051806040016040528060058152602001640352e302e360dc1b81525081565b348015610e4c575f5ffd5b506105af610e5b366004615169565b612cae565b348015610e6b575f5ffd5b506105af610e7a36600461563b565b612cec565b348015610e8a575f5ffd5b506105af5f516020615ae15f395f51905f5281565b348015610eaa575f5ffd5b506105af610eb9366004615408565b612d06565b348015610ec9575f5ffd5b506105af60075481565b348015610ede575f5ffd5b506105af600d5481565b348015610ef3575f5ffd5b506105e1610f0236600461537b565b612d72565b348015610f12575f5ffd5b50610610610f2136600461567a565b612e05565b348015610f31575f5ffd5b506105af610f40366004615169565b612ec8565b348015610f50575f5ffd5b506105af610f5f36600461535b565b612ed3565b348015610f6f575f5ffd5b506105af61072936600461537b565b348015610f89575f5ffd5b50610610610f98366004615698565b612f13565b348015610fa8575f5ffd5b50610610610fb736600461532d565b613068565b348015610fc7575f5ffd5b50600b5461074d906001600160a01b031681565b348015610fe6575f5ffd5b5061069d613084565b348015610ffa575f5ffd5b506106106130c8565b34801561100e575f5ffd5b506105af61101d36600461537b565b613153565b34801561102d575f5ffd5b5060115461090190600160b01b90046001600160401b031681565b348015611053575f5ffd5b506105af611062366004615396565b613184565b348015611072575f5ffd5b506105af61271081565b348015611087575f5ffd5b506105af5f516020615b615f395f51905f5281565b3480156110a7575f5ffd5b506105af6110b6366004615169565b6131be565b3480156110c6575f5ffd5b5060115461074d906001600160a01b031681565b3480156110e5575f5ffd5b506105af5f516020615b815f395f51905f5281565b348015611105575f5ffd5b506105af5f516020615b415f395f51905f5281565b348015611125575f5ffd5b506105af5f516020615b215f395f51905f5281565b348015611145575f5ffd5b5061061061115436600461537b565b6131f9565b348015611164575f5ffd5b506105af6111733660046154ae565b61331c565b348015611183575f5ffd5b506105e161119236600461537b565b6001600160a01b03165f9081526020819052604090205460ff1690565b3480156111ba575f5ffd5b50600c5461074d906001600160a01b031681565b5f5f6111d86114ca565b6111e0613390565b6111ea91906156dd565b9050600c5f9054906101000a90046001600160a01b03166001600160a01b031663f694f1e06040518163ffffffff1660e01b8152600401602060405180830381865afa15801561123c573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061126091906156f0565b600b5f9054906101000a90046001600160a01b03166001600160a01b031663f694f1e06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156112b0573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112d491906156f0565b826007546112e29190615707565b6112ec9190615707565b6112f69190615707565b91505090565b5f6001600160e01b03198216637965db0b60e01b148061132c57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f516020615ae15f395f51905f52611349816133a1565b61135383836133ab565b505050565b60605f61136361345c565b90508060030180546113749061571a565b80601f01602080910402602001604051908101604052809291908181526020018280546113a09061571a565b80156113eb5780601f106113c2576101008083540402835291602001916113eb565b820191905f5260205f20905b8154815290600101906020018083116113ce57829003601f168201915b505050505091505090565b5f61132c825f613480565b5f516020615ae15f395f51905f52611418816133a1565b611421826134be565b5050565b5f33611432818585613543565b5060019392505050565b5f5f61144661345c565b6002015492915050565b5f61145961160d565b6001600160a01b0316639fd5a6cf33308987876040518663ffffffff1660e01b815260040161148c959493929190615752565b5f604051808303815f87803b1580156114a3575f5ffd5b505af19250505080156114b4575060015b506114c0868686612d06565b9695505050505050565b600d545f908082036114dd575f91505090565b600f54600e545f906114ef90426156dd565b9050818110611501575f935050505090565b61151761150e82846156dd565b84846001613550565b935050505090565b5f6115293361359b565b6115328461359b565b61153b8361359b565b6115468484846135c2565b90505b9392505050565b5f9081525f516020615ba15f395f51905f52602052604090206001015490565b61157982611550565b611582816133a1565b61158c83836135e5565b50505050565b5f516020615ae15f395f51905f526115a9816133a1565b6114218261368d565b6115ba6136ec565b6115c2613707565b6115ca6137ab565b565b5f6115d56137be565b905090565b6001600160a01b03811633146116035760405163334bd91960e11b815260040160405180910390fd5b61135382826137c7565b7f0773e532dfede91f04b12a73d3d2acd361424f41f76b4fb79f090161e36b4e00546001600160a01b031690565b6116436136ec565b61164b613840565b5f516020615ae15f395f51905f52611662816133a1565b8261166c81613866565b61167583613886565b600c5f9054906101000a90046001600160a01b03166001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa1580156116c5573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116e991906156f0565b1561170757604051631bb2296560e31b815260040160405180910390fd5b600b54600c54601154604080516346918f4560e11b81529051735756699ee0eb8247a334671e2b17228256cc7a47946375bc4d40946001600160a01b039182169490821693911691638d231e8a916004808201926020929091908290030181865afa158015611778573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061179c9190615796565b60115460405160e086901b6001600160e01b03191681526001600160a01b03948516600482015292841660248401529216604482015260648101889052600160a01b90910461ffff16608482015260a4015f6040518083038186803b158015611803575f5ffd5b505af4158015611815573d5f5f3e3d5ffd5b5050505050506114216137ab565b5f516020615b215f395f51905f5261183a816133a1565b6118426138a7565b50565b5f61184f82612d72565b8061185d575061185d612437565b806118805750600261186d6124cc565b600281111561187e5761187e61550f565b145b1561188c57505f919050565b6118946138f5565b61189e575f61132c565b5f1992915050565b5f6118af61160d565b6001600160a01b0316639fd5a6cf33308787876040518663ffffffff1660e01b81526004016118e2959493929190615752565b5f604051808303815f87803b1580156118f9575f5ffd5b505af192505050801561190a575060015b506114c0868686612057565b5f516020615b815f395f51905f5261192d816133a1565b6119375f83612aa7565b156119555760405163155236e160e21b815260040160405180910390fd5b6001600160a01b0382165f9081526020819052604090205460ff161561198e57604051631f7b776b60e01b815260040160405180910390fd5b6001600160a01b0382165f81815260208190526040808220805460ff19166001179055517fffa4e6181777692565cf28528fc88fd1516ea86b56da075235fa575af6a4b8559190a25050565b5f6119e3613961565b805490915060ff600160401b82041615906001600160401b03165f81158015611a095750825b90505f826001600160401b03166001148015611a245750303b155b905081158015611a32575080155b15611a505760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315611a7a57845460ff60401b1916600160401b1785555b6001600160a01b03871615801590611a9a57506001600160a01b03861615155b611ab75760405163f6b2911f60e01b815260040160405180910390fd5b611abf613989565b611ac7613989565b611b136040518060400160405280600c81526020016b14dd185ad959081554d1185d60a21b815250604051806040016040528060068152602001651cd554d1185d60d21b815250613991565b611b406040518060400160405280600c81526020016b14dd185ad959081554d1185d60a21b8152506139a3565b611b49866139ce565b611b535f886135e5565b508315611b9a57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050565b5f516020615ae15f395f51905f52611bba816133a1565b611421826139df565b5f611bcd816133a1565b60025f611bd8613961565b8054909150600160401b900460ff1680611bff575080546001600160401b03808416911610155b15611c1d5760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155611c4785613a39565b611c54602086018661537b565b60085460015460025460035460095460405163d68fce0360e01b8152600481019590955260248501939093526044840191909152606483015260848201526001600160a01b03919091169063d68fce039060a4015f604051808303815f87803b158015611cbf575f5ffd5b505af1158015611cd1573d5f5f3e3d5ffd5b50611ce392505050602086018661537b565b600b80546001600160a01b0319166001600160a01b0392909216919091179055611d13604086016020870161537b565b600c80546001600160a01b0319166001600160a01b0392909216919091179055611d43606086016040870161537b565b601180546001600160a01b0319166001600160a01b0392909216919091179055611d7b611d7660a087016080880161537b565b613ce3565b611d93611d8e608087016060880161537b565b6139df565b611dbc611da660e0870160c08801615180565b611db7610100880160e08901615180565b6133ab565b611dda611dd161012087016101008801615180565b61ffff1661368d565b611df4611def61016087016101408801615180565b6134be565b6203f480600f55600a805460ff60a01b1916600160a01b1790556011805467ffffffffffffffff60b01b19169055611e32606086016040870161537b565b6001600160a01b031663a798f5da611e5060c0880160a0890161537b565b611e6261014089016101208a01615180565b611e746101808a016101608b016157b1565b611e866101a08b016101808c016157b1565b6040516001600160e01b031960e087901b1681526001600160a01b03909416600485015261ffff90921660248401526001600160801b0390811660448401521660648201526084015f604051808303815f87803b158015611ee5575f5ffd5b505af1158015611ef7573d5f5f3e3d5ffd5b50611f2192505f516020615ae15f395f51905f529150611f1c9050602087018761537b565b613ddf565b611f425f516020615b015f395f51905f52611f1c604087016020880161537b565b611f635f516020615b415f395f51905f52611f1c606087016040880161537b565b611f845f516020615c215f395f51905f52611f1c608087016060880161537b565b611fa55f516020615b815f395f51905f52611f1c60a087016080880161537b565b611fc65f516020615c015f395f51905f52611f1c60c0870160a0880161537b565b611fe75f516020615b615f395f51905f52611f1c60e0870160c0880161537b565b6120095f516020615b215f395f51905f52611f1c610100870160e0880161537b565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b5f5f61206284611845565b9050808511156120945783858260405163284ff66760e01b815260040161208b939291906157d7565b60405180910390fd5b61209d85612cae565b9150828211156120c057604051638199f5f360e01b815260040160405180910390fd5b6120cc33858488613e10565b509392505050565b5f61132c826120e16111ce565b6120ec906001615707565b6120f8600c600a6158db565b61210061143c565b61210a9190615707565b613e7b565b5f516020615b015f395f51905f52612126816133a1565b61142182613eb2565b612137613fac565b61214082614050565b611421828261405a565b5f61215361410d565b505f516020615ac15f395f51905f5290565b5f516020615b815f395f51905f5261217c816133a1565b6001600160a01b0382165f9081526020819052604090205460ff166121b45760405163100c679760e21b815260040160405180910390fd5b6001600160a01b0382165f81815260208190526040808220805460ff19169055517f117e3210bb9aa7d9baff172026820255c6f6c30ba8999d1c2fd88e2848137c4e9190a25050565b6122056136ec565b5f516020615c015f395f51905f5261221c816133a1565b600a546001600160a01b031661223181614156565b5f61223a61160d565b6001600160a01b0316856001600160a01b03160361226a5761225a613390565b6007546122679190615707565b90505b600c54604080516338d52e0f60e01b815290516001600160a01b039092169182916338d52e0f9160048083019260209291908290030181865afa1580156122b3573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122d79190615796565b6001600160a01b0316866001600160a01b03160361235c57806001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa15801561232b573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061234f91906156f0565b6123599083615707565b91505b6040516370a0823160e01b81525f906001600160a01b038816906370a082319061238a9030906004016151d7565b602060405180830381865afa1580156123a5573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906123c991906156f0565b9050828110156123ec576040516309a02c0b60e31b815260040160405180910390fd5b6123f683826156dd565b861115612416576040516309a02c0b60e31b815260040160405180910390fd5b61242a6001600160a01b0388168588614186565b50505050506114216137ab565b5f516020615bc15f395f51905f525460ff1690565b5f61245561160d565b6001600160a01b031663d505accf333089898989896040518863ffffffff1660e01b815260040161248c97969594939291906158e9565b5f604051808303815f87803b1580156124a3575f5ffd5b505af19250505080156124b4575060015b506124c0888888612057565b98975050505050505050565b600a545f90600160a01b900460ff16818160028111156124ee576124ee61550f565b14801561250d5750601154600160b01b90046001600160401b03164210155b1561251a57600191505090565b919050565b5f5f61252a83611845565b90508084111561255357828482604051633c8097d960e11b815260040161208b939291906157d7565b5f61255d856131be565b905061256b33858784613e10565b949350505050565b5f5f61257d61345c565b6001600160a01b039093165f9081526020939093525050604090205490565b5f516020615ae15f395f51905f526125b3816133a1565b81158015906125c5575062093a808211155b6125e25760405163ca6075df60e01b815260040160405180910390fd5b6125ea613707565b600d541561260a57604051628099ef60e11b815260040160405180910390fd5b600f80549083905560408051828152602081018590527f5c9e8d09b7d6af206b2e5033f0e2a1b2c4cfc32f80bc5df5bddc5dc97b24236791015b60405180910390a1505050565b5f61132c826141b2565b5f516020615b615f395f51905f52612672816133a1565b6118426141da565b5f6060805f5f5f60605f61268c614222565b80549091501580156126a057506001810154155b6126e45760405162461bcd60e51b81526020600482015260156024820152741152540dcc4c8e88155b9a5b9a5d1a585b1a5e9959605a1b604482015260640161208b565b6126ec614246565b6126f4614262565b604080515f80825260208201909252600f60f81b9c939b5091995046985030975095509350915050565b5f5f6127286136ec565b61273061426d565b612738613840565b6127406142b6565b8361274a81613866565b60015c5f81900361276e5760405163a40d413560e01b815260040160405180910390fd5b61277a865f5c83613e7b565b92505f61279184670de0b6b3a7640000895f613550565b9050858110156127a95760015f945094505050612845565b8360075410156127c15760025f945094505050612845565b8360075f8282546127d291906156dd565b9091555061280290507f0000000000000000000000004bc9fec04f0f95e9b42a3ef18f3c96fb57923d2e886142ef565b61283f7f0000000000000000000000004bc9fec04f0f95e9b42a3ef18f3c96fb57923d2e8561282f61160d565b6001600160a01b03169190614186565b5f945050505b5061284e6137ab565b9250929050565b61285d6136ec565b612865613840565b61286d6142b6565b5f516020615b415f395f51905f52612884816133a1565b8461288e81613866565b8461289881613866565b6128a184613886565b6128a9613707565b8660075410156128cc57604051631e9acf1760e31b815260040160405180910390fd5b6128d46111ce565b508660075f8282546128e691906156dd565b9091555050601154735756699ee0eb8247a334671e2b17228256cc7a47906370a3daa8906001600160a01b031661291b61160d565b600c546007546001600160a01b03909116908a908d908d9061293b613390565b6040516001600160e01b031960e08b901b1681526001600160a01b03988916600482015296881660248801529487166044870152959092166064850152608484015260a483015260c482019290925260e4810191909152610104015f6040518083038186803b1580156129ac575f5ffd5b505af41580156129be573d5f5f3e3d5ffd5b5050505050505061158c6137ab565b6129d56136ec565b6129dd613840565b6129e56142b6565b5f516020615b415f395f51905f526129fc816133a1565b84612a0681613866565b84612a1081613866565b612a1984613886565b612a21613707565b612a296111ce565b508560075f828254612a3b9190615707565b9091555050601154735756699ee0eb8247a334671e2b17228256cc7a4790639c3ac3d4906001600160a01b031661291b61160d565b612a7861426d565b60015c5f03612a9a5760405163a40d413560e01b815260040160405180910390fd5b5f8060015d505f80805d50565b5f9182525f516020615ba15f395f51905f52602090815260408084206001600160a01b0393909316845291905290205460ff1690565b5f5f612ae883611845565b905080841115612b115782848260405163284ff66760e01b815260040161208b939291906157d7565b5f612b1b85612cae565b905061256b33858388613e10565b60605f612b3461345c565b90508060040180546113749061571a565b612b4d6136ec565b612b55613840565b5f516020615c215f395f51905f52612b6c816133a1565b81612b7681613866565b612b7e613707565b600d5415612b9e57604051628099ef60e11b815260040160405180910390fd5b5f612bb5612baa6111ce565b6101f4612710614323565b905080841115612bd857604051630421448360e51b815260040160405180910390fd5b601054612c03906001600160a01b03163086612bf261160d565b6001600160a01b03169291906143d3565b600d84905542600e556040518481527f3e871955049170cfec2229578a11c86676c6ea7547700b98095644d1e301ba449060200160405180910390a15050506118426137ab565b5f612c543361359b565b612c5d8361359b565b6115498383614400565b5f80612c716124cc565b6002811115612c8257612c8261550f565b14610729575060055490565b5f516020615ae15f395f51905f52612ca5816133a1565b61142182613ce3565b5f5f612cb98361440d565b90505f612cc4612c67565b9050805f03612cd4575092915050565b61256b82612710612ce584826156dd565b6001613550565b5f604051637a851da960e11b815260040160405180910390fd5b5f5f612d1184611845565b905080851115612d3a57838582604051633c8097d960e11b815260040161208b939291906157d7565b612d43856131be565b915082821015612d6657604051638199f5f360e01b815260040160405180910390fd5b6120cc33858785613e10565b6001600160a01b0381165f9081526020819052604081205460ff168061132c5750612d9b61160d565b6001600160a01b031663e5839836836040518263ffffffff1660e01b8152600401612dc691906151d7565b602060405180830381865afa158015612de1573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061132c919061592a565b5f516020615b015f395f51905f52612e1c816133a1565b5f826002811115612e2f57612e2f61550f565b03612e4d576040516383985a1760e01b815260040160405180910390fd5b5f612e566124cc565b600a8054919250849160ff60a01b1916600160a01b836002811115612e7d57612e7d61550f565b02179055506011805467ffffffffffffffff60b01b191690556040517f9f5728021e7b2aff3b2dc83ece046994fcdc91a11d7f233f9e81796fbc618e87906126449083908690615949565b5f61132c825f614419565b5f5f612ede33613153565b905080841115612f0757338482604051632e52afbb60e21b815260040161208b939291906157d7565b61256b3333868661444e565b83421115612f375760405163313c898160e11b81526004810185905260240161208b565b5f7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888612fa18c6001600160a01b03165f9081527f5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb006020526040902080546001810190915590565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090505f612ffb82614557565b90505f61300a82878787614583565b9050896001600160a01b0316816001600160a01b031614613051576040516325c0072360e11b81526001600160a01b0380831660048301528b16602482015260440161208b565b61305c8a8a8a613543565b50505050505050505050565b61307182611550565b61307a816133a1565b61158c83836137c7565b5f8061308e6124cc565b600281111561309f5761309f61550f565b146130b65750600a54600160b81b900461ffff1690565b50600a54600160a81b900461ffff1690565b6130d06136ec565b6130d861426d565b6130e0613840565b6130e86142b6565b60015c156131095760405163a40d413560e01b815260040160405180910390fd5b613111613707565b6131196111ce565b613124906001615707565b805f5d50613134600c600a6158db565b61313c61143c565b6131469190615707565b8060015d506115ca6137ab565b5f61315d82612d72565b8061316b575061316b612437565b61317d5761317882612573565b61132c565b5f92915050565b5f5f61318e61345c565b6001600160a01b039485165f90815260019190910160209081526040808320959096168252939093525050205490565b5f5f6131c8612c67565b9050805f036131da5761154983612ec8565b5f6131ea84836127106001613550565b905061256b610f4082866156dd565b6132016136ec565b5f516020615c015f395f51905f52613218816133a1565b5f613221612437565b90508015613231576132316138a7565b6001600160a01b0383165f9081526020819052604090205460ff166132695760405163100c679760e21b815260040160405180910390fd5b5f61327384612573565b90505f811161329557604051631f2a200560e01b815260040160405180910390fd5b600a546001600160a01b03166132aa81614156565b6132b58582846145af565b806001600160a01b0316856001600160a01b03167f0eaaadac87f199d46d8127736588b675533df9cfc4aee1f85c448ff39fc01c81846040516132fa91815260200190565b60405180910390a350508015613312576133126141da565b50506118426137ab565b5f61332561160d565b6001600160a01b031663d505accf33308b898989896040518863ffffffff1660e01b815260040161335c97969594939291906158e9565b5f604051808303815f87803b158015613373575f5ffd5b505af1925050508015613384575060015b506124c0888888612d06565b5f601254600d546115d591906156dd565b611842813361460c565b8061ffff168261ffff16111580156133c957506101f461ffff821611155b6133e6576040516358d620b360e01b815260040160405180910390fd5b600a805463ffffffff60a81b1916600160a81b61ffff85811691820261ffff60b81b191692909217600160b81b928516928302179092556040805192835260208301919091527f07137cf02072df7b99506ba2317b2a6f7da27ee72df69888f11c9a3970dd175c91015b60405180910390a15050565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0090565b5f61154961348c6111ce565b613497906001615707565b6134a3600c600a6158db565b6134ab61143c565b6134b59190615707565b85919085613550565b6101f461ffff821611156134e557604051633c13b88160e21b815260040160405180910390fd5b6011805461ffff838116600160a01b81810261ffff60a01b1985161790945560408051949093049091168084526020840191909152917f326ac452d742e6bc9f081a44f27d8dd2ef95559c177b3ad06ee4bf095c3fda629101613450565b6113538383836001614645565b5f61357d61355d83614726565b801561357857505f84806135735761357361596f565b868809115b151590565b613588868686614323565b6135929190615707565b95945050505050565b6135a481612d72565b1561184257604051631f7b776b60e01b815260040160405180910390fd5b5f336135cf858285614752565b6135da8585856145af565b506001949350505050565b5f5f516020615ba15f395f51905f526135fe8484612aa7565b61367d575f848152602082815260408083206001600160a01b03871684529091529020805460ff191660011790556136333390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4600191505061132c565b5f91505061132c565b5092915050565b6101f48111156136b0576040516358d620b360e01b815260040160405180910390fd5b60058190556040518181527f206dd15151fcc83315419fbe53a71fcf9c09da803767d3dd05f7874e1b9bf645906020015b60405180910390a150565b6136f461479d565b60025f516020615be15f395f51905f5255565b600d545f8190036137155750565b5f61371e6114ca565b90505f61372b82846156dd565b90505f6012548261373c91906156dd565b9050801561379557816012819055508060075f82825461375c9190615707565b90915550506040518181527f130c3c7016d3de04cc3b470a5035d0a485a4529fbc747ec705b2806468d394869060200160405180910390a15b825f0361158c575f600d81905560125550505050565b60015f516020615be15f395f51905f5255565b5f6115d56147cc565b5f5f516020615ba15f395f51905f526137e08484612aa7565b1561367d575f848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a4600191505061132c565b613848612437565b156115ca5760405163d93c066560e01b815260040160405180910390fd5b805f0361184257604051631f2a200560e01b815260040160405180910390fd5b8042111561184257604051631ab7da6b60e01b815260040160405180910390fd5b6138af61483f565b5f516020615bc15f395f51905f52805460ff191681557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516136e191906151d7565b5f306001600160a01b03166301e1d1146040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015613950575060408051601f3d908101601f1916820190925261394d918101906156f0565b60015b61395957505f90565b600191505090565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0061132c565b6115ca614864565b613999614864565b6114218282614889565b6139ab614864565b61184281604051806040016040528060018152602001603160f81b8152506148b9565b6139d6614864565b611842816148f8565b6139e881614156565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f184a649b6ce5186087e0a99b53f247181d516649f7d60e3de2b537271250b395905f90a35050565b30613a47602083018361537b565b6001600160a01b031663411557d16040518163ffffffff1660e01b8152600401602060405180830381865afa158015613a82573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613aa69190615796565b6001600160a01b0316148015613b32575030613ac8604083016020840161537b565b6001600160a01b031663411557d16040518163ffffffff1660e01b8152600401602060405180830381865afa158015613b03573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613b279190615796565b6001600160a01b0316145b8015613baa5750613b49604082016020830161537b565b6001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa158015613b84573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613ba891906156f0565b155b8015613c2c575030613bc2606083016040840161537b565b6001600160a01b031663411557d16040518163ffffffff1660e01b8152600401602060405180830381865afa158015613bfd573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613c219190615796565b6001600160a01b0316145b8015613cc65750613c43604082016020830161537b565b6001600160a01b0316613c5c606083016040840161537b565b6001600160a01b031663625441346040518163ffffffff1660e01b8152600401602060405180830381865afa158015613c97573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613cbb9190615796565b6001600160a01b0316145b61184257604051631bb2296560e31b815260040160405180910390fd5b6001600160a01b038116613d0a5760405163f6b2911f60e01b815260040160405180910390fd5b306001600160a01b03821603613d335760405163714b26e760e11b815260040160405180910390fd5b7f0000000000000000000000004bc9fec04f0f95e9b42a3ef18f3c96fb57923d2e6001600160a01b0316816001600160a01b031603613d855760405163714b26e760e11b815260040160405180910390fd5b613d8e8161359b565b601080546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f767af25527844d2331ddf57457ba4174d6a3b26aa4c362d4d791ca3faf0e9e63905f90a35050565b6001600160a01b038116613e065760405163f6b2911f60e01b815260040160405180910390fd5b61135382826135e5565b613e186136ec565b613e206142b6565b81613e2a81613866565b81613e3481613866565b613e3d8661359b565b613e468561359b565b613e4e613707565b8360075f828254613e5f9190615707565b90915550613e7190508686868661497b565b505061158c6137ab565b5f5f613e898585855f613550565b90505f613ea682613e98613084565b61ffff166127106001613550565b90506114c081836156dd565b806001600160401b031642108015613ede5750613ed161708042615707565b816001600160401b031611155b613efb576040516383985a1760e01b815260040160405180910390fd5b5f613f046124cc565b600a805460ff60a01b191690556011805467ffffffffffffffff60b01b1916600160b01b6001600160401b038616021790556040519091507f9f5728021e7b2aff3b2dc83ece046994fcdc91a11d7f233f9e81796fbc618e8790613f6b9083905f90615949565b60405180910390a16040516001600160401b03831681527f542dda9ba5ea2e8acb6236921bf765f58edb87c0151e07bd8cf153d268488f8290602001613450565b306001600160a01b037f0000000000000000000000002b7074cf6681382b70e239063931ebe83c0f4e0a16148061403257507f0000000000000000000000002b7074cf6681382b70e239063931ebe83c0f4e0a6001600160a01b03166140265f516020615ac15f395f51905f52546001600160a01b031690565b6001600160a01b031614155b156115ca5760405163703e46dd60e11b815260040160405180910390fd5b5f611421816133a1565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156140b4575060408051601f3d908101601f191682019092526140b1918101906156f0565b60015b6140d35781604051634c9c8ce360e01b815260040161208b91906151d7565b5f516020615ac15f395f51905f52811461410357604051632a87526960e21b81526004810182905260240161208b565b61135383836149f4565b306001600160a01b037f0000000000000000000000002b7074cf6681382b70e239063931ebe83c0f4e0a16146115ca5760405163703e46dd60e11b815260040160405180910390fd5b6001600160a01b03811661417d5760405163f6b2911f60e01b815260040160405180910390fd5b6118428161359b565b6141938383836001614a49565b6113535782604051635274afe760e01b815260040161208b91906151d7565b5f807f5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb0061257d565b6141e2613840565b5f516020615bc15f395f51905f52805460ff191660011781557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258336138e8565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10090565b60605f614251614222565b90508060020180546113749061571a565b60605f611363614222565b336001600160a01b037f0000000000000000000000004bc9fec04f0f95e9b42a3ef18f3c96fb57923d2e16146115ca57604051637a851da960e11b815260040160405180910390fd5b60026142c06124cc565b60028111156142d1576142d161550f565b036115ca5760405163206719c160e21b815260040160405180910390fd5b6001600160a01b038216614318575f604051634b637e8f60e11b815260040161208b91906151d7565b611421825f83614aab565b5f5f5f6143308686614abe565b91509150815f036143545783818161434a5761434a61596f565b0492505050611549565b81841161436b5761436b6003851502601118614ada565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b6143e1848484846001614aeb565b61158c5783604051635274afe760e01b815260040161208b91906151d7565b5f336114328185856145af565b5f61132c826001613480565b5f611549614429600c600a6158db565b61443161143c565b61443b9190615707565b6144436111ce565b6134b5906001615707565b5f6144576136ec565b6144608561359b565b6144698461359b565b678ac7230489e8000083101561449257604051631e93015360e21b815260040160405180910390fd5b6144bd847f0000000000000000000000004bc9fec04f0f95e9b42a3ef18f3c96fb57923d2e856145af565b604051632a6de10f60e11b81526001600160a01b037f0000000000000000000000004bc9fec04f0f95e9b42a3ef18f3c96fb57923d2e16906354dbc21e9061450d908790879087906004016157d7565b6020604051808303815f875af1158015614529573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061454d91906156f0565b905061256b6137ab565b5f61132c6145636137be565b8360405161190160f01b8152600281019290925260228201526042902090565b5f5f5f5f61459388888888614b58565b9250925092506145a38282614c16565b50909695505050505050565b6001600160a01b0383166145d8575f604051634b637e8f60e11b815260040161208b91906151d7565b6001600160a01b038216614601575f60405163ec442f0560e01b815260040161208b91906151d7565b611353838383614aab565b6146168282612aa7565b6114215760405163e2517d3f60e01b81526001600160a01b03821660048201526024810183905260440161208b565b5f61464e61345c565b90506001600160a01b038516614679575f60405163e602df0560e01b815260040161208b91906151d7565b6001600160a01b0384166146a2575f604051634a1406b160e11b815260040161208b91906151d7565b6001600160a01b038086165f9081526001830160209081526040808320938816835292905220839055811561471f57836001600160a01b0316856001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258560405161471691815260200190565b60405180910390a35b5050505050565b5f600282600381111561473b5761473b61550f565b6147459190615983565b60ff166001149050919050565b5f61475d8484613184565b90505f1981101561158c578181101561478f57828183604051637dc7a0d960e11b815260040161208b939291906157d7565b61158c84848484035f614645565b5f516020615be15f395f51905f52546002036115ca57604051633ee5aeb560e01b815260040160405180910390fd5b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6147f6614cce565b6147fe614d33565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b614847612437565b6115ca57604051638dfc202b60e01b815260040160405180910390fd5b61486c614d72565b6115ca57604051631afcd79f60e31b815260040160405180910390fd5b614891614864565b5f61489a61345c565b9050600381016148aa8482615a06565b506004810161158c8382615a06565b6148c1614864565b5f6148ca614222565b9050600281016148da8482615a06565b50600381016148e98382615a06565b505f8082556001909101555050565b614900614864565b7f0773e532dfede91f04b12a73d3d2acd361424f41f76b4fb79f090161e36b4e005f8061492c84614d8b565b915091508161493c57601261493e565b805b83546001600160a81b031916600160a01b60ff92909216919091026001600160a01b031916176001600160a01b0394909416939093179091555050565b61498e61498661160d565b8530856143d3565b6149988382614e16565b826001600160a01b0316846001600160a01b03167fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d784846040516149e6929190918252602082015260400190565b60405180910390a350505050565b6149fd82614e4a565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a2805115614a41576113538282614ea4565b611421614f34565b60405163a9059cbb60e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f51148316614a9f578383151615614a93573d5f823e3d81fd5b5f873b113d1516831692505b60405250949350505050565b614ab3613840565b611353838383614f53565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b6040516323b872dd60e01b5f8181526001600160a01b038781166004528616602452604485905291602083606481808c5af1925060015f51148316614b47578383151615614b3b573d5f823e3d81fd5b5f883b113d1516831692505b604052505f60605295945050505050565b5f80806fa2a8918ca85bafe22016d0b997e4df60600160ff1b03841115614b8757505f91506003905082614c0c565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015614bd8573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b038116614c0357505f925060019150829050614c0c565b92505f91508190505b9450945094915050565b5f826003811115614c2957614c2961550f565b03614c32575050565b6001826003811115614c4657614c4661550f565b03614c645760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115614c7857614c7861550f565b03614c995760405163fce698f760e01b81526004810182905260240161208b565b6003826003811115614cad57614cad61550f565b03611421576040516335e2f38360e21b81526004810182905260240161208b565b5f5f614cd8614222565b90505f614ce3614246565b805190915015614cfb57805160209091012092915050565b81548015614d0a579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f5f614d3d614222565b90505f614d48614262565b805190915015614d6057805160209091012092915050565b60018201548015614d0a579392505050565b5f614d7b613961565b54600160401b900460ff16919050565b5f5f5f614d9760405190565b6040805160048152602481019091526020810180516001600160e01b031663313ce56760e01b1790529091505f908190614dd2908790615068565b5091509150614de083604052565b818015614dee575060203d10155b8015614dfb575060ff8111155b614e06575f5f614e0a565b6001815b94509450505050915091565b6001600160a01b038216614e3f575f60405163ec442f0560e01b815260040161208b91906151d7565b6114215f8383614aab565b806001600160a01b03163b5f03614e765780604051634c9c8ce360e01b815260040161208b91906151d7565b5f516020615ac15f395f51905f5280546001600160a01b0319166001600160a01b0392909216919091179055565b60605f614eb18484615089565b9050808015614ed257505f3d1180614ed257505f846001600160a01b03163b115b15614ee757614edf61509c565b91505061132c565b8015614f085783604051639996b31560e01b815260040161208b91906151d7565b3d15614f1b57614f166150b5565b613686565b60405163d6bda27560e01b815260040160405180910390fd5b34156115ca5760405163b398979f60e01b815260040160405180910390fd5b5f614f5c61345c565b90506001600160a01b038416614f8a5781816002015f828254614f7f9190615707565b90915550614fe79050565b6001600160a01b0384165f9081526020829052604090205482811015614fc95784818460405163391434e360e21b815260040161208b939291906157d7565b6001600160a01b0385165f9081526020839052604090209083900390555b6001600160a01b038316615005576002810180548390039055615023565b6001600160a01b0383165f9081526020829052604090208054830190555b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516149e691815260200190565b5f5f5f60405f855160208701885afa92505f51915060205190509250925092565b5f5f5f835160208501865af49392505050565b6040513d81523d5f602083013e3d602001810160405290565b6040513d5f823e3d81fd5b5f602082840312156150d0575f5ffd5b81356001600160e01b031981168114611549575f5ffd5b803561ffff8116811461251a575f5ffd5b5f5f60408385031215615109575f5ffd5b615112836150e7565b9150615120602084016150e7565b90509250929050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6115496020830184615129565b5f60208284031215615179575f5ffd5b5035919050565b5f60208284031215615190575f5ffd5b611549826150e7565b6001600160a01b0381168114611842575f5ffd5b5f5f604083850312156151be575f5ffd5b82356151c981615199565b946020939093013593505050565b6001600160a01b0391909116815260200190565b634e487b7160e01b5f52604160045260245ffd5b5f82601f83011261520e575f5ffd5b81356001600160401b03811115615227576152276151eb565b604051601f8201601f19908116603f011681016001600160401b0381118282101715615255576152556151eb565b60405281815283820160200185101561526c575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f5f5f60a0868803121561529c575f5ffd5b8535945060208601356152ae81615199565b9350604086013592506060860135915060808601356001600160401b038111156152d6575f5ffd5b6152e2888289016151ff565b9150509295509295909350565b5f5f5f60608486031215615301575f5ffd5b833561530c81615199565b9250602084013561531c81615199565b929592945050506040919091013590565b5f5f6040838503121561533e575f5ffd5b82359150602083013561535081615199565b809150509250929050565b5f5f6040838503121561536c575f5ffd5b50508035926020909101359150565b5f6020828403121561538b575f5ffd5b813561154981615199565b5f5f604083850312156153a7575f5ffd5b82356153b281615199565b9150602083013561535081615199565b5f5f8284036102a08112156153d5575f5ffd5b6101a08112156153e3575f5ffd5b83925061010061019f19820112156153f9575f5ffd5b506101a0830190509250929050565b5f5f5f6060848603121561541a575f5ffd5b83359250602084013561531c81615199565b5f6020828403121561543c575f5ffd5b81356001600160401b0381168114611549575f5ffd5b5f5f60408385031215615463575f5ffd5b823561546e81615199565b915060208301356001600160401b03811115615488575f5ffd5b615494858286016151ff565b9150509250929050565b803560ff8116811461251a575f5ffd5b5f5f5f5f5f5f5f60e0888a0312156154c4575f5ffd5b8735965060208801356154d681615199565b955060408801359450606088013593506154f26080890161549e565b9699959850939692959460a0840135945060c09093013592915050565b634e487b7160e01b5f52602160045260245ffd5b6003811061184257634e487b7160e01b5f52602160045260245ffd5b6020810161554c83615523565b91905290565b60ff60f81b8816815260e060208201525f61557060e0830189615129565b82810360408401526155828189615129565b606084018890526001600160a01b038716608085015260a0840186905283810360c0850152845180825260208087019350909101905f5b818110156155d75783518352602093840193909201916001016155b9565b50909b9a5050505050505050505050565b604081016155f584615523565b9281526020015290565b5f5f5f5f60808587031215615612575f5ffd5b8435935060208501359250604085013561562b81615199565b9396929550929360600135925050565b5f5f5f6060848603121561564d575f5ffd5b83359250602084013561565f81615199565b9150604084013561566f81615199565b809150509250925092565b5f6020828403121561568a575f5ffd5b813560038110611549575f5ffd5b5f5f5f5f5f5f5f60e0888a0312156156ae575f5ffd5b87356156b981615199565b965060208801356154d681615199565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561132c5761132c6156c9565b5f60208284031215615700575f5ffd5b5051919050565b8082018082111561132c5761132c6156c9565b600181811c9082168061572e57607f821691505b60208210810361574c57634e487b7160e01b5f52602260045260245ffd5b50919050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190525f9061578b90830184615129565b979650505050505050565b5f602082840312156157a6575f5ffd5b815161154981615199565b5f602082840312156157c1575f5ffd5b81356001600160801b0381168114611549575f5ffd5b6001600160a01b039390931683526020830191909152604082015260600190565b6001815b600184111561583357808504811115615817576158176156c9565b600184161561582557908102905b60019390931c9280026157fc565b935093915050565b5f826158495750600161132c565b8161585557505f61132c565b816001811461586b576002811461587557615891565b600191505061132c565b60ff841115615886576158866156c9565b50506001821b61132c565b5060208310610133831016604e8410600b84101617156158b4575081810a61132c565b6158c05f1984846157f8565b805f19048211156158d3576158d36156c9565b029392505050565b5f61154960ff84168361583b565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b5f6020828403121561593a575f5ffd5b81518015158114611549575f5ffd5b6040810161595684615523565b83825261596283615523565b8260208301529392505050565b634e487b7160e01b5f52601260045260245ffd5b5f60ff8316806159a157634e487b7160e01b5f52601260045260245ffd5b8060ff84160691505092915050565b601f821115611353578282111561135357805f5260205f20601f840160051c60208510156159db57505f5b90810190601f840160051c035f5b818110156159fe575f838201556001016159e9565b505050505050565b81516001600160401b03811115615a1f57615a1f6151eb565b615a3381615a2d845461571a565b846159b0565b6020601f821160018114615a65575f8315615a4e5750848201515b5f19600385901b1c1916600184901b17845561471f565b5f84815260208120601f198516915b82811015615a945787850151825560209485019460019092019101615a74565b5084821015615ab157868401515f19600387901b60f8161c191681555b50505050600190811b0190555056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbcf7e61c4e74c42df4eeae815b78ea28052584091f2e136a00ad566b99fd70583907d5ff2aa980bd4c78f5b3550ab2aae44afd67f1ad4aa2be4346a144fb2c1745427da25fe773164f88948d3e215c94b6554e2ed5e5f203a821c9f2f6131cf75a97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92965d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a98db8a220cd0f09badce9f22d0ba7e93edb3d404448cc3560d391ab096ad16e902dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800cd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033009b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00973ef39d76cc2c6090feab1c030bec6ab5db557f64df047a4c4f9b5953cf1df37157e3f6eaa61595842608ae7887c6573be120fa56285c0ec0493c789ab9d3fda264697066735822122053ef616d3315fd4ba8ca8cdb1a65f9a5222c9074200088218741e52b7ccbab5564736f6c63430008240033","optimization_enabled":true,"verified_twin_address_hash":null,"is_verified":true,"compiler_settings":{"evmVersion":"osaka","libraries":{"src/v2/StakedUSDat.sol:STRConTradeExecutionLogic":"0x5756699ee0eb8247a334671e2b17228256cc7a47"},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":true,"runs":150},"remappings":[":@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",":erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",":forge-std/=lib/forge-std/src/",":halmos-cheatcodes/=lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/",":openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",":openzeppelin-contracts/=lib/openzeppelin-contracts/",":solady/=lib/solady/src/"]},"optimization_runs":150,"sourcify_repo_url":"https://repo.sourcify.dev/contracts/partial_match/1/0x2b7074CF6681382b70E239063931ebE83C0f4E0A/","decoded_constructor_args":[["0x4Bc9FEC04F0F95e9b42a3EF18F3C96fB57923D2e",{"internalType":"contract IWithdrawalQueueERC721","name":"withdrawalQueue","type":"address"}]],"compiler_version":"0.8.36+commit.8a079791","is_verified_via_verifier_alliance":false,"verified_at":"2026-09-16T18:08:27.298397Z","implementations":[],"proxy_type":null,"external_libraries":[{"name":"src/v2/StakedUSDat.sol:STRConTradeExecutionLogic","address_hash":"0x5756699Ee0EB8247A334671E2b17228256cC7A47"}],"creation_bytecode":"0x60c060405230608052348015610013575f5ffd5b50604051615e46380380615e468339810160408190526100329161014a565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00556001600160a01b03811661007d5760405163f6b2911f60e01b815260040160405180910390fd5b6001600160a01b03811660a052610092610098565b50610177565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156100e85760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146101475780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b5f6020828403121561015a575f5ffd5b81516001600160a01b0381168114610170575f5ffd5b9392505050565b60805160a051615c766101d05f395f8181610768015281816127dd0152818161280701528181613d35015281816142780152818161449801526144d401525f8181613fb701528181613fe001526141180152615c765ff3fe608060405260043610610597575f3560e01c806372a426fb116102db578063c01bc98211610181578063db2a163d116100df578063f515e6f21161008e578063f515e6f2146110da578063f5b541a6146110fa578063fb1bb9de1461111a578063fb3ee5711461113a578063fdeeb28714611159578063fe575a8714611178578063ff6be926146111af575f5ffd5b8063db2a163d14611022578063dd62ed3e14611048578063e1a4521814611067578063e63ab1e91461107c578063ef8b30f71461109c578063f25af13c14610c23578063f3c2e5ed146110bb575f5ffd5b8063d503db751161013b578063d503db7514610688578063d505accf14610f7e578063d547741f14610f9d578063d62b40e614610fbc578063d68002f314610fdb578063d7f9195b14610fef578063d905777e14611003575f5ffd5b8063c01bc98214610ee8578063c4d1bdb814610f07578063c63d75b614610960578063c6e6f59214610f26578063c87d7e8d14610f45578063ce96cb7714610f64575f5ffd5b8063a217fddf11610239578063b3d7f6b9116101e8578063b3d7f6b914610e41578063b460af9414610e60578063b72ef31014610e7f578063ba08765214610e60578063bd662f5814610e9f578063bfb74d7114610ebe578063bfc5726c14610ed3575f5ffd5b8063a217fddf14610d78578063a31d90f614610d8b578063a4cfac1c14610daa578063a9059cbb14610dbf578063ab87982714610dde578063ac07b60b14610df2578063ad3cb1cc14610e11575f5ffd5b80638945257c116102955780638945257c14610cbf5780638a038a5414610cde5780638efab6e114610cfd578063900c886814610d1257806391d1485414610d2657806394bf804d14610d4557806395d89b4114610d64575f5ffd5b806372a426fb14610c045780637ce48d9914610c235780637ecebe0014610c385780638456cb5914610c5757806384b0196e14610c6b57806387eb6f0d14610c92575f5ffd5b8063380994c9116104405780634ef404061161039e57806360dd37d91161034d57806360dd37d914610b265780636439fd7514610b4557806367946b6414610b655780636e31081a14610b865780636e553f6514610ba757806370a0823114610bc6578063710eb26c14610be5575f5ffd5b80634ef4040614610a6d5780634f1ef28614610a8c57806352d1902d14610a9f578063537df3b614610ab35780635737619814610ad25780635bf3cb6c14610af15780635c975abb14610b12575f5ffd5b806344337ea1116103fa57806344337ea11461099e578063485cc955146109bd57806349efe5ae146109dc5780634a1cd8c2146109fb5780634c47fa1014610a1a5780634cdad50614610a395780634d73992b14610a58575f5ffd5b8063380994c9146108ec57806338d52e0f146109195780633e54bacb1461092d5780633f4ba83a1461094c578063402d267d1461096057806340e7e3da1461097f575f5ffd5b80630e73ecef116104f8578063248a9ca3116104a7578063248a9ca31461082d5780632f2ff15d1461084c578063313ce5671461086b578063330a74861461088657806335faa416146108a55780633644e515146108b957806336568abe146108cd575f5ffd5b80630e73ecef1461075a578063141de4de1461078c57806318160ddd146107ac5780631842e1bb146107c05780631b5013c6146107db5780631d9bf381146107fa57806323b872dd1461080e575f5ffd5b806307a2d13a1161055457806307a2d13a146106695780630824e0691461068857806308e4d105146106b057806309596655146106cf578063095ea7b3146106f05780630a28a4771461070f5780630b60091a1461072e575f5ffd5b806301e1d1141461059b57806301ffc9a7146105c2578063054fd355146105f1578063057a087614610612578063059d157b1461062857806306fdde0314610648575b5f5ffd5b3480156105a6575f5ffd5b506105af6111ce565b6040519081526020015b60405180910390f35b3480156105cd575f5ffd5b506105e16105dc3660046150c0565b6112fc565b60405190151581526020016105b9565b3480156105fc575f5ffd5b5061061061060b3660046150f8565b611332565b005b34801561061d575f5ffd5b506105af62093a8081565b348015610633575f5ffd5b506105af5f516020615b015f395f51905f5281565b348015610653575f5ffd5b5061065c611358565b6040516105b99190615157565b348015610674575f5ffd5b506105af610683366004615169565b6113f6565b348015610693575f5ffd5b5061069d6101f481565b60405161ffff90911681526020016105b9565b3480156106bb575f5ffd5b506106106106ca366004615180565b611401565b3480156106da575f5ffd5b50600a5461069d90600160a81b900461ffff1681565b3480156106fb575f5ffd5b506105e161070a3660046151ad565b611425565b34801561071a575f5ffd5b506105af610729366004615169565b505f90565b348015610739575f5ffd5b5060105461074d906001600160a01b031681565b6040516105b991906151d7565b348015610765575f5ffd5b507f000000000000000000000000000000000000000000000000000000000000000061074d565b348015610797575f5ffd5b506105af5f516020615c215f395f51905f5281565b3480156107b7575f5ffd5b506105af61143c565b3480156107cb575f5ffd5b506105af678ac7230489e8000081565b3480156107e6575f5ffd5b506105af6107f5366004615288565b611450565b348015610805575f5ffd5b506105af6114ca565b348015610819575f5ffd5b506105e16108283660046152ef565b61151f565b348015610838575f5ffd5b506105af610847366004615169565b611550565b348015610857575f5ffd5b5061061061086636600461532d565b611570565b348015610876575f5ffd5b50604051601281526020016105b9565b348015610891575f5ffd5b506106106108a0366004615169565b611592565b3480156108b0575f5ffd5b506106106115b2565b3480156108c4575f5ffd5b506105af6115cc565b3480156108d8575f5ffd5b506106106108e736600461532d565b6115da565b3480156108f7575f5ffd5b5061090161708081565b6040516001600160401b0390911681526020016105b9565b348015610924575f5ffd5b5061074d61160d565b348015610938575f5ffd5b5061061061094736600461535b565b61163b565b348015610957575f5ffd5b50610610611823565b34801561096b575f5ffd5b506105af61097a36600461537b565b611845565b34801561098a575f5ffd5b506105af610999366004615288565b6118a6565b3480156109a9575f5ffd5b506106106109b836600461537b565b611916565b3480156109c8575f5ffd5b506106106109d7366004615396565b6119da565b3480156109e7575f5ffd5b506106106109f636600461537b565b611ba3565b348015610a06575f5ffd5b50610610610a153660046153c2565b611bc3565b348015610a25575f5ffd5b506105af610a34366004615408565b612057565b348015610a44575f5ffd5b506105af610a53366004615169565b6120d4565b348015610a63575f5ffd5b506105af600f5481565b348015610a78575f5ffd5b50610610610a8736600461542c565b61210f565b610610610a9a366004615452565b61212f565b348015610aaa575f5ffd5b506105af61214a565b348015610abe575f5ffd5b50610610610acd36600461537b565b612165565b348015610add575f5ffd5b50610610610aec3660046151ad565b6121fd565b348015610afc575f5ffd5b50600a5461069d90600160b81b900461ffff1681565b348015610b1d575f5ffd5b506105e1612437565b348015610b31575f5ffd5b506105af610b403660046154ae565b61244c565b348015610b50575f5ffd5b506105af5f516020615c015f395f51905f5281565b348015610b70575f5ffd5b50610b796124cc565b6040516105b9919061553f565b348015610b91575f5ffd5b5060115461069d90600160a01b900461ffff1681565b348015610bb2575f5ffd5b506105af610bc136600461532d565b61251f565b348015610bd1575f5ffd5b506105af610be036600461537b565b612573565b348015610bf0575f5ffd5b50600a5461074d906001600160a01b031681565b348015610c0f575f5ffd5b50610610610c1e366004615169565b61259c565b348015610c2e575f5ffd5b506105af6101f481565b348015610c43575f5ffd5b506105af610c5236600461537b565b612651565b348015610c62575f5ffd5b5061061061265b565b348015610c76575f5ffd5b50610c7f61267a565b6040516105b99796959493929190615552565b348015610c9d575f5ffd5b50610cb1610cac36600461535b565b61271e565b6040516105b99291906155e8565b348015610cca575f5ffd5b50610610610cd93660046155ff565b612855565b348015610ce9575f5ffd5b50610610610cf83660046155ff565b6129cd565b348015610d08575f5ffd5b506105af600e5481565b348015610d1d575f5ffd5b50610610612a70565b348015610d31575f5ffd5b506105e1610d4036600461532d565b612aa7565b348015610d50575f5ffd5b506105af610d5f36600461532d565b612add565b348015610d6f575f5ffd5b5061065c612b29565b348015610d83575f5ffd5b506105af5f81565b348015610d96575f5ffd5b50610610610da5366004615169565b612b45565b348015610db5575f5ffd5b506105af60055481565b348015610dca575f5ffd5b506105e1610dd93660046151ad565b612c4a565b348015610de9575f5ffd5b506105af612c67565b348015610dfd575f5ffd5b50610610610e0c36600461537b565b612c8e565b348015610e1c575f5ffd5b5061065c604051806040016040528060058152602001640352e302e360dc1b81525081565b348015610e4c575f5ffd5b506105af610e5b366004615169565b612cae565b348015610e6b575f5ffd5b506105af610e7a36600461563b565b612cec565b348015610e8a575f5ffd5b506105af5f516020615ae15f395f51905f5281565b348015610eaa575f5ffd5b506105af610eb9366004615408565b612d06565b348015610ec9575f5ffd5b506105af60075481565b348015610ede575f5ffd5b506105af600d5481565b348015610ef3575f5ffd5b506105e1610f0236600461537b565b612d72565b348015610f12575f5ffd5b50610610610f2136600461567a565b612e05565b348015610f31575f5ffd5b506105af610f40366004615169565b612ec8565b348015610f50575f5ffd5b506105af610f5f36600461535b565b612ed3565b348015610f6f575f5ffd5b506105af61072936600461537b565b348015610f89575f5ffd5b50610610610f98366004615698565b612f13565b348015610fa8575f5ffd5b50610610610fb736600461532d565b613068565b348015610fc7575f5ffd5b50600b5461074d906001600160a01b031681565b348015610fe6575f5ffd5b5061069d613084565b348015610ffa575f5ffd5b506106106130c8565b34801561100e575f5ffd5b506105af61101d36600461537b565b613153565b34801561102d575f5ffd5b5060115461090190600160b01b90046001600160401b031681565b348015611053575f5ffd5b506105af611062366004615396565b613184565b348015611072575f5ffd5b506105af61271081565b348015611087575f5ffd5b506105af5f516020615b615f395f51905f5281565b3480156110a7575f5ffd5b506105af6110b6366004615169565b6131be565b3480156110c6575f5ffd5b5060115461074d906001600160a01b031681565b3480156110e5575f5ffd5b506105af5f516020615b815f395f51905f5281565b348015611105575f5ffd5b506105af5f516020615b415f395f51905f5281565b348015611125575f5ffd5b506105af5f516020615b215f395f51905f5281565b348015611145575f5ffd5b5061061061115436600461537b565b6131f9565b348015611164575f5ffd5b506105af6111733660046154ae565b61331c565b348015611183575f5ffd5b506105e161119236600461537b565b6001600160a01b03165f9081526020819052604090205460ff1690565b3480156111ba575f5ffd5b50600c5461074d906001600160a01b031681565b5f5f6111d86114ca565b6111e0613390565b6111ea91906156dd565b9050600c5f9054906101000a90046001600160a01b03166001600160a01b031663f694f1e06040518163ffffffff1660e01b8152600401602060405180830381865afa15801561123c573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061126091906156f0565b600b5f9054906101000a90046001600160a01b03166001600160a01b031663f694f1e06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156112b0573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112d491906156f0565b826007546112e29190615707565b6112ec9190615707565b6112f69190615707565b91505090565b5f6001600160e01b03198216637965db0b60e01b148061132c57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f516020615ae15f395f51905f52611349816133a1565b61135383836133ab565b505050565b60605f61136361345c565b90508060030180546113749061571a565b80601f01602080910402602001604051908101604052809291908181526020018280546113a09061571a565b80156113eb5780601f106113c2576101008083540402835291602001916113eb565b820191905f5260205f20905b8154815290600101906020018083116113ce57829003601f168201915b505050505091505090565b5f61132c825f613480565b5f516020615ae15f395f51905f52611418816133a1565b611421826134be565b5050565b5f33611432818585613543565b5060019392505050565b5f5f61144661345c565b6002015492915050565b5f61145961160d565b6001600160a01b0316639fd5a6cf33308987876040518663ffffffff1660e01b815260040161148c959493929190615752565b5f604051808303815f87803b1580156114a3575f5ffd5b505af19250505080156114b4575060015b506114c0868686612d06565b9695505050505050565b600d545f908082036114dd575f91505090565b600f54600e545f906114ef90426156dd565b9050818110611501575f935050505090565b61151761150e82846156dd565b84846001613550565b935050505090565b5f6115293361359b565b6115328461359b565b61153b8361359b565b6115468484846135c2565b90505b9392505050565b5f9081525f516020615ba15f395f51905f52602052604090206001015490565b61157982611550565b611582816133a1565b61158c83836135e5565b50505050565b5f516020615ae15f395f51905f526115a9816133a1565b6114218261368d565b6115ba6136ec565b6115c2613707565b6115ca6137ab565b565b5f6115d56137be565b905090565b6001600160a01b03811633146116035760405163334bd91960e11b815260040160405180910390fd5b61135382826137c7565b7f0773e532dfede91f04b12a73d3d2acd361424f41f76b4fb79f090161e36b4e00546001600160a01b031690565b6116436136ec565b61164b613840565b5f516020615ae15f395f51905f52611662816133a1565b8261166c81613866565b61167583613886565b600c5f9054906101000a90046001600160a01b03166001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa1580156116c5573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116e991906156f0565b1561170757604051631bb2296560e31b815260040160405180910390fd5b600b54600c54601154604080516346918f4560e11b81529051735756699ee0eb8247a334671e2b17228256cc7a47946375bc4d40946001600160a01b039182169490821693911691638d231e8a916004808201926020929091908290030181865afa158015611778573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061179c9190615796565b60115460405160e086901b6001600160e01b03191681526001600160a01b03948516600482015292841660248401529216604482015260648101889052600160a01b90910461ffff16608482015260a4015f6040518083038186803b158015611803575f5ffd5b505af4158015611815573d5f5f3e3d5ffd5b5050505050506114216137ab565b5f516020615b215f395f51905f5261183a816133a1565b6118426138a7565b50565b5f61184f82612d72565b8061185d575061185d612437565b806118805750600261186d6124cc565b600281111561187e5761187e61550f565b145b1561188c57505f919050565b6118946138f5565b61189e575f61132c565b5f1992915050565b5f6118af61160d565b6001600160a01b0316639fd5a6cf33308787876040518663ffffffff1660e01b81526004016118e2959493929190615752565b5f604051808303815f87803b1580156118f9575f5ffd5b505af192505050801561190a575060015b506114c0868686612057565b5f516020615b815f395f51905f5261192d816133a1565b6119375f83612aa7565b156119555760405163155236e160e21b815260040160405180910390fd5b6001600160a01b0382165f9081526020819052604090205460ff161561198e57604051631f7b776b60e01b815260040160405180910390fd5b6001600160a01b0382165f81815260208190526040808220805460ff19166001179055517fffa4e6181777692565cf28528fc88fd1516ea86b56da075235fa575af6a4b8559190a25050565b5f6119e3613961565b805490915060ff600160401b82041615906001600160401b03165f81158015611a095750825b90505f826001600160401b03166001148015611a245750303b155b905081158015611a32575080155b15611a505760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315611a7a57845460ff60401b1916600160401b1785555b6001600160a01b03871615801590611a9a57506001600160a01b03861615155b611ab75760405163f6b2911f60e01b815260040160405180910390fd5b611abf613989565b611ac7613989565b611b136040518060400160405280600c81526020016b14dd185ad959081554d1185d60a21b815250604051806040016040528060068152602001651cd554d1185d60d21b815250613991565b611b406040518060400160405280600c81526020016b14dd185ad959081554d1185d60a21b8152506139a3565b611b49866139ce565b611b535f886135e5565b508315611b9a57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050565b5f516020615ae15f395f51905f52611bba816133a1565b611421826139df565b5f611bcd816133a1565b60025f611bd8613961565b8054909150600160401b900460ff1680611bff575080546001600160401b03808416911610155b15611c1d5760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155611c4785613a39565b611c54602086018661537b565b60085460015460025460035460095460405163d68fce0360e01b8152600481019590955260248501939093526044840191909152606483015260848201526001600160a01b03919091169063d68fce039060a4015f604051808303815f87803b158015611cbf575f5ffd5b505af1158015611cd1573d5f5f3e3d5ffd5b50611ce392505050602086018661537b565b600b80546001600160a01b0319166001600160a01b0392909216919091179055611d13604086016020870161537b565b600c80546001600160a01b0319166001600160a01b0392909216919091179055611d43606086016040870161537b565b601180546001600160a01b0319166001600160a01b0392909216919091179055611d7b611d7660a087016080880161537b565b613ce3565b611d93611d8e608087016060880161537b565b6139df565b611dbc611da660e0870160c08801615180565b611db7610100880160e08901615180565b6133ab565b611dda611dd161012087016101008801615180565b61ffff1661368d565b611df4611def61016087016101408801615180565b6134be565b6203f480600f55600a805460ff60a01b1916600160a01b1790556011805467ffffffffffffffff60b01b19169055611e32606086016040870161537b565b6001600160a01b031663a798f5da611e5060c0880160a0890161537b565b611e6261014089016101208a01615180565b611e746101808a016101608b016157b1565b611e866101a08b016101808c016157b1565b6040516001600160e01b031960e087901b1681526001600160a01b03909416600485015261ffff90921660248401526001600160801b0390811660448401521660648201526084015f604051808303815f87803b158015611ee5575f5ffd5b505af1158015611ef7573d5f5f3e3d5ffd5b50611f2192505f516020615ae15f395f51905f529150611f1c9050602087018761537b565b613ddf565b611f425f516020615b015f395f51905f52611f1c604087016020880161537b565b611f635f516020615b415f395f51905f52611f1c606087016040880161537b565b611f845f516020615c215f395f51905f52611f1c608087016060880161537b565b611fa55f516020615b815f395f51905f52611f1c60a087016080880161537b565b611fc65f516020615c015f395f51905f52611f1c60c0870160a0880161537b565b611fe75f516020615b615f395f51905f52611f1c60e0870160c0880161537b565b6120095f516020615b215f395f51905f52611f1c610100870160e0880161537b565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b5f5f61206284611845565b9050808511156120945783858260405163284ff66760e01b815260040161208b939291906157d7565b60405180910390fd5b61209d85612cae565b9150828211156120c057604051638199f5f360e01b815260040160405180910390fd5b6120cc33858488613e10565b509392505050565b5f61132c826120e16111ce565b6120ec906001615707565b6120f8600c600a6158db565b61210061143c565b61210a9190615707565b613e7b565b5f516020615b015f395f51905f52612126816133a1565b61142182613eb2565b612137613fac565b61214082614050565b611421828261405a565b5f61215361410d565b505f516020615ac15f395f51905f5290565b5f516020615b815f395f51905f5261217c816133a1565b6001600160a01b0382165f9081526020819052604090205460ff166121b45760405163100c679760e21b815260040160405180910390fd5b6001600160a01b0382165f81815260208190526040808220805460ff19169055517f117e3210bb9aa7d9baff172026820255c6f6c30ba8999d1c2fd88e2848137c4e9190a25050565b6122056136ec565b5f516020615c015f395f51905f5261221c816133a1565b600a546001600160a01b031661223181614156565b5f61223a61160d565b6001600160a01b0316856001600160a01b03160361226a5761225a613390565b6007546122679190615707565b90505b600c54604080516338d52e0f60e01b815290516001600160a01b039092169182916338d52e0f9160048083019260209291908290030181865afa1580156122b3573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122d79190615796565b6001600160a01b0316866001600160a01b03160361235c57806001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa15801561232b573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061234f91906156f0565b6123599083615707565b91505b6040516370a0823160e01b81525f906001600160a01b038816906370a082319061238a9030906004016151d7565b602060405180830381865afa1580156123a5573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906123c991906156f0565b9050828110156123ec576040516309a02c0b60e31b815260040160405180910390fd5b6123f683826156dd565b861115612416576040516309a02c0b60e31b815260040160405180910390fd5b61242a6001600160a01b0388168588614186565b50505050506114216137ab565b5f516020615bc15f395f51905f525460ff1690565b5f61245561160d565b6001600160a01b031663d505accf333089898989896040518863ffffffff1660e01b815260040161248c97969594939291906158e9565b5f604051808303815f87803b1580156124a3575f5ffd5b505af19250505080156124b4575060015b506124c0888888612057565b98975050505050505050565b600a545f90600160a01b900460ff16818160028111156124ee576124ee61550f565b14801561250d5750601154600160b01b90046001600160401b03164210155b1561251a57600191505090565b919050565b5f5f61252a83611845565b90508084111561255357828482604051633c8097d960e11b815260040161208b939291906157d7565b5f61255d856131be565b905061256b33858784613e10565b949350505050565b5f5f61257d61345c565b6001600160a01b039093165f9081526020939093525050604090205490565b5f516020615ae15f395f51905f526125b3816133a1565b81158015906125c5575062093a808211155b6125e25760405163ca6075df60e01b815260040160405180910390fd5b6125ea613707565b600d541561260a57604051628099ef60e11b815260040160405180910390fd5b600f80549083905560408051828152602081018590527f5c9e8d09b7d6af206b2e5033f0e2a1b2c4cfc32f80bc5df5bddc5dc97b24236791015b60405180910390a1505050565b5f61132c826141b2565b5f516020615b615f395f51905f52612672816133a1565b6118426141da565b5f6060805f5f5f60605f61268c614222565b80549091501580156126a057506001810154155b6126e45760405162461bcd60e51b81526020600482015260156024820152741152540dcc4c8e88155b9a5b9a5d1a585b1a5e9959605a1b604482015260640161208b565b6126ec614246565b6126f4614262565b604080515f80825260208201909252600f60f81b9c939b5091995046985030975095509350915050565b5f5f6127286136ec565b61273061426d565b612738613840565b6127406142b6565b8361274a81613866565b60015c5f81900361276e5760405163a40d413560e01b815260040160405180910390fd5b61277a865f5c83613e7b565b92505f61279184670de0b6b3a7640000895f613550565b9050858110156127a95760015f945094505050612845565b8360075410156127c15760025f945094505050612845565b8360075f8282546127d291906156dd565b9091555061280290507f0000000000000000000000000000000000000000000000000000000000000000886142ef565b61283f7f00000000000000000000000000000000000000000000000000000000000000008561282f61160d565b6001600160a01b03169190614186565b5f945050505b5061284e6137ab565b9250929050565b61285d6136ec565b612865613840565b61286d6142b6565b5f516020615b415f395f51905f52612884816133a1565b8461288e81613866565b8461289881613866565b6128a184613886565b6128a9613707565b8660075410156128cc57604051631e9acf1760e31b815260040160405180910390fd5b6128d46111ce565b508660075f8282546128e691906156dd565b9091555050601154735756699ee0eb8247a334671e2b17228256cc7a47906370a3daa8906001600160a01b031661291b61160d565b600c546007546001600160a01b03909116908a908d908d9061293b613390565b6040516001600160e01b031960e08b901b1681526001600160a01b03988916600482015296881660248801529487166044870152959092166064850152608484015260a483015260c482019290925260e4810191909152610104015f6040518083038186803b1580156129ac575f5ffd5b505af41580156129be573d5f5f3e3d5ffd5b5050505050505061158c6137ab565b6129d56136ec565b6129dd613840565b6129e56142b6565b5f516020615b415f395f51905f526129fc816133a1565b84612a0681613866565b84612a1081613866565b612a1984613886565b612a21613707565b612a296111ce565b508560075f828254612a3b9190615707565b9091555050601154735756699ee0eb8247a334671e2b17228256cc7a4790639c3ac3d4906001600160a01b031661291b61160d565b612a7861426d565b60015c5f03612a9a5760405163a40d413560e01b815260040160405180910390fd5b5f8060015d505f80805d50565b5f9182525f516020615ba15f395f51905f52602090815260408084206001600160a01b0393909316845291905290205460ff1690565b5f5f612ae883611845565b905080841115612b115782848260405163284ff66760e01b815260040161208b939291906157d7565b5f612b1b85612cae565b905061256b33858388613e10565b60605f612b3461345c565b90508060040180546113749061571a565b612b4d6136ec565b612b55613840565b5f516020615c215f395f51905f52612b6c816133a1565b81612b7681613866565b612b7e613707565b600d5415612b9e57604051628099ef60e11b815260040160405180910390fd5b5f612bb5612baa6111ce565b6101f4612710614323565b905080841115612bd857604051630421448360e51b815260040160405180910390fd5b601054612c03906001600160a01b03163086612bf261160d565b6001600160a01b03169291906143d3565b600d84905542600e556040518481527f3e871955049170cfec2229578a11c86676c6ea7547700b98095644d1e301ba449060200160405180910390a15050506118426137ab565b5f612c543361359b565b612c5d8361359b565b6115498383614400565b5f80612c716124cc565b6002811115612c8257612c8261550f565b14610729575060055490565b5f516020615ae15f395f51905f52612ca5816133a1565b61142182613ce3565b5f5f612cb98361440d565b90505f612cc4612c67565b9050805f03612cd4575092915050565b61256b82612710612ce584826156dd565b6001613550565b5f604051637a851da960e11b815260040160405180910390fd5b5f5f612d1184611845565b905080851115612d3a57838582604051633c8097d960e11b815260040161208b939291906157d7565b612d43856131be565b915082821015612d6657604051638199f5f360e01b815260040160405180910390fd5b6120cc33858785613e10565b6001600160a01b0381165f9081526020819052604081205460ff168061132c5750612d9b61160d565b6001600160a01b031663e5839836836040518263ffffffff1660e01b8152600401612dc691906151d7565b602060405180830381865afa158015612de1573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061132c919061592a565b5f516020615b015f395f51905f52612e1c816133a1565b5f826002811115612e2f57612e2f61550f565b03612e4d576040516383985a1760e01b815260040160405180910390fd5b5f612e566124cc565b600a8054919250849160ff60a01b1916600160a01b836002811115612e7d57612e7d61550f565b02179055506011805467ffffffffffffffff60b01b191690556040517f9f5728021e7b2aff3b2dc83ece046994fcdc91a11d7f233f9e81796fbc618e87906126449083908690615949565b5f61132c825f614419565b5f5f612ede33613153565b905080841115612f0757338482604051632e52afbb60e21b815260040161208b939291906157d7565b61256b3333868661444e565b83421115612f375760405163313c898160e11b81526004810185905260240161208b565b5f7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888612fa18c6001600160a01b03165f9081527f5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb006020526040902080546001810190915590565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090505f612ffb82614557565b90505f61300a82878787614583565b9050896001600160a01b0316816001600160a01b031614613051576040516325c0072360e11b81526001600160a01b0380831660048301528b16602482015260440161208b565b61305c8a8a8a613543565b50505050505050505050565b61307182611550565b61307a816133a1565b61158c83836137c7565b5f8061308e6124cc565b600281111561309f5761309f61550f565b146130b65750600a54600160b81b900461ffff1690565b50600a54600160a81b900461ffff1690565b6130d06136ec565b6130d861426d565b6130e0613840565b6130e86142b6565b60015c156131095760405163a40d413560e01b815260040160405180910390fd5b613111613707565b6131196111ce565b613124906001615707565b805f5d50613134600c600a6158db565b61313c61143c565b6131469190615707565b8060015d506115ca6137ab565b5f61315d82612d72565b8061316b575061316b612437565b61317d5761317882612573565b61132c565b5f92915050565b5f5f61318e61345c565b6001600160a01b039485165f90815260019190910160209081526040808320959096168252939093525050205490565b5f5f6131c8612c67565b9050805f036131da5761154983612ec8565b5f6131ea84836127106001613550565b905061256b610f4082866156dd565b6132016136ec565b5f516020615c015f395f51905f52613218816133a1565b5f613221612437565b90508015613231576132316138a7565b6001600160a01b0383165f9081526020819052604090205460ff166132695760405163100c679760e21b815260040160405180910390fd5b5f61327384612573565b90505f811161329557604051631f2a200560e01b815260040160405180910390fd5b600a546001600160a01b03166132aa81614156565b6132b58582846145af565b806001600160a01b0316856001600160a01b03167f0eaaadac87f199d46d8127736588b675533df9cfc4aee1f85c448ff39fc01c81846040516132fa91815260200190565b60405180910390a350508015613312576133126141da565b50506118426137ab565b5f61332561160d565b6001600160a01b031663d505accf33308b898989896040518863ffffffff1660e01b815260040161335c97969594939291906158e9565b5f604051808303815f87803b158015613373575f5ffd5b505af1925050508015613384575060015b506124c0888888612d06565b5f601254600d546115d591906156dd565b611842813361460c565b8061ffff168261ffff16111580156133c957506101f461ffff821611155b6133e6576040516358d620b360e01b815260040160405180910390fd5b600a805463ffffffff60a81b1916600160a81b61ffff85811691820261ffff60b81b191692909217600160b81b928516928302179092556040805192835260208301919091527f07137cf02072df7b99506ba2317b2a6f7da27ee72df69888f11c9a3970dd175c91015b60405180910390a15050565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0090565b5f61154961348c6111ce565b613497906001615707565b6134a3600c600a6158db565b6134ab61143c565b6134b59190615707565b85919085613550565b6101f461ffff821611156134e557604051633c13b88160e21b815260040160405180910390fd5b6011805461ffff838116600160a01b81810261ffff60a01b1985161790945560408051949093049091168084526020840191909152917f326ac452d742e6bc9f081a44f27d8dd2ef95559c177b3ad06ee4bf095c3fda629101613450565b6113538383836001614645565b5f61357d61355d83614726565b801561357857505f84806135735761357361596f565b868809115b151590565b613588868686614323565b6135929190615707565b95945050505050565b6135a481612d72565b1561184257604051631f7b776b60e01b815260040160405180910390fd5b5f336135cf858285614752565b6135da8585856145af565b506001949350505050565b5f5f516020615ba15f395f51905f526135fe8484612aa7565b61367d575f848152602082815260408083206001600160a01b03871684529091529020805460ff191660011790556136333390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4600191505061132c565b5f91505061132c565b5092915050565b6101f48111156136b0576040516358d620b360e01b815260040160405180910390fd5b60058190556040518181527f206dd15151fcc83315419fbe53a71fcf9c09da803767d3dd05f7874e1b9bf645906020015b60405180910390a150565b6136f461479d565b60025f516020615be15f395f51905f5255565b600d545f8190036137155750565b5f61371e6114ca565b90505f61372b82846156dd565b90505f6012548261373c91906156dd565b9050801561379557816012819055508060075f82825461375c9190615707565b90915550506040518181527f130c3c7016d3de04cc3b470a5035d0a485a4529fbc747ec705b2806468d394869060200160405180910390a15b825f0361158c575f600d81905560125550505050565b60015f516020615be15f395f51905f5255565b5f6115d56147cc565b5f5f516020615ba15f395f51905f526137e08484612aa7565b1561367d575f848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a4600191505061132c565b613848612437565b156115ca5760405163d93c066560e01b815260040160405180910390fd5b805f0361184257604051631f2a200560e01b815260040160405180910390fd5b8042111561184257604051631ab7da6b60e01b815260040160405180910390fd5b6138af61483f565b5f516020615bc15f395f51905f52805460ff191681557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516136e191906151d7565b5f306001600160a01b03166301e1d1146040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015613950575060408051601f3d908101601f1916820190925261394d918101906156f0565b60015b61395957505f90565b600191505090565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0061132c565b6115ca614864565b613999614864565b6114218282614889565b6139ab614864565b61184281604051806040016040528060018152602001603160f81b8152506148b9565b6139d6614864565b611842816148f8565b6139e881614156565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f184a649b6ce5186087e0a99b53f247181d516649f7d60e3de2b537271250b395905f90a35050565b30613a47602083018361537b565b6001600160a01b031663411557d16040518163ffffffff1660e01b8152600401602060405180830381865afa158015613a82573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613aa69190615796565b6001600160a01b0316148015613b32575030613ac8604083016020840161537b565b6001600160a01b031663411557d16040518163ffffffff1660e01b8152600401602060405180830381865afa158015613b03573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613b279190615796565b6001600160a01b0316145b8015613baa5750613b49604082016020830161537b565b6001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa158015613b84573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613ba891906156f0565b155b8015613c2c575030613bc2606083016040840161537b565b6001600160a01b031663411557d16040518163ffffffff1660e01b8152600401602060405180830381865afa158015613bfd573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613c219190615796565b6001600160a01b0316145b8015613cc65750613c43604082016020830161537b565b6001600160a01b0316613c5c606083016040840161537b565b6001600160a01b031663625441346040518163ffffffff1660e01b8152600401602060405180830381865afa158015613c97573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613cbb9190615796565b6001600160a01b0316145b61184257604051631bb2296560e31b815260040160405180910390fd5b6001600160a01b038116613d0a5760405163f6b2911f60e01b815260040160405180910390fd5b306001600160a01b03821603613d335760405163714b26e760e11b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b031603613d855760405163714b26e760e11b815260040160405180910390fd5b613d8e8161359b565b601080546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f767af25527844d2331ddf57457ba4174d6a3b26aa4c362d4d791ca3faf0e9e63905f90a35050565b6001600160a01b038116613e065760405163f6b2911f60e01b815260040160405180910390fd5b61135382826135e5565b613e186136ec565b613e206142b6565b81613e2a81613866565b81613e3481613866565b613e3d8661359b565b613e468561359b565b613e4e613707565b8360075f828254613e5f9190615707565b90915550613e7190508686868661497b565b505061158c6137ab565b5f5f613e898585855f613550565b90505f613ea682613e98613084565b61ffff166127106001613550565b90506114c081836156dd565b806001600160401b031642108015613ede5750613ed161708042615707565b816001600160401b031611155b613efb576040516383985a1760e01b815260040160405180910390fd5b5f613f046124cc565b600a805460ff60a01b191690556011805467ffffffffffffffff60b01b1916600160b01b6001600160401b038616021790556040519091507f9f5728021e7b2aff3b2dc83ece046994fcdc91a11d7f233f9e81796fbc618e8790613f6b9083905f90615949565b60405180910390a16040516001600160401b03831681527f542dda9ba5ea2e8acb6236921bf765f58edb87c0151e07bd8cf153d268488f8290602001613450565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061403257507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166140265f516020615ac15f395f51905f52546001600160a01b031690565b6001600160a01b031614155b156115ca5760405163703e46dd60e11b815260040160405180910390fd5b5f611421816133a1565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156140b4575060408051601f3d908101601f191682019092526140b1918101906156f0565b60015b6140d35781604051634c9c8ce360e01b815260040161208b91906151d7565b5f516020615ac15f395f51905f52811461410357604051632a87526960e21b81526004810182905260240161208b565b61135383836149f4565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146115ca5760405163703e46dd60e11b815260040160405180910390fd5b6001600160a01b03811661417d5760405163f6b2911f60e01b815260040160405180910390fd5b6118428161359b565b6141938383836001614a49565b6113535782604051635274afe760e01b815260040161208b91906151d7565b5f807f5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb0061257d565b6141e2613840565b5f516020615bc15f395f51905f52805460ff191660011781557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258336138e8565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10090565b60605f614251614222565b90508060020180546113749061571a565b60605f611363614222565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146115ca57604051637a851da960e11b815260040160405180910390fd5b60026142c06124cc565b60028111156142d1576142d161550f565b036115ca5760405163206719c160e21b815260040160405180910390fd5b6001600160a01b038216614318575f604051634b637e8f60e11b815260040161208b91906151d7565b611421825f83614aab565b5f5f5f6143308686614abe565b91509150815f036143545783818161434a5761434a61596f565b0492505050611549565b81841161436b5761436b6003851502601118614ada565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b6143e1848484846001614aeb565b61158c5783604051635274afe760e01b815260040161208b91906151d7565b5f336114328185856145af565b5f61132c826001613480565b5f611549614429600c600a6158db565b61443161143c565b61443b9190615707565b6144436111ce565b6134b5906001615707565b5f6144576136ec565b6144608561359b565b6144698461359b565b678ac7230489e8000083101561449257604051631e93015360e21b815260040160405180910390fd5b6144bd847f0000000000000000000000000000000000000000000000000000000000000000856145af565b604051632a6de10f60e11b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906354dbc21e9061450d908790879087906004016157d7565b6020604051808303815f875af1158015614529573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061454d91906156f0565b905061256b6137ab565b5f61132c6145636137be565b8360405161190160f01b8152600281019290925260228201526042902090565b5f5f5f5f61459388888888614b58565b9250925092506145a38282614c16565b50909695505050505050565b6001600160a01b0383166145d8575f604051634b637e8f60e11b815260040161208b91906151d7565b6001600160a01b038216614601575f60405163ec442f0560e01b815260040161208b91906151d7565b611353838383614aab565b6146168282612aa7565b6114215760405163e2517d3f60e01b81526001600160a01b03821660048201526024810183905260440161208b565b5f61464e61345c565b90506001600160a01b038516614679575f60405163e602df0560e01b815260040161208b91906151d7565b6001600160a01b0384166146a2575f604051634a1406b160e11b815260040161208b91906151d7565b6001600160a01b038086165f9081526001830160209081526040808320938816835292905220839055811561471f57836001600160a01b0316856001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258560405161471691815260200190565b60405180910390a35b5050505050565b5f600282600381111561473b5761473b61550f565b6147459190615983565b60ff166001149050919050565b5f61475d8484613184565b90505f1981101561158c578181101561478f57828183604051637dc7a0d960e11b815260040161208b939291906157d7565b61158c84848484035f614645565b5f516020615be15f395f51905f52546002036115ca57604051633ee5aeb560e01b815260040160405180910390fd5b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6147f6614cce565b6147fe614d33565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b614847612437565b6115ca57604051638dfc202b60e01b815260040160405180910390fd5b61486c614d72565b6115ca57604051631afcd79f60e31b815260040160405180910390fd5b614891614864565b5f61489a61345c565b9050600381016148aa8482615a06565b506004810161158c8382615a06565b6148c1614864565b5f6148ca614222565b9050600281016148da8482615a06565b50600381016148e98382615a06565b505f8082556001909101555050565b614900614864565b7f0773e532dfede91f04b12a73d3d2acd361424f41f76b4fb79f090161e36b4e005f8061492c84614d8b565b915091508161493c57601261493e565b805b83546001600160a81b031916600160a01b60ff92909216919091026001600160a01b031916176001600160a01b0394909416939093179091555050565b61498e61498661160d565b8530856143d3565b6149988382614e16565b826001600160a01b0316846001600160a01b03167fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d784846040516149e6929190918252602082015260400190565b60405180910390a350505050565b6149fd82614e4a565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a2805115614a41576113538282614ea4565b611421614f34565b60405163a9059cbb60e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f51148316614a9f578383151615614a93573d5f823e3d81fd5b5f873b113d1516831692505b60405250949350505050565b614ab3613840565b611353838383614f53565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b6040516323b872dd60e01b5f8181526001600160a01b038781166004528616602452604485905291602083606481808c5af1925060015f51148316614b47578383151615614b3b573d5f823e3d81fd5b5f883b113d1516831692505b604052505f60605295945050505050565b5f80806fa2a8918ca85bafe22016d0b997e4df60600160ff1b03841115614b8757505f91506003905082614c0c565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015614bd8573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b038116614c0357505f925060019150829050614c0c565b92505f91508190505b9450945094915050565b5f826003811115614c2957614c2961550f565b03614c32575050565b6001826003811115614c4657614c4661550f565b03614c645760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115614c7857614c7861550f565b03614c995760405163fce698f760e01b81526004810182905260240161208b565b6003826003811115614cad57614cad61550f565b03611421576040516335e2f38360e21b81526004810182905260240161208b565b5f5f614cd8614222565b90505f614ce3614246565b805190915015614cfb57805160209091012092915050565b81548015614d0a579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f5f614d3d614222565b90505f614d48614262565b805190915015614d6057805160209091012092915050565b60018201548015614d0a579392505050565b5f614d7b613961565b54600160401b900460ff16919050565b5f5f5f614d9760405190565b6040805160048152602481019091526020810180516001600160e01b031663313ce56760e01b1790529091505f908190614dd2908790615068565b5091509150614de083604052565b818015614dee575060203d10155b8015614dfb575060ff8111155b614e06575f5f614e0a565b6001815b94509450505050915091565b6001600160a01b038216614e3f575f60405163ec442f0560e01b815260040161208b91906151d7565b6114215f8383614aab565b806001600160a01b03163b5f03614e765780604051634c9c8ce360e01b815260040161208b91906151d7565b5f516020615ac15f395f51905f5280546001600160a01b0319166001600160a01b0392909216919091179055565b60605f614eb18484615089565b9050808015614ed257505f3d1180614ed257505f846001600160a01b03163b115b15614ee757614edf61509c565b91505061132c565b8015614f085783604051639996b31560e01b815260040161208b91906151d7565b3d15614f1b57614f166150b5565b613686565b60405163d6bda27560e01b815260040160405180910390fd5b34156115ca5760405163b398979f60e01b815260040160405180910390fd5b5f614f5c61345c565b90506001600160a01b038416614f8a5781816002015f828254614f7f9190615707565b90915550614fe79050565b6001600160a01b0384165f9081526020829052604090205482811015614fc95784818460405163391434e360e21b815260040161208b939291906157d7565b6001600160a01b0385165f9081526020839052604090209083900390555b6001600160a01b038316615005576002810180548390039055615023565b6001600160a01b0383165f9081526020829052604090208054830190555b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516149e691815260200190565b5f5f5f60405f855160208701885afa92505f51915060205190509250925092565b5f5f5f835160208501865af49392505050565b6040513d81523d5f602083013e3d602001810160405290565b6040513d5f823e3d81fd5b5f602082840312156150d0575f5ffd5b81356001600160e01b031981168114611549575f5ffd5b803561ffff8116811461251a575f5ffd5b5f5f60408385031215615109575f5ffd5b615112836150e7565b9150615120602084016150e7565b90509250929050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6115496020830184615129565b5f60208284031215615179575f5ffd5b5035919050565b5f60208284031215615190575f5ffd5b611549826150e7565b6001600160a01b0381168114611842575f5ffd5b5f5f604083850312156151be575f5ffd5b82356151c981615199565b946020939093013593505050565b6001600160a01b0391909116815260200190565b634e487b7160e01b5f52604160045260245ffd5b5f82601f83011261520e575f5ffd5b81356001600160401b03811115615227576152276151eb565b604051601f8201601f19908116603f011681016001600160401b0381118282101715615255576152556151eb565b60405281815283820160200185101561526c575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f5f5f60a0868803121561529c575f5ffd5b8535945060208601356152ae81615199565b9350604086013592506060860135915060808601356001600160401b038111156152d6575f5ffd5b6152e2888289016151ff565b9150509295509295909350565b5f5f5f60608486031215615301575f5ffd5b833561530c81615199565b9250602084013561531c81615199565b929592945050506040919091013590565b5f5f6040838503121561533e575f5ffd5b82359150602083013561535081615199565b809150509250929050565b5f5f6040838503121561536c575f5ffd5b50508035926020909101359150565b5f6020828403121561538b575f5ffd5b813561154981615199565b5f5f604083850312156153a7575f5ffd5b82356153b281615199565b9150602083013561535081615199565b5f5f8284036102a08112156153d5575f5ffd5b6101a08112156153e3575f5ffd5b83925061010061019f19820112156153f9575f5ffd5b506101a0830190509250929050565b5f5f5f6060848603121561541a575f5ffd5b83359250602084013561531c81615199565b5f6020828403121561543c575f5ffd5b81356001600160401b0381168114611549575f5ffd5b5f5f60408385031215615463575f5ffd5b823561546e81615199565b915060208301356001600160401b03811115615488575f5ffd5b615494858286016151ff565b9150509250929050565b803560ff8116811461251a575f5ffd5b5f5f5f5f5f5f5f60e0888a0312156154c4575f5ffd5b8735965060208801356154d681615199565b955060408801359450606088013593506154f26080890161549e565b9699959850939692959460a0840135945060c09093013592915050565b634e487b7160e01b5f52602160045260245ffd5b6003811061184257634e487b7160e01b5f52602160045260245ffd5b6020810161554c83615523565b91905290565b60ff60f81b8816815260e060208201525f61557060e0830189615129565b82810360408401526155828189615129565b606084018890526001600160a01b038716608085015260a0840186905283810360c0850152845180825260208087019350909101905f5b818110156155d75783518352602093840193909201916001016155b9565b50909b9a5050505050505050505050565b604081016155f584615523565b9281526020015290565b5f5f5f5f60808587031215615612575f5ffd5b8435935060208501359250604085013561562b81615199565b9396929550929360600135925050565b5f5f5f6060848603121561564d575f5ffd5b83359250602084013561565f81615199565b9150604084013561566f81615199565b809150509250925092565b5f6020828403121561568a575f5ffd5b813560038110611549575f5ffd5b5f5f5f5f5f5f5f60e0888a0312156156ae575f5ffd5b87356156b981615199565b965060208801356154d681615199565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561132c5761132c6156c9565b5f60208284031215615700575f5ffd5b5051919050565b8082018082111561132c5761132c6156c9565b600181811c9082168061572e57607f821691505b60208210810361574c57634e487b7160e01b5f52602260045260245ffd5b50919050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190525f9061578b90830184615129565b979650505050505050565b5f602082840312156157a6575f5ffd5b815161154981615199565b5f602082840312156157c1575f5ffd5b81356001600160801b0381168114611549575f5ffd5b6001600160a01b039390931683526020830191909152604082015260600190565b6001815b600184111561583357808504811115615817576158176156c9565b600184161561582557908102905b60019390931c9280026157fc565b935093915050565b5f826158495750600161132c565b8161585557505f61132c565b816001811461586b576002811461587557615891565b600191505061132c565b60ff841115615886576158866156c9565b50506001821b61132c565b5060208310610133831016604e8410600b84101617156158b4575081810a61132c565b6158c05f1984846157f8565b805f19048211156158d3576158d36156c9565b029392505050565b5f61154960ff84168361583b565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b5f6020828403121561593a575f5ffd5b81518015158114611549575f5ffd5b6040810161595684615523565b83825261596283615523565b8260208301529392505050565b634e487b7160e01b5f52601260045260245ffd5b5f60ff8316806159a157634e487b7160e01b5f52601260045260245ffd5b8060ff84160691505092915050565b601f821115611353578282111561135357805f5260205f20601f840160051c60208510156159db57505f5b90810190601f840160051c035f5b818110156159fe575f838201556001016159e9565b505050505050565b81516001600160401b03811115615a1f57615a1f6151eb565b615a3381615a2d845461571a565b846159b0565b6020601f821160018114615a65575f8315615a4e5750848201515b5f19600385901b1c1916600184901b17845561471f565b5f84815260208120601f198516915b82811015615a945787850151825560209485019460019092019101615a74565b5084821015615ab157868401515f19600387901b60f8161c191681555b50505050600190811b0190555056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbcf7e61c4e74c42df4eeae815b78ea28052584091f2e136a00ad566b99fd70583907d5ff2aa980bd4c78f5b3550ab2aae44afd67f1ad4aa2be4346a144fb2c1745427da25fe773164f88948d3e215c94b6554e2ed5e5f203a821c9f2f6131cf75a97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92965d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a98db8a220cd0f09badce9f22d0ba7e93edb3d404448cc3560d391ab096ad16e902dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800cd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033009b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00973ef39d76cc2c6090feab1c030bec6ab5db557f64df047a4c4f9b5953cf1df37157e3f6eaa61595842608ae7887c6573be120fa56285c0ec0493c789ab9d3fda264697066735822122053ef616d3315fd4ba8ca8cdb1a65f9a5222c9074200088218741e52b7ccbab5564736f6c634300082400330000000000000000000000004bc9fec04f0f95e9b42a3ef18f3c96fb57923d2e","name":"StakedUSDat","is_blueprint":false,"license_type":"none","is_fully_verified":false,"is_verified_via_eth_bytecode_db":true,"language":"solidity","evm_version":"osaka","can_be_visualized_via_sol2uml":true,"is_verified_via_sourcify":true,"additional_sources":[{"file_path":"lib/openzeppelin-contracts/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":"src/v2/interfaces/IWithdrawalQueueERC721.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity 0.8.36;\n\n/**\n * @title IWithdrawalQueueERC721\n * @author Saturn\n * @notice Interface for the WithdrawalQueueERC721 contract.\n * @dev A UUPS upgradeable NFT-based withdrawal queue where each withdrawal request\n * is represented as an ERC721 token. Users request redemptions from StakedUSDat,\n * their shares are escrowed, and they receive an NFT representing their claim.\n * The queue is a limit-order book against the vault-calculated net redemption\n * price: the operator processes complete requests against the vault's cash buffer\n * using one vault snapshot per processing batch. The queue never prices; its\n * settlement coupling is redeemQueuedShares.\n */\ninterface IWithdrawalQueueERC721 {\n    // ============ Enums ============\n\n    /**\n     * @notice Persistent request lifecycle status.\n     * @dev Existing v1 values retain their numeric meaning. InProgress remains only\n     * for storage compatibility; v2 never creates it. Cancelled is appended.\n     */\n    enum RequestStatus {\n        NULL,\n        Requested,\n        InProgress,\n        Processed,\n        Claimed,\n        Cancelled\n    }\n\n    // ============ Structs ============\n\n    /**\n     * @notice Withdrawal request data structure.\n     * @dev Field order is unchanged from v1. minSharePrice reinterprets the\n     * minUsdatReceived slot without converting legacy values. Lifecycle\n     * authorization uses status rather than deriving state from numeric fields.\n     * @param shares The complete escrowed share amount, retained unchanged.\n     * @param usdatOwed Zero until processing assigns the complete fixed payout.\n     * @param timestamp The timestamp when the request was created.\n     * @param minSharePrice Limit: minimum net USDat payout per 1e18 shares after\n     * the active redemption fee (v1 slot, was minUsdatReceived — legacy values\n     * are reinterpreted unchanged).\n     * @param status Authoritative request lifecycle state.\n     */\n    struct Request {\n        uint256 shares;\n        uint256 usdatOwed;\n        uint256 timestamp;\n        uint256 minSharePrice;\n        RequestStatus status;\n    }\n\n    // ============ Errors ============\n\n    /**\n     * @dev Thrown when a zero amount is provided where a non-zero value is required.\n     */\n    error ZeroAmount();\n\n    /**\n     * @dev Thrown when the caller is not allowed to perform the operation.\n     */\n    error OperationNotAllowed();\n\n    /**\n     * @dev Thrown when an operation requires a Requested request.\n     */\n    error RequestNotOpen();\n\n    /**\n     * @dev Thrown when legacy recovery is attempted for a request that is not InProgress.\n     */\n    error RequestNotInProgress();\n\n    /**\n     * @dev Thrown when an operation requires a Processed request.\n     */\n    error RequestNotProcessed();\n\n    /**\n     * @dev Thrown when the caller is not the owner of the token.\n     */\n    error NotOwner();\n\n    /**\n     * @dev Thrown when an operation requires a blacklisted address but the address is not blacklisted.\n     */\n    error NotBlacklisted();\n\n    /**\n     * @dev Thrown when an operation involves a blacklisted address.\n     */\n    error AddressBlacklisted();\n\n    // ============ Events ============\n\n    /**\n     * @dev Emitted when a new withdrawal request is created.\n     * @param tokenId The NFT token ID representing the request.\n     * @param user The user who created the request.\n     * @param shares The number of shares escrowed.\n     * @param timestamp The timestamp of the request.\n     */\n    event WithdrawalRequested(uint256 indexed tokenId, address indexed user, uint256 shares, uint256 timestamp);\n\n    /**\n     * @dev Emitted once when a complete request settles.\n     * @param tokenId The NFT token ID of the settled request.\n     * @param shares The complete number of shares redeemed.\n     * @param usdatAmount The request's complete net USDat payout.\n     */\n    event WithdrawalProcessed(uint256 indexed tokenId, uint256 shares, uint256 usdatAmount);\n\n    /**\n     * @dev Emitted when a holder updates a request's limit price.\n     * @param tokenId The NFT token ID of the updated request.\n     * @param newMinSharePrice The new minimum net USDat payout per 1e18 shares.\n     */\n    event MinSharePriceUpdated(uint256 indexed tokenId, uint256 newMinSharePrice);\n\n    /**\n     * @dev Emitted when a holder claims a processed request's complete fixed payout.\n     * @param tokenId The NFT token ID that was claimed.\n     * @param user The user who claimed.\n     * @param usdatAmount The amount of USDat claimed.\n     */\n    event Claimed(uint256 indexed tokenId, address indexed user, uint256 usdatAmount);\n\n    /**\n     * @dev Emitted when a holder cancels an open request.\n     * @param tokenId The NFT token ID that was cancelled.\n     * @param user The holder who received the returned shares.\n     * @param shares The complete escrowed sUSDat amount returned.\n     */\n    event RequestCancelled(uint256 indexed tokenId, address indexed user, uint256 shares);\n\n    /**\n     * @dev Emitted when a legacy InProgress request is returned to Requested.\n     * @param tokenId The request ID reset by the admin.\n     */\n    event LegacyInProgressRequestReset(uint256 indexed tokenId);\n\n    /**\n     * @dev Emitted when a processed request's complete payout is seized.\n     * @param tokenId The NFT token ID of the seized request.\n     * @param user The restricted user whose funds were seized.\n     * @param usdatAmount The amount of USDat seized.\n     * @param to The address that received the seized funds.\n     */\n    event FundsSeized(uint256 indexed tokenId, address indexed user, uint256 usdatAmount, address indexed to);\n\n    /**\n     * @dev Emitted when a live request is seized from a blacklisted user.\n     * @param tokenId The NFT token ID of the seized request.\n     * @param user The restricted user whose request was seized.\n     * @param to The address that received the NFT.\n     */\n    event RequestSeized(uint256 indexed tokenId, address indexed user, address indexed to);\n\n    // ============ Admin Functions ============\n\n    /**\n     * @notice Pauses the contract.\n     * @dev Only callable by addresses with the PAUSER_ROLE.\n     */\n    function pause() external;\n\n    /**\n     * @notice Unpauses the contract.\n     * @dev Only callable by addresses with the UNPAUSER_ROLE.\n     */\n    function unpause() external;\n\n    /**\n     * @notice Returns a legacy InProgress request to the Requested state.\n     * @dev Only callable by OPERATOR_ROLE, including while paused. The request\n     * must currently be InProgress.\n     * @param tokenId Legacy request ID to reset.\n     */\n    function resetLegacyInProgressRequest(uint256 tokenId) external;\n\n    // ============ Request Creation ============\n\n    /**\n     * @notice Creates a new withdrawal request.\n     * @dev Called by StakedUSDat when a user requests redemption.\n     * Mints an NFT to the user representing their withdrawal request.\n     * Only callable by the StakedUSDat contract (immutable address check).\n     * Reverts if the user is restricted by either sUSDat or USDat.\n     * @param user The user requesting withdrawal.\n     * @param shares The amount of sUSDat shares escrowed.\n     * @param minSharePrice The minimum net USDat payout per 1e18 shares after the\n     * active redemption fee.\n     * @return tokenId The NFT token ID (same as request ID).\n     */\n    function addRequest(address user, uint256 shares, uint256 minSharePrice) external returns (uint256 tokenId);\n\n    /**\n     * @notice Updates a request's limit price. Freely updatable while open, in either\n     * direction; applies to the request's future settlement attempt.\n     * @dev Only callable by the NFT owner.\n     * @param tokenId The token ID of the request to update.\n     * @param newMinSharePrice The new minimum net USDat payout per 1e18 shares.\n     */\n    function updateMinSharePrice(uint256 tokenId, uint256 newMinSharePrice) external;\n\n    /**\n     * @notice Cancels an open request and returns all escrowed shares without a fee.\n     * @dev Only the current NFT owner may cancel. The request record is retained with\n     * status Cancelled after the NFT is burned. Queue pause and either owner\n     * restriction block cancellation; vault pause makes the sUSDat return transfer\n     * revert.\n     * @param tokenId The NFT token ID to cancel.\n     */\n    function cancelRequest(uint256 tokenId) external;\n\n    // ============ Processing Functions ============\n\n    /**\n     * @notice Attempts to settle complete withdrawal requests against the vault's cash buffer.\n     * @dev Processing follows caller order at one vault-snapshotted price. Missing and\n     * non-Requested IDs are skipped, including duplicates after settlement. Below-limit\n     * and insufficient-liquidity requests remain unchanged and are also skipped so later\n     * requests may settle. Unexpected vault failures revert the complete batch. Only\n     * callable by addresses with the OPERATOR_ROLE.\n     * @param tokenIds Ordered token IDs to process.\n     */\n    function processRequests(uint256[] calldata tokenIds) external;\n\n    // ============ Claiming Functions ============\n\n    /**\n     * @notice Claims the complete fixed payout of a processed request.\n     * @dev Only the current NFT owner may claim. The request record is retained with\n     * status Claimed after the NFT is burned. Queue pause and either owner restriction\n     * block claiming; vault pause alone does not block an already-funded payout.\n     * @param tokenId The NFT token ID to claim.\n     * @return amount The amount of USDat claimed.\n     */\n    function claim(uint256 tokenId) external returns (uint256 amount);\n\n    // ============ View Functions ============\n\n    /**\n     * @notice Returns every live withdrawal request token currently owned by a user.\n     * @dev Includes requests regardless of lifecycle status. Burned terminal requests\n     * are excluded, and ERC721Enumerable does not guarantee a stable ordering. Runtime\n     * and return size grow linearly with the user's live request balance.\n     * @param user The current request owner to query.\n     * @return tokenIds The token IDs currently owned by the user.\n     */\n    function getUserRequests(address user) external view returns (uint256[] memory tokenIds);\n\n    // ============ Compliance Functions ============\n\n    /**\n     * @notice Seizes a live request NFT from a restricted holder.\n     * @dev Transfers the NFT and its unchanged request record to the current recovery\n     * address configured by StakedUSDat. Only callable by addresses with the\n     * ENFORCER_ROLE.\n     * @param tokenId The token ID to seize.\n     */\n    function seizeRequest(uint256 tokenId) external;\n\n    /**\n     * @notice Seizes a processed request's complete payout from a restricted holder.\n     * @dev Marks the request Claimed, burns the NFT, and transfers the complete fixed\n     * usdatOwed amount to the current recovery address configured by StakedUSDat. The\n     * request record is retained. Only callable by addresses with the ENFORCER_ROLE.\n     * @param tokenId The token ID to seize.\n     */\n    function seize(uint256 tokenId) external;\n}\n"},{"file_path":"src/v2/interfaces/ISTRConExecutionPolicy.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity 0.8.36;\n\nimport {ISTRConModule} from \"./modules/ISTRConModule.sol\";\n\n/**\n * @title ISTRConExecutionPolicy\n * @author Saturn\n * @notice Vault-bound STRCon execution configuration, price validation, and turnover capacity.\n */\ninterface ISTRConExecutionPolicy {\n    error AlreadyInitialized();\n    error ExecutionCapacityExceeded();\n    error ExecutionPriceMismatch();\n    error ExecutionVehicleMismatch();\n    error InvalidExecutionTolerance();\n    error InvalidZeroAddress();\n    error Unauthorized();\n\n    event ExecutionCapacityUpdated(uint128 maximum, uint128 refillPerDay);\n    event ExecutionToleranceUpdated(uint16 oldBps, uint16 newBps);\n    event ExecutionVehicleUpdated(address indexed oldVehicle, address indexed newVehicle);\n\n    function VAULT() external view returns (address);\n    function STRCON_MODULE() external view returns (ISTRConModule);\n    function MAX_EXECUTION_TOLERANCE_BPS() external view returns (uint16);\n\n    function executionVehicle() external view returns (address);\n    function executionToleranceBps() external view returns (uint16);\n\n    function executionCapacity()\n        external\n        view\n        returns (uint128 maximum, uint128 available, uint128 refillPerDay, uint64 lastUpdated);\n\n    function initialize(address vehicle, uint16 toleranceBps, uint128 maximum, uint128 refillPerDay) external;\n    function setExecutionVehicle(address newVehicle) external;\n    function setExecutionTolerance(uint16 newBps) external;\n    function setExecutionCapacity(uint128 newMaximum, uint128 newRefillPerDay) external;\n\n    function validateBuy(uint256 usdatPaid, uint256 assetReceived, address expectedVehicle)\n        external\n        returns (uint256 oraclePrice);\n\n    function validateSell(uint256 assetDelivered, uint256 usdatReceived, address expectedVehicle)\n        external\n        returns (uint256 oraclePrice);\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/interfaces/IERC4626.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC4626.sol)\n\npragma solidity >=0.6.2;\n\nimport {IERC20} from \"../token/ERC20/IERC20.sol\";\nimport {IERC20Metadata} from \"../token/ERC20/extensions/IERC20Metadata.sol\";\n\n/**\n * @dev Interface of the ERC-4626 \"Tokenized Vault Standard\", as defined in\n * https://eips.ethereum.org/EIPS/eip-4626[ERC-4626].\n */\ninterface IERC4626 is IERC20, IERC20Metadata {\n    event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares);\n\n    event Withdraw(\n        address indexed sender,\n        address indexed receiver,\n        address indexed owner,\n        uint256 assets,\n        uint256 shares\n    );\n\n    /**\n     * @dev Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing.\n     *\n     * - MUST be an ERC-20 token contract.\n     * - MUST NOT revert.\n     */\n    function asset() external view returns (address assetTokenAddress);\n\n    /**\n     * @dev Returns the total amount of the underlying asset that is “managed” by Vault.\n     *\n     * - SHOULD include any compounding that occurs from yield.\n     * - MUST be inclusive of any fees that are charged against assets in the Vault.\n     * - MUST NOT revert.\n     */\n    function totalAssets() external view returns (uint256 totalManagedAssets);\n\n    /**\n     * @dev Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal\n     * scenario where all the conditions are met.\n     *\n     * - MUST NOT be inclusive of any fees that are charged against assets in the Vault.\n     * - MUST NOT show any variations depending on the caller.\n     * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.\n     * - MUST NOT revert.\n     *\n     * NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the\n     * “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and\n     * from.\n     */\n    function convertToShares(uint256 assets) external view returns (uint256 shares);\n\n    /**\n     * @dev Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal\n     * scenario where all the conditions are met.\n     *\n     * - MUST NOT be inclusive of any fees that are charged against assets in the Vault.\n     * - MUST NOT show any variations depending on the caller.\n     * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.\n     * - MUST NOT revert.\n     *\n     * NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the\n     * “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and\n     * from.\n     */\n    function convertToAssets(uint256 shares) external view returns (uint256 assets);\n\n    /**\n     * @dev Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver,\n     * through a deposit call.\n     *\n     * - MUST return a limited value if receiver is subject to some deposit limit.\n     * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited.\n     * - MUST NOT revert.\n     */\n    function maxDeposit(address receiver) external view returns (uint256 maxAssets);\n\n    /**\n     * @dev Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given\n     * current on-chain conditions.\n     *\n     * - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit\n     *   call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called\n     *   in the same transaction.\n     * - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the\n     *   deposit would be accepted, regardless if the user has enough tokens approved, etc.\n     * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.\n     * - MUST NOT revert.\n     *\n     * NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in\n     * share price or some other type of condition, meaning the depositor will lose assets by depositing.\n     */\n    function previewDeposit(uint256 assets) external view returns (uint256 shares);\n\n    /**\n     * @dev Deposit `assets` underlying tokens and send the corresponding number of vault shares (`shares`) to `receiver`.\n     *\n     * - MUST emit the Deposit event.\n     * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the\n     *   deposit execution, and are accounted for during deposit.\n     * - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not\n     *   approving enough underlying tokens to the Vault contract, etc).\n     *\n     * NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.\n     */\n    function deposit(uint256 assets, address receiver) external returns (uint256 shares);\n\n    /**\n     * @dev Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call.\n     * - MUST return a limited value if receiver is subject to some mint limit.\n     * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted.\n     * - MUST NOT revert.\n     */\n    function maxMint(address receiver) external view returns (uint256 maxShares);\n\n    /**\n     * @dev Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given\n     * current on-chain conditions.\n     *\n     * - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call\n     *   in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the\n     *   same transaction.\n     * - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint\n     *   would be accepted, regardless if the user has enough tokens approved, etc.\n     * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.\n     * - MUST NOT revert.\n     *\n     * NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in\n     * share price or some other type of condition, meaning the depositor will lose assets by minting.\n     */\n    function previewMint(uint256 shares) external view returns (uint256 assets);\n\n    /**\n     * @dev Mints exactly `shares` vault shares to `receiver` in exchange for `assets` underlying tokens.\n     *\n     * - MUST emit the Deposit event.\n     * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint\n     *   execution, and are accounted for during mint.\n     * - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not\n     *   approving enough underlying tokens to the Vault contract, etc).\n     *\n     * NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.\n     */\n    function mint(uint256 shares, address receiver) external returns (uint256 assets);\n\n    /**\n     * @dev Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the\n     * Vault, through a withdraw call.\n     *\n     * - MUST return a limited value if owner is subject to some withdrawal limit or timelock.\n     * - MUST NOT revert.\n     */\n    function maxWithdraw(address owner) external view returns (uint256 maxAssets);\n\n    /**\n     * @dev Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block,\n     * given current on-chain conditions.\n     *\n     * - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw\n     *   call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if\n     *   called\n     *   in the same transaction.\n     * - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though\n     *   the withdrawal would be accepted, regardless if the user has enough shares, etc.\n     * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.\n     * - MUST NOT revert.\n     *\n     * NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in\n     * share price or some other type of condition, meaning the depositor will lose assets by depositing.\n     */\n    function previewWithdraw(uint256 assets) external view returns (uint256 shares);\n\n    /**\n     * @dev Burns shares from owner and sends exactly assets of underlying tokens to receiver.\n     *\n     * - MUST emit the Withdraw event.\n     * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the\n     *   withdraw execution, and are accounted for during withdraw.\n     * - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner\n     *   not having enough shares, etc).\n     *\n     * Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed.\n     * Those methods should be performed separately.\n     */\n    function withdraw(uint256 assets, address receiver, address owner) external returns (uint256 shares);\n\n    /**\n     * @dev Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault,\n     * through a redeem call.\n     *\n     * - MUST return a limited value if owner is subject to some withdrawal limit or timelock.\n     * - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock.\n     * - MUST NOT revert.\n     */\n    function maxRedeem(address owner) external view returns (uint256 maxShares);\n\n    /**\n     * @dev Allows an on-chain or off-chain user to simulate the effects of their redemption at the current block,\n     * given current on-chain conditions.\n     *\n     * - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call\n     *   in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the\n     *   same transaction.\n     * - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the\n     *   redemption would be accepted, regardless if the user has enough shares, etc.\n     * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.\n     * - MUST NOT revert.\n     *\n     * NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in\n     * share price or some other type of condition, meaning the depositor will lose assets by redeeming.\n     */\n    function previewRedeem(uint256 shares) external view returns (uint256 assets);\n\n    /**\n     * @dev Burns exactly shares from owner and sends assets of underlying tokens to receiver.\n     *\n     * - MUST emit the Withdraw event.\n     * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the\n     *   redeem execution, and are accounted for during redeem.\n     * - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner\n     *   not having enough shares, etc).\n     *\n     * NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed.\n     * Those methods should be performed separately.\n     */\n    function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets);\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/utils/math/Math.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\nimport {Panic} from \"../Panic.sol\";\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n    enum Rounding {\n        Floor, // Toward negative infinity\n        Ceil, // Toward positive infinity\n        Trunc, // Toward zero\n        Expand // Away from zero\n    }\n\n    /**\n     * @dev Return the 512-bit addition of two uint256.\n     *\n     * The result is stored in two 256 variables such that sum = high * 2²⁵⁶ + low.\n     */\n    function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n        assembly (\"memory-safe\") {\n            low := add(a, b)\n            high := lt(low, a)\n        }\n    }\n\n    /**\n     * @dev Return the 512-bit multiplication of two uint256.\n     *\n     * The result is stored in two 256 variables such that product = high * 2²⁵⁶ + low.\n     */\n    function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n        // 512-bit multiply [high low] = x * y. Compute the product mod 2²⁵⁶ and mod 2²⁵⁶ - 1, then use\n        // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n        // variables such that product = high * 2²⁵⁶ + low.\n        assembly (\"memory-safe\") {\n            let mm := mulmod(a, b, not(0))\n            low := mul(a, b)\n            high := sub(sub(mm, low), lt(mm, low))\n        }\n    }\n\n    /**\n     * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\n     */\n    function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            uint256 c = a + b;\n            success = c >= a;\n            result = c * SafeCast.toUint(success);\n        }\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\n     */\n    function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            uint256 c = a - b;\n            success = c <= a;\n            result = c * SafeCast.toUint(success);\n        }\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\n     */\n    function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            uint256 c = a * b;\n            assembly (\"memory-safe\") {\n                // Only true when the multiplication doesn't overflow\n                // (c / a == b) || (a == 0)\n                success := or(eq(div(c, a), b), iszero(a))\n            }\n            // equivalent to: success ? c : 0\n            result = c * SafeCast.toUint(success);\n        }\n    }\n\n    /**\n     * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\n     */\n    function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            success = b > 0;\n            assembly (\"memory-safe\") {\n                // The `DIV` opcode returns zero when the denominator is 0.\n                result := div(a, b)\n            }\n        }\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\n     */\n    function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            success = b > 0;\n            assembly (\"memory-safe\") {\n                // The `MOD` opcode returns zero when the denominator is 0.\n                result := mod(a, b)\n            }\n        }\n    }\n\n    /**\n     * @dev Unsigned saturating addition, bounds to `2²⁵⁶ - 1` instead of overflowing.\n     */\n    function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\n        (bool success, uint256 result) = tryAdd(a, b);\n        return ternary(success, result, type(uint256).max);\n    }\n\n    /**\n     * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\n     */\n    function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\n        (, uint256 result) = trySub(a, b);\n        return result;\n    }\n\n    /**\n     * @dev Unsigned saturating multiplication, bounds to `2²⁵⁶ - 1` instead of overflowing.\n     */\n    function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\n        (bool success, uint256 result) = tryMul(a, b);\n        return ternary(success, result, type(uint256).max);\n    }\n\n    /**\n     * @dev Branchless ternary evaluation for `condition ? a : b`. Gas costs are constant.\n     *\n     * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n     * However, the compiler may optimize Solidity ternary operations (i.e. `condition ? a : b`) to only compute\n     * one branch when needed, making this function more expensive.\n     */\n    function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\n        unchecked {\n            // branchless ternary works because:\n            // b ^ (a ^ b) == a\n            // b ^ 0 == b\n            return b ^ ((a ^ b) * SafeCast.toUint(condition));\n        }\n    }\n\n    /**\n     * @dev Returns the largest of two numbers.\n     */\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\n        return ternary(a > b, a, b);\n    }\n\n    /**\n     * @dev Returns the smallest of two numbers.\n     */\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\n        return ternary(a < b, a, b);\n    }\n\n    /**\n     * @dev Returns the average of two numbers. The result is rounded towards\n     * zero.\n     */\n    function average(uint256 a, uint256 b) internal pure returns (uint256) {\n        // (a + b) / 2 can overflow.\n        return (a & b) + (a ^ b) / 2;\n    }\n\n    /**\n     * @dev Returns the ceiling of the division of two numbers.\n     *\n     * This differs from standard division with `/` in that it rounds towards infinity instead\n     * of rounding towards zero.\n     */\n    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n        if (b == 0) {\n            // Guarantee the same behavior as in a regular Solidity division.\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n\n        // The following calculation ensures accurate ceiling division without overflow.\n        // Since a is non-zero, (a - 1) / b will not overflow.\n        // The largest possible result occurs when (a - 1) / b is type(uint256).max,\n        // but the largest value we can obtain is type(uint256).max - 1, which happens\n        // when a = type(uint256).max and b = 1.\n        unchecked {\n            return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\n        }\n    }\n\n    /**\n     * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\n     * denominator == 0.\n     *\n     * Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n     * Uniswap Labs also under MIT license.\n     */\n    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n        unchecked {\n            (uint256 high, uint256 low) = mul512(x, y);\n\n            // Handle non-overflow cases, 256 by 256 division.\n            if (high == 0) {\n                // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n                // The surrounding unchecked block does not change this fact.\n                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n                return low / denominator;\n            }\n\n            // Make sure the result is less than 2²⁵⁶. Also prevents denominator == 0.\n            if (denominator <= high) {\n                Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\n            }\n\n            ///////////////////////////////////////////////\n            // 512 by 256 division.\n            ///////////////////////////////////////////////\n\n            // Make division exact by subtracting the remainder from [high low].\n            uint256 remainder;\n            assembly (\"memory-safe\") {\n                // Compute remainder using mulmod.\n                remainder := mulmod(x, y, denominator)\n\n                // Subtract 256 bit number from 512 bit number.\n                high := sub(high, gt(remainder, low))\n                low := sub(low, remainder)\n            }\n\n            // Factor powers of two out of denominator and compute largest power of two divisor of denominator.\n            // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n            uint256 twos = denominator & (0 - denominator);\n            assembly (\"memory-safe\") {\n                // Divide denominator by twos.\n                denominator := div(denominator, twos)\n\n                // Divide [high low] by twos.\n                low := div(low, twos)\n\n                // Flip twos such that it is 2²⁵⁶ / twos. If twos is zero, then it becomes one.\n                twos := add(div(sub(0, twos), twos), 1)\n            }\n\n            // Shift in bits from high into low.\n            low |= high * twos;\n\n            // Invert denominator mod 2²⁵⁶. Now that denominator is an odd number, it has an inverse modulo 2²⁵⁶ such\n            // that denominator * inv ≡ 1 mod 2²⁵⁶. Compute the inverse by starting with a seed that is correct for\n            // four bits. That is, denominator * inv ≡ 1 mod 2⁴.\n            uint256 inverse = (3 * denominator) ^ 2;\n\n            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also\n            // works in modular arithmetic, doubling the correct bits in each step.\n            inverse *= 2 - denominator * inverse; // inverse mod 2⁸\n            inverse *= 2 - denominator * inverse; // inverse mod 2¹⁶\n            inverse *= 2 - denominator * inverse; // inverse mod 2³²\n            inverse *= 2 - denominator * inverse; // inverse mod 2⁶⁴\n            inverse *= 2 - denominator * inverse; // inverse mod 2¹²⁸\n            inverse *= 2 - denominator * inverse; // inverse mod 2²⁵⁶\n\n            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n            // This will give us the correct result modulo 2²⁵⁶. Since the preconditions guarantee that the outcome is\n            // less than 2²⁵⁶, this is the final result. We don't need to compute the high bits of the result and high\n            // is no longer required.\n            result = low * inverse;\n            return result;\n        }\n    }\n\n    /**\n     * @dev Calculates x * y / denominator with full precision, following the selected rounding direction.\n     */\n    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n        return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\n    }\n\n    /**\n     * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\n     */\n    function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\n        unchecked {\n            (uint256 high, uint256 low) = mul512(x, y);\n            if (high >= 1 << n) {\n                Panic.panic(Panic.UNDER_OVERFLOW);\n            }\n            return (high << (256 - n)) | (low >> n);\n        }\n    }\n\n    /**\n     * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\n     */\n    function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\n        return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\n    }\n\n    /**\n     * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\n     *\n     * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\n     * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\n     *\n     * If the input value is not inversible, 0 is returned.\n     *\n     * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\n     * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\n     */\n    function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\n        unchecked {\n            if (n == 0) return 0;\n\n            // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\n            // Used to compute integers x and y such that: ax + ny = gcd(a, n).\n            // When the gcd is 1, then the inverse of a modulo n exists and it's x.\n            // ax + ny = 1\n            // ax = 1 + (-y)n\n            // ax ≡ 1 (mod n) # x is the inverse of a modulo n\n\n            // If the remainder is 0 the gcd is n right away.\n            uint256 remainder = a % n;\n            uint256 gcd = n;\n\n            // Therefore the initial coefficients are:\n            // ax + ny = gcd(a, n) = n\n            // 0a + 1n = n\n            int256 x = 0;\n            int256 y = 1;\n\n            while (remainder != 0) {\n                uint256 quotient = gcd / remainder;\n\n                (gcd, remainder) = (\n                    // The old remainder is the next gcd to try.\n                    remainder,\n                    // Compute the next remainder.\n                    // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\n                    // where gcd is at most n (capped to type(uint256).max)\n                    gcd - remainder * quotient\n                );\n\n                (x, y) = (\n                    // Increment the coefficient of a.\n                    y,\n                    // Decrement the coefficient of n.\n                    // Can overflow, but the result is casted to uint256 so that the\n                    // next value of y is \"wrapped around\" to a value between 0 and n - 1.\n                    x - y * int256(quotient)\n                );\n            }\n\n            if (gcd != 1) return 0; // No inverse exists.\n            return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\n        }\n    }\n\n    /**\n     * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\n     *\n     * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\n     * prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that\n     * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\n     *\n     * NOTE: this function does NOT check that `p` is a prime greater than `2`.\n     */\n    function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\n        unchecked {\n            return Math.modExp(a, p - 2, p);\n        }\n    }\n\n    /**\n     * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\n     *\n     * Requirements:\n     * - modulus can't be zero\n     * - underlying staticcall to precompile must succeed\n     *\n     * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\n     * sure the chain you're using it on supports the precompiled contract for modular exponentiation\n     * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\n     * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\n     * interpreted as 0.\n     */\n    function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\n        (bool success, uint256 result) = tryModExp(b, e, m);\n        if (!success) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n        return result;\n    }\n\n    /**\n     * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\n     * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\n     * to operate modulo 0 or if the underlying precompile reverted.\n     *\n     * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\n     * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\n     * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\n     * of a revert, but the result may be incorrectly interpreted as 0.\n     */\n    function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\n        if (m == 0) return (false, 0);\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            // | Offset    | Content    | Content (Hex)                                                      |\n            // |-----------|------------|--------------------------------------------------------------------|\n            // | 0x00:0x1f | size of b  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x20:0x3f | size of e  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x40:0x5f | size of m  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x60:0x7f | value of b | 0x<.............................................................b> |\n            // | 0x80:0x9f | value of e | 0x<.............................................................e> |\n            // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\n            mstore(ptr, 0x20)\n            mstore(add(ptr, 0x20), 0x20)\n            mstore(add(ptr, 0x40), 0x20)\n            mstore(add(ptr, 0x60), b)\n            mstore(add(ptr, 0x80), e)\n            mstore(add(ptr, 0xa0), m)\n\n            // Given the result < m, it's guaranteed to fit in 32 bytes,\n            // so we can use the memory scratch space located at offset 0.\n            success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\n            result := mload(0x00)\n        }\n    }\n\n    /**\n     * @dev Variant of {modExp} that supports inputs of arbitrary length.\n     */\n    function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\n        (bool success, bytes memory result) = tryModExp(b, e, m);\n        if (!success) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n        return result;\n    }\n\n    /**\n     * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\n     */\n    function tryModExp(\n        bytes memory b,\n        bytes memory e,\n        bytes memory m\n    ) internal view returns (bool success, bytes memory result) {\n        if (_zeroBytes(m)) return (false, new bytes(0));\n\n        uint256 mLen = m.length;\n\n        // Encode call args in result and move the free memory pointer\n        result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\n\n        assembly (\"memory-safe\") {\n            let dataPtr := add(result, 0x20)\n            // Write result on top of args to avoid allocating extra memory.\n            success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\n            // Overwrite the length.\n            // result.length > returndatasize() is guaranteed because returndatasize() == m.length\n            mstore(result, mLen)\n            // Set the memory pointer after the returned data.\n            mstore(0x40, add(dataPtr, mLen))\n        }\n    }\n\n    /**\n     * @dev Returns whether the provided byte array is zero.\n     */\n    function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\n        for (uint256 i = 0; i < byteArray.length; ++i) {\n            if (byteArray[i] != 0) {\n                return false;\n            }\n        }\n        return true;\n    }\n\n    /**\n     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded\n     * towards zero.\n     *\n     * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\n     * using integer operations.\n     */\n    function sqrt(uint256 a) internal pure returns (uint256) {\n        unchecked {\n            // Take care of easy edge cases when a == 0 or a == 1\n            if (a <= 1) {\n                return a;\n            }\n\n            // In this function, we use Newton's method to get a root of `f(x) := x² - a`. It involves building a\n            // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\n            // the current value as `ε_n = | x_n - sqrt(a) |`.\n            //\n            // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\n            // of the target. (i.e. `2**(e-1) ≤ sqrt(a) < 2**e`). We know that `e ≤ 128` because `(2¹²⁸)² = 2²⁵⁶` is\n            // bigger than any uint256.\n            //\n            // By noticing that\n            // `2**(e-1) ≤ sqrt(a) < 2**e → (2**(e-1))² ≤ a < (2**e)² → 2**(2*e-2) ≤ a < 2**(2*e)`\n            // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\n            // to the msb function.\n            uint256 aa = a;\n            uint256 xn = 1;\n\n            if (aa >= (1 << 128)) {\n                aa >>= 128;\n                xn <<= 64;\n            }\n            if (aa >= (1 << 64)) {\n                aa >>= 64;\n                xn <<= 32;\n            }\n            if (aa >= (1 << 32)) {\n                aa >>= 32;\n                xn <<= 16;\n            }\n            if (aa >= (1 << 16)) {\n                aa >>= 16;\n                xn <<= 8;\n            }\n            if (aa >= (1 << 8)) {\n                aa >>= 8;\n                xn <<= 4;\n            }\n            if (aa >= (1 << 4)) {\n                aa >>= 4;\n                xn <<= 2;\n            }\n            if (aa >= (1 << 2)) {\n                xn <<= 1;\n            }\n\n            // We now have x_n such that `x_n = 2**(e-1) ≤ sqrt(a) < 2**e = 2 * x_n`. This implies ε_n ≤ 2**(e-1).\n            //\n            // We can refine our estimation by noticing that the middle of that interval minimizes the error.\n            // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to ε_n ≤ 2**(e-2).\n            // This is going to be our x_0 (and ε_0)\n            xn = (3 * xn) >> 1; // ε_0 := | x_0 - sqrt(a) | ≤ 2**(e-2)\n\n            // From here, Newton's method give us:\n            // x_{n+1} = (x_n + a / x_n) / 2\n            //\n            // One should note that:\n            // x_{n+1}² - a = ((x_n + a / x_n) / 2)² - a\n            //              = ((x_n² + a) / (2 * x_n))² - a\n            //              = (x_n⁴ + 2 * a * x_n² + a²) / (4 * x_n²) - a\n            //              = (x_n⁴ + 2 * a * x_n² + a² - 4 * a * x_n²) / (4 * x_n²)\n            //              = (x_n⁴ - 2 * a * x_n² + a²) / (4 * x_n²)\n            //              = (x_n² - a)² / (2 * x_n)²\n            //              = ((x_n² - a) / (2 * x_n))²\n            //              ≥ 0\n            // Which proves that for all n ≥ 1, sqrt(a) ≤ x_n\n            //\n            // This gives us the proof of quadratic convergence of the sequence:\n            // ε_{n+1} = | x_{n+1} - sqrt(a) |\n            //         = | (x_n + a / x_n) / 2 - sqrt(a) |\n            //         = | (x_n² + a - 2*x_n*sqrt(a)) / (2 * x_n) |\n            //         = | (x_n - sqrt(a))² / (2 * x_n) |\n            //         = | ε_n² / (2 * x_n) |\n            //         = ε_n² / | (2 * x_n) |\n            //\n            // For the first iteration, we have a special case where x_0 is known:\n            // ε_1 = ε_0² / | (2 * x_0) |\n            //     ≤ (2**(e-2))² / (2 * (2**(e-1) + 2**(e-2)))\n            //     ≤ 2**(2*e-4) / (3 * 2**(e-1))\n            //     ≤ 2**(e-3) / 3\n            //     ≤ 2**(e-3-log2(3))\n            //     ≤ 2**(e-4.5)\n            //\n            // For the following iterations, we use the fact that, 2**(e-1) ≤ sqrt(a) ≤ x_n:\n            // ε_{n+1} = ε_n² / | (2 * x_n) |\n            //         ≤ (2**(e-k))² / (2 * 2**(e-1))\n            //         ≤ 2**(2*e-2*k) / 2**e\n            //         ≤ 2**(e-2*k)\n            xn = (xn + a / xn) >> 1; // ε_1 := | x_1 - sqrt(a) | ≤ 2**(e-4.5)  -- special case, see above\n            xn = (xn + a / xn) >> 1; // ε_2 := | x_2 - sqrt(a) | ≤ 2**(e-9)    -- general case with k = 4.5\n            xn = (xn + a / xn) >> 1; // ε_3 := | x_3 - sqrt(a) | ≤ 2**(e-18)   -- general case with k = 9\n            xn = (xn + a / xn) >> 1; // ε_4 := | x_4 - sqrt(a) | ≤ 2**(e-36)   -- general case with k = 18\n            xn = (xn + a / xn) >> 1; // ε_5 := | x_5 - sqrt(a) | ≤ 2**(e-72)   -- general case with k = 36\n            xn = (xn + a / xn) >> 1; // ε_6 := | x_6 - sqrt(a) | ≤ 2**(e-144)  -- general case with k = 72\n\n            // Because e ≤ 128 (as discussed during the first estimation phase), we know have reached a precision\n            // ε_6 ≤ 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\n            // sqrt(a) or sqrt(a) + 1.\n            return xn - SafeCast.toUint(xn > a / xn);\n        }\n    }\n\n    /**\n     * @dev Calculates sqrt(a), following the selected rounding direction.\n     */\n    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = sqrt(a);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 2 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 x) internal pure returns (uint256 r) {\n        // If value has upper 128 bits set, log2 result is at least 128\n        r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n        // If upper 64 bits of 128-bit half set, add 64 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n        // If upper 32 bits of 64-bit half set, add 32 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n        // If upper 16 bits of 32-bit half set, add 16 to result\n        r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n        // If upper 8 bits of 16-bit half set, add 8 to result\n        r |= SafeCast.toUint((x >> r) > 0xff) << 3;\n        // If upper 4 bits of 8-bit half set, add 4 to result\n        r |= SafeCast.toUint((x >> r) > 0xf) << 2;\n\n        // Shifts value right by the current result and use it as an index into this lookup table:\n        //\n        // | x (4 bits) |  index  | table[index] = MSB position |\n        // |------------|---------|-----------------------------|\n        // |    0000    |    0    |        table[0] = 0         |\n        // |    0001    |    1    |        table[1] = 0         |\n        // |    0010    |    2    |        table[2] = 1         |\n        // |    0011    |    3    |        table[3] = 1         |\n        // |    0100    |    4    |        table[4] = 2         |\n        // |    0101    |    5    |        table[5] = 2         |\n        // |    0110    |    6    |        table[6] = 2         |\n        // |    0111    |    7    |        table[7] = 2         |\n        // |    1000    |    8    |        table[8] = 3         |\n        // |    1001    |    9    |        table[9] = 3         |\n        // |    1010    |   10    |        table[10] = 3        |\n        // |    1011    |   11    |        table[11] = 3        |\n        // |    1100    |   12    |        table[12] = 3        |\n        // |    1101    |   13    |        table[13] = 3        |\n        // |    1110    |   14    |        table[14] = 3        |\n        // |    1111    |   15    |        table[15] = 3        |\n        //\n        // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\n        assembly (\"memory-safe\") {\n            r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\n        }\n    }\n\n    /**\n     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log2(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 10 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >= 10 ** 64) {\n                value /= 10 ** 64;\n                result += 64;\n            }\n            if (value >= 10 ** 32) {\n                value /= 10 ** 32;\n                result += 32;\n            }\n            if (value >= 10 ** 16) {\n                value /= 10 ** 16;\n                result += 16;\n            }\n            if (value >= 10 ** 8) {\n                value /= 10 ** 8;\n                result += 8;\n            }\n            if (value >= 10 ** 4) {\n                value /= 10 ** 4;\n                result += 4;\n            }\n            if (value >= 10 ** 2) {\n                value /= 10 ** 2;\n                result += 2;\n            }\n            if (value >= 10 ** 1) {\n                result += 1;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log10(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 256 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     *\n     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n     */\n    function log256(uint256 x) internal pure returns (uint256 r) {\n        // If value has upper 128 bits set, log2 result is at least 128\n        r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n        // If upper 64 bits of 128-bit half set, add 64 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n        // If upper 32 bits of 64-bit half set, add 32 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n        // If upper 16 bits of 32-bit half set, add 16 to result\n        r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n        // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\n        return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\n    }\n\n    /**\n     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log256(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\n        }\n    }\n\n    /**\n     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n     */\n    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n        return uint8(rounding) % 2 == 1;\n    }\n\n    /**\n     * @dev Counts the number of leading zero bits in a uint256.\n     */\n    function clz(uint256 x) internal pure returns (uint256) {\n        return ternary(x == 0, 256, 255 - log2(x));\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/utils/cryptography/EIP712Upgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.0) (utils/cryptography/EIP712.sol)\n\npragma solidity ^0.8.24;\n\nimport {MessageHashUtils} from \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\";\nimport {IERC5267} from \"@openzeppelin/contracts/interfaces/IERC5267.sol\";\nimport {Initializable} from \"@openzeppelin/contracts/proxy/utils/Initializable.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP-712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose\n * encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract\n * does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to\n * produce the hash of their typed data using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP-712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * NOTE: The upgradeable version of this contract does not use an immutable cache and recomputes the domain separator\n * each time {_domainSeparatorV4} is called. That is cheaper than accessing a cached version in cold storage.\n */\nabstract contract EIP712Upgradeable is Initializable, IERC5267 {\n    bytes32 private constant TYPE_HASH =\n        keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n    /// @custom:storage-location erc7201:openzeppelin.storage.EIP712\n    struct EIP712Storage {\n        /// @custom:oz-renamed-from _HASHED_NAME\n        bytes32 _hashedName;\n        /// @custom:oz-renamed-from _HASHED_VERSION\n        bytes32 _hashedVersion;\n\n        string _name;\n        string _version;\n    }\n\n    // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.EIP712\")) - 1)) & ~bytes32(uint256(0xff))\n    bytes32 private constant EIP712StorageLocation = 0xa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100;\n\n    function _getEIP712Storage() private pure returns (EIP712Storage storage $) {\n        assembly {\n            $.slot := EIP712StorageLocation\n        }\n    }\n\n    /**\n     * @dev Initializes the domain separator and parameter caches.\n     *\n     * The meaning of `name` and `version` is specified in\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP-712]:\n     *\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n     * - `version`: the current major version of the signing domain.\n     *\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n     * contract upgrade].\n     */\n    function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\n        __EIP712_init_unchained(name, version);\n    }\n\n    function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\n        EIP712Storage storage $ = _getEIP712Storage();\n        $._name = name;\n        $._version = version;\n\n        // Reset prior values in storage if upgrading\n        $._hashedName = 0;\n        $._hashedVersion = 0;\n    }\n\n    /**\n     * @dev Returns the domain separator for the current chain.\n     */\n    function _domainSeparatorV4() internal view returns (bytes32) {\n        return _buildDomainSeparator();\n    }\n\n    function _buildDomainSeparator() private view returns (bytes32) {\n        return keccak256(abi.encode(TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash(), block.chainid, address(this)));\n    }\n\n    /**\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n     * function returns the hash of the fully encoded EIP712 message for this domain.\n     *\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n     *\n     * ```solidity\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n     *     keccak256(\"Mail(address to,string contents)\"),\n     *     mailTo,\n     *     keccak256(bytes(mailContents))\n     * )));\n     * address signer = ECDSA.recover(digest, signature);\n     * ```\n     */\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n        return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash);\n    }\n\n    /// @inheritdoc IERC5267\n    function eip712Domain()\n        public\n        view\n        virtual\n        returns (\n            bytes1 fields,\n            string memory name,\n            string memory version,\n            uint256 chainId,\n            address verifyingContract,\n            bytes32 salt,\n            uint256[] memory extensions\n        )\n    {\n        EIP712Storage storage $ = _getEIP712Storage();\n        // If the hashed name and version in storage are non-zero, the contract hasn't been properly initialized\n        // and the EIP712 domain is not reliable, as it will be missing name and version.\n        require($._hashedName == 0 && $._hashedVersion == 0, \"EIP712: Uninitialized\");\n\n        return (\n            hex\"0f\", // 01111\n            _EIP712Name(),\n            _EIP712Version(),\n            block.chainid,\n            address(this),\n            bytes32(0),\n            new uint256[](0)\n        );\n    }\n\n    /**\n     * @dev The name parameter for the EIP712 domain.\n     *\n     * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n     * are a concern.\n     */\n    function _EIP712Name() internal view virtual returns (string memory) {\n        EIP712Storage storage $ = _getEIP712Storage();\n        return $._name;\n    }\n\n    /**\n     * @dev The version parameter for the EIP712 domain.\n     *\n     * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n     * are a concern.\n     */\n    function _EIP712Version() internal view virtual returns (string memory) {\n        EIP712Storage storage $ = _getEIP712Storage();\n        return $._version;\n    }\n\n    /**\n     * @dev The hash of the name parameter for the EIP712 domain.\n     *\n     * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Name` instead.\n     */\n    function _EIP712NameHash() internal view returns (bytes32) {\n        EIP712Storage storage $ = _getEIP712Storage();\n        string memory name = _EIP712Name();\n        if (bytes(name).length > 0) {\n            return keccak256(bytes(name));\n        } else {\n            // If the name is empty, the contract may have been upgraded without initializing the new storage.\n            // We return the name hash in storage if non-zero, otherwise we assume the name is empty by design.\n            bytes32 hashedName = $._hashedName;\n            if (hashedName != 0) {\n                return hashedName;\n            } else {\n                return keccak256(\"\");\n            }\n        }\n    }\n\n    /**\n     * @dev The hash of the version parameter for the EIP712 domain.\n     *\n     * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Version` instead.\n     */\n    function _EIP712VersionHash() internal view returns (bytes32) {\n        EIP712Storage storage $ = _getEIP712Storage();\n        string memory version = _EIP712Version();\n        if (bytes(version).length > 0) {\n            return keccak256(bytes(version));\n        } else {\n            // If the version is empty, the contract may have been upgraded without initializing the new storage.\n            // We return the version hash in storage if non-zero, otherwise we assume the version is empty by design.\n            bytes32 hashedVersion = $._hashedVersion;\n            if (hashedVersion != 0) {\n                return hashedVersion;\n            } else {\n                return keccak256(\"\");\n            }\n        }\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\nimport {IERC1363} from \"../../../interfaces/IERC1363.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC-20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n    /**\n     * @dev An operation with an ERC-20 token failed.\n     */\n    error SafeERC20FailedOperation(address token);\n\n    /**\n     * @dev Indicates a failed `decreaseAllowance` request.\n     */\n    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);\n\n    /**\n     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\n     */\n    function safeTransfer(IERC20 token, address to, uint256 value) internal {\n        if (!_safeTransfer(token, to, value, true)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n     */\n    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n        if (!_safeTransferFrom(token, from, to, value, true)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\n     */\n    function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\n        return _safeTransfer(token, to, value, false);\n    }\n\n    /**\n     * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\n     */\n    function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\n        return _safeTransferFrom(token, from, to, value, false);\n    }\n\n    /**\n     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\n     *\n     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n     * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n     */\n    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n        uint256 oldAllowance = token.allowance(address(this), spender);\n        forceApprove(token, spender, oldAllowance + value);\n    }\n\n    /**\n     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no\n     * value, non-reverting calls are assumed to be successful.\n     *\n     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n     * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n     */\n    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {\n        unchecked {\n            uint256 currentAllowance = token.allowance(address(this), spender);\n            if (currentAllowance < requestedDecrease) {\n                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);\n            }\n            forceApprove(token, spender, currentAllowance - requestedDecrease);\n        }\n    }\n\n    /**\n     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n     * to be set to zero before setting it to a non-zero value, such as USDT.\n     *\n     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\n     * only sets the \"standard\" allowance. Any temporary allowance will remain active, in addition to the value being\n     * set here.\n     */\n    function forceApprove(IERC20 token, address spender, uint256 value) internal {\n        if (!_safeApprove(token, spender, value, false)) {\n            if (!_safeApprove(token, spender, 0, true)) revert SafeERC20FailedOperation(address(token));\n            if (!_safeApprove(token, spender, value, true)) revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\n     * code. This can be used to implement an {ERC721}-like safe transfer that relies on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n        if (to.code.length == 0) {\n            safeTransfer(token, to, value);\n        } else if (!token.transferAndCall(to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\n     * has no code. This can be used to implement an {ERC721}-like safe transfer that relies on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function transferFromAndCallRelaxed(\n        IERC1363 token,\n        address from,\n        address to,\n        uint256 value,\n        bytes memory data\n    ) internal {\n        if (to.code.length == 0) {\n            safeTransferFrom(token, from, to, value);\n        } else if (!token.transferFromAndCall(from, to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\n     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\n     * Oppositely, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\n     * once without retrying, and relies on the returned value to be true.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n        if (to.code.length == 0) {\n            forceApprove(token, to, value);\n        } else if (!token.approveAndCall(to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity `token.transfer(to, value)` call, relaxing the requirement on the return value: the\n     * return value is optional (but if data is returned, it must not be false).\n     *\n     * @param token The token targeted by the call.\n     * @param to The recipient of the tokens\n     * @param value The amount of token to transfer\n     * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.\n     */\n    function _safeTransfer(IERC20 token, address to, uint256 value, bool bubble) private returns (bool success) {\n        bytes4 selector = IERC20.transfer.selector;\n\n        assembly (\"memory-safe\") {\n            let fmp := mload(0x40)\n            mstore(0x00, selector)\n            mstore(0x04, and(to, shr(96, not(0))))\n            mstore(0x24, value)\n            success := call(gas(), token, 0, 0x00, 0x44, 0x00, 0x20)\n            // if call success and return is true, all is good.\n            // otherwise (not success or return is not true), we need to perform further checks\n            if iszero(and(success, eq(mload(0x00), 1))) {\n                // if the call was a failure and bubble is enabled, bubble the error\n                if and(iszero(success), bubble) {\n                    returndatacopy(fmp, 0x00, returndatasize())\n                    revert(fmp, returndatasize())\n                }\n                // if the return value is not true, then the call is only successful if:\n                // - the token address has code\n                // - the returndata is empty\n                success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))\n            }\n            mstore(0x40, fmp)\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity `token.transferFrom(from, to, value)` call, relaxing the requirement on the return\n     * value: the return value is optional (but if data is returned, it must not be false).\n     *\n     * @param token The token targeted by the call.\n     * @param from The sender of the tokens\n     * @param to The recipient of the tokens\n     * @param value The amount of token to transfer\n     * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.\n     */\n    function _safeTransferFrom(\n        IERC20 token,\n        address from,\n        address to,\n        uint256 value,\n        bool bubble\n    ) private returns (bool success) {\n        bytes4 selector = IERC20.transferFrom.selector;\n\n        assembly (\"memory-safe\") {\n            let fmp := mload(0x40)\n            mstore(0x00, selector)\n            mstore(0x04, and(from, shr(96, not(0))))\n            mstore(0x24, and(to, shr(96, not(0))))\n            mstore(0x44, value)\n            success := call(gas(), token, 0, 0x00, 0x64, 0x00, 0x20)\n            // if call success and return is true, all is good.\n            // otherwise (not success or return is not true), we need to perform further checks\n            if iszero(and(success, eq(mload(0x00), 1))) {\n                // if the call was a failure and bubble is enabled, bubble the error\n                if and(iszero(success), bubble) {\n                    returndatacopy(fmp, 0x00, returndatasize())\n                    revert(fmp, returndatasize())\n                }\n                // if the return value is not true, then the call is only successful if:\n                // - the token address has code\n                // - the returndata is empty\n                success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))\n            }\n            mstore(0x40, fmp)\n            mstore(0x60, 0)\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity `token.approve(spender, value)` call, relaxing the requirement on the return value:\n     * the return value is optional (but if data is returned, it must not be false).\n     *\n     * @param token The token targeted by the call.\n     * @param spender The spender of the tokens\n     * @param value The amount of token to transfer\n     * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.\n     */\n    function _safeApprove(IERC20 token, address spender, uint256 value, bool bubble) private returns (bool success) {\n        bytes4 selector = IERC20.approve.selector;\n\n        assembly (\"memory-safe\") {\n            let fmp := mload(0x40)\n            mstore(0x00, selector)\n            mstore(0x04, and(spender, shr(96, not(0))))\n            mstore(0x24, value)\n            success := call(gas(), token, 0, 0x00, 0x44, 0x00, 0x20)\n            // if call success and return is true, all is good.\n            // otherwise (not success or return is not true), we need to perform further checks\n            if iszero(and(success, eq(mload(0x00), 1))) {\n                // if the call was a failure and bubble is enabled, bubble the error\n                if and(iszero(success), bubble) {\n                    returndatacopy(fmp, 0x00, returndatasize())\n                    revert(fmp, returndatasize())\n                }\n                // if the return value is not true, then the call is only successful if:\n                // - the token address has code\n                // - the returndata is empty\n                success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))\n            }\n            mstore(0x40, fmp)\n        }\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (access/IAccessControl.sol)\n\npragma solidity >=0.8.4;\n\n/**\n * @dev External interface of AccessControl declared to support ERC-165 detection.\n */\ninterface IAccessControl {\n    /**\n     * @dev The `account` is missing a role.\n     */\n    error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);\n\n    /**\n     * @dev The caller of a function is not the expected one.\n     *\n     * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.\n     */\n    error AccessControlBadConfirmation();\n\n    /**\n     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n     *\n     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n     * {RoleAdminChanged} not being emitted to signal this.\n     */\n    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n    /**\n     * @dev Emitted when `account` is granted `role`.\n     *\n     * `sender` is the account that originated the contract call. This account bears the admin role (for the granted role).\n     * Expected in cases where the role was granted using the internal {AccessControl-_grantRole}.\n     */\n    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n    /**\n     * @dev Emitted when `account` is revoked `role`.\n     *\n     * `sender` is the account that originated the contract call:\n     *   - if using `revokeRole`, it is the admin role bearer\n     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)\n     */\n    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n    /**\n     * @dev Returns `true` if `account` has been granted `role`.\n     */\n    function hasRole(bytes32 role, address account) external view returns (bool);\n\n    /**\n     * @dev Returns the admin role that controls `role`. See {grantRole} and\n     * {revokeRole}.\n     *\n     * To change a role's admin, use {AccessControl-_setRoleAdmin}.\n     */\n    function getRoleAdmin(bytes32 role) external view returns (bytes32);\n\n    /**\n     * @dev Grants `role` to `account`.\n     *\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     */\n    function grantRole(bytes32 role, address account) external;\n\n    /**\n     * @dev Revokes `role` from `account`.\n     *\n     * If `account` had been granted `role`, emits a {RoleRevoked} event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     */\n    function revokeRole(bytes32 role, address account) external;\n\n    /**\n     * @dev Revokes `role` from the calling account.\n     *\n     * Roles are often managed via {grantRole} and {revokeRole}: this function's\n     * purpose is to provide a mechanism for accounts to lose their privileges\n     * if they are compromised (such as when a trusted device is misplaced).\n     *\n     * If the calling account had been granted `role`, emits a {RoleRevoked}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must be `callerConfirmation`.\n     */\n    function renounceRole(bytes32 role, address callerConfirmation) external;\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n    enum RecoverError {\n        NoError,\n        InvalidSignature,\n        InvalidSignatureLength,\n        InvalidSignatureS\n    }\n\n    /**\n     * @dev The signature derives the `address(0)`.\n     */\n    error ECDSAInvalidSignature();\n\n    /**\n     * @dev The signature has an invalid length.\n     */\n    error ECDSAInvalidSignatureLength(uint256 length);\n\n    /**\n     * @dev The signature has an S value that is in the upper half order.\n     */\n    error ECDSAInvalidSignatureS(bytes32 s);\n\n    /**\n     * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n     * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n     * and a bytes32 providing additional information about the error.\n     *\n     * If no error is returned, then the address can be used for verification purposes.\n     *\n     * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n     * this function rejects them by requiring the `s` value to be in the lower\n     * half order, and the `v` value to be either 27 or 28.\n     *\n     * NOTE: This function only supports 65-byte signatures. ERC-2098 short signatures are rejected. This restriction\n     * is DEPRECATED and will be removed in v6.0. Developers SHOULD NOT use signatures as unique identifiers; use hash\n     * invalidation or nonces for replay protection.\n     *\n     * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n     * verification to be secure: it is possible to craft signatures that\n     * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n     * this is by receiving a hash of the original message (which may otherwise\n     * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n     *\n     * Documentation for signature generation:\n     *\n     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n     */\n    function tryRecover(\n        bytes32 hash,\n        bytes memory signature\n    ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n        if (signature.length == 65) {\n            bytes32 r;\n            bytes32 s;\n            uint8 v;\n            // ecrecover takes the signature parameters, and the only way to get them\n            // currently is to use assembly.\n            assembly (\"memory-safe\") {\n                r := mload(add(signature, 0x20))\n                s := mload(add(signature, 0x40))\n                v := byte(0, mload(add(signature, 0x60)))\n            }\n            return tryRecover(hash, v, r, s);\n        } else {\n            return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));\n        }\n    }\n\n    /**\n     * @dev Variant of {tryRecover} that takes a signature in calldata\n     */\n    function tryRecoverCalldata(\n        bytes32 hash,\n        bytes calldata signature\n    ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n        if (signature.length == 65) {\n            bytes32 r;\n            bytes32 s;\n            uint8 v;\n            // ecrecover takes the signature parameters, calldata slices would work here, but are\n            // significantly more expensive (length check) than using calldataload in assembly.\n            assembly (\"memory-safe\") {\n                r := calldataload(signature.offset)\n                s := calldataload(add(signature.offset, 0x20))\n                v := byte(0, calldataload(add(signature.offset, 0x40)))\n            }\n            return tryRecover(hash, v, r, s);\n        } else {\n            return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));\n        }\n    }\n\n    /**\n     * @dev Returns the address that signed a hashed message (`hash`) with\n     * `signature`. This address can then be used for verification purposes.\n     *\n     * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n     * this function rejects them by requiring the `s` value to be in the lower\n     * half order, and the `v` value to be either 27 or 28.\n     *\n     * NOTE: This function only supports 65-byte signatures. ERC-2098 short signatures are rejected. This restriction\n     * is DEPRECATED and will be removed in v6.0. Developers SHOULD NOT use signatures as unique identifiers; use hash\n     * invalidation or nonces for replay protection.\n     *\n     * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n     * verification to be secure: it is possible to craft signatures that\n     * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n     * this is by receiving a hash of the original message (which may otherwise\n     * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n     */\n    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n        _throwError(error, errorArg);\n        return recovered;\n    }\n\n    /**\n     * @dev Variant of {recover} that takes a signature in calldata\n     */\n    function recoverCalldata(bytes32 hash, bytes calldata signature) internal pure returns (address) {\n        (address recovered, RecoverError error, bytes32 errorArg) = tryRecoverCalldata(hash, signature);\n        _throwError(error, errorArg);\n        return recovered;\n    }\n\n    /**\n     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n     *\n     * See https://eips.ethereum.org/EIPS/eip-2098[ERC-2098 short signatures]\n     */\n    function tryRecover(\n        bytes32 hash,\n        bytes32 r,\n        bytes32 vs\n    ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n        unchecked {\n            bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n            // We do not check for an overflow here since the shift operation results in 0 or 1.\n            uint8 v = uint8((uint256(vs) >> 255) + 27);\n            return tryRecover(hash, v, r, s);\n        }\n    }\n\n    /**\n     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n     */\n    function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n        _throwError(error, errorArg);\n        return recovered;\n    }\n\n    /**\n     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n     * `r` and `s` signature fields separately.\n     */\n    function tryRecover(\n        bytes32 hash,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n        // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n        //\n        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n        // these malleable signatures as well.\n        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n            return (address(0), RecoverError.InvalidSignatureS, s);\n        }\n\n        // If the signature is valid (and not malleable), return the signer address\n        address signer = ecrecover(hash, v, r, s);\n        if (signer == address(0)) {\n            return (address(0), RecoverError.InvalidSignature, bytes32(0));\n        }\n\n        return (signer, RecoverError.NoError, bytes32(0));\n    }\n\n    /**\n     * @dev Overload of {ECDSA-recover} that receives the `v`,\n     * `r` and `s` signature fields separately.\n     */\n    function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);\n        _throwError(error, errorArg);\n        return recovered;\n    }\n\n    /**\n     * @dev Parse a signature into its `v`, `r` and `s` components. Supports 65-byte and 64-byte (ERC-2098)\n     * formats. Returns (0,0,0) for invalid signatures.\n     *\n     * For 64-byte signatures, `v` is automatically normalized to 27 or 28.\n     * For 65-byte signatures, `v` is returned as-is and MUST already be 27 or 28 for use with ecrecover.\n     *\n     * Consider validating the result before use, or use {tryRecover}/{recover} which perform full validation.\n     */\n    function parse(bytes memory signature) internal pure returns (uint8 v, bytes32 r, bytes32 s) {\n        assembly (\"memory-safe\") {\n            // Check the signature length\n            switch mload(signature)\n            // - case 65: r,s,v signature (standard)\n            case 65 {\n                r := mload(add(signature, 0x20))\n                s := mload(add(signature, 0x40))\n                v := byte(0, mload(add(signature, 0x60)))\n            }\n            // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098)\n            case 64 {\n                let vs := mload(add(signature, 0x40))\n                r := mload(add(signature, 0x20))\n                s := and(vs, shr(1, not(0)))\n                v := add(shr(255, vs), 27)\n            }\n            default {\n                r := 0\n                s := 0\n                v := 0\n            }\n        }\n    }\n\n    /**\n     * @dev Variant of {parse} that takes a signature in calldata\n     */\n    function parseCalldata(bytes calldata signature) internal pure returns (uint8 v, bytes32 r, bytes32 s) {\n        assembly (\"memory-safe\") {\n            // Check the signature length\n            switch signature.length\n            // - case 65: r,s,v signature (standard)\n            case 65 {\n                r := calldataload(signature.offset)\n                s := calldataload(add(signature.offset, 0x20))\n                v := byte(0, calldataload(add(signature.offset, 0x40)))\n            }\n            // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098)\n            case 64 {\n                let vs := calldataload(add(signature.offset, 0x20))\n                r := calldataload(signature.offset)\n                s := and(vs, shr(1, not(0)))\n                v := add(shr(255, vs), 27)\n            }\n            default {\n                r := 0\n                s := 0\n                v := 0\n            }\n        }\n    }\n\n    /**\n     * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n     */\n    function _throwError(RecoverError error, bytes32 errorArg) private pure {\n        if (error == RecoverError.NoError) {\n            return; // no error: do nothing\n        } else if (error == RecoverError.InvalidSignature) {\n            revert ECDSAInvalidSignature();\n        } else if (error == RecoverError.InvalidSignatureLength) {\n            revert ECDSAInvalidSignatureLength(uint256(errorArg));\n        } else if (error == RecoverError.InvalidSignatureS) {\n            revert ECDSAInvalidSignatureS(errorArg);\n        }\n    }\n}\n"},{"file_path":"src/v2/interfaces/modules/IAccountingModule.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity 0.8.36;\n\n/**\n * @title IAccountingModule\n * @author Saturn\n * @notice Accounting adapter for a backing position of the StakedUSDat vault.\n */\ninterface IAccountingModule {\n    /**\n     * @notice Returns the USD value currently recognized by the vault.\n     * @dev Uses 6 decimals, reverts when a nonzero position cannot be reliably\n     * priced, and returns zero without pricing when `balance()` is zero.\n     */\n    function recognizedValue() external view returns (uint256);\n\n    /**\n     * @notice Returns the recognized position quantity maintained by the module.\n     */\n    function balance() external view returns (uint256);\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/utils/Panic.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Helper library for emitting standardized panic codes.\n *\n * ```solidity\n * contract Example {\n *      using Panic for uint256;\n *\n *      // Use any of the declared internal constants\n *      function foo() { Panic.GENERIC.panic(); }\n *\n *      // Alternatively\n *      function foo() { Panic.panic(Panic.GENERIC); }\n * }\n * ```\n *\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\n *\n * _Available since v5.1._\n */\n// slither-disable-next-line unused-state\nlibrary Panic {\n    /// @dev generic / unspecified error\n    uint256 internal constant GENERIC = 0x00;\n    /// @dev used by the assert() builtin\n    uint256 internal constant ASSERT = 0x01;\n    /// @dev arithmetic underflow or overflow\n    uint256 internal constant UNDER_OVERFLOW = 0x11;\n    /// @dev division or modulo by zero\n    uint256 internal constant DIVISION_BY_ZERO = 0x12;\n    /// @dev enum conversion error\n    uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\n    /// @dev invalid encoding in storage\n    uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\n    /// @dev empty array pop\n    uint256 internal constant EMPTY_ARRAY_POP = 0x31;\n    /// @dev array out of bounds access\n    uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\n    /// @dev resource error (too large allocation or too large array)\n    uint256 internal constant RESOURCE_ERROR = 0x41;\n    /// @dev calling invalid internal function\n    uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\n\n    /// @dev Reverts with a panic code. Recommended to use with\n    /// the internal constants with predefined codes.\n    function panic(uint256 code) internal pure {\n        assembly (\"memory-safe\") {\n            mstore(0x00, 0x4e487b71)\n            mstore(0x20, code)\n            revert(0x1c, 0x24)\n        }\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/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":"lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/UUPSUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.22;\n\nimport {UUPSUpgradeable} from \"@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol\";\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/ERC20Upgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {IERC20Metadata} from \"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\";\nimport {ContextUpgradeable} from \"../../utils/ContextUpgradeable.sol\";\nimport {IERC20Errors} from \"@openzeppelin/contracts/interfaces/draft-IERC6093.sol\";\nimport {Initializable} from \"@openzeppelin/contracts/proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC-20\n * applications.\n */\nabstract contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20, IERC20Metadata, IERC20Errors {\n    /// @custom:storage-location erc7201:openzeppelin.storage.ERC20\n    struct ERC20Storage {\n        mapping(address account => uint256) _balances;\n\n        mapping(address account => mapping(address spender => uint256)) _allowances;\n\n        uint256 _totalSupply;\n\n        string _name;\n        string _symbol;\n    }\n\n    // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.ERC20\")) - 1)) & ~bytes32(uint256(0xff))\n    bytes32 private constant ERC20StorageLocation = 0x52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace00;\n\n    function _getERC20Storage() private pure returns (ERC20Storage storage $) {\n        assembly {\n            $.slot := ERC20StorageLocation\n        }\n    }\n\n    /**\n     * @dev Sets the values for {name} and {symbol}.\n     *\n     * Both values are immutable: they can only be set once during construction.\n     */\n    function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing {\n        __ERC20_init_unchained(name_, symbol_);\n    }\n\n    function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {\n        ERC20Storage storage $ = _getERC20Storage();\n        $._name = name_;\n        $._symbol = symbol_;\n    }\n\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() public view virtual returns (string memory) {\n        ERC20Storage storage $ = _getERC20Storage();\n        return $._name;\n    }\n\n    /**\n     * @dev Returns the symbol of the token, usually a shorter version of the\n     * name.\n     */\n    function symbol() public view virtual returns (string memory) {\n        ERC20Storage storage $ = _getERC20Storage();\n        return $._symbol;\n    }\n\n    /**\n     * @dev Returns the number of decimals used to get its user representation.\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\n     * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n     *\n     * Tokens usually opt for a value of 18, imitating the relationship between\n     * Ether and Wei. This is the default value returned by this function, unless\n     * it's overridden.\n     *\n     * NOTE: This information is only used for _display_ purposes: it in\n     * no way affects any of the arithmetic of the contract, including\n     * {IERC20-balanceOf} and {IERC20-transfer}.\n     */\n    function decimals() public view virtual returns (uint8) {\n        return 18;\n    }\n\n    /// @inheritdoc IERC20\n    function totalSupply() public view virtual returns (uint256) {\n        ERC20Storage storage $ = _getERC20Storage();\n        return $._totalSupply;\n    }\n\n    /// @inheritdoc IERC20\n    function balanceOf(address account) public view virtual returns (uint256) {\n        ERC20Storage storage $ = _getERC20Storage();\n        return $._balances[account];\n    }\n\n    /**\n     * @dev See {IERC20-transfer}.\n     *\n     * Requirements:\n     *\n     * - `to` cannot be the zero address.\n     * - the caller must have a balance of at least `value`.\n     */\n    function transfer(address to, uint256 value) public virtual returns (bool) {\n        address owner = _msgSender();\n        _transfer(owner, to, value);\n        return true;\n    }\n\n    /// @inheritdoc IERC20\n    function allowance(address owner, address spender) public view virtual returns (uint256) {\n        ERC20Storage storage $ = _getERC20Storage();\n        return $._allowances[owner][spender];\n    }\n\n    /**\n     * @dev See {IERC20-approve}.\n     *\n     * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n     * `transferFrom`. This is semantically equivalent to an infinite approval.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     */\n    function approve(address spender, uint256 value) public virtual returns (bool) {\n        address owner = _msgSender();\n        _approve(owner, spender, value);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-transferFrom}.\n     *\n     * Skips emitting an {Approval} event indicating an allowance update. This is not\n     * required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve].\n     *\n     * NOTE: Does not update the allowance if the current allowance\n     * is the maximum `uint256`.\n     *\n     * Requirements:\n     *\n     * - `from` and `to` cannot be the zero address.\n     * - `from` must have a balance of at least `value`.\n     * - the caller must have allowance for ``from``'s tokens of at least\n     * `value`.\n     */\n    function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\n        address spender = _msgSender();\n        _spendAllowance(from, spender, value);\n        _transfer(from, to, value);\n        return true;\n    }\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to`.\n     *\n     * This internal function is equivalent to {transfer}, and can be used to\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\n     *\n     * Emits a {Transfer} event.\n     *\n     * NOTE: This function is not virtual, {_update} should be overridden instead.\n     */\n    function _transfer(address from, address to, uint256 value) internal {\n        if (from == address(0)) {\n            revert ERC20InvalidSender(address(0));\n        }\n        if (to == address(0)) {\n            revert ERC20InvalidReceiver(address(0));\n        }\n        _update(from, to, value);\n    }\n\n    /**\n     * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n     * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n     * this function.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _update(address from, address to, uint256 value) internal virtual {\n        ERC20Storage storage $ = _getERC20Storage();\n        if (from == address(0)) {\n            // Overflow check required: The rest of the code assumes that totalSupply never overflows\n            $._totalSupply += value;\n        } else {\n            uint256 fromBalance = $._balances[from];\n            if (fromBalance < value) {\n                revert ERC20InsufficientBalance(from, fromBalance, value);\n            }\n            unchecked {\n                // Overflow not possible: value <= fromBalance <= totalSupply.\n                $._balances[from] = fromBalance - value;\n            }\n        }\n\n        if (to == address(0)) {\n            unchecked {\n                // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\n                $._totalSupply -= value;\n            }\n        } else {\n            unchecked {\n                // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\n                $._balances[to] += value;\n            }\n        }\n\n        emit Transfer(from, to, value);\n    }\n\n    /**\n     * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n     * Relies on the `_update` mechanism\n     *\n     * Emits a {Transfer} event with `from` set to the zero address.\n     *\n     * NOTE: This function is not virtual, {_update} should be overridden instead.\n     */\n    function _mint(address account, uint256 value) internal {\n        if (account == address(0)) {\n            revert ERC20InvalidReceiver(address(0));\n        }\n        _update(address(0), account, value);\n    }\n\n    /**\n     * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n     * Relies on the `_update` mechanism.\n     *\n     * Emits a {Transfer} event with `to` set to the zero address.\n     *\n     * NOTE: This function is not virtual, {_update} should be overridden instead\n     */\n    function _burn(address account, uint256 value) internal {\n        if (account == address(0)) {\n            revert ERC20InvalidSender(address(0));\n        }\n        _update(account, address(0), value);\n    }\n\n    /**\n     * @dev Sets `value` as the allowance of `spender` over the `owner`'s tokens.\n     *\n     * This internal function is equivalent to `approve`, and can be used to\n     * e.g. set automatic allowances for certain subsystems, etc.\n     *\n     * Emits an {Approval} event.\n     *\n     * Requirements:\n     *\n     * - `owner` cannot be the zero address.\n     * - `spender` cannot be the zero address.\n     *\n     * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n     */\n    function _approve(address owner, address spender, uint256 value) internal {\n        _approve(owner, spender, value, true);\n    }\n\n    /**\n     * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n     *\n     * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n     * `_spendAllowance` during the `transferFrom` operation sets the flag to false. This saves gas by not emitting any\n     * `Approval` event during `transferFrom` operations.\n     *\n     * Anyone who wishes to continue emitting `Approval` events on the `transferFrom` operation can force the flag to\n     * true using the following override:\n     *\n     * ```solidity\n     * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n     *     super._approve(owner, spender, value, true);\n     * }\n     * ```\n     *\n     * Requirements are the same as {_approve}.\n     */\n    function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\n        ERC20Storage storage $ = _getERC20Storage();\n        if (owner == address(0)) {\n            revert ERC20InvalidApprover(address(0));\n        }\n        if (spender == address(0)) {\n            revert ERC20InvalidSpender(address(0));\n        }\n        $._allowances[owner][spender] = value;\n        if (emitEvent) {\n            emit Approval(owner, spender, value);\n        }\n    }\n\n    /**\n     * @dev Updates `owner`'s allowance for `spender` based on spent `value`.\n     *\n     * Does not update the allowance value in case of infinite allowance.\n     * Revert if not enough allowance is available.\n     *\n     * Does not emit an {Approval} event.\n     */\n    function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\n        uint256 currentAllowance = allowance(owner, spender);\n        if (currentAllowance < type(uint256).max) {\n            if (currentAllowance < value) {\n                revert ERC20InsufficientAllowance(spender, currentAllowance, value);\n            }\n            unchecked {\n                _approve(owner, spender, currentAllowance - value, false);\n            }\n        }\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/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":"lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/ERC20PermitUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC20/extensions/ERC20Permit.sol)\n\npragma solidity ^0.8.24;\n\nimport {IERC20Permit} from \"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\";\nimport {ERC20Upgradeable} from \"../ERC20Upgradeable.sol\";\nimport {ECDSA} from \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport {EIP712Upgradeable} from \"../../../utils/cryptography/EIP712Upgradeable.sol\";\nimport {NoncesUpgradeable} from \"../../../utils/NoncesUpgradeable.sol\";\nimport {Initializable} from \"@openzeppelin/contracts/proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the ERC-20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[ERC-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC-20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\nabstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20Permit, EIP712Upgradeable, NoncesUpgradeable {\n    bytes32 private constant PERMIT_TYPEHASH =\n        keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n\n    /**\n     * @dev Permit deadline has expired.\n     */\n    error ERC2612ExpiredSignature(uint256 deadline);\n\n    /**\n     * @dev Mismatched signature.\n     */\n    error ERC2612InvalidSigner(address signer, address owner);\n\n    /**\n     * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\"1\"`.\n     *\n     * It's a good idea to use the same `name` that is defined as the ERC-20 token name.\n     */\n    function __ERC20Permit_init(string memory name) internal onlyInitializing {\n        __EIP712_init_unchained(name, \"1\");\n    }\n\n    function __ERC20Permit_init_unchained(string memory) internal onlyInitializing {}\n\n    /// @inheritdoc IERC20Permit\n    function permit(\n        address owner,\n        address spender,\n        uint256 value,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) public virtual {\n        if (block.timestamp > deadline) {\n            revert ERC2612ExpiredSignature(deadline);\n        }\n\n        bytes32 structHash = keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\n\n        bytes32 hash = _hashTypedDataV4(structHash);\n\n        address signer = ECDSA.recover(hash, v, r, s);\n        if (signer != owner) {\n            revert ERC2612InvalidSigner(signer, owner);\n        }\n\n        _approve(owner, spender, value);\n    }\n\n    /// @inheritdoc IERC20Permit\n    function nonces(address owner) public view virtual override(IERC20Permit, NoncesUpgradeable) returns (uint256) {\n        return super.nonces(owner);\n    }\n\n    /// @inheritdoc IERC20Permit\n    // solhint-disable-next-line func-name-mixedcase\n    function DOMAIN_SEPARATOR() external view returns (bytes32) {\n        return _domainSeparatorV4();\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\n\npragma solidity >=0.4.16;\n\nimport {IERC20} from \"../token/ERC20/IERC20.sol\";\n"},{"file_path":"lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\n\npragma solidity >=0.4.16;\n\nimport {IERC165} from \"../utils/introspection/IERC165.sol\";\n"},{"file_path":"src/v2/interfaces/IERC20PermitExtended.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity 0.8.36;\n\nimport {IERC20Permit} from \"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\";\n\n/// @title IERC20PermitExtended\n/// @notice Extended permit interface supporting EIP-1271 smart contract wallet signatures\n/// @dev Extends IERC20Permit to add support for raw bytes signatures used by smart contract\n/// wallets like Gnosis Safe, Argent, and account abstraction wallets.\ninterface IERC20PermitExtended is IERC20Permit {\n    /// @notice Approves `spender` to spend `value` tokens on behalf of `owner` via signature.\n    /// @dev This overload accepts raw bytes for EIP-1271 smart contract wallet compatibility.\n    /// @param owner The address of the token owner.\n    /// @param spender The address of the spender.\n    /// @param value The amount of tokens to approve.\n    /// @param deadline The timestamp after which the permit is no longer valid.\n    /// @param signature The EIP-1271 compatible signature bytes.\n    function permit(address owner, address spender, uint256 value, uint256 deadline, bytes memory signature) external;\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev Interface of the ERC-165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n    /**\n     * @dev Returns true if this contract implements the interface defined by\n     * `interfaceId`. See the corresponding\n     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]\n     * to learn more about how these ids are created.\n     *\n     * This function call must use less than 30 000 gas.\n     */\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"},{"file_path":"src/v2/interfaces/modules/ITradableModule.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity 0.8.36;\n\nimport {IAccountingModule} from \"./IAccountingModule.sol\";\n\n/**\n * @title ITradableModule\n * @author Saturn\n * @notice Accounting adapter for an asset that the StakedUSDat vault can trade.\n */\ninterface ITradableModule is IAccountingModule {\n    /**\n     * @notice Returns the ERC20 asset fixed by the concrete module.\n     */\n    function asset() external view returns (address);\n\n    /**\n     * @notice Returns the validated USD price of one whole asset.\n     * @dev Uses 8 decimals.\n     */\n    function getPrice() external view returns (uint256);\n\n    /**\n     * @notice Recognizes a completed inbound asset delivery.\n     * @dev Callable only by the vault in concrete implementations.\n     */\n    function buy(uint256 assetReceived) external;\n\n    /**\n     * @notice Derecognizes an asset quantity before outbound delivery.\n     * @dev Callable only by the vault in concrete implementations.\n     */\n    function sell(uint256 assetDelivered) external;\n}\n"},{"file_path":"src/v2/interfaces/modules/ISTRConModule.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity 0.8.36;\n\nimport {ISTRConPriceOracle} from \"../oracles/ISTRConPriceOracle.sol\";\nimport {ITradableModule} from \"./ITradableModule.sol\";\n\n/**\n * @title ISTRConModule\n * @author Saturn\n * @notice STRCon-specific tradable-module interface with a rotatable price oracle.\n */\ninterface ISTRConModule is ITradableModule {\n    /**\n     * @notice Returns the vault permanently bound to this module.\n     */\n    function VAULT() external view returns (address);\n\n    /**\n     * @notice Returns the STRCon asset permanently bound to this module.\n     */\n    function ASSET() external view returns (address);\n\n    /**\n     * @notice Returns the active 8-decimal STRCon price oracle.\n     */\n    function oracle() external view returns (ISTRConPriceOracle);\n\n    /**\n     * @notice Replaces the active oracle after module-level compatibility checks.\n     */\n    function setOracle(address newOracle) external;\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev Interface of the ERC-20 standard as defined in the ERC.\n */\ninterface IERC20 {\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n\n    /**\n     * @dev Returns the value of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the value of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the\n     * allowance mechanism. `value` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n"},{"file_path":"src/v2/interfaces/oracles/ISTRConPriceOracle.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity 0.8.36;\n\n/**\n * @title ISTRConPriceOracle\n * @author Saturn\n * @notice Scalar 8-decimal STRCon/USD price interface.\n */\ninterface ISTRConPriceOracle {\n    function decimals() external view returns (uint8);\n\n    function getPrice() external view returns (uint256);\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity >=0.6.2;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC-20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @dev Returns the symbol of the token.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @dev Returns the decimals places of the token.\n     */\n    function decimals() external view returns (uint8);\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/interfaces/IERC1363.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\n\npragma solidity >=0.6.2;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @title IERC1363\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\n *\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\n */\ninterface IERC1363 is IERC20, IERC165 {\n    /*\n     * Note: the ERC-165 identifier for this interface is 0xb0202a11.\n     * 0xb0202a11 ===\n     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^\n     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\n     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\n     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\n     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^\n     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\n     */\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferAndCall(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @param data Additional data with no specified format, sent in call to `to`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param from The address which you want to send tokens from.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param from The address which you want to send tokens from.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @param data Additional data with no specified format, sent in call to `to`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n     * @param spender The address which will spend the funds.\n     * @param value The amount of tokens to be spent.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function approveAndCall(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n     * @param spender The address which will spend the funds.\n     * @param value The amount of tokens to be spent.\n     * @param data Additional data with no specified format, sent in call to `spender`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/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 \"@openzeppelin/contracts/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":"lib/openzeppelin-contracts/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":"lib/openzeppelin-contracts/contracts/utils/Strings.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/Strings.sol)\n\npragma solidity ^0.8.24;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SafeCast} from \"./math/SafeCast.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\nimport {Bytes} from \"./Bytes.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n    using SafeCast for *;\n\n    bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n    uint8 private constant ADDRESS_LENGTH = 20;\n    uint256 private constant SPECIAL_CHARS_LOOKUP =\n        (1 << 0x08) | // backspace\n            (1 << 0x09) | // tab\n            (1 << 0x0a) | // newline\n            (1 << 0x0c) | // form feed\n            (1 << 0x0d) | // carriage return\n            (1 << 0x22) | // double quote\n            (1 << 0x5c); // backslash\n\n    /**\n     * @dev The `value` string doesn't fit in the specified `length`.\n     */\n    error StringsInsufficientHexLength(uint256 value, uint256 length);\n\n    /**\n     * @dev The string being parsed contains characters that are not in scope of the given base.\n     */\n    error StringsInvalidChar();\n\n    /**\n     * @dev The string being parsed is not a properly formatted address.\n     */\n    error StringsInvalidAddressFormat();\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n     */\n    function toString(uint256 value) internal pure returns (string memory) {\n        unchecked {\n            uint256 length = Math.log10(value) + 1;\n            string memory buffer = new string(length);\n            uint256 ptr;\n            assembly (\"memory-safe\") {\n                ptr := add(add(buffer, 0x20), length)\n            }\n            while (true) {\n                ptr--;\n                assembly (\"memory-safe\") {\n                    mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))\n                }\n                value /= 10;\n                if (value == 0) break;\n            }\n            return buffer;\n        }\n    }\n\n    /**\n     * @dev Converts a `int256` to its ASCII `string` decimal representation.\n     */\n    function toStringSigned(int256 value) internal pure returns (string memory) {\n        return string.concat(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value)));\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n     */\n    function toHexString(uint256 value) internal pure returns (string memory) {\n        unchecked {\n            return toHexString(value, Math.log256(value) + 1);\n        }\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n     */\n    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n        uint256 localValue = value;\n        bytes memory buffer = new bytes(2 * length + 2);\n        buffer[0] = \"0\";\n        buffer[1] = \"x\";\n        for (uint256 i = 2 * length + 1; i > 1; --i) {\n            buffer[i] = HEX_DIGITS[localValue & 0xf];\n            localValue >>= 4;\n        }\n        if (localValue != 0) {\n            revert StringsInsufficientHexLength(value, length);\n        }\n        return string(buffer);\n    }\n\n    /**\n     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal\n     * representation.\n     */\n    function toHexString(address addr) internal pure returns (string memory) {\n        return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);\n    }\n\n    /**\n     * @dev Converts an `address` with fixed length of 20 bytes to its checksummed ASCII `string` hexadecimal\n     * representation, according to EIP-55.\n     */\n    function toChecksumHexString(address addr) internal pure returns (string memory) {\n        bytes memory buffer = bytes(toHexString(addr));\n\n        // hash the hex part of buffer (skip length + 2 bytes, length 40)\n        uint256 hashValue;\n        assembly (\"memory-safe\") {\n            hashValue := shr(96, keccak256(add(buffer, 0x22), 40))\n        }\n\n        for (uint256 i = 41; i > 1; --i) {\n            // possible values for buffer[i] are 48 (0) to 57 (9) and 97 (a) to 102 (f)\n            if (hashValue & 0xf > 7 && uint8(buffer[i]) > 96) {\n                // case shift by xoring with 0x20\n                buffer[i] ^= 0x20;\n            }\n            hashValue >>= 4;\n        }\n        return string(buffer);\n    }\n\n    /**\n     * @dev Converts a `bytes` buffer to its ASCII `string` hexadecimal representation.\n     */\n    function toHexString(bytes memory input) internal pure returns (string memory) {\n        unchecked {\n            bytes memory buffer = new bytes(2 * input.length + 2);\n            buffer[0] = \"0\";\n            buffer[1] = \"x\";\n            for (uint256 i = 0; i < input.length; ++i) {\n                uint8 v = uint8(input[i]);\n                buffer[2 * i + 2] = HEX_DIGITS[v >> 4];\n                buffer[2 * i + 3] = HEX_DIGITS[v & 0xf];\n            }\n            return string(buffer);\n        }\n    }\n\n    /**\n     * @dev Returns true if the two strings are equal.\n     */\n    function equal(string memory a, string memory b) internal pure returns (bool) {\n        return Bytes.equal(bytes(a), bytes(b));\n    }\n\n    /**\n     * @dev Parse a decimal string and returns the value as a `uint256`.\n     *\n     * Requirements:\n     * - The string must be formatted as `[0-9]*`\n     * - The result must fit into an `uint256` type\n     */\n    function parseUint(string memory input) internal pure returns (uint256) {\n        return parseUint(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseUint-string} that parses a substring of `input` located between position `begin` (included) and\n     * `end` (excluded).\n     *\n     * Requirements:\n     * - The substring must be formatted as `[0-9]*`\n     * - The result must fit into an `uint256` type\n     */\n    function parseUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n        (bool success, uint256 value) = tryParseUint(input, begin, end);\n        if (!success) revert StringsInvalidChar();\n        return value;\n    }\n\n    /**\n     * @dev Variant of {parseUint-string} that returns false if the parsing fails because of an invalid character.\n     *\n     * NOTE: This function will revert if the result does not fit in a `uint256`.\n     */\n    function tryParseUint(string memory input) internal pure returns (bool success, uint256 value) {\n        return _tryParseUintUncheckedBounds(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseUint-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n     * character.\n     *\n     * NOTE: This function will revert if the result does not fit in a `uint256`.\n     */\n    function tryParseUint(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) internal pure returns (bool success, uint256 value) {\n        if (end > bytes(input).length || begin > end) return (false, 0);\n        return _tryParseUintUncheckedBounds(input, begin, end);\n    }\n\n    /**\n     * @dev Implementation of {tryParseUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n     * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n     */\n    function _tryParseUintUncheckedBounds(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) private pure returns (bool success, uint256 value) {\n        bytes memory buffer = bytes(input);\n\n        uint256 result = 0;\n        for (uint256 i = begin; i < end; ++i) {\n            uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n            if (chr > 9) return (false, 0);\n            result *= 10;\n            result += chr;\n        }\n        return (true, result);\n    }\n\n    /**\n     * @dev Parse a decimal string and returns the value as a `int256`.\n     *\n     * Requirements:\n     * - The string must be formatted as `[-+]?[0-9]*`\n     * - The result must fit in an `int256` type.\n     */\n    function parseInt(string memory input) internal pure returns (int256) {\n        return parseInt(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseInt-string} that parses a substring of `input` located between position `begin` (included) and\n     * `end` (excluded).\n     *\n     * Requirements:\n     * - The substring must be formatted as `[-+]?[0-9]*`\n     * - The result must fit in an `int256` type.\n     */\n    function parseInt(string memory input, uint256 begin, uint256 end) internal pure returns (int256) {\n        (bool success, int256 value) = tryParseInt(input, begin, end);\n        if (!success) revert StringsInvalidChar();\n        return value;\n    }\n\n    /**\n     * @dev Variant of {parseInt-string} that returns false if the parsing fails because of an invalid character or if\n     * the result does not fit in a `int256`.\n     *\n     * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n     */\n    function tryParseInt(string memory input) internal pure returns (bool success, int256 value) {\n        return _tryParseIntUncheckedBounds(input, 0, bytes(input).length);\n    }\n\n    uint256 private constant ABS_MIN_INT256 = 2 ** 255;\n\n    /**\n     * @dev Variant of {parseInt-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n     * character or if the result does not fit in a `int256`.\n     *\n     * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n     */\n    function tryParseInt(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) internal pure returns (bool success, int256 value) {\n        if (end > bytes(input).length || begin > end) return (false, 0);\n        return _tryParseIntUncheckedBounds(input, begin, end);\n    }\n\n    /**\n     * @dev Implementation of {tryParseInt-string-uint256-uint256} that does not check bounds. Caller should make sure that\n     * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n     */\n    function _tryParseIntUncheckedBounds(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) private pure returns (bool success, int256 value) {\n        bytes memory buffer = bytes(input);\n\n        // Check presence of a negative sign.\n        bytes1 sign = begin == end ? bytes1(0) : bytes1(_unsafeReadBytesOffset(buffer, begin)); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n        bool positiveSign = sign == bytes1(\"+\");\n        bool negativeSign = sign == bytes1(\"-\");\n        uint256 offset = (positiveSign || negativeSign).toUint();\n\n        (bool absSuccess, uint256 absValue) = tryParseUint(input, begin + offset, end);\n\n        if (absSuccess && absValue < ABS_MIN_INT256) {\n            return (true, negativeSign ? -int256(absValue) : int256(absValue));\n        } else if (absSuccess && negativeSign && absValue == ABS_MIN_INT256) {\n            return (true, type(int256).min);\n        } else return (false, 0);\n    }\n\n    /**\n     * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as a `uint256`.\n     *\n     * Requirements:\n     * - The string must be formatted as `(0x)?[0-9a-fA-F]*`\n     * - The result must fit in an `uint256` type.\n     */\n    function parseHexUint(string memory input) internal pure returns (uint256) {\n        return parseHexUint(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseHexUint-string} that parses a substring of `input` located between position `begin` (included) and\n     * `end` (excluded).\n     *\n     * Requirements:\n     * - The substring must be formatted as `(0x)?[0-9a-fA-F]*`\n     * - The result must fit in an `uint256` type.\n     */\n    function parseHexUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n        (bool success, uint256 value) = tryParseHexUint(input, begin, end);\n        if (!success) revert StringsInvalidChar();\n        return value;\n    }\n\n    /**\n     * @dev Variant of {parseHexUint-string} that returns false if the parsing fails because of an invalid character.\n     *\n     * NOTE: This function will revert if the result does not fit in a `uint256`.\n     */\n    function tryParseHexUint(string memory input) internal pure returns (bool success, uint256 value) {\n        return _tryParseHexUintUncheckedBounds(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseHexUint-string-uint256-uint256} that returns false if the parsing fails because of an\n     * invalid character.\n     *\n     * NOTE: This function will revert if the result does not fit in a `uint256`.\n     */\n    function tryParseHexUint(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) internal pure returns (bool success, uint256 value) {\n        if (end > bytes(input).length || begin > end) return (false, 0);\n        return _tryParseHexUintUncheckedBounds(input, begin, end);\n    }\n\n    /**\n     * @dev Implementation of {tryParseHexUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n     * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n     */\n    function _tryParseHexUintUncheckedBounds(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) private pure returns (bool success, uint256 value) {\n        bytes memory buffer = bytes(input);\n\n        // skip 0x prefix if present\n        bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(buffer, begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n        uint256 offset = hasPrefix.toUint() * 2;\n\n        uint256 result = 0;\n        for (uint256 i = begin + offset; i < end; ++i) {\n            uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n            if (chr > 15) return (false, 0);\n            result *= 16;\n            unchecked {\n                // Multiplying by 16 is equivalent to a shift of 4 bits (with additional overflow check).\n                // This guarantees that adding a value < 16 will not cause an overflow, hence the unchecked.\n                result += chr;\n            }\n        }\n        return (true, result);\n    }\n\n    /**\n     * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as an `address`.\n     *\n     * Requirements:\n     * - The string must be formatted as `(0x)?[0-9a-fA-F]{40}`\n     */\n    function parseAddress(string memory input) internal pure returns (address) {\n        return parseAddress(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseAddress-string} that parses a substring of `input` located between position `begin` (included) and\n     * `end` (excluded).\n     *\n     * Requirements:\n     * - The substring must be formatted as `(0x)?[0-9a-fA-F]{40}`\n     */\n    function parseAddress(string memory input, uint256 begin, uint256 end) internal pure returns (address) {\n        (bool success, address value) = tryParseAddress(input, begin, end);\n        if (!success) revert StringsInvalidAddressFormat();\n        return value;\n    }\n\n    /**\n     * @dev Variant of {parseAddress-string} that returns false if the parsing fails because the input is not a properly\n     * formatted address. See {parseAddress-string} requirements.\n     */\n    function tryParseAddress(string memory input) internal pure returns (bool success, address value) {\n        return tryParseAddress(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseAddress-string-uint256-uint256} that returns false if the parsing fails because input is not a properly\n     * formatted address. See {parseAddress-string-uint256-uint256} requirements.\n     */\n    function tryParseAddress(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) internal pure returns (bool success, address value) {\n        if (end > bytes(input).length || begin > end) return (false, address(0));\n\n        bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(bytes(input), begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n        uint256 expectedLength = 40 + hasPrefix.toUint() * 2;\n\n        // check that input is the correct length\n        if (end - begin == expectedLength) {\n            // length guarantees that this does not overflow, and value is at most type(uint160).max\n            (bool s, uint256 v) = _tryParseHexUintUncheckedBounds(input, begin, end);\n            return (s, address(uint160(v)));\n        } else {\n            return (false, address(0));\n        }\n    }\n\n    function _tryParseChr(bytes1 chr) private pure returns (uint8) {\n        uint8 value = uint8(chr);\n\n        // Try to parse `chr`:\n        // - Case 1: [0-9]\n        // - Case 2: [a-f]\n        // - Case 3: [A-F]\n        // - otherwise not supported\n        unchecked {\n            if (value > 47 && value < 58) value -= 48;\n            else if (value > 96 && value < 103) value -= 87;\n            else if (value > 64 && value < 71) value -= 55;\n            else return type(uint8).max;\n        }\n\n        return value;\n    }\n\n    /**\n     * @dev Escape special characters in JSON strings. This can be useful to prevent JSON injection in NFT metadata.\n     *\n     * WARNING: This function should only be used in double quoted JSON strings. Single quotes are not escaped.\n     *\n     * NOTE: This function escapes all unicode characters, and not just the ones in ranges defined in section 2.5 of\n     * RFC-4627 (U+0000 to U+001F, U+0022 and U+005C). ECMAScript's `JSON.parse` does recover escaped unicode\n     * characters that are not in this range, but other tooling may provide different results.\n     */\n    function escapeJSON(string memory input) internal pure returns (string memory) {\n        bytes memory buffer = bytes(input);\n        bytes memory output = new bytes(2 * buffer.length); // worst case scenario\n        uint256 outputLength = 0;\n\n        for (uint256 i = 0; i < buffer.length; ++i) {\n            bytes1 char = bytes1(_unsafeReadBytesOffset(buffer, i));\n            if (((SPECIAL_CHARS_LOOKUP & (1 << uint8(char))) != 0)) {\n                output[outputLength++] = \"\\\\\";\n                if (char == 0x08) output[outputLength++] = \"b\";\n                else if (char == 0x09) output[outputLength++] = \"t\";\n                else if (char == 0x0a) output[outputLength++] = \"n\";\n                else if (char == 0x0c) output[outputLength++] = \"f\";\n                else if (char == 0x0d) output[outputLength++] = \"r\";\n                else if (char == 0x5c) output[outputLength++] = \"\\\\\";\n                else if (char == 0x22) {\n                    // solhint-disable-next-line quotes\n                    output[outputLength++] = '\"';\n                }\n            } else {\n                output[outputLength++] = char;\n            }\n        }\n        // write the actual length and deallocate unused memory\n        assembly (\"memory-safe\") {\n            mstore(output, outputLength)\n            mstore(0x40, add(output, shl(5, shr(5, add(outputLength, 63)))))\n        }\n\n        return string(output);\n    }\n\n    /**\n     * @dev Reads a bytes32 from a bytes array without bounds checking.\n     *\n     * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the\n     * assembly block as such would prevent some optimizations.\n     */\n    function _unsafeReadBytesOffset(bytes memory buffer, uint256 offset) private pure returns (bytes32 value) {\n        // This is not memory safe in the general case, but all calls to this private function are within bounds.\n        assembly (\"memory-safe\") {\n            value := mload(add(add(buffer, 0x20), offset))\n        }\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/ERC4626Upgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC20/extensions/ERC4626.sol)\n\npragma solidity ^0.8.24;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {IERC20Metadata} from \"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\";\nimport {ERC20Upgradeable} from \"../ERC20Upgradeable.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {IERC4626} from \"@openzeppelin/contracts/interfaces/IERC4626.sol\";\nimport {LowLevelCall} from \"@openzeppelin/contracts/utils/LowLevelCall.sol\";\nimport {Memory} from \"@openzeppelin/contracts/utils/Memory.sol\";\nimport {Math} from \"@openzeppelin/contracts/utils/math/Math.sol\";\nimport {Initializable} from \"@openzeppelin/contracts/proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the ERC-4626 \"Tokenized Vault Standard\" as defined in\n * https://eips.ethereum.org/EIPS/eip-4626[ERC-4626].\n *\n * This extension allows the minting and burning of \"shares\" (represented using the ERC-20 inheritance) in exchange for\n * underlying \"assets\" through standardized {deposit}, {mint}, {redeem} and {burn} workflows. This contract extends\n * the ERC-20 standard. Any additional extensions included along it would affect the \"shares\" token represented by this\n * contract and not the \"assets\" token which is an independent contract.\n *\n * [CAUTION]\n * ====\n * In empty (or nearly empty) ERC-4626 vaults, deposits are at high risk of being stolen through frontrunning\n * with a \"donation\" to the vault that inflates the price of a share. This is variously known as a donation or inflation\n * attack and is essentially a problem of slippage. Vault deployers can protect against this attack by making an initial\n * deposit of a non-trivial amount of the asset, such that price manipulation becomes infeasible. Withdrawals may\n * similarly be affected by slippage. Users can protect against this attack as well as unexpected slippage in general by\n * verifying the amount received is as expected, using a wrapper that performs these checks such as\n * https://github.com/fei-protocol/ERC4626#erc4626router-and-base[ERC4626Router].\n *\n * Since v4.9, this implementation introduces configurable virtual assets and shares to help developers mitigate that risk.\n * The `_decimalsOffset()` corresponds to an offset in the decimal representation between the underlying asset's decimals\n * and the vault decimals. This offset also determines the rate of virtual shares to virtual assets in the vault, which\n * itself determines the initial exchange rate. While not fully preventing the attack, analysis shows that the default\n * offset (0) makes it non-profitable even if an attacker is able to capture value from multiple user deposits, as a result\n * of the value being captured by the virtual shares (out of the attacker's donation) matching the attacker's expected gains.\n * With a larger offset, the attack becomes orders of magnitude more expensive than it is profitable. More details about the\n * underlying math can be found xref:ROOT:erc4626.adoc#inflation-attack[here].\n *\n * The drawback of this approach is that the virtual shares do capture (a very small) part of the value being accrued\n * to the vault. Also, if the vault experiences losses, the users try to exit the vault, the virtual shares and assets\n * will cause the first user to exit to experience reduced losses in detriment to the last users that will experience\n * bigger losses. Developers willing to revert back to the pre-v4.9 behavior just need to override the\n * `_convertToShares` and `_convertToAssets` functions.\n *\n * To learn more, check out our xref:ROOT:erc4626.adoc[ERC-4626 guide].\n * ====\n *\n * [NOTE]\n * ====\n * When overriding this contract, some elements must be considered:\n *\n * * When overriding the behavior of the deposit or withdraw mechanisms, it is recommended to override the internal\n * functions. Overriding {_deposit} automatically affects both {deposit} and {mint}. Similarly, overriding {_withdraw}\n * automatically affects both {withdraw} and {redeem}. Overall it is not recommended to override the public facing\n * functions since that could lead to inconsistent behaviors between the {deposit} and {mint} or between {withdraw} and\n * {redeem}, which is documented to have lead to loss of funds.\n *\n * * Overrides to the deposit or withdraw mechanism must be reflected in the preview functions as well.\n *\n * * {maxWithdraw} depends on {maxRedeem}. Therefore, overriding {maxRedeem} only is enough. On the other hand,\n * overriding {maxWithdraw} only would have no effect on {maxRedeem}, and could create an inconsistency between the two\n * functions.\n *\n * * If {previewRedeem} is overridden to revert, {maxWithdraw} must be overridden as necessary to ensure it\n * always return successfully.\n * ====\n */\nabstract contract ERC4626Upgradeable is Initializable, ERC20Upgradeable, IERC4626 {\n    using Math for uint256;\n\n    /// @custom:storage-location erc7201:openzeppelin.storage.ERC4626\n    struct ERC4626Storage {\n        IERC20 _asset;\n        uint8 _underlyingDecimals;\n    }\n\n    // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.ERC4626\")) - 1)) & ~bytes32(uint256(0xff))\n    bytes32 private constant ERC4626StorageLocation = 0x0773e532dfede91f04b12a73d3d2acd361424f41f76b4fb79f090161e36b4e00;\n\n    function _getERC4626Storage() private pure returns (ERC4626Storage storage $) {\n        assembly {\n            $.slot := ERC4626StorageLocation\n        }\n    }\n\n    /**\n     * @dev Attempted to deposit more assets than the max amount for `receiver`.\n     */\n    error ERC4626ExceededMaxDeposit(address receiver, uint256 assets, uint256 max);\n\n    /**\n     * @dev Attempted to mint more shares than the max amount for `receiver`.\n     */\n    error ERC4626ExceededMaxMint(address receiver, uint256 shares, uint256 max);\n\n    /**\n     * @dev Attempted to withdraw more assets than the max amount for `receiver`.\n     */\n    error ERC4626ExceededMaxWithdraw(address owner, uint256 assets, uint256 max);\n\n    /**\n     * @dev Attempted to redeem more shares than the max amount for `receiver`.\n     */\n    error ERC4626ExceededMaxRedeem(address owner, uint256 shares, uint256 max);\n\n    /**\n     * @dev Set the underlying asset contract. This must be an ERC20-compatible contract (ERC-20 or ERC-777).\n     */\n    function __ERC4626_init(IERC20 asset_) internal onlyInitializing {\n        __ERC4626_init_unchained(asset_);\n    }\n\n    function __ERC4626_init_unchained(IERC20 asset_) internal onlyInitializing {\n        ERC4626Storage storage $ = _getERC4626Storage();\n        (bool success, uint8 assetDecimals) = _tryGetAssetDecimals(asset_);\n        $._underlyingDecimals = success ? assetDecimals : 18;\n        $._asset = asset_;\n    }\n\n    /**\n     * @dev Attempts to fetch the asset decimals. A return value of false indicates that the attempt failed in some way.\n     */\n    function _tryGetAssetDecimals(IERC20 asset_) private view returns (bool ok, uint8 assetDecimals) {\n        Memory.Pointer ptr = Memory.getFreeMemoryPointer();\n        (bool success, bytes32 returnedDecimals, ) = LowLevelCall.staticcallReturn64Bytes(\n            address(asset_),\n            abi.encodeCall(IERC20Metadata.decimals, ())\n        );\n        Memory.setFreeMemoryPointer(ptr);\n\n        return\n            (success && LowLevelCall.returnDataSize() >= 32 && uint256(returnedDecimals) <= type(uint8).max)\n                ? (true, uint8(uint256(returnedDecimals)))\n                : (false, 0);\n    }\n\n    /**\n     * @dev Decimals are computed by adding the decimal offset on top of the underlying asset's decimals. This\n     * \"original\" value is cached during construction of the vault contract. If this read operation fails (e.g., the\n     * asset has not been created yet), a default of 18 is used to represent the underlying asset's decimals.\n     *\n     * See {IERC20Metadata-decimals}.\n     */\n    function decimals() public view virtual override(IERC20Metadata, ERC20Upgradeable) returns (uint8) {\n        ERC4626Storage storage $ = _getERC4626Storage();\n        return $._underlyingDecimals + _decimalsOffset();\n    }\n\n    /// @inheritdoc IERC4626\n    function asset() public view virtual returns (address) {\n        ERC4626Storage storage $ = _getERC4626Storage();\n        return address($._asset);\n    }\n\n    /// @inheritdoc IERC4626\n    function totalAssets() public view virtual returns (uint256) {\n        return IERC20(asset()).balanceOf(address(this));\n    }\n\n    /// @inheritdoc IERC4626\n    function convertToShares(uint256 assets) public view virtual returns (uint256) {\n        return _convertToShares(assets, Math.Rounding.Floor);\n    }\n\n    /// @inheritdoc IERC4626\n    function convertToAssets(uint256 shares) public view virtual returns (uint256) {\n        return _convertToAssets(shares, Math.Rounding.Floor);\n    }\n\n    /// @inheritdoc IERC4626\n    function maxDeposit(address) public view virtual returns (uint256) {\n        return type(uint256).max;\n    }\n\n    /// @inheritdoc IERC4626\n    function maxMint(address) public view virtual returns (uint256) {\n        return type(uint256).max;\n    }\n\n    /// @inheritdoc IERC4626\n    function maxWithdraw(address owner) public view virtual returns (uint256) {\n        return previewRedeem(maxRedeem(owner));\n    }\n\n    /// @inheritdoc IERC4626\n    function maxRedeem(address owner) public view virtual returns (uint256) {\n        return balanceOf(owner);\n    }\n\n    /// @inheritdoc IERC4626\n    function previewDeposit(uint256 assets) public view virtual returns (uint256) {\n        return _convertToShares(assets, Math.Rounding.Floor);\n    }\n\n    /// @inheritdoc IERC4626\n    function previewMint(uint256 shares) public view virtual returns (uint256) {\n        return _convertToAssets(shares, Math.Rounding.Ceil);\n    }\n\n    /// @inheritdoc IERC4626\n    function previewWithdraw(uint256 assets) public view virtual returns (uint256) {\n        return _convertToShares(assets, Math.Rounding.Ceil);\n    }\n\n    /// @inheritdoc IERC4626\n    function previewRedeem(uint256 shares) public view virtual returns (uint256) {\n        return _convertToAssets(shares, Math.Rounding.Floor);\n    }\n\n    /// @inheritdoc IERC4626\n    function deposit(uint256 assets, address receiver) public virtual returns (uint256) {\n        uint256 maxAssets = maxDeposit(receiver);\n        if (assets > maxAssets) {\n            revert ERC4626ExceededMaxDeposit(receiver, assets, maxAssets);\n        }\n\n        uint256 shares = previewDeposit(assets);\n        _deposit(_msgSender(), receiver, assets, shares);\n\n        return shares;\n    }\n\n    /// @inheritdoc IERC4626\n    function mint(uint256 shares, address receiver) public virtual returns (uint256) {\n        uint256 maxShares = maxMint(receiver);\n        if (shares > maxShares) {\n            revert ERC4626ExceededMaxMint(receiver, shares, maxShares);\n        }\n\n        uint256 assets = previewMint(shares);\n        _deposit(_msgSender(), receiver, assets, shares);\n\n        return assets;\n    }\n\n    /// @inheritdoc IERC4626\n    function withdraw(uint256 assets, address receiver, address owner) public virtual returns (uint256) {\n        uint256 maxAssets = maxWithdraw(owner);\n        if (assets > maxAssets) {\n            revert ERC4626ExceededMaxWithdraw(owner, assets, maxAssets);\n        }\n\n        uint256 shares = previewWithdraw(assets);\n        _withdraw(_msgSender(), receiver, owner, assets, shares);\n\n        return shares;\n    }\n\n    /// @inheritdoc IERC4626\n    function redeem(uint256 shares, address receiver, address owner) public virtual returns (uint256) {\n        uint256 maxShares = maxRedeem(owner);\n        if (shares > maxShares) {\n            revert ERC4626ExceededMaxRedeem(owner, shares, maxShares);\n        }\n\n        uint256 assets = previewRedeem(shares);\n        _withdraw(_msgSender(), receiver, owner, assets, shares);\n\n        return assets;\n    }\n\n    /**\n     * @dev Internal conversion function (from assets to shares) with support for rounding direction.\n     */\n    function _convertToShares(uint256 assets, Math.Rounding rounding) internal view virtual returns (uint256) {\n        return assets.mulDiv(totalSupply() + 10 ** _decimalsOffset(), totalAssets() + 1, rounding);\n    }\n\n    /**\n     * @dev Internal conversion function (from shares to assets) with support for rounding direction.\n     */\n    function _convertToAssets(uint256 shares, Math.Rounding rounding) internal view virtual returns (uint256) {\n        return shares.mulDiv(totalAssets() + 1, totalSupply() + 10 ** _decimalsOffset(), rounding);\n    }\n\n    /**\n     * @dev Deposit/mint common workflow.\n     */\n    function _deposit(address caller, address receiver, uint256 assets, uint256 shares) internal virtual {\n        // If asset() is ERC-777, `transferFrom` can trigger a reentrancy BEFORE the transfer happens through the\n        // `tokensToSend` hook. On the other hand, the `tokenReceived` hook, that is triggered after the transfer,\n        // calls the vault, which is assumed not malicious.\n        //\n        // Conclusion: we need to do the transfer before we mint so that any reentrancy would happen before the\n        // assets are transferred and before the shares are minted, which is a valid state.\n        // slither-disable-next-line reentrancy-no-eth\n        SafeERC20.safeTransferFrom(IERC20(asset()), caller, address(this), assets);\n        _mint(receiver, shares);\n\n        emit Deposit(caller, receiver, assets, shares);\n    }\n\n    /**\n     * @dev Withdraw/redeem common workflow.\n     */\n    function _withdraw(\n        address caller,\n        address receiver,\n        address owner,\n        uint256 assets,\n        uint256 shares\n    ) internal virtual {\n        if (caller != owner) {\n            _spendAllowance(owner, caller, shares);\n        }\n\n        // If asset() is ERC-777, `transfer` can trigger a reentrancy AFTER the transfer happens through the\n        // `tokensReceived` hook. On the other hand, the `tokensToSend` hook, that is triggered before the transfer,\n        // calls the vault, which is assumed not malicious.\n        //\n        // Conclusion: we need to do the transfer after the burn so that any reentrancy would happen after the\n        // shares are burned and after the assets are transferred, which is a valid state.\n        _burn(owner, shares);\n        SafeERC20.safeTransfer(IERC20(asset()), receiver, assets);\n\n        emit Withdraw(caller, receiver, owner, assets, shares);\n    }\n\n    function _decimalsOffset() internal view virtual returns (uint8) {\n        return 0;\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n    /**\n     * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n     *\n     * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n     * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n     * one branch when needed, making this function more expensive.\n     */\n    function ternary(bool condition, int256 a, int256 b) internal pure returns (int256) {\n        unchecked {\n            // branchless ternary works because:\n            // b ^ (a ^ b) == a\n            // b ^ 0 == b\n            return b ^ ((a ^ b) * int256(SafeCast.toUint(condition)));\n        }\n    }\n\n    /**\n     * @dev Returns the largest of two signed numbers.\n     */\n    function max(int256 a, int256 b) internal pure returns (int256) {\n        return ternary(a > b, a, b);\n    }\n\n    /**\n     * @dev Returns the smallest of two signed numbers.\n     */\n    function min(int256 a, int256 b) internal pure returns (int256) {\n        return ternary(a < b, a, b);\n    }\n\n    /**\n     * @dev Returns the average of two signed numbers without overflow.\n     * The result is rounded towards zero.\n     */\n    function average(int256 a, int256 b) internal pure returns (int256) {\n        // Formula from the book \"Hacker's Delight\"\n        int256 x = (a & b) + ((a ^ b) >> 1);\n        return x + (int256(uint256(x) >> 255) & (a ^ b));\n    }\n\n    /**\n     * @dev Returns the absolute unsigned value of a signed value.\n     */\n    function abs(int256 n) internal pure returns (uint256) {\n        unchecked {\n            // Formula from the \"Bit Twiddling Hacks\" by Sean Eron Anderson.\n            // Since `n` is a signed integer, the generated bytecode will use the SAR opcode to perform the right shift,\n            // taking advantage of the most significant (or \"sign\" bit) in two's complement representation.\n            // This opcode adds new most significant bits set to the value of the previous most significant bit. As a result,\n            // the mask will either be `bytes32(0)` (if n is positive) or `~bytes32(0)` (if n is negative).\n            int256 mask = n >> 255;\n\n            // A `bytes32(0)` mask leaves the input unchanged, while a `~bytes32(0)` mask complements it.\n            return uint256((n + mask) ^ mask);\n        }\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/utils/Memory.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.24;\n\nimport {Panic} from \"./Panic.sol\";\nimport {Math} from \"./math/Math.sol\";\n\n/**\n * @dev Utilities to manipulate memory.\n *\n * Memory is a contiguous and dynamic byte array in which Solidity stores non-primitive types.\n * This library provides functions to manipulate pointers to this dynamic array and work with slices of it.\n *\n * Slices provide a view into a portion of memory without copying data, enabling efficient substring operations.\n *\n * WARNING: When manipulating memory pointers or slices, make sure to follow the Solidity documentation\n * guidelines for https://docs.soliditylang.org/en/v0.8.20/assembly.html#memory-safety[Memory Safety].\n */\nlibrary Memory {\n    type Pointer is bytes32;\n\n    /// @dev Returns a `Pointer` to the current free `Pointer`.\n    function getFreeMemoryPointer() internal pure returns (Pointer ptr) {\n        assembly (\"memory-safe\") {\n            ptr := mload(0x40)\n        }\n    }\n\n    /**\n     * @dev Sets the free `Pointer` to a specific value.\n     *\n     * WARNING: Everything after the pointer may be overwritten.\n     **/\n    function setFreeMemoryPointer(Pointer ptr) internal pure {\n        assembly (\"memory-safe\") {\n            mstore(0x40, ptr)\n        }\n    }\n\n    /// @dev `Pointer` to `bytes32`. Expects a pointer to a properly ABI-encoded `bytes` object.\n    function asBytes32(Pointer ptr) internal pure returns (bytes32) {\n        return Pointer.unwrap(ptr);\n    }\n\n    /// @dev `bytes32` to `Pointer`. Expects a pointer to a properly ABI-encoded `bytes` object.\n    function asPointer(bytes32 value) internal pure returns (Pointer) {\n        return Pointer.wrap(value);\n    }\n\n    /// @dev Move a pointer forward by a given offset.\n    function forward(Pointer ptr, uint256 offset) internal pure returns (Pointer) {\n        return Pointer.wrap(bytes32(uint256(Pointer.unwrap(ptr)) + offset));\n    }\n\n    /// @dev Equality comparator for memory pointers.\n    function equal(Pointer ptr1, Pointer ptr2) internal pure returns (bool) {\n        return Pointer.unwrap(ptr1) == Pointer.unwrap(ptr2);\n    }\n\n    type Slice is bytes32;\n\n    /// @dev Get a slice representation of a bytes object in memory\n    function asSlice(bytes memory self) internal pure returns (Slice result) {\n        assembly (\"memory-safe\") {\n            result := or(shl(128, mload(self)), add(self, 0x20))\n        }\n    }\n\n    /// @dev Returns the length of a given slice (equiv to self.length for calldata slices)\n    function length(Slice self) internal pure returns (uint256 result) {\n        assembly (\"memory-safe\") {\n            result := shr(128, self)\n        }\n    }\n\n    /// @dev Offset a memory slice (equivalent to self[start:] for calldata slices)\n    function slice(Slice self, uint256 offset) internal pure returns (Slice) {\n        if (offset > length(self)) Panic.panic(Panic.ARRAY_OUT_OF_BOUNDS);\n        return _asSlice(length(self) - offset, forward(_pointer(self), offset));\n    }\n\n    /// @dev Offset and cut a Slice (equivalent to self[start:start+length] for calldata slices)\n    function slice(Slice self, uint256 offset, uint256 len) internal pure returns (Slice) {\n        if (offset + len > length(self)) Panic.panic(Panic.ARRAY_OUT_OF_BOUNDS);\n        return _asSlice(len, forward(_pointer(self), offset));\n    }\n\n    /**\n     * @dev Read a bytes32 buffer from a given Slice at a specific offset\n     *\n     * NOTE: If offset > length(slice) - 0x20, part of the return value will be out of bound of the slice. These bytes are zeroed.\n     */\n    function load(Slice self, uint256 offset) internal pure returns (bytes32 value) {\n        uint256 outOfBoundBytes = Math.saturatingSub(0x20 + offset, length(self));\n        if (outOfBoundBytes > 0x1f) Panic.panic(Panic.ARRAY_OUT_OF_BOUNDS);\n\n        assembly (\"memory-safe\") {\n            value := and(mload(add(and(self, shr(128, not(0))), offset)), shl(mul(8, outOfBoundBytes), not(0)))\n        }\n    }\n\n    /// @dev Extract the data corresponding to a Slice (allocate new memory)\n    function toBytes(Slice self) internal pure returns (bytes memory result) {\n        uint256 len = length(self);\n        Memory.Pointer ptr = _pointer(self);\n        assembly (\"memory-safe\") {\n            result := mload(0x40)\n            mstore(result, len)\n            mcopy(add(result, 0x20), ptr, len)\n            mstore(0x40, add(add(result, len), 0x20))\n        }\n    }\n\n    /**\n     * @dev Private helper: create a slice from raw values (length and pointer)\n     *\n     * NOTE: this function MUST NOT be called with `len` or `ptr` that exceed `2**128-1`. This should never be\n     * the case of slices produced by `asSlice(bytes)`, and function that reduce the scope of slices\n     * (`slice(Slice,uint256)` and `slice(Slice,uint256, uint256)`) should not cause this issue if the parent slice is\n     * correct.\n     */\n    function _asSlice(uint256 len, Memory.Pointer ptr) private pure returns (Slice result) {\n        assembly (\"memory-safe\") {\n            result := or(shl(128, len), ptr)\n        }\n    }\n\n    /// @dev Returns the memory location of a given slice (equiv to self.offset for calldata slices)\n    function _pointer(Slice self) private pure returns (Memory.Pointer result) {\n        assembly (\"memory-safe\") {\n            result := and(self, shr(128, not(0)))\n        }\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/access/AccessControlUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (access/AccessControl.sol)\n\npragma solidity ^0.8.20;\n\nimport {IAccessControl} from \"@openzeppelin/contracts/access/IAccessControl.sol\";\nimport {ContextUpgradeable} from \"../utils/ContextUpgradeable.sol\";\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport {ERC165Upgradeable} from \"../utils/introspection/ERC165Upgradeable.sol\";\nimport {Initializable} from \"@openzeppelin/contracts/proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```solidity\n * bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```solidity\n * function foo() public {\n *     require(hasRole(MY_ROLE, msg.sender));\n *     ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}\n * to enforce additional security measures for this role.\n */\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControl, ERC165Upgradeable {\n    struct RoleData {\n        mapping(address account => bool) hasRole;\n        bytes32 adminRole;\n    }\n\n    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n\n\n    /// @custom:storage-location erc7201:openzeppelin.storage.AccessControl\n    struct AccessControlStorage {\n        mapping(bytes32 role => RoleData) _roles;\n    }\n\n    // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.AccessControl\")) - 1)) & ~bytes32(uint256(0xff))\n    bytes32 private constant AccessControlStorageLocation = 0x02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800;\n\n    function _getAccessControlStorage() private pure returns (AccessControlStorage storage $) {\n        assembly {\n            $.slot := AccessControlStorageLocation\n        }\n    }\n\n    /**\n     * @dev Modifier that checks that an account has a specific role. Reverts\n     * with an {AccessControlUnauthorizedAccount} error including the required role.\n     */\n    modifier onlyRole(bytes32 role) {\n        _checkRole(role);\n        _;\n    }\n\n    function __AccessControl_init() internal onlyInitializing {\n    }\n\n    function __AccessControl_init_unchained() internal onlyInitializing {\n    }\n    /// @inheritdoc IERC165\n    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @dev Returns `true` if `account` has been granted `role`.\n     */\n    function hasRole(bytes32 role, address account) public view virtual returns (bool) {\n        AccessControlStorage storage $ = _getAccessControlStorage();\n        return $._roles[role].hasRole[account];\n    }\n\n    /**\n     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`\n     * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.\n     */\n    function _checkRole(bytes32 role) internal view virtual {\n        _checkRole(role, _msgSender());\n    }\n\n    /**\n     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`\n     * is missing `role`.\n     */\n    function _checkRole(bytes32 role, address account) internal view virtual {\n        if (!hasRole(role, account)) {\n            revert AccessControlUnauthorizedAccount(account, role);\n        }\n    }\n\n    /**\n     * @dev Returns the admin role that controls `role`. See {grantRole} and\n     * {revokeRole}.\n     *\n     * To change a role's admin, use {_setRoleAdmin}.\n     */\n    function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) {\n        AccessControlStorage storage $ = _getAccessControlStorage();\n        return $._roles[role].adminRole;\n    }\n\n    /**\n     * @dev Grants `role` to `account`.\n     *\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     *\n     * May emit a {RoleGranted} event.\n     */\n    function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {\n        _grantRole(role, account);\n    }\n\n    /**\n     * @dev Revokes `role` from `account`.\n     *\n     * If `account` had been granted `role`, emits a {RoleRevoked} event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     *\n     * May emit a {RoleRevoked} event.\n     */\n    function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {\n        _revokeRole(role, account);\n    }\n\n    /**\n     * @dev Revokes `role` from the calling account.\n     *\n     * Roles are often managed via {grantRole} and {revokeRole}: this function's\n     * purpose is to provide a mechanism for accounts to lose their privileges\n     * if they are compromised (such as when a trusted device is misplaced).\n     *\n     * If the calling account had been revoked `role`, emits a {RoleRevoked}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must be `callerConfirmation`.\n     *\n     * May emit a {RoleRevoked} event.\n     */\n    function renounceRole(bytes32 role, address callerConfirmation) public virtual {\n        if (callerConfirmation != _msgSender()) {\n            revert AccessControlBadConfirmation();\n        }\n\n        _revokeRole(role, callerConfirmation);\n    }\n\n    /**\n     * @dev Sets `adminRole` as ``role``'s admin role.\n     *\n     * Emits a {RoleAdminChanged} event.\n     */\n    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\n        AccessControlStorage storage $ = _getAccessControlStorage();\n        bytes32 previousAdminRole = getRoleAdmin(role);\n        $._roles[role].adminRole = adminRole;\n        emit RoleAdminChanged(role, previousAdminRole, adminRole);\n    }\n\n    /**\n     * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.\n     *\n     * Internal function without access restriction.\n     *\n     * May emit a {RoleGranted} event.\n     */\n    function _grantRole(bytes32 role, address account) internal virtual returns (bool) {\n        AccessControlStorage storage $ = _getAccessControlStorage();\n        if (!hasRole(role, account)) {\n            $._roles[role].hasRole[account] = true;\n            emit RoleGranted(role, account, _msgSender());\n            return true;\n        } else {\n            return false;\n        }\n    }\n\n    /**\n     * @dev Attempts to revoke `role` from `account` and returns a boolean indicating if `role` was revoked.\n     *\n     * Internal function without access restriction.\n     *\n     * May emit a {RoleRevoked} event.\n     */\n    function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {\n        AccessControlStorage storage $ = _getAccessControlStorage();\n        if (hasRole(role, account)) {\n            $._roles[role].hasRole[account] = false;\n            emit RoleRevoked(role, account, _msgSender());\n            return true;\n        } else {\n            return false;\n        }\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/interfaces/IERC5267.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC5267.sol)\n\npragma solidity >=0.4.16;\n\ninterface IERC5267 {\n    /**\n     * @dev MAY be emitted to signal that the domain could have changed.\n     */\n    event EIP712DomainChanged();\n\n    /**\n     * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712\n     * signature.\n     */\n    function eip712Domain()\n        external\n        view\n        returns (\n            bytes1 fields,\n            string memory name,\n            string memory version,\n            uint256 chainId,\n            address verifyingContract,\n            bytes32 salt,\n            uint256[] memory extensions\n        );\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/utils/ReentrancyGuard.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\n\nimport {StorageSlot} from \"./StorageSlot.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 *\n * IMPORTANT: Deprecated. This storage-based reentrancy guard will be removed and replaced\n * by the {ReentrancyGuardTransient} variant in v6.0.\n *\n * @custom:stateless\n */\nabstract contract ReentrancyGuard {\n    using StorageSlot for bytes32;\n\n    // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.ReentrancyGuard\")) - 1)) & ~bytes32(uint256(0xff))\n    bytes32 private constant REENTRANCY_GUARD_STORAGE =\n        0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00;\n\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    /**\n     * @dev Unauthorized reentrant call.\n     */\n    error ReentrancyGuardReentrantCall();\n\n    constructor() {\n        _reentrancyGuardStorageSlot().getUint256Slot().value = 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    /**\n     * @dev A `view` only version of {nonReentrant}. Use to block view functions\n     * from being called, preventing reading from inconsistent contract state.\n     *\n     * CAUTION: This is a \"view\" modifier and does not change the reentrancy\n     * status. Use it only on view functions. For payable or non-payable functions,\n     * use the standard {nonReentrant} modifier instead.\n     */\n    modifier nonReentrantView() {\n        _nonReentrantBeforeView();\n        _;\n    }\n\n    function _nonReentrantBeforeView() private view {\n        if (_reentrancyGuardEntered()) {\n            revert ReentrancyGuardReentrantCall();\n        }\n    }\n\n    function _nonReentrantBefore() private {\n        // On the first call to nonReentrant, _status will be NOT_ENTERED\n        _nonReentrantBeforeView();\n\n        // Any calls to nonReentrant after this point will fail\n        _reentrancyGuardStorageSlot().getUint256Slot().value = ENTERED;\n    }\n\n    function _nonReentrantAfter() private {\n        // By storing the original value once again, a refund is triggered (see\n        // https://eips.ethereum.org/EIPS/eip-2200)\n        _reentrancyGuardStorageSlot().getUint256Slot().value = NOT_ENTERED;\n    }\n\n    /**\n     * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n     * `nonReentrant` function in the call stack.\n     */\n    function _reentrancyGuardEntered() internal view returns (bool) {\n        return _reentrancyGuardStorageSlot().getUint256Slot().value == ENTERED;\n    }\n\n    function _reentrancyGuardStorageSlot() internal pure virtual returns (bytes32) {\n        return REENTRANCY_GUARD_STORAGE;\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/utils/math/SafeCast.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol)\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeCast {\n    /**\n     * @dev Value doesn't fit in an uint of `bits` size.\n     */\n    error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);\n\n    /**\n     * @dev An int value doesn't fit in an uint of `bits` size.\n     */\n    error SafeCastOverflowedIntToUint(int256 value);\n\n    /**\n     * @dev Value doesn't fit in an int of `bits` size.\n     */\n    error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);\n\n    /**\n     * @dev An uint value doesn't fit in an int of `bits` size.\n     */\n    error SafeCastOverflowedUintToInt(uint256 value);\n\n    /**\n     * @dev Returns the downcasted uint248 from uint256, reverting on\n     * overflow (when the input is greater than largest uint248).\n     *\n     * Counterpart to Solidity's `uint248` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 248 bits\n     */\n    function toUint248(uint256 value) internal pure returns (uint248) {\n        if (value > type(uint248).max) {\n            revert SafeCastOverflowedUintDowncast(248, value);\n        }\n        return uint248(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint240 from uint256, reverting on\n     * overflow (when the input is greater than largest uint240).\n     *\n     * Counterpart to Solidity's `uint240` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 240 bits\n     */\n    function toUint240(uint256 value) internal pure returns (uint240) {\n        if (value > type(uint240).max) {\n            revert SafeCastOverflowedUintDowncast(240, value);\n        }\n        return uint240(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint232 from uint256, reverting on\n     * overflow (when the input is greater than largest uint232).\n     *\n     * Counterpart to Solidity's `uint232` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 232 bits\n     */\n    function toUint232(uint256 value) internal pure returns (uint232) {\n        if (value > type(uint232).max) {\n            revert SafeCastOverflowedUintDowncast(232, value);\n        }\n        return uint232(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint224 from uint256, reverting on\n     * overflow (when the input is greater than largest uint224).\n     *\n     * Counterpart to Solidity's `uint224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toUint224(uint256 value) internal pure returns (uint224) {\n        if (value > type(uint224).max) {\n            revert SafeCastOverflowedUintDowncast(224, value);\n        }\n        return uint224(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint216 from uint256, reverting on\n     * overflow (when the input is greater than largest uint216).\n     *\n     * Counterpart to Solidity's `uint216` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 216 bits\n     */\n    function toUint216(uint256 value) internal pure returns (uint216) {\n        if (value > type(uint216).max) {\n            revert SafeCastOverflowedUintDowncast(216, value);\n        }\n        return uint216(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint208 from uint256, reverting on\n     * overflow (when the input is greater than largest uint208).\n     *\n     * Counterpart to Solidity's `uint208` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 208 bits\n     */\n    function toUint208(uint256 value) internal pure returns (uint208) {\n        if (value > type(uint208).max) {\n            revert SafeCastOverflowedUintDowncast(208, value);\n        }\n        return uint208(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint200 from uint256, reverting on\n     * overflow (when the input is greater than largest uint200).\n     *\n     * Counterpart to Solidity's `uint200` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 200 bits\n     */\n    function toUint200(uint256 value) internal pure returns (uint200) {\n        if (value > type(uint200).max) {\n            revert SafeCastOverflowedUintDowncast(200, value);\n        }\n        return uint200(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint192 from uint256, reverting on\n     * overflow (when the input is greater than largest uint192).\n     *\n     * Counterpart to Solidity's `uint192` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 192 bits\n     */\n    function toUint192(uint256 value) internal pure returns (uint192) {\n        if (value > type(uint192).max) {\n            revert SafeCastOverflowedUintDowncast(192, value);\n        }\n        return uint192(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint184 from uint256, reverting on\n     * overflow (when the input is greater than largest uint184).\n     *\n     * Counterpart to Solidity's `uint184` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 184 bits\n     */\n    function toUint184(uint256 value) internal pure returns (uint184) {\n        if (value > type(uint184).max) {\n            revert SafeCastOverflowedUintDowncast(184, value);\n        }\n        return uint184(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint176 from uint256, reverting on\n     * overflow (when the input is greater than largest uint176).\n     *\n     * Counterpart to Solidity's `uint176` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 176 bits\n     */\n    function toUint176(uint256 value) internal pure returns (uint176) {\n        if (value > type(uint176).max) {\n            revert SafeCastOverflowedUintDowncast(176, value);\n        }\n        return uint176(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint168 from uint256, reverting on\n     * overflow (when the input is greater than largest uint168).\n     *\n     * Counterpart to Solidity's `uint168` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 168 bits\n     */\n    function toUint168(uint256 value) internal pure returns (uint168) {\n        if (value > type(uint168).max) {\n            revert SafeCastOverflowedUintDowncast(168, value);\n        }\n        return uint168(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint160 from uint256, reverting on\n     * overflow (when the input is greater than largest uint160).\n     *\n     * Counterpart to Solidity's `uint160` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 160 bits\n     */\n    function toUint160(uint256 value) internal pure returns (uint160) {\n        if (value > type(uint160).max) {\n            revert SafeCastOverflowedUintDowncast(160, value);\n        }\n        return uint160(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint152 from uint256, reverting on\n     * overflow (when the input is greater than largest uint152).\n     *\n     * Counterpart to Solidity's `uint152` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 152 bits\n     */\n    function toUint152(uint256 value) internal pure returns (uint152) {\n        if (value > type(uint152).max) {\n            revert SafeCastOverflowedUintDowncast(152, value);\n        }\n        return uint152(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint144 from uint256, reverting on\n     * overflow (when the input is greater than largest uint144).\n     *\n     * Counterpart to Solidity's `uint144` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 144 bits\n     */\n    function toUint144(uint256 value) internal pure returns (uint144) {\n        if (value > type(uint144).max) {\n            revert SafeCastOverflowedUintDowncast(144, value);\n        }\n        return uint144(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint136 from uint256, reverting on\n     * overflow (when the input is greater than largest uint136).\n     *\n     * Counterpart to Solidity's `uint136` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 136 bits\n     */\n    function toUint136(uint256 value) internal pure returns (uint136) {\n        if (value > type(uint136).max) {\n            revert SafeCastOverflowedUintDowncast(136, value);\n        }\n        return uint136(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint128 from uint256, reverting on\n     * overflow (when the input is greater than largest uint128).\n     *\n     * Counterpart to Solidity's `uint128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toUint128(uint256 value) internal pure returns (uint128) {\n        if (value > type(uint128).max) {\n            revert SafeCastOverflowedUintDowncast(128, value);\n        }\n        return uint128(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint120 from uint256, reverting on\n     * overflow (when the input is greater than largest uint120).\n     *\n     * Counterpart to Solidity's `uint120` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 120 bits\n     */\n    function toUint120(uint256 value) internal pure returns (uint120) {\n        if (value > type(uint120).max) {\n            revert SafeCastOverflowedUintDowncast(120, value);\n        }\n        return uint120(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint112 from uint256, reverting on\n     * overflow (when the input is greater than largest uint112).\n     *\n     * Counterpart to Solidity's `uint112` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 112 bits\n     */\n    function toUint112(uint256 value) internal pure returns (uint112) {\n        if (value > type(uint112).max) {\n            revert SafeCastOverflowedUintDowncast(112, value);\n        }\n        return uint112(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint104 from uint256, reverting on\n     * overflow (when the input is greater than largest uint104).\n     *\n     * Counterpart to Solidity's `uint104` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 104 bits\n     */\n    function toUint104(uint256 value) internal pure returns (uint104) {\n        if (value > type(uint104).max) {\n            revert SafeCastOverflowedUintDowncast(104, value);\n        }\n        return uint104(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint96 from uint256, reverting on\n     * overflow (when the input is greater than largest uint96).\n     *\n     * Counterpart to Solidity's `uint96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toUint96(uint256 value) internal pure returns (uint96) {\n        if (value > type(uint96).max) {\n            revert SafeCastOverflowedUintDowncast(96, value);\n        }\n        return uint96(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint88 from uint256, reverting on\n     * overflow (when the input is greater than largest uint88).\n     *\n     * Counterpart to Solidity's `uint88` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 88 bits\n     */\n    function toUint88(uint256 value) internal pure returns (uint88) {\n        if (value > type(uint88).max) {\n            revert SafeCastOverflowedUintDowncast(88, value);\n        }\n        return uint88(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint80 from uint256, reverting on\n     * overflow (when the input is greater than largest uint80).\n     *\n     * Counterpart to Solidity's `uint80` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 80 bits\n     */\n    function toUint80(uint256 value) internal pure returns (uint80) {\n        if (value > type(uint80).max) {\n            revert SafeCastOverflowedUintDowncast(80, value);\n        }\n        return uint80(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint72 from uint256, reverting on\n     * overflow (when the input is greater than largest uint72).\n     *\n     * Counterpart to Solidity's `uint72` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 72 bits\n     */\n    function toUint72(uint256 value) internal pure returns (uint72) {\n        if (value > type(uint72).max) {\n            revert SafeCastOverflowedUintDowncast(72, value);\n        }\n        return uint72(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint64 from uint256, reverting on\n     * overflow (when the input is greater than largest uint64).\n     *\n     * Counterpart to Solidity's `uint64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toUint64(uint256 value) internal pure returns (uint64) {\n        if (value > type(uint64).max) {\n            revert SafeCastOverflowedUintDowncast(64, value);\n        }\n        return uint64(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint56 from uint256, reverting on\n     * overflow (when the input is greater than largest uint56).\n     *\n     * Counterpart to Solidity's `uint56` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 56 bits\n     */\n    function toUint56(uint256 value) internal pure returns (uint56) {\n        if (value > type(uint56).max) {\n            revert SafeCastOverflowedUintDowncast(56, value);\n        }\n        return uint56(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint48 from uint256, reverting on\n     * overflow (when the input is greater than largest uint48).\n     *\n     * Counterpart to Solidity's `uint48` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 48 bits\n     */\n    function toUint48(uint256 value) internal pure returns (uint48) {\n        if (value > type(uint48).max) {\n            revert SafeCastOverflowedUintDowncast(48, value);\n        }\n        return uint48(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint40 from uint256, reverting on\n     * overflow (when the input is greater than largest uint40).\n     *\n     * Counterpart to Solidity's `uint40` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 40 bits\n     */\n    function toUint40(uint256 value) internal pure returns (uint40) {\n        if (value > type(uint40).max) {\n            revert SafeCastOverflowedUintDowncast(40, value);\n        }\n        return uint40(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint32 from uint256, reverting on\n     * overflow (when the input is greater than largest uint32).\n     *\n     * Counterpart to Solidity's `uint32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toUint32(uint256 value) internal pure returns (uint32) {\n        if (value > type(uint32).max) {\n            revert SafeCastOverflowedUintDowncast(32, value);\n        }\n        return uint32(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint24 from uint256, reverting on\n     * overflow (when the input is greater than largest uint24).\n     *\n     * Counterpart to Solidity's `uint24` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 24 bits\n     */\n    function toUint24(uint256 value) internal pure returns (uint24) {\n        if (value > type(uint24).max) {\n            revert SafeCastOverflowedUintDowncast(24, value);\n        }\n        return uint24(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint16 from uint256, reverting on\n     * overflow (when the input is greater than largest uint16).\n     *\n     * Counterpart to Solidity's `uint16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toUint16(uint256 value) internal pure returns (uint16) {\n        if (value > type(uint16).max) {\n            revert SafeCastOverflowedUintDowncast(16, value);\n        }\n        return uint16(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint8 from uint256, reverting on\n     * overflow (when the input is greater than largest uint8).\n     *\n     * Counterpart to Solidity's `uint8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits\n     */\n    function toUint8(uint256 value) internal pure returns (uint8) {\n        if (value > type(uint8).max) {\n            revert SafeCastOverflowedUintDowncast(8, value);\n        }\n        return uint8(value);\n    }\n\n    /**\n     * @dev Converts a signed int256 into an unsigned uint256.\n     *\n     * Requirements:\n     *\n     * - input must be greater than or equal to 0.\n     */\n    function toUint256(int256 value) internal pure returns (uint256) {\n        if (value < 0) {\n            revert SafeCastOverflowedIntToUint(value);\n        }\n        return uint256(value);\n    }\n\n    /**\n     * @dev Returns the downcasted int248 from int256, reverting on\n     * overflow (when the input is less than smallest int248 or\n     * greater than largest int248).\n     *\n     * Counterpart to Solidity's `int248` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 248 bits\n     */\n    function toInt248(int256 value) internal pure returns (int248 downcasted) {\n        downcasted = int248(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(248, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int240 from int256, reverting on\n     * overflow (when the input is less than smallest int240 or\n     * greater than largest int240).\n     *\n     * Counterpart to Solidity's `int240` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 240 bits\n     */\n    function toInt240(int256 value) internal pure returns (int240 downcasted) {\n        downcasted = int240(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(240, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int232 from int256, reverting on\n     * overflow (when the input is less than smallest int232 or\n     * greater than largest int232).\n     *\n     * Counterpart to Solidity's `int232` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 232 bits\n     */\n    function toInt232(int256 value) internal pure returns (int232 downcasted) {\n        downcasted = int232(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(232, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int224 from int256, reverting on\n     * overflow (when the input is less than smallest int224 or\n     * greater than largest int224).\n     *\n     * Counterpart to Solidity's `int224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toInt224(int256 value) internal pure returns (int224 downcasted) {\n        downcasted = int224(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(224, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int216 from int256, reverting on\n     * overflow (when the input is less than smallest int216 or\n     * greater than largest int216).\n     *\n     * Counterpart to Solidity's `int216` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 216 bits\n     */\n    function toInt216(int256 value) internal pure returns (int216 downcasted) {\n        downcasted = int216(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(216, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int208 from int256, reverting on\n     * overflow (when the input is less than smallest int208 or\n     * greater than largest int208).\n     *\n     * Counterpart to Solidity's `int208` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 208 bits\n     */\n    function toInt208(int256 value) internal pure returns (int208 downcasted) {\n        downcasted = int208(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(208, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int200 from int256, reverting on\n     * overflow (when the input is less than smallest int200 or\n     * greater than largest int200).\n     *\n     * Counterpart to Solidity's `int200` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 200 bits\n     */\n    function toInt200(int256 value) internal pure returns (int200 downcasted) {\n        downcasted = int200(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(200, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int192 from int256, reverting on\n     * overflow (when the input is less than smallest int192 or\n     * greater than largest int192).\n     *\n     * Counterpart to Solidity's `int192` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 192 bits\n     */\n    function toInt192(int256 value) internal pure returns (int192 downcasted) {\n        downcasted = int192(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(192, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int184 from int256, reverting on\n     * overflow (when the input is less than smallest int184 or\n     * greater than largest int184).\n     *\n     * Counterpart to Solidity's `int184` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 184 bits\n     */\n    function toInt184(int256 value) internal pure returns (int184 downcasted) {\n        downcasted = int184(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(184, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int176 from int256, reverting on\n     * overflow (when the input is less than smallest int176 or\n     * greater than largest int176).\n     *\n     * Counterpart to Solidity's `int176` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 176 bits\n     */\n    function toInt176(int256 value) internal pure returns (int176 downcasted) {\n        downcasted = int176(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(176, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int168 from int256, reverting on\n     * overflow (when the input is less than smallest int168 or\n     * greater than largest int168).\n     *\n     * Counterpart to Solidity's `int168` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 168 bits\n     */\n    function toInt168(int256 value) internal pure returns (int168 downcasted) {\n        downcasted = int168(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(168, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int160 from int256, reverting on\n     * overflow (when the input is less than smallest int160 or\n     * greater than largest int160).\n     *\n     * Counterpart to Solidity's `int160` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 160 bits\n     */\n    function toInt160(int256 value) internal pure returns (int160 downcasted) {\n        downcasted = int160(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(160, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int152 from int256, reverting on\n     * overflow (when the input is less than smallest int152 or\n     * greater than largest int152).\n     *\n     * Counterpart to Solidity's `int152` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 152 bits\n     */\n    function toInt152(int256 value) internal pure returns (int152 downcasted) {\n        downcasted = int152(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(152, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int144 from int256, reverting on\n     * overflow (when the input is less than smallest int144 or\n     * greater than largest int144).\n     *\n     * Counterpart to Solidity's `int144` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 144 bits\n     */\n    function toInt144(int256 value) internal pure returns (int144 downcasted) {\n        downcasted = int144(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(144, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int136 from int256, reverting on\n     * overflow (when the input is less than smallest int136 or\n     * greater than largest int136).\n     *\n     * Counterpart to Solidity's `int136` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 136 bits\n     */\n    function toInt136(int256 value) internal pure returns (int136 downcasted) {\n        downcasted = int136(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(136, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int128 from int256, reverting on\n     * overflow (when the input is less than smallest int128 or\n     * greater than largest int128).\n     *\n     * Counterpart to Solidity's `int128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toInt128(int256 value) internal pure returns (int128 downcasted) {\n        downcasted = int128(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(128, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int120 from int256, reverting on\n     * overflow (when the input is less than smallest int120 or\n     * greater than largest int120).\n     *\n     * Counterpart to Solidity's `int120` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 120 bits\n     */\n    function toInt120(int256 value) internal pure returns (int120 downcasted) {\n        downcasted = int120(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(120, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int112 from int256, reverting on\n     * overflow (when the input is less than smallest int112 or\n     * greater than largest int112).\n     *\n     * Counterpart to Solidity's `int112` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 112 bits\n     */\n    function toInt112(int256 value) internal pure returns (int112 downcasted) {\n        downcasted = int112(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(112, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int104 from int256, reverting on\n     * overflow (when the input is less than smallest int104 or\n     * greater than largest int104).\n     *\n     * Counterpart to Solidity's `int104` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 104 bits\n     */\n    function toInt104(int256 value) internal pure returns (int104 downcasted) {\n        downcasted = int104(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(104, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int96 from int256, reverting on\n     * overflow (when the input is less than smallest int96 or\n     * greater than largest int96).\n     *\n     * Counterpart to Solidity's `int96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toInt96(int256 value) internal pure returns (int96 downcasted) {\n        downcasted = int96(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(96, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int88 from int256, reverting on\n     * overflow (when the input is less than smallest int88 or\n     * greater than largest int88).\n     *\n     * Counterpart to Solidity's `int88` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 88 bits\n     */\n    function toInt88(int256 value) internal pure returns (int88 downcasted) {\n        downcasted = int88(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(88, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int80 from int256, reverting on\n     * overflow (when the input is less than smallest int80 or\n     * greater than largest int80).\n     *\n     * Counterpart to Solidity's `int80` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 80 bits\n     */\n    function toInt80(int256 value) internal pure returns (int80 downcasted) {\n        downcasted = int80(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(80, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int72 from int256, reverting on\n     * overflow (when the input is less than smallest int72 or\n     * greater than largest int72).\n     *\n     * Counterpart to Solidity's `int72` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 72 bits\n     */\n    function toInt72(int256 value) internal pure returns (int72 downcasted) {\n        downcasted = int72(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(72, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int64 from int256, reverting on\n     * overflow (when the input is less than smallest int64 or\n     * greater than largest int64).\n     *\n     * Counterpart to Solidity's `int64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toInt64(int256 value) internal pure returns (int64 downcasted) {\n        downcasted = int64(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(64, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int56 from int256, reverting on\n     * overflow (when the input is less than smallest int56 or\n     * greater than largest int56).\n     *\n     * Counterpart to Solidity's `int56` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 56 bits\n     */\n    function toInt56(int256 value) internal pure returns (int56 downcasted) {\n        downcasted = int56(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(56, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int48 from int256, reverting on\n     * overflow (when the input is less than smallest int48 or\n     * greater than largest int48).\n     *\n     * Counterpart to Solidity's `int48` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 48 bits\n     */\n    function toInt48(int256 value) internal pure returns (int48 downcasted) {\n        downcasted = int48(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(48, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int40 from int256, reverting on\n     * overflow (when the input is less than smallest int40 or\n     * greater than largest int40).\n     *\n     * Counterpart to Solidity's `int40` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 40 bits\n     */\n    function toInt40(int256 value) internal pure returns (int40 downcasted) {\n        downcasted = int40(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(40, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int32 from int256, reverting on\n     * overflow (when the input is less than smallest int32 or\n     * greater than largest int32).\n     *\n     * Counterpart to Solidity's `int32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toInt32(int256 value) internal pure returns (int32 downcasted) {\n        downcasted = int32(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(32, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int24 from int256, reverting on\n     * overflow (when the input is less than smallest int24 or\n     * greater than largest int24).\n     *\n     * Counterpart to Solidity's `int24` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 24 bits\n     */\n    function toInt24(int256 value) internal pure returns (int24 downcasted) {\n        downcasted = int24(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(24, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int16 from int256, reverting on\n     * overflow (when the input is less than smallest int16 or\n     * greater than largest int16).\n     *\n     * Counterpart to Solidity's `int16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toInt16(int256 value) internal pure returns (int16 downcasted) {\n        downcasted = int16(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(16, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int8 from int256, reverting on\n     * overflow (when the input is less than smallest int8 or\n     * greater than largest int8).\n     *\n     * Counterpart to Solidity's `int8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits\n     */\n    function toInt8(int256 value) internal pure returns (int8 downcasted) {\n        downcasted = int8(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(8, value);\n        }\n    }\n\n    /**\n     * @dev Converts an unsigned uint256 into a signed int256.\n     *\n     * Requirements:\n     *\n     * - input must be less than or equal to maxInt256.\n     */\n    function toInt256(uint256 value) internal pure returns (int256) {\n        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\n        if (value > uint256(type(int256).max)) {\n            revert SafeCastOverflowedUintToInt(value);\n        }\n        return int256(value);\n    }\n\n    /**\n     * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\n     */\n    function toUint(bool b) internal pure returns (uint256 u) {\n        assembly (\"memory-safe\") {\n            u := iszero(iszero(b))\n        }\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/utils/introspection/ERC165Upgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport {Initializable} from \"@openzeppelin/contracts/proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n */\nabstract contract ERC165Upgradeable is Initializable, IERC165 {\n    function __ERC165_init() internal onlyInitializing {\n    }\n\n    function __ERC165_init_unchained() internal onlyInitializing {\n    }\n    /// @inheritdoc IERC165\n    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n        return interfaceId == type(IERC165).interfaceId;\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/utils/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":"lib/openzeppelin-contracts/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":"lib/openzeppelin-contracts-upgradeable/contracts/utils/PausableUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/Pausable.sol)\n\npragma solidity ^0.8.20;\n\nimport {ContextUpgradeable} from \"../utils/ContextUpgradeable.sol\";\nimport {Initializable} from \"@openzeppelin/contracts/proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\n    /// @custom:storage-location erc7201:openzeppelin.storage.Pausable\n    struct PausableStorage {\n        bool _paused;\n    }\n\n    // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Pausable\")) - 1)) & ~bytes32(uint256(0xff))\n    bytes32 private constant PausableStorageLocation = 0xcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300;\n\n    function _getPausableStorage() private pure returns (PausableStorage storage $) {\n        assembly {\n            $.slot := PausableStorageLocation\n        }\n    }\n\n    /**\n     * @dev Emitted when the pause is triggered by `account`.\n     */\n    event Paused(address account);\n\n    /**\n     * @dev Emitted when the pause is lifted by `account`.\n     */\n    event Unpaused(address account);\n\n    /**\n     * @dev The operation failed because the contract is paused.\n     */\n    error EnforcedPause();\n\n    /**\n     * @dev The operation failed because the contract is not paused.\n     */\n    error ExpectedPause();\n\n    /**\n     * @dev Modifier to make a function callable only when the contract is not paused.\n     *\n     * Requirements:\n     *\n     * - The contract must not be paused.\n     */\n    modifier whenNotPaused() {\n        _requireNotPaused();\n        _;\n    }\n\n    /**\n     * @dev Modifier to make a function callable only when the contract is paused.\n     *\n     * Requirements:\n     *\n     * - The contract must be paused.\n     */\n    modifier whenPaused() {\n        _requirePaused();\n        _;\n    }\n\n    function __Pausable_init() internal onlyInitializing {\n    }\n\n    function __Pausable_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev Returns true if the contract is paused, and false otherwise.\n     */\n    function paused() public view virtual returns (bool) {\n        PausableStorage storage $ = _getPausableStorage();\n        return $._paused;\n    }\n\n    /**\n     * @dev Throws if the contract is paused.\n     */\n    function _requireNotPaused() internal view virtual {\n        if (paused()) {\n            revert EnforcedPause();\n        }\n    }\n\n    /**\n     * @dev Throws if the contract is not paused.\n     */\n    function _requirePaused() internal view virtual {\n        if (!paused()) {\n            revert ExpectedPause();\n        }\n    }\n\n    /**\n     * @dev Triggers stopped state.\n     *\n     * Requirements:\n     *\n     * - The contract must not be paused.\n     */\n    function _pause() internal virtual whenNotPaused {\n        PausableStorage storage $ = _getPausableStorage();\n        $._paused = true;\n        emit Paused(_msgSender());\n    }\n\n    /**\n     * @dev Returns to normal state.\n     *\n     * Requirements:\n     *\n     * - The contract must be paused.\n     */\n    function _unpause() internal virtual whenPaused {\n        PausableStorage storage $ = _getPausableStorage();\n        $._paused = false;\n        emit Unpaused(_msgSender());\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Permit.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Permit.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev Interface of the ERC-20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[ERC-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC-20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n *\n * ==== Security Considerations\n *\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\n * generally recommended is:\n *\n * ```solidity\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\n *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\n *     doThing(..., value);\n * }\n *\n * function doThing(..., uint256 value) public {\n *     token.safeTransferFrom(msg.sender, address(this), value);\n *     ...\n * }\n * ```\n *\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\n * {SafeERC20-safeTransferFrom}).\n *\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\n * contracts should have entry points that don't rely on permit.\n */\ninterface IERC20Permit {\n    /**\n     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n     * given ``owner``'s signed approval.\n     *\n     * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n     * ordering also applies here.\n     *\n     * Emits an {Approval} event.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     * - `deadline` must be a timestamp in the future.\n     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n     * over the EIP712-formatted function arguments.\n     * - the signature must use ``owner``'s current nonce (see {nonces}).\n     *\n     * For more information on the signature format, see the\n     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n     * section].\n     *\n     * CAUTION: See Security Considerations above.\n     */\n    function permit(\n        address owner,\n        address spender,\n        uint256 value,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) external;\n\n    /**\n     * @dev Returns the current nonce for `owner`. This value must be\n     * included whenever a signature is generated for {permit}.\n     *\n     * Every successful call to {permit} increases ``owner``'s nonce by one. This\n     * prevents a signature from being used multiple times.\n     */\n    function nonces(address owner) external view returns (uint256);\n\n    /**\n     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n     */\n    // solhint-disable-next-line func-name-mixedcase\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n"},{"file_path":"src/v2/interfaces/IStakedUSDat.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity 0.8.36;\n\nimport {IERC4626} from \"@openzeppelin/contracts/interfaces/IERC4626.sol\";\nimport {ISTRConExecutionPolicy} from \"./ISTRConExecutionPolicy.sol\";\nimport {ISTRCMirrorModule} from \"./modules/ISTRCMirrorModule.sol\";\nimport {ISTRConModule} from \"./modules/ISTRConModule.sol\";\n\n/**\n * @title IStakedUSDat\n * @author Saturn\n * @notice Interface for the StakedUSDat (sUSDat) ERC4626 vault contract.\n * @dev StakedUSDat is a UUPS upgradeable ERC4626 vault for staking USDat.\n * Users deposit USDat and receive sUSDat shares representing their stake, with\n * asynchronous redemptions, compliance controls, and explicit market modes.\n */\ninterface IStakedUSDat is IERC4626 {\n    // ============ Enums ============\n\n    /**\n     * @notice Outcome of attempting to settle a queued withdrawal request.\n     */\n    enum RedemptionResult {\n        Settled,\n        BelowLimit,\n        InsufficientLiquidity\n    }\n\n    /**\n     * @notice Vault operating mode selected for current market conditions.\n     */\n    enum MarketMode {\n        Regular,\n        Elevated,\n        Restricted\n    }\n\n    // ============ V2 Initialization ============\n\n    struct V2Config {\n        ISTRCMirrorModule strcMirrorModule;\n        ISTRConModule strconModule;\n        ISTRConExecutionPolicy executionPolicy;\n        address recoveryAddress;\n        address surplusSource;\n        address executionVehicle;\n        uint16 baseRedemptionFeeBps;\n        uint16 elevatedRedemptionFeeBps;\n        uint16 elevatedDepositFeeBps;\n        uint16 executionToleranceBps;\n        uint16 migrationToleranceBps;\n        uint128 initialExecutionCapacity;\n        uint128 initialExecutionRefillPerDay;\n    }\n\n    struct V2Roles {\n        address parameterManager;\n        address marketModeManager;\n        address operator;\n        address surplusManager;\n        address blacklister;\n        address enforcer;\n        address pauser;\n        address unpauser;\n    }\n\n    // ============ Errors ============\n\n    /**\n     * @dev Thrown when a zero address is provided where a valid address is required.\n     */\n    error InvalidZeroAddress();\n\n    /**\n     * @dev Thrown when an operation involves a zero amount where a non-zero value is required.\n     */\n    error ZeroAmount();\n\n    /**\n     * @dev Thrown when an operation is not allowed (e.g., direct withdraw/redeem,\n     * caller not the withdrawal queue).\n     */\n    error OperationNotAllowed();\n\n    /**\n     * @dev Thrown when an operation is disabled in Restricted mode.\n     */\n    error MarketRestricted();\n\n    /**\n     * @dev Thrown when Regular mode is selected without a valid bounded authorization.\n     */\n    error InvalidRegularModeAuthorization();\n\n    /**\n     * @dev Thrown when attempting to un-blacklist an address that is not blacklisted.\n     */\n    error AddressNotBlacklisted();\n\n    /**\n     * @dev Thrown when an operation involves an sUSDat-blacklisted or USDat-frozen address.\n     */\n    error AddressBlacklisted();\n\n    /**\n     * @dev Thrown when attempting to blacklist an admin address.\n     */\n    error CannotBlacklistAdmin();\n\n    /**\n     * @dev Thrown when a redemption request is below MIN_REQUEST_SHARES.\n     */\n    error WithdrawalTooSmall();\n\n    /**\n     * @dev Thrown when slippage protection is triggered (received less than minimum).\n     */\n    error SlippageExceeded();\n\n    /**\n     * @dev Thrown when an operation requires more recognized balance than is available.\n     */\n    error InsufficientBalance();\n\n    /**\n     * @dev Thrown when redemption fee tiers are invalid.\n     */\n    error InvalidFee();\n\n    /**\n     * @dev Thrown when a fixed module address does not contain deployed code.\n     */\n    error InvalidModule();\n\n    /**\n     * @dev Thrown when the migration tolerance exceeds the protocol maximum.\n     */\n    error InvalidMigrationTolerance();\n\n    /**\n     * @dev Thrown when migration cannot establish a non-zero pre-migration NAV.\n     */\n    error ZeroNAV();\n\n    /**\n     * @dev Thrown when migration changes whole-vault NAV beyond the approved tolerance.\n     */\n    error MigrationNAVMismatch();\n\n    /**\n     * @dev Thrown when a trade deadline has passed.\n     */\n    error DeadlineExpired();\n\n    /**\n     * @dev Thrown when a new surplus tranche is attempted while the prior tranche is vesting.\n     */\n    error StillVesting();\n\n    /**\n     * @dev Thrown when the surplus vesting period is zero or exceeds the protocol maximum.\n     */\n    error InvalidVestingPeriod();\n\n    /**\n     * @dev Thrown when a surplus transfer exceeds the configured percentage of pre-transfer NAV.\n     */\n    error SurplusExceedsMax();\n\n    /**\n     * @dev Thrown when the surplus source is the vault or withdrawal queue.\n     */\n    error InvalidSurplusSource();\n\n    /**\n     * @dev Thrown when a queued redemption is attempted outside an active batch or\n     * a batch boundary is otherwise invalid.\n     */\n    error InvalidRedemptionBatch();\n\n    /**\n     * @dev Thrown when a measured token or module balance delta is not exact.\n     */\n    error InvalidAssetDelta();\n\n    /**\n     * @dev Thrown when physical token custody is below its recognized balance.\n     */\n    error CustodyShortfall();\n\n    /**\n     * @dev Thrown when a rescue exceeds untracked custody or tracked custody is short.\n     */\n    error ExceedsRescuable();\n\n    // ============ Events ============\n\n    /**\n     * @dev Emitted when an address is added to the blacklist.\n     * @param target The address that was blacklisted.\n     */\n    event Blacklisted(address indexed target);\n\n    /**\n     * @dev Emitted when an address is removed from the blacklist.\n     * @param target The address that was un-blacklisted.\n     */\n    event UnBlacklisted(address indexed target);\n\n    /**\n     * @dev Emitted when a blacklisted holder's shares are seized to a destination.\n     * @param from The blacklisted address seized from.\n     * @param to The address the shares were transferred to.\n     * @param amount The amount of shares transferred.\n     */\n    event Seized(address indexed from, address indexed to, uint256 amount);\n\n    /**\n     * @dev Emitted when the canonical seizure destination is updated.\n     * @param oldAddress The previous recovery address.\n     * @param newAddress The new recovery address.\n     */\n    event RecoveryAddressUpdated(address indexed oldAddress, address indexed newAddress);\n\n    /**\n     * @dev Emitted when the surplus source is updated.\n     * @param oldSource The previous source.\n     * @param newSource The new source.\n     */\n    event SurplusSourceUpdated(address indexed oldSource, address indexed newSource);\n\n    /**\n     * @dev Emitted when the migration NAV tolerance changes.\n     * @param oldBps The previous tolerance in basis points.\n     * @param newBps The new tolerance in basis points.\n     */\n    event MigrationToleranceUpdated(uint16 oldBps, uint16 newBps);\n\n    /**\n     * @dev Emitted after an exact STRCon purchase settles.\n     * @param module The fixed STRCon module.\n     * @param vehicle The configured execution counterparty.\n     * @param usdatPaid The exact USDat paid, in 6-decimal units.\n     * @param assetReceived The exact STRCon received, in 18-decimal units.\n     * @param oraclePrice The validated STRCon price, in 8-decimal units.\n     */\n    event AssetBought(\n        address indexed module, address indexed vehicle, uint256 usdatPaid, uint256 assetReceived, uint256 oraclePrice\n    );\n\n    /**\n     * @dev Emitted after an exact STRCon sale settles.\n     * @param module The fixed STRCon module.\n     * @param vehicle The configured execution counterparty.\n     * @param assetDelivered The exact STRCon delivered to the execution vehicle, in 18-decimal units.\n     * @param usdatReceived The exact USDat received, in 6-decimal units.\n     * @param oraclePrice The validated STRCon price, in 8-decimal units.\n     */\n    event AssetSold(\n        address indexed module,\n        address indexed vehicle,\n        uint256 assetDelivered,\n        uint256 usdatReceived,\n        uint256 oraclePrice\n    );\n\n    /**\n     * @dev Emitted when the vault operating mode changes.\n     * @param oldMode The previous market mode.\n     * @param newMode The new market mode.\n     */\n    event MarketModeChanged(MarketMode oldMode, MarketMode newMode);\n\n    /**\n     * @dev Emitted when Regular mode is authorized through a new deadline.\n     * @param validUntil The exclusive timestamp through which Regular mode is authorized.\n     */\n    event RegularModeAuthorized(uint64 validUntil);\n\n    /**\n     * @dev Emitted when the redemption fee tiers are updated.\n     * @param baseBps The base redemption fee in basis points.\n     * @param elevatedBps The elevated redemption fee in basis points.\n     */\n    event RedemptionFeesUpdated(uint16 baseBps, uint16 elevatedBps);\n\n    /**\n     * @dev Emitted when the elevated deposit fee is updated.\n     * @param newFee The new elevated deposit fee in basis points.\n     */\n    event DepositFeeUpdated(uint256 newFee);\n\n    /**\n     * @dev Emitted when a new USDat surplus tranche begins vesting.\n     * @param amount The USDat amount received.\n     */\n    event SurplusReceived(uint256 amount);\n\n    /**\n     * @dev Emitted when newly vested surplus is folded into the cash balance.\n     * @param amount The incremental USDat amount moved into usdatBalance.\n     */\n    event SurplusSwept(uint256 amount);\n\n    /**\n     * @dev Emitted when the surplus vesting period changes.\n     * @param oldPeriod The previous period in seconds.\n     * @param newPeriod The new period in seconds.\n     */\n    event SurplusVestingPeriodUpdated(uint256 oldPeriod, uint256 newPeriod);\n\n    // ============ Blacklist Functions ============\n\n    /**\n     * @notice Performs the one-shot v1 to v2 vault-state migration.\n     */\n    function initializeV2(V2Config calldata config, V2Roles calldata roles) external;\n\n    /**\n     * @notice Adds an address to the blacklist.\n     * @dev Only callable by addresses with the BLACKLISTER_ROLE.\n     * Cannot blacklist addresses with DEFAULT_ADMIN_ROLE.\n     * @param target The address to blacklist.\n     */\n    function addToBlacklist(address target) external;\n\n    /**\n     * @notice Removes an address from the blacklist.\n     * @dev Only callable by addresses with the BLACKLISTER_ROLE.\n     * @param target The address to un-blacklist.\n     */\n    function removeFromBlacklist(address target) external;\n\n    /**\n     * @notice Checks if an address is blacklisted.\n     * @param account The address to check.\n     * @return True if the address is blacklisted, false otherwise.\n     */\n    function isBlacklisted(address account) external view returns (bool);\n\n    /**\n     * @notice Checks whether an address is restricted by either compliance system.\n     * @dev A USDat freeze alone does not authorize StakedUSDat.seize.\n     * @param account The address to check.\n     * @return True if the address is blacklisted on sUSDat or frozen on USDat.\n     */\n    function isRestricted(address account) external view returns (bool);\n\n    /**\n     * @notice Transfers a locally blacklisted holder's full sUSDat balance to a recovery address.\n     * @dev Only callable by addresses with the ENFORCER_ROLE. Moves shares, no burn,\n     * no liquidity needed. Resolves the current valid recoveryAddress internally.\n     * @param from The locally blacklisted address to seize from.\n     */\n    function seize(address from) external;\n\n    // ============ Deposit Functions ============\n\n    /**\n     * @notice Deposits assets with slippage protection.\n     * @dev Reverts if the shares received would be less than minShares.\n     * @param assets The amount of assets to deposit.\n     * @param receiver The address to receive the shares.\n     * @param minShares The minimum number of shares to receive.\n     * @return shares The number of shares minted.\n     */\n    function depositWithMinShares(uint256 assets, address receiver, uint256 minShares) external returns (uint256 shares);\n\n    /**\n     * @notice Mints shares with slippage protection.\n     * @dev Reverts if the assets required would exceed maxAssets.\n     * @param shares The number of shares to mint.\n     * @param receiver The address to receive the shares.\n     * @param maxAssets The maximum amount of assets to spend.\n     * @return assets The amount of assets spent.\n     */\n    function mintWithMaxAssets(uint256 shares, address receiver, uint256 maxAssets) external returns (uint256 assets);\n\n    /**\n     * @notice Deposits assets with EIP-2612 permit for gasless approval.\n     * @dev Combines permit and deposit in a single transaction.\n     * @param assets The amount of assets to deposit.\n     * @param receiver The address to receive the shares.\n     * @param minShares The minimum number of shares to receive (slippage protection).\n     * @param deadline The permit signature deadline.\n     * @param v The permit signature v component.\n     * @param r The permit signature r component.\n     * @param s The permit signature s component.\n     * @return shares The number of shares minted.\n     */\n    function depositWithPermit(\n        uint256 assets,\n        address receiver,\n        uint256 minShares,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) external returns (uint256 shares);\n\n    /**\n     * @notice Mints shares with EIP-2612 permit for gasless approval.\n     * @dev Combines permit and mint in a single transaction.\n     * @param shares The number of shares to mint.\n     * @param receiver The address to receive the shares.\n     * @param maxAssets The maximum amount of assets to spend (slippage protection).\n     * @param deadline The permit signature deadline.\n     * @param v The permit signature v component.\n     * @param r The permit signature r component.\n     * @param s The permit signature s component.\n     * @return assets The amount of assets spent.\n     */\n    function mintWithPermit(\n        uint256 shares,\n        address receiver,\n        uint256 maxAssets,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) external returns (uint256 assets);\n\n    /**\n     * @notice Deposits assets with EIP-1271 permit for smart contract wallet approval.\n     * @dev Combines permit and deposit in a single transaction. Supports smart contract\n     * wallets like Gnosis Safe, Argent, etc. that implement EIP-1271.\n     * @param assets The amount of assets to deposit.\n     * @param receiver The address to receive the shares.\n     * @param minShares The minimum number of shares to receive (slippage protection).\n     * @param deadline The permit signature deadline.\n     * @param signature The EIP-1271 compatible signature bytes.\n     * @return shares The number of shares minted.\n     */\n    function depositWithPermit(\n        uint256 assets,\n        address receiver,\n        uint256 minShares,\n        uint256 deadline,\n        bytes memory signature\n    ) external returns (uint256 shares);\n\n    /**\n     * @notice Mints shares with EIP-1271 permit for smart contract wallet approval.\n     * @dev Combines permit and mint in a single transaction. Supports smart contract\n     * wallets like Gnosis Safe, Argent, etc. that implement EIP-1271.\n     * @param shares The number of shares to mint.\n     * @param receiver The address to receive the shares.\n     * @param maxAssets The maximum amount of assets to spend (slippage protection).\n     * @param deadline The permit signature deadline.\n     * @param signature The EIP-1271 compatible signature bytes.\n     * @return assets The amount of assets spent.\n     */\n    function mintWithPermit(\n        uint256 shares,\n        address receiver,\n        uint256 maxAssets,\n        uint256 deadline,\n        bytes memory signature\n    ) external returns (uint256 assets);\n\n    // ============ Surplus Functions ============\n\n    /**\n     * @notice Transfers a USDat surplus tranche into the vault for linear vesting.\n     * @dev Only callable by SURPLUS_MANAGER_ROLE while unpaused. The function pulls only the\n     * configured ERC4626 asset from surplusSource.\n     * @param amount The USDat amount to transfer, in 6-decimal asset units.\n     */\n    function transferInSurplus(uint256 amount) external;\n\n    /**\n     * @notice Returns the portion of the current surplus tranche that remains unvested.\n     * @return The unvested USDat amount, rounded up.\n     */\n    function getUnvestedSurplus() external view returns (uint256);\n\n    /**\n     * @notice Folds newly vested surplus into the spendable USDat balance.\n     * @dev Permissionless and a no-op when no newly vested amount is available.\n     */\n    function sweep() external;\n\n    // ============ Rotation Functions ============\n\n    /**\n     * @notice Buys an exact amount of STRCon from the configured execution vehicle.\n     * @dev Only callable by OPERATOR_ROLE while unpaused and outside Restricted mode.\n     * The vehicle must approve the vault to pull assetReceived of the fixed module asset.\n     * @param usdatPaid The exact USDat paid, in 6-decimal units.\n     * @param assetReceived The exact module asset received, in its native decimals.\n     * @param expectedVehicle The execution vehicle approved for this exact trade.\n     * @param deadline The inclusive execution deadline.\n     */\n    function buy(uint256 usdatPaid, uint256 assetReceived, address expectedVehicle, uint256 deadline) external;\n\n    /**\n     * @notice Sells an exact amount of STRCon to the configured execution vehicle.\n     * @dev Only callable by OPERATOR_ROLE while unpaused and outside Restricted mode.\n     * The vehicle must approve the vault to pull usdatReceived USDat.\n     * @param assetDelivered The exact module asset delivered to the vehicle, in its native decimals.\n     * @param usdatReceived The exact USDat received, in 6-decimal units.\n     * @param expectedVehicle The execution vehicle approved for this exact trade.\n     * @param deadline The inclusive execution deadline.\n     */\n    function sell(uint256 assetDelivered, uint256 usdatReceived, address expectedVehicle, uint256 deadline) external;\n\n    // ============ Migration Functions ============\n\n    /**\n     * @notice Replaces the legacy STRC mirror position with an exact STRCon delivery.\n     * @dev Only callable once by PARAMETER_MANAGER_ROLE while unpaused.\n     * @param expectedStrcon The exact STRCon amount pulled from the execution vehicle.\n     * @param deadline The inclusive migration deadline.\n     */\n    function migrate(uint256 expectedStrcon, uint256 deadline) external;\n\n    // ============ Withdrawal Functions ============\n\n    /**\n     * @notice Requests a redemption by escrowing shares in the withdrawal queue.\n     * @dev Standard ERC4626 withdraw/redeem are disabled. Use this function instead.\n     * Transfers shares to the withdrawal queue and mints an NFT representing the request.\n     * Never prices.\n     * @param shares The number of shares to redeem (>= MIN_REQUEST_SHARES).\n     * @param minSharePrice Limit: minimum net USDat payout per 1e18 shares after the\n     * active redemption fee. The request fills at this price or better; below it,\n     * it is skipped and stays queued.\n     * @return requestId The ID of the withdrawal request NFT.\n     */\n    function requestRedeem(uint256 shares, uint256 minSharePrice) external returns (uint256 requestId);\n\n    /**\n     * @notice Snapshots the vault conversion rate for one processing batch.\n     * @dev Only callable by the withdrawal queue. The snapshot is transaction-scoped.\n     */\n    function beginRedemptionBatch() external;\n\n    /**\n     * @notice Attempts to redeem a complete queued request against the cash buffer.\n     * @dev Only callable by the withdrawal queue during an active batch. Prices from\n     * the batch snapshot, deducts the active fee tier, checks the net payout limit and liquidity,\n     * then burns and atomically transfers the net payout to the queue. The retained fee\n     * remains recognized vault backing and accrues after the batch snapshot was fixed.\n     * @param shares The complete number of escrowed shares to redeem.\n     * @param minSharePrice The minimum net USDat payout per 1e18 shares.\n     * @return result Whether the request settled or why it was skipped.\n     * @return net The net USDat transferred to the queue when settled.\n     */\n    function redeemQueuedShares(uint256 shares, uint256 minSharePrice)\n        external\n        returns (RedemptionResult result, uint256 net);\n\n    /**\n     * @notice Clears the active transaction-scoped redemption snapshot.\n     * @dev Only callable by the withdrawal queue after processing its batch.\n     */\n    function endRedemptionBatch() external;\n\n    // ============ View Functions ============\n\n    /**\n     * @notice Returns the withdrawal queue contract address.\n     * @return The address of the WithdrawalQueueERC721 contract.\n     */\n    function getWithdrawalQueue() external view returns (address);\n\n    /**\n     * @notice Returns the canonical destination for seized assets.\n     * @return The recovery address.\n     */\n    function recoveryAddress() external view returns (address);\n\n    /**\n     * @notice Returns the configured source of USDat surplus tranches.\n     */\n    function surplusSource() external view returns (address);\n\n    /**\n     * @notice Returns the effective vault operating mode.\n     * @return Regular before its authorization expires, otherwise Elevated or Restricted.\n     */\n    function marketMode() external view returns (MarketMode);\n\n    /**\n     * @notice Returns the exclusive timestamp through which Regular mode is authorized.\n     */\n    function regularModeValidUntil() external view returns (uint64);\n\n    /**\n     * @notice Returns the base redemption fee in basis points.\n     */\n    function baseRedemptionFeeBps() external view returns (uint16);\n\n    /**\n     * @notice Returns the elevated redemption fee in basis points.\n     */\n    function elevatedRedemptionFeeBps() external view returns (uint16);\n\n    /**\n     * @notice Returns the configured elevated deposit fee in basis points.\n     */\n    function elevatedDepositFeeBps() external view returns (uint256);\n\n    /**\n     * @notice Returns the deposit fee selected by the current market mode.\n     */\n    function depositFeeBps() external view returns (uint256);\n\n    /**\n     * @notice Returns the fixed tokenless STRC mirror accounting module.\n     */\n    function strcMirrorModule() external view returns (ISTRCMirrorModule);\n\n    /**\n     * @notice Returns the fixed STRCon accounting and trading module.\n     */\n    function strconModule() external view returns (ISTRConModule);\n\n    /**\n     * @notice Returns the fixed STRCon execution policy.\n     */\n    function executionPolicy() external view returns (ISTRConExecutionPolicy);\n\n    /**\n     * @notice Returns the maximum permitted whole-vault NAV change during migration.\n     */\n    function migrationToleranceBps() external view returns (uint16);\n\n    /**\n     * @notice Returns the redemption fee selected by the current market mode.\n     */\n    function redemptionFeeBps() external view returns (uint16);\n\n    /**\n     * @notice Returns the internally tracked USDat balance.\n     * @return The USDat balance.\n     */\n    function usdatBalance() external view returns (uint256);\n\n    /**\n     * @notice Returns the original amount of the active surplus tranche.\n     * @dev Returns zero after the tranche is fully vested and swept.\n     */\n    function surplusVestingAmount() external view returns (uint256);\n\n    /**\n     * @notice Returns the timestamp at which the current surplus tranche began vesting.\n     */\n    function surplusVestingStartTimestamp() external view returns (uint256);\n\n    /**\n     * @notice Returns the configured surplus vesting period.\n     */\n    function surplusVestingPeriod() external view returns (uint256);\n\n    // ============ Enforcer Functions ============\n\n    /**\n     * @notice Rescues untracked ERC20 tokens held by the vault.\n     * @dev Only callable by ENFORCER_ROLE. USDat cash and surplus custody,\n     * plus the STRCon module's tracked token balance, cannot be rescued. The current\n     * valid recoveryAddress is the only destination.\n     * @param token The ERC20 token to rescue.\n     * @param amount The amount to transfer.\n     */\n    function rescueTokens(address token, uint256 amount) external;\n\n    // ============ Admin Functions ============\n\n    /**\n     * @notice Updates the canonical destination for seized assets.\n     * @dev Only callable by addresses with the PARAMETER_MANAGER_ROLE. The destination\n     * cannot be zero, blacklisted in StakedUSDat, or frozen in USDat.\n     * @param newRecoveryAddress The new recovery address.\n     */\n    function setRecoveryAddress(address newRecoveryAddress) external;\n\n    /**\n     * @notice Updates the source of future USDat surplus tranches.\n     * @dev Only callable by PARAMETER_MANAGER_ROLE, including while paused. The source cannot\n     * be zero, the vault, the withdrawal queue, blacklisted in StakedUSDat, or frozen in USDat.\n     * @param newSource The new surplus source.\n     */\n    function setSurplusSource(address newSource) external;\n\n    /**\n     * @notice Updates the whole-vault NAV tolerance for migration.\n     * @dev Only callable by PARAMETER_MANAGER_ROLE and capped at\n     * MAX_MIGRATION_TOLERANCE_BPS.\n     * @param newBps The new tolerance in basis points.\n     */\n    function setMigrationTolerance(uint16 newBps) external;\n\n    /**\n     * @notice Sets the vault to Elevated or Restricted mode.\n     * @dev Only callable by addresses with the MARKET_MODE_MANAGER_ROLE. This remains\n     * callable while the vault is paused. Regular requires authorizeRegularMode.\n     * @param newMode The explicit target market mode.\n     */\n    function setMarketMode(MarketMode newMode) external;\n\n    /**\n     * @notice Authorizes Regular mode through a bounded future deadline.\n     * @dev Only callable by addresses with the MARKET_MODE_MANAGER_ROLE. This remains\n     * callable while the vault is paused.\n     * @param validUntil The exclusive timestamp through which Regular mode is authorized.\n     */\n    function authorizeRegularMode(uint64 validUntil) external;\n\n    /**\n     * @notice Updates both redemption fee tiers.\n     * @dev Only callable by addresses with the PARAMETER_MANAGER_ROLE.\n     * Requires baseBps <= elevatedBps <= MAX_REDEMPTION_FEE_BPS.\n     */\n    function setRedemptionFees(uint16 baseBps, uint16 elevatedBps) external;\n\n    /**\n     * @notice Updates the elevated deposit fee.\n     * @dev Only callable by addresses with the PARAMETER_MANAGER_ROLE.\n     * Requires newFeeBps <= MAX_DEPOSIT_FEE_BPS.\n     */\n    function setElevatedDepositFee(uint256 newFeeBps) external;\n\n    /**\n     * @notice Updates the surplus vesting period.\n     * @dev Only callable by PARAMETER_MANAGER_ROLE when no tranche remains unvested.\n     * @param newPeriod The new period in seconds.\n     */\n    function setSurplusVestingPeriod(uint256 newPeriod) external;\n\n    /**\n     * @notice Pauses the contract.\n     * @dev Only callable by addresses with the PAUSER_ROLE.\n     * When paused, deposits, mints, and redemption requests are disabled.\n     */\n    function pause() external;\n\n    /**\n     * @notice Unpauses the contract.\n     * @dev Only callable by addresses with the UNPAUSER_ROLE.\n     */\n    function unpause() external;\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/utils/Bytes.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/Bytes.sol)\n\npragma solidity ^0.8.24;\n\nimport {Math} from \"./math/Math.sol\";\n\n/**\n * @dev Bytes operations.\n */\nlibrary Bytes {\n    /**\n     * @dev Forward search for `s` in `buffer`\n     * * If `s` is present in the buffer, returns the index of the first instance\n     * * If `s` is not present in the buffer, returns type(uint256).max\n     *\n     * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf[Javascript's `Array.indexOf`]\n     */\n    function indexOf(bytes memory buffer, bytes1 s) internal pure returns (uint256) {\n        return indexOf(buffer, s, 0);\n    }\n\n    /**\n     * @dev Forward search for `s` in `buffer` starting at position `pos`\n     * * If `s` is present in the buffer (at or after `pos`), returns the index of the next instance\n     * * If `s` is not present in the buffer (at or after `pos`), returns type(uint256).max\n     *\n     * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf[Javascript's `Array.indexOf`]\n     */\n    function indexOf(bytes memory buffer, bytes1 s, uint256 pos) internal pure returns (uint256) {\n        uint256 length = buffer.length;\n        for (uint256 i = pos; i < length; ++i) {\n            if (bytes1(_unsafeReadBytesOffset(buffer, i)) == s) {\n                return i;\n            }\n        }\n        return type(uint256).max;\n    }\n\n    /**\n     * @dev Backward search for `s` in `buffer`\n     * * If `s` is present in the buffer, returns the index of the last instance\n     * * If `s` is not present in the buffer, returns type(uint256).max\n     *\n     * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf[Javascript's `Array.lastIndexOf`]\n     */\n    function lastIndexOf(bytes memory buffer, bytes1 s) internal pure returns (uint256) {\n        return lastIndexOf(buffer, s, type(uint256).max);\n    }\n\n    /**\n     * @dev Backward search for `s` in `buffer` starting at position `pos`\n     * * If `s` is present in the buffer (at or before `pos`), returns the index of the previous instance\n     * * If `s` is not present in the buffer (at or before `pos`), returns type(uint256).max\n     *\n     * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf[Javascript's `Array.lastIndexOf`]\n     */\n    function lastIndexOf(bytes memory buffer, bytes1 s, uint256 pos) internal pure returns (uint256) {\n        unchecked {\n            uint256 length = buffer.length;\n            for (uint256 i = Math.min(Math.saturatingAdd(pos, 1), length); i > 0; --i) {\n                if (bytes1(_unsafeReadBytesOffset(buffer, i - 1)) == s) {\n                    return i - 1;\n                }\n            }\n            return type(uint256).max;\n        }\n    }\n\n    /**\n     * @dev Copies the content of `buffer`, from `start` (included) to the end of `buffer` into a new bytes object in\n     * memory.\n     *\n     * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice[Javascript's `Array.slice`]\n     */\n    function slice(bytes memory buffer, uint256 start) internal pure returns (bytes memory) {\n        return slice(buffer, start, buffer.length);\n    }\n\n    /**\n     * @dev Copies the content of `buffer`, from `start` (included) to `end` (excluded) into a new bytes object in\n     * memory. The `end` argument is truncated to the length of the `buffer`.\n     *\n     * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice[Javascript's `Array.slice`]\n     */\n    function slice(bytes memory buffer, uint256 start, uint256 end) internal pure returns (bytes memory) {\n        // sanitize\n        end = Math.min(end, buffer.length);\n        start = Math.min(start, end);\n\n        // allocate and copy\n        bytes memory result = new bytes(end - start);\n        assembly (\"memory-safe\") {\n            mcopy(add(result, 0x20), add(add(buffer, 0x20), start), sub(end, start))\n        }\n\n        return result;\n    }\n\n    /**\n     * @dev Moves the content of `buffer`, from `start` (included) to the end of `buffer` to the start of that buffer.\n     *\n     * NOTE: This function modifies the provided buffer in place. If you need to preserve the original buffer, use {slice} instead\n     * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice[Javascript's `Array.splice`]\n     */\n    function splice(bytes memory buffer, uint256 start) internal pure returns (bytes memory) {\n        return splice(buffer, start, buffer.length);\n    }\n\n    /**\n     * @dev Moves the content of `buffer`, from `start` (included) to end (excluded) to the start of that buffer. The\n     * `end` argument is truncated to the length of the `buffer`.\n     *\n     * NOTE: This function modifies the provided buffer in place. If you need to preserve the original buffer, use {slice} instead\n     * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice[Javascript's `Array.splice`]\n     */\n    function splice(bytes memory buffer, uint256 start, uint256 end) internal pure returns (bytes memory) {\n        // sanitize\n        end = Math.min(end, buffer.length);\n        start = Math.min(start, end);\n\n        // allocate and copy\n        assembly (\"memory-safe\") {\n            mcopy(add(buffer, 0x20), add(add(buffer, 0x20), start), sub(end, start))\n            mstore(buffer, sub(end, start))\n        }\n\n        return buffer;\n    }\n\n    /**\n     * @dev Concatenate an array of bytes into a single bytes object.\n     *\n     * For fixed bytes types, we recommend using the solidity built-in `bytes.concat` or (equivalent)\n     * `abi.encodePacked`.\n     *\n     * NOTE: this could be done in assembly with a single loop that expands starting at the FMP, but that would be\n     * significantly less readable. It might be worth benchmarking the savings of the full-assembly approach.\n     */\n    function concat(bytes[] memory buffers) internal pure returns (bytes memory) {\n        uint256 length = 0;\n        for (uint256 i = 0; i < buffers.length; ++i) {\n            length += buffers[i].length;\n        }\n\n        bytes memory result = new bytes(length);\n\n        uint256 offset = 0x20;\n        for (uint256 i = 0; i < buffers.length; ++i) {\n            bytes memory input = buffers[i];\n            assembly (\"memory-safe\") {\n                mcopy(add(result, offset), add(input, 0x20), mload(input))\n            }\n            unchecked {\n                offset += input.length;\n            }\n        }\n\n        return result;\n    }\n\n    /**\n     * @dev Returns true if the two byte buffers are equal.\n     */\n    function equal(bytes memory a, bytes memory b) internal pure returns (bool) {\n        return a.length == b.length && keccak256(a) == keccak256(b);\n    }\n\n    /**\n     * @dev Reverses the byte order of a bytes32 value, converting between little-endian and big-endian.\n     * Inspired by https://graphics.stanford.edu/~seander/bithacks.html#ReverseParallel[Reverse Parallel]\n     */\n    function reverseBytes32(bytes32 value) internal pure returns (bytes32) {\n        value = // swap bytes\n            ((value >> 8) & 0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF) |\n            ((value & 0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF) << 8);\n        value = // swap 2-byte long pairs\n            ((value >> 16) & 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) |\n            ((value & 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) << 16);\n        value = // swap 4-byte long pairs\n            ((value >> 32) & 0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF) |\n            ((value & 0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF) << 32);\n        value = // swap 8-byte long pairs\n            ((value >> 64) & 0x0000000000000000FFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF) |\n            ((value & 0x0000000000000000FFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF) << 64);\n        return (value >> 128) | (value << 128); // swap 16-byte long pairs\n    }\n\n    /// @dev Same as {reverseBytes32} but optimized for 128-bit values.\n    function reverseBytes16(bytes16 value) internal pure returns (bytes16) {\n        value = // swap bytes\n            ((value & 0xFF00FF00FF00FF00FF00FF00FF00FF00) >> 8) |\n            ((value & 0x00FF00FF00FF00FF00FF00FF00FF00FF) << 8);\n        value = // swap 2-byte long pairs\n            ((value & 0xFFFF0000FFFF0000FFFF0000FFFF0000) >> 16) |\n            ((value & 0x0000FFFF0000FFFF0000FFFF0000FFFF) << 16);\n        value = // swap 4-byte long pairs\n            ((value & 0xFFFFFFFF00000000FFFFFFFF00000000) >> 32) |\n            ((value & 0x00000000FFFFFFFF00000000FFFFFFFF) << 32);\n        return (value >> 64) | (value << 64); // swap 8-byte long pairs\n    }\n\n    /// @dev Same as {reverseBytes32} but optimized for 64-bit values.\n    function reverseBytes8(bytes8 value) internal pure returns (bytes8) {\n        value = ((value & 0xFF00FF00FF00FF00) >> 8) | ((value & 0x00FF00FF00FF00FF) << 8); // swap bytes\n        value = ((value & 0xFFFF0000FFFF0000) >> 16) | ((value & 0x0000FFFF0000FFFF) << 16); // swap 2-byte long pairs\n        return (value >> 32) | (value << 32); // swap 4-byte long pairs\n    }\n\n    /// @dev Same as {reverseBytes32} but optimized for 32-bit values.\n    function reverseBytes4(bytes4 value) internal pure returns (bytes4) {\n        value = ((value & 0xFF00FF00) >> 8) | ((value & 0x00FF00FF) << 8); // swap bytes\n        return (value >> 16) | (value << 16); // swap 2-byte long pairs\n    }\n\n    /// @dev Same as {reverseBytes32} but optimized for 16-bit values.\n    function reverseBytes2(bytes2 value) internal pure returns (bytes2) {\n        return (value >> 8) | (value << 8);\n    }\n\n    /**\n     * @dev Counts the number of leading zero bits a bytes array. Returns `8 * buffer.length`\n     * if the buffer is all zeros.\n     */\n    function clz(bytes memory buffer) internal pure returns (uint256) {\n        for (uint256 i = 0; i < buffer.length; i += 0x20) {\n            bytes32 chunk = _unsafeReadBytesOffset(buffer, i);\n            if (chunk != bytes32(0)) {\n                return Math.min(8 * i + Math.clz(uint256(chunk)), 8 * buffer.length);\n            }\n        }\n        return 8 * buffer.length;\n    }\n\n    /**\n     * @dev Reads a bytes32 from a bytes array without bounds checking.\n     *\n     * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the\n     * assembly block as such would prevent some optimizations.\n     */\n    function _unsafeReadBytesOffset(bytes memory buffer, uint256 offset) private pure returns (bytes32 value) {\n        // This is not memory safe in the general case, but all calls to this private function are within bounds.\n        assembly (\"memory-safe\") {\n            value := mload(add(add(buffer, 0x20), offset))\n        }\n    }\n}\n"},{"file_path":"src/v2/libraries/STRConTradeExecutionLogic.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity 0.8.36;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {Math} from \"@openzeppelin/contracts/utils/math/Math.sol\";\n\nimport {ISTRConExecutionPolicy} from \"../interfaces/ISTRConExecutionPolicy.sol\";\nimport {ISTRCMirrorModule} from \"../interfaces/modules/ISTRCMirrorModule.sol\";\nimport {ISTRConModule} from \"../interfaces/modules/ISTRConModule.sol\";\n\ninterface ITotalAssets {\n    function totalAssets() external view returns (uint256);\n}\n\n/**\n * @title STRConTradeExecutionLogic\n * @author Saturn\n * @notice Complete STRCon settlement and migration workflows executed in the vault context.\n */\nlibrary STRConTradeExecutionLogic {\n    using SafeERC20 for IERC20;\n\n    error CustodyShortfall();\n    error InvalidAssetDelta();\n    error MigrationNAVMismatch();\n    error ZeroNAV();\n\n    event AssetBought(\n        address indexed module, address indexed vehicle, uint256 usdatPaid, uint256 assetReceived, uint256 oraclePrice\n    );\n    event AssetSold(\n        address indexed module,\n        address indexed vehicle,\n        uint256 assetDelivered,\n        uint256 usdatReceived,\n        uint256 oraclePrice\n    );\n\n    uint256 private constant BPS_DENOMINATOR = 10_000;\n\n    /**\n     * @notice Executes an exact USDat-for-STRCon rotation from the calling vault.\n     */\n    function executeBuy(\n        ISTRConExecutionPolicy policy,\n        IERC20 usdat,\n        ISTRConModule strconModule,\n        address expectedVehicle,\n        uint256 usdatPaid,\n        uint256 assetReceived,\n        uint256 trackedUsdat,\n        uint256 unvestedSurplus\n    ) external {\n        uint256 oraclePrice = policy.validateBuy(usdatPaid, assetReceived, expectedVehicle);\n\n        IERC20 strcon = IERC20(strconModule.asset());\n        _pullExact(strcon, expectedVehicle, assetReceived);\n        strconModule.buy(assetReceived);\n\n        uint256 usdatCustody = _transferExact(usdat, expectedVehicle, usdatPaid);\n        _requireCustodyFloors(\n            strconModule, usdatCustody, strcon.balanceOf(address(this)), trackedUsdat, unvestedSurplus\n        );\n\n        emit AssetBought(address(strconModule), expectedVehicle, usdatPaid, assetReceived, oraclePrice);\n    }\n\n    /**\n     * @notice Executes an exact STRCon-for-USDat rotation from the calling vault.\n     */\n    function executeSell(\n        ISTRConExecutionPolicy policy,\n        IERC20 usdat,\n        ISTRConModule strconModule,\n        address expectedVehicle,\n        uint256 assetDelivered,\n        uint256 usdatReceived,\n        uint256 trackedUsdat,\n        uint256 unvestedSurplus\n    ) external {\n        uint256 oraclePrice = policy.validateSell(assetDelivered, usdatReceived, expectedVehicle);\n\n        uint256 usdatCustody = _pullExact(usdat, expectedVehicle, usdatReceived);\n        strconModule.sell(assetDelivered);\n\n        IERC20 strcon = IERC20(strconModule.asset());\n        uint256 strconCustody = _transferExact(strcon, expectedVehicle, assetDelivered);\n        _requireCustodyFloors(strconModule, usdatCustody, strconCustody, trackedUsdat, unvestedSurplus);\n\n        emit AssetSold(address(strconModule), expectedVehicle, assetDelivered, usdatReceived, oraclePrice);\n    }\n\n    /**\n     * @notice Retires the legacy mirror and recognizes the delivered STRCon position.\n     */\n    function executeMigration(\n        ISTRCMirrorModule mirrorModule,\n        ISTRConModule strconModule,\n        address executionVehicle,\n        uint256 expectedStrcon,\n        uint16 migrationToleranceBps\n    ) external {\n        uint256 navBefore = ITotalAssets(address(this)).totalAssets();\n        require(navBefore != 0, ZeroNAV());\n\n        IERC20 strcon = IERC20(strconModule.asset());\n        uint256 strconCustody = _pullExact(strcon, executionVehicle, expectedStrcon);\n\n        mirrorModule.retire();\n        strconModule.buy(expectedStrcon);\n\n        uint256 navAfter = ITotalAssets(address(this)).totalAssets();\n        uint256 delta = navAfter >= navBefore ? navAfter - navBefore : navBefore - navAfter;\n        require(delta <= Math.mulDiv(navBefore, migrationToleranceBps, BPS_DENOMINATOR), MigrationNAVMismatch());\n        require(strconCustody >= strconModule.balance(), CustodyShortfall());\n    }\n\n    function _pullExact(IERC20 token, address from, uint256 amount) private returns (uint256 custodyAfter) {\n        uint256 custodyBefore = token.balanceOf(address(this));\n        token.safeTransferFrom(from, address(this), amount);\n        custodyAfter = token.balanceOf(address(this));\n\n        require(custodyAfter >= custodyBefore, InvalidAssetDelta());\n        require(custodyAfter - custodyBefore == amount, InvalidAssetDelta());\n    }\n\n    function _transferExact(IERC20 token, address to, uint256 amount) private returns (uint256 custodyAfter) {\n        uint256 custodyBefore = token.balanceOf(address(this));\n        token.safeTransfer(to, amount);\n        custodyAfter = token.balanceOf(address(this));\n\n        require(custodyBefore >= custodyAfter, InvalidAssetDelta());\n        require(custodyBefore - custodyAfter == amount, InvalidAssetDelta());\n    }\n\n    function _requireCustodyFloors(\n        ISTRConModule strconModule,\n        uint256 usdatCustody,\n        uint256 strconCustody,\n        uint256 trackedUsdat,\n        uint256 unvestedSurplus\n    ) private view {\n        require(usdatCustody >= trackedUsdat, CustodyShortfall());\n        require(usdatCustody - trackedUsdat >= unvestedSurplus, CustodyShortfall());\n        require(strconCustody >= strconModule.balance(), CustodyShortfall());\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/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 \"../../interfaces/draft-IERC1822.sol\";\nimport {ERC1967Utils} from \"../ERC1967/ERC1967Utils.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 *\n * @custom:stateless\n */\nabstract contract UUPSUpgradeable is 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    /**\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 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":"lib/openzeppelin-contracts/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":"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC6093.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/draft-IERC6093.sol)\n\npragma solidity >=0.8.4;\n\n/**\n * @dev Standard ERC-20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens.\n */\ninterface IERC20Errors {\n    /**\n     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     * @param balance Current balance for the interacting account.\n     * @param needed Minimum amount required to perform a transfer.\n     */\n    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n    /**\n     * @dev Indicates a failure with the token `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     */\n    error ERC20InvalidSender(address sender);\n\n    /**\n     * @dev Indicates a failure with the token `receiver`. Used in transfers.\n     * @param receiver Address to which tokens are being transferred.\n     */\n    error ERC20InvalidReceiver(address receiver);\n\n    /**\n     * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n     * @param spender Address that may be allowed to operate on tokens without being their owner.\n     * @param allowance Amount of tokens a `spender` is allowed to operate with.\n     * @param needed Minimum amount required to perform a transfer.\n     */\n    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n    /**\n     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n     * @param approver Address initiating an approval operation.\n     */\n    error ERC20InvalidApprover(address approver);\n\n    /**\n     * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n     * @param spender Address that may be allowed to operate on tokens without being their owner.\n     */\n    error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC-721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.\n */\ninterface IERC721Errors {\n    /**\n     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-721.\n     * Used in balance queries.\n     * @param owner Address of the current owner of a token.\n     */\n    error ERC721InvalidOwner(address owner);\n\n    /**\n     * @dev Indicates a `tokenId` whose `owner` is the zero address.\n     * @param tokenId Identifier number of a token.\n     */\n    error ERC721NonexistentToken(uint256 tokenId);\n\n    /**\n     * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     * @param tokenId Identifier number of a token.\n     * @param owner Address of the current owner of a token.\n     */\n    error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n    /**\n     * @dev Indicates a failure with the token `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     */\n    error ERC721InvalidSender(address sender);\n\n    /**\n     * @dev Indicates a failure with the token `receiver`. Used in transfers.\n     * @param receiver Address to which tokens are being transferred.\n     */\n    error ERC721InvalidReceiver(address receiver);\n\n    /**\n     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n     * @param operator Address that may be allowed to operate on tokens without being their owner.\n     * @param tokenId Identifier number of a token.\n     */\n    error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n    /**\n     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n     * @param approver Address initiating an approval operation.\n     */\n    error ERC721InvalidApprover(address approver);\n\n    /**\n     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n     * @param operator Address that may be allowed to operate on tokens without being their owner.\n     */\n    error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC-1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens.\n */\ninterface IERC1155Errors {\n    /**\n     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     * @param balance Current balance for the interacting account.\n     * @param needed Minimum amount required to perform a transfer.\n     * @param tokenId Identifier number of a token.\n     */\n    error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n    /**\n     * @dev Indicates a failure with the token `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     */\n    error ERC1155InvalidSender(address sender);\n\n    /**\n     * @dev Indicates a failure with the token `receiver`. Used in transfers.\n     * @param receiver Address to which tokens are being transferred.\n     */\n    error ERC1155InvalidReceiver(address receiver);\n\n    /**\n     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n     * @param operator Address that may be allowed to operate on tokens without being their owner.\n     * @param owner Address of the current owner of a token.\n     */\n    error ERC1155MissingApprovalForAll(address operator, address owner);\n\n    /**\n     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n     * @param approver Address initiating an approval operation.\n     */\n    error ERC1155InvalidApprover(address approver);\n\n    /**\n     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n     * @param operator Address that may be allowed to operate on tokens without being their owner.\n     */\n    error ERC1155InvalidOperator(address operator);\n\n    /**\n     * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n     * Used in batch transfers.\n     * @param idsLength Length of the array of token identifiers\n     * @param valuesLength Length of the array of token amounts\n     */\n    error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\n}\n"},{"file_path":"src/v2/interfaces/modules/ISTRCMirrorModule.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity 0.8.36;\n\nimport {IAccountingModule} from \"./IAccountingModule.sol\";\n\n/**\n * @title ISTRCMirrorModule\n * @author Saturn\n * @notice Migration interface for the fixed tokenless STRC accounting module.\n */\ninterface ISTRCMirrorModule is IAccountingModule {\n    function VAULT() external view returns (address);\n\n    function seeded() external view returns (bool);\n\n    function retired() external view returns (bool);\n\n    function getUnvestedAmount() external view returns (uint256);\n\n    function seed(\n        uint256 initialBalance,\n        uint256 initialVestingAmount,\n        uint256 initialLastDistributionTimestamp,\n        uint256 initialVestingPeriod,\n        uint256 initialMaxRewardsBps\n    ) external;\n\n    function retire() external;\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport {Initializable} from \"@openzeppelin/contracts/proxy/utils/Initializable.sol\";\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/utils/NoncesUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Nonces.sol)\npragma solidity ^0.8.20;\nimport {Initializable} from \"@openzeppelin/contracts/proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides tracking nonces for addresses. Nonces will only increment.\n */\nabstract contract NoncesUpgradeable is Initializable {\n    /**\n     * @dev The nonce used for an `account` is not the expected current nonce.\n     */\n    error InvalidAccountNonce(address account, uint256 currentNonce);\n\n    /// @custom:storage-location erc7201:openzeppelin.storage.Nonces\n    struct NoncesStorage {\n        mapping(address account => uint256) _nonces;\n    }\n\n    // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Nonces\")) - 1)) & ~bytes32(uint256(0xff))\n    bytes32 private constant NoncesStorageLocation = 0x5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb00;\n\n    function _getNoncesStorage() private pure returns (NoncesStorage storage $) {\n        assembly {\n            $.slot := NoncesStorageLocation\n        }\n    }\n\n    function __Nonces_init() internal onlyInitializing {\n    }\n\n    function __Nonces_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev Returns the next unused nonce for an address.\n     */\n    function nonces(address owner) public view virtual returns (uint256) {\n        NoncesStorage storage $ = _getNoncesStorage();\n        return $._nonces[owner];\n    }\n\n    /**\n     * @dev Consumes a nonce.\n     *\n     * Returns the current value and increments nonce.\n     */\n    function _useNonce(address owner) internal virtual returns (uint256) {\n        NoncesStorage storage $ = _getNoncesStorage();\n        // For each account, the nonce has an initial value of 0, can only be incremented by one, and cannot be\n        // decremented or reset. This guarantees that the nonce never overflows.\n        unchecked {\n            // It is important to do x++ and not ++x here.\n            return $._nonces[owner]++;\n        }\n    }\n\n    /**\n     * @dev Same as {_useNonce} but checking that `nonce` is the next valid for `owner`.\n     */\n    function _useCheckedNonce(address owner, uint256 nonce) internal virtual {\n        uint256 current = _useNonce(owner);\n        if (nonce != current) {\n            revert InvalidAccountNonce(owner, current);\n        }\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/utils/LowLevelCall.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Library of low level call functions that implement different calling strategies to deal with the return data.\n *\n * WARNING: Using this library requires an advanced understanding of Solidity and how the EVM works. It is recommended\n * to use the {Address} library instead.\n */\nlibrary LowLevelCall {\n    /// @dev Performs a Solidity function call using a low level `call` and ignoring the return data.\n    function callNoReturn(address target, bytes memory data) internal returns (bool success) {\n        return callNoReturn(target, 0, data);\n    }\n\n    /// @dev Same as {callNoReturn}, but allows to specify the value to be sent in the call.\n    function callNoReturn(address target, uint256 value, bytes memory data) internal returns (bool success) {\n        assembly (\"memory-safe\") {\n            success := call(gas(), target, value, add(data, 0x20), mload(data), 0x00, 0x00)\n        }\n    }\n\n    /// @dev Performs a Solidity function call using a low level `call` and returns the first 64 bytes of the result\n    /// in the scratch space of memory. Useful for functions that return a tuple of single-word values.\n    ///\n    /// WARNING: Do not assume that the results are zero if `success` is false. Memory can be already allocated\n    /// and this function doesn't zero it out.\n    function callReturn64Bytes(\n        address target,\n        bytes memory data\n    ) internal returns (bool success, bytes32 result1, bytes32 result2) {\n        return callReturn64Bytes(target, 0, data);\n    }\n\n    /// @dev Same as {callReturnBytes32Pair}, but allows to specify the value to be sent in the call.\n    function callReturn64Bytes(\n        address target,\n        uint256 value,\n        bytes memory data\n    ) internal returns (bool success, bytes32 result1, bytes32 result2) {\n        assembly (\"memory-safe\") {\n            success := call(gas(), target, value, add(data, 0x20), mload(data), 0x00, 0x40)\n            result1 := mload(0x00)\n            result2 := mload(0x20)\n        }\n    }\n\n    /// @dev Performs a Solidity function call using a low level `staticcall` and ignoring the return data.\n    function staticcallNoReturn(address target, bytes memory data) internal view returns (bool success) {\n        assembly (\"memory-safe\") {\n            success := staticcall(gas(), target, add(data, 0x20), mload(data), 0x00, 0x00)\n        }\n    }\n\n    /// @dev Performs a Solidity function call using a low level `staticcall` and returns the first 64 bytes of the result\n    /// in the scratch space of memory. Useful for functions that return a tuple of single-word values.\n    ///\n    /// WARNING: Do not assume that the results are zero if `success` is false. Memory can be already allocated\n    /// and this function doesn't zero it out.\n    function staticcallReturn64Bytes(\n        address target,\n        bytes memory data\n    ) internal view returns (bool success, bytes32 result1, bytes32 result2) {\n        assembly (\"memory-safe\") {\n            success := staticcall(gas(), target, add(data, 0x20), mload(data), 0x00, 0x40)\n            result1 := mload(0x00)\n            result2 := mload(0x20)\n        }\n    }\n\n    /// @dev Performs a Solidity function call using a low level `delegatecall` and ignoring the return data.\n    function delegatecallNoReturn(address target, bytes memory data) internal returns (bool success) {\n        assembly (\"memory-safe\") {\n            success := delegatecall(gas(), target, add(data, 0x20), mload(data), 0x00, 0x00)\n        }\n    }\n\n    /// @dev Performs a Solidity function call using a low level `delegatecall` and returns the first 64 bytes of the result\n    /// in the scratch space of memory. Useful for functions that return a tuple of single-word values.\n    ///\n    /// WARNING: Do not assume that the results are zero if `success` is false. Memory can be already allocated\n    /// and this function doesn't zero it out.\n    function delegatecallReturn64Bytes(\n        address target,\n        bytes memory data\n    ) internal returns (bool success, bytes32 result1, bytes32 result2) {\n        assembly (\"memory-safe\") {\n            success := delegatecall(gas(), target, add(data, 0x20), mload(data), 0x00, 0x40)\n            result1 := mload(0x00)\n            result2 := mload(0x20)\n        }\n    }\n\n    /// @dev Returns the size of the return data buffer.\n    function returnDataSize() internal pure returns (uint256 size) {\n        assembly (\"memory-safe\") {\n            size := returndatasize()\n        }\n    }\n\n    /// @dev Returns a buffer containing the return data from the last call.\n    function returnData() internal pure returns (bytes memory result) {\n        assembly (\"memory-safe\") {\n            result := mload(0x40)\n            mstore(result, returndatasize())\n            returndatacopy(add(result, 0x20), 0x00, returndatasize())\n            mstore(0x40, add(result, add(0x20, returndatasize())))\n        }\n    }\n\n    /// @dev Revert with the return data from the last call.\n    function bubbleRevert() internal pure {\n        assembly (\"memory-safe\") {\n            let fmp := mload(0x40)\n            returndatacopy(fmp, 0x00, returndatasize())\n            revert(fmp, returndatasize())\n        }\n    }\n\n    function bubbleRevert(bytes memory returndata) internal pure {\n        assembly (\"memory-safe\") {\n            revert(add(returndata, 0x20), mload(returndata))\n        }\n    }\n}\n"},{"file_path":"src/v2/interfaces/IFreezable.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity 0.8.36;\n\n/**\n * @title Freezable interface.\n * @author M0 Labs\n */\ninterface IFreezable {\n    /* ============ Events ============ */\n\n    /**\n     * @notice Emitted when an account is frozen.\n     * @param account The address of the frozen account.\n     * @param timestamp The timestamp at which the account was frozen.\n     */\n    event Frozen(address indexed account, uint256 timestamp);\n\n    /**\n     * @notice Emitted when an account is unfrozen.\n     * @param account The address of the unfrozen account.\n     * @param timestamp The timestamp at which the account was unfrozen.\n     */\n    event Unfrozen(address indexed account, uint256 timestamp);\n\n    /* ============ Errors ============ */\n\n    /**\n     * @notice Emitted when an account is already frozen.\n     * @param account The address of the frozen account.\n     */\n    error AccountFrozen(address account);\n\n    /**\n     * @notice Emitted when an account is not frozen.\n     * @param account The address of the account that is not frozen.\n     */\n    error AccountNotFrozen(address account);\n\n    /// @notice Emitted if no freeze manager is set.\n    error ZeroFreezeManager();\n\n    /* ============ Interactive Functions ============ */\n\n    /**\n     * @notice Freezes an account.\n     * @dev MUST only be callable by the FREEZE_MANAGER_ROLE.\n     * @param account The address of the account to freeze.\n     */\n    function freeze(address account) external;\n\n    /**\n     * @notice Freezes multiple accounts.\n     * @dev MUST only be callable by the FREEZE_MANAGER_ROLE.\n     * @param accounts The list of addresses to freeze.\n     */\n    function freezeAccounts(address[] calldata accounts) external;\n\n    /**\n     * @notice Unfreezes an account.\n     * @dev MUST only be callable by the FREEZE_MANAGER_ROLE.\n     * @param account The address of the account to unfreeze.\n     */\n    function unfreeze(address account) external;\n\n    /**\n     * @notice Unfreezes multiple accounts.\n     * @dev MUST only be callable by the FREEZE_MANAGER_ROLE.\n     * @param accounts The list of addresses to unfreeze.\n     */\n    function unfreezeAccounts(address[] calldata accounts) external;\n\n    /* ============ View/Pure Functions ============ */\n\n    /// @notice The role that can manage the freezelist.\n    function FREEZE_MANAGER_ROLE() external view returns (bytes32);\n\n    /**\n     * @notice Returns whether an account is frozen or not.\n     * @param account The address of the account to check.\n     * @return True if the account is frozen, false otherwise.\n     */\n    function isFrozen(address account) external view returns (bool);\n}\n"},{"file_path":"lib/openzeppelin-contracts/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\";\nimport {LowLevelCall} from \"./LowLevelCall.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        if (LowLevelCall.callNoReturn(recipient, amount, \"\")) {\n            // call successful, nothing to do\n            return;\n        } else if (LowLevelCall.returnDataSize() > 0) {\n            LowLevelCall.bubbleRevert();\n        } else {\n            revert Errors.FailedCall();\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 = LowLevelCall.callNoReturn(target, value, data);\n        if (success && (LowLevelCall.returnDataSize() > 0 || target.code.length > 0)) {\n            return LowLevelCall.returnData();\n        } else if (success) {\n            revert AddressEmptyCode(target);\n        } else if (LowLevelCall.returnDataSize() > 0) {\n            LowLevelCall.bubbleRevert();\n        } else {\n            revert Errors.FailedCall();\n        }\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 = LowLevelCall.staticcallNoReturn(target, data);\n        if (success && (LowLevelCall.returnDataSize() > 0 || target.code.length > 0)) {\n            return LowLevelCall.returnData();\n        } else if (success) {\n            revert AddressEmptyCode(target);\n        } else if (LowLevelCall.returnDataSize() > 0) {\n            LowLevelCall.bubbleRevert();\n        } else {\n            revert Errors.FailedCall();\n        }\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 = LowLevelCall.delegatecallNoReturn(target, data);\n        if (success && (LowLevelCall.returnDataSize() > 0 || target.code.length > 0)) {\n            return LowLevelCall.returnData();\n        } else if (success) {\n            revert AddressEmptyCode(target);\n        } else if (LowLevelCall.returnDataSize() > 0) {\n            LowLevelCall.bubbleRevert();\n        } else {\n            revert Errors.FailedCall();\n        }\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     * NOTE: This function is DEPRECATED and may be removed in the next major release.\n     */\n    function verifyCallResultFromTarget(\n        address target,\n        bool success,\n        bytes memory returndata\n    ) internal view returns (bytes memory) {\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 (success && (returndata.length > 0 || target.code.length > 0)) {\n            return returndata;\n        } else if (success) {\n            revert AddressEmptyCode(target);\n        } else if (returndata.length > 0) {\n            LowLevelCall.bubbleRevert(returndata);\n        } else {\n            revert Errors.FailedCall();\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            return returndata;\n        } else if (returndata.length > 0) {\n            LowLevelCall.bubbleRevert(returndata);\n        } else {\n            revert Errors.FailedCall();\n        }\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/utils/cryptography/MessageHashUtils.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.24;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n    /**\n     * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n     * `0x45` (`personal_sign` messages).\n     *\n     * The digest is calculated by prefixing a bytes32 `messageHash` with\n     * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n     * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n     *\n     * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n     * keccak256, although any bytes32 value can be safely used because the final digest will\n     * be re-hashed.\n     *\n     * See {ECDSA-recover}.\n     */\n    function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n        assembly (\"memory-safe\") {\n            mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n            mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n            digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n        }\n    }\n\n    /**\n     * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n     * `0x45` (`personal_sign` messages).\n     *\n     * The digest is calculated by prefixing an arbitrary `message` with\n     * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n     * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n     *\n     * See {ECDSA-recover}.\n     */\n    function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n        return\n            keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n    }\n\n    /**\n     * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n     * `0x00` (data with intended validator).\n     *\n     * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n     * `validator` address. Then hashing the result.\n     *\n     * See {ECDSA-recover}.\n     */\n    function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n        return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n    }\n\n    /**\n     * @dev Variant of {toDataWithIntendedValidatorHash-address-bytes} optimized for cases where `data` is a bytes32.\n     */\n    function toDataWithIntendedValidatorHash(\n        address validator,\n        bytes32 messageHash\n    ) internal pure returns (bytes32 digest) {\n        assembly (\"memory-safe\") {\n            mstore(0x00, hex\"19_00\")\n            mstore(0x02, shl(96, validator))\n            mstore(0x16, messageHash)\n            digest := keccak256(0x00, 0x36)\n        }\n    }\n\n    /**\n     * @dev Returns the keccak256 digest of an EIP-712 typed data (ERC-191 version `0x01`).\n     *\n     * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n     * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n     *\n     * See {ECDSA-recover}.\n     */\n    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(ptr, hex\"19_01\")\n            mstore(add(ptr, 0x02), domainSeparator)\n            mstore(add(ptr, 0x22), structHash)\n            digest := keccak256(ptr, 0x42)\n        }\n    }\n}\n"},{"file_path":"src/v2/interfaces/IUSDat.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity 0.8.36;\n\nimport {IFreezable} from \"./IFreezable.sol\";\n\ninterface IUSDat is IFreezable {}\n"}],"certified":false,"conflicting_implementations":null,"abi":[{"inputs":[{"internalType":"contract IWithdrawalQueueERC721","name":"withdrawalQueue","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[],"name":"AddressBlacklisted","type":"error"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[],"name":"AddressNotBlacklisted","type":"error"},{"inputs":[],"name":"CannotBlacklistAdmin","type":"error"},{"inputs":[],"name":"CustodyShortfall","type":"error"},{"inputs":[],"name":"DeadlineExpired","type":"error"},{"inputs":[],"name":"ECDSAInvalidSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"name":"ECDSAInvalidSignatureLength","type":"error"},{"inputs":[{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"ECDSAInvalidSignatureS","type":"error"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"ERC1967InvalidImplementation","type":"error"},{"inputs":[],"name":"ERC1967NonPayable","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"inputs":[{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"ERC2612ExpiredSignature","type":"error"},{"inputs":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC2612InvalidSigner","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"assets","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"name":"ERC4626ExceededMaxDeposit","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"shares","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"name":"ERC4626ExceededMaxMint","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"shares","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"name":"ERC4626ExceededMaxRedeem","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"assets","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"name":"ERC4626ExceededMaxWithdraw","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExceedsRescuable","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[],"name":"FailedCall","type":"error"},{"inputs":[],"name":"InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"currentNonce","type":"uint256"}],"name":"InvalidAccountNonce","type":"error"},{"inputs":[],"name":"InvalidAssetDelta","type":"error"},{"inputs":[],"name":"InvalidFee","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"InvalidMigrationTolerance","type":"error"},{"inputs":[],"name":"InvalidModule","type":"error"},{"inputs":[],"name":"InvalidRedemptionBatch","type":"error"},{"inputs":[],"name":"InvalidRegularModeAuthorization","type":"error"},{"inputs":[],"name":"InvalidSurplusSource","type":"error"},{"inputs":[],"name":"InvalidVestingPeriod","type":"error"},{"inputs":[],"name":"InvalidZeroAddress","type":"error"},{"inputs":[],"name":"MarketRestricted","type":"error"},{"inputs":[],"name":"MigrationNAVMismatch","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[],"name":"OperationNotAllowed","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[],"name":"SlippageExceeded","type":"error"},{"inputs":[],"name":"StillVesting","type":"error"},{"inputs":[],"name":"SurplusExceedsMax","type":"error"},{"inputs":[],"name":"UUPSUnauthorizedCallContext","type":"error"},{"inputs":[{"internalType":"bytes32","name":"slot","type":"bytes32"}],"name":"UUPSUnsupportedProxiableUUID","type":"error"},{"inputs":[],"name":"WithdrawalTooSmall","type":"error"},{"inputs":[],"name":"ZeroAmount","type":"error"},{"inputs":[],"name":"ZeroNAV","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"module","type":"address"},{"indexed":true,"internalType":"address","name":"vehicle","type":"address"},{"indexed":false,"internalType":"uint256","name":"usdatPaid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"assetReceived","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"oraclePrice","type":"uint256"}],"name":"AssetBought","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"module","type":"address"},{"indexed":true,"internalType":"address","name":"vehicle","type":"address"},{"indexed":false,"internalType":"uint256","name":"assetDelivered","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"usdatReceived","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"oraclePrice","type":"uint256"}],"name":"AssetSold","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"target","type":"address"}],"name":"Blacklisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"assets","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"DepositFeeUpdated","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"enum IStakedUSDat.MarketMode","name":"oldMode","type":"uint8"},{"indexed":false,"internalType":"enum IStakedUSDat.MarketMode","name":"newMode","type":"uint8"}],"name":"MarketModeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"oldBps","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"newBps","type":"uint16"}],"name":"MigrationToleranceUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldAddress","type":"address"},{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"RecoveryAddressUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"baseBps","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"elevatedBps","type":"uint16"}],"name":"RedemptionFeesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"validUntil","type":"uint64"}],"name":"RegularModeAuthorized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Seized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"SurplusReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldSource","type":"address"},{"indexed":true,"internalType":"address","name":"newSource","type":"address"}],"name":"SurplusSourceUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"SurplusSwept","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldPeriod","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newPeriod","type":"uint256"}],"name":"SurplusVestingPeriodUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"target","type":"address"}],"name":"UnBlacklisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"assets","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"BLACKLISTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BPS_DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ENFORCER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MARKET_MODE_MANAGER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_DEPOSIT_FEE_BPS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_MIGRATION_TOLERANCE_BPS","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_REDEMPTION_FEE_BPS","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_REGULAR_MODE_VALIDITY","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SURPLUS_BPS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SURPLUS_VESTING_PERIOD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_REQUEST_SHARES","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PARAMETER_MANAGER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SURPLUS_MANAGER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNPAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UPGRADE_INTERFACE_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"addToBlacklist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"asset","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"validUntil","type":"uint64"}],"name":"authorizeRegularMode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseRedemptionFeeBps","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"beginRedemptionBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"usdatPaid","type":"uint256"},{"internalType":"uint256","name":"assetReceived","type":"uint256"},{"internalType":"address","name":"expectedVehicle","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"buy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"convertToAssets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"}],"name":"convertToShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositFeeBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"minShares","type":"uint256"}],"name":"depositWithMinShares","outputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"minShares","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"depositWithPermit","outputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"minShares","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"depositWithPermit","outputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"elevatedDepositFeeBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"elevatedRedemptionFeeBps","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"endRedemptionBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"executionPolicy","outputs":[{"internalType":"contract ISTRConExecutionPolicy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getUnvestedSurplus","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getWithdrawalQueue","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"defaultAdmin","type":"address"},{"internalType":"contract IERC20","name":"usdat","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"contract ISTRCMirrorModule","name":"strcMirrorModule","type":"address"},{"internalType":"contract ISTRConModule","name":"strconModule","type":"address"},{"internalType":"contract ISTRConExecutionPolicy","name":"executionPolicy","type":"address"},{"internalType":"address","name":"recoveryAddress","type":"address"},{"internalType":"address","name":"surplusSource","type":"address"},{"internalType":"address","name":"executionVehicle","type":"address"},{"internalType":"uint16","name":"baseRedemptionFeeBps","type":"uint16"},{"internalType":"uint16","name":"elevatedRedemptionFeeBps","type":"uint16"},{"internalType":"uint16","name":"elevatedDepositFeeBps","type":"uint16"},{"internalType":"uint16","name":"executionToleranceBps","type":"uint16"},{"internalType":"uint16","name":"migrationToleranceBps","type":"uint16"},{"internalType":"uint128","name":"initialExecutionCapacity","type":"uint128"},{"internalType":"uint128","name":"initialExecutionRefillPerDay","type":"uint128"}],"internalType":"struct IStakedUSDat.V2Config","name":"config","type":"tuple"},{"components":[{"internalType":"address","name":"parameterManager","type":"address"},{"internalType":"address","name":"marketModeManager","type":"address"},{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"surplusManager","type":"address"},{"internalType":"address","name":"blacklister","type":"address"},{"internalType":"address","name":"enforcer","type":"address"},{"internalType":"address","name":"pauser","type":"address"},{"internalType":"address","name":"unpauser","type":"address"}],"internalType":"struct IStakedUSDat.V2Roles","name":"roles","type":"tuple"}],"name":"initializeV2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isBlacklisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isRestricted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marketMode","outputs":[{"internalType":"enum IStakedUSDat.MarketMode","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"maxDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"maxMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"maxRedeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"maxWithdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"expectedStrcon","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"migrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"migrationToleranceBps","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"maxAssets","type":"uint256"}],"name":"mintWithMaxAssets","outputs":[{"internalType":"uint256","name":"assets","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"maxAssets","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mintWithPermit","outputs":[{"internalType":"uint256","name":"assets","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"maxAssets","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"mintWithPermit","outputs":[{"internalType":"uint256","name":"assets","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"}],"name":"previewDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"previewMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"previewRedeem","outputs":[{"internalType":"uint256","name":"net","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"previewWithdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"recoveryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"redeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"},{"internalType":"uint256","name":"minSharePrice","type":"uint256"}],"name":"redeemQueuedShares","outputs":[{"internalType":"enum IStakedUSDat.RedemptionResult","name":"result","type":"uint8"},{"internalType":"uint256","name":"net","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"redemptionFeeBps","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"regularModeValidUntil","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"removeFromBlacklist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"},{"internalType":"uint256","name":"minSharePrice","type":"uint256"}],"name":"requestRedeem","outputs":[{"internalType":"uint256","name":"requestId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"rescueTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"}],"name":"seize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"assetDelivered","type":"uint256"},{"internalType":"uint256","name":"usdatReceived","type":"uint256"},{"internalType":"address","name":"expectedVehicle","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"sell","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newFeeBps","type":"uint256"}],"name":"setElevatedDepositFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum IStakedUSDat.MarketMode","name":"newMode","type":"uint8"}],"name":"setMarketMode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"newBps","type":"uint16"}],"name":"setMigrationTolerance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newRecoveryAddress","type":"address"}],"name":"setRecoveryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"baseBps","type":"uint16"},{"internalType":"uint16","name":"elevatedBps","type":"uint16"}],"name":"setRedemptionFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newSource","type":"address"}],"name":"setSurplusSource","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPeriod","type":"uint256"}],"name":"setSurplusVestingPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strcMirrorModule","outputs":[{"internalType":"contract ISTRCMirrorModule","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"strconModule","outputs":[{"internalType":"contract ISTRConModule","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"surplusSource","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"surplusVestingAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"surplusVestingPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"surplusVestingStartTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sweep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAssets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferInSurplus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","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":[],"name":"usdatBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"}],"is_changed_bytecode":false,"is_partially_verified":true,"constructor_args":"0x0000000000000000000000004bc9fec04f0f95e9b42a3ef18f3c96fb57923d2e"}