{"file_path":"src/USDai.sol","creation_status":"success","source_code":"// SPDX-License-Identifier: BUSL-1.1\npragma solidity 0.8.29;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts/interfaces/IERC5267.sol\";\nimport \"@openzeppelin/contracts/utils/math/Math.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\nimport \"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/utils/MulticallUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\";\n\nimport \"./interfaces/IUSDai.sol\";\nimport \"./interfaces/ISwapAdapter.sol\";\nimport \"./interfaces/IMintableBurnable.sol\";\nimport \"./interfaces/IBaseYieldEscrow.sol\";\n\nimport \"./interfaces/external/IBlacklist.sol\";\n\n/**\n * @title USDai ERC20\n * @author USD.AI Foundation\n */\ncontract USDai is\n    IUSDai,\n    IMintableBurnable,\n    ERC165Upgradeable,\n    ERC20Upgradeable,\n    ERC20PermitUpgradeable,\n    MulticallUpgradeable,\n    PausableUpgradeable,\n    ReentrancyGuardUpgradeable,\n    AccessControlUpgradeable\n{\n    using SafeERC20 for IERC20;\n\n    /*------------------------------------------------------------------------*/\n    /* Constant */\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * @notice Implementation version\n     */\n    string public constant IMPLEMENTATION_VERSION = \"1.5\";\n\n    /**\n     * @notice Blacklist admin role\n     */\n    bytes32 internal constant BLACKLIST_ADMIN_ROLE = keccak256(\"BLACKLIST_ADMIN_ROLE\");\n\n    /**\n     * @notice Pause admin role\n     */\n    bytes32 internal constant PAUSE_ADMIN_ROLE = keccak256(\"PAUSE_ADMIN_ROLE\");\n\n    /**\n     * @notice Supply storage location\n     * @dev keccak256(abi.encode(uint256(keccak256(\"USDai.supply\")) - 1)) & ~bytes32(uint256(0xff));\n     */\n    bytes32 private constant SUPPLY_STORAGE_LOCATION =\n        0x5fc387bd350b82c09f22bee4c04d61669980ce519c352560e36bc6144f9cf800;\n\n    /**\n     * @notice Base yield accrual storage location\n     * @dev keccak256(abi.encode(uint256(keccak256(\"USDai.baseYieldAccrual\")) - 1)) & ~bytes32(uint256(0xff));\n     */\n    bytes32 private constant BASE_YIELD_ACCRUAL_STORAGE_LOCATION =\n        0xad76c5b481cb106971e0ae4c23a09cb5b1dc9dba5fad96d9694630df5e853900;\n\n    /**\n     * @notice Blacklist storage location\n     * @dev keccak256(abi.encode(uint256(keccak256(\"USDai.blacklist\")) - 1)) & ~bytes32(uint256(0xff));\n     */\n    bytes32 private constant BLACKLIST_STORAGE_LOCATION =\n        0xd21f45001ca28b8905ef527bd860800b2646ce7faf578b00aa2e89af23551500;\n\n    /**\n     * @notice Fixed point scale\n     */\n    uint256 private constant FIXED_POINT_SCALE = 1e18;\n\n    /*------------------------------------------------------------------------*/\n    /* Immutable state */\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * @notice Swap adapter\n     */\n    ISwapAdapter internal immutable _swapAdapter;\n\n    /**\n     * @notice Base token\n     */\n    IERC20 internal immutable _baseToken;\n\n    /**\n     * @notice Scale factor\n     */\n    uint256 internal immutable _scaleFactor;\n\n    /**\n     * @notice Base yield escrow\n     */\n    IBaseYieldEscrow internal immutable _baseYieldEscrow;\n\n    /**\n     * @notice Base yield recipient\n     */\n    address internal immutable _baseYieldRecipient;\n\n    /**\n     * @notice Bridge adapter contract\n     */\n    address internal immutable _bridgeAdapter;\n\n    /*------------------------------------------------------------------------*/\n    /* Structures */\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * @custom:storage-location erc7201:USDai.supply\n     */\n    struct Supply {\n        uint256 bridged;\n    }\n\n    /**\n     * @custom:storage-location erc7201:USDai.baseYieldAccrual\n     */\n    struct BaseYieldAccrual {\n        RateTier[] rateTiers;\n        uint256 accrued;\n        uint64 timestamp;\n    }\n\n    /**\n     * @custom:storage-location erc7201:USDai.blacklist\n     */\n    struct Blacklist {\n        mapping(address => bool) blacklist;\n    }\n\n    /*------------------------------------------------------------------------*/\n    /* Constructor */\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * @notice USDai Constructor\n     * @param swapAdapter_ Swap Adapter\n     * @param baseYieldEscrow_ Base token yield escrow\n     * @param baseYieldRecipient_ Base yield recipient\n     * @param bridgeAdapter_ Bridge adapter contract\n     */\n    constructor(address swapAdapter_, address baseYieldEscrow_, address baseYieldRecipient_, address bridgeAdapter_) {\n        _disableInitializers();\n\n        _swapAdapter = ISwapAdapter(swapAdapter_);\n        _baseToken = IERC20(_swapAdapter.baseToken());\n        _scaleFactor = 10 ** (18 - IERC20Metadata(_swapAdapter.baseToken()).decimals());\n        _baseYieldEscrow = IBaseYieldEscrow(baseYieldEscrow_);\n        _baseYieldRecipient = baseYieldRecipient_;\n        _bridgeAdapter = bridgeAdapter_;\n    }\n\n    /*------------------------------------------------------------------------*/\n    /* Initialization  */\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * @notice Initialize the contract\n     * @param admin Default admin address\n     */\n    function initialize(\n        address admin\n    ) external initializer {\n        __ERC20_init(\"USDai\", \"USDai\");\n        __ERC20Permit_init(\"USDai\");\n        __Multicall_init();\n        __ReentrancyGuard_init();\n        __AccessControl_init();\n\n        /* Grant roles */\n        _grantRole(DEFAULT_ADMIN_ROLE, admin);\n    }\n\n    /*------------------------------------------------------------------------*/\n    /* Modifiers  */\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * @notice Non-zero value modifier\n     * @param value Value to check\n     */\n    modifier nonZeroUint(\n        uint256 value\n    ) {\n        if (value == 0) revert InvalidAmount();\n        _;\n    }\n\n    /**\n     * @notice Non-zero address modifier\n     * @param value Value to check\n     */\n    modifier nonZeroAddress(\n        address value\n    ) {\n        if (value == address(0)) revert InvalidAddress();\n        _;\n    }\n\n    /**\n     * @notice Not blacklisted modifier\n     * @param value Value to check\n     */\n    modifier notBlacklisted(\n        address value\n    ) {\n        if (isBlacklisted(value)) {\n            revert BlacklistedAddress(value);\n        }\n        _;\n    }\n\n    /**\n     * @notice Only bridge adapter modifier\n     */\n    modifier onlyBridgeAdapter() {\n        if (msg.sender != _bridgeAdapter) revert InvalidAddress();\n        _;\n    }\n\n    /*------------------------------------------------------------------------*/\n    /* Getters  */\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * @inheritdoc IUSDai\n     */\n    function swapAdapter() external view returns (address) {\n        return address(_swapAdapter);\n    }\n\n    /**\n     * @inheritdoc IUSDai\n     */\n    function baseToken() external view returns (address) {\n        return address(_baseToken);\n    }\n\n    /**\n     * @inheritdoc IUSDai\n     */\n    function bridgedSupply() public view returns (uint256) {\n        return _getSupplyStorage().bridged;\n    }\n\n    /**\n     * @inheritdoc IUSDai\n     */\n    function baseYieldAccrued() external view returns (uint256) {\n        BaseYieldAccrual memory accrual = _getBaseYieldAccrualStorage();\n\n        return accrual.accrued + _calculateAccrual(accrual);\n    }\n\n    /**\n     * @inheritdoc IUSDai\n     */\n    function isBlacklisted(\n        address account\n    ) public view returns (bool) {\n        /* Check local blacklist */\n        if (_getBlacklistStorage().blacklist[account]) return true;\n\n        /* If not on Arbitrum, skip remaining checks */\n        if (block.chainid != 42161) return false;\n\n        /* Exclude Staked USDai and OUSDaiUtility */\n        if (\n            account == 0x0B2b2B2076d95dda7817e785989fE353fe955ef9\n                || account == 0x24a92E28a8C5D8812DcfAf44bCb20CC0BaBd1392\n        ) return false;\n\n        /* Check USDC and USDT blacklists */\n        return IBlacklist(0xaf88d065e77c8cC2239327C5EDb3A432268e5831).isBlacklisted(account)\n            || IBlacklist(0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9).isBlocked(account);\n    }\n\n    /*------------------------------------------------------------------------*/\n    /* Internal helpers */\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * @notice Get reference to USDai supply storage\n     * @return $ Reference to supply storage\n     */\n    function _getSupplyStorage() internal pure returns (Supply storage $) {\n        assembly {\n            $.slot := SUPPLY_STORAGE_LOCATION\n        }\n    }\n\n    /**\n     * @notice Get reference to USDai base yield accrual storage\n     *\n     * @return $ Reference to base yield accrual storage\n     */\n    function _getBaseYieldAccrualStorage() internal pure returns (BaseYieldAccrual storage $) {\n        assembly {\n            $.slot := BASE_YIELD_ACCRUAL_STORAGE_LOCATION\n        }\n    }\n\n    /**\n     * @notice Get reference to USDai blacklist storage\n     *\n     * @return $ Reference to blacklist storage\n     */\n    function _getBlacklistStorage() internal pure returns (Blacklist storage $) {\n        assembly {\n            $.slot := BLACKLIST_STORAGE_LOCATION\n        }\n    }\n\n    /**\n     * @notice Helper function to scale up a value\n     * @param value Value\n     * @return Scaled value\n     */\n    function _scale(\n        uint256 value\n    ) internal view returns (uint256) {\n        return value * _scaleFactor;\n    }\n\n    /**\n     * @notice Helper function to scale down a value\n     * @param value Value\n     * @return Unscaled value\n     */\n    function _unscale(\n        uint256 value\n    ) internal view returns (uint256) {\n        return value / _scaleFactor;\n    }\n\n    /**\n     * @notice Helper function to scale down a value, rounding up\n     * @param value Value\n     * @return Unscaled value rounded up\n     */\n    function _unscaleUp(\n        uint256 value\n    ) internal view returns (uint256) {\n        return (value + _scaleFactor - 1) / _scaleFactor;\n    }\n\n    /**\n     * @notice Deposit\n     * @param depositToken Deposit token\n     * @param depositAmount Deposit amount\n     * @param usdaiAmountMinimum USDai amount minimum\n     * @param recipient Recipient address\n     * @param data Data\n     * @return USDai amount\n     */\n    function _deposit(\n        address depositToken,\n        uint256 depositAmount,\n        uint256 usdaiAmountMinimum,\n        address recipient,\n        bytes calldata data\n    ) internal nonZeroUint(depositAmount) nonZeroAddress(recipient) returns (uint256) {\n        /* Accrue base yield */\n        _accrue();\n\n        /* Transfer token in from sender to this contract */\n        IERC20(depositToken).safeTransferFrom(msg.sender, address(this), depositAmount);\n\n        /* If the deposit token isn't base token, swap in */\n        uint256 usdaiAmount;\n        if (depositToken != address(_baseToken)) {\n            /* Approve the adapter to spend the token in */\n            IERC20(depositToken).forceApprove(address(_swapAdapter), depositAmount);\n\n            /* Swap in deposit token for base token */\n            usdaiAmount = _scale(_swapAdapter.swapIn(depositToken, depositAmount, _unscaleUp(usdaiAmountMinimum), data));\n        } else {\n            usdaiAmount = _scale(depositAmount);\n        }\n\n        /* Mint to the recipient */\n        _mint(recipient, usdaiAmount);\n\n        /* Emit deposited event */\n        emit Deposited(msg.sender, recipient, depositToken, depositAmount, usdaiAmount);\n\n        return usdaiAmount;\n    }\n\n    /**\n     * @notice Withdraw\n     * @param withdrawToken Withdraw token\n     * @param usdaiAmount USD.ai amount\n     * @param withdrawAmountMinimum Minimum withdraw amount (only checked for non-base token withdrawals)\n     * @param recipient Recipient address\n     * @param data Data\n     * @return Withdraw amount\n     */\n    function _withdraw(\n        address withdrawToken,\n        uint256 usdaiAmount,\n        uint256 withdrawAmountMinimum,\n        address recipient,\n        bytes calldata data\n    ) internal nonZeroUint(usdaiAmount) nonZeroAddress(recipient) returns (uint256) {\n        /* Accrue base yield */\n        _accrue();\n\n        /* Burn USD.ai tokens */\n        _burn(msg.sender, usdaiAmount);\n\n        /* If the withdraw token isn't base token, swap out */\n        uint256 withdrawAmount;\n        if (withdrawToken != address(_baseToken)) {\n            uint256 baseTokenAmount = _unscale(usdaiAmount);\n\n            /* Approve the adapter to spend the token in */\n            _baseToken.forceApprove(address(_swapAdapter), baseTokenAmount);\n\n            /* Swap base token input for withdraw token */\n            withdrawAmount = _swapAdapter.swapOut(withdrawToken, baseTokenAmount, withdrawAmountMinimum, data);\n        } else {\n            withdrawAmount = _unscale(usdaiAmount);\n        }\n\n        /* Transfer token output from this contract to the recipient address */\n        IERC20(withdrawToken).safeTransfer(recipient, withdrawAmount);\n\n        /* Emit withdrawn event */\n        emit Withdrawn(msg.sender, recipient, withdrawToken, usdaiAmount, withdrawAmount);\n\n        return withdrawAmount;\n    }\n\n    /**\n     * @notice Calculate interest accrued\n     * @param accrual Base yield accrual\n     * @return Scaled accrued amount\n     */\n    function _calculateAccrual(\n        BaseYieldAccrual memory accrual\n    ) internal view returns (uint256) {\n        /* If accrual is not yet initialized, return 0 */\n        if (accrual.timestamp == 0) return 0;\n\n        /* Calculate time elapsed */\n        uint256 timeElapsed = block.timestamp - accrual.timestamp;\n\n        /* If time elapsed is 0, return 0 */\n        if (timeElapsed == 0) return 0;\n\n        /* Iterate over rate tiers */\n        uint256 principal = _scale(_baseToken.balanceOf(address(this)));\n        uint256 accrued;\n        for (uint256 i; i < accrual.rateTiers.length; i++) {\n            /* Calculate clamped scaled principal */\n            uint256 clampedPrincipal = Math.min(principal, accrual.rateTiers[i].threshold);\n\n            /* Compute clamped principal * rate * time elapsed */\n            accrued += Math.mulDiv(clampedPrincipal, accrual.rateTiers[i].rate * timeElapsed, FIXED_POINT_SCALE);\n\n            /* Update principal remaining */\n            principal -= clampedPrincipal;\n        }\n\n        return accrued;\n    }\n\n    /**\n     * @notice Accrue base yield\n     * @return Scaled accrued amount\n     */\n    function _accrue() internal returns (uint256) {\n        /* Get base yield rate */\n        BaseYieldAccrual storage accrual = _getBaseYieldAccrualStorage();\n\n        /* Update accrual */\n        accrual.accrued += _calculateAccrual(accrual);\n        accrual.timestamp = uint64(block.timestamp);\n\n        return accrual.accrued;\n    }\n\n    /*------------------------------------------------------------------------*/\n    /* ERC20Upgradeable overrides */\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * @inheritdoc ERC20Upgradeable\n     */\n    function _update(\n        address from,\n        address to,\n        uint256 value\n    ) internal override notBlacklisted(msg.sender) notBlacklisted(from) notBlacklisted(to) {\n        super._update(from, to, value);\n    }\n\n    /*------------------------------------------------------------------------*/\n    /* Public API */\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * @inheritdoc IUSDai\n     */\n    function deposit(\n        address depositToken,\n        uint256 depositAmount,\n        uint256 usdaiAmountMinimum,\n        address recipient\n    ) external nonReentrant whenNotPaused returns (uint256) {\n        return _deposit(depositToken, depositAmount, usdaiAmountMinimum, recipient, msg.data[0:0]);\n    }\n\n    /**\n     * @inheritdoc IUSDai\n     */\n    function deposit(\n        address depositToken,\n        uint256 depositAmount,\n        uint256 usdaiAmountMinimum,\n        address recipient,\n        bytes calldata data\n    ) external nonReentrant whenNotPaused returns (uint256) {\n        return _deposit(depositToken, depositAmount, usdaiAmountMinimum, recipient, data);\n    }\n\n    /**\n     * @inheritdoc IUSDai\n     */\n    function withdraw(\n        address withdrawToken,\n        uint256 usdaiAmount,\n        uint256 withdrawAmountMinimum,\n        address recipient\n    ) external nonReentrant whenNotPaused returns (uint256) {\n        return _withdraw(withdrawToken, usdaiAmount, withdrawAmountMinimum, recipient, msg.data[0:0]);\n    }\n\n    /**\n     * @inheritdoc IUSDai\n     */\n    function withdraw(\n        address withdrawToken,\n        uint256 usdaiAmount,\n        uint256 withdrawAmountMinimum,\n        address recipient,\n        bytes calldata data\n    ) external nonReentrant whenNotPaused returns (uint256) {\n        return _withdraw(withdrawToken, usdaiAmount, withdrawAmountMinimum, recipient, data);\n    }\n\n    /*------------------------------------------------------------------------*/\n    /* Minter API */\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * @inheritdoc IMintableBurnable\n     */\n    function mint(address to, uint256 amount) external whenNotPaused onlyBridgeAdapter {\n        _mint(to, amount);\n\n        /* Update bridged supply */\n        _getSupplyStorage().bridged -= amount;\n    }\n\n    /**\n     * @inheritdoc IMintableBurnable\n     */\n    function burn(address from, uint256 amount) external whenNotPaused onlyBridgeAdapter {\n        _burn(from, amount);\n\n        /* Update bridged supply */\n        _getSupplyStorage().bridged += amount;\n    }\n\n    /*------------------------------------------------------------------------*/\n    /* Base Yield Recipient API */\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * @inheritdoc IUSDai\n     */\n    function harvest() external returns (uint256) {\n        /* Validate caller is the base yield recipient */\n        if (msg.sender != _baseYieldRecipient) revert InvalidAddress();\n\n        /* Base token amount */\n        uint256 baseTokenAmount = _unscale(_accrue());\n\n        /* Set accrued base yield to zero */\n        _getBaseYieldAccrualStorage().accrued = 0;\n\n        /* Scale base token amount to USDai amount */\n        uint256 usdaiAmount = _scale(baseTokenAmount);\n\n        /* Mint USDai to base yield recipient */\n        _mint(_baseYieldRecipient, usdaiAmount);\n\n        /* Pull base token from escrow contract */\n        _baseYieldEscrow.harvest(baseTokenAmount);\n\n        /* Emit harvested event */\n        emit Harvested(usdaiAmount);\n\n        return usdaiAmount;\n    }\n\n    /*------------------------------------------------------------------------*/\n    /* Base Yield Escrow API */\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * @inheritdoc IUSDai\n     */\n    function setRateTiers(\n        RateTier[] memory rateTiers\n    ) external {\n        /* Validate caller is the base yield escrow */\n        if (msg.sender != address(_baseYieldEscrow)) revert InvalidAddress();\n\n        /* Validate rate tiers */\n        for (uint256 i; i < rateTiers.length; i++) {\n            if (rateTiers[i].rate == 0 || rateTiers[i].threshold == 0) revert InvalidParameters();\n        }\n\n        /* Accrue base yield */\n        _accrue();\n\n        /* Set rate tiers */\n        _getBaseYieldAccrualStorage().rateTiers = rateTiers;\n\n        /* Emit rate tiers set event */\n        emit BaseYieldRateTiersSet(rateTiers);\n    }\n\n    /*------------------------------------------------------------------------*/\n    /* Permissioned API */\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * @inheritdoc IUSDai\n     */\n    function setBlacklist(address account, bool blacklisted) external onlyRole(BLACKLIST_ADMIN_ROLE) {\n        _getBlacklistStorage().blacklist[account] = blacklisted;\n\n        /* Emit blacklist updated event */\n        emit BlacklistUpdated(account, blacklisted);\n    }\n\n    /**\n     * @inheritdoc IUSDai\n     */\n    function pause() external onlyRole(PAUSE_ADMIN_ROLE) {\n        _pause();\n    }\n\n    /**\n     * @inheritdoc IUSDai\n     */\n    function unpause() external onlyRole(PAUSE_ADMIN_ROLE) {\n        _unpause();\n    }\n\n    /*------------------------------------------------------------------------*/\n    /* ERC165 */\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * @inheritdoc IERC165\n     */\n    function supportsInterface(\n        bytes4 interfaceId\n    ) public view virtual override(AccessControlUpgradeable, ERC165Upgradeable) returns (bool) {\n        return interfaceId == type(IERC20).interfaceId || interfaceId == type(IUSDai).interfaceId\n            || interfaceId == type(IMintableBurnable).interfaceId || interfaceId == type(IERC20Permit).interfaceId\n            || interfaceId == type(IERC5267).interfaceId || super.supportsInterface(interfaceId);\n    }\n}\n","deployed_bytecode":"0x6080806040526004361015610012575f80fd5b5f905f3560e01c90816301ffc9a7146123c35750806306fdde03146122f4578063095ea7b3146122ce57806311c301e0146122a5578063153b0d1e146121b757806316762eed1461200b57806318160ddd14611fe25780631a10bf8814611d435780631d63e61a14611d1357806323b872dd14611c3b578063248a9ca314611c1d5780632f2ff15d14611bec578063313ce56714611bd15780633644e51514611baf57806336568abe14611b695780633f4ba83a14611aeb57806340c10f1914611a655780634641257d146119105780635c975abb146118e157806370a082311461189c578063754b377c1461185557806377bb1eb9146118105780637ecebe00146117cc5780638456cb591461175957806384b0196e146116315780638b6099db1461146657806391d148541461141057806395d89b41146113245780639dc29fac1461129a578063a217fddf1461127e578063a9059cbb1461124c578063ac9650d81461101f578063c4d66de8146108b2578063c55dae631461086d578063d505accf14610712578063d547741f146106d7578063d97e6ec0146104aa578063dd62ed3e14610462578063fdd2b4af146102065763fe575a87146101d6575f80fd5b346102035760203660031901126102035760206101f96101f46124b4565b612a65565b6040519015158152f35b80fd5b50346102035761021536612573565b9492939590610222612c46565b61022a612c7e565b8615610453576001600160a01b03831694851561044457610249612ce6565b506102548833613228565b6001600160a01b03858116977f00000000000000000000000046850ad61c2b7d64d08c9c754f4525459669698491821689146103f357602092919085886103106102be7f000000000000000000000000000000000000000000000000000000e8d4a510008f61320a565b936102f38560018060a01b037f00000000000000000000000056adba107da1cb73e423c19ec7685e8312d0ef04168098613383565b6040516317b178b360e31b81529889978896879560048701612ca5565b03925af19182156103e757916103ae575b506020956103725f51602061380d5f395f51905f529361036d9397889485925b61035f60405194859263a9059cbb60e01b8f85015260248401613368565b03601f198101845283612539565b6136ab565b604080516001600160a01b0395909516855260208501919091528301523391606090a360015f516020613a8d5f395f51905f5255604051908152f35b9190506020823d6020116103df575b816103ca60209383612539565b810103126103db5790516020610321565b5f80fd5b3d91506103bd565b604051903d90823e3d90fd5b505050505061036d6020956103725f51602061380d5f395f51905f529361043a7f000000000000000000000000000000000000000000000000000000e8d4a510008461320a565b9788948592610341565b63e6c4247b60e01b8352600483fd5b63162908e360e11b8252600482fd5b50346102035760403660031901126102035761047c6124b4565b61048d6104876124ca565b91612780565b9060018060a01b03165f52602052602060405f2054604051908152f35b5034610203576104b936612573565b949395906104c8939293612c46565b6104d0612c7e565b8615610453576001600160a01b038416958615610444576104ef612ce6565b506040516323b872dd60e01b602082015233602482015230604482015260648082018a905281526001600160a01b0387169061053690610530608482612539565b826136ab565b7f00000000000000000000000046850ad61c2b7d64d08c9c754f452545966969846001600160a01b03168114610691577f00000000000000000000000056adba107da1cb73e423c19ec7685e8312d0ef046001600160a01b03169061059e908a908390613383565b6105c97f000000000000000000000000000000000000000000000000000000e8d4a5100080966128ce565b5f19810190811161067d57908985896106066105e88a6020989761320a565b9560405198899788968795631999d1c560e31b875260048701612ca5565b03925af19182156103e75791610642575b50916020956106395f5160206139ad5f395f51905f52936103729796956127e0565b9586809361314d565b94939290506020853d602011610675575b8161066060209383612539565b810103126103db579351929391926020610617565b3d9150610653565b634e487b7160e01b85526011600452602485fd5b5050505050905f5160206139ad5f395f51905f5261037293926020956106397f000000000000000000000000000000000000000000000000000000e8d4a51000826127e0565b50346102035760403660031901126102035761070e6004356106f76124ca565b90610709610704826128db565b612c00565b6130b1565b5080f35b50346102035760e03660031901126102035761072c6124b4565b906107356124ca565b604435906064359360843560ff81168103610869578542116108555761081561081e9160018060a01b038416978888525f51602061398d5f395f51905f5260205260408820908154916001830190556040519060208201927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c984528b604084015260018060a01b038916606084015289608084015260a083015260c082015260c081526107e360e082612539565b5190206107ee6134cf565b906040519161190160f01b83526002830152602282015260c43591604260a43592206135bf565b90929192613637565b6001600160a01b03169480860361083e575061083b939450613305565b80f35b6325c0072360e11b85526004869052602452604484fd5b63313c898160e11b85526004869052602485fd5b8480fd5b50346102035780600319360112610203576040517f00000000000000000000000046850ad61c2b7d64d08c9c754f452545966969846001600160a01b03168152602090f35b5034610203576020366003190112610203576108cc6124b4565b5f516020613aad5f395f51905f5254604081901c60ff161592906001600160401b03811680159081611017575b600114908161100d575b159081611004575b50610ff5576001600160401b031981166001175f516020613aad5f395f51905f525583610fcd575b5061093c612906565b92610945612906565b9361094e613594565b610956613594565b8051906001600160401b038211610cd35781906109805f51602061382d5f395f51905f52546125f2565b601f8111610f66575b50602090601f8311600114610eea578592610edf575b50508160011b915f199060031b1c1916175f51602061382d5f395f51905f52555b83516001600160401b038111610ecb576109e75f51602061388d5f395f51905f52546125f2565b601f8111610e6f575b50602094601f8211600114610df4579483949582939492610de9575b50508160011b915f199060031b1c1916175f51602061388d5f395f51905f52555b610a35612906565b92610a3e613594565b60405193610a4d604086612539565b60018552603160f81b6020860152610a63613594565b8051906001600160401b038211610dd5578190610a8d5f51602061386d5f395f51905f52546125f2565b601f8111610d6e575b50602090601f8311600114610cf2578692610ce7575b50508160011b915f199060031b1c1916175f51602061386d5f395f51905f52555b83516001600160401b038111610cd357610af45f5160206138ed5f395f51905f52546125f2565b601f8111610c77575b506020601f8211600114610bf75781908596610b91959692610bec575b50508160011b915f199060031b1c1916175f5160206138ed5f395f51905f52555b835f51602061390d5f395f51905f5255835f516020613acd5f395f51905f5255610b63613594565b610b6b613594565b610b73613594565b60015f516020613a8d5f395f51905f5255610b8c613594565b612faf565b50610b995780f35b60ff60401b195f516020613aad5f395f51905f5254165f516020613aad5f395f51905f52557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a180f35b015190505f80610b1a565b5f5160206138ed5f395f51905f52855280852095601f198316865b818110610c5f575091610b9195969791846001959410610c47575b505050811b015f5160206138ed5f395f51905f5255610b3b565b01515f1960f88460031b161c191690555f8080610c2d565b83830151895560019098019760209384019301610c12565b5f5160206138ed5f395f51905f5285525f516020613aed5f395f51905f52601f830160051c81019160208410610cc9575b601f0160051c01905b818110610cbe5750610afd565b858155600101610cb1565b9091508190610ca8565b634e487b7160e01b84526041600452602484fd5b015190505f80610aac565b5f51602061386d5f395f51905f5287528187209250601f198416875b818110610d565750908460019594939210610d3e575b505050811b015f51602061386d5f395f51905f5255610acd565b01515f1960f88460031b161c191690555f8080610d24565b92936020600181928786015181550195019301610d0e565b5f51602061386d5f395f51905f5287529091505f51602061396d5f395f51905f52601f840160051c81019160208510610dcb575b90601f859493920160051c01905b818110610dbd5750610a96565b878155849350600101610db0565b9091508190610da2565b634e487b7160e01b85526041600452602485fd5b015190505f80610a0c565b601f198216955f51602061388d5f395f51905f52855280852091855b888110610e5757508360019596979810610e3f575b505050811b015f51602061388d5f395f51905f5255610a2d565b01515f1960f88460031b161c191690555f8080610e25565b91926020600181928685015181550194019201610e10565b5f51602061388d5f395f51905f5284525f516020613a4d5f395f51905f52601f830160051c81019160208410610ec1575b601f0160051c01905b818110610eb657506109f0565b848155600101610ea9565b9091508190610ea0565b634e487b7160e01b83526041600452602483fd5b015190505f8061099f565b5f51602061382d5f395f51905f5286528186209250601f198416865b818110610f4e5750908460019594939210610f36575b505050811b015f51602061382d5f395f51905f52556109c0565b01515f1960f88460031b161c191690555f8080610f1c565b92936020600181928786015181550195019301610f06565b5f51602061382d5f395f51905f5286529091505f5160206137ad5f395f51905f52601f840160051c81019160208510610fc3575b90601f859493920160051c01905b818110610fb55750610989565b868155849350600101610fa8565b9091508190610f9a565b6001600160481b0319166001600160401b01175f516020613aad5f395f51905f52555f610933565b63f92ee8a960e01b8252600482fd5b9050155f61090b565b303b159150610903565b8591506108f9565b5034610203576020366003190112610203576004356001600160401b0381116111da57366023820112156111da5760048101356001600160401b0381116111d6573660248260051b840101116111d65790602060405161107f8282612539565b848152818101601f1983013682376110968561255c565b936110a46040519586612539565b858552601f196110b38761255c565b01875b81811061123d575050368190036042190190875b878110156111de578860248260051b84010135848112156111da5783016024810135906001600160401b0382116111d65760440181360381136111d6578661113c84938b6040519382859383850197883783018281018881528e519283915e010185815203601f198101835282612539565b5190305af4893d156111c357503d906001600160401b0382116111af579161118d6001928c98979695948a601f19601f840116019161117e6040519384612539565b82523d8a8c84013e5b30613536565b611197828b6127b8565b526111a2818a6127b8565b50019091929394506110ca565b634e487b7160e01b8b52604160045260248bfd5b959493929161118d600192606090611187565b8280fd5b5080fd5b85898860405191838301848452825180915260408401948060408360051b870101940192955b8287106112115785850386f35b90919293828061122d600193603f198a82030186528851612490565b9601920196019592919092611204565b606087820187015285016110b6565b5034610203576040366003190112610203576112736112696124b4565b6024359033612e8e565b602060405160018152f35b5034610203578060031936011261020357602090604051908152f35b5034610203576040366003190112610203576112b46124b4565b602435906112c0612c7e565b7f000000000000000000000000ffa10065ce1d1c42fabc46e06b84ed8ffeb4bae56001600160a01b0316330361044457906112fe8161131293613228565b5f5160206137ed5f395f51905f52546128ce565b5f5160206137ed5f395f51905f525580f35b503461020357806003193601126102035760405190805f51602061388d5f395f51905f525490611353826125f2565b80855291600181169081156113e95750600114611393575b61138f8461137b81860382612539565b604051918291602083526020830190612490565b0390f35b5f51602061388d5f395f51905f5281525f516020613a4d5f395f51905f52939250905b8082106113cf5750909150810160200161137b8261136b565b9192600181602092548385880101520191019092916113b6565b60ff191660208087019190915292151560051b8501909201925061137b915083905061136b565b503461020357604036600319011261020357604061142c6124ca565b9160043581525f516020613a0d5f395f51905f52602052209060018060a01b03165f52602052602060ff60405f2054166040519015158152f35b503461020357611475366124e0565b9061148294939294612c46565b61148a612c7e565b8415611622576001600160a01b038216938415611613576114a9612ce6565b506040516323b872dd60e01b6020820152336024820152306044820152606480820188905281526001600160a01b038516906114ea90610530608482612539565b7f00000000000000000000000046850ad61c2b7d64d08c9c754f452545966969846001600160a01b031681146115cf577f00000000000000000000000056adba107da1cb73e423c19ec7685e8312d0ef046001600160a01b0316906115529088908390613383565b61157d7f000000000000000000000000000000000000000000000000000000e8d4a5100080946128ce565b5f1981019081116115bb5782916115968560209361320a565b908984896106068260405198899788968795631999d1c560e31b875260048701612ca5565b634e487b7160e01b83526011600452602483fd5b505050905f5160206139ad5f395f51905f5261037293926020956106397f000000000000000000000000000000000000000000000000000000e8d4a51000826127e0565b63e6c4247b60e01b8152600490fd5b63162908e360e11b8452600484fd5b50346102035780600319360112610203575f51602061390d5f395f51905f52541580611743575b15611706576116aa9061166961262a565b906116726126e6565b9060206116b8604051936116868386612539565b8385525f368137604051968796600f60f81b885260e08589015260e0880190612490565b908682036040880152612490565b904660608601523060808601528260a086015284820360c08601528080855193848152019401925b8281106116ef57505050500390f35b8351855286955093810193928101926001016116e0565b60405162461bcd60e51b81526020600482015260156024820152741152540dcc4c8e88155b9a5b9a5d1a585b1a5e9959605a1b6044820152606490fd5b505f516020613acd5f395f51905f525415611658565b5034610203578060031936011261020357611772612b91565b61177a612c7e565b600160ff195f516020613a2d5f395f51905f525416175f516020613a2d5f395f51905f52557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a180f35b50346102035760203660031901126102035760406020916117eb6124b4565b6001600160a01b031681525f51602061398d5f395f51905f5283522054604051908152f35b50346102035780600319360112610203576040517f00000000000000000000000056adba107da1cb73e423c19ec7685e8312d0ef046001600160a01b03168152602090f35b50346102035780600319360112610203575061138f604051611878604082612539565b6003815262312e3560e81b6020820152604051918291602083526020830190612490565b5034610203576020366003190112610203576020906040906001600160a01b036118c46124b4565b1681525f51602061384d5f395f51905f5283522054604051908152f35b5034610203578060031936011261020357602060ff5f516020613a2d5f395f51905f5254166040519015158152f35b346103db575f3660031901126103db577f0000000000000000000000000b2b2b2076d95dda7817e785989fe353fe955ef96001600160a01b0381163303611a5657611959612ce6565b906119a96119a261198b7f000000000000000000000000000000000000000000000000000000e8d4a51000809561320a565b935f5f51602061394d5f395f51905f5255846127e0565b809261314d565b7f0000000000000000000000009ddfd49ac4689cf894203794d792dcb38e4b1a9e6001600160a01b031691823b156103db575f92602484926040519586938492636ee3193160e11b845260048401525af1918215611a4b57602092611a3b575b507f8e55ccfc9778ff8eba1646d765cf1982537ce0f9257054a17b48aad74525018382604051838152a1604051908152f35b5f611a4591612539565b5f611a09565b6040513d5f823e3d90fd5b63e6c4247b60e01b5f5260045ffd5b346103db5760403660031901126103db57611a7e6124b4565b602435611a89612c7e565b7f000000000000000000000000ffa10065ce1d1c42fabc46e06b84ed8ffeb4bae56001600160a01b03163303611a5657611ac681611ada9361314d565b5f5160206137ed5f395f51905f52546128f9565b5f5160206137ed5f395f51905f5255005b346103db575f3660031901126103db57611b03612b91565b5f516020613a2d5f395f51905f525460ff811615611b5a5760ff19165f516020613a2d5f395f51905f52557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b638dfc202b60e01b5f5260045ffd5b346103db5760403660031901126103db57611b826124ca565b336001600160a01b03821603611ba057611b9e906004356130b1565b005b63334bd91960e11b5f5260045ffd5b346103db575f3660031901126103db576020611bc96134cf565b604051908152f35b346103db575f3660031901126103db57602060405160128152f35b346103db5760403660031901126103db57611b9e600435611c0b6124ca565b90611c18610704826128db565b613020565b346103db5760203660031901126103db576020611bc96004356128db565b346103db5760603660031901126103db57611c546124b4565b611c5c6124ca565b60443590611c6983612780565b335f9081526020919091526040902054925f198410611c8d575b6112739350612e8e565b828410611cf8576001600160a01b03811615611ce5573315611cd25761127393611cb682612780565b60018060a01b0333165f526020528360405f2091039055611c83565b634a1406b160e11b5f525f60045260245ffd5b63e602df0560e01b5f525f60045260245ffd5b8284637dc7a0d960e11b5f523360045260245260445260645ffd5b346103db575f3660031901126103db576020611bc9611d306127f3565b611d3d8382015191612d48565b906128ce565b346103db5760203660031901126103db576004356001600160401b0381116103db57366023820112156103db57806004013590611d7f8261255c565b90611d8d6040519283612539565b82825260208201906024829460061b820101903682116103db57602401915b818310611fb1575050507f0000000000000000000000009ddfd49ac4689cf894203794d792dcb38e4b1a9e6001600160a01b03163303611a56575f5b8151811015611e3657611dfb81836127b8565b5151158015611e20575b611e1157600101611de8565b630e52390960e41b5f5260045ffd5b506020611e2d82846127b8565b51015115611e05565b50611e3f612ce6565b508051600160401b8111611f9d575f5160206137cd5f395f51905f5254815f5160206137cd5f395f51905f5255808210611f2a575b505f5160206137cd5f395f51905f525f9081525f516020613a6d5f395f51905f52845b838310611f0a57858560405190602082019060208352518091526040820192905f5b818110611ee8577f32097a566ecff4023822f259bdbea3602ab6e2daee87a84c3dc0aa9108222a0884860385a1005b8251805186526020908101518187015260409095019490920191600101611eb9565b600260208281600194518051875501518486015501920192019190611e97565b6001600160ff1b0381168103611f89576001600160ff1b0382168203611f89575f5160206137cd5f395f51905f525f5260205f209060011b8101908260011b015b818110611f785750611e74565b5f8082556001820155600201611f6b565b634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52604160045260245ffd5b6040833603126103db5760206040918251611fcb8161251e565b853581528286013583820152815201920191611dac565b346103db575f3660031901126103db5760205f5160206138cd5f395f51905f5254604051908152f35b346103db57612019366124e0565b909192612024612c46565b61202c612c7e565b83156121a8576001600160a01b038216918215611a565761204b612ce6565b506120568533613228565b6001600160a01b03828116947f00000000000000000000000046850ad61c2b7d64d08c9c754f452545966969849182168614612164575f8092602092826120bd7f000000000000000000000000000000000000000000000000000000e8d4a510008c61320a565b7f00000000000000000000000056adba107da1cb73e423c19ec7685e8312d0ef046001600160a01b0316936120f59082908690613383565b612116604051978896879586946317b178b360e31b86528d60048701612ca5565b03925af1908115611a4b575f916103ae57506020956103725f51602061380d5f395f51905f529361036d93978894859261035f60405194859263a9059cbb60e01b8f85015260248401613368565b505061036d6020956103725f51602061380d5f395f51905f529361043a7f000000000000000000000000000000000000000000000000000000e8d4a510008461320a565b63162908e360e11b5f5260045ffd5b346103db5760403660031901126103db576121d06124b4565b602435908115158092036103db57335f9081527fa4444b324116f496357b4fac8227ad63bed8ee53a87b9fb37937afb1d9de7916602052604090205460ff161561226e5760207f6a12b3df6cba4203bd7fd06b816789f87de8c594299aed5717ae070fac781bac9160018060a01b031692835f525f5160206138ad5f395f51905f52825260405f2060ff1981541660ff8316179055604051908152a2005b63e2517d3f60e01b5f52336004527f750555ed2187fef9a15b1b2d80b65634c266437a86c68f049ea8b5da4a2bd96d60245260445ffd5b346103db575f3660031901126103db5760205f5160206137ed5f395f51905f5254604051908152f35b346103db5760403660031901126103db576112736122ea6124b4565b6024359033613305565b346103db575f3660031901126103db576040515f5f51602061382d5f395f51905f5254612320816125f2565b808452906001811690811561239f5750600114612348575b61138f8361137b81850382612539565b5f51602061382d5f395f51905f525f9081525f5160206137ad5f395f51905f52939250905b8082106123855750909150810160200161137b612338565b91926001816020925483858801015201910190929161236d565b60ff191660208086019190915291151560051b8401909101915061137b9050612338565b346103db5760203660031901126103db576004359063ffffffff60e01b82168092036103db576020916336372b0760e01b811490811561247f575b811561246e575b811561245d575b811561244c575b8115612421575b5015158152f35b637965db0b60e01b81149150811561243b575b508361241a565b6301ffc9a760e01b14905083612434565b6342580cb760e11b81149150612413565b634ec7fbed60e11b8114915061240c565b63dd0390b560e01b81149150612405565b6305ee4a3b60e11b811491506123fe565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b600435906001600160a01b03821682036103db57565b602435906001600160a01b03821682036103db57565b60809060031901126103db576004356001600160a01b03811681036103db579060243590604435906064356001600160a01b03811681036103db5790565b604081019081106001600160401b03821117611f9d57604052565b601f909101601f19168101906001600160401b03821190821017611f9d57604052565b6001600160401b038111611f9d5760051b60200190565b9060a06003198301126103db576004356001600160a01b03811681036103db579160243591604435916064356001600160a01b03811681036103db57916084356001600160401b0381116103db57826023820112156103db576004810135926001600160401b0384116103db57602484830101116103db576024019190565b90600182811c92168015612620575b602083101461260c57565b634e487b7160e01b5f52602260045260245ffd5b91607f1691612601565b604051905f825f51602061386d5f395f51905f525491612649836125f2565b80835292600181169081156126c7575060011461266f575b61266d92500383612539565b565b505f51602061386d5f395f51905f525f90815290915f51602061396d5f395f51905f525b8183106126ab57505090602061266d92820101612661565b6020919350806001915483858901015201910190918492612693565b6020925061266d94915060ff191682840152151560051b820101612661565b604051905f825f5160206138ed5f395f51905f525491612705836125f2565b80835292600181169081156126c757506001146127285761266d92500383612539565b505f5160206138ed5f395f51905f525f90815290915f516020613aed5f395f51905f525b81831061276457505090602061266d92820101612661565b602091935080600191548385890101520191019091849261274c565b6001600160a01b03165f9081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace016020526040902090565b80518210156127cc5760209160051b010190565b634e487b7160e01b5f52603260045260245ffd5b81810292918115918404141715611f8957565b60405190606082016001600160401b03811183821017611f9d57604052815f5160206137cd5f395f51905f52546128298161255c565b906128376040519283612539565b8082525f5160206137cd5f395f51905f525f9081525f516020613a6d5f395f51905f52602084015b8383106128a157505050908252505f51602061394d5f395f51905f525460208201525f5160206139cd5f395f51905f52546001600160401b0316604090910152565b600260206001926040516128b48161251e565b85548152848601548382015281520192019201919061285f565b91908201809211611f8957565b5f525f516020613a0d5f395f51905f52602052600160405f20015490565b91908203918211611f8957565b60405190612915604083612539565b6005825264555344616960d81b6020830152565b908160209103126103db575180151581036103db5790565b5f80525f5160206138ad5f395f51905f526020527f2644e827c0313faa38c02ad716a63f96883905325fda6743d0a16474c5e4f8385460ff16612a605761a4b14603612a5c5760405163fe575a8760e01b81525f600482015260208160248173af88d065e77c8cc2239327c5edb3a432268e58315afa908115611a4b575f91612a3d575b5080156129cf5790565b5060405163fbac395160e01b81525f600482015260208160248173fd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb95afa908115611a4b575f91612a11575090565b612a33915060203d602011612a36575b612a2b8183612539565b810190612929565b90565b503d612a21565b612a56915060203d602011612a3657612a2b8183612539565b5f6129c5565b5f90565b600190565b6001600160a01b03165f8181525f5160206138ad5f395f51905f52602052604090205460ff16612b8b5761a4b14603612b6957730b2b2b2076d95dda7817e785989fe353fe955ef981148015612b6e575b612b695760405163fe575a8760e01b8152600481018290529060208260248173af88d065e77c8cc2239327c5edb3a432268e58315afa918215611a4b575f92612b48575b508115612b05575090565b90506040519063fbac395160e01b8252600482015260208160248173fd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb95afa908115611a4b575f91612a11575090565b612b6291925060203d602011612a3657612a2b8183612539565b905f612afa565b505f90565b507324a92e28a8c5d8812dcfaf44bcb20cc0babd13928114612ab6565b50600190565b335f9081527f20564623c340898287df7920e31a390c34a65bf4ab6fd3ad283beda989f363b7602052604090205460ff1615612bc957565b63e2517d3f60e01b5f52336004527f5abc35f3ddf4502abf40df80a9ee922191cea883919dcc4c1fdc7afe4464f22260245260445ffd5b5f8181525f516020613a0d5f395f51905f526020908152604080832033845290915290205460ff1615612c305750565b63e2517d3f60e01b5f523360045260245260445ffd5b60025f516020613a8d5f395f51905f525414612c6f5760025f516020613a8d5f395f51905f5255565b633ee5aeb560e01b5f5260045ffd5b60ff5f516020613a2d5f395f51905f525416612c9657565b63d93c066560e01b5f5260045ffd5b93909285939260a09693600180891b031686526020860152604085015260806060850152816080850152848401375f828201840152601f01601f1916010190565b612d0d612cf9612cf46127f3565b612d48565b5f51602061394d5f395f51905f52546128ce565b5f51602061394d5f395f51905f528190555f5160206139cd5f395f51905f5280546001600160401b031916426001600160401b031617905590565b60408101519091906001600160401b03168015612e8857612d6990426128f9565b8015612e88576040516370a0823160e01b81523060048201526020816024817f00000000000000000000000046850ad61c2b7d64d08c9c754f452545966969846001600160a01b03165afa8015611a4b575f90612e54575b612ded91507f000000000000000000000000000000000000000000000000000000e8d4a51000906127e0565b5f91825b85518051851015612e4c5786612e3d600193611d3d612e3787612e308b6020612e1d82612e439b6127b8565b5101518c818082109118021897516127b8565b51516127e0565b8461343a565b946128f9565b93019291612df1565b509450505050565b506020813d602011612e80575b81612e6e60209383612539565b810103126103db57612ded9051612dc1565b3d9150612e61565b505f9150565b916001600160a01b038316918215612f9c576001600160a01b038116938415612f8957612eba33612a65565b612f7657612ec790612a65565b612f6357612ed490612a65565b612f6357815f525f51602061384d5f395f51905f5260205260405f2054818110612f4a57815f5160206139ed5f395f51905f5292602092855f525f51602061384d5f395f51905f5284520360405f2055845f525f51602061384d5f395f51905f52825260405f20818154019055604051908152a3565b8263391434e360e21b5f5260045260245260445260645ffd5b8263d33f19e760e01b5f5260045260245ffd5b63d33f19e760e01b5f523360045260245ffd5b63ec442f0560e01b5f525f60045260245ffd5b634b637e8f60e11b5f525f60045260245ffd5b6001600160a01b0381165f9081525f51602061392d5f395f51905f52602052604090205460ff16612b69576001600160a01b03165f8181525f51602061392d5f395f51905f5260205260408120805460ff191660011790553391905f51602061378d5f395f51905f528180a4600190565b5f8181525f516020613a0d5f395f51905f52602090815260408083206001600160a01b038616845290915290205460ff166130ab575f8181525f516020613a0d5f395f51905f52602090815260408083206001600160a01b0395909516808452949091528120805460ff19166001179055339291905f51602061378d5f395f51905f529080a4600190565b50505f90565b5f8181525f516020613a0d5f395f51905f52602090815260408083206001600160a01b038616845290915290205460ff16156130ab575f8181525f516020613a0d5f395f51905f52602090815260408083206001600160a01b0395909516808452949091528120805460ff19169055339291907ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9080a4600190565b6001600160a01b03811691908215612f895761316833612a65565b612f7657613174612941565b6131f75761318190612a65565b6131e4575f5160206139ed5f395f51905f526020826131af5f945f5160206138cd5f395f51905f52546128ce565b5f5160206138cd5f395f51905f52558484525f51602061384d5f395f51905f52825260408420818154019055604051908152a3565b5063d33f19e760e01b5f5260045260245ffd5b63d33f19e760e01b5f525f60045260245ffd5b8115613214570490565b634e487b7160e01b5f52601260045260245ffd5b9091906001600160a01b038116908115612f9c5761324533612a65565b612f765761325290612a65565b6132f35761325e612941565b6131f757805f525f51602061384d5f395f51905f5260205260405f20548381106132d9576020845f94955f5160206139ed5f395f51905f52938587525f51602061384d5f395f51905f528452036040862055805f5160206138cd5f395f51905f5254035f5160206138cd5f395f51905f5255604051908152a3565b915063391434e360e21b5f5260045260245260445260645ffd5b63d33f19e760e01b5f5260045260245ffd5b916001600160a01b038316918215611ce5576001600160a01b0316928315611cd2577f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591613354602092612780565b855f5282528060405f2055604051908152a3565b6001600160a01b039091168152602081019190915260400190565b91909160205f604051936133ba856133ac8582019363095ea7b360e01b85528960248401613368565b03601f198101875286612539565b84519082855af15f513d82613415575b5050156133d657505050565b60405163095ea7b360e01b60208201526001600160a01b0390931660248401525f604480850191909152835261266d9261036d90610530606482612539565b90915061343257506001600160a01b0381163b15155b5f806133ca565b60011461342b565b9190915f838202915f19858209918380841093039280840393146134bc5782670de0b6b3a764000011156134aa57507faccb18165bd6fe31ae1cf318dc5b51eee0e1ba569b88cd74c1773b91fac106699394670de0b6b3a7640000910990828211900360ee1b910360121c170290565b634e487b71905260116020526024601cfd5b505050670de0b6b3a76400009192500490565b6134d7613703565b6134df61375a565b6040519060208201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8452604083015260608201524660808201523060a082015260a0815261353060c082612539565b51902090565b9061355a575080511561354b57805190602001fd5b63d6bda27560e01b5f5260045ffd5b8151158061358b575b61356b575090565b639996b31560e01b5f9081526001600160a01b0391909116600452602490fd5b50803b15613563565b60ff5f516020613aad5f395f51905f525460401c16156135b057565b631afcd79f60e31b5f5260045ffd5b91906fa2a8918ca85bafe22016d0b997e4df60600160ff1b03841161362c579160209360809260ff5f9560405194855216868401526040830152606082015282805260015afa15611a4b575f516001600160a01b0381161561362257905f905f90565b505f906001905f90565b5050505f9160039190565b60048110156136975780613649575050565b600181036136605763f645eedf60e01b5f5260045ffd5b6002810361367b575063fce698f760e01b5f5260045260245ffd5b6003146136855750565b6335e2f38360e21b5f5260045260245ffd5b634e487b7160e01b5f52602160045260245ffd5b905f602091828151910182855af115611a4b575f513d6136fa57506001600160a01b0381163b155b6136da5750565b635274afe760e01b5f9081526001600160a01b0391909116600452602490fd5b600114156136d3565b61370b61262a565b805190811561371b576020012090565b50505f51602061390d5f395f51905f525480156137355790565b507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47090565b6137626126e6565b8051908115613772576020012090565b50505f516020613acd5f395f51905f52548015613735579056fe2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d2ae08a8e29253f69ac5d979a101956ab8f8d9d7ded63fa7a83b16fc47648eab0ad76c5b481cb106971e0ae4c23a09cb5b1dc9dba5fad96d9694630df5e8539005fc387bd350b82c09f22bee4c04d61669980ce519c352560e36bc6144f9cf800144f5f62c08d623a6f383205dc8d5ef825b693748e2977846e18121b6780413a52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0352c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace00a16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10252c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace04d21f45001ca28b8905ef527bd860800b2646ce7faf578b00aa2e89af2355150052c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace02a16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d103a16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100b7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97dad76c5b481cb106971e0ae4c23a09cb5b1dc9dba5fad96d9694630df5e85390142ad5d3e1f2e6e70edcf6d991b8a3023d3fca8047a131592f9edb9fd9b89d57d5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb00b045190548dadae679cfe9e337437613ca6dd73efdf984f75e56f152ccee22f0ad76c5b481cb106971e0ae4c23a09cb5b1dc9dba5fad96d9694630df5e853902ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800cd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330046a2803e59a4de4e7a4c574b1243f25977ac4c77d5a1a4a609b5394cebb4a2aa1fcca439e03ee443c57a23e572b9a992d0b45f304247f4f5b88a3e0c593c2c609b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00a16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1015f9ce34815f8e11431c7bb75a8e6886a91478f7ffc1dbb0a98dc240fddd76b75a2646970667358221220f433aff687d665e7312144b940601fa10cf898368380c9aebfc691e412fbbb2a64736f6c634300081d0033","optimization_enabled":true,"verified_twin_address_hash":null,"is_verified":true,"github_repository_metadata":null,"compiler_settings":{"evmVersion":"cancun","libraries":{},"metadata":{"appendCBOR":true,"bytecodeHash":"ipfs","useLiteralContent":false},"optimizer":{"enabled":true,"runs":1},"outputSelection":{"*":{"":["*"],"*":["*"]}},"remappings":["ds-test/=lib/forge-std/lib/ds-test/src/","forge-std/=lib/forge-std/src/","lib/forge-std:ds-test/=lib/forge-std/lib/ds-test/src/","@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/","@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/","@uniswap/v3-periphery/=lib/uniswap-v3-periphery/","@uniswap/v3-core/=lib/uniswap-v3-core/","@uniswap/swap-router-contracts/=lib/uniswap-swap-router-contracts/","@layerzerolabs/lz-evm-protocol-v2/=lib/layerzero/packages/layerzero-v2/evm/protocol/","@layerzerolabs/lz-evm-oapp-v2/=lib/layerzero/packages/layerzero-v2/evm/oapp/","@layerzerolabs/test-devtools-evm-foundry/=lib/layerzero-devtools/packages/test-devtools-evm-foundry/","@layerzerolabs/lz-evm-messagelib-v2/=lib/layerzero/packages/layerzero-v2/evm/messagelib/","@layerzerolabs/lz-evm-v1-0.7/=lib/layerzero-v1/","solidity-bytes-utils/=lib/solidity-bytes-utils/","@usdai-loan-router-contracts/=lib/usdai-loan-router-contracts/src/","erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/","halmos-cheatcodes/=lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/","layerzero-devtools/=lib/layerzero-devtools/packages/toolbox-foundry/src/","layerzero-v1/=lib/layerzero-v1/contracts/","layerzero/=lib/layerzero/","metastreet-contracts-v2/=lib/metastreet-contracts-v2/contracts/","openzeppelin-contracts-upgradeable-v4.9/=lib/openzeppelin-contracts-upgradeable-v4.9/","openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/","openzeppelin-contracts-v4.9/=lib/openzeppelin-contracts-v4.9/","openzeppelin-contracts/=lib/openzeppelin-contracts/","openzeppelin/=lib/openzeppelin-contracts-upgradeable-v4.9/contracts/","uniswap-swap-router-contracts/=lib/uniswap-swap-router-contracts/contracts/","uniswap-v3-core/=lib/uniswap-v3-core/","uniswap-v3-periphery/=lib/uniswap-v3-periphery/contracts/","usdai-loan-router-contracts/=lib/usdai-loan-router-contracts/","lib/openzeppelin-contracts:ds-test/=lib/usdai-loan-router-contracts/lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/","lib/openzeppelin-contracts:forge-std/=lib/usdai-loan-router-contracts/lib/openzeppelin-contracts/lib/forge-std/src/","lib/openzeppelin-contracts:openzeppelin/=lib/usdai-loan-router-contracts/lib/openzeppelin-contracts/contracts/"],"viaIR":true},"optimization_runs":1,"sourcify_repo_url":null,"decoded_constructor_args":[["0x56adba107dA1cB73E423c19EC7685E8312d0Ef04",{"internalType":"address","name":"swapAdapter_","type":"address"}],["0x9Ddfd49AC4689CF894203794d792dcB38E4b1A9E",{"internalType":"address","name":"baseYieldEscrow_","type":"address"}],["0x0B2b2B2076d95dda7817e785989fE353fe955ef9",{"internalType":"address","name":"baseYieldRecipient_","type":"address"}],["0xffA10065Ce1d1C42FABc46e06B84Ed8FfEb4baE5",{"internalType":"address","name":"bridgeAdapter_","type":"address"}]],"compiler_version":"v0.8.29+commit.ab55807c","is_verified_via_verifier_alliance":false,"verified_at":"2026-04-27T16:06:22.554077Z","implementations":[],"proxy_type":null,"external_libraries":[],"creation_bytecode":"0x610140806040523461028057608081613f2280380380916100208285610374565b83398101031261028057610033816103ab565b90610040602082016103ab565b6100586060610051604085016103ab565b93016103ab565b925f516020613f025f395f51905f525460ff8160401c16610365576004916020916002600160401b03196001600160401b03821601610310575b506001600160a01b0316608081905260405163c55dae6360e01b815292839182905afa90811561028c575f916102d6575b506001600160a01b0390811660a05260805160405163c55dae6360e01b81529160209183916004918391165afa90811561028c575f91610297575b5060405163313ce56760e01b815290602090829060049082906001600160a01b03165afa801561028c575f9061024b575b60ff91501660120360ff81116102375760ff16604d811161023757600a0a60c0526001600160a01b031660e0526101005261012052604051613b4290816103c082396080518181816102cc015281816105680152818161151c0152818161182601526120bf015260a0518181816102620152818161053801528181610883015281816114ec015281816120640152612d8a015260c05181818161029901528181610415015281816105a3015281816106b201528181611557015281816115ee0152818161196501528181612098015281816121830152612dc8015260e0518181816119ab0152611db8015261010051816119220152610120518181816112c20152611a8b0152f35b634e487b7160e01b5f52601160045260245ffd5b506020813d602011610284575b8161026560209383610374565b81010312610280575160ff811681036102805760ff9061012f565b5f80fd5b3d9150610258565b6040513d5f823e3d90fd5b90506020813d6020116102ce575b816102b260209383610374565b810103126102805760206102c76004926103ab565b91506100fe565b3d91506102a5565b90506020813d602011610308575b816102f160209383610374565b8101031261028057610302906103ab565b5f6100c3565b3d91506102e4565b6001600160401b0319166001600160401b039081175f516020613f025f395f51905f52556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2908390a15f610092565b63f92ee8a960e01b5f5260045ffd5b601f909101601f19168101906001600160401b0382119082101761039757604052565b634e487b7160e01b5f52604160045260245ffd5b51906001600160a01b03821682036102805756fe6080806040526004361015610012575f80fd5b5f905f3560e01c90816301ffc9a7146123c35750806306fdde03146122f4578063095ea7b3146122ce57806311c301e0146122a5578063153b0d1e146121b757806316762eed1461200b57806318160ddd14611fe25780631a10bf8814611d435780631d63e61a14611d1357806323b872dd14611c3b578063248a9ca314611c1d5780632f2ff15d14611bec578063313ce56714611bd15780633644e51514611baf57806336568abe14611b695780633f4ba83a14611aeb57806340c10f1914611a655780634641257d146119105780635c975abb146118e157806370a082311461189c578063754b377c1461185557806377bb1eb9146118105780637ecebe00146117cc5780638456cb591461175957806384b0196e146116315780638b6099db1461146657806391d148541461141057806395d89b41146113245780639dc29fac1461129a578063a217fddf1461127e578063a9059cbb1461124c578063ac9650d81461101f578063c4d66de8146108b2578063c55dae631461086d578063d505accf14610712578063d547741f146106d7578063d97e6ec0146104aa578063dd62ed3e14610462578063fdd2b4af146102065763fe575a87146101d6575f80fd5b346102035760203660031901126102035760206101f96101f46124b4565b612a65565b6040519015158152f35b80fd5b50346102035761021536612573565b9492939590610222612c46565b61022a612c7e565b8615610453576001600160a01b03831694851561044457610249612ce6565b506102548833613228565b6001600160a01b03858116977f000000000000000000000000000000000000000000000000000000000000000091821689146103f357602092919085886103106102be7f00000000000000000000000000000000000000000000000000000000000000008f61320a565b936102f38560018060a01b037f0000000000000000000000000000000000000000000000000000000000000000168098613383565b6040516317b178b360e31b81529889978896879560048701612ca5565b03925af19182156103e757916103ae575b506020956103725f51602061380d5f395f51905f529361036d9397889485925b61035f60405194859263a9059cbb60e01b8f85015260248401613368565b03601f198101845283612539565b6136ab565b604080516001600160a01b0395909516855260208501919091528301523391606090a360015f516020613a8d5f395f51905f5255604051908152f35b9190506020823d6020116103df575b816103ca60209383612539565b810103126103db5790516020610321565b5f80fd5b3d91506103bd565b604051903d90823e3d90fd5b505050505061036d6020956103725f51602061380d5f395f51905f529361043a7f00000000000000000000000000000000000000000000000000000000000000008461320a565b9788948592610341565b63e6c4247b60e01b8352600483fd5b63162908e360e11b8252600482fd5b50346102035760403660031901126102035761047c6124b4565b61048d6104876124ca565b91612780565b9060018060a01b03165f52602052602060405f2054604051908152f35b5034610203576104b936612573565b949395906104c8939293612c46565b6104d0612c7e565b8615610453576001600160a01b038416958615610444576104ef612ce6565b506040516323b872dd60e01b602082015233602482015230604482015260648082018a905281526001600160a01b0387169061053690610530608482612539565b826136ab565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168114610691577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169061059e908a908390613383565b6105c97f000000000000000000000000000000000000000000000000000000000000000080966128ce565b5f19810190811161067d57908985896106066105e88a6020989761320a565b9560405198899788968795631999d1c560e31b875260048701612ca5565b03925af19182156103e75791610642575b50916020956106395f5160206139ad5f395f51905f52936103729796956127e0565b9586809361314d565b94939290506020853d602011610675575b8161066060209383612539565b810103126103db579351929391926020610617565b3d9150610653565b634e487b7160e01b85526011600452602485fd5b5050505050905f5160206139ad5f395f51905f5261037293926020956106397f0000000000000000000000000000000000000000000000000000000000000000826127e0565b50346102035760403660031901126102035761070e6004356106f76124ca565b90610709610704826128db565b612c00565b6130b1565b5080f35b50346102035760e03660031901126102035761072c6124b4565b906107356124ca565b604435906064359360843560ff81168103610869578542116108555761081561081e9160018060a01b038416978888525f51602061398d5f395f51905f5260205260408820908154916001830190556040519060208201927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c984528b604084015260018060a01b038916606084015289608084015260a083015260c082015260c081526107e360e082612539565b5190206107ee6134cf565b906040519161190160f01b83526002830152602282015260c43591604260a43592206135bf565b90929192613637565b6001600160a01b03169480860361083e575061083b939450613305565b80f35b6325c0072360e11b85526004869052602452604484fd5b63313c898160e11b85526004869052602485fd5b8480fd5b50346102035780600319360112610203576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b5034610203576020366003190112610203576108cc6124b4565b5f516020613aad5f395f51905f5254604081901c60ff161592906001600160401b03811680159081611017575b600114908161100d575b159081611004575b50610ff5576001600160401b031981166001175f516020613aad5f395f51905f525583610fcd575b5061093c612906565b92610945612906565b9361094e613594565b610956613594565b8051906001600160401b038211610cd35781906109805f51602061382d5f395f51905f52546125f2565b601f8111610f66575b50602090601f8311600114610eea578592610edf575b50508160011b915f199060031b1c1916175f51602061382d5f395f51905f52555b83516001600160401b038111610ecb576109e75f51602061388d5f395f51905f52546125f2565b601f8111610e6f575b50602094601f8211600114610df4579483949582939492610de9575b50508160011b915f199060031b1c1916175f51602061388d5f395f51905f52555b610a35612906565b92610a3e613594565b60405193610a4d604086612539565b60018552603160f81b6020860152610a63613594565b8051906001600160401b038211610dd5578190610a8d5f51602061386d5f395f51905f52546125f2565b601f8111610d6e575b50602090601f8311600114610cf2578692610ce7575b50508160011b915f199060031b1c1916175f51602061386d5f395f51905f52555b83516001600160401b038111610cd357610af45f5160206138ed5f395f51905f52546125f2565b601f8111610c77575b506020601f8211600114610bf75781908596610b91959692610bec575b50508160011b915f199060031b1c1916175f5160206138ed5f395f51905f52555b835f51602061390d5f395f51905f5255835f516020613acd5f395f51905f5255610b63613594565b610b6b613594565b610b73613594565b60015f516020613a8d5f395f51905f5255610b8c613594565b612faf565b50610b995780f35b60ff60401b195f516020613aad5f395f51905f5254165f516020613aad5f395f51905f52557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a180f35b015190505f80610b1a565b5f5160206138ed5f395f51905f52855280852095601f198316865b818110610c5f575091610b9195969791846001959410610c47575b505050811b015f5160206138ed5f395f51905f5255610b3b565b01515f1960f88460031b161c191690555f8080610c2d565b83830151895560019098019760209384019301610c12565b5f5160206138ed5f395f51905f5285525f516020613aed5f395f51905f52601f830160051c81019160208410610cc9575b601f0160051c01905b818110610cbe5750610afd565b858155600101610cb1565b9091508190610ca8565b634e487b7160e01b84526041600452602484fd5b015190505f80610aac565b5f51602061386d5f395f51905f5287528187209250601f198416875b818110610d565750908460019594939210610d3e575b505050811b015f51602061386d5f395f51905f5255610acd565b01515f1960f88460031b161c191690555f8080610d24565b92936020600181928786015181550195019301610d0e565b5f51602061386d5f395f51905f5287529091505f51602061396d5f395f51905f52601f840160051c81019160208510610dcb575b90601f859493920160051c01905b818110610dbd5750610a96565b878155849350600101610db0565b9091508190610da2565b634e487b7160e01b85526041600452602485fd5b015190505f80610a0c565b601f198216955f51602061388d5f395f51905f52855280852091855b888110610e5757508360019596979810610e3f575b505050811b015f51602061388d5f395f51905f5255610a2d565b01515f1960f88460031b161c191690555f8080610e25565b91926020600181928685015181550194019201610e10565b5f51602061388d5f395f51905f5284525f516020613a4d5f395f51905f52601f830160051c81019160208410610ec1575b601f0160051c01905b818110610eb657506109f0565b848155600101610ea9565b9091508190610ea0565b634e487b7160e01b83526041600452602483fd5b015190505f8061099f565b5f51602061382d5f395f51905f5286528186209250601f198416865b818110610f4e5750908460019594939210610f36575b505050811b015f51602061382d5f395f51905f52556109c0565b01515f1960f88460031b161c191690555f8080610f1c565b92936020600181928786015181550195019301610f06565b5f51602061382d5f395f51905f5286529091505f5160206137ad5f395f51905f52601f840160051c81019160208510610fc3575b90601f859493920160051c01905b818110610fb55750610989565b868155849350600101610fa8565b9091508190610f9a565b6001600160481b0319166001600160401b01175f516020613aad5f395f51905f52555f610933565b63f92ee8a960e01b8252600482fd5b9050155f61090b565b303b159150610903565b8591506108f9565b5034610203576020366003190112610203576004356001600160401b0381116111da57366023820112156111da5760048101356001600160401b0381116111d6573660248260051b840101116111d65790602060405161107f8282612539565b848152818101601f1983013682376110968561255c565b936110a46040519586612539565b858552601f196110b38761255c565b01875b81811061123d575050368190036042190190875b878110156111de578860248260051b84010135848112156111da5783016024810135906001600160401b0382116111d65760440181360381136111d6578661113c84938b6040519382859383850197883783018281018881528e519283915e010185815203601f198101835282612539565b5190305af4893d156111c357503d906001600160401b0382116111af579161118d6001928c98979695948a601f19601f840116019161117e6040519384612539565b82523d8a8c84013e5b30613536565b611197828b6127b8565b526111a2818a6127b8565b50019091929394506110ca565b634e487b7160e01b8b52604160045260248bfd5b959493929161118d600192606090611187565b8280fd5b5080fd5b85898860405191838301848452825180915260408401948060408360051b870101940192955b8287106112115785850386f35b90919293828061122d600193603f198a82030186528851612490565b9601920196019592919092611204565b606087820187015285016110b6565b5034610203576040366003190112610203576112736112696124b4565b6024359033612e8e565b602060405160018152f35b5034610203578060031936011261020357602090604051908152f35b5034610203576040366003190112610203576112b46124b4565b602435906112c0612c7e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361044457906112fe8161131293613228565b5f5160206137ed5f395f51905f52546128ce565b5f5160206137ed5f395f51905f525580f35b503461020357806003193601126102035760405190805f51602061388d5f395f51905f525490611353826125f2565b80855291600181169081156113e95750600114611393575b61138f8461137b81860382612539565b604051918291602083526020830190612490565b0390f35b5f51602061388d5f395f51905f5281525f516020613a4d5f395f51905f52939250905b8082106113cf5750909150810160200161137b8261136b565b9192600181602092548385880101520191019092916113b6565b60ff191660208087019190915292151560051b8501909201925061137b915083905061136b565b503461020357604036600319011261020357604061142c6124ca565b9160043581525f516020613a0d5f395f51905f52602052209060018060a01b03165f52602052602060ff60405f2054166040519015158152f35b503461020357611475366124e0565b9061148294939294612c46565b61148a612c7e565b8415611622576001600160a01b038216938415611613576114a9612ce6565b506040516323b872dd60e01b6020820152336024820152306044820152606480820188905281526001600160a01b038516906114ea90610530608482612539565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681146115cf577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906115529088908390613383565b61157d7f000000000000000000000000000000000000000000000000000000000000000080946128ce565b5f1981019081116115bb5782916115968560209361320a565b908984896106068260405198899788968795631999d1c560e31b875260048701612ca5565b634e487b7160e01b83526011600452602483fd5b505050905f5160206139ad5f395f51905f5261037293926020956106397f0000000000000000000000000000000000000000000000000000000000000000826127e0565b63e6c4247b60e01b8152600490fd5b63162908e360e11b8452600484fd5b50346102035780600319360112610203575f51602061390d5f395f51905f52541580611743575b15611706576116aa9061166961262a565b906116726126e6565b9060206116b8604051936116868386612539565b8385525f368137604051968796600f60f81b885260e08589015260e0880190612490565b908682036040880152612490565b904660608601523060808601528260a086015284820360c08601528080855193848152019401925b8281106116ef57505050500390f35b8351855286955093810193928101926001016116e0565b60405162461bcd60e51b81526020600482015260156024820152741152540dcc4c8e88155b9a5b9a5d1a585b1a5e9959605a1b6044820152606490fd5b505f516020613acd5f395f51905f525415611658565b5034610203578060031936011261020357611772612b91565b61177a612c7e565b600160ff195f516020613a2d5f395f51905f525416175f516020613a2d5f395f51905f52557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a180f35b50346102035760203660031901126102035760406020916117eb6124b4565b6001600160a01b031681525f51602061398d5f395f51905f5283522054604051908152f35b50346102035780600319360112610203576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b50346102035780600319360112610203575061138f604051611878604082612539565b6003815262312e3560e81b6020820152604051918291602083526020830190612490565b5034610203576020366003190112610203576020906040906001600160a01b036118c46124b4565b1681525f51602061384d5f395f51905f5283522054604051908152f35b5034610203578060031936011261020357602060ff5f516020613a2d5f395f51905f5254166040519015158152f35b346103db575f3660031901126103db577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0381163303611a5657611959612ce6565b906119a96119a261198b7f0000000000000000000000000000000000000000000000000000000000000000809561320a565b935f5f51602061394d5f395f51905f5255846127e0565b809261314d565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691823b156103db575f92602484926040519586938492636ee3193160e11b845260048401525af1918215611a4b57602092611a3b575b507f8e55ccfc9778ff8eba1646d765cf1982537ce0f9257054a17b48aad74525018382604051838152a1604051908152f35b5f611a4591612539565b5f611a09565b6040513d5f823e3d90fd5b63e6c4247b60e01b5f5260045ffd5b346103db5760403660031901126103db57611a7e6124b4565b602435611a89612c7e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163303611a5657611ac681611ada9361314d565b5f5160206137ed5f395f51905f52546128f9565b5f5160206137ed5f395f51905f5255005b346103db575f3660031901126103db57611b03612b91565b5f516020613a2d5f395f51905f525460ff811615611b5a5760ff19165f516020613a2d5f395f51905f52557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b638dfc202b60e01b5f5260045ffd5b346103db5760403660031901126103db57611b826124ca565b336001600160a01b03821603611ba057611b9e906004356130b1565b005b63334bd91960e11b5f5260045ffd5b346103db575f3660031901126103db576020611bc96134cf565b604051908152f35b346103db575f3660031901126103db57602060405160128152f35b346103db5760403660031901126103db57611b9e600435611c0b6124ca565b90611c18610704826128db565b613020565b346103db5760203660031901126103db576020611bc96004356128db565b346103db5760603660031901126103db57611c546124b4565b611c5c6124ca565b60443590611c6983612780565b335f9081526020919091526040902054925f198410611c8d575b6112739350612e8e565b828410611cf8576001600160a01b03811615611ce5573315611cd25761127393611cb682612780565b60018060a01b0333165f526020528360405f2091039055611c83565b634a1406b160e11b5f525f60045260245ffd5b63e602df0560e01b5f525f60045260245ffd5b8284637dc7a0d960e11b5f523360045260245260445260645ffd5b346103db575f3660031901126103db576020611bc9611d306127f3565b611d3d8382015191612d48565b906128ce565b346103db5760203660031901126103db576004356001600160401b0381116103db57366023820112156103db57806004013590611d7f8261255c565b90611d8d6040519283612539565b82825260208201906024829460061b820101903682116103db57602401915b818310611fb1575050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163303611a56575f5b8151811015611e3657611dfb81836127b8565b5151158015611e20575b611e1157600101611de8565b630e52390960e41b5f5260045ffd5b506020611e2d82846127b8565b51015115611e05565b50611e3f612ce6565b508051600160401b8111611f9d575f5160206137cd5f395f51905f5254815f5160206137cd5f395f51905f5255808210611f2a575b505f5160206137cd5f395f51905f525f9081525f516020613a6d5f395f51905f52845b838310611f0a57858560405190602082019060208352518091526040820192905f5b818110611ee8577f32097a566ecff4023822f259bdbea3602ab6e2daee87a84c3dc0aa9108222a0884860385a1005b8251805186526020908101518187015260409095019490920191600101611eb9565b600260208281600194518051875501518486015501920192019190611e97565b6001600160ff1b0381168103611f89576001600160ff1b0382168203611f89575f5160206137cd5f395f51905f525f5260205f209060011b8101908260011b015b818110611f785750611e74565b5f8082556001820155600201611f6b565b634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52604160045260245ffd5b6040833603126103db5760206040918251611fcb8161251e565b853581528286013583820152815201920191611dac565b346103db575f3660031901126103db5760205f5160206138cd5f395f51905f5254604051908152f35b346103db57612019366124e0565b909192612024612c46565b61202c612c7e565b83156121a8576001600160a01b038216918215611a565761204b612ce6565b506120568533613228565b6001600160a01b03828116947f00000000000000000000000000000000000000000000000000000000000000009182168614612164575f8092602092826120bd7f00000000000000000000000000000000000000000000000000000000000000008c61320a565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316936120f59082908690613383565b612116604051978896879586946317b178b360e31b86528d60048701612ca5565b03925af1908115611a4b575f916103ae57506020956103725f51602061380d5f395f51905f529361036d93978894859261035f60405194859263a9059cbb60e01b8f85015260248401613368565b505061036d6020956103725f51602061380d5f395f51905f529361043a7f00000000000000000000000000000000000000000000000000000000000000008461320a565b63162908e360e11b5f5260045ffd5b346103db5760403660031901126103db576121d06124b4565b602435908115158092036103db57335f9081527fa4444b324116f496357b4fac8227ad63bed8ee53a87b9fb37937afb1d9de7916602052604090205460ff161561226e5760207f6a12b3df6cba4203bd7fd06b816789f87de8c594299aed5717ae070fac781bac9160018060a01b031692835f525f5160206138ad5f395f51905f52825260405f2060ff1981541660ff8316179055604051908152a2005b63e2517d3f60e01b5f52336004527f750555ed2187fef9a15b1b2d80b65634c266437a86c68f049ea8b5da4a2bd96d60245260445ffd5b346103db575f3660031901126103db5760205f5160206137ed5f395f51905f5254604051908152f35b346103db5760403660031901126103db576112736122ea6124b4565b6024359033613305565b346103db575f3660031901126103db576040515f5f51602061382d5f395f51905f5254612320816125f2565b808452906001811690811561239f5750600114612348575b61138f8361137b81850382612539565b5f51602061382d5f395f51905f525f9081525f5160206137ad5f395f51905f52939250905b8082106123855750909150810160200161137b612338565b91926001816020925483858801015201910190929161236d565b60ff191660208086019190915291151560051b8401909101915061137b9050612338565b346103db5760203660031901126103db576004359063ffffffff60e01b82168092036103db576020916336372b0760e01b811490811561247f575b811561246e575b811561245d575b811561244c575b8115612421575b5015158152f35b637965db0b60e01b81149150811561243b575b508361241a565b6301ffc9a760e01b14905083612434565b6342580cb760e11b81149150612413565b634ec7fbed60e11b8114915061240c565b63dd0390b560e01b81149150612405565b6305ee4a3b60e11b811491506123fe565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b600435906001600160a01b03821682036103db57565b602435906001600160a01b03821682036103db57565b60809060031901126103db576004356001600160a01b03811681036103db579060243590604435906064356001600160a01b03811681036103db5790565b604081019081106001600160401b03821117611f9d57604052565b601f909101601f19168101906001600160401b03821190821017611f9d57604052565b6001600160401b038111611f9d5760051b60200190565b9060a06003198301126103db576004356001600160a01b03811681036103db579160243591604435916064356001600160a01b03811681036103db57916084356001600160401b0381116103db57826023820112156103db576004810135926001600160401b0384116103db57602484830101116103db576024019190565b90600182811c92168015612620575b602083101461260c57565b634e487b7160e01b5f52602260045260245ffd5b91607f1691612601565b604051905f825f51602061386d5f395f51905f525491612649836125f2565b80835292600181169081156126c7575060011461266f575b61266d92500383612539565b565b505f51602061386d5f395f51905f525f90815290915f51602061396d5f395f51905f525b8183106126ab57505090602061266d92820101612661565b6020919350806001915483858901015201910190918492612693565b6020925061266d94915060ff191682840152151560051b820101612661565b604051905f825f5160206138ed5f395f51905f525491612705836125f2565b80835292600181169081156126c757506001146127285761266d92500383612539565b505f5160206138ed5f395f51905f525f90815290915f516020613aed5f395f51905f525b81831061276457505090602061266d92820101612661565b602091935080600191548385890101520191019091849261274c565b6001600160a01b03165f9081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace016020526040902090565b80518210156127cc5760209160051b010190565b634e487b7160e01b5f52603260045260245ffd5b81810292918115918404141715611f8957565b60405190606082016001600160401b03811183821017611f9d57604052815f5160206137cd5f395f51905f52546128298161255c565b906128376040519283612539565b8082525f5160206137cd5f395f51905f525f9081525f516020613a6d5f395f51905f52602084015b8383106128a157505050908252505f51602061394d5f395f51905f525460208201525f5160206139cd5f395f51905f52546001600160401b0316604090910152565b600260206001926040516128b48161251e565b85548152848601548382015281520192019201919061285f565b91908201809211611f8957565b5f525f516020613a0d5f395f51905f52602052600160405f20015490565b91908203918211611f8957565b60405190612915604083612539565b6005825264555344616960d81b6020830152565b908160209103126103db575180151581036103db5790565b5f80525f5160206138ad5f395f51905f526020527f2644e827c0313faa38c02ad716a63f96883905325fda6743d0a16474c5e4f8385460ff16612a605761a4b14603612a5c5760405163fe575a8760e01b81525f600482015260208160248173af88d065e77c8cc2239327c5edb3a432268e58315afa908115611a4b575f91612a3d575b5080156129cf5790565b5060405163fbac395160e01b81525f600482015260208160248173fd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb95afa908115611a4b575f91612a11575090565b612a33915060203d602011612a36575b612a2b8183612539565b810190612929565b90565b503d612a21565b612a56915060203d602011612a3657612a2b8183612539565b5f6129c5565b5f90565b600190565b6001600160a01b03165f8181525f5160206138ad5f395f51905f52602052604090205460ff16612b8b5761a4b14603612b6957730b2b2b2076d95dda7817e785989fe353fe955ef981148015612b6e575b612b695760405163fe575a8760e01b8152600481018290529060208260248173af88d065e77c8cc2239327c5edb3a432268e58315afa918215611a4b575f92612b48575b508115612b05575090565b90506040519063fbac395160e01b8252600482015260208160248173fd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb95afa908115611a4b575f91612a11575090565b612b6291925060203d602011612a3657612a2b8183612539565b905f612afa565b505f90565b507324a92e28a8c5d8812dcfaf44bcb20cc0babd13928114612ab6565b50600190565b335f9081527f20564623c340898287df7920e31a390c34a65bf4ab6fd3ad283beda989f363b7602052604090205460ff1615612bc957565b63e2517d3f60e01b5f52336004527f5abc35f3ddf4502abf40df80a9ee922191cea883919dcc4c1fdc7afe4464f22260245260445ffd5b5f8181525f516020613a0d5f395f51905f526020908152604080832033845290915290205460ff1615612c305750565b63e2517d3f60e01b5f523360045260245260445ffd5b60025f516020613a8d5f395f51905f525414612c6f5760025f516020613a8d5f395f51905f5255565b633ee5aeb560e01b5f5260045ffd5b60ff5f516020613a2d5f395f51905f525416612c9657565b63d93c066560e01b5f5260045ffd5b93909285939260a09693600180891b031686526020860152604085015260806060850152816080850152848401375f828201840152601f01601f1916010190565b612d0d612cf9612cf46127f3565b612d48565b5f51602061394d5f395f51905f52546128ce565b5f51602061394d5f395f51905f528190555f5160206139cd5f395f51905f5280546001600160401b031916426001600160401b031617905590565b60408101519091906001600160401b03168015612e8857612d6990426128f9565b8015612e88576040516370a0823160e01b81523060048201526020816024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa8015611a4b575f90612e54575b612ded91507f0000000000000000000000000000000000000000000000000000000000000000906127e0565b5f91825b85518051851015612e4c5786612e3d600193611d3d612e3787612e308b6020612e1d82612e439b6127b8565b5101518c818082109118021897516127b8565b51516127e0565b8461343a565b946128f9565b93019291612df1565b509450505050565b506020813d602011612e80575b81612e6e60209383612539565b810103126103db57612ded9051612dc1565b3d9150612e61565b505f9150565b916001600160a01b038316918215612f9c576001600160a01b038116938415612f8957612eba33612a65565b612f7657612ec790612a65565b612f6357612ed490612a65565b612f6357815f525f51602061384d5f395f51905f5260205260405f2054818110612f4a57815f5160206139ed5f395f51905f5292602092855f525f51602061384d5f395f51905f5284520360405f2055845f525f51602061384d5f395f51905f52825260405f20818154019055604051908152a3565b8263391434e360e21b5f5260045260245260445260645ffd5b8263d33f19e760e01b5f5260045260245ffd5b63d33f19e760e01b5f523360045260245ffd5b63ec442f0560e01b5f525f60045260245ffd5b634b637e8f60e11b5f525f60045260245ffd5b6001600160a01b0381165f9081525f51602061392d5f395f51905f52602052604090205460ff16612b69576001600160a01b03165f8181525f51602061392d5f395f51905f5260205260408120805460ff191660011790553391905f51602061378d5f395f51905f528180a4600190565b5f8181525f516020613a0d5f395f51905f52602090815260408083206001600160a01b038616845290915290205460ff166130ab575f8181525f516020613a0d5f395f51905f52602090815260408083206001600160a01b0395909516808452949091528120805460ff19166001179055339291905f51602061378d5f395f51905f529080a4600190565b50505f90565b5f8181525f516020613a0d5f395f51905f52602090815260408083206001600160a01b038616845290915290205460ff16156130ab575f8181525f516020613a0d5f395f51905f52602090815260408083206001600160a01b0395909516808452949091528120805460ff19169055339291907ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9080a4600190565b6001600160a01b03811691908215612f895761316833612a65565b612f7657613174612941565b6131f75761318190612a65565b6131e4575f5160206139ed5f395f51905f526020826131af5f945f5160206138cd5f395f51905f52546128ce565b5f5160206138cd5f395f51905f52558484525f51602061384d5f395f51905f52825260408420818154019055604051908152a3565b5063d33f19e760e01b5f5260045260245ffd5b63d33f19e760e01b5f525f60045260245ffd5b8115613214570490565b634e487b7160e01b5f52601260045260245ffd5b9091906001600160a01b038116908115612f9c5761324533612a65565b612f765761325290612a65565b6132f35761325e612941565b6131f757805f525f51602061384d5f395f51905f5260205260405f20548381106132d9576020845f94955f5160206139ed5f395f51905f52938587525f51602061384d5f395f51905f528452036040862055805f5160206138cd5f395f51905f5254035f5160206138cd5f395f51905f5255604051908152a3565b915063391434e360e21b5f5260045260245260445260645ffd5b63d33f19e760e01b5f5260045260245ffd5b916001600160a01b038316918215611ce5576001600160a01b0316928315611cd2577f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591613354602092612780565b855f5282528060405f2055604051908152a3565b6001600160a01b039091168152602081019190915260400190565b91909160205f604051936133ba856133ac8582019363095ea7b360e01b85528960248401613368565b03601f198101875286612539565b84519082855af15f513d82613415575b5050156133d657505050565b60405163095ea7b360e01b60208201526001600160a01b0390931660248401525f604480850191909152835261266d9261036d90610530606482612539565b90915061343257506001600160a01b0381163b15155b5f806133ca565b60011461342b565b9190915f838202915f19858209918380841093039280840393146134bc5782670de0b6b3a764000011156134aa57507faccb18165bd6fe31ae1cf318dc5b51eee0e1ba569b88cd74c1773b91fac106699394670de0b6b3a7640000910990828211900360ee1b910360121c170290565b634e487b71905260116020526024601cfd5b505050670de0b6b3a76400009192500490565b6134d7613703565b6134df61375a565b6040519060208201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8452604083015260608201524660808201523060a082015260a0815261353060c082612539565b51902090565b9061355a575080511561354b57805190602001fd5b63d6bda27560e01b5f5260045ffd5b8151158061358b575b61356b575090565b639996b31560e01b5f9081526001600160a01b0391909116600452602490fd5b50803b15613563565b60ff5f516020613aad5f395f51905f525460401c16156135b057565b631afcd79f60e31b5f5260045ffd5b91906fa2a8918ca85bafe22016d0b997e4df60600160ff1b03841161362c579160209360809260ff5f9560405194855216868401526040830152606082015282805260015afa15611a4b575f516001600160a01b0381161561362257905f905f90565b505f906001905f90565b5050505f9160039190565b60048110156136975780613649575050565b600181036136605763f645eedf60e01b5f5260045ffd5b6002810361367b575063fce698f760e01b5f5260045260245ffd5b6003146136855750565b6335e2f38360e21b5f5260045260245ffd5b634e487b7160e01b5f52602160045260245ffd5b905f602091828151910182855af115611a4b575f513d6136fa57506001600160a01b0381163b155b6136da5750565b635274afe760e01b5f9081526001600160a01b0391909116600452602490fd5b600114156136d3565b61370b61262a565b805190811561371b576020012090565b50505f51602061390d5f395f51905f525480156137355790565b507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47090565b6137626126e6565b8051908115613772576020012090565b50505f516020613acd5f395f51905f52548015613735579056fe2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d2ae08a8e29253f69ac5d979a101956ab8f8d9d7ded63fa7a83b16fc47648eab0ad76c5b481cb106971e0ae4c23a09cb5b1dc9dba5fad96d9694630df5e8539005fc387bd350b82c09f22bee4c04d61669980ce519c352560e36bc6144f9cf800144f5f62c08d623a6f383205dc8d5ef825b693748e2977846e18121b6780413a52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0352c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace00a16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10252c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace04d21f45001ca28b8905ef527bd860800b2646ce7faf578b00aa2e89af2355150052c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace02a16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d103a16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100b7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97dad76c5b481cb106971e0ae4c23a09cb5b1dc9dba5fad96d9694630df5e85390142ad5d3e1f2e6e70edcf6d991b8a3023d3fca8047a131592f9edb9fd9b89d57d5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb00b045190548dadae679cfe9e337437613ca6dd73efdf984f75e56f152ccee22f0ad76c5b481cb106971e0ae4c23a09cb5b1dc9dba5fad96d9694630df5e853902ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800cd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330046a2803e59a4de4e7a4c574b1243f25977ac4c77d5a1a4a609b5394cebb4a2aa1fcca439e03ee443c57a23e572b9a992d0b45f304247f4f5b88a3e0c593c2c609b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00a16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1015f9ce34815f8e11431c7bb75a8e6886a91478f7ffc1dbb0a98dc240fddd76b75a2646970667358221220f433aff687d665e7312144b940601fa10cf898368380c9aebfc691e412fbbb2a64736f6c634300081d0033f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0000000000000000000000000056adba107da1cb73e423c19ec7685e8312d0ef040000000000000000000000009ddfd49ac4689cf894203794d792dcb38e4b1a9e0000000000000000000000000b2b2b2076d95dda7817e785989fe353fe955ef9000000000000000000000000ffa10065ce1d1c42fabc46e06b84ed8ffeb4bae5","name":"USDai","is_blueprint":false,"license_type":"none","is_fully_verified":true,"is_verified_via_eth_bytecode_db":false,"language":"solidity","evm_version":"cancun","can_be_visualized_via_sol2uml":true,"is_verified_via_sourcify":false,"additional_sources":[{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/utils/ReentrancyGuardUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at,\n * consider using {ReentrancyGuardTransient} instead.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuardUpgradeable is Initializable {\n    // Booleans are more expensive than uint256 or any type that takes up a full\n    // word because each write operation emits an extra SLOAD to first read the\n    // slot's contents, replace the bits taken up by the boolean, and then write\n    // back. This is the compiler's defense against contract upgrades and\n    // pointer aliasing, and it cannot be disabled.\n\n    // The values being non-zero value makes deployment a bit more expensive,\n    // but in exchange the refund on every call to nonReentrant will be lower in\n    // amount. Since refunds are capped to a percentage of the total\n    // transaction's gas, it is best to keep them low in cases like this one, to\n    // increase the likelihood of the full refund coming into effect.\n    uint256 private constant NOT_ENTERED = 1;\n    uint256 private constant ENTERED = 2;\n\n    /// @custom:storage-location erc7201:openzeppelin.storage.ReentrancyGuard\n    struct ReentrancyGuardStorage {\n        uint256 _status;\n    }\n\n    // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.ReentrancyGuard\")) - 1)) & ~bytes32(uint256(0xff))\n    bytes32 private constant ReentrancyGuardStorageLocation = 0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00;\n\n    function _getReentrancyGuardStorage() private pure returns (ReentrancyGuardStorage storage $) {\n        assembly {\n            $.slot := ReentrancyGuardStorageLocation\n        }\n    }\n\n    /**\n     * @dev Unauthorized reentrant call.\n     */\n    error ReentrancyGuardReentrantCall();\n\n    function __ReentrancyGuard_init() internal onlyInitializing {\n        __ReentrancyGuard_init_unchained();\n    }\n\n    function __ReentrancyGuard_init_unchained() internal onlyInitializing {\n        ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\n        $._status = NOT_ENTERED;\n    }\n\n    /**\n     * @dev Prevents a contract from calling itself, directly or indirectly.\n     * Calling a `nonReentrant` function from another `nonReentrant`\n     * function is not supported. It is possible to prevent this from happening\n     * by making the `nonReentrant` function external, and making it call a\n     * `private` function that does the actual work.\n     */\n    modifier nonReentrant() {\n        _nonReentrantBefore();\n        _;\n        _nonReentrantAfter();\n    }\n\n    function _nonReentrantBefore() private {\n        ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\n        // On the first call to nonReentrant, _status will be NOT_ENTERED\n        if ($._status == ENTERED) {\n            revert ReentrancyGuardReentrantCall();\n        }\n\n        // Any calls to nonReentrant after this point will fail\n        $._status = ENTERED;\n    }\n\n    function _nonReentrantAfter() private {\n        ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\n        // By storing the original value once again, a refund is triggered (see\n        // https://eips.ethereum.org/EIPS/eip-2200)\n        $._status = NOT_ENTERED;\n    }\n\n    /**\n     * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n     * `nonReentrant` function in the call stack.\n     */\n    function _reentrancyGuardEntered() internal view returns (bool) {\n        ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\n        return $._status == ENTERED;\n    }\n}\n"},{"file_path":"src/interfaces/IUSDai.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\n/**\n * @title USDai Interface\n * @author USD.AI Foundation\n */\ninterface IUSDai is IERC20 {\n    /*------------------------------------------------------------------------*/\n    /* Errors */\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * @notice Invalid address\n     */\n    error InvalidAddress();\n\n    /**\n     * @notice Invalid amount\n     */\n    error InvalidAmount();\n\n    /**\n     * @notice Invalid decimals\n     */\n    error InvalidDecimals();\n\n    /**\n     * @notice Blacklisted address\n     * @param value Blacklisted address\n     */\n    error BlacklistedAddress(address value);\n\n    /**\n     * @notice Invalid parameters\n     */\n    error InvalidParameters();\n\n    /*------------------------------------------------------------------------*/\n    /* Structures */\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * @notice Rate tier\n     */\n    struct RateTier {\n        uint256 rate;\n        uint256 threshold;\n    }\n\n    /*------------------------------------------------------------------------*/\n    /* Events */\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * @notice Migrated event\n     * @param description Description\n     * @param data Data\n     */\n    event Migrated(string description, bytes data);\n\n    /**\n     * @notice Deposited event\n     * @param caller Caller\n     * @param recipient Recipient\n     * @param depositToken Deposit token\n     * @param depositAmount Deposit amount\n     * @param mintAmount Mint amount\n     */\n    event Deposited(\n        address indexed caller,\n        address indexed recipient,\n        address depositToken,\n        uint256 depositAmount,\n        uint256 mintAmount\n    );\n\n    /**\n     * @notice Withdrawn event\n     * @param caller Caller\n     * @param recipient Recipient\n     * @param withdrawToken Withdraw token\n     * @param usdaiAmount USDai amount\n     * @param withdrawAmount Withdraw amount\n     */\n    event Withdrawn(\n        address indexed caller,\n        address indexed recipient,\n        address withdrawToken,\n        uint256 usdaiAmount,\n        uint256 withdrawAmount\n    );\n\n    /**\n     * @notice Harvested event\n     * @param usdaiAmount USDai amount\n     */\n    event Harvested(uint256 usdaiAmount);\n\n    /**\n     * @notice Blacklist updated event\n     * @param account Account\n     * @param isBlacklisted Is blacklisted\n     */\n    event BlacklistUpdated(address indexed account, bool isBlacklisted);\n\n    /**\n     * @notice Base yield rate tiers set\n     * @param rateTiers Rate tiers\n     */\n    event BaseYieldRateTiersSet(RateTier[] rateTiers);\n\n    /*------------------------------------------------------------------------*/\n    /* Getters */\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * @notice Get swap adapter\n     * @return Swap adapter\n     */\n    function swapAdapter() external view returns (address);\n\n    /**\n     * @notice Get base token\n     * @return Base token\n     */\n    function baseToken() external view returns (address);\n\n    /**\n     * @notice Get bridged supply\n     * @return Bridged supply\n     */\n    function bridgedSupply() external view returns (uint256);\n\n    /**\n     * @notice Get base yield accrued\n     * @return Base yield accrued\n     */\n    function baseYieldAccrued() external view returns (uint256);\n\n    /**\n     * @notice Check if an address is blacklisted\n     * @param account Account\n     * @return Is blacklisted\n     */\n    function isBlacklisted(\n        address account\n    ) external view returns (bool);\n\n    /*------------------------------------------------------------------------*/\n    /* Public API */\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * @notice Deposit\n     * @param depositToken Deposit token\n     * @param depositAmount Deposit amount\n     * @param usdaiAmountMinimum Minimum USDai amount\n     * @param recipient Recipient\n     * @return USDai amount\n     */\n    function deposit(\n        address depositToken,\n        uint256 depositAmount,\n        uint256 usdaiAmountMinimum,\n        address recipient\n    ) external returns (uint256);\n\n    /**\n     * @notice Deposit\n     * @param depositToken Deposit token\n     * @param depositAmount Deposit amount\n     * @param usdaiAmountMinimum Minimum USDai amount\n     * @param recipient Recipient\n     * @param data Data (for swap adapter)\n     * @return USDai amount\n     */\n    function deposit(\n        address depositToken,\n        uint256 depositAmount,\n        uint256 usdaiAmountMinimum,\n        address recipient,\n        bytes calldata data\n    ) external returns (uint256);\n\n    /**\n     * @notice Withdraw\n     * @param withdrawToken Withdraw token\n     * @param usdaiAmount USDai amount\n     * @param withdrawAmountMinimum Minimum withdraw amount\n     * @param recipient Recipient\n     * @return Withdraw amount\n     */\n    function withdraw(\n        address withdrawToken,\n        uint256 usdaiAmount,\n        uint256 withdrawAmountMinimum,\n        address recipient\n    ) external returns (uint256);\n\n    /**\n     * @notice Withdraw\n     * @param withdrawToken Withdraw token\n     * @param usdaiAmount USD amount\n     * @param withdrawAmountMinimum Withdraw amount minimum\n     * @param recipient Recipient\n     * @param data Data (for swap adapter)\n     * @return Withdraw amount\n     */\n    function withdraw(\n        address withdrawToken,\n        uint256 usdaiAmount,\n        uint256 withdrawAmountMinimum,\n        address recipient,\n        bytes calldata data\n    ) external returns (uint256);\n\n    /*------------------------------------------------------------------------*/\n    /* Base Yield Recipient API */\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * @notice Harvest base yield\n     * @return USDai amount\n     *\n     */\n    function harvest() external returns (uint256);\n\n    /*------------------------------------------------------------------------*/\n    /* Blacklist Admin API */\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * @notice Set blacklist\n     * @param account Account\n     * @param isBlacklisted Is blacklisted\n     */\n    function setBlacklist(address account, bool isBlacklisted) external;\n\n    /*------------------------------------------------------------------------*/\n    /* Pause Admin API */\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * @notice Pause the contract\n     */\n    function pause() external;\n\n    /**\n     * @notice Unpause the contract\n     */\n    function unpause() external;\n\n    /*------------------------------------------------------------------------*/\n    /* Permissioned API */\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * @notice Set rate tiers\n     * @param rateTiers Rate tiers\n     */\n    function setRateTiers(\n        RateTier[] memory rateTiers\n    ) external;\n}\n"},{"file_path":"src/interfaces/IBaseYieldEscrow.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IUSDai} from \"./IUSDai.sol\";\n\n/**\n * @title Base token yield escrow interface\n * @author USD.AI Foundation\n */\ninterface IBaseYieldEscrow {\n    /*------------------------------------------------------------------------*/\n    /* Events */\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * @notice Deposited event\n     * @param caller Caller\n     * @param amount Amount\n     */\n    event Deposited(address indexed caller, uint256 amount);\n\n    /**\n     * @notice Withdrawn event\n     * @param caller Caller\n     * @param amount Amount\n     */\n    event Withdrawn(address indexed caller, uint256 amount);\n\n    /**\n     * @notice Harvested event\n     * @param caller Caller\n     * @param amount Amount\n     */\n    event Harvested(address indexed caller, uint256 amount);\n\n    /**\n     * @notice Base yield rate tiers set event\n     * @param rateTiers Rate tiers\n     */\n    event BaseYieldRateTiersSet(IUSDai.RateTier[] rateTiers);\n\n    /*------------------------------------------------------------------------*/\n    /* Getter */\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * @notice Base token\n     * @return Base Token\n     */\n    function baseToken() external view returns (address);\n\n    /**\n     * @notice Balance\n     * @return Base token balance\n     */\n    function balance() external view returns (uint256);\n\n    /*------------------------------------------------------------------------*/\n    /* Permissioned API */\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * @notice Deposit base token\n     * @param amount Base token amount\n     */\n    function deposit(\n        uint256 amount\n    ) external;\n\n    /**\n     * @notice Withdraw base token\n     * @param amount Base token amount\n     */\n    function withdraw(\n        uint256 amount\n    ) external;\n\n    /**\n     * @notice Harvest base token\n     * @param amount Base token amount\n     */\n    function harvest(\n        uint256 amount\n    ) external;\n\n    /**\n     * @notice Set base yield rates\n     * @param rateTiers Rate tiers\n     */\n    function setRateTiers(\n        IUSDai.RateTier[] memory rateTiers\n    ) external;\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/utils/math/Math.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.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 Returns the addition of two unsigned integers, with an 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            if (c < a) return (false, 0);\n            return (true, c);\n        }\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, with an success flag (no overflow).\n     */\n    function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            if (b > a) return (false, 0);\n            return (true, a - b);\n        }\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, with an success flag (no overflow).\n     */\n    function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n            // benefit is lost if 'b' is also tested.\n            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n            if (a == 0) return (true, 0);\n            uint256 c = a * b;\n            if (c / a != b) return (false, 0);\n            return (true, c);\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            if (b == 0) return (false, 0);\n            return (true, a / b);\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            if (b == 0) return (false, 0);\n            return (true, a % b);\n        }\n    }\n\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, 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            // 512-bit multiply [prod1 prod0] = 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 = prod1 * 2²⁵⁶ + prod0.\n            uint256 prod0 = x * y; // Least significant 256 bits of the product\n            uint256 prod1; // Most significant 256 bits of the product\n            assembly {\n                let mm := mulmod(x, y, not(0))\n                prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n            }\n\n            // Handle non-overflow cases, 256 by 256 division.\n            if (prod1 == 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 prod0 / denominator;\n            }\n\n            // Make sure the result is less than 2²⁵⁶. Also prevents denominator == 0.\n            if (denominator <= prod1) {\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 [prod1 prod0].\n            uint256 remainder;\n            assembly {\n                // Compute remainder using mulmod.\n                remainder := mulmod(x, y, denominator)\n\n                // Subtract 256 bit number from 512 bit number.\n                prod1 := sub(prod1, gt(remainder, prod0))\n                prod0 := sub(prod0, 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 {\n                // Divide denominator by twos.\n                denominator := div(denominator, twos)\n\n                // Divide [prod1 prod0] by twos.\n                prod0 := div(prod0, 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 prod1 into prod0.\n            prod0 |= prod1 * 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 prod1\n            // is no longer required.\n            result = prod0 * 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 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 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        uint256 exp;\n        unchecked {\n            exp = 128 * SafeCast.toUint(value > (1 << 128) - 1);\n            value >>= exp;\n            result += exp;\n\n            exp = 64 * SafeCast.toUint(value > (1 << 64) - 1);\n            value >>= exp;\n            result += exp;\n\n            exp = 32 * SafeCast.toUint(value > (1 << 32) - 1);\n            value >>= exp;\n            result += exp;\n\n            exp = 16 * SafeCast.toUint(value > (1 << 16) - 1);\n            value >>= exp;\n            result += exp;\n\n            exp = 8 * SafeCast.toUint(value > (1 << 8) - 1);\n            value >>= exp;\n            result += exp;\n\n            exp = 4 * SafeCast.toUint(value > (1 << 4) - 1);\n            value >>= exp;\n            result += exp;\n\n            exp = 2 * SafeCast.toUint(value > (1 << 2) - 1);\n            value >>= exp;\n            result += exp;\n\n            result += SafeCast.toUint(value > 1);\n        }\n        return result;\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 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        uint256 isGt;\n        unchecked {\n            isGt = SafeCast.toUint(value > (1 << 128) - 1);\n            value >>= isGt * 128;\n            result += isGt * 16;\n\n            isGt = SafeCast.toUint(value > (1 << 64) - 1);\n            value >>= isGt * 64;\n            result += isGt * 8;\n\n            isGt = SafeCast.toUint(value > (1 << 32) - 1);\n            value >>= isGt * 32;\n            result += isGt * 4;\n\n            isGt = SafeCast.toUint(value > (1 << 16) - 1);\n            value >>= isGt * 16;\n            result += isGt * 2;\n\n            result += SafeCast.toUint(value > (1 << 8) - 1);\n        }\n        return result;\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"},{"file_path":"src/interfaces/IMintableBurnable.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/**\n * @title Mintable Burnable Interface\n * @author USD.AI Foundation\n */\ninterface IMintableBurnable {\n    /*------------------------------------------------------------------------*/\n    /* Minter API */\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * @notice Mint\n     * @param to Account\n     * @param amount Amount\n     */\n    function mint(address to, uint256 amount) external;\n\n    /**\n     * @notice Burn\n     * @param from Account\n     * @param amount Amount\n     */\n    function burn(address from, uint256 amount) external;\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.1.0) (utils/cryptography/EIP712.sol)\n\npragma solidity ^0.8.20;\n\nimport {MessageHashUtils} from \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\";\nimport {IERC5267} from \"@openzeppelin/contracts/interfaces/IERC5267.sol\";\nimport {Initializable} from \"../../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: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain\n * separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the\n * separator from the immutable values, which 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    /**\n     * @dev See {IERC-5267}.\n     */\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.2.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        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));\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        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));\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        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));\n\n        if (!_callOptionalReturnBool(token, approvalCall)) {\n            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));\n            _callOptionalReturn(token, approvalCall);\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 rely 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 rely 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     * Opposedly, 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 high-level call (i.e. a regular function call to a contract), relaxing the requirement\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\n     * @param token The token targeted by the call.\n     * @param data The call data (encoded using abi.encode or one of its variants).\n     *\n     * This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\n     */\n    function _callOptionalReturn(IERC20 token, bytes memory data) private {\n        uint256 returnSize;\n        uint256 returnValue;\n        assembly (\"memory-safe\") {\n            let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n            // bubble errors\n            if iszero(success) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            returnSize := returndatasize()\n            returnValue := mload(0)\n        }\n\n        if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\n     * @param token The token targeted by the call.\n     * @param data The call data (encoded using abi.encode or one of its variants).\n     *\n     * This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead.\n     */\n    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n        bool success;\n        uint256 returnSize;\n        uint256 returnValue;\n        assembly (\"memory-safe\") {\n            success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n            returnSize := returndatasize()\n            returnValue := mload(0)\n        }\n        return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (access/IAccessControl.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev External interface of AccessControl declared to support ERC-165 detection.\n */\ninterface IAccessControl {\n    /**\n     * @dev The `account` is missing a role.\n     */\n    error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);\n\n    /**\n     * @dev The caller of a function is not the expected one.\n     *\n     * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.\n     */\n    error AccessControlBadConfirmation();\n\n    /**\n     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n     *\n     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n     * {RoleAdminChanged} not being emitted signaling this.\n     */\n    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n    /**\n     * @dev Emitted when `account` is granted `role`.\n     *\n     * `sender` is the account that originated the contract call. This account bears the admin role (for the granted role).\n     * Expected in cases where the role was granted using the internal {AccessControl-_grantRole}.\n     */\n    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n    /**\n     * @dev Emitted when `account` is revoked `role`.\n     *\n     * `sender` is the account that originated the contract call:\n     *   - if using `revokeRole`, it is the admin role bearer\n     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)\n     */\n    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n    /**\n     * @dev Returns `true` if `account` has been granted `role`.\n     */\n    function hasRole(bytes32 role, address account) external view returns (bool);\n\n    /**\n     * @dev Returns the admin role that controls `role`. See {grantRole} and\n     * {revokeRole}.\n     *\n     * To change a role's admin, use {AccessControl-_setRoleAdmin}.\n     */\n    function getRoleAdmin(bytes32 role) external view returns (bytes32);\n\n    /**\n     * @dev Grants `role` to `account`.\n     *\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     */\n    function grantRole(bytes32 role, address account) external;\n\n    /**\n     * @dev Revokes `role` from `account`.\n     *\n     * If `account` had been granted `role`, emits a {RoleRevoked} event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     */\n    function revokeRole(bytes32 role, address account) external;\n\n    /**\n     * @dev Revokes `role` from the calling account.\n     *\n     * Roles are often managed via {grantRole} and {revokeRole}: this function's\n     * purpose is to provide a mechanism for accounts to lose their privileges\n     * if they are compromised (such as when a trusted device is misplaced).\n     *\n     * If the calling account had been granted `role`, emits a {RoleRevoked}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must be `callerConfirmation`.\n     */\n    function renounceRole(bytes32 role, address callerConfirmation) external;\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n    enum RecoverError {\n        NoError,\n        InvalidSignature,\n        InvalidSignatureLength,\n        InvalidSignatureS\n    }\n\n    /**\n     * @dev The signature derives the `address(0)`.\n     */\n    error ECDSAInvalidSignature();\n\n    /**\n     * @dev The signature has an invalid length.\n     */\n    error ECDSAInvalidSignatureLength(uint256 length);\n\n    /**\n     * @dev The signature has an S value that is in the upper half order.\n     */\n    error ECDSAInvalidSignatureS(bytes32 s);\n\n    /**\n     * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n     * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n     * and a bytes32 providing additional information about the error.\n     *\n     * If no error is returned, then the address can be used for verification purposes.\n     *\n     * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n     * this function rejects them by requiring the `s` value to be in the lower\n     * half order, and the `v` value to be either 27 or 28.\n     *\n     * 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     * - 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 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     * 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 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 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":"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-upgradeable/contracts/utils/MulticallUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Multicall.sol)\n\npragma solidity ^0.8.20;\n\nimport {Address} from \"@openzeppelin/contracts/utils/Address.sol\";\nimport {ContextUpgradeable} from \"./ContextUpgradeable.sol\";\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides a function to batch together multiple calls in a single external call.\n *\n * Consider any assumption about calldata validation performed by the sender may be violated if it's not especially\n * careful about sending transactions invoking {multicall}. For example, a relay address that filters function\n * selectors won't filter calls nested within a {multicall} operation.\n *\n * NOTE: Since 5.0.1 and 4.9.4, this contract identifies non-canonical contexts (i.e. `msg.sender` is not {_msgSender}).\n * If a non-canonical context is identified, the following self `delegatecall` appends the last bytes of `msg.data`\n * to the subcall. This makes it safe to use with {ERC2771Context}. Contexts that don't affect the resolution of\n * {_msgSender} are not propagated to subcalls.\n */\nabstract contract MulticallUpgradeable is Initializable, ContextUpgradeable {\n    function __Multicall_init() internal onlyInitializing {\n    }\n\n    function __Multicall_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev Receives and executes a batch of function calls on this contract.\n     * @custom:oz-upgrades-unsafe-allow-reachable delegatecall\n     */\n    function multicall(bytes[] calldata data) external virtual returns (bytes[] memory results) {\n        bytes memory context = msg.sender == _msgSender()\n            ? new bytes(0)\n            : msg.data[msg.data.length - _contextSuffixLength():];\n\n        results = new bytes[](data.length);\n        for (uint256 i = 0; i < data.length; i++) {\n            results[i] = Address.functionDelegateCall(address(this), bytes.concat(data[i], context));\n        }\n        return results;\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/ERC20Upgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.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 \"../../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     * All two of these values are immutable: they can only be set once during\n     * 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    /**\n     * @dev See {IERC20-totalSupply}.\n     */\n    function totalSupply() public view virtual returns (uint256) {\n        ERC20Storage storage $ = _getERC20Storage();\n        return $._totalSupply;\n    }\n\n    /**\n     * @dev See {IERC20-balanceOf}.\n     */\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    /**\n     * @dev See {IERC20-allowance}.\n     */\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 set the flag to false. This saves gas by not emitting any\n     * `Approval` event during `transferFrom` operations.\n     *\n     * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\n     * true using the following override:\n     *\n     * ```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-upgradeable/contracts/token/ERC20/extensions/ERC20PermitUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/ERC20Permit.sol)\n\npragma solidity ^0.8.20;\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 \"../../../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    /**\n     * @inheritdoc IERC20Permit\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    ) 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    /**\n     * @inheritdoc IERC20Permit\n     */\n    function nonces(address owner) public view virtual override(IERC20Permit, NoncesUpgradeable) returns (uint256) {\n        return super.nonces(owner);\n    }\n\n    /**\n     * @inheritdoc IERC20Permit\n     */\n    // solhint-disable-next-line func-name-mixedcase\n    function DOMAIN_SEPARATOR() external view virtual 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.0.0) (interfaces/IERC20.sol)\n\npragma solidity ^0.8.20;\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.0.0) (interfaces/IERC165.sol)\n\npragma solidity ^0.8.20;\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.1.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\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.1.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\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/token/ERC20/extensions/IERC20Metadata.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the 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.1.0) (interfaces/IERC1363.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @title IERC1363\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\n *\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\n */\ninterface IERC1363 is IERC20, IERC165 {\n    /*\n     * Note: the ERC-165 identifier for this interface is 0xb0202a11.\n     * 0xb0202a11 ===\n     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^\n     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\n     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\n     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\n     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^\n     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\n     */\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferAndCall(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @param data Additional data with no specified format, sent in call to `to`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param from The address which you want to send tokens from.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param from The address which you want to send tokens from.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @param data Additional data with no specified format, sent in call to `to`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n     * @param spender The address which will spend the funds.\n     * @param value The amount of tokens to be spent.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function approveAndCall(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n     * @param spender The address which will spend the funds.\n     * @param value The amount of tokens to be spent.\n     * @param data Additional data with no specified format, sent in call to `spender`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\nimport {Initializable} from \"../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/utils/Strings.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SafeCast} from \"./math/SafeCast.sol\";\nimport {SignedMath} from \"./math/SignedMath.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\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(buffer, add(32, 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 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(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(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} 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} 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} 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} 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} 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 guaratees 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} 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} 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} 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 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(buffer, add(0x20, offset)))\n        }\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-upgradeable/contracts/access/AccessControlUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol)\n\npragma solidity ^0.8.20;\n\nimport {IAccessControl} from \"@openzeppelin/contracts/access/IAccessControl.sol\";\nimport {ContextUpgradeable} from \"../utils/ContextUpgradeable.sol\";\nimport {ERC165Upgradeable} from \"../utils/introspection/ERC165Upgradeable.sol\";\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```solidity\n * bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```solidity\n * function foo() public {\n *     require(hasRole(MY_ROLE, msg.sender));\n *     ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}\n * to enforce additional security measures for this role.\n */\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControl, ERC165Upgradeable {\n    struct RoleData {\n        mapping(address account => bool) hasRole;\n        bytes32 adminRole;\n    }\n\n    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n\n\n    /// @custom:storage-location erc7201:openzeppelin.storage.AccessControl\n    struct AccessControlStorage {\n        mapping(bytes32 role => RoleData) _roles;\n    }\n\n    // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.AccessControl\")) - 1)) & ~bytes32(uint256(0xff))\n    bytes32 private constant AccessControlStorageLocation = 0x02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800;\n\n    function _getAccessControlStorage() private pure returns (AccessControlStorage storage $) {\n        assembly {\n            $.slot := AccessControlStorageLocation\n        }\n    }\n\n    /**\n     * @dev Modifier that checks that an account has a specific role. Reverts\n     * with an {AccessControlUnauthorizedAccount} error including the required role.\n     */\n    modifier onlyRole(bytes32 role) {\n        _checkRole(role);\n        _;\n    }\n\n    function __AccessControl_init() internal onlyInitializing {\n    }\n\n    function __AccessControl_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @dev Returns `true` if `account` has been granted `role`.\n     */\n    function hasRole(bytes32 role, address account) public view virtual returns (bool) {\n        AccessControlStorage storage $ = _getAccessControlStorage();\n        return $._roles[role].hasRole[account];\n    }\n\n    /**\n     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`\n     * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.\n     */\n    function _checkRole(bytes32 role) internal view virtual {\n        _checkRole(role, _msgSender());\n    }\n\n    /**\n     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`\n     * is missing `role`.\n     */\n    function _checkRole(bytes32 role, address account) internal view virtual {\n        if (!hasRole(role, account)) {\n            revert AccessControlUnauthorizedAccount(account, role);\n        }\n    }\n\n    /**\n     * @dev Returns the admin role that controls `role`. See {grantRole} and\n     * {revokeRole}.\n     *\n     * To change a role's admin, use {_setRoleAdmin}.\n     */\n    function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) {\n        AccessControlStorage storage $ = _getAccessControlStorage();\n        return $._roles[role].adminRole;\n    }\n\n    /**\n     * @dev Grants `role` to `account`.\n     *\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     *\n     * May emit a {RoleGranted} event.\n     */\n    function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {\n        _grantRole(role, account);\n    }\n\n    /**\n     * @dev Revokes `role` from `account`.\n     *\n     * If `account` had been granted `role`, emits a {RoleRevoked} event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     *\n     * May emit a {RoleRevoked} event.\n     */\n    function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {\n        _revokeRole(role, account);\n    }\n\n    /**\n     * @dev Revokes `role` from the calling account.\n     *\n     * Roles are often managed via {grantRole} and {revokeRole}: this function's\n     * purpose is to provide a mechanism for accounts to lose their privileges\n     * if they are compromised (such as when a trusted device is misplaced).\n     *\n     * If the calling account had been revoked `role`, emits a {RoleRevoked}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must be `callerConfirmation`.\n     *\n     * May emit a {RoleRevoked} event.\n     */\n    function renounceRole(bytes32 role, address callerConfirmation) public virtual {\n        if (callerConfirmation != _msgSender()) {\n            revert AccessControlBadConfirmation();\n        }\n\n        _revokeRole(role, callerConfirmation);\n    }\n\n    /**\n     * @dev Sets `adminRole` as ``role``'s admin role.\n     *\n     * Emits a {RoleAdminChanged} event.\n     */\n    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\n        AccessControlStorage storage $ = _getAccessControlStorage();\n        bytes32 previousAdminRole = getRoleAdmin(role);\n        $._roles[role].adminRole = adminRole;\n        emit RoleAdminChanged(role, previousAdminRole, adminRole);\n    }\n\n    /**\n     * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.\n     *\n     * Internal function without access restriction.\n     *\n     * May emit a {RoleGranted} event.\n     */\n    function _grantRole(bytes32 role, address account) internal virtual returns (bool) {\n        AccessControlStorage storage $ = _getAccessControlStorage();\n        if (!hasRole(role, account)) {\n            $._roles[role].hasRole[account] = true;\n            emit RoleGranted(role, account, _msgSender());\n            return true;\n        } else {\n            return false;\n        }\n    }\n\n    /**\n     * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked.\n     *\n     * Internal function without access restriction.\n     *\n     * May emit a {RoleRevoked} event.\n     */\n    function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {\n        AccessControlStorage storage $ = _getAccessControlStorage();\n        if (hasRole(role, account)) {\n            $._roles[role].hasRole[account] = false;\n            emit RoleRevoked(role, account, _msgSender());\n            return true;\n        } else {\n            return false;\n        }\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/interfaces/IERC5267.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol)\n\npragma solidity ^0.8.20;\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":"src/interfaces/ISwapAdapter.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/**\n * @title Swap Adapter Interface\n * @author USD.AI Foundation\n */\ninterface ISwapAdapter {\n    /*------------------------------------------------------------------------*/\n    /* Events */\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * @notice Swapped in event\n     * @param inputToken Input token\n     * @param inputAmount Input amount\n     * @param baseOutputAmount Base token output amount\n     */\n    event SwappedIn(address indexed inputToken, uint256 inputAmount, uint256 baseOutputAmount);\n\n    /**\n     * @notice Swapped out event\n     * @param outputToken Output token\n     * @param baseInputAmount Base token input amount\n     * @param outputAmount Output amount\n     */\n    event SwappedOut(address indexed outputToken, uint256 baseInputAmount, uint256 outputAmount);\n\n    /*------------------------------------------------------------------------*/\n    /* Getter */\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * @notice Base token\n     * @return Base Token\n     */\n    function baseToken() external view returns (address);\n\n    /*------------------------------------------------------------------------*/\n    /* Permissioned API */\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * @notice Swap in for base token\n     * @param inputToken Input token\n     * @param inputAmount Input amount\n     * @param minBaseAmount Minimum base token amount\n     * @param path Swap path\n     * @return Base amount\n     */\n    function swapIn(\n        address inputToken,\n        uint256 inputAmount,\n        uint256 minBaseAmount,\n        bytes calldata path\n    ) external returns (uint256);\n\n    /**\n     * @notice Swap out of base token\n     * @param outputToken Output token\n     * @param baseAmount Base token amount\n     * @param minOutputAmount Minimum output amount\n     * @param path Swap path\n     * @return Output amount\n     */\n    function swapOut(\n        address outputToken,\n        uint256 baseAmount,\n        uint256 minOutputAmount,\n        bytes calldata path\n    ) external returns (uint256);\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/utils/math/SafeCast.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol)\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeCast {\n    /**\n     * @dev Value doesn't fit in an uint of `bits` size.\n     */\n    error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);\n\n    /**\n     * @dev An int value doesn't fit in an uint of `bits` size.\n     */\n    error SafeCastOverflowedIntToUint(int256 value);\n\n    /**\n     * @dev Value doesn't fit in an int of `bits` size.\n     */\n    error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);\n\n    /**\n     * @dev An uint value doesn't fit in an int of `bits` size.\n     */\n    error SafeCastOverflowedUintToInt(uint256 value);\n\n    /**\n     * @dev Returns the downcasted uint248 from uint256, reverting on\n     * overflow (when the input is greater than largest uint248).\n     *\n     * Counterpart to Solidity's `uint248` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 248 bits\n     */\n    function toUint248(uint256 value) internal pure returns (uint248) {\n        if (value > type(uint248).max) {\n            revert SafeCastOverflowedUintDowncast(248, value);\n        }\n        return uint248(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint240 from uint256, reverting on\n     * overflow (when the input is greater than largest uint240).\n     *\n     * Counterpart to Solidity's `uint240` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 240 bits\n     */\n    function toUint240(uint256 value) internal pure returns (uint240) {\n        if (value > type(uint240).max) {\n            revert SafeCastOverflowedUintDowncast(240, value);\n        }\n        return uint240(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint232 from uint256, reverting on\n     * overflow (when the input is greater than largest uint232).\n     *\n     * Counterpart to Solidity's `uint232` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 232 bits\n     */\n    function toUint232(uint256 value) internal pure returns (uint232) {\n        if (value > type(uint232).max) {\n            revert SafeCastOverflowedUintDowncast(232, value);\n        }\n        return uint232(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint224 from uint256, reverting on\n     * overflow (when the input is greater than largest uint224).\n     *\n     * Counterpart to Solidity's `uint224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toUint224(uint256 value) internal pure returns (uint224) {\n        if (value > type(uint224).max) {\n            revert SafeCastOverflowedUintDowncast(224, value);\n        }\n        return uint224(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint216 from uint256, reverting on\n     * overflow (when the input is greater than largest uint216).\n     *\n     * Counterpart to Solidity's `uint216` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 216 bits\n     */\n    function toUint216(uint256 value) internal pure returns (uint216) {\n        if (value > type(uint216).max) {\n            revert SafeCastOverflowedUintDowncast(216, value);\n        }\n        return uint216(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint208 from uint256, reverting on\n     * overflow (when the input is greater than largest uint208).\n     *\n     * Counterpart to Solidity's `uint208` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 208 bits\n     */\n    function toUint208(uint256 value) internal pure returns (uint208) {\n        if (value > type(uint208).max) {\n            revert SafeCastOverflowedUintDowncast(208, value);\n        }\n        return uint208(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint200 from uint256, reverting on\n     * overflow (when the input is greater than largest uint200).\n     *\n     * Counterpart to Solidity's `uint200` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 200 bits\n     */\n    function toUint200(uint256 value) internal pure returns (uint200) {\n        if (value > type(uint200).max) {\n            revert SafeCastOverflowedUintDowncast(200, value);\n        }\n        return uint200(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint192 from uint256, reverting on\n     * overflow (when the input is greater than largest uint192).\n     *\n     * Counterpart to Solidity's `uint192` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 192 bits\n     */\n    function toUint192(uint256 value) internal pure returns (uint192) {\n        if (value > type(uint192).max) {\n            revert SafeCastOverflowedUintDowncast(192, value);\n        }\n        return uint192(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint184 from uint256, reverting on\n     * overflow (when the input is greater than largest uint184).\n     *\n     * Counterpart to Solidity's `uint184` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 184 bits\n     */\n    function toUint184(uint256 value) internal pure returns (uint184) {\n        if (value > type(uint184).max) {\n            revert SafeCastOverflowedUintDowncast(184, value);\n        }\n        return uint184(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint176 from uint256, reverting on\n     * overflow (when the input is greater than largest uint176).\n     *\n     * Counterpart to Solidity's `uint176` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 176 bits\n     */\n    function toUint176(uint256 value) internal pure returns (uint176) {\n        if (value > type(uint176).max) {\n            revert SafeCastOverflowedUintDowncast(176, value);\n        }\n        return uint176(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint168 from uint256, reverting on\n     * overflow (when the input is greater than largest uint168).\n     *\n     * Counterpart to Solidity's `uint168` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 168 bits\n     */\n    function toUint168(uint256 value) internal pure returns (uint168) {\n        if (value > type(uint168).max) {\n            revert SafeCastOverflowedUintDowncast(168, value);\n        }\n        return uint168(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint160 from uint256, reverting on\n     * overflow (when the input is greater than largest uint160).\n     *\n     * Counterpart to Solidity's `uint160` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 160 bits\n     */\n    function toUint160(uint256 value) internal pure returns (uint160) {\n        if (value > type(uint160).max) {\n            revert SafeCastOverflowedUintDowncast(160, value);\n        }\n        return uint160(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint152 from uint256, reverting on\n     * overflow (when the input is greater than largest uint152).\n     *\n     * Counterpart to Solidity's `uint152` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 152 bits\n     */\n    function toUint152(uint256 value) internal pure returns (uint152) {\n        if (value > type(uint152).max) {\n            revert SafeCastOverflowedUintDowncast(152, value);\n        }\n        return uint152(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint144 from uint256, reverting on\n     * overflow (when the input is greater than largest uint144).\n     *\n     * Counterpart to Solidity's `uint144` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 144 bits\n     */\n    function toUint144(uint256 value) internal pure returns (uint144) {\n        if (value > type(uint144).max) {\n            revert SafeCastOverflowedUintDowncast(144, value);\n        }\n        return uint144(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint136 from uint256, reverting on\n     * overflow (when the input is greater than largest uint136).\n     *\n     * Counterpart to Solidity's `uint136` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 136 bits\n     */\n    function toUint136(uint256 value) internal pure returns (uint136) {\n        if (value > type(uint136).max) {\n            revert SafeCastOverflowedUintDowncast(136, value);\n        }\n        return uint136(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint128 from uint256, reverting on\n     * overflow (when the input is greater than largest uint128).\n     *\n     * Counterpart to Solidity's `uint128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toUint128(uint256 value) internal pure returns (uint128) {\n        if (value > type(uint128).max) {\n            revert SafeCastOverflowedUintDowncast(128, value);\n        }\n        return uint128(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint120 from uint256, reverting on\n     * overflow (when the input is greater than largest uint120).\n     *\n     * Counterpart to Solidity's `uint120` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 120 bits\n     */\n    function toUint120(uint256 value) internal pure returns (uint120) {\n        if (value > type(uint120).max) {\n            revert SafeCastOverflowedUintDowncast(120, value);\n        }\n        return uint120(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint112 from uint256, reverting on\n     * overflow (when the input is greater than largest uint112).\n     *\n     * Counterpart to Solidity's `uint112` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 112 bits\n     */\n    function toUint112(uint256 value) internal pure returns (uint112) {\n        if (value > type(uint112).max) {\n            revert SafeCastOverflowedUintDowncast(112, value);\n        }\n        return uint112(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint104 from uint256, reverting on\n     * overflow (when the input is greater than largest uint104).\n     *\n     * Counterpart to Solidity's `uint104` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 104 bits\n     */\n    function toUint104(uint256 value) internal pure returns (uint104) {\n        if (value > type(uint104).max) {\n            revert SafeCastOverflowedUintDowncast(104, value);\n        }\n        return uint104(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint96 from uint256, reverting on\n     * overflow (when the input is greater than largest uint96).\n     *\n     * Counterpart to Solidity's `uint96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toUint96(uint256 value) internal pure returns (uint96) {\n        if (value > type(uint96).max) {\n            revert SafeCastOverflowedUintDowncast(96, value);\n        }\n        return uint96(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint88 from uint256, reverting on\n     * overflow (when the input is greater than largest uint88).\n     *\n     * Counterpart to Solidity's `uint88` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 88 bits\n     */\n    function toUint88(uint256 value) internal pure returns (uint88) {\n        if (value > type(uint88).max) {\n            revert SafeCastOverflowedUintDowncast(88, value);\n        }\n        return uint88(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint80 from uint256, reverting on\n     * overflow (when the input is greater than largest uint80).\n     *\n     * Counterpart to Solidity's `uint80` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 80 bits\n     */\n    function toUint80(uint256 value) internal pure returns (uint80) {\n        if (value > type(uint80).max) {\n            revert SafeCastOverflowedUintDowncast(80, value);\n        }\n        return uint80(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint72 from uint256, reverting on\n     * overflow (when the input is greater than largest uint72).\n     *\n     * Counterpart to Solidity's `uint72` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 72 bits\n     */\n    function toUint72(uint256 value) internal pure returns (uint72) {\n        if (value > type(uint72).max) {\n            revert SafeCastOverflowedUintDowncast(72, value);\n        }\n        return uint72(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint64 from uint256, reverting on\n     * overflow (when the input is greater than largest uint64).\n     *\n     * Counterpart to Solidity's `uint64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toUint64(uint256 value) internal pure returns (uint64) {\n        if (value > type(uint64).max) {\n            revert SafeCastOverflowedUintDowncast(64, value);\n        }\n        return uint64(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint56 from uint256, reverting on\n     * overflow (when the input is greater than largest uint56).\n     *\n     * Counterpart to Solidity's `uint56` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 56 bits\n     */\n    function toUint56(uint256 value) internal pure returns (uint56) {\n        if (value > type(uint56).max) {\n            revert SafeCastOverflowedUintDowncast(56, value);\n        }\n        return uint56(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint48 from uint256, reverting on\n     * overflow (when the input is greater than largest uint48).\n     *\n     * Counterpart to Solidity's `uint48` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 48 bits\n     */\n    function toUint48(uint256 value) internal pure returns (uint48) {\n        if (value > type(uint48).max) {\n            revert SafeCastOverflowedUintDowncast(48, value);\n        }\n        return uint48(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint40 from uint256, reverting on\n     * overflow (when the input is greater than largest uint40).\n     *\n     * Counterpart to Solidity's `uint40` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 40 bits\n     */\n    function toUint40(uint256 value) internal pure returns (uint40) {\n        if (value > type(uint40).max) {\n            revert SafeCastOverflowedUintDowncast(40, value);\n        }\n        return uint40(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint32 from uint256, reverting on\n     * overflow (when the input is greater than largest uint32).\n     *\n     * Counterpart to Solidity's `uint32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toUint32(uint256 value) internal pure returns (uint32) {\n        if (value > type(uint32).max) {\n            revert SafeCastOverflowedUintDowncast(32, value);\n        }\n        return uint32(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint24 from uint256, reverting on\n     * overflow (when the input is greater than largest uint24).\n     *\n     * Counterpart to Solidity's `uint24` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 24 bits\n     */\n    function toUint24(uint256 value) internal pure returns (uint24) {\n        if (value > type(uint24).max) {\n            revert SafeCastOverflowedUintDowncast(24, value);\n        }\n        return uint24(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint16 from uint256, reverting on\n     * overflow (when the input is greater than largest uint16).\n     *\n     * Counterpart to Solidity's `uint16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toUint16(uint256 value) internal pure returns (uint16) {\n        if (value > type(uint16).max) {\n            revert SafeCastOverflowedUintDowncast(16, value);\n        }\n        return uint16(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint8 from uint256, reverting on\n     * overflow (when the input is greater than largest uint8).\n     *\n     * Counterpart to Solidity's `uint8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits\n     */\n    function toUint8(uint256 value) internal pure returns (uint8) {\n        if (value > type(uint8).max) {\n            revert SafeCastOverflowedUintDowncast(8, value);\n        }\n        return uint8(value);\n    }\n\n    /**\n     * @dev Converts a signed int256 into an unsigned uint256.\n     *\n     * Requirements:\n     *\n     * - input must be greater than or equal to 0.\n     */\n    function toUint256(int256 value) internal pure returns (uint256) {\n        if (value < 0) {\n            revert SafeCastOverflowedIntToUint(value);\n        }\n        return uint256(value);\n    }\n\n    /**\n     * @dev Returns the downcasted int248 from int256, reverting on\n     * overflow (when the input is less than smallest int248 or\n     * greater than largest int248).\n     *\n     * Counterpart to Solidity's `int248` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 248 bits\n     */\n    function toInt248(int256 value) internal pure returns (int248 downcasted) {\n        downcasted = int248(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(248, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int240 from int256, reverting on\n     * overflow (when the input is less than smallest int240 or\n     * greater than largest int240).\n     *\n     * Counterpart to Solidity's `int240` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 240 bits\n     */\n    function toInt240(int256 value) internal pure returns (int240 downcasted) {\n        downcasted = int240(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(240, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int232 from int256, reverting on\n     * overflow (when the input is less than smallest int232 or\n     * greater than largest int232).\n     *\n     * Counterpart to Solidity's `int232` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 232 bits\n     */\n    function toInt232(int256 value) internal pure returns (int232 downcasted) {\n        downcasted = int232(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(232, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int224 from int256, reverting on\n     * overflow (when the input is less than smallest int224 or\n     * greater than largest int224).\n     *\n     * Counterpart to Solidity's `int224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toInt224(int256 value) internal pure returns (int224 downcasted) {\n        downcasted = int224(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(224, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int216 from int256, reverting on\n     * overflow (when the input is less than smallest int216 or\n     * greater than largest int216).\n     *\n     * Counterpart to Solidity's `int216` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 216 bits\n     */\n    function toInt216(int256 value) internal pure returns (int216 downcasted) {\n        downcasted = int216(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(216, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int208 from int256, reverting on\n     * overflow (when the input is less than smallest int208 or\n     * greater than largest int208).\n     *\n     * Counterpart to Solidity's `int208` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 208 bits\n     */\n    function toInt208(int256 value) internal pure returns (int208 downcasted) {\n        downcasted = int208(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(208, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int200 from int256, reverting on\n     * overflow (when the input is less than smallest int200 or\n     * greater than largest int200).\n     *\n     * Counterpart to Solidity's `int200` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 200 bits\n     */\n    function toInt200(int256 value) internal pure returns (int200 downcasted) {\n        downcasted = int200(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(200, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int192 from int256, reverting on\n     * overflow (when the input is less than smallest int192 or\n     * greater than largest int192).\n     *\n     * Counterpart to Solidity's `int192` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 192 bits\n     */\n    function toInt192(int256 value) internal pure returns (int192 downcasted) {\n        downcasted = int192(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(192, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int184 from int256, reverting on\n     * overflow (when the input is less than smallest int184 or\n     * greater than largest int184).\n     *\n     * Counterpart to Solidity's `int184` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 184 bits\n     */\n    function toInt184(int256 value) internal pure returns (int184 downcasted) {\n        downcasted = int184(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(184, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int176 from int256, reverting on\n     * overflow (when the input is less than smallest int176 or\n     * greater than largest int176).\n     *\n     * Counterpart to Solidity's `int176` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 176 bits\n     */\n    function toInt176(int256 value) internal pure returns (int176 downcasted) {\n        downcasted = int176(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(176, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int168 from int256, reverting on\n     * overflow (when the input is less than smallest int168 or\n     * greater than largest int168).\n     *\n     * Counterpart to Solidity's `int168` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 168 bits\n     */\n    function toInt168(int256 value) internal pure returns (int168 downcasted) {\n        downcasted = int168(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(168, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int160 from int256, reverting on\n     * overflow (when the input is less than smallest int160 or\n     * greater than largest int160).\n     *\n     * Counterpart to Solidity's `int160` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 160 bits\n     */\n    function toInt160(int256 value) internal pure returns (int160 downcasted) {\n        downcasted = int160(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(160, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int152 from int256, reverting on\n     * overflow (when the input is less than smallest int152 or\n     * greater than largest int152).\n     *\n     * Counterpart to Solidity's `int152` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 152 bits\n     */\n    function toInt152(int256 value) internal pure returns (int152 downcasted) {\n        downcasted = int152(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(152, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int144 from int256, reverting on\n     * overflow (when the input is less than smallest int144 or\n     * greater than largest int144).\n     *\n     * Counterpart to Solidity's `int144` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 144 bits\n     */\n    function toInt144(int256 value) internal pure returns (int144 downcasted) {\n        downcasted = int144(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(144, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int136 from int256, reverting on\n     * overflow (when the input is less than smallest int136 or\n     * greater than largest int136).\n     *\n     * Counterpart to Solidity's `int136` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 136 bits\n     */\n    function toInt136(int256 value) internal pure returns (int136 downcasted) {\n        downcasted = int136(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(136, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int128 from int256, reverting on\n     * overflow (when the input is less than smallest int128 or\n     * greater than largest int128).\n     *\n     * Counterpart to Solidity's `int128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toInt128(int256 value) internal pure returns (int128 downcasted) {\n        downcasted = int128(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(128, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int120 from int256, reverting on\n     * overflow (when the input is less than smallest int120 or\n     * greater than largest int120).\n     *\n     * Counterpart to Solidity's `int120` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 120 bits\n     */\n    function toInt120(int256 value) internal pure returns (int120 downcasted) {\n        downcasted = int120(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(120, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int112 from int256, reverting on\n     * overflow (when the input is less than smallest int112 or\n     * greater than largest int112).\n     *\n     * Counterpart to Solidity's `int112` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 112 bits\n     */\n    function toInt112(int256 value) internal pure returns (int112 downcasted) {\n        downcasted = int112(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(112, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int104 from int256, reverting on\n     * overflow (when the input is less than smallest int104 or\n     * greater than largest int104).\n     *\n     * Counterpart to Solidity's `int104` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 104 bits\n     */\n    function toInt104(int256 value) internal pure returns (int104 downcasted) {\n        downcasted = int104(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(104, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int96 from int256, reverting on\n     * overflow (when the input is less than smallest int96 or\n     * greater than largest int96).\n     *\n     * Counterpart to Solidity's `int96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toInt96(int256 value) internal pure returns (int96 downcasted) {\n        downcasted = int96(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(96, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int88 from int256, reverting on\n     * overflow (when the input is less than smallest int88 or\n     * greater than largest int88).\n     *\n     * Counterpart to Solidity's `int88` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 88 bits\n     */\n    function toInt88(int256 value) internal pure returns (int88 downcasted) {\n        downcasted = int88(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(88, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int80 from int256, reverting on\n     * overflow (when the input is less than smallest int80 or\n     * greater than largest int80).\n     *\n     * Counterpart to Solidity's `int80` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 80 bits\n     */\n    function toInt80(int256 value) internal pure returns (int80 downcasted) {\n        downcasted = int80(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(80, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int72 from int256, reverting on\n     * overflow (when the input is less than smallest int72 or\n     * greater than largest int72).\n     *\n     * Counterpart to Solidity's `int72` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 72 bits\n     */\n    function toInt72(int256 value) internal pure returns (int72 downcasted) {\n        downcasted = int72(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(72, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int64 from int256, reverting on\n     * overflow (when the input is less than smallest int64 or\n     * greater than largest int64).\n     *\n     * Counterpart to Solidity's `int64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toInt64(int256 value) internal pure returns (int64 downcasted) {\n        downcasted = int64(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(64, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int56 from int256, reverting on\n     * overflow (when the input is less than smallest int56 or\n     * greater than largest int56).\n     *\n     * Counterpart to Solidity's `int56` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 56 bits\n     */\n    function toInt56(int256 value) internal pure returns (int56 downcasted) {\n        downcasted = int56(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(56, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int48 from int256, reverting on\n     * overflow (when the input is less than smallest int48 or\n     * greater than largest int48).\n     *\n     * Counterpart to Solidity's `int48` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 48 bits\n     */\n    function toInt48(int256 value) internal pure returns (int48 downcasted) {\n        downcasted = int48(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(48, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int40 from int256, reverting on\n     * overflow (when the input is less than smallest int40 or\n     * greater than largest int40).\n     *\n     * Counterpart to Solidity's `int40` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 40 bits\n     */\n    function toInt40(int256 value) internal pure returns (int40 downcasted) {\n        downcasted = int40(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(40, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int32 from int256, reverting on\n     * overflow (when the input is less than smallest int32 or\n     * greater than largest int32).\n     *\n     * Counterpart to Solidity's `int32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toInt32(int256 value) internal pure returns (int32 downcasted) {\n        downcasted = int32(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(32, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int24 from int256, reverting on\n     * overflow (when the input is less than smallest int24 or\n     * greater than largest int24).\n     *\n     * Counterpart to Solidity's `int24` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 24 bits\n     */\n    function toInt24(int256 value) internal pure returns (int24 downcasted) {\n        downcasted = int24(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(24, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int16 from int256, reverting on\n     * overflow (when the input is less than smallest int16 or\n     * greater than largest int16).\n     *\n     * Counterpart to Solidity's `int16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toInt16(int256 value) internal pure returns (int16 downcasted) {\n        downcasted = int16(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(16, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int8 from int256, reverting on\n     * overflow (when the input is less than smallest int8 or\n     * greater than largest int8).\n     *\n     * Counterpart to Solidity's `int8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits\n     */\n    function toInt8(int256 value) internal pure returns (int8 downcasted) {\n        downcasted = int8(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(8, value);\n        }\n    }\n\n    /**\n     * @dev Converts an unsigned uint256 into a signed int256.\n     *\n     * Requirements:\n     *\n     * - input must be less than or equal to maxInt256.\n     */\n    function toInt256(uint256 value) internal pure returns (int256) {\n        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\n        if (value > uint256(type(int256).max)) {\n            revert SafeCastOverflowedUintToInt(value);\n        }\n        return int256(value);\n    }\n\n    /**\n     * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\n     */\n    function toUint(bool b) internal pure returns (uint256 u) {\n        assembly (\"memory-safe\") {\n            u := iszero(iszero(b))\n        }\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/utils/introspection/ERC165Upgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport {Initializable} from \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n */\nabstract contract ERC165Upgradeable is Initializable, IERC165 {\n    function __ERC165_init() internal onlyInitializing {\n    }\n\n    function __ERC165_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n        return interfaceId == type(IERC165).interfaceId;\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/utils/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-upgradeable/contracts/utils/PausableUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)\n\npragma solidity ^0.8.20;\n\nimport {ContextUpgradeable} from \"../utils/ContextUpgradeable.sol\";\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which 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 Initializes the contract in unpaused state.\n     */\n    function __Pausable_init() internal onlyInitializing {\n        __Pausable_init_unchained();\n    }\n\n    function __Pausable_init_unchained() internal onlyInitializing {\n        PausableStorage storage $ = _getPausableStorage();\n        $._paused = false;\n    }\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    /**\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":"src/interfaces/external/IBlacklist.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/**\n * @title Blacklist Interface\n * @author USD.AI Foundation\n */\ninterface IBlacklist {\n    /**\n     * @notice Check if an address is blacklisted (USDC)\n     * @param account Account\n     * @return Is blacklisted\n     */\n    function isBlacklisted(\n        address account\n    ) external view returns (bool);\n\n    /**\n     * @notice Check if an address is blocked (USDT)\n     * @param account Account\n     * @return Is blocked\n     */\n    function isBlocked(\n        address account\n    ) external view returns (bool);\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.1.0) (token/ERC20/extensions/IERC20Permit.sol)\n\npragma solidity ^0.8.20;\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 apply 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/interfaces/draft-IERC6093.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/draft-IERC6093.sol)\npragma solidity ^0.8.20;\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-20.\n     * Used in balance queries.\n     * @param owner Address of the current owner of a token.\n     */\n    error ERC721InvalidOwner(address owner);\n\n    /**\n     * @dev Indicates a `tokenId` whose `owner` is the zero address.\n     * @param tokenId Identifier number of a token.\n     */\n    error ERC721NonexistentToken(uint256 tokenId);\n\n    /**\n     * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     * @param tokenId Identifier number of a token.\n     * @param owner Address of the current owner of a token.\n     */\n    error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n    /**\n     * @dev Indicates a failure with the token `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     */\n    error ERC721InvalidSender(address sender);\n\n    /**\n     * @dev Indicates a failure with the token `receiver`. Used in transfers.\n     * @param receiver Address to which tokens are being transferred.\n     */\n    error ERC721InvalidReceiver(address receiver);\n\n    /**\n     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n     * @param operator Address that may be allowed to operate on tokens without being their owner.\n     * @param tokenId Identifier number of a token.\n     */\n    error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n    /**\n     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n     * @param approver Address initiating an approval operation.\n     */\n    error ERC721InvalidApprover(address approver);\n\n    /**\n     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n     * @param operator Address that may be allowed to operate on tokens without being their owner.\n     */\n    error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard 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/proxy/utils/Initializable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.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 reininitialization) 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 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        assembly {\n            $.slot := INITIALIZABLE_STORAGE\n        }\n    }\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 \"../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/Address.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (utils/Address.sol)\n\npragma solidity ^0.8.20;\n\nimport {Errors} from \"./Errors.sol\";\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n    /**\n     * @dev There's no code at `target` (it is not a contract).\n     */\n    error AddressEmptyCode(address target);\n\n    /**\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n     * `recipient`, forwarding all available gas and reverting on errors.\n     *\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\n     * imposed by `transfer`, making them unable to receive funds via\n     * `transfer`. {sendValue} removes this limitation.\n     *\n     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n     *\n     * IMPORTANT: because control is transferred to `recipient`, care must be\n     * taken to not create reentrancy vulnerabilities. Consider using\n     * {ReentrancyGuard} or the\n     * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n     */\n    function sendValue(address payable recipient, uint256 amount) internal {\n        if (address(this).balance < amount) {\n            revert Errors.InsufficientBalance(address(this).balance, amount);\n        }\n\n        (bool success, bytes memory returndata) = recipient.call{value: amount}(\"\");\n        if (!success) {\n            _revert(returndata);\n        }\n    }\n\n    /**\n     * @dev Performs a Solidity function call using a low level `call`. A\n     * plain `call` is an unsafe replacement for a function call: use this\n     * function instead.\n     *\n     * If `target` reverts with a revert reason or custom error, it is bubbled\n     * up by this function (like regular Solidity function calls). However, if\n     * the call reverted with no returned reason, this function reverts with a\n     * {Errors.FailedCall} error.\n     *\n     * Returns the raw returned data. To convert to the expected return value,\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n     *\n     * Requirements:\n     *\n     * - `target` must be a contract.\n     * - calling `target` with `data` must not revert.\n     */\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but also transferring `value` wei to `target`.\n     *\n     * Requirements:\n     *\n     * - the calling contract must have an ETH balance of at least `value`.\n     * - the called Solidity function must be `payable`.\n     */\n    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n        if (address(this).balance < value) {\n            revert Errors.InsufficientBalance(address(this).balance, value);\n        }\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResultFromTarget(target, success, returndata);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a static call.\n     */\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResultFromTarget(target, success, returndata);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a delegate call.\n     */\n    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n        (bool success, bytes memory returndata) = target.delegatecall(data);\n        return verifyCallResultFromTarget(target, success, returndata);\n    }\n\n    /**\n     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target\n     * was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case\n     * of an unsuccessful call.\n     */\n    function verifyCallResultFromTarget(\n        address target,\n        bool success,\n        bytes memory returndata\n    ) internal view returns (bytes memory) {\n        if (!success) {\n            _revert(returndata);\n        } else {\n            // only check if target is a contract if the call was successful and the return data is empty\n            // otherwise we already know that it was a contract\n            if (returndata.length == 0 && target.code.length == 0) {\n                revert AddressEmptyCode(target);\n            }\n            return returndata;\n        }\n    }\n\n    /**\n     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the\n     * revert reason or with a default {Errors.FailedCall} error.\n     */\n    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {\n        if (!success) {\n            _revert(returndata);\n        } else {\n            return returndata;\n        }\n    }\n\n    /**\n     * @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}.\n     */\n    function _revert(bytes memory returndata) private pure {\n        // Look for revert reason and bubble it up if present\n        if (returndata.length > 0) {\n            // The easiest way to bubble the revert reason is using memory via assembly\n            assembly (\"memory-safe\") {\n                let returndata_size := mload(returndata)\n                revert(add(32, returndata), returndata_size)\n            }\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.1.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.20;\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://eth.wiki/json-rpc/API#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://eth.wiki/json-rpc/API#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 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"}],"certified":false,"conflicting_implementations":null,"abi":[{"inputs":[{"internalType":"address","name":"swapAdapter_","type":"address"},{"internalType":"address","name":"baseYieldEscrow_","type":"address"},{"internalType":"address","name":"baseYieldRecipient_","type":"address"},{"internalType":"address","name":"bridgeAdapter_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"value","type":"address"}],"name":"BlacklistedAddress","type":"error"},{"inputs":[],"name":"ECDSAInvalidSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"name":"ECDSAInvalidSignatureLength","type":"error"},{"inputs":[{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"ECDSAInvalidSignatureS","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"inputs":[{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"ERC2612ExpiredSignature","type":"error"},{"inputs":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC2612InvalidSigner","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[],"name":"FailedCall","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"currentNonce","type":"uint256"}],"name":"InvalidAccountNonce","type":"error"},{"inputs":[],"name":"InvalidAddress","type":"error"},{"inputs":[],"name":"InvalidAmount","type":"error"},{"inputs":[],"name":"InvalidDecimals","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"InvalidParameters","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","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":[{"components":[{"internalType":"uint256","name":"rate","type":"uint256"},{"internalType":"uint256","name":"threshold","type":"uint256"}],"indexed":false,"internalType":"struct IUSDai.RateTier[]","name":"rateTiers","type":"tuple[]"}],"name":"BaseYieldRateTiersSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"isBlacklisted","type":"bool"}],"name":"BlacklistUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"address","name":"depositToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"depositAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"mintAmount","type":"uint256"}],"name":"Deposited","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"usdaiAmount","type":"uint256"}],"name":"Harvested","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"description","type":"string"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"Migrated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"address","name":"withdrawToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"usdaiAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"withdrawAmount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"IMPLEMENTATION_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"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":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseYieldAccrued","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bridgedSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"depositToken","type":"address"},{"internalType":"uint256","name":"depositAmount","type":"uint256"},{"internalType":"uint256","name":"usdaiAmountMinimum","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"depositToken","type":"address"},{"internalType":"uint256","name":"depositAmount","type":"uint256"},{"internalType":"uint256","name":"usdaiAmountMinimum","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"","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":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"harvest","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isBlacklisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"blacklisted","type":"bool"}],"name":"setBlacklist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"rate","type":"uint256"},{"internalType":"uint256","name":"threshold","type":"uint256"}],"internalType":"struct IUSDai.RateTier[]","name":"rateTiers","type":"tuple[]"}],"name":"setRateTiers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapAdapter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"withdrawToken","type":"address"},{"internalType":"uint256","name":"usdaiAmount","type":"uint256"},{"internalType":"uint256","name":"withdrawAmountMinimum","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"withdrawToken","type":"address"},{"internalType":"uint256","name":"usdaiAmount","type":"uint256"},{"internalType":"uint256","name":"withdrawAmountMinimum","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}],"is_changed_bytecode":false,"is_partially_verified":false,"package_name":null,"constructor_args":"0x00000000000000000000000056adba107da1cb73e423c19ec7685e8312d0ef040000000000000000000000009ddfd49ac4689cf894203794d792dcb38e4b1a9e0000000000000000000000000b2b2b2076d95dda7817e785989fe353fe955ef9000000000000000000000000ffa10065ce1d1c42fabc46e06b84ed8ffeb4bae5"}