{"constructor_args":"0x000000000000000000000000b44a9c40efc05eb014effeac3cbed6a31f8cb87f","is_partially_verified":true,"is_changed_bytecode":false,"abi":[{"inputs":[{"internalType":"address","name":"yieldWrapper_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AccountBlacklisted","type":"error"},{"inputs":[{"internalType":"uint256","name":"vestingEndsAt","type":"uint256"}],"name":"ActiveRewardVesting","type":"error"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[],"name":"AssetNotRecoverable","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":"ExpectedPause","type":"error"},{"inputs":[],"name":"FailedCall","type":"error"},{"inputs":[],"name":"IncompatibleImplementation","type":"error"},{"inputs":[{"internalType":"uint256","name":"available","type":"uint256"},{"internalType":"uint256","name":"requested","type":"uint256"}],"name":"InsufficientSurplus","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"currentNonce","type":"uint256"}],"name":"InvalidAccountNonce","type":"error"},{"inputs":[{"internalType":"uint8","name":"decimals","type":"uint8"}],"name":"InvalidAssetDecimals","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[{"internalType":"address","name":"wrapper","type":"address"}],"name":"InvalidYieldWrapper","type":"error"},{"inputs":[{"internalType":"uint8","name":"actual","type":"uint8"},{"internalType":"uint8","name":"expected","type":"uint8"}],"name":"InvalidYieldWrapperDecimals","type":"error"},{"inputs":[{"internalType":"uint256","name":"resultingSupply","type":"uint256"},{"internalType":"uint256","name":"minimumSupply","type":"uint256"}],"name":"MinimumSharesViolation","type":"error"},{"inputs":[],"name":"NativeTransferFailed","type":"error"},{"inputs":[],"name":"NoActiveShares","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"NotBlacklisted","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"NotPauser","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"NotRelayer","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"NotRewardDistributor","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"NothingToWipe","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ProtectedSeedPosition","type":"error"},{"inputs":[{"internalType":"uint256","name":"queueId","type":"uint256"}],"name":"QueuedWithdrawalUnsupported","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[],"name":"RelayerAuthNotSet","type":"error"},{"inputs":[{"internalType":"uint256","name":"feeAmount","type":"uint256"},{"internalType":"uint256","name":"maxFeeAmount","type":"uint256"}],"name":"RelayerFeeTooHigh","type":"error"},{"inputs":[{"internalType":"uint8","name":"bits","type":"uint8"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"SafeCastOverflowedUintDowncast","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[{"internalType":"bytes32","name":"expected","type":"bytes32"},{"internalType":"bytes32","name":"provided","type":"bytes32"}],"name":"SessionDataHashMismatch","type":"error"},{"inputs":[],"name":"SessionManagerNotSet","type":"error"},{"inputs":[],"name":"UUPSUnauthorizedCallContext","type":"error"},{"inputs":[{"internalType":"bytes32","name":"slot","type":"bytes32"}],"name":"UUPSUnsupportedProxiableUUID","type":"error"},{"inputs":[],"name":"VaultAlreadySeeded","type":"error"},{"inputs":[],"name":"VaultNotSeeded","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"inputs":[],"name":"ZeroAmount","type":"error"},{"inputs":[],"name":"ZeroAssets","type":"error"},{"inputs":[],"name":"ZeroShares","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":"account","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"assets","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"BlacklistedAddressWiped","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":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"address","name":"integrator","type":"address"},{"indexed":false,"internalType":"uint256","name":"assets","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"DepositReferral","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":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newPauser","type":"address"}],"name":"PauserUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Recovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newRelayerAuth","type":"address"}],"name":"RelayerAuthUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"executor","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RelayerFeePaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newRewardDistributor","type":"address"}],"name":"RewardDistributorUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint40","name":"vestingStartedAt","type":"uint40"},{"indexed":false,"internalType":"uint40","name":"vestingEndsAt","type":"uint40"}],"name":"RewardsFunded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newSessionManager","type":"address"}],"name":"SessionManagerUpdated","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":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"UnaccountedSurplusSwept","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":false,"internalType":"uint256","name":"assets","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"VaultSeeded","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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"yieldWrapper","type":"address"}],"name":"YieldWrapperInitialized","type":"event"},{"inputs":[],"name":"ASSET","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEAD_SHARES_RECEIVER","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_SHARES","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SEED_ASSETS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UPGRADE_INTERFACE_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"accountedAssets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"asset","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"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":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"integrator","type":"address"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"},{"components":[{"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"}],"internalType":"struct StableEpochRewardsVault.PermitParams","name":"permitParams","type":"tuple"},{"components":[{"internalType":"bytes32","name":"sessionId","type":"bytes32"},{"internalType":"bytes32","name":"dataHash","type":"bytes32"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"address","name":"executor","type":"address"},{"internalType":"uint256","name":"feeAmount","type":"uint256"}],"internalType":"struct ISessionManager.SessionCall","name":"sessionCall","type":"tuple"},{"internalType":"bytes","name":"delegateSignature","type":"bytes"}],"name":"depositWithSessionAndPermit","outputs":[{"internalType":"uint256","name":"sharesToUser","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":[{"internalType":"uint256","name":"ftUSDAmount","type":"uint256"}],"name":"fundRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getUnvestedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"initialOwner","type":"address"},{"internalType":"address","name":"initialRewardDistributor","type":"address"},{"internalType":"address","name":"initialPauser","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isVesting","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastDistributionTime","outputs":[{"internalType":"uint40","name":"","type":"uint40"}],"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":"account","type":"address"}],"name":"maxWipeShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"}],"name":"maxWithdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"mint","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":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"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":[],"name":"pauser","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"bytes","name":"signature","type":"bytes"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","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":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"}],"name":"previewWithdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"recoverNative","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"owner_","type":"address"}],"name":"redeem","outputs":[{"internalType":"uint256","name":"assets","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"relayerAuth","outputs":[{"internalType":"contract IRelayerAuth","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardDistributor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"scheduledUnvestedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"seed","outputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sessionManager","outputs":[{"internalType":"contract ISessionManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newPauser","type":"address"}],"name":"setPauser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newRelayerAuth","type":"address"}],"name":"setRelayerAuth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newRewardDistributor","type":"address"}],"name":"setRewardDistributor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newSessionManager","type":"address"}],"name":"setSessionManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"sweepUnaccountedSurplus","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":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unaccountedSurplus","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"vestingAmount","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vestingPeriod","outputs":[{"internalType":"uint40","name":"","type":"uint40"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"wipeBlacklistedAddress","outputs":[{"internalType":"uint256","name":"assets","type":"uint256"},{"internalType":"uint256","name":"shares","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"wipeBlacklistedShares","outputs":[{"internalType":"uint256","name":"assets","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"owner_","type":"address"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"},{"components":[{"internalType":"bytes32","name":"sessionId","type":"bytes32"},{"internalType":"bytes32","name":"dataHash","type":"bytes32"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"address","name":"executor","type":"address"},{"internalType":"uint256","name":"feeAmount","type":"uint256"}],"internalType":"struct ISessionManager.SessionCall","name":"sessionCall","type":"tuple"},{"internalType":"bytes","name":"delegateSignature","type":"bytes"}],"name":"withdrawWithSession","outputs":[{"internalType":"uint256","name":"sharesBurned","type":"uint256"},{"internalType":"uint256","name":"queueIdTo","type":"uint256"},{"internalType":"uint256","name":"queueIdFee","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"yieldWrapper","outputs":[{"internalType":"contract IftYieldWrapperV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}],"conflicting_implementations":null,"certified":false,"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":"lib/openzeppelin-contracts/contracts/interfaces/IERC4626.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.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/ft-common-contracts/contracts/interfaces/ISessionManager.sol","source_code":"// SPDX-License-Identifier: UNLICENSED\npragma solidity 0.8.30;\n\n/// @title ISessionManager\n/// @notice On-chain registry + validator for bounded \"session keys\" delegated by a user.\n/// @dev\n/// # Third-party integration (target contracts)\n/// A \"target contract\" is a contract that wants to accept delegate-signed calls on behalf of a user.\n/// Targets must be explicitly allowlisted by the SessionManager owner.\n///\n/// Typical integration flow inside a target contract function:\n/// 1) Recompute a target-specific `dataHash` from the actual call parameters and require it matches\n///    `SessionCall.dataHash`. `SessionManager` does not interpret `dataHash`; it is only signed and replay-protected.\n/// 2) Call `validateAndConsume(spendToken, spendAmount, call, delegateSignature, msg.sender)`:\n///    - `msg.sender` (in the target) is treated as the `executor` (relayer/bundler) and must equal `call.executor`.\n///    - One unordered nonce is consumed and `nonces[sessionId]` increments as a call counter.\n///    - `spendToken`/`spendAmount` are accounted against `tokenAllowance` (decremented per call).\n/// 3) Use the returned `(owner_, delegate, maxFeeBps)` to determine the payer (`owner_`) and to bound relayer fees.\n///\n/// IMPORTANT: `spendToken` / `spendAmount` are provided by the target and are not part of `SessionCall`.\n/// Targets should pass the actual token/amount spent on behalf of `owner_` and should include those values in their\n/// `dataHash` scheme so the delegate signature binds them.\n///\n/// # Offchain signing notes\n/// - `sessionId = keccak256(abi.encode(owner, delegate, salt))` (see `computeSessionId`).\n/// - Delegates sign EIP-712 typed data for `SessionCall` where `target` is the target contract address.\n/// - `SessionCall.nonce` is unordered; nonce N+1 can be consumed before nonce N.\n/// - `nonces(sessionId)` is a consumed-call counter used to enforce `maxCalls`, not the next required nonce.\n///\n/// ## EIP-712 details (reference `SessionManager` implementation)\n/// - Domain: name = \"FT SessionManager\", version = \"1\".\n/// - Types (exact strings):\n///   - \"AssetLimit(address token,uint256 limit)\"\n///   - \"Session(address owner,address delegate,uint48 validAfter,uint48 validUntil,uint32 maxCalls,uint16 maxFeeBps,AssetLimit[] limits,bytes32 salt)\"\n///   - \"SessionCall(bytes32 sessionId,address target,bytes32 dataHash,uint256 nonce,uint256 deadline,address executor,uint256 feeAmount)\"\n///   - \"RevokeSession(bytes32 sessionId,uint256 deadline)\"\n///   - \"InvalidateNonce(bytes32 sessionId,uint256 nonce,uint256 deadline,address executor)\"\n/// - `limits` is order-sensitive and is encoded as `keccak256(abi.encodePacked(keccak256(AssetLimit[0]), ...))`.\n/// - `target` is the target contract address (validated on-chain as `msg.sender` in `validateAndConsume`).\ninterface ISessionManager {\n    // ===== Types =====\n\n    struct AssetLimit {\n        address token;\n        uint256 limit;\n    }\n\n    struct SessionConfig {\n        address owner;\n        address delegate;\n        uint48 validAfter;\n        uint48 validUntil; // 0 = no expiry\n        uint32 maxCalls; // 0 = unlimited (requires validUntil != 0)\n        uint16 maxFeeBps; // max relayer fee vs amount out (0 = no fee)\n    }\n\n    struct SessionCall {\n        bytes32 sessionId;\n        bytes32 dataHash; // target-specific hash of call parameters (incl selector)\n        uint256 nonce; // unordered nonce; can be consumed in any order\n        uint256 deadline; // 0 = no per-call deadline\n        address executor; // relayer/bundler that must submit this call\n        uint256 feeAmount; // relayer fee amount (token defined by target)\n    }\n\n    // ===== Events =====\n\n    event SessionCreated(\n        bytes32 indexed sessionId,\n        address indexed owner,\n        address indexed delegate,\n        uint48 validAfter,\n        uint48 validUntil,\n        uint32 maxCalls,\n        uint16 maxFeeBps\n    );\n    event SessionRevoked(bytes32 indexed sessionId, address indexed owner);\n    event SessionConsumed(\n        bytes32 indexed sessionId,\n        address indexed owner,\n        address indexed target,\n        address executor,\n        uint256 nonce,\n        bytes32 dataHash,\n        address spendToken,\n        uint256 spendAmount,\n        uint256 feeAmount\n    );\n\n    event AllowedTargetUpdated(address indexed target, bool allowed);\n    event NonceInvalidated(\n        bytes32 indexed sessionId, address indexed delegate, uint256 invalidatedNonce\n    );\n\n    // ===== Errors =====\n\n    error ZeroAddress();\n    error InvalidSessionWindow(uint48 validAfter, uint48 validUntil);\n    error SessionExpiryTooSoon(uint48 validUntil, uint48 minValidUntil);\n    error SessionMustHaveExpiryOrCallLimit();\n    error SessionAlreadyExists(bytes32 sessionId);\n    error SessionNotFound(bytes32 sessionId);\n    error SessionIsRevoked(bytes32 sessionId);\n    error SessionNotYetValid(bytes32 sessionId, uint48 validAfter);\n    error SessionExpired(bytes32 sessionId, uint48 validUntil);\n    error SessionCallsExceeded(bytes32 sessionId, uint32 maxCalls);\n    error DeadlineExpired(uint256 deadline, uint256 currentTime);\n    error InvalidNonce(uint256 expected, uint256 provided);\n    error InvalidSignature();\n    error NotSessionOwner(bytes32 sessionId, address caller);\n    error TargetNotAllowed(address target);\n    error DuplicateAsset(address token);\n    error AssetNotAllowed(address token);\n    error AssetLimitExceeded(address token, uint256 requested, uint256 remaining);\n    error ExecutorMismatch(address expected, address actual);\n    error ExecutorCannotBeDelegate(address delegate);\n    error InvalidMaxFeeBps(uint16 maxFeeBps);\n    error NonceMismatch(uint256 expected, uint256 provided);\n\n    // ===== Constants (as getters) =====\n\n    function BPS() external pure returns (uint256);\n\n    function MIN_SESSION_DURATION() external pure returns (uint48);\n\n    // ===== View =====\n\n    function sessions(bytes32 sessionId)\n        external\n        view\n        returns (\n            address owner,\n            address delegate,\n            uint48 validAfter,\n            uint48 validUntil,\n            uint32 maxCalls,\n            uint16 maxFeeBps\n        );\n\n    function revoked(bytes32 sessionId) external view returns (bool);\n\n    function nonces(bytes32 sessionId) external view returns (uint256);\n\n    function allowedTarget(address target) external view returns (bool);\n\n    /// @notice Returns the number of delegate calls consumed for a session.\n    /// @dev This is the value used to enforce `maxCalls`; unordered nonce values may be sparse.\n    function usedCallCount(bytes32 sessionId) external view returns (uint256 count);\n\n    /// @notice Returns whether an unordered nonce has already been consumed or invalidated.\n    function isNonceUsed(bytes32 sessionId, uint256 nonce) external view returns (bool used);\n\n    /// @notice Returns the raw 256-bit unordered nonce bitmap word for relayer/UI batching.\n    function nonceBitmapWord(\n        bytes32 sessionId,\n        uint248 wordPos\n    )\n        external\n        view\n        returns (uint256 bitmap);\n\n    /// @notice Remaining per-session per-asset allowance.\n    /// @dev `type(uint256).max` matches ERC-20 allowance semantics: \"infinite\" allowance (no decrement).\n    function tokenAllowance(bytes32 sessionId, address token) external view returns (uint256);\n\n    // ===== Mutations =====\n\n    function computeSessionId(\n        address owner_,\n        address delegate,\n        bytes32 salt\n    )\n        external\n        pure\n        returns (bytes32 sessionId);\n\n    function createSession(\n        address delegate,\n        uint48 validAfter,\n        uint48 validUntil,\n        uint32 maxCalls,\n        uint16 maxFeeBps,\n        AssetLimit[] calldata limits,\n        bytes32 salt\n    )\n        external\n        returns (bytes32 sessionId);\n\n    function createSessionBySig(\n        address owner_,\n        address delegate,\n        uint48 validAfter,\n        uint48 validUntil,\n        uint32 maxCalls,\n        uint16 maxFeeBps,\n        AssetLimit[] calldata limits,\n        bytes32 salt,\n        bytes calldata ownerSignature\n    )\n        external\n        returns (bytes32 sessionId);\n\n    function revokeSession(bytes32 sessionId) external;\n\n    function revokeSessionBySig(\n        bytes32 sessionId,\n        uint256 deadline,\n        bytes calldata ownerSignature\n    )\n        external;\n\n    function setAllowedTarget(address target, bool allowed) external;\n\n    function setAllowedTargets(address[] calldata targets, bool allowed) external;\n\n    /// @notice Invalidate an unordered session nonce without revoking the entire session.\n    /// @param sessionId The session to invalidate the nonce for.\n    /// @param nonce The unordered nonce to invalidate.\n    /// @param deadline Signature expiry (0 = no deadline).\n    /// @param executor The address authorized to submit this invalidation (must be msg.sender).\n    /// @param delegateSignature EIP-712 signature from the session delegate.\n    function invalidateNonceBySig(\n        bytes32 sessionId,\n        uint256 nonce,\n        uint256 deadline,\n        address executor,\n        bytes calldata delegateSignature\n    )\n        external;\n\n    /// @notice Validate a delegate-signed call and consume one session nonce.\n    /// @dev Can only be called by the target contract that will execute the action.\n    /// @param spendToken Token being spent from the session owner (0 if none).\n    /// @param spendAmount Amount being spent (0 if none).\n    /// @param call Session call intent signed by the delegate.\n    /// @param delegateSignature Signature from the session delegate over `call`.\n    /// @param executor The relayer/bundler address that submitted the target tx (target should pass `msg.sender`).\n    function validateAndConsume(\n        address spendToken,\n        uint256 spendAmount,\n        SessionCall calldata call,\n        bytes calldata delegateSignature,\n        address executor\n    )\n        external\n        returns (address owner_, address delegate, uint16 maxFeeBps);\n}\n"},{"file_path":"contracts/interfaces/IRelayerAuth.sol","source_code":"// SPDX-License-Identifier: UNLICENSED\npragma solidity 0.8.30;\n\ninterface IRelayerAuth {\n    function isRelayer(address) external view returns (bool);\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/utils/math/Math.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.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":"contracts/cb/IHealthcheck.sol","source_code":"// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.30;\n\n/// @title IHealthcheck\n/// @notice Simple interface for system health verification at withdrawal execution\n/// @dev Implementations define their own invariants specific to their system\ninterface IHealthcheck {\n    /// @notice Check if a queued withdrawal should be allowed to execute\n    /// @param queueId The queue entry ID being executed\n    /// @param token The token being withdrawn\n    /// @param recipient The withdrawal recipient\n    /// @param amount The withdrawal amount\n    /// @return healthy True if system invariants pass, false to block withdrawal\n    /// @dev MUST NOT revert under normal conditions - reverts block all withdrawals\n    function isHealthy(\n        uint256 queueId,\n        address token,\n        address recipient,\n        uint256 amount\n    )\n        external\n        view\n        returns (bool healthy);\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.5.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/utils/cryptography/ECDSA.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.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":"contracts/interfaces/IftYieldWrapperV2.sol","source_code":"// SPDX-License-Identifier: UNLICENSED\n// Copyright (c) 2025 Flying Tulip Inc. All rights reserved.\npragma solidity ^0.8.30;\n\nimport {IERC20Metadata} from \"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\";\n\n/// @title IftYieldWrapperV2\n/// @notice Extended wrapper interface that surfaces queue IDs from withdrawals.\n/// @dev Standalone interface — does NOT extend IftYieldWrapper because adding\n///      return values to withdraw/withdrawUnderlying would create conflicting\n///      selectors (Solidity treats return types as part of override resolution).\n///      At the EVM level, function selectors are identical (return types don't\n///      affect them), so existing callers using IftYieldWrapper-typed variables\n///      continue to work at runtime.\ninterface IftYieldWrapperV2 is IERC20Metadata {\n    function token() external view returns (address);\n\n    function deposit(uint256 amount) external;\n\n    function canWithdraw(uint256 amount) external view returns (bool);\n\n    function maxAbleToWithdraw(uint256 amount) external view returns (uint256);\n\n    function valueOfCapital() external view returns (uint256);\n\n    /// @notice Withdraw underlying tokens from the wrapper\n    /// @param amount The amount of underlying tokens to withdraw\n    /// @param to The recipient address\n    /// @return queueId The CB queue entry ID (0 if transfer was immediate)\n    function withdraw(uint256 amount, address to) external returns (uint256 queueId);\n\n    /// @notice Withdraw position tokens directly from strategies\n    /// @param amount The amount (in share terms) to withdraw\n    /// @param to The recipient address\n    /// @return queueIds Per-strategy CB queue entry IDs (0 if immediate or strategy skipped)\n    function withdrawUnderlying(\n        uint256 amount,\n        address to\n    )\n        external\n        returns (uint256[] memory queueIds);\n\n    function circuitBreaker() external view returns (address);\n\n    function setCircuitBreaker(address _circuitBreaker) external;\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":"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":"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":"lib/openzeppelin-contracts/contracts/utils/TransientSlot.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/TransientSlot.sol)\n// This file was procedurally generated from scripts/generate/templates/TransientSlot.js.\n\npragma solidity ^0.8.24;\n\n/**\n * @dev Library for reading and writing value-types to specific transient storage slots.\n *\n * Transient slots are often used to store temporary values that are removed after the current transaction.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n *  * Example reading and writing values using transient storage:\n * ```solidity\n * contract Lock {\n *     using TransientSlot for *;\n *\n *     // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.\n *     bytes32 internal constant _LOCK_SLOT = 0xf4678858b2b588224636b8522b729e7722d32fc491da849ed75b3fdf3c84f542;\n *\n *     modifier locked() {\n *         require(!_LOCK_SLOT.asBoolean().tload());\n *\n *         _LOCK_SLOT.asBoolean().tstore(true);\n *         _;\n *         _LOCK_SLOT.asBoolean().tstore(false);\n *     }\n * }\n * ```\n *\n * TIP: Consider using this library along with {SlotDerivation}.\n */\nlibrary TransientSlot {\n    /**\n     * @dev UDVT that represents a slot holding an address.\n     */\n    type AddressSlot is bytes32;\n\n    /**\n     * @dev Cast an arbitrary slot to a AddressSlot.\n     */\n    function asAddress(bytes32 slot) internal pure returns (AddressSlot) {\n        return AddressSlot.wrap(slot);\n    }\n\n    /**\n     * @dev UDVT that represents a slot holding a bool.\n     */\n    type BooleanSlot is bytes32;\n\n    /**\n     * @dev Cast an arbitrary slot to a BooleanSlot.\n     */\n    function asBoolean(bytes32 slot) internal pure returns (BooleanSlot) {\n        return BooleanSlot.wrap(slot);\n    }\n\n    /**\n     * @dev UDVT that represents a slot holding a bytes32.\n     */\n    type Bytes32Slot is bytes32;\n\n    /**\n     * @dev Cast an arbitrary slot to a Bytes32Slot.\n     */\n    function asBytes32(bytes32 slot) internal pure returns (Bytes32Slot) {\n        return Bytes32Slot.wrap(slot);\n    }\n\n    /**\n     * @dev UDVT that represents a slot holding a uint256.\n     */\n    type Uint256Slot is bytes32;\n\n    /**\n     * @dev Cast an arbitrary slot to a Uint256Slot.\n     */\n    function asUint256(bytes32 slot) internal pure returns (Uint256Slot) {\n        return Uint256Slot.wrap(slot);\n    }\n\n    /**\n     * @dev UDVT that represents a slot holding a int256.\n     */\n    type Int256Slot is bytes32;\n\n    /**\n     * @dev Cast an arbitrary slot to a Int256Slot.\n     */\n    function asInt256(bytes32 slot) internal pure returns (Int256Slot) {\n        return Int256Slot.wrap(slot);\n    }\n\n    /**\n     * @dev Load the value held at location `slot` in transient storage.\n     */\n    function tload(AddressSlot slot) internal view returns (address value) {\n        assembly (\"memory-safe\") {\n            value := tload(slot)\n        }\n    }\n\n    /**\n     * @dev Store `value` at location `slot` in transient storage.\n     */\n    function tstore(AddressSlot slot, address value) internal {\n        assembly (\"memory-safe\") {\n            tstore(slot, value)\n        }\n    }\n\n    /**\n     * @dev Load the value held at location `slot` in transient storage.\n     */\n    function tload(BooleanSlot slot) internal view returns (bool value) {\n        assembly (\"memory-safe\") {\n            value := tload(slot)\n        }\n    }\n\n    /**\n     * @dev Store `value` at location `slot` in transient storage.\n     */\n    function tstore(BooleanSlot slot, bool value) internal {\n        assembly (\"memory-safe\") {\n            tstore(slot, value)\n        }\n    }\n\n    /**\n     * @dev Load the value held at location `slot` in transient storage.\n     */\n    function tload(Bytes32Slot slot) internal view returns (bytes32 value) {\n        assembly (\"memory-safe\") {\n            value := tload(slot)\n        }\n    }\n\n    /**\n     * @dev Store `value` at location `slot` in transient storage.\n     */\n    function tstore(Bytes32Slot slot, bytes32 value) internal {\n        assembly (\"memory-safe\") {\n            tstore(slot, value)\n        }\n    }\n\n    /**\n     * @dev Load the value held at location `slot` in transient storage.\n     */\n    function tload(Uint256Slot slot) internal view returns (uint256 value) {\n        assembly (\"memory-safe\") {\n            value := tload(slot)\n        }\n    }\n\n    /**\n     * @dev Store `value` at location `slot` in transient storage.\n     */\n    function tstore(Uint256Slot slot, uint256 value) internal {\n        assembly (\"memory-safe\") {\n            tstore(slot, value)\n        }\n    }\n\n    /**\n     * @dev Load the value held at location `slot` in transient storage.\n     */\n    function tload(Int256Slot slot) internal view returns (int256 value) {\n        assembly (\"memory-safe\") {\n            value := tload(slot)\n        }\n    }\n\n    /**\n     * @dev Store `value` at location `slot` in transient storage.\n     */\n    function tstore(Int256Slot slot, int256 value) internal {\n        assembly (\"memory-safe\") {\n            tstore(slot, value)\n        }\n    }\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/access/Ownable2StepUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (access/Ownable2Step.sol)\n\npragma solidity ^0.8.20;\n\nimport {OwnableUpgradeable} from \"./OwnableUpgradeable.sol\";\nimport {Initializable} from \"@openzeppelin/contracts/proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * This extension of the {Ownable} contract includes a two-step mechanism to transfer\n * ownership, where the new owner must call {acceptOwnership} in order to replace the\n * old one. This can help prevent common mistakes, such as transfers of ownership to\n * incorrect accounts, or to contracts that are unable to interact with the\n * permission system.\n *\n * The initial owner is specified at deployment time in the constructor for `Ownable`. This\n * can later be changed with {transferOwnership} and {acceptOwnership}.\n *\n * This module is used through inheritance. It will make available all functions\n * from parent (Ownable).\n */\nabstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable {\n    /// @custom:storage-location erc7201:openzeppelin.storage.Ownable2Step\n    struct Ownable2StepStorage {\n        address _pendingOwner;\n    }\n\n    // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Ownable2Step\")) - 1)) & ~bytes32(uint256(0xff))\n    bytes32 private constant Ownable2StepStorageLocation = 0x237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00;\n\n    function _getOwnable2StepStorage() private pure returns (Ownable2StepStorage storage $) {\n        assembly {\n            $.slot := Ownable2StepStorageLocation\n        }\n    }\n\n    event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);\n\n    function __Ownable2Step_init() internal onlyInitializing {\n    }\n\n    function __Ownable2Step_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev Returns the address of the pending owner.\n     */\n    function pendingOwner() public view virtual returns (address) {\n        Ownable2StepStorage storage $ = _getOwnable2StepStorage();\n        return $._pendingOwner;\n    }\n\n    /**\n     * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.\n     * Can only be called by the current owner.\n     *\n     * Setting `newOwner` to the zero address is allowed; this can be used to cancel an initiated ownership transfer.\n     */\n    function transferOwnership(address newOwner) public virtual override onlyOwner {\n        Ownable2StepStorage storage $ = _getOwnable2StepStorage();\n        $._pendingOwner = newOwner;\n        emit OwnershipTransferStarted(owner(), newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual override {\n        Ownable2StepStorage storage $ = _getOwnable2StepStorage();\n        delete $._pendingOwner;\n        super._transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev The new owner accepts the ownership transfer.\n     */\n    function acceptOwnership() public virtual {\n        address sender = _msgSender();\n        if (pendingOwner() != sender) {\n            revert OwnableUnauthorizedAccount(sender);\n        }\n        _transferOwnership(sender);\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {ContextUpgradeable} from \"../utils/ContextUpgradeable.sol\";\nimport {Initializable} from \"@openzeppelin/contracts/proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n    /// @custom:storage-location erc7201:openzeppelin.storage.Ownable\n    struct OwnableStorage {\n        address _owner;\n    }\n\n    // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Ownable\")) - 1)) & ~bytes32(uint256(0xff))\n    bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;\n\n    function _getOwnableStorage() private pure returns (OwnableStorage storage $) {\n        assembly {\n            $.slot := OwnableStorageLocation\n        }\n    }\n\n    /**\n     * @dev The caller account is not authorized to perform an operation.\n     */\n    error OwnableUnauthorizedAccount(address account);\n\n    /**\n     * @dev The owner is not a valid owner account. (eg. `address(0)`)\n     */\n    error OwnableInvalidOwner(address owner);\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n     */\n    function __Ownable_init(address initialOwner) internal onlyInitializing {\n        __Ownable_init_unchained(initialOwner);\n    }\n\n    function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {\n        if (initialOwner == address(0)) {\n            revert OwnableInvalidOwner(address(0));\n        }\n        _transferOwnership(initialOwner);\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        _checkOwner();\n        _;\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        OwnableStorage storage $ = _getOwnableStorage();\n        return $._owner;\n    }\n\n    /**\n     * @dev Throws if the sender is not the owner.\n     */\n    function _checkOwner() internal view virtual {\n        if (owner() != _msgSender()) {\n            revert OwnableUnauthorizedAccount(_msgSender());\n        }\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby disabling any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        if (newOwner == address(0)) {\n            revert OwnableInvalidOwner(address(0));\n        }\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        OwnableStorage storage $ = _getOwnableStorage();\n        address oldOwner = $._owner;\n        $._owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/interfaces/IERC7913.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC7913.sol)\n\npragma solidity >=0.5.0;\n\n/**\n * @dev Signature verifier interface.\n */\ninterface IERC7913SignatureVerifier {\n    /**\n     * @dev Verifies `signature` as a valid signature of `hash` by `key`.\n     *\n     * MUST return the bytes4 magic value IERC7913SignatureVerifier.verify.selector if the signature is valid.\n     * SHOULD return 0xffffffff or revert if the signature is not valid.\n     * SHOULD return 0xffffffff or revert if the key is empty\n     */\n    function verify(bytes calldata key, bytes32 hash, bytes calldata signature) external view returns (bytes4);\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.5.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// OpenZeppelin Contracts (last updated v5.5.0) (utils/Memory.sol)\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":"contracts/cb/ICircuitBreakerV2.sol","source_code":"// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.30;\n\nimport {IHealthcheck} from \"./IHealthcheck.sol\";\n\n/// @title ICircuitBreakerV2\n/// @notice Rate limiter with deferred settlement for protocol outflows\n/// @dev Fee-on-transfer (FOT) and rebasing tokens are NOT supported.\n///      Using such tokens will result in incorrect accounting and potential loss of funds.\ninterface ICircuitBreakerV2 {\n    // ===== Enums =====\n    enum QueueStatus {\n        Pending,\n        Paused\n    }\n\n    // ===== Structs =====\n    struct QueuedOutflow {\n        address token;\n        uint40 queuedAt;\n        uint40 settlesAt;\n        QueueStatus status;\n        address recipient;\n        uint64 recoveryEpoch;\n        uint256 amount;\n    }\n\n    struct LimiterConfig {\n        uint64 maxDrawRateWad;\n        uint48 mainWindow;\n        uint48 elasticWindow;\n    }\n\n    struct AssetHealth {\n        uint256 mainBuffer;\n        uint256 mainBufferCap;\n        uint256 elasticBuffer;\n        uint256 totalCapacity;\n        uint256 pendingOutflows;\n        uint256 utilizationBps;\n        bool isPaused;\n    }\n\n    // ===== Events =====\n    event Inflow(address indexed asset, uint256 amount, uint256 newTvl);\n    event OutflowImmediate(address indexed asset, address indexed to, uint256 amount);\n    event OutflowQueued(\n        uint256 indexed queueId,\n        address indexed asset,\n        address indexed recipient,\n        uint256 amount,\n        uint256 settlesAt\n    );\n    event OutflowLimiterContext(\n        uint256 indexed queueId, address indexed limiterAsset, address indexed transferToken\n    );\n    event OutflowExecuted(\n        uint256 indexed queueId, address indexed recipient, address indexed asset, uint256 amount\n    );\n    event OutflowPaused(uint256 indexed queueId, address indexed recipient);\n    event OutflowResumed(uint256 indexed queueId, address indexed recipient);\n    event OutflowSpedUp(uint256 indexed queueId, address indexed recipient, uint256 newSettlesAt);\n\n    event ConfigUpdated(address indexed asset, LimiterConfig config);\n    event DelayUpdated(uint256 newDelay);\n    event Paused(address indexed by);\n    event Unpaused();\n    event AssetPaused(address indexed asset, address indexed by);\n    event AssetUnpaused(address indexed asset);\n    event EmergencyRecovery(\n        address indexed asset, address indexed to, uint256 amount, uint64 newEpoch\n    );\n    event ProtectedContractUpdated(address indexed contract_, bool enabled);\n    event GuardianUpdated(address indexed newGuardian);\n    event EmergencyOverride(address indexed contract_, address indexed asset, uint256 amount);\n    event HealthcheckUpdated(address indexed newHealthcheck);\n    event OperatorUpdated(address indexed newOperator);\n    event RecipientWhitelistUpdated(address indexed recipient, bool enabled);\n    event ScopedLimiterUpdated(address indexed contract_, bool enabled);\n    event AssetTracked(address indexed asset);\n\n    // ===== Errors =====\n    error NotProtectedContract();\n    error NotScopedContract();\n    error NotAdmin();\n    error NotAdminOrGuardian();\n    error NotOperatorOrOwner();\n    error GloballyPaused();\n    error NotPaused();\n    error AssetPausedError(address asset);\n    error QueueNotFound(uint256 queueId);\n    error QueueNotSettled(uint256 queueId, uint256 settlesAt);\n    error QueueInvalidated(uint256 queueId, uint64 queueEpoch, uint64 currentEpoch);\n    error InvalidStatus(uint256 queueId, QueueStatus current, QueueStatus expected);\n    error InvalidConfig();\n    error ZeroAddress();\n    error ZeroAmount();\n    error HealthcheckFailed(uint256 queueId);\n    error InvalidSettleTime(uint256 queueId, uint256 currentSettlesAt, uint256 requestedSettlesAt);\n    error NoChange();\n\n    // ===== Core =====\n    function recordInflow(address asset, uint256 amount, uint256 preTvl) external;\n\n    function attemptOutflow(\n        address asset,\n        address to,\n        uint256 amount,\n        uint256 preTvl\n    )\n        external\n        returns (bool immediate, uint256 queueId);\n\n    /// @notice Rate-limit by `limiterAsset` but queue/transfer `transferToken`\n    /// @dev Use when the token being transferred differs from the rate-limit bucket key.\n    ///      E.g., wrapper withdrawUnderlying uses the wrapper's `token` as limiter but\n    ///      transfers individual strategy `positionToken`s.\n    ///      `limiterAmount` is used for rate-limit accounting (in limiterAsset decimals).\n    ///      `transferAmount` is stored in the queue and used for settlement transfers\n    ///      (in transferToken decimals). They differ when decimals mismatch.\n    /// @param limiterAsset Asset address used for rate-limit state (bucket key)\n    /// @param transferToken Token actually transferred / queued\n    /// @param to Recipient\n    /// @param limiterAmount Amount in limiterAsset decimals for rate-limit accounting\n    /// @param transferAmount Amount in transferToken decimals for queue storage and settlement\n    /// @param preTvl TVL before the outflow (in limiterAsset decimals for consistent buffer sizing)\n    function attemptOutflowWithLimiter(\n        address limiterAsset,\n        address transferToken,\n        address to,\n        uint256 limiterAmount,\n        uint256 transferAmount,\n        uint256 preTvl\n    )\n        external\n        returns (bool immediate, uint256 queueId);\n\n    // ===== Settlement =====\n    function executeQueued(uint256 queueId) external;\n\n    function executeQueuedBatch(uint256[] calldata queueIds) external;\n\n    // ===== Views =====\n    function getQueueIdsByRecipient(address recipient)\n        external\n        view\n        returns (uint256[] memory queueIds);\n\n    function getQueuedByRecipient(\n        address recipient,\n        uint256 offset,\n        uint256 limit\n    )\n        external\n        view\n        returns (QueuedOutflow[] memory outflows);\n\n    function getQueued(uint256 queueId) external view returns (QueuedOutflow memory);\n\n    function isSettled(uint256 queueId) external view returns (bool);\n\n    function timeUntilSettled(uint256 queueId) external view returns (uint256 remaining);\n\n    function getAssetHealth(\n        address asset,\n        uint256 currentTvl\n    )\n        external\n        view\n        returns (AssetHealth memory health);\n\n    function withdrawalCapacity(address asset, uint256 currentTvl) external view returns (uint256);\n\n    /// @notice Check if an outflow would be immediate or queued (without recording)\n    /// @dev Use this for flows that cannot be queued (e.g., position token withdrawals)\n    /// @param asset The asset being withdrawn\n    /// @param amount The amount to check\n    /// @param currentTvl The current TVL for capacity calculation\n    /// @return wouldBeImmediate True if withdrawal would be immediate, false if would be queued\n    /// @return availableCapacity Current available withdrawal capacity\n    function checkOutflow(\n        address asset,\n        uint256 amount,\n        uint256 currentTvl\n    )\n        external\n        view\n        returns (bool wouldBeImmediate, uint256 availableCapacity);\n\n    /// @notice Get asset health for a specific contract's limiter state\n    /// @dev Falls back to shared state if contract is not scoped\n    function getAssetHealth(\n        address contract_,\n        address asset,\n        uint256 currentTvl\n    )\n        external\n        view\n        returns (AssetHealth memory health);\n\n    /// @notice Get withdrawal capacity for a specific contract's limiter state\n    /// @dev Falls back to shared state if contract is not scoped\n    function withdrawalCapacity(\n        address contract_,\n        address asset,\n        uint256 currentTvl\n    )\n        external\n        view\n        returns (uint256);\n\n    /// @notice Check if outflow would be immediate for a specific contract's limiter state\n    /// @dev Falls back to shared state if contract is not scoped\n    function checkOutflow(\n        address contract_,\n        address asset,\n        uint256 amount,\n        uint256 currentTvl\n    )\n        external\n        view\n        returns (bool wouldBeImmediate, uint256 availableCapacity);\n\n    /// @notice Get the default rate limiter configuration\n    function getDefaultConfig() external view returns (LimiterConfig memory);\n\n    /// @notice Get the rate limiter configuration for a specific asset (falls back to default if unset)\n    function getConfig(address asset) external view returns (LimiterConfig memory);\n\n    function pendingOutflows(address asset) external view returns (uint256);\n\n    function settlementDelay() external view returns (uint256);\n\n    function paused() external view returns (bool);\n\n    function nextQueueId() external view returns (uint256);\n\n    function assetRecoveryEpoch(address asset) external view returns (uint64);\n\n    // ===== Enumeration Views =====\n\n    /// @notice Check if an address is a registered protected contract\n    function isProtectedContract(address contract_) external view returns (bool);\n\n    /// @notice Get all registered protected contracts\n    function getProtectedContracts() external view returns (address[] memory);\n\n    /// @notice Get count of registered protected contracts\n    function protectedContractCount() external view returns (uint256);\n\n    /// @notice Check if an asset has been tracked (had inflows/outflows)\n    function isTrackedAsset(address asset) external view returns (bool);\n\n    /// @notice Get all tracked assets\n    function getTrackedAssets() external view returns (address[] memory);\n\n    /// @notice Get count of tracked assets\n    function trackedAssetCount() external view returns (uint256);\n\n    /// @notice Check if a contract has scoped limiter state\n    function isScopedLimiter(address contract_) external view returns (bool);\n\n    /// @notice Check if an address is a whitelisted recipient\n    function isWhitelistedRecipient(address recipient) external view returns (bool);\n\n    /// @notice Get all whitelisted recipients\n    function getWhitelistedRecipients() external view returns (address[] memory);\n\n    /// @notice Get count of whitelisted recipients\n    function whitelistedRecipientCount() external view returns (uint256);\n\n    /// @notice Get comprehensive system status for monitoring dashboards\n    function getSystemStatus()\n        external\n        view\n        returns (\n            bool active,\n            address admin,\n            address guardianAddr,\n            uint256 delay,\n            uint256 numProtectedContracts,\n            uint256 numTrackedAssets,\n            uint256 numQueuedOutflows\n        );\n\n    // ===== Admin =====\n    function unpause() external;\n    function unpauseAsset(address asset) external;\n    /// @notice Speed up a queued outflow by reducing its settlement time\n    /// @param queueId The queue ID to speed up\n    /// @param newSettleDelay The new delay from now (0 = instant, settlesAt = block.timestamp)\n    /// @dev Reverts if newSettleDelay would result in a later settlesAt than current\n    function speedUp(uint256 queueId, uint256 newSettleDelay) external;\n    function resumeQueued(uint256 queueId) external;\n    function emergencyRecover(address asset, address to) external;\n\n    /// @notice Temporarily increase elastic buffer capacity to allow a specific withdrawal\n    /// @dev Writing lastUpdated discards pending main-buffer replenishment. Accepted: capacity\n    ///      loss is conservative, `speedUp` is preferred for unblocking queued outflows, and\n    ///      replenishment resumes on the next inflow/outflow.\n    /// @param asset The asset to increase capacity for\n    /// @param amount The amount to add to elastic buffer capacity\n    function emergencyOverride(address asset, uint256 amount) external;\n\n    /// @notice Temporarily increase elastic buffer capacity for a scoped contract's state\n    /// @dev Only works for contracts with scoped limiter enabled. Reverts if not registered or not scoped.\n    function emergencyOverrideScoped(address contract_, address asset, uint256 amount) external;\n\n    function setScopedLimiter(address contract_, bool enabled) external;\n\n    function setDelay(uint256 newDelay) external;\n    function setConfig(address asset, LimiterConfig calldata config) external;\n    function setDefaultConfig(LimiterConfig calldata config) external;\n    function setProtectedContract(address contract_, bool enabled) external;\n    function setGuardian(address newGuardian) external;\n    function setHealthcheck(address healthcheck_) external;\n    function setOperator(address operator_) external;\n    function setWhitelistedRecipient(address recipient, bool enabled) external;\n\n    // ===== Admin/Guardian =====\n    function pause() external;\n    function pauseAsset(address asset) external;\n    function pauseQueued(uint256 queueId) external;\n\n    // ===== Roles =====\n    function guardian() external view returns (address);\n    function healthcheck() external view returns (IHealthcheck);\n    function operator() external view returns (address);\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/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/contracts/utils/ReentrancyGuardTransient.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.0) (utils/ReentrancyGuardTransient.sol)\n\npragma solidity ^0.8.24;\n\nimport {TransientSlot} from \"./TransientSlot.sol\";\n\n/**\n * @dev Variant of {ReentrancyGuard} that uses transient storage.\n *\n * NOTE: This variant only works on networks where EIP-1153 is available.\n *\n * _Available since v5.1._\n *\n * @custom:stateless\n */\nabstract contract ReentrancyGuardTransient {\n    using TransientSlot for *;\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    /**\n     * @dev Unauthorized reentrant call.\n     */\n    error ReentrancyGuardReentrantCall();\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, REENTRANCY_GUARD_STORAGE.asBoolean().tload() will be false\n        _nonReentrantBeforeView();\n\n        // Any calls to nonReentrant after this point will fail\n        _reentrancyGuardStorageSlot().asBoolean().tstore(true);\n    }\n\n    function _nonReentrantAfter() private {\n        _reentrancyGuardStorageSlot().asBoolean().tstore(false);\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().asBoolean().tload();\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/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/interfaces/IERC1271.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1271.sol)\n\npragma solidity >=0.5.0;\n\n/**\n * @dev Interface of the ERC-1271 standard signature validation method for\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\n */\ninterface IERC1271 {\n    /**\n     * @dev Should return whether the signature provided is valid for the provided data\n     * @param hash      Hash of the data to be signed\n     * @param signature Signature byte array associated with `hash`\n     */\n    function isValidSignature(bytes32 hash, bytes calldata signature) external view returns (bytes4 magicValue);\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.5.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":"lib/openzeppelin-contracts/contracts/utils/cryptography/SignatureChecker.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.0) (utils/cryptography/SignatureChecker.sol)\n\npragma solidity ^0.8.24;\n\nimport {ECDSA} from \"./ECDSA.sol\";\nimport {IERC1271} from \"../../interfaces/IERC1271.sol\";\nimport {IERC7913SignatureVerifier} from \"../../interfaces/IERC7913.sol\";\nimport {Bytes} from \"../Bytes.sol\";\n\n/**\n * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support:\n *\n * * ECDSA signatures from externally owned accounts (EOAs)\n * * ERC-1271 signatures from smart contract wallets like Argent and Safe Wallet (previously Gnosis Safe)\n * * ERC-7913 signatures from keys that do not have an Ethereum address of their own\n *\n * See https://eips.ethereum.org/EIPS/eip-1271[ERC-1271] and https://eips.ethereum.org/EIPS/eip-7913[ERC-7913].\n */\nlibrary SignatureChecker {\n    using Bytes for bytes;\n\n    /**\n     * @dev Checks if a signature is valid for a given signer and data hash. If the signer has code, the\n     * signature is validated against it using ERC-1271, otherwise it's validated using `ECDSA.recover`.\n     *\n     * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n     * change through time. It could return true at block N and false at block N+1 (or the opposite).\n     *\n     * NOTE: For an extended version of this function that supports ERC-7913 signatures, see {isValidSignatureNow-bytes-bytes32-bytes-}.\n     */\n    function isValidSignatureNow(address signer, bytes32 hash, bytes memory signature) internal view returns (bool) {\n        if (signer.code.length == 0) {\n            (address recovered, ECDSA.RecoverError err, ) = ECDSA.tryRecover(hash, signature);\n            return err == ECDSA.RecoverError.NoError && recovered == signer;\n        } else {\n            return isValidERC1271SignatureNow(signer, hash, signature);\n        }\n    }\n\n    /**\n     * @dev Variant of {isValidSignatureNow} that takes a signature in calldata\n     */\n    function isValidSignatureNowCalldata(\n        address signer,\n        bytes32 hash,\n        bytes calldata signature\n    ) internal view returns (bool) {\n        if (signer.code.length == 0) {\n            (address recovered, ECDSA.RecoverError err, ) = ECDSA.tryRecoverCalldata(hash, signature);\n            return err == ECDSA.RecoverError.NoError && recovered == signer;\n        } else {\n            return isValidERC1271SignatureNow(signer, hash, signature);\n        }\n    }\n\n    /**\n     * @dev Checks if a signature is valid for a given signer and data hash. The signature is validated\n     * against the signer smart contract using ERC-1271.\n     *\n     * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n     * change through time. It could return true at block N and false at block N+1 (or the opposite).\n     */\n    function isValidERC1271SignatureNow(\n        address signer,\n        bytes32 hash,\n        bytes memory signature\n    ) internal view returns (bool result) {\n        bytes4 selector = IERC1271.isValidSignature.selector;\n        uint256 length = signature.length;\n\n        assembly (\"memory-safe\") {\n            // Encoded calldata is :\n            // [ 0x00 - 0x03 ] <selector>\n            // [ 0x04 - 0x23 ] <hash>\n            // [ 0x24 - 0x44 ] <signature offset> (0x40)\n            // [ 0x44 - 0x64 ] <signature length>\n            // [ 0x64 - ...  ] <signature data>\n            let ptr := mload(0x40)\n            mstore(ptr, selector)\n            mstore(add(ptr, 0x04), hash)\n            mstore(add(ptr, 0x24), 0x40)\n            mcopy(add(ptr, 0x44), signature, add(length, 0x20))\n\n            let success := staticcall(gas(), signer, ptr, add(length, 0x64), 0x00, 0x20)\n            result := and(success, and(gt(returndatasize(), 0x1f), eq(mload(0x00), selector)))\n        }\n    }\n\n    /**\n     * @dev Verifies a signature for a given ERC-7913 signer and hash.\n     *\n     * The signer is a `bytes` object that is the concatenation of an address and optionally a key:\n     * `verifier || key`. A signer must be at least 20 bytes long.\n     *\n     * Verification is done as follows:\n     *\n     * * If `signer.length < 20`: verification fails\n     * * If `signer.length == 20`: verification is done using {isValidSignatureNow}\n     * * Otherwise: verification is done using {IERC7913SignatureVerifier}\n     *\n     * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n     * change through time. It could return true at block N and false at block N+1 (or the opposite).\n     */\n    function isValidSignatureNow(\n        bytes memory signer,\n        bytes32 hash,\n        bytes memory signature\n    ) internal view returns (bool) {\n        if (signer.length < 20) {\n            return false;\n        } else if (signer.length == 20) {\n            return isValidSignatureNow(address(bytes20(signer)), hash, signature);\n        } else {\n            (bool success, bytes memory result) = address(bytes20(signer)).staticcall(\n                abi.encodeCall(IERC7913SignatureVerifier.verify, (signer.slice(20), hash, signature))\n            );\n            return (success &&\n                result.length >= 32 &&\n                abi.decode(result, (bytes32)) == bytes32(IERC7913SignatureVerifier.verify.selector));\n        }\n    }\n\n    /**\n     * @dev Verifies multiple ERC-7913 `signatures` for a given `hash` using a set of `signers`.\n     * Returns `false` if the number of signers and signatures is not the same.\n     *\n     * The signers should be ordered by their `keccak256` hash to ensure efficient duplication check. Unordered\n     * signers are supported, but the uniqueness check will be more expensive.\n     *\n     * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n     * change through time. It could return true at block N and false at block N+1 (or the opposite).\n     */\n    function areValidSignaturesNow(\n        bytes32 hash,\n        bytes[] memory signers,\n        bytes[] memory signatures\n    ) internal view returns (bool) {\n        if (signers.length != signatures.length) return false;\n\n        bytes32 lastId = bytes32(0);\n\n        for (uint256 i = 0; i < signers.length; ++i) {\n            bytes memory signer = signers[i];\n\n            // If one of the signatures is invalid, reject the batch\n            if (!isValidSignatureNow(signer, hash, signatures[i])) return false;\n\n            bytes32 id = keccak256(signer);\n            // If the current signer ID is greater than all previous IDs, then this is a new signer.\n            if (lastId < id) {\n                lastId = id;\n            } else {\n                // If this signer id is not greater than all the previous ones, verify that it is not a duplicate of a previous one\n                // This loop is never executed if the signers are ordered by id.\n                for (uint256 j = 0; j < i; ++j) {\n                    if (id == keccak256(signers[j])) return false;\n                }\n            }\n        }\n\n        return true;\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/utils/Bytes.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.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":"lib/openzeppelin-contracts/contracts/proxy/utils/UUPSUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.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.5.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":"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// OpenZeppelin Contracts (last updated v5.5.0) (utils/LowLevelCall.sol)\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":"lib/openzeppelin-contracts/contracts/utils/Address.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.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.5.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"}],"is_verified_via_sourcify":false,"can_be_visualized_via_sol2uml":true,"evm_version":"cancun","language":"solidity","is_verified_via_eth_bytecode_db":false,"is_fully_verified":false,"license_type":"none","is_blueprint":false,"name":"StableEpochRewardsVault","creation_bytecode":"0x61010080604052346103815761002b90615f0780380380916100218285610385565b83398101906103bc565b3060805261708060e0526001600160a01b038116908115908115610377575b5061036557604051637e062a3560e11b8152602081600481855afa9081156102dd575f91610336575b506001600160a01b03811690811590811561032c575b506103195760405163313ce56760e01b8152602081600481855afa80156102dd5760ff915f916102fa575b5016600681036102e85760405163313ce56760e01b8152602081600481875afa80156102dd5760ff915f916102ae575b501681810361029957505060a05260c0525f516020615ee75f395f51905f525460ff8160401c1661028a576002600160401b03196001600160401b03821601610234575b604051615af290816103f58239608051818181612c620152612d05015260a05181818161082601528181610da30152818161199f01528181611f99015281816122b601528181612d850152818161309e0152818161341701528181613b68015281816143d6015281816144520152818161479f0152615407015260c05181818161102701528181611fc00152818161287801528181612e4b0152818161322d015281816134b001528181613a2901528181613bbd0152818161452e0152818161466101528181614dd8015281816150c00152615339015260e0518181816120940152818161213901528181612a5c01528181612de801528181613d8501528181613dc50152613f3a0152f35b6001600160401b0319166001600160401b039081175f516020615ee75f395f51905f52556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a15f610128565b63f92ee8a960e01b5f5260045ffd5b630a58105d60e41b5f5260045260245260445ffd5b6102d0915060203d6020116102d6575b6102c88183610385565b8101906103db565b5f6100e4565b503d6102be565b6040513d5f823e3d90fd5b636e1d33f560e11b5f5260045260245ffd5b610313915060203d6020116102d6576102c88183610385565b5f6100b4565b50635f6a825b60e01b5f5260045260245ffd5b90503b155f610089565b610358915060203d60201161035e575b6103508183610385565b8101906103bc565b5f610073565b503d610346565b635f6a825b60e01b5f5260045260245ffd5b90503b155f61004a565b5f80fd5b601f909101601f19168101906001600160401b038211908210176103a857604052565b634e487b7160e01b5f52604160045260245ffd5b9081602091031261038157516001600160a01b03811681036103815790565b90816020910312610381575160ff81168103610381579056fe608080604052600436101561001c575b50361561001a575f80fd5b005b5f905f3560e01c908162728f76146136355750806301e1d1141461361657806306fdde031461353457806307a2d13a14613084578063095ea7b31461350e5780630a28a477146134f05780631171bda9146133c757806318160ddd1461339e5780631fcd30801461338157806323b872dd146133495780632d88af4a146132e15780632e2d29841461325c5780632f539f9c14613218578063313ce567146131da5780633577d06f146131b75780633644e5151461319d57806338d52e0f146131695780633f4ba83a146130eb578063402d267d146130cd5780634800d97f146130895780634cdad506146130845780634f1ef28614612cb657806352d1902d14612c505780635c975abb14612c2257806364fede9114612c06578063674f0abd14612b8f5780636e553f6514612b4157806370a0823114612afd578063715018a614612a805780637313ee5a14612a3f578063748fccbb14612a2557806375b17350146129fe57806379ba5097146129b25780637d94792a146127745780637ecebe001461271d5780638456cb591461266557806384b0196e14612517578063856efae9146121e35780638da5cb5b146121ae57806393707a1914611f2957806394bf804d14611e7a57806395d89b4114611d7f5780639fd0506d14611d565780639fd5a6cf14611c01578063a1809b9514611b97578063a9059cbb14611b65578063ac47ed6214611b4a578063acc2166a14611b21578063ad3cb1cc14611ad4578063b3cb246b1461192f578063b3d7f6b914611910578063b460af9414611854578063b7b13f791461182b578063b9851ef114611802578063ba08765214611744578063c0c53b8b14610bd0578063c1beb96614610b7e578063c63d75b614610b5a578063c6e6f592146105c6578063ce36bc5214610b3c578063ce96cb7714610b18578063d4347f2514610afb578063d505accf146109d5578063d905777e146109a9578063dd62ed3e14610961578063e30c39781461092c578063e7710684146105f9578063e7c2a608146105cb578063ef8b30f7146105c6578063f2cda82e146104eb578063f2fde38b14610465578063f6ee1d88146103f1578063f7799ba2146103785763fed856fe0361000f5734610375578060031936011261037557602061036b613f04565b6040519015158152f35b80fd5b50346103755760203660031901126103755761039261369a565b61039a614073565b6001600160a01b031680156103e257600580546001600160a01b031916821790557f741a765e077edc4463a22a7f8d77b28598cc664c73c416b3ed83870c655d61e08280a280f35b63d92e233d60e01b8252600482fd5b50346103755760203660031901126103755760409061044861041161369a565b610419614073565b610421614093565b6001600160a01b03811683525f5160206159725f395f51905f526020528383205490614b2d565b90915f516020615a925f395f51905f525d82519182526020820152f35b50346103755760203660031901126103755761047f61369a565b610487614073565b5f516020615ad25f395f51905f5280546001600160a01b0319166001600160a01b039283169081179091555f5160206159d25f395f51905f52549091167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e227008380a380f35b5034610375576040366003190112610375576004356001600160a01b038116908190036105c25760243561051d614073565b610525614093565b81156105b3578280808084865af13d156105ae573d61054381613735565b906105516040519283613700565b81528460203d92013e5b1561059f577ffff3b3844276f57024e0b42afec1a37f75db36511e43819a4f2a63ab7862b64860208492604051908152a3805f516020615a925f395f51905f525d80f35b633d2cec6f60e21b8352600483fd5b61055b565b63d92e233d60e01b8352600483fd5b5080fd5b6137b3565b50346103755780600319360112610375576020906105e7613d47565b90546040519181808210911802188152f35b503461037557610100366003190112610375576004359060c03660231901126103755760e4356001600160401b0381116105c25761063b903690600401613786565b91906106456146e0565b61064d614093565b6006546001600160a01b031690811561091d57841561090e5760405160208101907f4e1caf8c5da6a3d9537f5d68d602aab4b9ffc3e3b30ec20a79b357513208fd7b8252866040820152604081526106a6606082613700565b51902091604435928084036108f757506106bf86613fee565b9485156108e8576040519363033972db60e61b855230600486015286602486015260243560448601526064850152606435608485015260843560a485015260a43560018060a01b0381168091036108e457918486610160826004819660609860c48401528060c4359a8b60e4860152610140610104860152816101448601526101648501378281018201840185905233610124840152601f01601f19168201010301925af180156108d957839284916108a2575b5061077d83613e36565b80871161087e5750946107938260609783614832565b6107b1856107a984801515948561086c576137d1565b858080614ebf565b6107db575b5050805f516020615a925f395f51905f525d6040519182528060208301526040820152f35b6107ec6107e6613cd9565b8261508d565b7f8e42ca3aac5a530592fc918a1c73f7a155aa98df7379ecb1148b885792035f6e610862610818613cd9565b604080516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811682526020820196909652918516959094169390918291820190565b0390a35f806107b6565b610877828a546137d1565b89556137d1565b633fa733bb60e21b85526001600160a01b0384166004526024879052604452606484fd5b90506108c791925060603d6060116108d2575b6108bf8183613700565b810190613c8e565b92919050915f610773565b503d6108b5565b6040513d85823e3d90fd5b8580fd5b639811e0c760e01b8552600485fd5b63690a925560e01b85526004526024839052604484fd5b631f2a200560e01b8352600483fd5b6334455b4160e21b8352600483fd5b50346103755780600319360112610375575f516020615ad25f395f51905f52546040516001600160a01b039091168152602090f35b50346103755760403660031901126103755761097b61369a565b61098c6109866136b0565b91613b08565b9060018060a01b03165f52602052602060405f2054604051908152f35b50346103755760203660031901126103755760206109cd6109c861369a565b613ea7565b604051908152f35b50346103755760e0366003190112610375576109ef61369a565b906109f86136b0565b604435906064359360843560ff81168103610af757854211610ae357610aa895610a79610a9f92610a87610a648660018060a01b03165f527f5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb0060205260405f2080549060018201905590565b9360405193849160208301968b8b8b8a613cef565b03601f198101845283613700565b610a9a60c4359360a435935190206148f7565b6155b8565b90969196615665565b6001600160a01b03948516948116808603610acc5750610ac9939450615186565b80f35b6325c0072360e11b85526004869052602452604484fd5b63313c898160e11b85526004869052602485fd5b8480fd5b503461037557806003193601126103755760209054604051908152f35b50346103755760203660031901126103755760206109cd610b3761369a565b613e36565b50346103755780600319360112610375576020604051620f42408152f35b50346103755760203660031901126103755760206109cd610b7961369a565b613a89565b503461037557604036600319011261037557602090610bb7610b9e61369a565b610ba6614073565b610bae614093565b60243590614b2d565b50905f516020615a925f395f51905f525d604051908152f35b503461037557606036600319011261037557610bea61369a565b610bf26136b0565b906044356001600160a01b0381169190829003611740575f516020615ab25f395f51905f52549160ff8360401c1615926001600160401b03811680159081611738575b600114908161172e575b159081611725575b506117165767ffffffffffffffff1981166001175f516020615ab25f395f51905f5255836116ea575b506001600160a01b03821615938480156116d9575b80156116d1575b6116c257610c98613dfb565b90604091825190610ca98483613700565b60078252661cdcd99d1554d160ca1b6020830152610cc561563a565b610ccd61563a565b8051906001600160401b0382116116ae578190610cf75f5160206159525f395f51905f52546137de565b601f8111611634575b50602090601f83116001146115b8578b926115ad575b50508160011b915f199060031b1c1916175f5160206159525f395f51905f52555b8051906001600160401b038211611599578190610d615f5160206159b25f395f51905f52546137de565b601f811161151f575b50602090601f83116001146114a3578a92611498575b50508160011b915f199060031b1c1916175f5160206159b25f395f51905f52555b7f000000000000000000000000000000000000000000000000000000000000000093610dcb61563a565b610dd361563a565b825163313ce56760e01b60208201908152600482526001600160a01b0387169891899186908c90610e05602485613700565b835190855afa8b519187528061148d575b80611482575b1561147a5760ff1660015b15611472575b5f516020615a525f395f51905f52549060ff60a01b9060a01b16906affffffffffffffffffffff60a81b1617175f516020615a525f395f51905f5255610e71613dfb565b610e7961563a565b845190610e868683613700565b60018252603160f81b6020830152610e9c61563a565b8051906001600160401b03821161145e578190610ec65f5160206159925f395f51905f52546137de565b601f81116113e1575b506020908d601f8411600114611365579261135a575b50508160011b915f199060031b1c1916175f5160206159925f395f51905f52555b8051906001600160401b038211611346578190610f305f516020615a125f395f51905f52546137de565b601f81116112cc575b50602090601f8311600114611250578c92611245575b50508160011b915f199060031b1c1916175f516020615a125f395f51905f52555b887fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10055887fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10155610fbe61563a565b610fc661563a565b610fce61563a565b61123157610fdb90614572565b610fe361563a565b60018060a01b031694856bffffffffffffffffffffffff60a01b6003541617600355826bffffffffffffffffffffffff60a01b600454161760045560018060a01b037f00000000000000000000000000000000000000000000000000000000000000001693825163095ea7b360e01b8952856004525f1960245260208960448180865af19060018a5114821615611222575b84521561114b575b505051937f15057bbec20fe352ac8931e529ade6a9ce138c954ffc87d6aa3423dd066c4acd8680a27fa4336c0cb1e245b95ad204faed7e940d6dc999684fd8b5e1ff597a0c4efca8ab8580a27f7e0434a1aff23de76c2397719d87705b95ece8a270bdcbe3a55d0ce5b162cad58480a26110f5575080f35b60207fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29168ff0000000000000000195f516020615ab25f395f51905f5254165f516020615ab25f395f51905f525560018152a180f35b825163095ea7b360e01b8952856004528860245260208960448180865af19060018a5114821615611201575b8452156111ed57825163095ea7b360e01b895260048690525f196024529060208960448180855af19060018a51148216156111ce575b50908352156111bc578061107d565b635274afe760e01b8752600452602486fd5b60018215166111e4573b15153d1516165f6111ad565b823d8b823e3d90fd5b635274afe760e01b88526004829052602488fd5b90600181151661121957823b15153d15161690611177565b503d89823e3d90fd5b90823b15153d15161690611075565b631e4fbdf760e01b88526004889052602488fd5b015190505f80610f4f565b5f516020615a125f395f51905f528d52818d209250601f1984168d5b8181106112b4575090846001959493921061129c575b505050811b015f516020615a125f395f51905f5255610f70565b01515f1960f88460031b161c191690555f8080611282565b9293602060018192878601518155019501930161126c565b5f516020615a125f395f51905f528d529091507f5f9ce34815f8e11431c7bb75a8e6886a91478f7ffc1dbb0a98dc240fddd76b75601f840160051c8101916020851061133c575b90601f859493920160051c01905b81811061132e5750610f39565b8d8155849350600101611321565b9091508190611313565b634e487b7160e01b8b52604160045260248bfd5b015190505f80610ee5565b5f5160206159925f395f51905f5281528281209350601f198516905b8181106113c957509084600195949392106113b1575b505050811b015f5160206159925f395f51905f5255610f06565b01515f1960f88460031b161c191690555f8080611397565b92936020600181928786015181550195019301611381565b5f5160206159925f395f51905f528e529091507f42ad5d3e1f2e6e70edcf6d991b8a3023d3fca8047a131592f9edb9fd9b89d57d601f840160051c81019160208510611454575b849392918f91601f0160051c0191905b828210611446575050610ecf565b81558493506001018e611438565b9091508190611428565b634e487b7160e01b8c52604160045260248cfd5b506012610e2d565b508980610e27565b5060ff811115610e1c565b5060203d1015610e16565b015190505f80610d80565b5f5160206159b25f395f51905f528b52818b209250601f1984168b5b81811061150757509084600195949392106114ef575b505050811b015f5160206159b25f395f51905f5255610da1565b01515f1960f88460031b161c191690555f80806114d5565b929360206001819287860151815501950193016114bf565b5f5160206159b25f395f51905f528b529091507f46a2803e59a4de4e7a4c574b1243f25977ac4c77d5a1a4a609b5394cebb4a2aa601f840160051c8101916020851061158f575b90601f859493920160051c01905b8181106115815750610d6a565b8b8155849350600101611574565b9091508190611566565b634e487b7160e01b89526041600452602489fd5b015190505f80610d16565b5f5160206159525f395f51905f528c52818c209250601f1984168c5b81811061161c5750908460019594939210611604575b505050811b015f5160206159525f395f51905f5255610d37565b01515f1960f88460031b161c191690555f80806115ea565b929360206001819287860151815501950193016115d4565b5f5160206159525f395f51905f528c529091507f2ae08a8e29253f69ac5d979a101956ab8f8d9d7ded63fa7a83b16fc47648eab0601f840160051c810191602085106116a4575b90601f859493920160051c01905b8181106116965750610d00565b8c8155849350600101611689565b909150819061167b565b634e487b7160e01b8a52604160045260248afd5b63d92e233d60e01b8652600486fd5b508115610c8c565b506001600160a01b03811615610c85565b68ffffffffffffffffff191668010000000000000001175f516020615ab25f395f51905f52555f610c70565b63f92ee8a960e01b8652600486fd5b9050155f610c47565b303b159150610c3f565b859150610c35565b8380fd5b503461037557611753366136c6565b9161175f939193614093565b6001600160a01b0384161580156117f1575b6103e25780156117e25761178483613ea7565b8082116117bc57508060209461179c6117a593613fb2565b94859133614ebf565b5f516020615a925f395f51905f525d604051908152f35b632e52afbb60e21b83526001600160a01b03909316600452602452604491909152606490fd5b639811e0c760e01b8252600482fd5b506001600160a01b03831615611771565b50346103755780600319360112610375576005546040516001600160a01b039091168152602090f35b50346103755780600319360112610375576006546040516001600160a01b039091168152602090f35b503461037557611863366136c6565b61186e929192614093565b6001600160a01b0383161580156118ff575b6118f05781156118e15761189381613e36565b8083116118bb57506118a482613fee565b9283156108e857602094926117a592859233614ebf565b633fa733bb60e21b85526001600160a01b03909116600452602491909152604452606482fd5b631f2a200560e01b8452600484fd5b63d92e233d60e01b8452600484fd5b506001600160a01b03811615611880565b50346103755760203660031901126103755760206109cd600435613f6f565b50346103755760403660031901126103755761194961369a565b602435611954614073565b61195c614093565b6001600160a01b0382169182158015611acb575b6118f05781156118e157611982613b4d565b808311611ab457506040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006020826024816001600160a01b0385165afa918215611aa9578692611a6b575b5091611a278260209486947f6304854cfb1e5fd8344a00f3b265eff81247c73f3594d6215dd4c81f59e56051971082861802918483821893849203611a5a575b505050836137d1565b9081611a4a575b5050604051908152a2805f516020615a925f395f51905f525d80f35b611a539161508d565b5f80611a2e565b611a63926140c8565b5f8184611a1e565b939150916020843d602011611aa1575b81611a8860209383613700565b81010312611a9d579251909291611a276119de565b5f80fd5b3d9150611a7b565b6040513d88823e3d90fd5b6389667c1f60e01b85526004526024829052604484fd5b50308314611970565b503461037557806003193601126103755750611b1d604051611af7604082613700565b60058152640352e302e360dc1b6020820152604051918291602083526020830190613658565b0390f35b50346103755780600319360112610375576003546040516001600160a01b039091168152602090f35b503461037557806003193601126103755760206109cd613d47565b503461037557604036600319011261037557611b8c611b8261369a565b602435903361420d565b602060405160018152f35b503461037557602036600319011261037557611bb161369a565b611bb9614073565b6001600160a01b031680156103e257600380546001600160a01b031916821790557f15057bbec20fe352ac8931e529ade6a9ce138c954ffc87d6aa3423dd066c4acd8280a280f35b50346103755760a036600319011261037557611c1b61369a565b90611c246136b0565b604435906064356084356001600160401b038111610af757611c4a903690600401613786565b91611c53614093565b804211611d44576001600160a01b0387165f9081527f5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb0060205260409020805460018101909155611ccf918891611cc790611cb96040519384928b8b602086019889613cef565b03601f198101835282613700565b5190206148f7565b91611ce5611cde368385613750565b848961493b565b15611d0a57505050611cf79293615186565b805f516020615a925f395f51905f525d80f35b611d24604493611d1e88948a943691613750565b906149bc565b50506325c0072360e11b83526001600160a01b0390811660045216602452fd5b63313c898160e11b8652600452602485fd5b50346103755780600319360112610375576004546040516001600160a01b039091168152602090f35b503461037557806003193601126103755760405190805f5160206159b25f395f51905f525490611dae826137de565b8085529160018116908115611e535750600114611dea575b611b1d84611dd681860382613700565b604051918291602083526020830190613658565b5f5160206159b25f395f51905f5281527f46a2803e59a4de4e7a4c574b1243f25977ac4c77d5a1a4a609b5394cebb4a2aa939250905b808210611e3957509091508101602001611dd682611dc6565b919260018160209254838588010152019101909291611e20565b60ff191660208087019190915292151560051b85019092019250611dd69150839050611dc6565b503461037557604036600319011261037557600435611e976136b0565b90611ea0614093565b611ea8614316565b6001600160a01b03821680156118f0578115611f1a57611ec783613a89565b90818311611eff575050611eda81613f6f565b918215611ef05760209391836117a592336145dd565b630cb65c7760e21b8452600484fd5b63284ff66760e01b8552600452602491909152604452606482fd5b639811e0c760e01b8452600484fd5b503461037557602036600319011261037557600354600435906001600160a01b0316330361219b57611f59614093565b611f61614316565b801561218c57600154801561217d575f5160206159f25f395f51905f5254111561216e57611f8d613f04565b61211e57611fbd8130337f0000000000000000000000000000000000000000000000000000000000000000614861565b817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316803b156105c25781809160246040518094819363b6b55f2560e01b83528860048401525af18015612113576120fe575b50816120249154613b40565b82556001600160801b0381116120e75760607f6e065faeb98b1603b619a1581c3a8fb4c247b6e4e1a74b7fa978227058c58b819164ffffffffff60025461206a426148ca565b6001600160a81b03199091166001600160801b0384161782821660801b17600255816120c06120bb7f0000000000000000000000000000000000000000000000000000000000000000831642613b40565b6148ca565b91604051948552166020840152166040820152a1805f516020615a925f395f51905f525d80f35b6306dfcc6560e41b82526080600452602452604490fd5b8161210891613700565b6105c257815f612018565b6040513d84823e3d90fd5b60248261215f64ffffffffff60025460801c1664ffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690613b40565b632e4e6bb960e01b8252600452fd5b63d7d0b56f60e01b8252600482fd5b6341b5d62f60e11b8352600483fd5b631f2a200560e01b8252600482fd5b639924bdd960e01b825233600452602482fd5b50346103755780600319360112610375575f5160206159d25f395f51905f52546040516001600160a01b039091168152602090f35b5034610375576101a03660031901126103755760043560a03660231901126105c25760c03660c31901126105c257610184356001600160401b03811161251357612231903690600401613786565b9161223a6146e0565b612242614093565b61224a614316565b6006546001600160a01b03169182156125045781156124f55760405160208101907ff26f3d2cf2e6cb27eeca7d7cfb8619324753ccae88bbee76cbbd0920a26d1f128252836040820152604081526122a3606082613700565b5190209160e435928084036124de5750857f00000000000000000000000000000000000000000000000000000000000000009560018060a01b038716956040519563033972db60e61b875287600488015284602488015260c435604488015260648701526101043560848701526101243560a4870152610144359160018060a01b03831680930361174057606093610160886004819694829560c484015280610164359b8c60e4860152610140610104860152816101448601526101648501378281018201840185905233610124840152601f01601f19168201010301925af18015611aa957869387916124aa575b506123b1916123ac8480936123a688614782565b83614832565b6137d1565b92831561249b576123c183613a89565b80851161247757506123d284614031565b94851561246857928260209795926117a59588956123f4575b505050806145dd565b826124089185612402613cc2565b91614861565b7f8e42ca3aac5a530592fc918a1c73f7a155aa98df7379ecb1148b885792035f6e61245d612434613cc2565b604080516001600160a01b03958616815260208101969096529084169493861693918291820190565b0390a35f80806123eb565b639811e0c760e01b8752600487fd5b633c8097d960e11b87526001600160a01b0384166004526024859052604452606486fd5b631f2a200560e01b8652600486fd5b839450839150916123ac6124cf6123b19460603d6060116108d2576108bf8183613700565b97919050969350505091612392565b63690a925560e01b87526004526024839052604486fd5b631f2a200560e01b8552600485fd5b6334455b4160e21b8552600485fd5b8280fd5b50346103755780600319360112610375577fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10054158061263c575b156125ff576125a390612562613816565b9061256b6138e5565b9060206125b16040519361257f8386613700565b8385525f368137604051968796600f60f81b885260e08589015260e0880190613658565b908682036040880152613658565b904660608601523060808601528260a086015284820360c08601528080855193848152019401925b8281106125e857505050500390f35b8351855286955093810193928101926001016125d9565b60405162461bcd60e51b81526020600482015260156024820152741152540dcc4c8e88155b9a5b9a5d1a585b1a5e9959605a1b6044820152606490fd5b507fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1015415612551565b50346103755780600319360112610375576004546001600160a01b0316331415806126fc575b6126e957612697614316565b600160ff195f516020615a725f395f51905f525416175f516020615a725f395f51905f52557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a180f35b6310351a3760e11b815233600452602490fd5b505f5160206159d25f395f51905f52546001600160a01b031633141561268b565b503461037557602036600319011261037557604060209161273c61369a565b6001600160a01b031681527f5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb0083522054604051908152f35b5034611a9d575f366003190112611a9d5761278d614073565b612795614093565b61279d614316565b6001541580159061299b575b61298c576127cb5f5160206159f25f395f51905f525464e8d4a5100090613b40565b6127e75f546127d8613d47565b818082109118028118906137d1565b906001820180921161297857612802915f91620f424061513d565b8015612969575f516020615a525f395f51905f525461283290620f424090309033906001600160a01b0316614861565b61283e8161dead6151e9565b61dead604051620f424081528260208201527fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d760403392a37f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316803b15611a9d575f809160246040518094819363b6b55f2560e01b8352620f424060048401525af1801561295e57612949575b508154620f4240810180911161293557916020928155816001557fc2c8250102b62ca232a1d16096696cee8ec5963a7dd2a7ada15d6f2ec8de5ab760408051620f424081528486820152a15f516020615a925f395f51905f525d604051908152f35b634e487b7160e01b83526011600452602483fd5b6129569192505f90613700565b5f905f6128d3565b6040513d5f823e3d90fd5b639811e0c760e01b5f5260045ffd5b634e487b7160e01b5f52601160045260245ffd5b63054215d160e11b5f5260045ffd5b505f5160206159f25f395f51905f525415156127a9565b34611a9d575f366003190112611a9d575f516020615ad25f395f51905f5254336001600160a01b03909116036129eb5761001a33614572565b63118cdaa760e01b5f523360045260245ffd5b34611a9d575f366003190112611a9d57602064ffffffffff60025460801c16604051908152f35b34611a9d575f366003190112611a9d5760206109cd613b4d565b34611a9d575f366003190112611a9d57602060405164ffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b34611a9d575f366003190112611a9d57612a98614073565b5f516020615ad25f395f51905f5280546001600160a01b03199081169091555f5160206159d25f395f51905f52805491821690555f906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b34611a9d576020366003190112611a9d576001600160a01b03612b1e61369a565b165f525f5160206159725f395f51905f52602052602060405f2054604051908152f35b34611a9d576040366003190112611a9d576020612b77612b5f6136b0565b612b67614093565b612b6f614316565b60043561432e565b5f5f516020615a925f395f51905f525d604051908152f35b34611a9d576020366003190112611a9d57612ba861369a565b612bb0614073565b6001600160a01b03168015612bf757600680546001600160a01b031916821790557f95c128b4074e825b16068d1da389e436fb1c56c1e0e717567cffd787a77e09bd5f80a2005b63d92e233d60e01b5f5260045ffd5b34611a9d575f366003190112611a9d57602060405161dead8152f35b34611a9d575f366003190112611a9d57602060ff5f516020615a725f395f51905f5254166040519015158152f35b34611a9d575f366003190112611a9d577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163003612ca75760206040515f516020615a325f395f51905f528152f35b63703e46dd60e11b5f5260045ffd5b6040366003190112611a9d57612cca61369a565b6024356001600160401b038111611a9d5736602382011215611a9d57612cfa903690602481600401359101613750565b906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016308114908115613062575b50612ca757612d3d614073565b604051634800d97f60e01b81526001600160a01b0382169290602081600481875afa5f918161301e575b50612d7b576356b6994f60e11b5f5260045ffd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911603612f8957604051633989f72d60e11b8152602081600481875afa5f9181612fdc575b50612ddf576356b6994f60e11b5f5260045ffd5b64ffffffffff807f000000000000000000000000000000000000000000000000000000000000000016911603612f8957604051630bd4e7e760e21b8152602081600481875afa5f9181612f98575b50612e41576356b6994f60e11b5f5260045ffd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911603612f89576040516352d1902d60e01b8152602081600481875afa5f9181612f55575b50612ea95783634c9c8ce360e01b5f5260045260245ffd5b805f516020615a325f395f51905f52859203612f435750823b15612f31575f516020615a325f395f51905f5280546001600160a01b031916821790557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b5f80a2805115612f195761001a916158c5565b505034612f2257005b63b398979f60e01b5f5260045ffd5b634c9c8ce360e01b5f5260045260245ffd5b632a87526960e21b5f5260045260245ffd5b9091506020813d602011612f81575b81612f7160209383613700565b81010312611a9d57519085612e91565b3d9150612f64565b6356b6994f60e11b5f5260045ffd5b9091506020813d602011612fd4575b81612fb460209383613700565b81010312611a9d57516001600160a01b0381168103611a9d579085612e2d565b3d9150612fa7565b9091506020813d602011613016575b81612ff860209383613700565b81010312611a9d575164ffffffffff81168103611a9d579085612dcb565b3d9150612feb565b9091506020813d60201161305a575b8161303a60209383613700565b81010312611a9d57516001600160a01b0381168103611a9d579085612d67565b3d915061302d565b5f516020615a325f395f51905f52546001600160a01b03161415905083612d30565b61367c565b34611a9d575f366003190112611a9d576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b34611a9d576020366003190112611a9d5760206109cd610b7961369a565b34611a9d575f366003190112611a9d57613103614073565b5f516020615a725f395f51905f525460ff81161561315a5760ff19165f516020615a725f395f51905f52557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b638dfc202b60e01b5f5260045ffd5b34611a9d575f366003190112611a9d575f516020615a525f395f51905f52546040516001600160a01b039091168152602090f35b34611a9d575f366003190112611a9d5760206109cd6152c3565b34611a9d576020366003190112611a9d5760206109cd6131d561369a565b613992565b34611a9d575f366003190112611a9d57600c60ff5f516020615a525f395f51905f525460a01c160160ff81116129785760209060ff60405191168152f35b34611a9d575f366003190112611a9d576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b34611a9d57602061326c366136c6565b91613275614093565b61327d614316565b613287828261432e565b6040805192835285830182905290936001600160a01b0390811693169133917f477f0200db551f1c711b0a687f110fae807eadac058c828b85620c3823b4fb7991a45f5f516020615a925f395f51905f525d604051908152f35b34611a9d576020366003190112611a9d576132fa61369a565b613302614073565b6001600160a01b03168015612bf757600480546001600160a01b031916821790557fa4336c0cb1e245b95ad204faed7e940d6dc999684fd8b5e1ff597a0c4efca8ab5f80a2005b34611a9d576060366003190112611a9d57611b8c61336561369a565b61336d6136b0565b6044359161337c833383614149565b61420d565b34611a9d575f366003190112611a9d576020600154604051908152f35b34611a9d575f366003190112611a9d5760205f5160206159f25f395f51905f5254604051908152f35b34611a9d576060366003190112611a9d576004356001600160a01b038116808203611a9d576133f46136b0565b60443592613400614073565b613408614093565b821580156134df575b612bf7577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316831480156134ad575b61349e578161347b857ffff3b3844276f57024e0b42afec1a37f75db36511e43819a4f2a63ab7862b648946020946140c8565b6040519485526001600160a01b031693a35f5f516020615a925f395f51905f525d005b6314110cb360e01b5f5260045ffd5b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168314613448565b506001600160a01b03821615613411565b34611a9d576020366003190112611a9d5760206109cd600435613fee565b34611a9d576040366003190112611a9d57611b8c61352a61369a565b6024359033615186565b34611a9d575f366003190112611a9d576040515f5f5160206159525f395f51905f5254613560816137de565b80845290600181169081156135f25750600114613588575b611b1d83611dd681850382613700565b5f5160206159525f395f51905f525f9081527f2ae08a8e29253f69ac5d979a101956ab8f8d9d7ded63fa7a83b16fc47648eab0939250905b8082106135d857509091508101602001611dd6613578565b9192600181602092548385880101520191019092916135c0565b60ff191660208086019190915291151560051b84019091019150611dd69050613578565b34611a9d575f366003190112611a9d5760206109cd5f546127d8613d47565b34611a9d575f366003190112611a9d576020906001600160801b03600254168152f35b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b34611a9d576020366003190112611a9d5760206109cd600435613fb2565b600435906001600160a01b0382168203611a9d57565b602435906001600160a01b0382168203611a9d57565b6060906003190112611a9d57600435906024356001600160a01b0381168103611a9d57906044356001600160a01b0381168103611a9d5790565b90601f801991011681019081106001600160401b0382111761372157604052565b634e487b7160e01b5f52604160045260245ffd5b6001600160401b03811161372157601f01601f191660200190565b92919261375c82613735565b9161376a6040519384613700565b829481845281830111611a9d578281602093845f960137010152565b9181601f84011215611a9d578235916001600160401b038311611a9d5760208381860195010111611a9d57565b34611a9d576020366003190112611a9d5760206109cd600435614031565b9190820391821161297857565b90600182811c9216801561380c575b60208310146137f857565b634e487b7160e01b5f52602260045260245ffd5b91607f16916137ed565b604051905f825f5160206159925f395f51905f525491613835836137de565b80835292600181169081156138c6575060011461385b575b61385992500383613700565b565b505f5160206159925f395f51905f525f90815290917f42ad5d3e1f2e6e70edcf6d991b8a3023d3fca8047a131592f9edb9fd9b89d57d5b8183106138aa5750509060206138599282010161384d565b6020919350806001915483858901015201910190918492613892565b6020925061385994915060ff191682840152151560051b82010161384d565b604051905f825f516020615a125f395f51905f525491613904836137de565b80835292600181169081156138c657506001146139275761385992500383613700565b505f516020615a125f395f51905f525f90815290917f5f9ce34815f8e11431c7bb75a8e6886a91478f7ffc1dbb0a98dc240fddd76b755b8183106139765750509060206138599282010161384d565b602091935080600191548385890101520191019091849261395e565b6001600160a01b0381169081158015613a7e575b613a78576139b3906143ac565b158015613a6a575b8015613a5b575b8015613a23575b80156139fc575b6139f7575f525f5160206159725f395f51905f526020526139f460405f205461448d565b90565b505f90565b505f5160206159d25f395f51905f5254613a1e906001600160a01b03166143ac565b6139d0565b50613a567f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166143ac565b6139c9565b50613a65306143ac565b6139c2565b50613a7361443d565b6139bb565b50505f90565b5061dead82146139a6565b60015415908115613af6575b8115613ae1575b8115613ac8575b8115613ab8575b50613ab4575f1990565b5f90565b613ac291506144e2565b5f613aaa565b5f516020615a725f395f51905f525460ff169150613aa3565b6001600160a01b03811661dead149150613a9c565b6001600160a01b038116159150613a95565b6001600160a01b03165f9081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace016020526040902090565b9190820180921161297857565b6040516370a0823160e01b81523060048201526020816024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa90811561295e575f91613c48575b506040516370a0823160e01b8152306004820152906020826024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa90811561295e575f91613c12575b613bff9250613b40565b5f5480821115613a78576139f4916137d1565b90506020823d602011613c40575b81613c2d60209383613700565b81010312611a9d57613bff915190613bf5565b3d9150613c20565b90506020813d602011613c72575b81613c6360209383613700565b81010312611a9d57515f613ba0565b3d9150613c56565b51906001600160a01b0382168203611a9d57565b90816060910312611a9d57613ca281613c7a565b916040613cb160208401613c7a565b92015161ffff81168103611a9d5790565b610144356001600160a01b0381168103611a9d5790565b60a4356001600160a01b0381168103611a9d5790565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981526001600160a01b039182166020820152911660408201526060810191909152608081019190915260a081019190915260c00190565b60025464ffffffffff6001600160801b0382169160801c1681158015613df3575b8015613db9575b613a78576139f491613db3613dac64ffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168094613b40565b42906137d1565b90614a7a565b50613deb64ffffffffff7f00000000000000000000000000000000000000000000000000000000000000001682613b40565b421015613d6f565b508015613d68565b60405190613e0a604083613700565b601e82527f537461626c65205374616b656420466c79696e672054756c69702055534400006020830152565b6001600160a01b038116908115908115613e9b575b8115613e8b575b506139f7575f525f5160206159725f395f51905f52602052613e7760405f2054613fb2565b613e7f614dc3565b90818082109118021890565b613e9591506144e2565b5f613e52565b61dead83149150613e4b565b6001600160a01b038116908115908115613ef8575b8115613ee8575b506139f7575f525f5160206159725f395f51905f526020526139f460405f205461448d565b613ef291506144e2565b5f613ec3565b61dead83149150613ebc565b6002546001600160801b03811615159060801c64ffffffffff1681613f65575b81613f2d575090565b613f60915064ffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690613b40565b421090565b8015159150613f24565b613f7c5f546127d8613d47565b60018101809111612978576139f491600191613fac5f5160206159f25f395f51905f525464e8d4a5100090613b40565b9161513d565b613fbf5f546127d8613d47565b60018101809111612978576139f4915f91613fac5f5160206159f25f395f51905f525464e8d4a5100090613b40565b61400c5f5160206159f25f395f51905f525464e8d4a5100090613b40565b9061401a5f546127d8613d47565b60018101809111612978576139f49260019261513d565b61404f5f5160206159f25f395f51905f525464e8d4a5100090613b40565b9061405d5f546127d8613d47565b60018101809111612978576139f4925f9261513d565b5f5160206159d25f395f51905f52546001600160a01b031633036129eb57565b5f516020615a925f395f51905f525c6140b95760015f516020615a925f395f51905f525d565b633ee5aeb560e01b5f5260045ffd5b916040519163a9059cbb60e01b5f5260018060a01b031660045260245260205f60448180865af19060015f5114821615614128575b604052156141085750565b635274afe760e01b5f9081526001600160a01b0391909116600452602490fd5b90600181151661414057823b15153d151616906140fd565b503d5f823e3d90fd5b919061415483613b08565b60018060a01b0382165f5260205260405f2054925f198410614177575b50505050565b8284106141ea576001600160a01b038116156141d7576001600160a01b038216156141c4576141a590613b08565b9060018060a01b03165f5260205260405f20910390555f808080614171565b634a1406b160e11b5f525f60045260245ffd5b63e602df0560e01b5f525f60045260245ffd5b508290637dc7a0d960e11b5f5260018060a01b031660045260245260445260645ffd5b91906001600160a01b0383168015614303576001600160a01b0382169081156142f05761423861443d565b6142e157614245336143ac565b6142ce57614252856143ac565b6142bc5761425f836143ac565b6142a957600154614276575b5050613859926156e1565b61dead1490811561429d575b5061428e575f8061426b565b63192e9a5760e31b5f5260045ffd5b61dead9150145f614282565b5063571f7b4960e01b5f5260045260245ffd5b63571f7b4960e01b5f5260045260245ffd5b63571f7b4960e01b5f523360045260245ffd5b63d93c066560e01b5f5260045ffd5b63ec442f0560e01b5f525f60045260245ffd5b634b637e8f60e11b5f525f60045260245ffd5b60ff5f516020615a725f395f51905f5254166142e157565b9091906001600160a01b0383168015612bf75781156143905761435084613a89565b9081831161437657505061436381614031565b92831561296957613859918491336145dd565b8290633c8097d960e11b5f5260045260245260445260645ffd5b631f2a200560e01b5f5260045ffd5b51908115158203611a9d57565b60405163fe575a8760e01b81526001600160a01b03918216600482015290602090829060249082907f0000000000000000000000000000000000000000000000000000000000000000165afa90811561295e575f91614409575090565b90506020813d602011614435575b8161442460209383613700565b81010312611a9d576139f49061439f565b3d9150614417565b604051635c975abb60e01b81526020816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa90811561295e575f91614409575090565b614495614dc3565b8061449f83613fb2565b11156144de5760018101809111612978576144b990613fee565b806144cd57505f905b818082109118021890565b5f19810190811161297857906144c2565b5090565b6144ea61443d565b908115614561575b8115614527575b8115614517575b506145125761450d61532a565b905090565b600190565b61452191506143ac565b5f614500565b905061455b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166143ac565b906144f9565b905061456c306143ac565b906144f2565b5f516020615ad25f395f51905f5280546001600160a01b03199081169091555f5160206159d25f395f51905f5280549182166001600160a01b0393841690811790915591167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3565b5f516020615a525f395f51905f52545f949190614608908590309084906001600160a01b0316614861565b6001600160a01b0383169283156142f0577fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d791614647846040936151e9565b815186815260208101949094526001600160a01b031692a37f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316803b15611a9d575f809160246040518094819363b6b55f2560e01b83528760048401525af1801561295e576146c9575b506146c5908254613b40565b9055565b6146d69192505f90613700565b5f906146c56146b9565b6005546001600160a01b0316801561477357602060249160405192838092630a83aaa960e31b82523360048301525afa90811561295e575f91614739575b501561472657565b631b35972d60e11b5f523360045260245ffd5b90506020813d60201161476b575b8161475460209383613700565b81010312611a9d576147659061439f565b5f61471e565b3d9150614747565b63b9f6723960e01b5f5260045ffd5b60443590811561482e5760643560ff811692906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690849003611a9d57803b15611a9d575f928360e492604051968795869463d505accf60e01b865260018060a01b0316600486015230602486015260243560448601526064850152608484015260843560a484015260a43560c48401525af16148245750565b5f61385991613700565b5050565b61ffff6148409216906149f6565b9081811161484c575050565b63c9fce02760e01b5f5260045260245260445ffd5b6040516323b872dd60e01b5f9081526001600160a01b039384166004529290931660245260449390935260209060648180865af19060015f51148216156148b2575b6040525f606052156141085750565b90600181151661414057823b15153d151616906148a3565b64ffffffffff81116148e05764ffffffffff1690565b6306dfcc6560e41b5f52602860045260245260445ffd5b6042906149026152c3565b906040519161190160f01b8352600283015260228201522090565b6004111561492757565b634e487b7160e01b5f52602160045260245ffd5b9190823b614976579061494d916149bc565b506149578161491d565b15918261496357505090565b6001600160a01b03918216911614919050565b916020926064835f94519060405193630b135d3f60e11b855260048501526040602485015286820190604485015e01915afa630b135d3f60e11b5f5114601f3d11161690565b81519190604183036149ec576149e59250602082015190606060408401519301515f1a906155b8565b9192909190565b50505f9160029190565b9091905f905f198482099084810292838084109303928084039314614a6d57826127101115614a5b57507fbc01a36e2eb1c432ca57a786c226809d495182a9930be0ded288ce703afb7e919394612710910990828211900360fc1b910360041c170290565b634e487b71905260116020526024601cfd5b5050506127109192500490565b90915f198383099280830292838086109503948086039514614b0b5784831115614af35790829109815f0382168092046002816003021880820260020302808202600203028082026002030280820260020302808202600203028091026002030293600183805f03040190848311900302920304170290565b82634e487b715f52156003026011186020526024601cfd5b505080925015614b19570490565b634e487b7160e01b5f52601260045260245ffd5b9091906001600160a01b038116908115612bf75761dead821461428e57614b53816143ac565b15614db057815f525f5160206159725f395f51905f5260205260405f205415614d9d57831561296957614b8590613992565b808411614d835750614b9683613fb2565b9060018060a01b035f5160206159d25f395f51905f52541690614bbc5f546127d8613d47565b8311614d5c57614bcb826143ac565b6142a957614bda835f546137d1565b5f556001545f5160206159f25f395f51905f52548181108015614d4a575b614d1a575050805f525f5160206159725f395f51905f526020528460405f2054818110614d0157825f525f5160206159725f395f51905f526020520360405f2055845f5160206159f25f395f51905f5254035f5160206159f25f395f51905f52555f817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020604051898152a382614cf2575b80826040518581528760208201527ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db60403392a47f59386dd9f990197c758043d4d906f63574ba12e48072da7c0bd6ccbc31c3388f60408051858152876020820152a39190565b614cfc828461508d565b614c8b565b8263391434e360e21b5f5260045260245260445260645ffd5b8681811115614d3c5750505f5b63391af12b60e21b5f5260045260245260445ffd5b614d45916137d1565b614d27565b50614d5582826137d1565b8711614bf8565b82614d6a5f546127d8613d47565b91633fa733bb60e21b5f5260045260245260445260645ffd5b8382632e52afbb60e21b5f5260045260245260445260645ffd5b506309d91aa160e01b5f5260045260245ffd5b50637be8837960e01b5f5260045260245ffd5b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690602081602481855afa801561295e575f90614e8c575b6020915060246040518094819363afa9294560e01b835260048301525afa90811561295e575f91614e5a575b50614e4c61532a565b909190156144c25750505f90565b90506020813d602011614e84575b81614e7560209383613700565b81010312611a9d57515f614e43565b3d9150614e68565b506020813d602011614eb7575b81614ea660209383613700565b81010312611a9d5760209051614e17565b3d9150614e99565b9193614ece5f546127d8613d47565b841161505c57614edd826143ac565b61503b576001600160a01b0385811695908416938287860361502a575b5050614f07855f546137d1565b5f55851561430357614f1761443d565b6142e157614f24336143ac565b6142ce578515158061501b575b6150085760015480614f9b575b509181614f6f6040935f7ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db966156e1565b85614f8c575b825195865260208601526001600160a01b031693a4565b614f96828761508d565b614f75565b61dead87148015615001575b61428e575f5160206159f25f395f51905f52548181108015614fef575b614fce5750614f3e565b8381811115614d3c5750505f63391af12b60e21b5f5260045260245260445ffd5b50614ffa82826137d1565b8411614fc4565b505f614fa7565b8563571f7b4960e01b5f5260045260245ffd5b50615025816143ac565b614f31565b6150349183614149565b5f82614efa565b5063571f7b4960e01b5f9081526001600160a01b0391909116600452602490fd5b50505061506c5f546127d8613d47565b91633fa733bb60e21b5f5260018060a01b031660045260245260445260645ffd5b604051627b8a6760e11b815260048101919091526001600160a01b03918216602482015290602090829060449082905f907f0000000000000000000000000000000000000000000000000000000000000000165af190811561295e575f9161510b575b50806150f95750565b639f48a48160e01b5f5260045260245ffd5b90506020813d602011615135575b8161512660209383613700565b81010312611a9d57515f6150f0565b3d9150615119565b929160018061514d838588614a7a565b946151578161491d565b1614918261516f575b50506139f49250151590613b40565b9080925015614b19576139f4930915155f80615160565b916001600160a01b0383169182156141d7576001600160a01b03169283156141c4577f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925916151d5602092613b08565b855f5282528060405f2055604051908152a3565b91906151f361443d565b6142e157615200336143ac565b6142ce576001600160a01b0383169283158015806152b4575b6152a1576001549485615235575b50506138599293505f6156e1565b61dead1461428e57615249575b8380615227565b5f5160206159f25f395f51905f5254848110801561528f575b61526c5750615242565b92505081811115614d3c5750505f63391af12b60e21b5f5260045260245260445ffd5b5061529a85826137d1565b8311615262565b8463571f7b4960e01b5f5260045260245ffd5b506152be826143ac565b615219565b6152cb615816565b6152d3615880565b6040519060208201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8452604083015260608201524660808201523060a082015260a0815261532460c082613700565b51902090565b6040516316efd94160e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690602081600481855afa90811561295e575f9161557e575b506001600160a01b031690811561557557604051635c975abb60e01b8152602081600481865afa5f9181615539575b506153b7575050505f90600190565b615530576040516389fe02cb60e01b815290602082600481845afa91821561295e575f926154fb575b5090606460e0926040519485938492630b2dace960e11b8452600484015260018060a01b037f000000000000000000000000000000000000000000000000000000000000000016602484015260448301525afa5f9181615463575b5061544857505f90600190565b60c08101511561545a57505f90600190565b60600151905f90565b90915060e0813d60e0116154f3575b8161547f60e09383613700565b81010312611a9d576040519060e082018281106001600160401b03821117613721576154e79160c091604052805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a08501520161439f565b60c0820152905f61543b565b3d9150615472565b91506020823d602011615528575b8161551660209383613700565b81010312611a9d5790519060646153e0565b3d9150615509565b50505f90600190565b9091506020813d60201161556d575b8161555560209383613700565b81010312611a9d576155669061439f565b905f6153a8565b3d9150615548565b505f19915f9150565b90506020813d6020116155b0575b8161559960209383613700565b81010312611a9d576155aa90613c7a565b5f615379565b3d915061558c565b91907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841161562f579160209360809260ff5f9560405194855216868401526040830152606082015282805260015afa1561295e575f516001600160a01b0381161561562557905f905f90565b505f906001905f90565b5050505f9160039190565b60ff5f516020615ab25f395f51905f525460401c161561565657565b631afcd79f60e31b5f5260045ffd5b61566e8161491d565b80615677575050565b6156808161491d565b600181036156975763f645eedf60e01b5f5260045ffd5b6156a08161491d565b600281036156bb575063fce698f760e01b5f5260045260245ffd5b6003906156c78161491d565b146156cf5750565b6335e2f38360e21b5f5260045260245ffd5b6001600160a01b031690816157975760207fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9161572c855f5160206159f25f395f51905f5254613b40565b5f5160206159f25f395f51905f52555b6001600160a01b0316938461577557805f5160206159f25f395f51905f5254035f5160206159f25f395f51905f52555b604051908152a3565b845f525f5160206159725f395f51905f52825260405f2081815401905561576c565b815f525f5160206159725f395f51905f5260205260405f20548381106157fb577fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9184602092855f525f5160206159725f395f51905f5284520360405f205561573c565b91905063391434e360e21b5f5260045260245260445260645ffd5b61581e613816565b805190811561582e576020012090565b50507fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10054801561585b5790565b507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47090565b6158886138e5565b8051908115615898576020012090565b50507fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10154801561585b5790565b905f8091602081519101845af4808061593e575b156158f95750506040513d81523d5f602083013e60203d82010160405290565b1561591e57639996b31560e01b5f9081526001600160a01b0391909116600452602490fd5b3d1561592f576040513d5f823e3d90fd5b63d6bda27560e01b5f5260045ffd5b503d1515806158d95750813b15156158d956fe52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0352c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace00a16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10252c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace049016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930052c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace02a16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc0773e532dfede91f04b12a73d3d2acd361424f41f76b4fb79f090161e36b4e00cd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033009b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00000000000000000000000000b44a9c40efc05eb014effeac3cbed6a31f8cb87f","external_libraries":[],"proxy_type":null,"implementations":[],"verified_at":"2026-08-28T18:57:38.153642Z","is_verified_via_verifier_alliance":false,"compiler_version":"v0.8.30+commit.73712a01","decoded_constructor_args":[["0xB44a9C40EFc05Eb014EfFEac3CBed6A31F8cB87f",{"internalType":"address","name":"yieldWrapper_","type":"address"}]],"sourcify_repo_url":null,"optimization_runs":200,"compiler_settings":{"evmVersion":"cancun","libraries":{},"metadata":{"appendCBOR":false,"bytecodeHash":"none"},"optimizer":{"enabled":true,"runs":200},"outputSelection":{"*":{"":["*"],"*":["*"]}},"remappings":["@ft-common/=lib/ft-common-contracts/contracts/","@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/","@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/","ds-test/=lib/ft-common-contracts/lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/","erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/","forge-std/=lib/forge-std/src/","ft-common-contracts/=lib/ft-common-contracts/","halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/","murky/=lib/murky/src/","openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/","openzeppelin-contracts/=lib/openzeppelin-contracts/"],"viaIR":true},"is_verified":true,"verified_twin_address_hash":null,"optimization_enabled":true,"deployed_bytecode":"0x608080604052600436101561001c575b50361561001a575f80fd5b005b5f905f3560e01c908162728f76146136355750806301e1d1141461361657806306fdde031461353457806307a2d13a14613084578063095ea7b31461350e5780630a28a477146134f05780631171bda9146133c757806318160ddd1461339e5780631fcd30801461338157806323b872dd146133495780632d88af4a146132e15780632e2d29841461325c5780632f539f9c14613218578063313ce567146131da5780633577d06f146131b75780633644e5151461319d57806338d52e0f146131695780633f4ba83a146130eb578063402d267d146130cd5780634800d97f146130895780634cdad506146130845780634f1ef28614612cb657806352d1902d14612c505780635c975abb14612c2257806364fede9114612c06578063674f0abd14612b8f5780636e553f6514612b4157806370a0823114612afd578063715018a614612a805780637313ee5a14612a3f578063748fccbb14612a2557806375b17350146129fe57806379ba5097146129b25780637d94792a146127745780637ecebe001461271d5780638456cb591461266557806384b0196e14612517578063856efae9146121e35780638da5cb5b146121ae57806393707a1914611f2957806394bf804d14611e7a57806395d89b4114611d7f5780639fd0506d14611d565780639fd5a6cf14611c01578063a1809b9514611b97578063a9059cbb14611b65578063ac47ed6214611b4a578063acc2166a14611b21578063ad3cb1cc14611ad4578063b3cb246b1461192f578063b3d7f6b914611910578063b460af9414611854578063b7b13f791461182b578063b9851ef114611802578063ba08765214611744578063c0c53b8b14610bd0578063c1beb96614610b7e578063c63d75b614610b5a578063c6e6f592146105c6578063ce36bc5214610b3c578063ce96cb7714610b18578063d4347f2514610afb578063d505accf146109d5578063d905777e146109a9578063dd62ed3e14610961578063e30c39781461092c578063e7710684146105f9578063e7c2a608146105cb578063ef8b30f7146105c6578063f2cda82e146104eb578063f2fde38b14610465578063f6ee1d88146103f1578063f7799ba2146103785763fed856fe0361000f5734610375578060031936011261037557602061036b613f04565b6040519015158152f35b80fd5b50346103755760203660031901126103755761039261369a565b61039a614073565b6001600160a01b031680156103e257600580546001600160a01b031916821790557f741a765e077edc4463a22a7f8d77b28598cc664c73c416b3ed83870c655d61e08280a280f35b63d92e233d60e01b8252600482fd5b50346103755760203660031901126103755760409061044861041161369a565b610419614073565b610421614093565b6001600160a01b03811683525f5160206159725f395f51905f526020528383205490614b2d565b90915f516020615a925f395f51905f525d82519182526020820152f35b50346103755760203660031901126103755761047f61369a565b610487614073565b5f516020615ad25f395f51905f5280546001600160a01b0319166001600160a01b039283169081179091555f5160206159d25f395f51905f52549091167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e227008380a380f35b5034610375576040366003190112610375576004356001600160a01b038116908190036105c25760243561051d614073565b610525614093565b81156105b3578280808084865af13d156105ae573d61054381613735565b906105516040519283613700565b81528460203d92013e5b1561059f577ffff3b3844276f57024e0b42afec1a37f75db36511e43819a4f2a63ab7862b64860208492604051908152a3805f516020615a925f395f51905f525d80f35b633d2cec6f60e21b8352600483fd5b61055b565b63d92e233d60e01b8352600483fd5b5080fd5b6137b3565b50346103755780600319360112610375576020906105e7613d47565b90546040519181808210911802188152f35b503461037557610100366003190112610375576004359060c03660231901126103755760e4356001600160401b0381116105c25761063b903690600401613786565b91906106456146e0565b61064d614093565b6006546001600160a01b031690811561091d57841561090e5760405160208101907f4e1caf8c5da6a3d9537f5d68d602aab4b9ffc3e3b30ec20a79b357513208fd7b8252866040820152604081526106a6606082613700565b51902091604435928084036108f757506106bf86613fee565b9485156108e8576040519363033972db60e61b855230600486015286602486015260243560448601526064850152606435608485015260843560a485015260a43560018060a01b0381168091036108e457918486610160826004819660609860c48401528060c4359a8b60e4860152610140610104860152816101448601526101648501378281018201840185905233610124840152601f01601f19168201010301925af180156108d957839284916108a2575b5061077d83613e36565b80871161087e5750946107938260609783614832565b6107b1856107a984801515948561086c576137d1565b858080614ebf565b6107db575b5050805f516020615a925f395f51905f525d6040519182528060208301526040820152f35b6107ec6107e6613cd9565b8261508d565b7f8e42ca3aac5a530592fc918a1c73f7a155aa98df7379ecb1148b885792035f6e610862610818613cd9565b604080516001600160a01b037f000000000000000000000000f7d85ec4e7710f71992752eac2111312e73e9c9c811682526020820196909652918516959094169390918291820190565b0390a35f806107b6565b610877828a546137d1565b89556137d1565b633fa733bb60e21b85526001600160a01b0384166004526024879052604452606484fd5b90506108c791925060603d6060116108d2575b6108bf8183613700565b810190613c8e565b92919050915f610773565b503d6108b5565b6040513d85823e3d90fd5b8580fd5b639811e0c760e01b8552600485fd5b63690a925560e01b85526004526024839052604484fd5b631f2a200560e01b8352600483fd5b6334455b4160e21b8352600483fd5b50346103755780600319360112610375575f516020615ad25f395f51905f52546040516001600160a01b039091168152602090f35b50346103755760403660031901126103755761097b61369a565b61098c6109866136b0565b91613b08565b9060018060a01b03165f52602052602060405f2054604051908152f35b50346103755760203660031901126103755760206109cd6109c861369a565b613ea7565b604051908152f35b50346103755760e0366003190112610375576109ef61369a565b906109f86136b0565b604435906064359360843560ff81168103610af757854211610ae357610aa895610a79610a9f92610a87610a648660018060a01b03165f527f5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb0060205260405f2080549060018201905590565b9360405193849160208301968b8b8b8a613cef565b03601f198101845283613700565b610a9a60c4359360a435935190206148f7565b6155b8565b90969196615665565b6001600160a01b03948516948116808603610acc5750610ac9939450615186565b80f35b6325c0072360e11b85526004869052602452604484fd5b63313c898160e11b85526004869052602485fd5b8480fd5b503461037557806003193601126103755760209054604051908152f35b50346103755760203660031901126103755760206109cd610b3761369a565b613e36565b50346103755780600319360112610375576020604051620f42408152f35b50346103755760203660031901126103755760206109cd610b7961369a565b613a89565b503461037557604036600319011261037557602090610bb7610b9e61369a565b610ba6614073565b610bae614093565b60243590614b2d565b50905f516020615a925f395f51905f525d604051908152f35b503461037557606036600319011261037557610bea61369a565b610bf26136b0565b906044356001600160a01b0381169190829003611740575f516020615ab25f395f51905f52549160ff8360401c1615926001600160401b03811680159081611738575b600114908161172e575b159081611725575b506117165767ffffffffffffffff1981166001175f516020615ab25f395f51905f5255836116ea575b506001600160a01b03821615938480156116d9575b80156116d1575b6116c257610c98613dfb565b90604091825190610ca98483613700565b60078252661cdcd99d1554d160ca1b6020830152610cc561563a565b610ccd61563a565b8051906001600160401b0382116116ae578190610cf75f5160206159525f395f51905f52546137de565b601f8111611634575b50602090601f83116001146115b8578b926115ad575b50508160011b915f199060031b1c1916175f5160206159525f395f51905f52555b8051906001600160401b038211611599578190610d615f5160206159b25f395f51905f52546137de565b601f811161151f575b50602090601f83116001146114a3578a92611498575b50508160011b915f199060031b1c1916175f5160206159b25f395f51905f52555b7f000000000000000000000000f7d85ec4e7710f71992752eac2111312e73e9c9c93610dcb61563a565b610dd361563a565b825163313ce56760e01b60208201908152600482526001600160a01b0387169891899186908c90610e05602485613700565b835190855afa8b519187528061148d575b80611482575b1561147a5760ff1660015b15611472575b5f516020615a525f395f51905f52549060ff60a01b9060a01b16906affffffffffffffffffffff60a81b1617175f516020615a525f395f51905f5255610e71613dfb565b610e7961563a565b845190610e868683613700565b60018252603160f81b6020830152610e9c61563a565b8051906001600160401b03821161145e578190610ec65f5160206159925f395f51905f52546137de565b601f81116113e1575b506020908d601f8411600114611365579261135a575b50508160011b915f199060031b1c1916175f5160206159925f395f51905f52555b8051906001600160401b038211611346578190610f305f516020615a125f395f51905f52546137de565b601f81116112cc575b50602090601f8311600114611250578c92611245575b50508160011b915f199060031b1c1916175f516020615a125f395f51905f52555b887fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10055887fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10155610fbe61563a565b610fc661563a565b610fce61563a565b61123157610fdb90614572565b610fe361563a565b60018060a01b031694856bffffffffffffffffffffffff60a01b6003541617600355826bffffffffffffffffffffffff60a01b600454161760045560018060a01b037f000000000000000000000000b44a9c40efc05eb014effeac3cbed6a31f8cb87f1693825163095ea7b360e01b8952856004525f1960245260208960448180865af19060018a5114821615611222575b84521561114b575b505051937f15057bbec20fe352ac8931e529ade6a9ce138c954ffc87d6aa3423dd066c4acd8680a27fa4336c0cb1e245b95ad204faed7e940d6dc999684fd8b5e1ff597a0c4efca8ab8580a27f7e0434a1aff23de76c2397719d87705b95ece8a270bdcbe3a55d0ce5b162cad58480a26110f5575080f35b60207fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29168ff0000000000000000195f516020615ab25f395f51905f5254165f516020615ab25f395f51905f525560018152a180f35b825163095ea7b360e01b8952856004528860245260208960448180865af19060018a5114821615611201575b8452156111ed57825163095ea7b360e01b895260048690525f196024529060208960448180855af19060018a51148216156111ce575b50908352156111bc578061107d565b635274afe760e01b8752600452602486fd5b60018215166111e4573b15153d1516165f6111ad565b823d8b823e3d90fd5b635274afe760e01b88526004829052602488fd5b90600181151661121957823b15153d15161690611177565b503d89823e3d90fd5b90823b15153d15161690611075565b631e4fbdf760e01b88526004889052602488fd5b015190505f80610f4f565b5f516020615a125f395f51905f528d52818d209250601f1984168d5b8181106112b4575090846001959493921061129c575b505050811b015f516020615a125f395f51905f5255610f70565b01515f1960f88460031b161c191690555f8080611282565b9293602060018192878601518155019501930161126c565b5f516020615a125f395f51905f528d529091507f5f9ce34815f8e11431c7bb75a8e6886a91478f7ffc1dbb0a98dc240fddd76b75601f840160051c8101916020851061133c575b90601f859493920160051c01905b81811061132e5750610f39565b8d8155849350600101611321565b9091508190611313565b634e487b7160e01b8b52604160045260248bfd5b015190505f80610ee5565b5f5160206159925f395f51905f5281528281209350601f198516905b8181106113c957509084600195949392106113b1575b505050811b015f5160206159925f395f51905f5255610f06565b01515f1960f88460031b161c191690555f8080611397565b92936020600181928786015181550195019301611381565b5f5160206159925f395f51905f528e529091507f42ad5d3e1f2e6e70edcf6d991b8a3023d3fca8047a131592f9edb9fd9b89d57d601f840160051c81019160208510611454575b849392918f91601f0160051c0191905b828210611446575050610ecf565b81558493506001018e611438565b9091508190611428565b634e487b7160e01b8c52604160045260248cfd5b506012610e2d565b508980610e27565b5060ff811115610e1c565b5060203d1015610e16565b015190505f80610d80565b5f5160206159b25f395f51905f528b52818b209250601f1984168b5b81811061150757509084600195949392106114ef575b505050811b015f5160206159b25f395f51905f5255610da1565b01515f1960f88460031b161c191690555f80806114d5565b929360206001819287860151815501950193016114bf565b5f5160206159b25f395f51905f528b529091507f46a2803e59a4de4e7a4c574b1243f25977ac4c77d5a1a4a609b5394cebb4a2aa601f840160051c8101916020851061158f575b90601f859493920160051c01905b8181106115815750610d6a565b8b8155849350600101611574565b9091508190611566565b634e487b7160e01b89526041600452602489fd5b015190505f80610d16565b5f5160206159525f395f51905f528c52818c209250601f1984168c5b81811061161c5750908460019594939210611604575b505050811b015f5160206159525f395f51905f5255610d37565b01515f1960f88460031b161c191690555f80806115ea565b929360206001819287860151815501950193016115d4565b5f5160206159525f395f51905f528c529091507f2ae08a8e29253f69ac5d979a101956ab8f8d9d7ded63fa7a83b16fc47648eab0601f840160051c810191602085106116a4575b90601f859493920160051c01905b8181106116965750610d00565b8c8155849350600101611689565b909150819061167b565b634e487b7160e01b8a52604160045260248afd5b63d92e233d60e01b8652600486fd5b508115610c8c565b506001600160a01b03811615610c85565b68ffffffffffffffffff191668010000000000000001175f516020615ab25f395f51905f52555f610c70565b63f92ee8a960e01b8652600486fd5b9050155f610c47565b303b159150610c3f565b859150610c35565b8380fd5b503461037557611753366136c6565b9161175f939193614093565b6001600160a01b0384161580156117f1575b6103e25780156117e25761178483613ea7565b8082116117bc57508060209461179c6117a593613fb2565b94859133614ebf565b5f516020615a925f395f51905f525d604051908152f35b632e52afbb60e21b83526001600160a01b03909316600452602452604491909152606490fd5b639811e0c760e01b8252600482fd5b506001600160a01b03831615611771565b50346103755780600319360112610375576005546040516001600160a01b039091168152602090f35b50346103755780600319360112610375576006546040516001600160a01b039091168152602090f35b503461037557611863366136c6565b61186e929192614093565b6001600160a01b0383161580156118ff575b6118f05781156118e15761189381613e36565b8083116118bb57506118a482613fee565b9283156108e857602094926117a592859233614ebf565b633fa733bb60e21b85526001600160a01b03909116600452602491909152604452606482fd5b631f2a200560e01b8452600484fd5b63d92e233d60e01b8452600484fd5b506001600160a01b03811615611880565b50346103755760203660031901126103755760206109cd600435613f6f565b50346103755760403660031901126103755761194961369a565b602435611954614073565b61195c614093565b6001600160a01b0382169182158015611acb575b6118f05781156118e157611982613b4d565b808311611ab457506040516370a0823160e01b81523060048201527f000000000000000000000000f7d85ec4e7710f71992752eac2111312e73e9c9c6020826024816001600160a01b0385165afa918215611aa9578692611a6b575b5091611a278260209486947f6304854cfb1e5fd8344a00f3b265eff81247c73f3594d6215dd4c81f59e56051971082861802918483821893849203611a5a575b505050836137d1565b9081611a4a575b5050604051908152a2805f516020615a925f395f51905f525d80f35b611a539161508d565b5f80611a2e565b611a63926140c8565b5f8184611a1e565b939150916020843d602011611aa1575b81611a8860209383613700565b81010312611a9d579251909291611a276119de565b5f80fd5b3d9150611a7b565b6040513d88823e3d90fd5b6389667c1f60e01b85526004526024829052604484fd5b50308314611970565b503461037557806003193601126103755750611b1d604051611af7604082613700565b60058152640352e302e360dc1b6020820152604051918291602083526020830190613658565b0390f35b50346103755780600319360112610375576003546040516001600160a01b039091168152602090f35b503461037557806003193601126103755760206109cd613d47565b503461037557604036600319011261037557611b8c611b8261369a565b602435903361420d565b602060405160018152f35b503461037557602036600319011261037557611bb161369a565b611bb9614073565b6001600160a01b031680156103e257600380546001600160a01b031916821790557f15057bbec20fe352ac8931e529ade6a9ce138c954ffc87d6aa3423dd066c4acd8280a280f35b50346103755760a036600319011261037557611c1b61369a565b90611c246136b0565b604435906064356084356001600160401b038111610af757611c4a903690600401613786565b91611c53614093565b804211611d44576001600160a01b0387165f9081527f5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb0060205260409020805460018101909155611ccf918891611cc790611cb96040519384928b8b602086019889613cef565b03601f198101835282613700565b5190206148f7565b91611ce5611cde368385613750565b848961493b565b15611d0a57505050611cf79293615186565b805f516020615a925f395f51905f525d80f35b611d24604493611d1e88948a943691613750565b906149bc565b50506325c0072360e11b83526001600160a01b0390811660045216602452fd5b63313c898160e11b8652600452602485fd5b50346103755780600319360112610375576004546040516001600160a01b039091168152602090f35b503461037557806003193601126103755760405190805f5160206159b25f395f51905f525490611dae826137de565b8085529160018116908115611e535750600114611dea575b611b1d84611dd681860382613700565b604051918291602083526020830190613658565b5f5160206159b25f395f51905f5281527f46a2803e59a4de4e7a4c574b1243f25977ac4c77d5a1a4a609b5394cebb4a2aa939250905b808210611e3957509091508101602001611dd682611dc6565b919260018160209254838588010152019101909291611e20565b60ff191660208087019190915292151560051b85019092019250611dd69150839050611dc6565b503461037557604036600319011261037557600435611e976136b0565b90611ea0614093565b611ea8614316565b6001600160a01b03821680156118f0578115611f1a57611ec783613a89565b90818311611eff575050611eda81613f6f565b918215611ef05760209391836117a592336145dd565b630cb65c7760e21b8452600484fd5b63284ff66760e01b8552600452602491909152604452606482fd5b639811e0c760e01b8452600484fd5b503461037557602036600319011261037557600354600435906001600160a01b0316330361219b57611f59614093565b611f61614316565b801561218c57600154801561217d575f5160206159f25f395f51905f5254111561216e57611f8d613f04565b61211e57611fbd8130337f000000000000000000000000f7d85ec4e7710f71992752eac2111312e73e9c9c614861565b817f000000000000000000000000b44a9c40efc05eb014effeac3cbed6a31f8cb87f6001600160a01b0316803b156105c25781809160246040518094819363b6b55f2560e01b83528860048401525af18015612113576120fe575b50816120249154613b40565b82556001600160801b0381116120e75760607f6e065faeb98b1603b619a1581c3a8fb4c247b6e4e1a74b7fa978227058c58b819164ffffffffff60025461206a426148ca565b6001600160a81b03199091166001600160801b0384161782821660801b17600255816120c06120bb7f0000000000000000000000000000000000000000000000000000000000007080831642613b40565b6148ca565b91604051948552166020840152166040820152a1805f516020615a925f395f51905f525d80f35b6306dfcc6560e41b82526080600452602452604490fd5b8161210891613700565b6105c257815f612018565b6040513d84823e3d90fd5b60248261215f64ffffffffff60025460801c1664ffffffffff7f00000000000000000000000000000000000000000000000000000000000070801690613b40565b632e4e6bb960e01b8252600452fd5b63d7d0b56f60e01b8252600482fd5b6341b5d62f60e11b8352600483fd5b631f2a200560e01b8252600482fd5b639924bdd960e01b825233600452602482fd5b50346103755780600319360112610375575f5160206159d25f395f51905f52546040516001600160a01b039091168152602090f35b5034610375576101a03660031901126103755760043560a03660231901126105c25760c03660c31901126105c257610184356001600160401b03811161251357612231903690600401613786565b9161223a6146e0565b612242614093565b61224a614316565b6006546001600160a01b03169182156125045781156124f55760405160208101907ff26f3d2cf2e6cb27eeca7d7cfb8619324753ccae88bbee76cbbd0920a26d1f128252836040820152604081526122a3606082613700565b5190209160e435928084036124de5750857f000000000000000000000000f7d85ec4e7710f71992752eac2111312e73e9c9c9560018060a01b038716956040519563033972db60e61b875287600488015284602488015260c435604488015260648701526101043560848701526101243560a4870152610144359160018060a01b03831680930361174057606093610160886004819694829560c484015280610164359b8c60e4860152610140610104860152816101448601526101648501378281018201840185905233610124840152601f01601f19168201010301925af18015611aa957869387916124aa575b506123b1916123ac8480936123a688614782565b83614832565b6137d1565b92831561249b576123c183613a89565b80851161247757506123d284614031565b94851561246857928260209795926117a59588956123f4575b505050806145dd565b826124089185612402613cc2565b91614861565b7f8e42ca3aac5a530592fc918a1c73f7a155aa98df7379ecb1148b885792035f6e61245d612434613cc2565b604080516001600160a01b03958616815260208101969096529084169493861693918291820190565b0390a35f80806123eb565b639811e0c760e01b8752600487fd5b633c8097d960e11b87526001600160a01b0384166004526024859052604452606486fd5b631f2a200560e01b8652600486fd5b839450839150916123ac6124cf6123b19460603d6060116108d2576108bf8183613700565b97919050969350505091612392565b63690a925560e01b87526004526024839052604486fd5b631f2a200560e01b8552600485fd5b6334455b4160e21b8552600485fd5b8280fd5b50346103755780600319360112610375577fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10054158061263c575b156125ff576125a390612562613816565b9061256b6138e5565b9060206125b16040519361257f8386613700565b8385525f368137604051968796600f60f81b885260e08589015260e0880190613658565b908682036040880152613658565b904660608601523060808601528260a086015284820360c08601528080855193848152019401925b8281106125e857505050500390f35b8351855286955093810193928101926001016125d9565b60405162461bcd60e51b81526020600482015260156024820152741152540dcc4c8e88155b9a5b9a5d1a585b1a5e9959605a1b6044820152606490fd5b507fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1015415612551565b50346103755780600319360112610375576004546001600160a01b0316331415806126fc575b6126e957612697614316565b600160ff195f516020615a725f395f51905f525416175f516020615a725f395f51905f52557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a180f35b6310351a3760e11b815233600452602490fd5b505f5160206159d25f395f51905f52546001600160a01b031633141561268b565b503461037557602036600319011261037557604060209161273c61369a565b6001600160a01b031681527f5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb0083522054604051908152f35b5034611a9d575f366003190112611a9d5761278d614073565b612795614093565b61279d614316565b6001541580159061299b575b61298c576127cb5f5160206159f25f395f51905f525464e8d4a5100090613b40565b6127e75f546127d8613d47565b818082109118028118906137d1565b906001820180921161297857612802915f91620f424061513d565b8015612969575f516020615a525f395f51905f525461283290620f424090309033906001600160a01b0316614861565b61283e8161dead6151e9565b61dead604051620f424081528260208201527fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d760403392a37f000000000000000000000000b44a9c40efc05eb014effeac3cbed6a31f8cb87f6001600160a01b0316803b15611a9d575f809160246040518094819363b6b55f2560e01b8352620f424060048401525af1801561295e57612949575b508154620f4240810180911161293557916020928155816001557fc2c8250102b62ca232a1d16096696cee8ec5963a7dd2a7ada15d6f2ec8de5ab760408051620f424081528486820152a15f516020615a925f395f51905f525d604051908152f35b634e487b7160e01b83526011600452602483fd5b6129569192505f90613700565b5f905f6128d3565b6040513d5f823e3d90fd5b639811e0c760e01b5f5260045ffd5b634e487b7160e01b5f52601160045260245ffd5b63054215d160e11b5f5260045ffd5b505f5160206159f25f395f51905f525415156127a9565b34611a9d575f366003190112611a9d575f516020615ad25f395f51905f5254336001600160a01b03909116036129eb5761001a33614572565b63118cdaa760e01b5f523360045260245ffd5b34611a9d575f366003190112611a9d57602064ffffffffff60025460801c16604051908152f35b34611a9d575f366003190112611a9d5760206109cd613b4d565b34611a9d575f366003190112611a9d57602060405164ffffffffff7f0000000000000000000000000000000000000000000000000000000000007080168152f35b34611a9d575f366003190112611a9d57612a98614073565b5f516020615ad25f395f51905f5280546001600160a01b03199081169091555f5160206159d25f395f51905f52805491821690555f906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b34611a9d576020366003190112611a9d576001600160a01b03612b1e61369a565b165f525f5160206159725f395f51905f52602052602060405f2054604051908152f35b34611a9d576040366003190112611a9d576020612b77612b5f6136b0565b612b67614093565b612b6f614316565b60043561432e565b5f5f516020615a925f395f51905f525d604051908152f35b34611a9d576020366003190112611a9d57612ba861369a565b612bb0614073565b6001600160a01b03168015612bf757600680546001600160a01b031916821790557f95c128b4074e825b16068d1da389e436fb1c56c1e0e717567cffd787a77e09bd5f80a2005b63d92e233d60e01b5f5260045ffd5b34611a9d575f366003190112611a9d57602060405161dead8152f35b34611a9d575f366003190112611a9d57602060ff5f516020615a725f395f51905f5254166040519015158152f35b34611a9d575f366003190112611a9d577f000000000000000000000000d940d531b983557884b31fd915a1df97bebe6e096001600160a01b03163003612ca75760206040515f516020615a325f395f51905f528152f35b63703e46dd60e11b5f5260045ffd5b6040366003190112611a9d57612cca61369a565b6024356001600160401b038111611a9d5736602382011215611a9d57612cfa903690602481600401359101613750565b906001600160a01b037f000000000000000000000000d940d531b983557884b31fd915a1df97bebe6e0916308114908115613062575b50612ca757612d3d614073565b604051634800d97f60e01b81526001600160a01b0382169290602081600481875afa5f918161301e575b50612d7b576356b6994f60e11b5f5260045ffd5b6001600160a01b037f000000000000000000000000f7d85ec4e7710f71992752eac2111312e73e9c9c8116911603612f8957604051633989f72d60e11b8152602081600481875afa5f9181612fdc575b50612ddf576356b6994f60e11b5f5260045ffd5b64ffffffffff807f000000000000000000000000000000000000000000000000000000000000708016911603612f8957604051630bd4e7e760e21b8152602081600481875afa5f9181612f98575b50612e41576356b6994f60e11b5f5260045ffd5b6001600160a01b037f000000000000000000000000b44a9c40efc05eb014effeac3cbed6a31f8cb87f8116911603612f89576040516352d1902d60e01b8152602081600481875afa5f9181612f55575b50612ea95783634c9c8ce360e01b5f5260045260245ffd5b805f516020615a325f395f51905f52859203612f435750823b15612f31575f516020615a325f395f51905f5280546001600160a01b031916821790557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b5f80a2805115612f195761001a916158c5565b505034612f2257005b63b398979f60e01b5f5260045ffd5b634c9c8ce360e01b5f5260045260245ffd5b632a87526960e21b5f5260045260245ffd5b9091506020813d602011612f81575b81612f7160209383613700565b81010312611a9d57519085612e91565b3d9150612f64565b6356b6994f60e11b5f5260045ffd5b9091506020813d602011612fd4575b81612fb460209383613700565b81010312611a9d57516001600160a01b0381168103611a9d579085612e2d565b3d9150612fa7565b9091506020813d602011613016575b81612ff860209383613700565b81010312611a9d575164ffffffffff81168103611a9d579085612dcb565b3d9150612feb565b9091506020813d60201161305a575b8161303a60209383613700565b81010312611a9d57516001600160a01b0381168103611a9d579085612d67565b3d915061302d565b5f516020615a325f395f51905f52546001600160a01b03161415905083612d30565b61367c565b34611a9d575f366003190112611a9d576040517f000000000000000000000000f7d85ec4e7710f71992752eac2111312e73e9c9c6001600160a01b03168152602090f35b34611a9d576020366003190112611a9d5760206109cd610b7961369a565b34611a9d575f366003190112611a9d57613103614073565b5f516020615a725f395f51905f525460ff81161561315a5760ff19165f516020615a725f395f51905f52557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b638dfc202b60e01b5f5260045ffd5b34611a9d575f366003190112611a9d575f516020615a525f395f51905f52546040516001600160a01b039091168152602090f35b34611a9d575f366003190112611a9d5760206109cd6152c3565b34611a9d576020366003190112611a9d5760206109cd6131d561369a565b613992565b34611a9d575f366003190112611a9d57600c60ff5f516020615a525f395f51905f525460a01c160160ff81116129785760209060ff60405191168152f35b34611a9d575f366003190112611a9d576040517f000000000000000000000000b44a9c40efc05eb014effeac3cbed6a31f8cb87f6001600160a01b03168152602090f35b34611a9d57602061326c366136c6565b91613275614093565b61327d614316565b613287828261432e565b6040805192835285830182905290936001600160a01b0390811693169133917f477f0200db551f1c711b0a687f110fae807eadac058c828b85620c3823b4fb7991a45f5f516020615a925f395f51905f525d604051908152f35b34611a9d576020366003190112611a9d576132fa61369a565b613302614073565b6001600160a01b03168015612bf757600480546001600160a01b031916821790557fa4336c0cb1e245b95ad204faed7e940d6dc999684fd8b5e1ff597a0c4efca8ab5f80a2005b34611a9d576060366003190112611a9d57611b8c61336561369a565b61336d6136b0565b6044359161337c833383614149565b61420d565b34611a9d575f366003190112611a9d576020600154604051908152f35b34611a9d575f366003190112611a9d5760205f5160206159f25f395f51905f5254604051908152f35b34611a9d576060366003190112611a9d576004356001600160a01b038116808203611a9d576133f46136b0565b60443592613400614073565b613408614093565b821580156134df575b612bf7577f000000000000000000000000f7d85ec4e7710f71992752eac2111312e73e9c9c6001600160a01b0316831480156134ad575b61349e578161347b857ffff3b3844276f57024e0b42afec1a37f75db36511e43819a4f2a63ab7862b648946020946140c8565b6040519485526001600160a01b031693a35f5f516020615a925f395f51905f525d005b6314110cb360e01b5f5260045ffd5b507f000000000000000000000000b44a9c40efc05eb014effeac3cbed6a31f8cb87f6001600160a01b03168314613448565b506001600160a01b03821615613411565b34611a9d576020366003190112611a9d5760206109cd600435613fee565b34611a9d576040366003190112611a9d57611b8c61352a61369a565b6024359033615186565b34611a9d575f366003190112611a9d576040515f5f5160206159525f395f51905f5254613560816137de565b80845290600181169081156135f25750600114613588575b611b1d83611dd681850382613700565b5f5160206159525f395f51905f525f9081527f2ae08a8e29253f69ac5d979a101956ab8f8d9d7ded63fa7a83b16fc47648eab0939250905b8082106135d857509091508101602001611dd6613578565b9192600181602092548385880101520191019092916135c0565b60ff191660208086019190915291151560051b84019091019150611dd69050613578565b34611a9d575f366003190112611a9d5760206109cd5f546127d8613d47565b34611a9d575f366003190112611a9d576020906001600160801b03600254168152f35b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b34611a9d576020366003190112611a9d5760206109cd600435613fb2565b600435906001600160a01b0382168203611a9d57565b602435906001600160a01b0382168203611a9d57565b6060906003190112611a9d57600435906024356001600160a01b0381168103611a9d57906044356001600160a01b0381168103611a9d5790565b90601f801991011681019081106001600160401b0382111761372157604052565b634e487b7160e01b5f52604160045260245ffd5b6001600160401b03811161372157601f01601f191660200190565b92919261375c82613735565b9161376a6040519384613700565b829481845281830111611a9d578281602093845f960137010152565b9181601f84011215611a9d578235916001600160401b038311611a9d5760208381860195010111611a9d57565b34611a9d576020366003190112611a9d5760206109cd600435614031565b9190820391821161297857565b90600182811c9216801561380c575b60208310146137f857565b634e487b7160e01b5f52602260045260245ffd5b91607f16916137ed565b604051905f825f5160206159925f395f51905f525491613835836137de565b80835292600181169081156138c6575060011461385b575b61385992500383613700565b565b505f5160206159925f395f51905f525f90815290917f42ad5d3e1f2e6e70edcf6d991b8a3023d3fca8047a131592f9edb9fd9b89d57d5b8183106138aa5750509060206138599282010161384d565b6020919350806001915483858901015201910190918492613892565b6020925061385994915060ff191682840152151560051b82010161384d565b604051905f825f516020615a125f395f51905f525491613904836137de565b80835292600181169081156138c657506001146139275761385992500383613700565b505f516020615a125f395f51905f525f90815290917f5f9ce34815f8e11431c7bb75a8e6886a91478f7ffc1dbb0a98dc240fddd76b755b8183106139765750509060206138599282010161384d565b602091935080600191548385890101520191019091849261395e565b6001600160a01b0381169081158015613a7e575b613a78576139b3906143ac565b158015613a6a575b8015613a5b575b8015613a23575b80156139fc575b6139f7575f525f5160206159725f395f51905f526020526139f460405f205461448d565b90565b505f90565b505f5160206159d25f395f51905f5254613a1e906001600160a01b03166143ac565b6139d0565b50613a567f000000000000000000000000b44a9c40efc05eb014effeac3cbed6a31f8cb87f6001600160a01b03166143ac565b6139c9565b50613a65306143ac565b6139c2565b50613a7361443d565b6139bb565b50505f90565b5061dead82146139a6565b60015415908115613af6575b8115613ae1575b8115613ac8575b8115613ab8575b50613ab4575f1990565b5f90565b613ac291506144e2565b5f613aaa565b5f516020615a725f395f51905f525460ff169150613aa3565b6001600160a01b03811661dead149150613a9c565b6001600160a01b038116159150613a95565b6001600160a01b03165f9081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace016020526040902090565b9190820180921161297857565b6040516370a0823160e01b81523060048201526020816024817f000000000000000000000000f7d85ec4e7710f71992752eac2111312e73e9c9c6001600160a01b03165afa90811561295e575f91613c48575b506040516370a0823160e01b8152306004820152906020826024817f000000000000000000000000b44a9c40efc05eb014effeac3cbed6a31f8cb87f6001600160a01b03165afa90811561295e575f91613c12575b613bff9250613b40565b5f5480821115613a78576139f4916137d1565b90506020823d602011613c40575b81613c2d60209383613700565b81010312611a9d57613bff915190613bf5565b3d9150613c20565b90506020813d602011613c72575b81613c6360209383613700565b81010312611a9d57515f613ba0565b3d9150613c56565b51906001600160a01b0382168203611a9d57565b90816060910312611a9d57613ca281613c7a565b916040613cb160208401613c7a565b92015161ffff81168103611a9d5790565b610144356001600160a01b0381168103611a9d5790565b60a4356001600160a01b0381168103611a9d5790565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981526001600160a01b039182166020820152911660408201526060810191909152608081019190915260a081019190915260c00190565b60025464ffffffffff6001600160801b0382169160801c1681158015613df3575b8015613db9575b613a78576139f491613db3613dac64ffffffffff7f0000000000000000000000000000000000000000000000000000000000007080168094613b40565b42906137d1565b90614a7a565b50613deb64ffffffffff7f00000000000000000000000000000000000000000000000000000000000070801682613b40565b421015613d6f565b508015613d68565b60405190613e0a604083613700565b601e82527f537461626c65205374616b656420466c79696e672054756c69702055534400006020830152565b6001600160a01b038116908115908115613e9b575b8115613e8b575b506139f7575f525f5160206159725f395f51905f52602052613e7760405f2054613fb2565b613e7f614dc3565b90818082109118021890565b613e9591506144e2565b5f613e52565b61dead83149150613e4b565b6001600160a01b038116908115908115613ef8575b8115613ee8575b506139f7575f525f5160206159725f395f51905f526020526139f460405f205461448d565b613ef291506144e2565b5f613ec3565b61dead83149150613ebc565b6002546001600160801b03811615159060801c64ffffffffff1681613f65575b81613f2d575090565b613f60915064ffffffffff7f00000000000000000000000000000000000000000000000000000000000070801690613b40565b421090565b8015159150613f24565b613f7c5f546127d8613d47565b60018101809111612978576139f491600191613fac5f5160206159f25f395f51905f525464e8d4a5100090613b40565b9161513d565b613fbf5f546127d8613d47565b60018101809111612978576139f4915f91613fac5f5160206159f25f395f51905f525464e8d4a5100090613b40565b61400c5f5160206159f25f395f51905f525464e8d4a5100090613b40565b9061401a5f546127d8613d47565b60018101809111612978576139f49260019261513d565b61404f5f5160206159f25f395f51905f525464e8d4a5100090613b40565b9061405d5f546127d8613d47565b60018101809111612978576139f4925f9261513d565b5f5160206159d25f395f51905f52546001600160a01b031633036129eb57565b5f516020615a925f395f51905f525c6140b95760015f516020615a925f395f51905f525d565b633ee5aeb560e01b5f5260045ffd5b916040519163a9059cbb60e01b5f5260018060a01b031660045260245260205f60448180865af19060015f5114821615614128575b604052156141085750565b635274afe760e01b5f9081526001600160a01b0391909116600452602490fd5b90600181151661414057823b15153d151616906140fd565b503d5f823e3d90fd5b919061415483613b08565b60018060a01b0382165f5260205260405f2054925f198410614177575b50505050565b8284106141ea576001600160a01b038116156141d7576001600160a01b038216156141c4576141a590613b08565b9060018060a01b03165f5260205260405f20910390555f808080614171565b634a1406b160e11b5f525f60045260245ffd5b63e602df0560e01b5f525f60045260245ffd5b508290637dc7a0d960e11b5f5260018060a01b031660045260245260445260645ffd5b91906001600160a01b0383168015614303576001600160a01b0382169081156142f05761423861443d565b6142e157614245336143ac565b6142ce57614252856143ac565b6142bc5761425f836143ac565b6142a957600154614276575b5050613859926156e1565b61dead1490811561429d575b5061428e575f8061426b565b63192e9a5760e31b5f5260045ffd5b61dead9150145f614282565b5063571f7b4960e01b5f5260045260245ffd5b63571f7b4960e01b5f5260045260245ffd5b63571f7b4960e01b5f523360045260245ffd5b63d93c066560e01b5f5260045ffd5b63ec442f0560e01b5f525f60045260245ffd5b634b637e8f60e11b5f525f60045260245ffd5b60ff5f516020615a725f395f51905f5254166142e157565b9091906001600160a01b0383168015612bf75781156143905761435084613a89565b9081831161437657505061436381614031565b92831561296957613859918491336145dd565b8290633c8097d960e11b5f5260045260245260445260645ffd5b631f2a200560e01b5f5260045ffd5b51908115158203611a9d57565b60405163fe575a8760e01b81526001600160a01b03918216600482015290602090829060249082907f000000000000000000000000f7d85ec4e7710f71992752eac2111312e73e9c9c165afa90811561295e575f91614409575090565b90506020813d602011614435575b8161442460209383613700565b81010312611a9d576139f49061439f565b3d9150614417565b604051635c975abb60e01b81526020816004817f000000000000000000000000f7d85ec4e7710f71992752eac2111312e73e9c9c6001600160a01b03165afa90811561295e575f91614409575090565b614495614dc3565b8061449f83613fb2565b11156144de5760018101809111612978576144b990613fee565b806144cd57505f905b818082109118021890565b5f19810190811161297857906144c2565b5090565b6144ea61443d565b908115614561575b8115614527575b8115614517575b506145125761450d61532a565b905090565b600190565b61452191506143ac565b5f614500565b905061455b7f000000000000000000000000b44a9c40efc05eb014effeac3cbed6a31f8cb87f6001600160a01b03166143ac565b906144f9565b905061456c306143ac565b906144f2565b5f516020615ad25f395f51905f5280546001600160a01b03199081169091555f5160206159d25f395f51905f5280549182166001600160a01b0393841690811790915591167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3565b5f516020615a525f395f51905f52545f949190614608908590309084906001600160a01b0316614861565b6001600160a01b0383169283156142f0577fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d791614647846040936151e9565b815186815260208101949094526001600160a01b031692a37f000000000000000000000000b44a9c40efc05eb014effeac3cbed6a31f8cb87f6001600160a01b0316803b15611a9d575f809160246040518094819363b6b55f2560e01b83528760048401525af1801561295e576146c9575b506146c5908254613b40565b9055565b6146d69192505f90613700565b5f906146c56146b9565b6005546001600160a01b0316801561477357602060249160405192838092630a83aaa960e31b82523360048301525afa90811561295e575f91614739575b501561472657565b631b35972d60e11b5f523360045260245ffd5b90506020813d60201161476b575b8161475460209383613700565b81010312611a9d576147659061439f565b5f61471e565b3d9150614747565b63b9f6723960e01b5f5260045ffd5b60443590811561482e5760643560ff811692906001600160a01b037f000000000000000000000000f7d85ec4e7710f71992752eac2111312e73e9c9c1690849003611a9d57803b15611a9d575f928360e492604051968795869463d505accf60e01b865260018060a01b0316600486015230602486015260243560448601526064850152608484015260843560a484015260a43560c48401525af16148245750565b5f61385991613700565b5050565b61ffff6148409216906149f6565b9081811161484c575050565b63c9fce02760e01b5f5260045260245260445ffd5b6040516323b872dd60e01b5f9081526001600160a01b039384166004529290931660245260449390935260209060648180865af19060015f51148216156148b2575b6040525f606052156141085750565b90600181151661414057823b15153d151616906148a3565b64ffffffffff81116148e05764ffffffffff1690565b6306dfcc6560e41b5f52602860045260245260445ffd5b6042906149026152c3565b906040519161190160f01b8352600283015260228201522090565b6004111561492757565b634e487b7160e01b5f52602160045260245ffd5b9190823b614976579061494d916149bc565b506149578161491d565b15918261496357505090565b6001600160a01b03918216911614919050565b916020926064835f94519060405193630b135d3f60e11b855260048501526040602485015286820190604485015e01915afa630b135d3f60e11b5f5114601f3d11161690565b81519190604183036149ec576149e59250602082015190606060408401519301515f1a906155b8565b9192909190565b50505f9160029190565b9091905f905f198482099084810292838084109303928084039314614a6d57826127101115614a5b57507fbc01a36e2eb1c432ca57a786c226809d495182a9930be0ded288ce703afb7e919394612710910990828211900360fc1b910360041c170290565b634e487b71905260116020526024601cfd5b5050506127109192500490565b90915f198383099280830292838086109503948086039514614b0b5784831115614af35790829109815f0382168092046002816003021880820260020302808202600203028082026002030280820260020302808202600203028091026002030293600183805f03040190848311900302920304170290565b82634e487b715f52156003026011186020526024601cfd5b505080925015614b19570490565b634e487b7160e01b5f52601260045260245ffd5b9091906001600160a01b038116908115612bf75761dead821461428e57614b53816143ac565b15614db057815f525f5160206159725f395f51905f5260205260405f205415614d9d57831561296957614b8590613992565b808411614d835750614b9683613fb2565b9060018060a01b035f5160206159d25f395f51905f52541690614bbc5f546127d8613d47565b8311614d5c57614bcb826143ac565b6142a957614bda835f546137d1565b5f556001545f5160206159f25f395f51905f52548181108015614d4a575b614d1a575050805f525f5160206159725f395f51905f526020528460405f2054818110614d0157825f525f5160206159725f395f51905f526020520360405f2055845f5160206159f25f395f51905f5254035f5160206159f25f395f51905f52555f817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020604051898152a382614cf2575b80826040518581528760208201527ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db60403392a47f59386dd9f990197c758043d4d906f63574ba12e48072da7c0bd6ccbc31c3388f60408051858152876020820152a39190565b614cfc828461508d565b614c8b565b8263391434e360e21b5f5260045260245260445260645ffd5b8681811115614d3c5750505f5b63391af12b60e21b5f5260045260245260445ffd5b614d45916137d1565b614d27565b50614d5582826137d1565b8711614bf8565b82614d6a5f546127d8613d47565b91633fa733bb60e21b5f5260045260245260445260645ffd5b8382632e52afbb60e21b5f5260045260245260445260645ffd5b506309d91aa160e01b5f5260045260245ffd5b50637be8837960e01b5f5260045260245ffd5b6040516370a0823160e01b81523060048201527f000000000000000000000000b44a9c40efc05eb014effeac3cbed6a31f8cb87f6001600160a01b031690602081602481855afa801561295e575f90614e8c575b6020915060246040518094819363afa9294560e01b835260048301525afa90811561295e575f91614e5a575b50614e4c61532a565b909190156144c25750505f90565b90506020813d602011614e84575b81614e7560209383613700565b81010312611a9d57515f614e43565b3d9150614e68565b506020813d602011614eb7575b81614ea660209383613700565b81010312611a9d5760209051614e17565b3d9150614e99565b9193614ece5f546127d8613d47565b841161505c57614edd826143ac565b61503b576001600160a01b0385811695908416938287860361502a575b5050614f07855f546137d1565b5f55851561430357614f1761443d565b6142e157614f24336143ac565b6142ce578515158061501b575b6150085760015480614f9b575b509181614f6f6040935f7ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db966156e1565b85614f8c575b825195865260208601526001600160a01b031693a4565b614f96828761508d565b614f75565b61dead87148015615001575b61428e575f5160206159f25f395f51905f52548181108015614fef575b614fce5750614f3e565b8381811115614d3c5750505f63391af12b60e21b5f5260045260245260445ffd5b50614ffa82826137d1565b8411614fc4565b505f614fa7565b8563571f7b4960e01b5f5260045260245ffd5b50615025816143ac565b614f31565b6150349183614149565b5f82614efa565b5063571f7b4960e01b5f9081526001600160a01b0391909116600452602490fd5b50505061506c5f546127d8613d47565b91633fa733bb60e21b5f5260018060a01b031660045260245260445260645ffd5b604051627b8a6760e11b815260048101919091526001600160a01b03918216602482015290602090829060449082905f907f000000000000000000000000b44a9c40efc05eb014effeac3cbed6a31f8cb87f165af190811561295e575f9161510b575b50806150f95750565b639f48a48160e01b5f5260045260245ffd5b90506020813d602011615135575b8161512660209383613700565b81010312611a9d57515f6150f0565b3d9150615119565b929160018061514d838588614a7a565b946151578161491d565b1614918261516f575b50506139f49250151590613b40565b9080925015614b19576139f4930915155f80615160565b916001600160a01b0383169182156141d7576001600160a01b03169283156141c4577f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925916151d5602092613b08565b855f5282528060405f2055604051908152a3565b91906151f361443d565b6142e157615200336143ac565b6142ce576001600160a01b0383169283158015806152b4575b6152a1576001549485615235575b50506138599293505f6156e1565b61dead1461428e57615249575b8380615227565b5f5160206159f25f395f51905f5254848110801561528f575b61526c5750615242565b92505081811115614d3c5750505f63391af12b60e21b5f5260045260245260445ffd5b5061529a85826137d1565b8311615262565b8463571f7b4960e01b5f5260045260245ffd5b506152be826143ac565b615219565b6152cb615816565b6152d3615880565b6040519060208201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8452604083015260608201524660808201523060a082015260a0815261532460c082613700565b51902090565b6040516316efd94160e01b81527f000000000000000000000000b44a9c40efc05eb014effeac3cbed6a31f8cb87f6001600160a01b031690602081600481855afa90811561295e575f9161557e575b506001600160a01b031690811561557557604051635c975abb60e01b8152602081600481865afa5f9181615539575b506153b7575050505f90600190565b615530576040516389fe02cb60e01b815290602082600481845afa91821561295e575f926154fb575b5090606460e0926040519485938492630b2dace960e11b8452600484015260018060a01b037f000000000000000000000000f7d85ec4e7710f71992752eac2111312e73e9c9c16602484015260448301525afa5f9181615463575b5061544857505f90600190565b60c08101511561545a57505f90600190565b60600151905f90565b90915060e0813d60e0116154f3575b8161547f60e09383613700565b81010312611a9d576040519060e082018281106001600160401b03821117613721576154e79160c091604052805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a08501520161439f565b60c0820152905f61543b565b3d9150615472565b91506020823d602011615528575b8161551660209383613700565b81010312611a9d5790519060646153e0565b3d9150615509565b50505f90600190565b9091506020813d60201161556d575b8161555560209383613700565b81010312611a9d576155669061439f565b905f6153a8565b3d9150615548565b505f19915f9150565b90506020813d6020116155b0575b8161559960209383613700565b81010312611a9d576155aa90613c7a565b5f615379565b3d915061558c565b91907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841161562f579160209360809260ff5f9560405194855216868401526040830152606082015282805260015afa1561295e575f516001600160a01b0381161561562557905f905f90565b505f906001905f90565b5050505f9160039190565b60ff5f516020615ab25f395f51905f525460401c161561565657565b631afcd79f60e31b5f5260045ffd5b61566e8161491d565b80615677575050565b6156808161491d565b600181036156975763f645eedf60e01b5f5260045ffd5b6156a08161491d565b600281036156bb575063fce698f760e01b5f5260045260245ffd5b6003906156c78161491d565b146156cf5750565b6335e2f38360e21b5f5260045260245ffd5b6001600160a01b031690816157975760207fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9161572c855f5160206159f25f395f51905f5254613b40565b5f5160206159f25f395f51905f52555b6001600160a01b0316938461577557805f5160206159f25f395f51905f5254035f5160206159f25f395f51905f52555b604051908152a3565b845f525f5160206159725f395f51905f52825260405f2081815401905561576c565b815f525f5160206159725f395f51905f5260205260405f20548381106157fb577fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9184602092855f525f5160206159725f395f51905f5284520360405f205561573c565b91905063391434e360e21b5f5260045260245260445260645ffd5b61581e613816565b805190811561582e576020012090565b50507fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10054801561585b5790565b507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47090565b6158886138e5565b8051908115615898576020012090565b50507fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10154801561585b5790565b905f8091602081519101845af4808061593e575b156158f95750506040513d81523d5f602083013e60203d82010160405290565b1561591e57639996b31560e01b5f9081526001600160a01b0391909116600452602490fd5b3d1561592f576040513d5f823e3d90fd5b63d6bda27560e01b5f5260045ffd5b503d1515806158d95750813b15156158d956fe52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0352c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace00a16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10252c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace049016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930052c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace02a16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc0773e532dfede91f04b12a73d3d2acd361424f41f76b4fb79f090161e36b4e00cd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033009b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00","source_code":"// SPDX-License-Identifier: UNLICENSED\n// Copyright (c) 2025 Flying Tulip Inc. All rights reserved.\npragma solidity 0.8.30;\n\nimport {Initializable} from \"openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\";\nimport {\n    ERC20Upgradeable\n} from \"openzeppelin-contracts-upgradeable/contracts/token/ERC20/ERC20Upgradeable.sol\";\nimport {\n    ERC4626Upgradeable\n} from \"openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/ERC4626Upgradeable.sol\";\nimport {\n    ERC20PermitUpgradeable\n} from \"openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/ERC20PermitUpgradeable.sol\";\nimport {\n    Ownable2StepUpgradeable\n} from \"openzeppelin-contracts-upgradeable/contracts/access/Ownable2StepUpgradeable.sol\";\nimport {\n    PausableUpgradeable\n} from \"openzeppelin-contracts-upgradeable/contracts/utils/PausableUpgradeable.sol\";\nimport {\n    UUPSUpgradeable\n} from \"openzeppelin-contracts-upgradeable/contracts/proxy/utils/UUPSUpgradeable.sol\";\nimport {\n    ReentrancyGuardTransient\n} from \"openzeppelin-contracts/contracts/utils/ReentrancyGuardTransient.sol\";\nimport {IERC20} from \"openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\";\nimport {\n    IERC20Metadata\n} from \"openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol\";\nimport {\n    IERC20Permit\n} from \"openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Permit.sol\";\nimport {SafeERC20} from \"openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {Math} from \"openzeppelin-contracts/contracts/utils/math/Math.sol\";\nimport {SafeCast} from \"openzeppelin-contracts/contracts/utils/math/SafeCast.sol\";\nimport {\n    SignatureChecker\n} from \"openzeppelin-contracts/contracts/utils/cryptography/SignatureChecker.sol\";\nimport {ECDSA} from \"openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol\";\nimport {IftYieldWrapperV2} from \"./interfaces/IftYieldWrapperV2.sol\";\nimport {ICircuitBreakerV2} from \"./cb/ICircuitBreakerV2.sol\";\nimport {ISessionManager} from \"@ft-common/interfaces/ISessionManager.sol\";\nimport {IRelayerAuth} from \"./interfaces/IRelayerAuth.sol\";\n\ninterface IStableVaultFtUSDCompliance {\n    function paused() external view returns (bool);\n    function isBlacklisted(address account) external view returns (bool);\n}\n\n/// @title Stable Staked Flying Tulip USD\n/// @notice Donation-resistant ERC-4626 vault whose ftUSD rewards vest into the share price.\n/// @dev Accounted ftUSD is subdeposited into `yieldWrapper`. Standard ERC-4626 exits remain\n///      synchronous and revert atomically if the wrapper's circuit breaker would queue them.\n///      Unsolicited ftUSD or wrapper-share transfers are excluded from `totalAssets()`.\ncontract StableEpochRewardsVault is\n    Initializable,\n    ERC4626Upgradeable,\n    ERC20PermitUpgradeable,\n    Ownable2StepUpgradeable,\n    PausableUpgradeable,\n    UUPSUpgradeable,\n    ReentrancyGuardTransient\n{\n    using SafeERC20 for IERC20;\n\n    uint256 public constant SEED_ASSETS = 1e6;\n    uint256 internal constant BPS = 10_000;\n    uint8 internal constant _SHARE_DECIMALS_OFFSET = 12;\n    bytes32 internal constant _PERMIT_TYPEHASH = keccak256(\n        \"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\"\n    );\n    bytes32 internal constant _SESSION_DEPOSIT_DATAHASH_TYPEHASH =\n        keccak256(\"SessionDeposit(uint256 assets)\");\n    bytes32 internal constant _SESSION_WITHDRAW_DATAHASH_TYPEHASH =\n        keccak256(\"SessionWithdraw(uint256 assets)\");\n\n    address public constant DEAD_SHARES_RECEIVER = 0x000000000000000000000000000000000000dEaD;\n\n    IERC20 public immutable ASSET;\n    IftYieldWrapperV2 public immutable yieldWrapper;\n    uint40 public immutable vestingPeriod = 8 hours;\n\n    uint256 public accountedAssets;\n    uint256 public MIN_SHARES;\n\n    uint128 public vestingAmount;\n    uint40 public lastDistributionTime;\n\n    address public rewardDistributor;\n    address public pauser;\n\n    // Appended after the original deployment storage. Do not reorder.\n    IRelayerAuth public relayerAuth;\n    ISessionManager public sessionManager;\n\n    /// @notice Parameters for an optional EIP-2612 permit on ftUSD.\n    struct PermitParams {\n        uint256 value;\n        uint256 deadline;\n        uint8 v;\n        bytes32 r;\n        bytes32 s;\n    }\n\n    error ZeroAddress();\n    error ZeroAmount();\n    error ZeroShares();\n    error ZeroAssets();\n    error InvalidYieldWrapper(address wrapper);\n    error InvalidYieldWrapperDecimals(uint8 actual, uint8 expected);\n    error InvalidAssetDecimals(uint8 decimals);\n    error NotRewardDistributor(address caller);\n    error NotPauser(address caller);\n    error VaultNotSeeded();\n    error VaultAlreadySeeded();\n    error NoActiveShares();\n    error ActiveRewardVesting(uint256 vestingEndsAt);\n    error QueuedWithdrawalUnsupported(uint256 queueId);\n    error InsufficientSurplus(uint256 available, uint256 requested);\n    error AssetNotRecoverable();\n    error AccountBlacklisted(address account);\n    error NotBlacklisted(address account);\n    error NothingToWipe(address account);\n    error ProtectedSeedPosition();\n    error MinimumSharesViolation(uint256 resultingSupply, uint256 minimumSupply);\n    error NativeTransferFailed();\n    error IncompatibleImplementation();\n    error NotRelayer(address sender);\n    error RelayerAuthNotSet();\n    error SessionManagerNotSet();\n    error SessionDataHashMismatch(bytes32 expected, bytes32 provided);\n    error RelayerFeeTooHigh(uint256 feeAmount, uint256 maxFeeAmount);\n\n    event RewardDistributorUpdated(address indexed newRewardDistributor);\n    event PauserUpdated(address indexed newPauser);\n    event RelayerAuthUpdated(address indexed newRelayerAuth);\n    event SessionManagerUpdated(address indexed newSessionManager);\n    event RelayerFeePaid(\n        address indexed user, address indexed executor, address token, uint256 amount\n    );\n    event YieldWrapperInitialized(address indexed yieldWrapper);\n    event VaultSeeded(uint256 assets, uint256 shares);\n    event RewardsFunded(uint256 amount, uint40 vestingStartedAt, uint40 vestingEndsAt);\n    event UnaccountedSurplusSwept(address indexed to, uint256 amount);\n    event DepositReferral(\n        address indexed sender,\n        address indexed receiver,\n        address indexed integrator,\n        uint256 assets,\n        uint256 shares\n    );\n    event BlacklistedAddressWiped(\n        address indexed account, address indexed recipient, uint256 assets, uint256 shares\n    );\n    event Recovered(address indexed token, address indexed to, uint256 amount);\n\n    constructor(address yieldWrapper_) {\n        if (yieldWrapper_ == address(0) || yieldWrapper_.code.length == 0) {\n            revert InvalidYieldWrapper(yieldWrapper_);\n        }\n\n        IftYieldWrapperV2 wrapper = IftYieldWrapperV2(yieldWrapper_);\n        address ftUSD_ = wrapper.token();\n        if (ftUSD_ == address(0) || ftUSD_.code.length == 0) {\n            revert InvalidYieldWrapper(yieldWrapper_);\n        }\n\n        uint8 assetDecimals = IERC20Metadata(ftUSD_).decimals();\n        if (assetDecimals != 6) revert InvalidAssetDecimals(assetDecimals);\n        uint8 wrapperDecimals = wrapper.decimals();\n        if (wrapperDecimals != assetDecimals) {\n            revert InvalidYieldWrapperDecimals(wrapperDecimals, assetDecimals);\n        }\n\n        ASSET = IERC20(ftUSD_);\n        yieldWrapper = wrapper;\n        _disableInitializers();\n    }\n\n    function initialize(\n        address initialOwner,\n        address initialRewardDistributor,\n        address initialPauser\n    )\n        external\n        initializer\n    {\n        if (\n            initialOwner == address(0) || initialRewardDistributor == address(0)\n                || initialPauser == address(0)\n        ) revert ZeroAddress();\n\n        __ERC20_init(\"Stable Staked Flying Tulip USD\", \"ssftUSD\");\n        __ERC4626_init(ASSET);\n        __ERC20Permit_init(\"Stable Staked Flying Tulip USD\");\n        __Pausable_init();\n        __Ownable_init(initialOwner);\n        __Ownable2Step_init();\n\n        rewardDistributor = initialRewardDistributor;\n        pauser = initialPauser;\n        ASSET.forceApprove(address(yieldWrapper), type(uint256).max);\n\n        emit RewardDistributorUpdated(initialRewardDistributor);\n        emit PauserUpdated(initialPauser);\n        emit YieldWrapperInitialized(address(yieldWrapper));\n    }\n\n    modifier onlyRewardDistributor() {\n        if (msg.sender != rewardDistributor) revert NotRewardDistributor(msg.sender);\n        _;\n    }\n\n    modifier onlyPauserOrOwner() {\n        if (msg.sender != pauser && msg.sender != owner()) revert NotPauser(msg.sender);\n        _;\n    }\n\n    modifier isRelayer() {\n        _isRelayer();\n        _;\n    }\n\n    function _isRelayer() internal view {\n        IRelayerAuth auth = relayerAuth;\n        if (address(auth) == address(0)) revert RelayerAuthNotSet();\n        if (!auth.isRelayer(msg.sender)) revert NotRelayer(msg.sender);\n    }\n\n    /// @notice Seed the vault with one ftUSD and permanently lock the resulting shares.\n    /// @dev Public deposits remain disabled until this owner-funded transaction succeeds.\n    function seed() external onlyOwner nonReentrant whenNotPaused returns (uint256 shares) {\n        if (MIN_SHARES != 0 || totalSupply() != 0) revert VaultAlreadySeeded();\n\n        shares = previewDeposit(SEED_ASSETS);\n        if (shares == 0) revert ZeroShares();\n\n        _deposit(msg.sender, DEAD_SHARES_RECEIVER, SEED_ASSETS, shares);\n        MIN_SHARES = shares;\n\n        emit VaultSeeded(SEED_ASSETS, shares);\n    }\n\n    function setRewardDistributor(address newRewardDistributor) external onlyOwner {\n        if (newRewardDistributor == address(0)) revert ZeroAddress();\n        rewardDistributor = newRewardDistributor;\n        emit RewardDistributorUpdated(newRewardDistributor);\n    }\n\n    function setPauser(address newPauser) external onlyOwner {\n        if (newPauser == address(0)) revert ZeroAddress();\n        pauser = newPauser;\n        emit PauserUpdated(newPauser);\n    }\n\n    function setSessionManager(address newSessionManager) external onlyOwner {\n        if (newSessionManager == address(0)) revert ZeroAddress();\n        sessionManager = ISessionManager(newSessionManager);\n        emit SessionManagerUpdated(newSessionManager);\n    }\n\n    function setRelayerAuth(address newRelayerAuth) external onlyOwner {\n        if (newRelayerAuth == address(0)) revert ZeroAddress();\n        relayerAuth = IRelayerAuth(newRelayerAuth);\n        emit RelayerAuthUpdated(newRelayerAuth);\n    }\n\n    function pause() external onlyPauserOrOwner {\n        _pause();\n    }\n\n    function unpause() external onlyOwner {\n        _unpause();\n    }\n\n    /// @notice EIP-2612 permit accepting arbitrary bytes signatures, including ERC-1271 wallets.\n    function permit(\n        address owner_,\n        address spender,\n        uint256 value,\n        uint256 deadline,\n        bytes calldata signature\n    )\n        external\n        nonReentrant\n    {\n        // EIP-2612 deadlines intentionally use chain time.\n        // forge-lint: disable-next-line(block-timestamp)\n        if (block.timestamp > deadline) revert ERC2612ExpiredSignature(deadline);\n\n        bytes32 structHash = keccak256(\n            abi.encode(_PERMIT_TYPEHASH, owner_, spender, value, _useNonce(owner_), deadline)\n        );\n        bytes32 digest = _hashTypedDataV4(structHash);\n        if (!SignatureChecker.isValidSignatureNow(owner_, digest, signature)) {\n            (address signer,,) = ECDSA.tryRecover(digest, signature);\n            revert ERC2612InvalidSigner(signer, owner_);\n        }\n\n        _approve(owner_, spender, value);\n    }\n\n    function _tryPermitAsset(address owner_, PermitParams calldata permitParams) internal {\n        if (permitParams.deadline == 0) return;\n\n        try IERC20Permit(address(ASSET))\n            .permit(\n                owner_,\n                address(this),\n                permitParams.value,\n                permitParams.deadline,\n                permitParams.v,\n                permitParams.r,\n                permitParams.s\n            ) {}\n            catch {}\n    }\n\n    function _enforceRelayerFee(uint256 amount, uint16 maxFeeBps, uint256 feeAmount) internal pure {\n        uint256 maxFeeAmount = Math.mulDiv(amount, maxFeeBps, BPS);\n        if (feeAmount > maxFeeAmount) {\n            revert RelayerFeeTooHigh(feeAmount, maxFeeAmount);\n        }\n    }\n\n    /// @notice Fund a new non-overlapping ftUSD reward distribution.\n    function fundRewards(uint256 ftUSDAmount)\n        external\n        onlyRewardDistributor\n        nonReentrant\n        whenNotPaused\n    {\n        if (ftUSDAmount == 0) revert ZeroAmount();\n        uint256 minimumShares = MIN_SHARES;\n        if (minimumShares == 0) revert VaultNotSeeded();\n        if (totalSupply() <= minimumShares) revert NoActiveShares();\n\n        if (isVesting()) {\n            revert ActiveRewardVesting(uint256(lastDistributionTime) + vestingPeriod);\n        }\n\n        ASSET.safeTransferFrom(msg.sender, address(this), ftUSDAmount);\n        yieldWrapper.deposit(ftUSDAmount);\n        accountedAssets += ftUSDAmount;\n        vestingAmount = SafeCast.toUint128(ftUSDAmount);\n        uint40 nowTs = SafeCast.toUint40(block.timestamp);\n        lastDistributionTime = nowTs;\n\n        emit RewardsFunded(ftUSDAmount, nowTs, SafeCast.toUint40(block.timestamp + vestingPeriod));\n    }\n\n    /// @notice Amount from the active schedule that remains excluded from the share price.\n    function scheduledUnvestedAmount() public view returns (uint256) {\n        uint256 amount = vestingAmount;\n        uint256 startedAt = lastDistributionTime;\n        // Vesting is explicitly defined in timestamp time.\n        // forge-lint: disable-next-line(block-timestamp)\n        if (amount == 0 || startedAt == 0 || block.timestamp >= startedAt + vestingPeriod) {\n            return 0;\n        }\n\n        uint256 remaining = startedAt + vestingPeriod - block.timestamp;\n        return Math.mulDiv(amount, remaining, vestingPeriod);\n    }\n\n    /// @notice Effective unvested amount, capped by remaining accounted assets.\n    function getUnvestedAmount() public view returns (uint256) {\n        return Math.min(scheduledUnvestedAmount(), accountedAssets);\n    }\n\n    function isVesting() public view returns (bool) {\n        uint256 startedAt = lastDistributionTime;\n        // Vesting is explicitly defined in timestamp time.\n        // forge-lint: disable-next-line(block-timestamp)\n        return vestingAmount != 0 && startedAt != 0 && block.timestamp < startedAt + vestingPeriod;\n    }\n\n    /// @notice Backing currently withdrawable synchronously through wrapper liquidity and CB limits.\n    function _availableWithdrawalAssets() internal view returns (uint256) {\n        uint256 wrapperShares = yieldWrapper.balanceOf(address(this));\n        uint256 liquidAssets = yieldWrapper.maxAbleToWithdraw(wrapperShares);\n\n        (uint256 capacity, bool unavailable) = _circuitBreakerStatus();\n        return unavailable ? 0 : Math.min(liquidAssets, capacity);\n    }\n\n    function _circuitBreakerStatus() internal view returns (uint256 capacity, bool unavailable) {\n        address cb = yieldWrapper.circuitBreaker();\n        if (cb == address(0)) return (type(uint256).max, false);\n\n        try ICircuitBreakerV2(cb).paused() returns (bool globallyPaused) {\n            if (globallyPaused) return (0, true);\n        } catch {\n            return (0, true);\n        }\n\n        uint256 wrapperTvl = yieldWrapper.valueOfCapital();\n        try ICircuitBreakerV2(cb)\n            .getAssetHealth(address(yieldWrapper), address(ASSET), wrapperTvl) returns (\n            ICircuitBreakerV2.AssetHealth memory health\n        ) {\n            return health.isPaused ? (0, true) : (health.totalCapacity, false);\n        } catch {\n            return (0, true);\n        }\n    }\n\n    function unaccountedSurplus() public view returns (uint256) {\n        uint256 balance = ASSET.balanceOf(address(this)) + yieldWrapper.balanceOf(address(this));\n        uint256 accounted = accountedAssets;\n        return balance > accounted ? balance - accounted : 0;\n    }\n\n    /// @inheritdoc ERC4626Upgradeable\n    function totalAssets() public view override returns (uint256) {\n        uint256 accounted = accountedAssets;\n        return accounted - Math.min(scheduledUnvestedAmount(), accounted);\n    }\n\n    function deposit(\n        uint256 assets,\n        address receiver\n    )\n        public\n        override\n        nonReentrant\n        whenNotPaused\n        returns (uint256 shares)\n    {\n        shares = _depositAssets(assets, receiver);\n    }\n\n    /// @notice Deposit assets and attribute the deposit to an integrator without storing it.\n    /// @dev `integrator` may be the zero address to represent an unattributed deposit.\n    function deposit(\n        uint256 assets,\n        address receiver,\n        address integrator\n    )\n        external\n        nonReentrant\n        whenNotPaused\n        returns (uint256 shares)\n    {\n        shares = _depositAssets(assets, receiver);\n        emit DepositReferral(msg.sender, receiver, integrator, assets, shares);\n    }\n\n    /// @notice Deposit ftUSD using a delegated session and an optional EIP-2612 permit.\n    /// @dev The assets argument is gross: the fee is paid in ftUSD and only the remainder buys shares.\n    function depositWithSessionAndPermit(\n        uint256 assets,\n        PermitParams calldata permitParams,\n        ISessionManager.SessionCall calldata sessionCall,\n        bytes calldata delegateSignature\n    )\n        external\n        isRelayer\n        nonReentrant\n        whenNotPaused\n        returns (uint256 sharesToUser)\n    {\n        ISessionManager manager = sessionManager;\n        if (address(manager) == address(0)) revert SessionManagerNotSet();\n        if (assets == 0) revert ZeroAmount();\n\n        bytes32 expectedHash = keccak256(abi.encode(_SESSION_DEPOSIT_DATAHASH_TYPEHASH, assets));\n        if (sessionCall.dataHash != expectedHash) {\n            revert SessionDataHashMismatch(expectedHash, sessionCall.dataHash);\n        }\n\n        (address owner_,, uint16 maxFeeBps) = manager.validateAndConsume(\n            address(ASSET), assets, sessionCall, delegateSignature, msg.sender\n        );\n\n        _tryPermitAsset(owner_, permitParams);\n        _enforceRelayerFee(assets, maxFeeBps, sessionCall.feeAmount);\n\n        uint256 assetsForShares = assets - sessionCall.feeAmount;\n        if (assetsForShares == 0) revert ZeroAmount();\n\n        uint256 maxAssets = maxDeposit(owner_);\n        if (assetsForShares > maxAssets) {\n            revert ERC4626ExceededMaxDeposit(owner_, assetsForShares, maxAssets);\n        }\n\n        sharesToUser = previewDeposit(assetsForShares);\n        if (sharesToUser == 0) revert ZeroShares();\n\n        uint256 fee = sessionCall.feeAmount;\n        if (fee != 0) {\n            ASSET.safeTransferFrom(owner_, sessionCall.executor, fee);\n            emit RelayerFeePaid(owner_, sessionCall.executor, address(ASSET), fee);\n        }\n        _deposit(owner_, owner_, assetsForShares, sharesToUser);\n    }\n\n    /// @notice Withdraw gross ftUSD using a delegated ssftUSD-share allowance.\n    /// @dev Both wrapper withdrawals must complete synchronously; returned queue IDs are always zero.\n    function withdrawWithSession(\n        uint256 assets,\n        ISessionManager.SessionCall calldata sessionCall,\n        bytes calldata delegateSignature\n    )\n        external\n        isRelayer\n        nonReentrant\n        returns (uint256 sharesBurned, uint256 queueIdTo, uint256 queueIdFee)\n    {\n        ISessionManager manager = sessionManager;\n        if (address(manager) == address(0)) revert SessionManagerNotSet();\n        if (assets == 0) revert ZeroAmount();\n\n        bytes32 expectedHash = keccak256(abi.encode(_SESSION_WITHDRAW_DATAHASH_TYPEHASH, assets));\n        if (sessionCall.dataHash != expectedHash) {\n            revert SessionDataHashMismatch(expectedHash, sessionCall.dataHash);\n        }\n        sharesBurned = previewWithdraw(assets);\n        if (sharesBurned == 0) revert ZeroShares();\n\n        (address owner_,, uint16 maxFeeBps) = manager.validateAndConsume(\n            address(this), sharesBurned, sessionCall, delegateSignature, msg.sender\n        );\n\n        uint256 maxAssets = maxWithdraw(owner_);\n        if (assets > maxAssets) {\n            revert ERC4626ExceededMaxWithdraw(owner_, assets, maxAssets);\n        }\n\n        uint256 fee = sessionCall.feeAmount;\n        _enforceRelayerFee(assets, maxFeeBps, fee);\n        if (fee != 0) accountedAssets -= fee;\n        _withdrawAccounted(owner_, owner_, owner_, assets - fee, sharesBurned, false);\n\n        if (fee != 0) {\n            _withdrawFromYieldWrapper(fee, sessionCall.executor);\n            emit RelayerFeePaid(owner_, sessionCall.executor, address(ASSET), fee);\n        }\n        return (sharesBurned, queueIdTo, queueIdFee);\n    }\n\n    function _depositAssets(uint256 assets, address receiver) internal returns (uint256 shares) {\n        if (receiver == address(0)) revert ZeroAddress();\n        if (assets == 0) revert ZeroAmount();\n\n        uint256 maxAssets = maxDeposit(receiver);\n        if (assets > maxAssets) revert ERC4626ExceededMaxDeposit(receiver, assets, maxAssets);\n\n        shares = previewDeposit(assets);\n        if (shares == 0) revert ZeroShares();\n        _deposit(msg.sender, receiver, assets, shares);\n    }\n\n    function mint(\n        uint256 shares,\n        address receiver\n    )\n        public\n        override\n        nonReentrant\n        whenNotPaused\n        returns (uint256 assets)\n    {\n        if (receiver == address(0)) revert ZeroAddress();\n        if (shares == 0) revert ZeroShares();\n\n        uint256 maxShares = maxMint(receiver);\n        if (shares > maxShares) revert ERC4626ExceededMaxMint(receiver, shares, maxShares);\n\n        assets = previewMint(shares);\n        if (assets == 0) revert ZeroAssets();\n        _deposit(msg.sender, receiver, assets, shares);\n    }\n\n    function withdraw(\n        uint256 assets,\n        address receiver,\n        address owner_\n    )\n        public\n        override\n        nonReentrant\n        returns (uint256 shares)\n    {\n        if (receiver == address(0) || owner_ == address(0)) revert ZeroAddress();\n        if (assets == 0) revert ZeroAmount();\n\n        uint256 maxAssets = maxWithdraw(owner_);\n        if (assets > maxAssets) revert ERC4626ExceededMaxWithdraw(owner_, assets, maxAssets);\n\n        shares = previewWithdraw(assets);\n        if (shares == 0) revert ZeroShares();\n        _withdraw(msg.sender, receiver, owner_, assets, shares);\n    }\n\n    function redeem(\n        uint256 shares,\n        address receiver,\n        address owner_\n    )\n        public\n        override\n        nonReentrant\n        returns (uint256 assets)\n    {\n        if (receiver == address(0) || owner_ == address(0)) revert ZeroAddress();\n        if (shares == 0) revert ZeroShares();\n\n        uint256 maxShares = maxRedeem(owner_);\n        if (shares > maxShares) revert ERC4626ExceededMaxRedeem(owner_, shares, maxShares);\n\n        assets = previewRedeem(shares);\n        _withdraw(msg.sender, receiver, owner_, assets, shares);\n    }\n\n    function maxDeposit(address receiver) public view override returns (uint256) {\n        if (\n            MIN_SHARES == 0 || receiver == address(0) || receiver == DEAD_SHARES_RECEIVER\n                || paused() || _assetPausedOrBlacklisted(receiver)\n        ) return 0;\n        return super.maxDeposit(receiver);\n    }\n\n    function maxMint(address receiver) public view override returns (uint256) {\n        if (\n            MIN_SHARES == 0 || receiver == address(0) || receiver == DEAD_SHARES_RECEIVER\n                || paused() || _assetPausedOrBlacklisted(receiver)\n        ) return 0;\n        return super.maxMint(receiver);\n    }\n\n    function maxWithdraw(address owner_) public view override returns (uint256) {\n        if (\n            owner_ == address(0) || owner_ == DEAD_SHARES_RECEIVER\n                || _assetPausedOrBlacklisted(owner_)\n        ) return 0;\n        return Math.min(previewRedeem(balanceOf(owner_)), _availableWithdrawalAssets());\n    }\n\n    function maxRedeem(address owner_) public view override returns (uint256) {\n        if (\n            owner_ == address(0) || owner_ == DEAD_SHARES_RECEIVER\n                || _assetPausedOrBlacklisted(owner_)\n        ) return 0;\n\n        return _liquidityLimitedShares(balanceOf(owner_));\n    }\n\n    /// @notice Maximum blacklisted shares governance can synchronously wipe at current capacity.\n    function maxWipeShares(address account) public view returns (uint256) {\n        if (account == address(0) || account == DEAD_SHARES_RECEIVER) return 0;\n\n        if (\n            !_isAssetBlacklisted(account) || _isAssetPaused() || _isAssetBlacklisted(address(this))\n                || _isAssetBlacklisted(address(yieldWrapper)) || _isAssetBlacklisted(owner())\n        ) return 0;\n\n        return _liquidityLimitedShares(balanceOf(account));\n    }\n\n    function _liquidityLimitedShares(uint256 ownerShares) internal view returns (uint256) {\n        uint256 liquidAssets = _availableWithdrawalAssets();\n        if (previewRedeem(ownerShares) <= liquidAssets) return ownerShares;\n\n        // The first share amount whose floor-rounded redemption exceeds liquidAssets.\n        uint256 firstExcessShares = previewWithdraw(liquidAssets + 1);\n        uint256 liquidShares = firstExcessShares == 0 ? 0 : firstExcessShares - 1;\n        return Math.min(ownerShares, liquidShares);\n    }\n\n    /// @notice Sweep only ftUSD that is not accounted backing.\n    function sweepUnaccountedSurplus(address to, uint256 amount) external onlyOwner nonReentrant {\n        if (to == address(0) || to == address(this)) revert ZeroAddress();\n        if (amount == 0) revert ZeroAmount();\n\n        uint256 available = unaccountedSurplus();\n        if (amount > available) revert InsufficientSurplus(available, amount);\n\n        _transferSurplusAssets(to, amount);\n\n        emit UnaccountedSurplusSwept(to, amount);\n    }\n\n    /// @notice Seize the currently realizable ftUSD value of a blacklisted share position.\n    function wipeBlacklistedAddress(address account)\n        external\n        onlyOwner\n        nonReentrant\n        returns (uint256 assets, uint256 shares)\n    {\n        shares = balanceOf(account);\n        return _wipeBlacklistedShares(account, shares);\n    }\n\n    /// @notice Partially seize a blacklisted position when a full wipe exceeds synchronous limits.\n    function wipeBlacklistedShares(\n        address account,\n        uint256 shares\n    )\n        external\n        onlyOwner\n        nonReentrant\n        returns (uint256 assets)\n    {\n        (assets,) = _wipeBlacklistedShares(account, shares);\n    }\n\n    function _wipeBlacklistedShares(\n        address account,\n        uint256 shares\n    )\n        internal\n        returns (uint256 assets, uint256 wipedShares)\n    {\n        if (account == address(0)) revert ZeroAddress();\n        if (account == DEAD_SHARES_RECEIVER) revert ProtectedSeedPosition();\n        if (!_isAssetBlacklisted(account)) {\n            revert NotBlacklisted(account);\n        }\n\n        uint256 accountShares = balanceOf(account);\n        if (accountShares == 0) revert NothingToWipe(account);\n        if (shares == 0) revert ZeroShares();\n\n        uint256 maxShares = maxWipeShares(account);\n        if (shares > maxShares) {\n            revert ERC4626ExceededMaxRedeem(account, shares, maxShares);\n        }\n        assets = previewRedeem(shares);\n\n        address recipient = owner();\n        _withdrawAccounted(msg.sender, recipient, account, assets, shares, true);\n\n        emit BlacklistedAddressWiped(account, recipient, assets, shares);\n        return (assets, shares);\n    }\n\n    function recoverERC20(IERC20 token, address to, uint256 amount)\n        external\n        onlyOwner\n        nonReentrant\n    {\n        if (address(token) == address(0) || to == address(0)) revert ZeroAddress();\n        if (address(token) == address(ASSET) || address(token) == address(yieldWrapper)) {\n            revert AssetNotRecoverable();\n        }\n\n        token.safeTransfer(to, amount);\n        emit Recovered(address(token), to, amount);\n    }\n\n    function recoverNative(address payable to, uint256 amount) external onlyOwner nonReentrant {\n        if (to == address(0)) revert ZeroAddress();\n        (bool ok,) = to.call{value: amount}(\"\");\n        if (!ok) revert NativeTransferFailed();\n        emit Recovered(address(0), to, amount);\n    }\n\n    function decimals() public view override(ERC20Upgradeable, ERC4626Upgradeable) returns (uint8) {\n        return super.decimals();\n    }\n\n    function _decimalsOffset() internal pure override returns (uint8) {\n        return _SHARE_DECIMALS_OFFSET;\n    }\n\n    function _deposit(\n        address caller,\n        address receiver,\n        uint256 assets,\n        uint256 shares\n    )\n        internal\n        override\n    {\n        super._deposit(caller, receiver, assets, shares);\n        yieldWrapper.deposit(assets);\n        accountedAssets += assets;\n    }\n\n    function _withdraw(\n        address caller,\n        address receiver,\n        address owner_,\n        uint256 assets,\n        uint256 shares\n    )\n        internal\n        override\n    {\n        _withdrawAccounted(caller, receiver, owner_, assets, shares, false);\n    }\n\n    function _withdrawAccounted(\n        address caller,\n        address receiver,\n        address owner_,\n        uint256 assets,\n        uint256 shares,\n        bool bypassCompliance\n    )\n        internal\n    {\n        if (assets > totalAssets()) {\n            revert ERC4626ExceededMaxWithdraw(owner_, assets, totalAssets());\n        }\n        if (_isAssetBlacklisted(receiver)) {\n            revert AccountBlacklisted(receiver);\n        }\n\n        if (!bypassCompliance && caller != owner_) {\n            _spendAllowance(owner_, caller, shares);\n        }\n\n        accountedAssets -= assets;\n\n        if (bypassCompliance) {\n            uint256 minimumShares = MIN_SHARES;\n            uint256 supply = totalSupply();\n            if (owner_ == DEAD_SHARES_RECEIVER) revert ProtectedSeedPosition();\n            if (supply < minimumShares || shares > supply - minimumShares) {\n                revert MinimumSharesViolation(shares > supply ? 0 : supply - shares, minimumShares);\n            }\n            super._update(owner_, address(0), shares);\n        } else {\n            _burn(owner_, shares);\n        }\n\n        if (assets != 0) _withdrawFromYieldWrapper(assets, receiver);\n\n        emit Withdraw(caller, receiver, owner_, assets, shares);\n    }\n\n    function _withdrawFromYieldWrapper(uint256 assets, address receiver) internal {\n        uint256 queueId = yieldWrapper.withdraw(assets, receiver);\n        if (queueId != 0) revert QueuedWithdrawalUnsupported(queueId);\n    }\n\n    function _transferSurplusAssets(address receiver, uint256 assets) internal {\n        uint256 directAssets = Math.min(assets, ASSET.balanceOf(address(this)));\n        if (directAssets != 0) {\n            ASSET.safeTransfer(receiver, directAssets);\n        }\n\n        uint256 wrappedAssets = assets - directAssets;\n        if (wrappedAssets != 0) {\n            _withdrawFromYieldWrapper(wrappedAssets, receiver);\n        }\n    }\n\n    function _update(address from, address to, uint256 value) internal override(ERC20Upgradeable) {\n        _enforceAssetCompliance(from, to);\n\n        uint256 minimumShares = MIN_SHARES;\n        if (minimumShares != 0) {\n            if (from == DEAD_SHARES_RECEIVER || to == DEAD_SHARES_RECEIVER) {\n                revert ProtectedSeedPosition();\n            }\n            if (to == address(0)) {\n                uint256 supply = totalSupply();\n                if (supply < minimumShares || value > supply - minimumShares) {\n                    revert MinimumSharesViolation(\n                        value > supply ? 0 : supply - value, minimumShares\n                    );\n                }\n            }\n        }\n\n        super._update(from, to, value);\n    }\n\n    function _enforceAssetCompliance(address from, address to) internal view {\n        if (_isAssetPaused()) revert PausableUpgradeable.EnforcedPause();\n\n        if (_isAssetBlacklisted(msg.sender)) revert AccountBlacklisted(msg.sender);\n        if (from != address(0) && _isAssetBlacklisted(from)) {\n            revert AccountBlacklisted(from);\n        }\n        if (to != address(0) && _isAssetBlacklisted(to)) {\n            revert AccountBlacklisted(to);\n        }\n    }\n\n    function _assetPausedOrBlacklisted(address account) internal view returns (bool) {\n        if (\n            _isAssetPaused() || _isAssetBlacklisted(address(this))\n                || _isAssetBlacklisted(address(yieldWrapper)) || _isAssetBlacklisted(account)\n        ) return true;\n\n        (, bool circuitBreakerUnavailable) = _circuitBreakerStatus();\n        return circuitBreakerUnavailable;\n    }\n\n    function _isAssetPaused() internal view returns (bool) {\n        return IStableVaultFtUSDCompliance(address(ASSET)).paused();\n    }\n\n    function _isAssetBlacklisted(address account) internal view returns (bool) {\n        return IStableVaultFtUSDCompliance(address(ASSET)).isBlacklisted(account);\n    }\n\n    function _authorizeUpgrade(address newImplementation) internal view override onlyOwner {\n        try StableEpochRewardsVault(payable(newImplementation)).ASSET() returns (IERC20 newAsset) {\n            if (address(newAsset) != address(ASSET)) revert IncompatibleImplementation();\n        } catch {\n            revert IncompatibleImplementation();\n        }\n\n        try StableEpochRewardsVault(payable(newImplementation)).vestingPeriod() returns (\n            uint40 newVestingPeriod\n        ) {\n            if (newVestingPeriod != vestingPeriod) revert IncompatibleImplementation();\n        } catch {\n            revert IncompatibleImplementation();\n        }\n\n        try StableEpochRewardsVault(payable(newImplementation)).yieldWrapper() returns (\n            IftYieldWrapperV2 newYieldWrapper\n        ) {\n            if (address(newYieldWrapper) != address(yieldWrapper)) {\n                revert IncompatibleImplementation();\n            }\n        } catch {\n            revert IncompatibleImplementation();\n        }\n    }\n\n    receive() external payable {}\n}\n","creation_status":"success","file_path":"contracts/StableEpochRewardsVault.sol"}