{"file_path":"contracts/xManager/rwaManagers/USDY_InstantManager.sol","creation_status":"success","source_code":"// SPDX-License-Identifier: BUSL-1.1\n/*\n      ▄▄█████████▄\n   ╓██▀└ ,╓▄▄▄, '▀██▄\n  ██▀ ▄██▀▀╙╙▀▀██▄ └██µ           ,,       ,,      ,     ,,,            ,,,\n ██ ,██¬ ▄████▄  ▀█▄ ╙█▄      ▄███▀▀███▄   ███▄    ██  ███▀▀▀███▄    ▄███▀▀███,\n██  ██ ╒█▀'   ╙█▌ ╙█▌ ██     ▐██      ███  █████,  ██  ██▌    └██▌  ██▌     └██▌\n██ ▐█▌ ██      ╟█  █▌ ╟█     ██▌      ▐██  ██ └███ ██  ██▌     ╟██ j██       ╟██\n╟█  ██ ╙██    ▄█▀ ▐█▌ ██     ╙██      ██▌  ██   ╙████  ██▌    ▄██▀  ██▌     ,██▀\n ██ \"██, ╙▀▀███████████⌐      ╙████████▀   ██     ╙██  ███████▀▀     ╙███████▀`\n  ██▄ ╙▀██▄▄▄▄▄,,,                ¬─                                    '─¬\n   ╙▀██▄ '╙╙╙▀▀▀▀▀▀▀▀\n      ╙▀▀██████R⌐\n */\npragma solidity 0.8.16;\n\nimport \"contracts/xManager/rwaManagers/BaseRWAManager.sol\";\nimport \"contracts/interfaces/IRWALike.sol\";\nimport \"contracts/usdy/rusdy/rUSDY.sol\";\nimport \"contracts/xManager/interfaces/IUSDY_InstantManager.sol\";\n\n/**\n * @title  USDY_InstantManager\n * @author Ondo Finance\n * @notice This contract manages instant subscriptions and redemptions of USDY and rUSDY tokens,\n *         with support for conversion between USDY and rUSDY.\n *\n *         This contract allows for:\n *         - Users to instantly subscribe to USDY or rUSDY by depositing supported tokens\n *         - Users to redeem USDY or rUSDY back to supported tokens\n *         - An admin to execute manual subscriptions for specialized use cases\n */\ncontract USDY_InstantManager is BaseRWAManager, IUSDY_InstantManager {\n  /// The rebasing USDY token contract\n  rUSDY public immutable rusdy;\n\n  /// Helper constant for converting between USDY tokens and rUSDY shares\n  uint256 public constant USDY_TO_RUSDY_SHARES_MULTIPLIER = 10_000;\n\n  /**\n   * @notice Event emitted when a user mints rUSDY\n   * @param  recipient      Address of the recipient\n   * @param  usdyAmountOut  Amount of USDY wrapped for the user\n   * @param  rusdyAmountOut Amount of rUSDY sent to user\n   * @param  depositToken   Address of the token deposited\n   * @param  depositAmount  Amount of tokens deposited, denoted in decimals of `depositToken`\n   */\n  event InstantSubscriptionRebasingUSDY(\n    address indexed recipient,\n    uint256 usdyAmountOut,\n    uint256 rusdyAmountOut,\n    address depositToken,\n    uint256 depositAmount\n  );\n\n  /**\n   * @notice Event emitted when a user redeems rUSDY\n   * @param  redeemer           Address of the redeemer\n   * @param  usdyAmountIn       Amount of USDY unwrapped for the user\n   * @param  rusdyAmountIn      Amount of the rUSDY burned for the redemption\n   * @param  receivingToken     Address of the token received\n   * @param  receiveTokenAmount Amount of tokens received, denoted in decimals of `receivingToken`\n   */\n  event InstantRedemptionRebasingUSDY(\n    address indexed redeemer,\n    uint256 usdyAmountIn,\n    uint256 rusdyAmountIn,\n    address receivingToken,\n    uint256 receiveTokenAmount\n  );\n\n  /**\n   * @notice Event emitted when an admin mints rUSDY\n   * @param  recipient   Address of the recipient\n   * @param  usdyAmount  Amount of USDY wrapped for the user\n   * @param  rusdyAmount Amount of rUSDY sent to recipient\n   * @param  metadata    Metadata for the subscription\n   */\n  event AdminSubscriptionRebasingUSDY(\n    address indexed recipient,\n    uint256 usdyAmount,\n    uint256 rusdyAmount,\n    bytes32 metadata\n  );\n\n  /// Error emitted when setting the rUSDY address to the zero address\n  error RebasingUSDYCantBeZeroAddress();\n\n  /**\n   * @param _defaultAdmin            The default admin address\n   * @param _rwaToken                The USDY token address\n   * @param _rusdy                   The rUSDY token address\n   * @param _minimumDepositAmount    The minimum deposit amount\n   * @param _minimumRedemptionAmount The minimum redemption amount\n   */\n  constructor(\n    address _defaultAdmin,\n    address _rwaToken,\n    address _rusdy,\n    uint256 _minimumDepositAmount,\n    uint256 _minimumRedemptionAmount\n  )\n    BaseRWAManager(\n      _defaultAdmin,\n      _rwaToken,\n      _minimumDepositAmount,\n      _minimumRedemptionAmount\n    )\n  {\n    if (_rusdy == address(0)) revert RebasingUSDYCantBeZeroAddress();\n    rusdy = rUSDY(_rusdy);\n  }\n\n  /**\n   * @notice Subscribes to the RWA using the specified deposit token and amount\n   * @param  depositToken       The address of the token to be deposited\n   * @param  depositAmount      The amount of the deposit token to be deposited, expected to be in\n   *                            decimals of `depositToken`\n   * @param  minimumRwaReceived The minimum amount of RWA to be received from the subscription,\n   *                            expected to be in decimals of the RWA token\n   * @return rwaAmountOut       The amount of RWA received from the subscription, expected to be in\n   *                            decimals of the RWA token\n   */\n  function subscribe(\n    address depositToken,\n    uint256 depositAmount,\n    uint256 minimumRwaReceived\n  ) external nonReentrant returns (uint256 rwaAmountOut) {\n    rwaAmountOut = _processSubscription(\n      depositToken,\n      depositAmount,\n      minimumRwaReceived\n    );\n    IRWALike(rwaToken).mint(_msgSender(), rwaAmountOut);\n  }\n\n  /**\n   * @notice Subscribes to rUSDY. This works similar to `subscribe`, but\n   *         wraps the USDY into rUSDY before transferring to the user.\n   * @param  depositToken         The token to deposit\n   * @param  depositAmount        Amount of tokens to deposit, denoted in decimals of the\n   *                              `depositToken`\n   * @param  minimumRusdyReceived Minimum amount of rUSDY to receive\n   * @return rusdyAmountOut       Amount of rUSDY received, in decimals of rUSDY\n   */\n  function subscribeRebasingUSDY(\n    address depositToken,\n    uint256 depositAmount,\n    uint256 minimumRusdyReceived\n  ) external nonReentrant returns (uint256 rusdyAmountOut) {\n    uint256 minimumOusgAmount = rusdy.getSharesByRUSDY(minimumRusdyReceived) /\n      USDY_TO_RUSDY_SHARES_MULTIPLIER;\n    uint256 usdyAmountOut = _processSubscription(\n      depositToken,\n      depositAmount,\n      minimumOusgAmount\n    );\n\n    IRWALike(rwaToken).mint(address(this), usdyAmountOut);\n    IRWALike(rwaToken).approve(address(rusdy), usdyAmountOut);\n    rusdy.wrap(usdyAmountOut);\n    rusdyAmountOut = rusdy.transferShares(\n      _msgSender(),\n      usdyAmountOut * USDY_TO_RUSDY_SHARES_MULTIPLIER\n    );\n\n    // Verify rUSDY amount received directly, avoiding precision loss from checking USDY values\n    // in `_processSubscription`\n    if (rusdyAmountOut < minimumRusdyReceived)\n      revert RwaReceiveAmountTooSmall();\n\n    emit InstantSubscriptionRebasingUSDY(\n      _msgSender(),\n      usdyAmountOut,\n      rusdyAmountOut,\n      depositToken,\n      depositAmount\n    );\n  }\n\n  /**\n   * @notice Allows an admin to subscribe on behalf of a recipient with the specified RWA amount\n   *         and metadata\n   * @param  recipient The address of the recipient\n   * @param  rwaAmount The amount of RWA to be subscribed, expected to be in decimals of the RWA\n   *                   token\n   * @param  metadata  Additional metadata associated with the subscription\n   */\n  function adminSubscribe(\n    address recipient,\n    uint256 rwaAmount,\n    bytes32 metadata\n  ) external nonReentrant {\n    _adminProcessSubscription(recipient, rwaAmount, metadata);\n    IRWALike(rwaToken).mint(recipient, rwaAmount);\n  }\n\n  /**\n   * @notice Performs an admin subscription to rUSDY. This works similar to\n   *         `adminSubscribe`, but wraps the USDY to rUSDY before transferring the tokens\n   *         to the user.\n   * @param  recipient    Recipient of the rUSDY\n   * @param  rusdyAmount  Amount of rUSDY to send, in decimals of rUSDY\n   * @param  metadata     Metadata for the subscription\n   */\n  function adminSubscribeRebasingUSDY(\n    address recipient,\n    uint256 rusdyAmount,\n    bytes32 metadata\n  ) external nonReentrant {\n    uint256 usdyAmount = rusdy.getSharesByRUSDY(rusdyAmount) /\n      USDY_TO_RUSDY_SHARES_MULTIPLIER;\n    _adminProcessSubscription(recipient, usdyAmount, metadata);\n    IRWALike(rwaToken).mint(address(this), usdyAmount);\n    IRWALike(rwaToken).approve(address(rusdy), usdyAmount);\n    rusdy.wrap(usdyAmount);\n    rusdy.transferShares(\n      recipient,\n      usdyAmount * USDY_TO_RUSDY_SHARES_MULTIPLIER\n    );\n\n    emit AdminSubscriptionRebasingUSDY(\n      recipient,\n      usdyAmount,\n      rusdyAmount,\n      metadata\n    );\n  }\n\n  /**\n   * @notice Redeems the specified amount of RWA for the receiving token\n   * @param  rwaAmount            The amount of RWA to be redeemed, expected to be in decimals of\n   *                              the RWA token\n   * @param  receivingToken       The address of the token to receive\n   * @param  minimumTokenReceived The minimum amount of the receiving token to be received,\n   *                              expected to be in decimals of `receivingToken`\n   * @return receiveTokenAmount   The amount of the token received from the redemption, expected\n   *                              to be in decimals of the `receivingToken`\n   */\n  function redeem(\n    uint256 rwaAmount,\n    address receivingToken,\n    uint256 minimumTokenReceived\n  ) external nonReentrant returns (uint256 receiveTokenAmount) {\n    IRWALike(rwaToken).transferFrom(_msgSender(), address(this), rwaAmount);\n    IRWALike(rwaToken).burn(rwaAmount);\n\n    receiveTokenAmount = _processRedemption(\n      rwaAmount,\n      receivingToken,\n      minimumTokenReceived\n    );\n  }\n\n  /**\n   * @notice Performs a rUSDY redemption. This works similar to `redeem`, but\n   *         unwraps the rUSDY to USDY before processing the redemption.\n   * @param  rusdyAmount            Amount of rUSDY to redeem\n   * @param  receivingToken         Token to receive\n   * @param  minimumTokenReceived   Minimum amount of tokens to receive, denoted in decimals of\n   *                                `receivingToken`\n   * @return receiveTokenAmount     Amount of tokens received, denoted in decimals of\n   *                                `receivingToken`\n   */\n  function redeemRebasingUSDY(\n    uint256 rusdyAmount,\n    address receivingToken,\n    uint256 minimumTokenReceived\n  ) external nonReentrant returns (uint256 receiveTokenAmount) {\n    rusdy.transferFrom(_msgSender(), address(this), rusdyAmount);\n    rusdy.unwrap(rusdyAmount);\n    uint256 usdyAmountIn = rusdy.getSharesByRUSDY(rusdyAmount) /\n      USDY_TO_RUSDY_SHARES_MULTIPLIER;\n    IRWALike(rwaToken).burn(usdyAmountIn);\n    receiveTokenAmount = _processRedemption(\n      usdyAmountIn,\n      receivingToken,\n      minimumTokenReceived\n    );\n    emit InstantRedemptionRebasingUSDY(\n      _msgSender(),\n      usdyAmountIn,\n      rusdyAmount,\n      receivingToken,\n      receiveTokenAmount\n    );\n  }\n}\n","deployed_bytecode":"0x608060405234801561001057600080fd5b50600436106103785760003560e01c80637b0e1c57116101d3578063af3345d111610104578063d547741f116100a2578063e64338341161007c578063e6433834146107c4578063f3a408da146107d7578063fd84a072146107df578063fe6f14c5146107f257600080fd5b8063d547741f14610777578063d87801611461078a578063e63ab1e91461079d57600080fd5b8063ba2a1c4d116100de578063ba2a1c4d14610717578063c768b1451461073e578063c8e1585d14610751578063ca15c8731461076457600080fd5b8063af3345d1146106ea578063afb6794e146106f2578063b235d4681461070557600080fd5b80638f8eb81211610171578063a217fddf1161014b578063a217fddf146106a7578063aab483d6146106af578063abbb9f4c146106c2578063ad129e77146106d757600080fd5b80638f8eb812146106785780639010d07c1461068157806391d148541461069457600080fd5b80638133067e116101ad5780638133067e1461061657806386dd535c14610629578063884a05011461063c5780638f4f96131461065f57600080fd5b80637b0e1c57146105c95780637ead09e8146105dc578063811400fa1461060357600080fd5b806336568abe116102ad578063531acc131161024b5780636085057411610225578063608505741461058b57806361fca4551461059457806368f26f82146105a7578063695e122d146105b657600080fd5b8063531acc131461056257806359e0f36f1461056b5780635f1270791461057e57600080fd5b80633faed166116102875780633faed1661461052157806340db35e0146105345780634ce78490146105475780634ef1ccd11461054f57600080fd5b806336568abe146104e85780633e4af11f146104fb5780633f9832581461050e57600080fd5b806322d4a1751161031a578063248a9ca3116102f4578063248a9ca3146104965780632d7d41ab146104ba5780632f2ff15d146104cd57806332ec84d2146104e057600080fd5b806322d4a1751461046557806323991e4b14610478578063245513ce1461048d57600080fd5b806310a4f09f1161035657806310a4f09f146103f757806316762d7a1461041e5780631ee547e71461043f57806321e0e0cf1461045257600080fd5b806301ffc9a71461037d5780630c5bf351146103a55780630ded4a6f146103e4575b600080fd5b61039061038b366004613642565b610815565b60405190151581526020015b60405180910390f35b6103cc7f00000000000000000000000096f6ef951840721adbf46ac996b59e0235cb985c81565b6040516001600160a01b03909116815260200161039c565b600d546103cc906001600160a01b031681565b6103cc7f000000000000000000000000af37c1167910ebc994e266949387d2c7c326b87981565b61043161042c366004613688565b610840565b60405190815260200161039c565b6008546103cc906001600160a01b031681565b6007546103cc906001600160a01b031681565b6104316104733660046136bd565b610b03565b61048b6104863660046136f0565b610bc7565b005b61043161271081565b6104316104a436600461370b565b6000908152600160208190526040909120015490565b61048b6104c83660046136bd565b610cdb565b61048b6104db366004613724565b610d97565b61048b610dbe565b61048b6104f6366004613724565b610e24565b61048b6105093660046136f0565b610ea2565b61048b61051c3660046136bd565b610fd6565b61048b61052f366004613761565b611345565b61048b6105423660046136f0565b611452565b61048b6114e2565b61048b61055d36600461370b565b611524565b61043160035481565b61048b6105793660046136f0565b611572565b6006546103909060ff1681565b61043160055481565b61048b6105a23660046136f0565b611676565b610431670de0b6b3a764000081565b61048b6105c4366004613761565b611705565b61048b6105d7366004613798565b611812565b6104317f0000000000000000000000000000000000000000000000000de0b6b3a764000081565b600a546103cc906001600160a01b031681565b6104316106243660046136bd565b611838565b61048b6106373660046136f0565b611bdd565b61039061064a3660046136f0565b600f6020526000908152604090205460ff1681565b6006546103cc906201000090046001600160a01b031681565b61043160045481565b6103cc61068f3660046137c4565b611c6c565b6103906106a2366004613724565b611c8b565b610431600081565b61048b6106bd36600461370b565b611cb6565b610431600080516020613bd383398151915281565b61048b6106e53660046136f0565b611d04565b61048b611d94565b61048b6107003660046136f0565b611dd7565b60065461039090610100900460ff1681565b6104317fb94da9555321002e2f278a8e588b6b5c51fa2748893b00f6e45fc41af53493ab81565b6009546103cc906001600160a01b031681565b600b546103cc906001600160a01b031681565b61043161077236600461370b565b611e75565b61048b610785366004613724565b611e8c565b610431610798366004613688565b611eb3565b6104317f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b600c546103cc906001600160a01b031681565b61048b612002565b61048b6107ed36600461370b565b612066565b6103906108003660046136f0565b600e6020526000908152604090205460ff1681565b60006001600160e01b03198216635a05180f60e01b148061083a575061083a82612134565b92915050565b600060026000540361086d5760405162461bcd60e51b8152600401610864906137e6565b60405180910390fd5b60026000556040516323b872dd60e01b81526001600160a01b037f000000000000000000000000af37c1167910ebc994e266949387d2c7c326b87916906323b872dd906108c29033903090899060040161381d565b6020604051808303816000875af11580156108e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109059190613841565b50604051636f074d1f60e11b8152600481018590527f000000000000000000000000af37c1167910ebc994e266949387d2c7c326b8796001600160a01b03169063de0e9a3e90602401600060405180830381600087803b15801561096857600080fd5b505af115801561097c573d6000803e3d6000fd5b50506040516358af948f60e11b8152600481018790526000925061271091506001600160a01b037f000000000000000000000000af37c1167910ebc994e266949387d2c7c326b879169063b15f291e90602401602060405180830381865afa1580156109ec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a10919061385e565b610a1a919061388d565b604051630852cd8d60e31b8152600481018290529091507f00000000000000000000000096f6ef951840721adbf46ac996b59e0235cb985c6001600160a01b0316906342966c6890602401600060405180830381600087803b158015610a7f57600080fd5b505af1158015610a93573d6000803e3d6000fd5b50505050610aa2818585612169565b60408051838152602081018890526001600160a01b0387168183015260608101839052905191935033917f9ef7a247f6b9f5762b48aaef49860629bb5fec37c2e12bc46a980abd704ab0459181900360800190a25060016000559392505050565b6000600260005403610b275760405162461bcd60e51b8152600401610864906137e6565b6002600055610b378484846126db565b6040516340c10f1960e01b81529091507f00000000000000000000000096f6ef951840721adbf46ac996b59e0235cb985c6001600160a01b0316906340c10f1990610b8890339085906004016138af565b600060405180830381600087803b158015610ba257600080fd5b505af1158015610bb6573d6000803e3d6000fd5b505060016000555090949350505050565b6000610bd38133612c59565b6001600160a01b038216610bfa57604051633d04535360e21b815260040160405180910390fd5b6009546040516001600160a01b038085169216907ff78e014ab86d7bb38135262d64726cef2e151dae47c0947a1d6bb970702c30d690600090a3600980546001600160a01b0319166001600160a01b038416908117909155604051637f19077160e01b8152637f19077190610c95907f00000000000000000000000096f6ef951840721adbf46ac996b59e0235cb985c9030906004016138c8565b602060405180830381865afa158015610cb2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd6919061385e565b505050565b600260005403610cfd5760405162461bcd60e51b8152600401610864906137e6565b6002600055610d0d838383612cbd565b6040516340c10f1960e01b81526001600160a01b037f00000000000000000000000096f6ef951840721adbf46ac996b59e0235cb985c16906340c10f1990610d5b90869086906004016138af565b600060405180830381600087803b158015610d7557600080fd5b505af1158015610d89573d6000803e3d6000fd5b505060016000555050505050565b60008281526001602081905260409091200154610db48133612c59565b610cd68383612fdb565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a610de98133612c59565b6006805461ff0019166101001790556040517f60b78ed2d882d2d2387ad2b7119495f7c99dd9a9c191d3d02c35982a0750bcc690600090a150565b6001600160a01b0381163314610e945760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610864565b610e9e8282612ffd565b5050565b6000610eae8133612c59565b6001600160a01b038216610ed557604051632233f8fd60e21b815260040160405180910390fd5b6007546040516001600160a01b038085169216907f6c9074ba8ab5c258404464c9703de55127adb996134fd80d450ce94eb76ff59090600090a3600780546001600160a01b0319166001600160a01b0384811691821790925560405163b3596f0760e01b81527f00000000000000000000000096f6ef951840721adbf46ac996b59e0235cb985c909216600483015260009163b3596f0790602401602060405180830381865afa158015610f8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb1919061385e565b9050600554811015610cd657604051633b2f2ac960e11b815260040160405180910390fd5b600260005403610ff85760405162461bcd60e51b8152600401610864906137e6565b600260009081556040516358af948f60e11b815260048101849052612710907f000000000000000000000000af37c1167910ebc994e266949387d2c7c326b8796001600160a01b03169063b15f291e90602401602060405180830381865afa158015611068573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061108c919061385e565b611096919061388d565b90506110a3848284612cbd565b6040516340c10f1960e01b81526001600160a01b037f00000000000000000000000096f6ef951840721adbf46ac996b59e0235cb985c16906340c10f19906110f190309085906004016138af565b600060405180830381600087803b15801561110b57600080fd5b505af115801561111f573d6000803e3d6000fd5b505060405163095ea7b360e01b81526001600160a01b037f00000000000000000000000096f6ef951840721adbf46ac996b59e0235cb985c16925063095ea7b39150611191907f000000000000000000000000af37c1167910ebc994e266949387d2c7c326b8799085906004016138af565b6020604051808303816000875af11580156111b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d49190613841565b50604051630ea598cb60e41b8152600481018290527f000000000000000000000000af37c1167910ebc994e266949387d2c7c326b8796001600160a01b03169063ea598cb090602401600060405180830381600087803b15801561123757600080fd5b505af115801561124b573d6000803e3d6000fd5b505050507f000000000000000000000000af37c1167910ebc994e266949387d2c7c326b8796001600160a01b0316638fcb4e5b856127108461128d91906138e2565b6040518363ffffffff1660e01b81526004016112aa9291906138af565b6020604051808303816000875af11580156112c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112ed919061385e565b5060408051828152602081018590529081018390526001600160a01b038516907ffd614e52d7b496f0d3f713f3a55ea6a08921356a6778f1565134f76da6731d6a9060600160405180910390a2505060016000555050565b60006113518133612c59565b6001600160a01b0383166113785760405163885ce5f160e01b815260040160405180910390fd5b81156113ee5760075460405163b3596f0760e01b81526001600160a01b0385811660048301529091169063b3596f0790602401602060405180830381865afa1580156113c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113ec919061385e565b505b604051821515906001600160a01b038516907fb69d0cdc257fe2726a8ebd7602c8a681fd8152961d1c38a5d5b3090a4d96b20c90600090a3506001600160a01b03919091166000908152600e60205260409020805460ff1916911515919091179055565b600061145e8133612c59565b6001600160a01b0382166114855760405163524d94d960e11b815260040160405180910390fd5b600d546040516001600160a01b038085169216907ff68d3e8139cf85c4c8ea147060134c79e97dbfa33f3f6a9d4cdec44ef467c74790600090a350600d80546001600160a01b0319166001600160a01b0392909216919091179055565b60006114ee8133612c59565b6006805460ff191690556040517f849babeb0c1b4e2b3842433574a5cdfe23ffde54c64651d42a6b02e8f98cbf8a90600090a150565b600080516020613bd383398151915261153d8133612c59565b6004546040518391907ffdaf6ed728cef208e62328a008209556f8281f3062b14dd08aaaa90fa159421190600090a350600455565b600061157e8133612c59565b6001600160a01b0382166115a557604051630b69326560e11b815260040160405180910390fd5b6008546040516001600160a01b038085169216907fdbc2a9769fa2b31eadfb16b690e3c783592becd0b822401b274a90a34d80b6dc90600090a3600880546001600160a01b0319166001600160a01b0384169081179091556040516334dae8d560e01b81526334dae8d590611640907f00000000000000000000000096f6ef951840721adbf46ac996b59e0235cb985c9030906004016138c8565b600060405180830381600087803b15801561165a57600080fd5b505af115801561166e573d6000803e3d6000fd5b505050505050565b60006116828133612c59565b6001600160a01b0382166116a8576040516291d13760e51b815260040160405180910390fd5b600b546040516001600160a01b038085169216907f24fdea3a24a4edda22c10620f63628ed57f6b60d457d833035a316ab15684c9490600090a350600b80546001600160a01b0319166001600160a01b0392909216919091179055565b60006117118133612c59565b6001600160a01b0383166117385760405163885ce5f160e01b815260040160405180910390fd5b81156117ae5760075460405163b3596f0760e01b81526001600160a01b0385811660048301529091169063b3596f0790602401602060405180830381865afa158015611788573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117ac919061385e565b505b604051821515906001600160a01b038516907f34e319579e041b2d04a5a9ff137ef4511e2db49d2da0512cdbe3845c32bc933a90600090a3506001600160a01b03919091166000908152600f60205260409020805460ff1916911515919091179055565b600061181e8133612c59565b6118326001600160a01b038516848461301f565b50505050565b600060026000540361185c5760405162461bcd60e51b8152600401610864906137e6565b600260009081556040516358af948f60e11b815260048101849052612710907f000000000000000000000000af37c1167910ebc994e266949387d2c7c326b8796001600160a01b03169063b15f291e90602401602060405180830381865afa1580156118cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f0919061385e565b6118fa919061388d565b905060006119098686846126db565b6040516340c10f1960e01b81529091506001600160a01b037f00000000000000000000000096f6ef951840721adbf46ac996b59e0235cb985c16906340c10f199061195a90309085906004016138af565b600060405180830381600087803b15801561197457600080fd5b505af1158015611988573d6000803e3d6000fd5b505060405163095ea7b360e01b81526001600160a01b037f00000000000000000000000096f6ef951840721adbf46ac996b59e0235cb985c16925063095ea7b391506119fa907f000000000000000000000000af37c1167910ebc994e266949387d2c7c326b8799085906004016138af565b6020604051808303816000875af1158015611a19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a3d9190613841565b50604051630ea598cb60e41b8152600481018290527f000000000000000000000000af37c1167910ebc994e266949387d2c7c326b8796001600160a01b03169063ea598cb090602401600060405180830381600087803b158015611aa057600080fd5b505af1158015611ab4573d6000803e3d6000fd5b505050507f000000000000000000000000af37c1167910ebc994e266949387d2c7c326b8796001600160a01b0316638fcb4e5b611aee3390565b611afa612710856138e2565b6040518363ffffffff1660e01b8152600401611b179291906138af565b6020604051808303816000875af1158015611b36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b5a919061385e565b925083831015611b7d5760405163c5db0fc160e01b815260040160405180910390fd5b60408051828152602081018590526001600160a01b0388168183015260608101879052905133917f9d1b78864fb222ffcf82e2444ee22d6bb9cf52d41b71914f34e1597f23423ca4919081900360800190a2505060016000559392505050565b6000611be98133612c59565b6001600160a01b038216611c0f576040516291d13760e51b815260040160405180910390fd5b600c546040516001600160a01b038085169216907f849fba91aaeaa62c2a7f48c8ff7c26b006ca3ae247c1640072ecf571e31040c890600090a350600c80546001600160a01b0319166001600160a01b0392909216919091179055565b6000828152600260205260408120611c849083613077565b9392505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600080516020613bd3833981519152611ccf8133612c59565b6003546040518391907fe6e25add7363f8f8a40cbea9810d3115a33703b10972ef759104219b0065743690600090a350600355565b6000611d108133612c59565b6001600160a01b038216611d3757604051633aa9ba3360e01b815260040160405180910390fd5b600a546040516001600160a01b038085169216907fc54bf4c3067c1d8f65e053dafb5dbb699615b1b527d2866bd0223102bb2e692d90600090a350600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6000611da08133612c59565b6006805461ff00191690556040517f687bf6e69dbabcc95e11041b4816a83f36dcf6ef647f6acf63e7469d28f5ea7390600090a150565b6000611de38133612c59565b6001600160a01b038216611e0a5760405163341d47c360e01b815260040160405180910390fd5b6006546040516001600160a01b038085169262010000900416907f132a375a3726b76fcc71a6992f19961145ed03f35eca19ad07381f43501c2b5e90600090a350600680546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b600081815260026020526040812061083a90613083565b60008281526001602081905260409091200154611ea98133612c59565b610cd68383612ffd565b6000600260005403611ed75760405162461bcd60e51b8152600401610864906137e6565b60026000556040516323b872dd60e01b81526001600160a01b037f00000000000000000000000096f6ef951840721adbf46ac996b59e0235cb985c16906323b872dd90611f2c9033903090899060040161381d565b6020604051808303816000875af1158015611f4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6f9190613841565b50604051630852cd8d60e31b8152600481018590527f00000000000000000000000096f6ef951840721adbf46ac996b59e0235cb985c6001600160a01b0316906342966c6890602401600060405180830381600087803b158015611fd257600080fd5b505af1158015611fe6573d6000803e3d6000fd5b50505050611ff5848484612169565b6001600055949350505050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a61202d8133612c59565b6006805460ff191660011790556040517fb9964f53255ea6cb323618cebc0c47de4f99089e9993d1862f24e2fdaf2a31e590600090a150565b600080516020613bd383398151915261207f8133612c59565b6005546040518391907f8ba90cff6e6e2b8e73cee7f3c5356cca13f1715f39f5eaa6164a99b49e497c8e90600090a350600555565b6120be8282611c8b565b610e9e5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b6000611c84836001600160a01b03841661308d565b60006001600160e01b03198216637965db0b60e01b148061083a57506301ffc9a760e01b6001600160e01b031983161461083a565b600654600090610100900460ff161561219557604051630df65d9f60e01b815260040160405180910390fd5b6001600160a01b0383166000908152600f602052604090205460ff166121ce5760405163e51cf7bf60e01b815260040160405180910390fd5b6008546001600160a01b03166334dae8d57f00000000000000000000000096f6ef951840721adbf46ac996b59e0235cb985c336040518363ffffffff1660e01b815260040161221e9291906138c8565b600060405180830381600087803b15801561223857600080fd5b505af115801561224c573d6000803e3d6000fd5b5050600954604051637f19077160e01b8152600093506001600160a01b039091169150637f190771906122a5907f00000000000000000000000096f6ef951840721adbf46ac996b59e0235cb985c9033906004016138c8565b602060405180830381865afa1580156122c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122e6919061385e565b90508061230657604051632163950f60e01b815260040160405180910390fd5b60007f0000000000000000000000000000000000000000000000000de0b6b3a7640000866123326130dc565b61233c91906138e2565b612346919061388d565b905060045481101561236b5760405163680116dd60e11b815260040160405180910390fd5b600c5460405163c75af63560e01b81526000916001600160a01b03169063c75af635906123c2907f00000000000000000000000096f6ef951840721adbf46ac996b59e0235cb985c908a9088908890600401613901565b6020604051808303816000875af11580156123e1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612405919061385e565b90508181111561242857604051635774f9b360e11b815260040160405180910390fd5b600a54604051637d4945b760e01b81526001600160a01b0390911690637d4945b79061247f906001907f00000000000000000000000096f6ef951840721adbf46ac996b59e0235cb985c908890889060040161392a565b600060405180830381600087803b15801561249957600080fd5b505af11580156124ad573d6000803e3d6000fd5b505060075460405163b3596f0760e01b81526001600160a01b038a81166004830152909116925063b3596f079150602401602060405180830381865afa1580156124fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061251f919061385e565b866001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561255d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125819190613971565b61258c90600a613a78565b6125968385613a87565b6125a091906138e2565b6125aa919061388d565b9350848410156125cd57604051638f19033960e01b815260040160405180910390fd5b60065460405163071f2cab60e51b8152620100009091046001600160a01b03169063e3e5956090612628907f00000000000000000000000096f6ef951840721adbf46ac996b59e0235cb985c908a9088908a90600401613901565b600060405180830381600087803b15801561264257600080fd5b505af1158015612656573d6000803e3d6000fd5b505050506126756126643390565b6001600160a01b038816908661301f565b604080518881526001600160a01b03881660208201529081018590526060810183905260808101829052839033907f7023b7bcd020761014c9e1590603f4effceabc102cf0b8023c3f2b14db9ffb6e9060a0015b60405180910390a35050509392505050565b60065460009060ff1615612702576040516302822dcd60e51b815260040160405180910390fd5b6001600160a01b0384166000908152600e602052604090205460ff1661273b5760405163e51cf7bf60e01b815260040160405180910390fd5b6008546001600160a01b03166334dae8d57f00000000000000000000000096f6ef951840721adbf46ac996b59e0235cb985c336040518363ffffffff1660e01b815260040161278b9291906138c8565b600060405180830381600087803b1580156127a557600080fd5b505af11580156127b9573d6000803e3d6000fd5b5050600954604051637f19077160e01b8152600093506001600160a01b039091169150637f19077190612812907f00000000000000000000000096f6ef951840721adbf46ac996b59e0235cb985c9033906004016138c8565b602060405180830381865afa15801561282f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612853919061385e565b90508061287357604051632163950f60e01b815260040160405180910390fd5b6128886001600160a01b038616333087613193565b6006546128a8906001600160a01b038781169162010000900416866131bb565b600654604051631f61f2f560e31b8152620100009091046001600160a01b03169063fb0f97a890612901907f00000000000000000000000096f6ef951840721adbf46ac996b59e0235cb985c908990899060040161381d565b600060405180830381600087803b15801561291b57600080fd5b505af115801561292f573d6000803e3d6000fd5b505050506000856001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015612973573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129979190613971565b6129a290600a613a78565b60075460405163b3596f0760e01b81526001600160a01b0389811660048301528892169063b3596f0790602401602060405180830381865afa1580156129ec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a10919061385e565b612a1a91906138e2565b612a24919061388d565b9050600354811015612a49576040516367627d0760e01b815260040160405180910390fd5b600b5460405163c75af63560e01b81526000916001600160a01b03169063c75af63590612aa0907f00000000000000000000000096f6ef951840721adbf46ac996b59e0235cb985c908b9088908890600401613901565b6020604051808303816000875af1158015612abf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ae3919061385e565b905081811115612b065760405163566f172560e11b815260040160405180910390fd5b612b0e6130dc565b7f0000000000000000000000000000000000000000000000000de0b6b3a7640000612b398385613a87565b612b4391906138e2565b612b4d919061388d565b935084841015612b705760405163c5db0fc160e01b815260040160405180910390fd5b600a54604051637d4945b760e01b81526001600160a01b0390911690637d4945b790612bc7906000907f00000000000000000000000096f6ef951840721adbf46ac996b59e0235cb985c908890889060040161392a565b600060405180830381600087803b158015612be157600080fd5b505af1158015612bf5573d6000803e3d6000fd5b5050505082612c013390565b604080518781526001600160a01b038b811660208301529181018a905260608101869052608081018590529116907f5c88561b046569d4773b016d48f154d22685738bfb692bb0f8478ec2ef36b79f9060a0016126c9565b612c638282611c8b565b610e9e57612c7b816001600160a01b0316601461324d565b612c8683602061324d565b604051602001612c97929190613abe565b60408051601f198184030181529082905262461bcd60e51b825261086491600401613b33565b60065460ff1615612ce1576040516302822dcd60e51b815260040160405180910390fd5b7fb94da9555321002e2f278a8e588b6b5c51fa2748893b00f6e45fc41af53493ab612d0c8133612c59565b6008546040516334dae8d560e01b81526001600160a01b03909116906334dae8d590612d5e907f00000000000000000000000096f6ef951840721adbf46ac996b59e0235cb985c9088906004016138c8565b600060405180830381600087803b158015612d7857600080fd5b505af1158015612d8c573d6000803e3d6000fd5b5050600954604051637f19077160e01b8152600093506001600160a01b039091169150637f19077190612de5907f00000000000000000000000096f6ef951840721adbf46ac996b59e0235cb985c9089906004016138c8565b602060405180830381865afa158015612e02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e26919061385e565b905080612e4657604051632163950f60e01b815260040160405180910390fd5b60007f0000000000000000000000000000000000000000000000000de0b6b3a7640000612e716130dc565b612e7b90876138e2565b612e85919061388d565b600d54604051631e03bab960e21b81529192506001600160a01b03169063780eeae490612eb890339085906004016138af565b600060405180830381600087803b158015612ed257600080fd5b505af1158015612ee6573d6000803e3d6000fd5b5050600a54604051637d4945b760e01b81526001600160a01b039091169250637d4945b79150612f41906000907f00000000000000000000000096f6ef951840721adbf46ac996b59e0235cb985c908790879060040161392a565b600060405180830381600087803b158015612f5b57600080fd5b505af1158015612f6f573d6000803e3d6000fd5b5050505081866001600160a01b0316612f853390565b60408051898152602081018690529081018890526001600160a01b0391909116907f8153c95a1826b81124293b12cbbc293c0dfba473b563c61d9a9ff82aa4a1c7ad9060600160405180910390a4505050505050565b612fe582826120b4565b6000828152600260205260409020610cd6908261211f565b61300782826133e9565b6000828152600260205260409020610cd69082613450565b610cd683846001600160a01b031663a9059cbb85856040516024016130459291906138af565b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050613465565b6000611c8483836134d6565b600061083a825490565b60008181526001830160205260408120546130d45750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561083a565b50600061083a565b60075460405163b3596f0760e01b81526001600160a01b037f00000000000000000000000096f6ef951840721adbf46ac996b59e0235cb985c81166004830152600092169063b3596f0790602401602060405180830381865afa158015613147573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061316b919061385e565b905060055481101561319057604051633b2f2ac960e11b815260040160405180910390fd5b90565b61183284856001600160a01b03166323b872dd8686866040516024016130459392919061381d565b6000836001600160a01b031663095ea7b384846040516024016131df9291906138af565b604051602081830303815290604052915060e01b6020820180516001600160e01b03838183161783525050505090506132188482613500565b6118325761324384856001600160a01b031663095ea7b38660006040516024016130459291906138af565b6118328482613465565b6060600061325c8360026138e2565b613267906002613b66565b67ffffffffffffffff81111561327f5761327f613b79565b6040519080825280601f01601f1916602001820160405280156132a9576020820181803683370190505b509050600360fc1b816000815181106132c4576132c4613b8f565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106132f3576132f3613b8f565b60200101906001600160f81b031916908160001a90535060006133178460026138e2565b613322906001613b66565b90505b600181111561339a576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061335657613356613b8f565b1a60f81b82828151811061336c5761336c613b8f565b60200101906001600160f81b031916908160001a90535060049490941c9361339381613ba5565b9050613325565b508315611c845760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610864565b6133f38282611c8b565b15610e9e5760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000611c84836001600160a01b03841661354f565b600080602060008451602086016000885af180613488576040513d6000823e3d81fd5b50506000513d915081156134a05780600114156134ad565b6001600160a01b0384163b155b1561183257604051635274afe760e01b81526001600160a01b0385166004820152602401610864565b60008260000182815481106134ed576134ed613b8f565b9060005260206000200154905092915050565b6000806000806020600086516020880160008a5af192503d91506000519050828015613545575081156135365780600114613545565b6000866001600160a01b03163b115b9695505050505050565b60008181526001830160205260408120548015613638576000613573600183613a87565b855490915060009061358790600190613a87565b90508181146135ec5760008660000182815481106135a7576135a7613b8f565b90600052602060002001549050808760000184815481106135ca576135ca613b8f565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806135fd576135fd613bbc565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061083a565b600091505061083a565b60006020828403121561365457600080fd5b81356001600160e01b031981168114611c8457600080fd5b80356001600160a01b038116811461368357600080fd5b919050565b60008060006060848603121561369d57600080fd5b833592506136ad6020850161366c565b9150604084013590509250925092565b6000806000606084860312156136d257600080fd5b6136db8461366c565b95602085013595506040909401359392505050565b60006020828403121561370257600080fd5b611c848261366c565b60006020828403121561371d57600080fd5b5035919050565b6000806040838503121561373757600080fd5b823591506137476020840161366c565b90509250929050565b801515811461375e57600080fd5b50565b6000806040838503121561377457600080fd5b61377d8361366c565b9150602083013561378d81613750565b809150509250929050565b6000806000606084860312156137ad57600080fd5b6137b68461366c565b92506136ad6020850161366c565b600080604083850312156137d757600080fd5b50508035926020909101359150565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b60006020828403121561385357600080fd5b8151611c8481613750565b60006020828403121561387057600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6000826138aa57634e487b7160e01b600052601260045260246000fd5b500490565b6001600160a01b03929092168252602082015260400190565b6001600160a01b0392831681529116602082015260400190565b60008160001904831182151516156138fc576138fc613877565b500290565b6001600160a01b0394851681529290931660208301526040820152606081019190915260800190565b608081016002861061394c57634e487b7160e01b600052602160045260246000fd5b9481526001600160a01b03939093166020840152604083019190915260609091015290565b60006020828403121561398357600080fd5b815160ff81168114611c8457600080fd5b600181815b808511156139cf5781600019048211156139b5576139b5613877565b808516156139c257918102915b93841c9390800290613999565b509250929050565b6000826139e65750600161083a565b816139f35750600061083a565b8160018114613a095760028114613a1357613a2f565b600191505061083a565b60ff841115613a2457613a24613877565b50506001821b61083a565b5060208310610133831016604e8410600b8410161715613a52575081810a61083a565b613a5c8383613994565b8060001904821115613a7057613a70613877565b029392505050565b6000611c8460ff8416836139d7565b8181038181111561083a5761083a613877565b60005b83811015613ab5578181015183820152602001613a9d565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613af6816017850160208801613a9a565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613b27816028840160208801613a9a565b01602801949350505050565b6020815260008251806020840152613b52816040850160208701613a9a565b601f01601f19169190910160400192915050565b8082018082111561083a5761083a613877565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600081613bb457613bb4613877565b506000190190565b634e487b7160e01b600052603160045260246000fdfef45c97b23e2beeefda80e1ce5cb3e234aa7b6888ad5cbabb75bfd654dd8e102da2646970667358221220b36c68333eacbc0fb788b29b7499d75cfd90c1b8511eed3b0987bcc335b444aa64736f6c63430008100033","optimization_enabled":true,"verified_twin_address_hash":null,"is_verified":true,"compiler_settings":{"evmVersion":"london","libraries":{},"metadata":{"bytecodeHash":"ipfs","useLiteralContent":false},"optimizer":{"enabled":true,"runs":200},"outputSelection":{"*":{"":["*"],"*":["*"]}},"remappings":["eth-gas-reporter/=node_modules/eth-gas-reporter/","forge-tests/=forge-tests/","lib/=lib/","@aragon/=node_modules/@aragon/","@ensdomains/=node_modules/@ensdomains/","@openzeppelin/=node_modules/@openzeppelin/","@uniswap/=node_modules/@uniswap/","forge-std/=lib/forge-std/src/","hardhat-deploy/=node_modules/hardhat-deploy/","hardhat/=node_modules/hardhat/","math/=node_modules/@aragon/os/contracts/lib/math/","misc/=node_modules/@aragon/os/contracts/lib/misc/","solidity-bytes-utils/=node_modules/solidity-bytes-utils/","standards/=node_modules/@aragon/os/contracts/lib/standards/","token/=node_modules/@aragon/os/contracts/lib/token/","truffle/=node_modules/truffle/"],"viaIR":false},"optimization_runs":200,"sourcify_repo_url":null,"decoded_constructor_args":[["0x1dd6bCf6d188f11D8dE64b5c8575FB86c4b3D9ff",{"internalType":"address","name":"_defaultAdmin","type":"address"}],["0x96F6eF951840721AdBF46Ac996b59E0235CB985C",{"internalType":"address","name":"_rwaToken","type":"address"}],["0xaf37c1167910ebC994e266949387d2c7C326b879",{"internalType":"address","name":"_rusdy","type":"address"}],["1000000000000000000",{"internalType":"uint256","name":"_minimumDepositAmount","type":"uint256"}],["1000000000000000000",{"internalType":"uint256","name":"_minimumRedemptionAmount","type":"uint256"}]],"compiler_version":"v0.8.16+commit.07a7930e","is_verified_via_verifier_alliance":false,"verified_at":"2026-01-20T19:47:57.384203Z","implementations":[],"proxy_type":null,"external_libraries":[],"creation_bytecode":"0x60e06040523480156200001157600080fd5b50604051620041b9380380620041b983398101604081905262000034916200029c565b6001600055848483836001600160a01b038316620000655760405163885ce5f160e01b815260040160405180910390fd5b6001600160a01b03831660a08190526040805163313ce56760e01b8152905163313ce567916004808201926020929091908290030181865afa158015620000b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d69190620002f9565b620000e390600a62000438565b60805260038290556004819055620000fd60008562000141565b5050506001600160a01b03841690506200012a57604051630f35c93760e21b815260040160405180910390fd5b50506001600160a01b031660c05250620004499050565b6200015882826200018460201b620020b41760201c565b60008281526002602090815260409091206200017f9183906200211f6200020d821b17901c565b505050565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff16620002095760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45b5050565b600062000224836001600160a01b0384166200022d565b90505b92915050565b6000818152600183016020526040812054620002765750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000227565b50600062000227565b80516001600160a01b03811681146200029757600080fd5b919050565b600080600080600060a08688031215620002b557600080fd5b620002c0866200027f565b9450620002d0602087016200027f565b9350620002e0604087016200027f565b6060870151608090970151959894975095949392505050565b6000602082840312156200030c57600080fd5b815160ff811681146200031e57600080fd5b9392505050565b634e487b7160e01b600052601160045260246000fd5b600181815b808511156200037c57816000190482111562000360576200036062000325565b808516156200036e57918102915b93841c939080029062000340565b509250929050565b600082620003955750600162000227565b81620003a45750600062000227565b8160018114620003bd5760028114620003c857620003e8565b600191505062000227565b60ff841115620003dc57620003dc62000325565b50506001821b62000227565b5060208310610133831016604e8410600b84101617156200040d575081810a62000227565b6200041983836200033b565b806000190482111562000430576200043062000325565b029392505050565b60006200022460ff84168362000384565b60805160a05160c051613c2862000591600039600081816103fc015281816108890152818161091c015281816109a50152818161101901528181611167015281816111eb015281816112510152818161187d015281816119d001528181611a540152611aba0152600081816103aa01528181610a3301528181610b4901528181610c6b01528181610d2401528181610f3d015281816110ba015281816111380152818161161601528181611923015281816119a101528181611ef301528181611f86015281816121e10152818161227b0152818161239401528181612453015281816125fa0152818161274e015281816127e8015281816128d501528181612a7201528181612b9b01528181612d3401528181612dbb01528181612f1501526130f60152600081816105e10152818161230a01528181612b100152612e4a0152613c286000f3fe608060405234801561001057600080fd5b50600436106103785760003560e01c80637b0e1c57116101d3578063af3345d111610104578063d547741f116100a2578063e64338341161007c578063e6433834146107c4578063f3a408da146107d7578063fd84a072146107df578063fe6f14c5146107f257600080fd5b8063d547741f14610777578063d87801611461078a578063e63ab1e91461079d57600080fd5b8063ba2a1c4d116100de578063ba2a1c4d14610717578063c768b1451461073e578063c8e1585d14610751578063ca15c8731461076457600080fd5b8063af3345d1146106ea578063afb6794e146106f2578063b235d4681461070557600080fd5b80638f8eb81211610171578063a217fddf1161014b578063a217fddf146106a7578063aab483d6146106af578063abbb9f4c146106c2578063ad129e77146106d757600080fd5b80638f8eb812146106785780639010d07c1461068157806391d148541461069457600080fd5b80638133067e116101ad5780638133067e1461061657806386dd535c14610629578063884a05011461063c5780638f4f96131461065f57600080fd5b80637b0e1c57146105c95780637ead09e8146105dc578063811400fa1461060357600080fd5b806336568abe116102ad578063531acc131161024b5780636085057411610225578063608505741461058b57806361fca4551461059457806368f26f82146105a7578063695e122d146105b657600080fd5b8063531acc131461056257806359e0f36f1461056b5780635f1270791461057e57600080fd5b80633faed166116102875780633faed1661461052157806340db35e0146105345780634ce78490146105475780634ef1ccd11461054f57600080fd5b806336568abe146104e85780633e4af11f146104fb5780633f9832581461050e57600080fd5b806322d4a1751161031a578063248a9ca3116102f4578063248a9ca3146104965780632d7d41ab146104ba5780632f2ff15d146104cd57806332ec84d2146104e057600080fd5b806322d4a1751461046557806323991e4b14610478578063245513ce1461048d57600080fd5b806310a4f09f1161035657806310a4f09f146103f757806316762d7a1461041e5780631ee547e71461043f57806321e0e0cf1461045257600080fd5b806301ffc9a71461037d5780630c5bf351146103a55780630ded4a6f146103e4575b600080fd5b61039061038b366004613642565b610815565b60405190151581526020015b60405180910390f35b6103cc7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161039c565b600d546103cc906001600160a01b031681565b6103cc7f000000000000000000000000000000000000000000000000000000000000000081565b61043161042c366004613688565b610840565b60405190815260200161039c565b6008546103cc906001600160a01b031681565b6007546103cc906001600160a01b031681565b6104316104733660046136bd565b610b03565b61048b6104863660046136f0565b610bc7565b005b61043161271081565b6104316104a436600461370b565b6000908152600160208190526040909120015490565b61048b6104c83660046136bd565b610cdb565b61048b6104db366004613724565b610d97565b61048b610dbe565b61048b6104f6366004613724565b610e24565b61048b6105093660046136f0565b610ea2565b61048b61051c3660046136bd565b610fd6565b61048b61052f366004613761565b611345565b61048b6105423660046136f0565b611452565b61048b6114e2565b61048b61055d36600461370b565b611524565b61043160035481565b61048b6105793660046136f0565b611572565b6006546103909060ff1681565b61043160055481565b61048b6105a23660046136f0565b611676565b610431670de0b6b3a764000081565b61048b6105c4366004613761565b611705565b61048b6105d7366004613798565b611812565b6104317f000000000000000000000000000000000000000000000000000000000000000081565b600a546103cc906001600160a01b031681565b6104316106243660046136bd565b611838565b61048b6106373660046136f0565b611bdd565b61039061064a3660046136f0565b600f6020526000908152604090205460ff1681565b6006546103cc906201000090046001600160a01b031681565b61043160045481565b6103cc61068f3660046137c4565b611c6c565b6103906106a2366004613724565b611c8b565b610431600081565b61048b6106bd36600461370b565b611cb6565b610431600080516020613bd383398151915281565b61048b6106e53660046136f0565b611d04565b61048b611d94565b61048b6107003660046136f0565b611dd7565b60065461039090610100900460ff1681565b6104317fb94da9555321002e2f278a8e588b6b5c51fa2748893b00f6e45fc41af53493ab81565b6009546103cc906001600160a01b031681565b600b546103cc906001600160a01b031681565b61043161077236600461370b565b611e75565b61048b610785366004613724565b611e8c565b610431610798366004613688565b611eb3565b6104317f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b600c546103cc906001600160a01b031681565b61048b612002565b61048b6107ed36600461370b565b612066565b6103906108003660046136f0565b600e6020526000908152604090205460ff1681565b60006001600160e01b03198216635a05180f60e01b148061083a575061083a82612134565b92915050565b600060026000540361086d5760405162461bcd60e51b8152600401610864906137e6565b60405180910390fd5b60026000556040516323b872dd60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906323b872dd906108c29033903090899060040161381d565b6020604051808303816000875af11580156108e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109059190613841565b50604051636f074d1f60e11b8152600481018590527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063de0e9a3e90602401600060405180830381600087803b15801561096857600080fd5b505af115801561097c573d6000803e3d6000fd5b50506040516358af948f60e11b8152600481018790526000925061271091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063b15f291e90602401602060405180830381865afa1580156109ec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a10919061385e565b610a1a919061388d565b604051630852cd8d60e31b8152600481018290529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b158015610a7f57600080fd5b505af1158015610a93573d6000803e3d6000fd5b50505050610aa2818585612169565b60408051838152602081018890526001600160a01b0387168183015260608101839052905191935033917f9ef7a247f6b9f5762b48aaef49860629bb5fec37c2e12bc46a980abd704ab0459181900360800190a25060016000559392505050565b6000600260005403610b275760405162461bcd60e51b8152600401610864906137e6565b6002600055610b378484846126db565b6040516340c10f1960e01b81529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906340c10f1990610b8890339085906004016138af565b600060405180830381600087803b158015610ba257600080fd5b505af1158015610bb6573d6000803e3d6000fd5b505060016000555090949350505050565b6000610bd38133612c59565b6001600160a01b038216610bfa57604051633d04535360e21b815260040160405180910390fd5b6009546040516001600160a01b038085169216907ff78e014ab86d7bb38135262d64726cef2e151dae47c0947a1d6bb970702c30d690600090a3600980546001600160a01b0319166001600160a01b038416908117909155604051637f19077160e01b8152637f19077190610c95907f00000000000000000000000000000000000000000000000000000000000000009030906004016138c8565b602060405180830381865afa158015610cb2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd6919061385e565b505050565b600260005403610cfd5760405162461bcd60e51b8152600401610864906137e6565b6002600055610d0d838383612cbd565b6040516340c10f1960e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340c10f1990610d5b90869086906004016138af565b600060405180830381600087803b158015610d7557600080fd5b505af1158015610d89573d6000803e3d6000fd5b505060016000555050505050565b60008281526001602081905260409091200154610db48133612c59565b610cd68383612fdb565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a610de98133612c59565b6006805461ff0019166101001790556040517f60b78ed2d882d2d2387ad2b7119495f7c99dd9a9c191d3d02c35982a0750bcc690600090a150565b6001600160a01b0381163314610e945760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610864565b610e9e8282612ffd565b5050565b6000610eae8133612c59565b6001600160a01b038216610ed557604051632233f8fd60e21b815260040160405180910390fd5b6007546040516001600160a01b038085169216907f6c9074ba8ab5c258404464c9703de55127adb996134fd80d450ce94eb76ff59090600090a3600780546001600160a01b0319166001600160a01b0384811691821790925560405163b3596f0760e01b81527f0000000000000000000000000000000000000000000000000000000000000000909216600483015260009163b3596f0790602401602060405180830381865afa158015610f8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb1919061385e565b9050600554811015610cd657604051633b2f2ac960e11b815260040160405180910390fd5b600260005403610ff85760405162461bcd60e51b8152600401610864906137e6565b600260009081556040516358af948f60e11b815260048101849052612710907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b15f291e90602401602060405180830381865afa158015611068573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061108c919061385e565b611096919061388d565b90506110a3848284612cbd565b6040516340c10f1960e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340c10f19906110f190309085906004016138af565b600060405180830381600087803b15801561110b57600080fd5b505af115801561111f573d6000803e3d6000fd5b505060405163095ea7b360e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016925063095ea7b39150611191907f00000000000000000000000000000000000000000000000000000000000000009085906004016138af565b6020604051808303816000875af11580156111b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d49190613841565b50604051630ea598cb60e41b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ea598cb090602401600060405180830381600087803b15801561123757600080fd5b505af115801561124b573d6000803e3d6000fd5b505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638fcb4e5b856127108461128d91906138e2565b6040518363ffffffff1660e01b81526004016112aa9291906138af565b6020604051808303816000875af11580156112c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112ed919061385e565b5060408051828152602081018590529081018390526001600160a01b038516907ffd614e52d7b496f0d3f713f3a55ea6a08921356a6778f1565134f76da6731d6a9060600160405180910390a2505060016000555050565b60006113518133612c59565b6001600160a01b0383166113785760405163885ce5f160e01b815260040160405180910390fd5b81156113ee5760075460405163b3596f0760e01b81526001600160a01b0385811660048301529091169063b3596f0790602401602060405180830381865afa1580156113c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113ec919061385e565b505b604051821515906001600160a01b038516907fb69d0cdc257fe2726a8ebd7602c8a681fd8152961d1c38a5d5b3090a4d96b20c90600090a3506001600160a01b03919091166000908152600e60205260409020805460ff1916911515919091179055565b600061145e8133612c59565b6001600160a01b0382166114855760405163524d94d960e11b815260040160405180910390fd5b600d546040516001600160a01b038085169216907ff68d3e8139cf85c4c8ea147060134c79e97dbfa33f3f6a9d4cdec44ef467c74790600090a350600d80546001600160a01b0319166001600160a01b0392909216919091179055565b60006114ee8133612c59565b6006805460ff191690556040517f849babeb0c1b4e2b3842433574a5cdfe23ffde54c64651d42a6b02e8f98cbf8a90600090a150565b600080516020613bd383398151915261153d8133612c59565b6004546040518391907ffdaf6ed728cef208e62328a008209556f8281f3062b14dd08aaaa90fa159421190600090a350600455565b600061157e8133612c59565b6001600160a01b0382166115a557604051630b69326560e11b815260040160405180910390fd5b6008546040516001600160a01b038085169216907fdbc2a9769fa2b31eadfb16b690e3c783592becd0b822401b274a90a34d80b6dc90600090a3600880546001600160a01b0319166001600160a01b0384169081179091556040516334dae8d560e01b81526334dae8d590611640907f00000000000000000000000000000000000000000000000000000000000000009030906004016138c8565b600060405180830381600087803b15801561165a57600080fd5b505af115801561166e573d6000803e3d6000fd5b505050505050565b60006116828133612c59565b6001600160a01b0382166116a8576040516291d13760e51b815260040160405180910390fd5b600b546040516001600160a01b038085169216907f24fdea3a24a4edda22c10620f63628ed57f6b60d457d833035a316ab15684c9490600090a350600b80546001600160a01b0319166001600160a01b0392909216919091179055565b60006117118133612c59565b6001600160a01b0383166117385760405163885ce5f160e01b815260040160405180910390fd5b81156117ae5760075460405163b3596f0760e01b81526001600160a01b0385811660048301529091169063b3596f0790602401602060405180830381865afa158015611788573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117ac919061385e565b505b604051821515906001600160a01b038516907f34e319579e041b2d04a5a9ff137ef4511e2db49d2da0512cdbe3845c32bc933a90600090a3506001600160a01b03919091166000908152600f60205260409020805460ff1916911515919091179055565b600061181e8133612c59565b6118326001600160a01b038516848461301f565b50505050565b600060026000540361185c5760405162461bcd60e51b8152600401610864906137e6565b600260009081556040516358af948f60e11b815260048101849052612710907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b15f291e90602401602060405180830381865afa1580156118cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f0919061385e565b6118fa919061388d565b905060006119098686846126db565b6040516340c10f1960e01b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340c10f199061195a90309085906004016138af565b600060405180830381600087803b15801561197457600080fd5b505af1158015611988573d6000803e3d6000fd5b505060405163095ea7b360e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016925063095ea7b391506119fa907f00000000000000000000000000000000000000000000000000000000000000009085906004016138af565b6020604051808303816000875af1158015611a19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a3d9190613841565b50604051630ea598cb60e41b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ea598cb090602401600060405180830381600087803b158015611aa057600080fd5b505af1158015611ab4573d6000803e3d6000fd5b505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638fcb4e5b611aee3390565b611afa612710856138e2565b6040518363ffffffff1660e01b8152600401611b179291906138af565b6020604051808303816000875af1158015611b36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b5a919061385e565b925083831015611b7d5760405163c5db0fc160e01b815260040160405180910390fd5b60408051828152602081018590526001600160a01b0388168183015260608101879052905133917f9d1b78864fb222ffcf82e2444ee22d6bb9cf52d41b71914f34e1597f23423ca4919081900360800190a2505060016000559392505050565b6000611be98133612c59565b6001600160a01b038216611c0f576040516291d13760e51b815260040160405180910390fd5b600c546040516001600160a01b038085169216907f849fba91aaeaa62c2a7f48c8ff7c26b006ca3ae247c1640072ecf571e31040c890600090a350600c80546001600160a01b0319166001600160a01b0392909216919091179055565b6000828152600260205260408120611c849083613077565b9392505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600080516020613bd3833981519152611ccf8133612c59565b6003546040518391907fe6e25add7363f8f8a40cbea9810d3115a33703b10972ef759104219b0065743690600090a350600355565b6000611d108133612c59565b6001600160a01b038216611d3757604051633aa9ba3360e01b815260040160405180910390fd5b600a546040516001600160a01b038085169216907fc54bf4c3067c1d8f65e053dafb5dbb699615b1b527d2866bd0223102bb2e692d90600090a350600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6000611da08133612c59565b6006805461ff00191690556040517f687bf6e69dbabcc95e11041b4816a83f36dcf6ef647f6acf63e7469d28f5ea7390600090a150565b6000611de38133612c59565b6001600160a01b038216611e0a5760405163341d47c360e01b815260040160405180910390fd5b6006546040516001600160a01b038085169262010000900416907f132a375a3726b76fcc71a6992f19961145ed03f35eca19ad07381f43501c2b5e90600090a350600680546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b600081815260026020526040812061083a90613083565b60008281526001602081905260409091200154611ea98133612c59565b610cd68383612ffd565b6000600260005403611ed75760405162461bcd60e51b8152600401610864906137e6565b60026000556040516323b872dd60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906323b872dd90611f2c9033903090899060040161381d565b6020604051808303816000875af1158015611f4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6f9190613841565b50604051630852cd8d60e31b8152600481018590527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b158015611fd257600080fd5b505af1158015611fe6573d6000803e3d6000fd5b50505050611ff5848484612169565b6001600055949350505050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a61202d8133612c59565b6006805460ff191660011790556040517fb9964f53255ea6cb323618cebc0c47de4f99089e9993d1862f24e2fdaf2a31e590600090a150565b600080516020613bd383398151915261207f8133612c59565b6005546040518391907f8ba90cff6e6e2b8e73cee7f3c5356cca13f1715f39f5eaa6164a99b49e497c8e90600090a350600555565b6120be8282611c8b565b610e9e5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b6000611c84836001600160a01b03841661308d565b60006001600160e01b03198216637965db0b60e01b148061083a57506301ffc9a760e01b6001600160e01b031983161461083a565b600654600090610100900460ff161561219557604051630df65d9f60e01b815260040160405180910390fd5b6001600160a01b0383166000908152600f602052604090205460ff166121ce5760405163e51cf7bf60e01b815260040160405180910390fd5b6008546001600160a01b03166334dae8d57f0000000000000000000000000000000000000000000000000000000000000000336040518363ffffffff1660e01b815260040161221e9291906138c8565b600060405180830381600087803b15801561223857600080fd5b505af115801561224c573d6000803e3d6000fd5b5050600954604051637f19077160e01b8152600093506001600160a01b039091169150637f190771906122a5907f00000000000000000000000000000000000000000000000000000000000000009033906004016138c8565b602060405180830381865afa1580156122c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122e6919061385e565b90508061230657604051632163950f60e01b815260040160405180910390fd5b60007f0000000000000000000000000000000000000000000000000000000000000000866123326130dc565b61233c91906138e2565b612346919061388d565b905060045481101561236b5760405163680116dd60e11b815260040160405180910390fd5b600c5460405163c75af63560e01b81526000916001600160a01b03169063c75af635906123c2907f0000000000000000000000000000000000000000000000000000000000000000908a9088908890600401613901565b6020604051808303816000875af11580156123e1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612405919061385e565b90508181111561242857604051635774f9b360e11b815260040160405180910390fd5b600a54604051637d4945b760e01b81526001600160a01b0390911690637d4945b79061247f906001907f0000000000000000000000000000000000000000000000000000000000000000908890889060040161392a565b600060405180830381600087803b15801561249957600080fd5b505af11580156124ad573d6000803e3d6000fd5b505060075460405163b3596f0760e01b81526001600160a01b038a81166004830152909116925063b3596f079150602401602060405180830381865afa1580156124fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061251f919061385e565b866001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561255d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125819190613971565b61258c90600a613a78565b6125968385613a87565b6125a091906138e2565b6125aa919061388d565b9350848410156125cd57604051638f19033960e01b815260040160405180910390fd5b60065460405163071f2cab60e51b8152620100009091046001600160a01b03169063e3e5956090612628907f0000000000000000000000000000000000000000000000000000000000000000908a9088908a90600401613901565b600060405180830381600087803b15801561264257600080fd5b505af1158015612656573d6000803e3d6000fd5b505050506126756126643390565b6001600160a01b038816908661301f565b604080518881526001600160a01b03881660208201529081018590526060810183905260808101829052839033907f7023b7bcd020761014c9e1590603f4effceabc102cf0b8023c3f2b14db9ffb6e9060a0015b60405180910390a35050509392505050565b60065460009060ff1615612702576040516302822dcd60e51b815260040160405180910390fd5b6001600160a01b0384166000908152600e602052604090205460ff1661273b5760405163e51cf7bf60e01b815260040160405180910390fd5b6008546001600160a01b03166334dae8d57f0000000000000000000000000000000000000000000000000000000000000000336040518363ffffffff1660e01b815260040161278b9291906138c8565b600060405180830381600087803b1580156127a557600080fd5b505af11580156127b9573d6000803e3d6000fd5b5050600954604051637f19077160e01b8152600093506001600160a01b039091169150637f19077190612812907f00000000000000000000000000000000000000000000000000000000000000009033906004016138c8565b602060405180830381865afa15801561282f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612853919061385e565b90508061287357604051632163950f60e01b815260040160405180910390fd5b6128886001600160a01b038616333087613193565b6006546128a8906001600160a01b038781169162010000900416866131bb565b600654604051631f61f2f560e31b8152620100009091046001600160a01b03169063fb0f97a890612901907f0000000000000000000000000000000000000000000000000000000000000000908990899060040161381d565b600060405180830381600087803b15801561291b57600080fd5b505af115801561292f573d6000803e3d6000fd5b505050506000856001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015612973573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129979190613971565b6129a290600a613a78565b60075460405163b3596f0760e01b81526001600160a01b0389811660048301528892169063b3596f0790602401602060405180830381865afa1580156129ec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a10919061385e565b612a1a91906138e2565b612a24919061388d565b9050600354811015612a49576040516367627d0760e01b815260040160405180910390fd5b600b5460405163c75af63560e01b81526000916001600160a01b03169063c75af63590612aa0907f0000000000000000000000000000000000000000000000000000000000000000908b9088908890600401613901565b6020604051808303816000875af1158015612abf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ae3919061385e565b905081811115612b065760405163566f172560e11b815260040160405180910390fd5b612b0e6130dc565b7f0000000000000000000000000000000000000000000000000000000000000000612b398385613a87565b612b4391906138e2565b612b4d919061388d565b935084841015612b705760405163c5db0fc160e01b815260040160405180910390fd5b600a54604051637d4945b760e01b81526001600160a01b0390911690637d4945b790612bc7906000907f0000000000000000000000000000000000000000000000000000000000000000908890889060040161392a565b600060405180830381600087803b158015612be157600080fd5b505af1158015612bf5573d6000803e3d6000fd5b5050505082612c013390565b604080518781526001600160a01b038b811660208301529181018a905260608101869052608081018590529116907f5c88561b046569d4773b016d48f154d22685738bfb692bb0f8478ec2ef36b79f9060a0016126c9565b612c638282611c8b565b610e9e57612c7b816001600160a01b0316601461324d565b612c8683602061324d565b604051602001612c97929190613abe565b60408051601f198184030181529082905262461bcd60e51b825261086491600401613b33565b60065460ff1615612ce1576040516302822dcd60e51b815260040160405180910390fd5b7fb94da9555321002e2f278a8e588b6b5c51fa2748893b00f6e45fc41af53493ab612d0c8133612c59565b6008546040516334dae8d560e01b81526001600160a01b03909116906334dae8d590612d5e907f00000000000000000000000000000000000000000000000000000000000000009088906004016138c8565b600060405180830381600087803b158015612d7857600080fd5b505af1158015612d8c573d6000803e3d6000fd5b5050600954604051637f19077160e01b8152600093506001600160a01b039091169150637f19077190612de5907f00000000000000000000000000000000000000000000000000000000000000009089906004016138c8565b602060405180830381865afa158015612e02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e26919061385e565b905080612e4657604051632163950f60e01b815260040160405180910390fd5b60007f0000000000000000000000000000000000000000000000000000000000000000612e716130dc565b612e7b90876138e2565b612e85919061388d565b600d54604051631e03bab960e21b81529192506001600160a01b03169063780eeae490612eb890339085906004016138af565b600060405180830381600087803b158015612ed257600080fd5b505af1158015612ee6573d6000803e3d6000fd5b5050600a54604051637d4945b760e01b81526001600160a01b039091169250637d4945b79150612f41906000907f0000000000000000000000000000000000000000000000000000000000000000908790879060040161392a565b600060405180830381600087803b158015612f5b57600080fd5b505af1158015612f6f573d6000803e3d6000fd5b5050505081866001600160a01b0316612f853390565b60408051898152602081018690529081018890526001600160a01b0391909116907f8153c95a1826b81124293b12cbbc293c0dfba473b563c61d9a9ff82aa4a1c7ad9060600160405180910390a4505050505050565b612fe582826120b4565b6000828152600260205260409020610cd6908261211f565b61300782826133e9565b6000828152600260205260409020610cd69082613450565b610cd683846001600160a01b031663a9059cbb85856040516024016130459291906138af565b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050613465565b6000611c8483836134d6565b600061083a825490565b60008181526001830160205260408120546130d45750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561083a565b50600061083a565b60075460405163b3596f0760e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152600092169063b3596f0790602401602060405180830381865afa158015613147573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061316b919061385e565b905060055481101561319057604051633b2f2ac960e11b815260040160405180910390fd5b90565b61183284856001600160a01b03166323b872dd8686866040516024016130459392919061381d565b6000836001600160a01b031663095ea7b384846040516024016131df9291906138af565b604051602081830303815290604052915060e01b6020820180516001600160e01b03838183161783525050505090506132188482613500565b6118325761324384856001600160a01b031663095ea7b38660006040516024016130459291906138af565b6118328482613465565b6060600061325c8360026138e2565b613267906002613b66565b67ffffffffffffffff81111561327f5761327f613b79565b6040519080825280601f01601f1916602001820160405280156132a9576020820181803683370190505b509050600360fc1b816000815181106132c4576132c4613b8f565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106132f3576132f3613b8f565b60200101906001600160f81b031916908160001a90535060006133178460026138e2565b613322906001613b66565b90505b600181111561339a576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061335657613356613b8f565b1a60f81b82828151811061336c5761336c613b8f565b60200101906001600160f81b031916908160001a90535060049490941c9361339381613ba5565b9050613325565b508315611c845760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610864565b6133f38282611c8b565b15610e9e5760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000611c84836001600160a01b03841661354f565b600080602060008451602086016000885af180613488576040513d6000823e3d81fd5b50506000513d915081156134a05780600114156134ad565b6001600160a01b0384163b155b1561183257604051635274afe760e01b81526001600160a01b0385166004820152602401610864565b60008260000182815481106134ed576134ed613b8f565b9060005260206000200154905092915050565b6000806000806020600086516020880160008a5af192503d91506000519050828015613545575081156135365780600114613545565b6000866001600160a01b03163b115b9695505050505050565b60008181526001830160205260408120548015613638576000613573600183613a87565b855490915060009061358790600190613a87565b90508181146135ec5760008660000182815481106135a7576135a7613b8f565b90600052602060002001549050808760000184815481106135ca576135ca613b8f565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806135fd576135fd613bbc565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061083a565b600091505061083a565b60006020828403121561365457600080fd5b81356001600160e01b031981168114611c8457600080fd5b80356001600160a01b038116811461368357600080fd5b919050565b60008060006060848603121561369d57600080fd5b833592506136ad6020850161366c565b9150604084013590509250925092565b6000806000606084860312156136d257600080fd5b6136db8461366c565b95602085013595506040909401359392505050565b60006020828403121561370257600080fd5b611c848261366c565b60006020828403121561371d57600080fd5b5035919050565b6000806040838503121561373757600080fd5b823591506137476020840161366c565b90509250929050565b801515811461375e57600080fd5b50565b6000806040838503121561377457600080fd5b61377d8361366c565b9150602083013561378d81613750565b809150509250929050565b6000806000606084860312156137ad57600080fd5b6137b68461366c565b92506136ad6020850161366c565b600080604083850312156137d757600080fd5b50508035926020909101359150565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b60006020828403121561385357600080fd5b8151611c8481613750565b60006020828403121561387057600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6000826138aa57634e487b7160e01b600052601260045260246000fd5b500490565b6001600160a01b03929092168252602082015260400190565b6001600160a01b0392831681529116602082015260400190565b60008160001904831182151516156138fc576138fc613877565b500290565b6001600160a01b0394851681529290931660208301526040820152606081019190915260800190565b608081016002861061394c57634e487b7160e01b600052602160045260246000fd5b9481526001600160a01b03939093166020840152604083019190915260609091015290565b60006020828403121561398357600080fd5b815160ff81168114611c8457600080fd5b600181815b808511156139cf5781600019048211156139b5576139b5613877565b808516156139c257918102915b93841c9390800290613999565b509250929050565b6000826139e65750600161083a565b816139f35750600061083a565b8160018114613a095760028114613a1357613a2f565b600191505061083a565b60ff841115613a2457613a24613877565b50506001821b61083a565b5060208310610133831016604e8410600b8410161715613a52575081810a61083a565b613a5c8383613994565b8060001904821115613a7057613a70613877565b029392505050565b6000611c8460ff8416836139d7565b8181038181111561083a5761083a613877565b60005b83811015613ab5578181015183820152602001613a9d565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613af6816017850160208801613a9a565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613b27816028840160208801613a9a565b01602801949350505050565b6020815260008251806020840152613b52816040850160208701613a9a565b601f01601f19169190910160400192915050565b8082018082111561083a5761083a613877565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600081613bb457613bb4613877565b506000190190565b634e487b7160e01b600052603160045260246000fdfef45c97b23e2beeefda80e1ce5cb3e234aa7b6888ad5cbabb75bfd654dd8e102da2646970667358221220b36c68333eacbc0fb788b29b7499d75cfd90c1b8511eed3b0987bcc335b444aa64736f6c634300081000330000000000000000000000001dd6bcf6d188f11d8de64b5c8575fb86c4b3d9ff00000000000000000000000096f6ef951840721adbf46ac996b59e0235cb985c000000000000000000000000af37c1167910ebc994e266949387d2c7c326b8790000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000de0b6b3a7640000","name":"USDY_InstantManager","is_blueprint":false,"license_type":"none","is_fully_verified":false,"is_verified_via_eth_bytecode_db":false,"language":"solidity","evm_version":"london","can_be_visualized_via_sol2uml":true,"is_verified_via_sourcify":false,"additional_sources":[{"file_path":"contracts/external/openzeppelin/contracts/utils/Context.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n  function _msgSender() internal view virtual returns (address) {\n    return msg.sender;\n  }\n\n  function _msgData() internal view virtual returns (bytes calldata) {\n    return msg.data;\n  }\n}\n"},{"file_path":"contracts/xManager/rwaManagers/IBaseRWAManagerEvents.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\n/*\n      ▄▄█████████▄\n   ╓██▀└ ,╓▄▄▄, '▀██▄\n  ██▀ ▄██▀▀╙╙▀▀██▄ └██µ           ,,       ,,      ,     ,,,            ,,,\n ██ ,██¬ ▄████▄  ▀█▄ ╙█▄      ▄███▀▀███▄   ███▄    ██  ███▀▀▀███▄    ▄███▀▀███,\n██  ██ ╒█▀'   ╙█▌ ╙█▌ ██     ▐██      ███  █████,  ██  ██▌    └██▌  ██▌     └██▌\n██ ▐█▌ ██      ╟█  █▌ ╟█     ██▌      ▐██  ██ └███ ██  ██▌     ╟██ j██       ╟██\n╟█  ██ ╙██    ▄█▀ ▐█▌ ██     ╙██      ██▌  ██   ╙████  ██▌    ▄██▀  ██▌     ,██▀\n ██ \"██, ╙▀▀███████████⌐      ╙████████▀   ██     ╙██  ███████▀▀     ╙███████▀`\n  ██▄ ╙▀██▄▄▄▄▄,,,                ¬─                                    '─¬\n   ╙▀██▄ '╙╙╙▀▀▀▀▀▀▀▀\n      ╙▀▀██████R⌐\n */\npragma solidity 0.8.16;\n\ninterface IBaseRWAManagerEvents {\n  /**\n   * @notice Event emitted when a user subscribes to an RWA token\n   * @param  subscriber      The address of the subscriber\n   * @param  subscriberId    The user ID of the subscriber\n   * @param  rwaAmount       The amount of RWA tokens minted and/or transferred, in\n   *                         decimals of the RWA token\n   * @param  depositToken    The token deposited\n   * @param  depositAmount   The amount of tokens deposited, in decimals of the\n   *                         token\n   * @param  depositUSDValue The USD value of the deposit, in 18 decimals\n   * @param  fee             The fee charged for the subscription, in USD with 18 decimals\n   */\n  event Subscription(\n    address indexed subscriber,\n    bytes32 indexed subscriberId,\n    uint256 rwaAmount,\n    address depositToken,\n    uint256 depositAmount,\n    uint256 depositUSDValue,\n    uint256 fee\n  );\n\n  /**\n   * @notice Event emitted when a user redeems an RWA token\n   * @param  redeemer           The address of the redeemer\n   * @param  redeemerId         The user ID of the redeemer\n   * @param  rwaAmount          The amount of RWA tokens redeemed, in decimals of\n   *                            the RWA token\n   * @param  receivingToken     The token received\n   * @param  receiveTokenAmount The amount of tokens received, in decimals of the\n   *                            token\n   * @param  redemptionUSDValue The USD value of the redemption, in 18 decimals\n   * @param  fee                The fee charged for the redemption, in USD with 18 decimals\n   */\n  event Redemption(\n    address indexed redeemer,\n    bytes32 indexed redeemerId,\n    uint256 rwaAmount,\n    address receivingToken,\n    uint256 receiveTokenAmount,\n    uint256 redemptionUSDValue,\n    uint256 fee\n  );\n\n  /**\n   * @notice Event emitted when an admin completes a subscription for a recipient\n   * @param  adminCaller  The address of the admin account executing the subscription\n   * @param  recipient    The address of the recipient that receives the RWA tokens\n   * @param  recipientId  The user ID of the recipient\n   * @param  rwaAmount    The amount of RWA tokens minted and/or transferred, in\n   *                      decimals of the RWA token\n   * @param  usdAmount    The USD value of the subscription, in 18 decimals\n   * @param  metadata     Additional metadata to associate with the subscription\n   */\n  event AdminSubscription(\n    address indexed adminCaller,\n    address indexed recipient,\n    bytes32 indexed recipientId,\n    uint256 rwaAmount,\n    uint256 usdAmount,\n    bytes32 metadata\n  );\n\n  /**\n   * @notice Event emitted when the `OndoTokenRouter` contract is set\n   * @param  oldOndoTokenRouter The old `OndoTokenRouter` contract address\n   * @param  newOndoTokenRouter The new `OndoTokenRouter` contract address\n   */\n  event OndoTokenRouterSet(\n    address indexed oldOndoTokenRouter,\n    address indexed newOndoTokenRouter\n  );\n\n  /**\n   * @notice Event emitted when the `OndoOracle` contract is set\n   * @param  oldOndoOracle The old `OndoOracle` contract address\n   * @param  newOndoOracle The new `OndoOracle` contract address\n   */\n  event OndoOracleSet(\n    address indexed oldOndoOracle,\n    address indexed newOndoOracle\n  );\n\n  /**\n   * @notice Event emitted when the `OndoCompliance` contract is set.\n   * @param  oldOndoCompliance The old `OndoCompliance` contract address\n   * @param  newOndoCompliance The new `OndoCompliance` contract address\n   */\n  event OndoComplianceSet(\n    address indexed oldOndoCompliance,\n    address indexed newOndoCompliance\n  );\n\n  /**\n   * @notice Event emitted when the `OndoIDRegistry` contract is set\n   * @param  oldOndoIDRegistry The old `OndoIDRegistry` contract address\n   * @param  newOndoIDRegistry The new `OndoIDRegistry` contract address\n   */\n  event OndoIDRegistrySet(\n    address indexed oldOndoIDRegistry,\n    address indexed newOndoIDRegistry\n  );\n\n  /**\n   * @notice Event emitted when the `OndoRateLimiter` contract is set\n   * @param  oldOndoRateLimiter The old `OndoRateLimiter` contract address\n   * @param  newOndoRateLimiter The new `OndoRateLimiter` contract address\n   */\n  event OndoRateLimiterSet(\n    address indexed oldOndoRateLimiter,\n    address indexed newOndoRateLimiter\n  );\n\n  /**\n   * @notice Event emitted when the `OndoFees` subscription contract is set\n   * @param  oldOndoSubscriptionFees The old `OndoFees` contract address for subscriptions\n   * @param  newOndoSubscriptionFees The new `OndoFees` contract address for subscriptions\n   */\n  event OndoSubscriptionFeesSet(\n    address indexed oldOndoSubscriptionFees,\n    address indexed newOndoSubscriptionFees\n  );\n\n  /**\n   * @notice Event emitted when the `OndoFees` redemption contract is set\n   * @param  oldOndoRedemptionFees The old `OndoFees` contract address for redemptions\n   * @param  newOndoRedemptionFees The new `OndoFees` contract address for redemptions\n   */\n  event OndoRedemptionFeesSet(\n    address indexed oldOndoRedemptionFees,\n    address indexed newOndoRedemptionFees\n  );\n\n  /**\n   * @notice Event emitted when the `AdminSubscriptionChecker` contract is set\n   * @param  oldAdminSubscriptionChecker The old `AdminSubscriptionChecker` contract address\n   * @param  newAdminSubscriptionChecker The new `AdminSubscriptionChecker` contract address\n   */\n  event AdminSubscriptionCheckerSet(\n    address indexed oldAdminSubscriptionChecker,\n    address indexed newAdminSubscriptionChecker\n  );\n\n  /**\n   * @notice Event emitted when a token's supported status is set for subscriptions\n   * @param  token    The token address\n   * @param  accepted Whether the token is accepted for deposit\n   */\n  event AcceptedSubscriptionTokenSet(\n    address indexed token,\n    bool indexed accepted\n  );\n\n  /**\n   * @notice Event emitted when a token's supported status for redemptions\n   * @param  token    The token address\n   * @param  accepted Whether the token is accepted for redemption\n   */\n  event AcceptedRedemptionTokenSet(\n    address indexed token,\n    bool indexed accepted\n  );\n\n  /**\n   * @notice Event emitted when subscription minimum is set\n   * @param  oldMinDepositAmount Old subscription minimum\n   * @param  newMinDepositAmount New subscription minimum\n   */\n  event MinimumDepositAmountSet(\n    uint256 indexed oldMinDepositAmount,\n    uint256 indexed newMinDepositAmount\n  );\n\n  /**\n   * @notice Event emitted when redeem minimum is set\n   * @param  oldMinRedemptionAmount Old redeem minimum\n   * @param  newMinRedemptionAmount New redeem minimum\n   */\n  event MinimumRedemptionAmountSet(\n    uint256 indexed oldMinRedemptionAmount,\n    uint256 indexed newMinRedemptionAmount\n  );\n\n  /**\n   * @notice Event emitted when the minimum RWA token price is set\n   * @param  oldMinimumRwaPrice Old minimum RWA token price\n   * @param  newMinimumRwaPrice New minimum RWA token price\n   */\n  event MinimumRwaPriceSet(\n    uint256 indexed oldMinimumRwaPrice,\n    uint256 indexed newMinimumRwaPrice\n  );\n\n  /// Event emitted when subscription functionality is paused\n  event SubscribePaused();\n\n  /// Event emitted when subscription functionality is unpaused\n  event SubscribeUnpaused();\n\n  /// Event emitted when redeem functionality is paused\n  event RedeemPaused();\n\n  /// Event emitted when redeem functionality is unpaused\n  event RedeemUnpaused();\n}\n"},{"file_path":"contracts/external/openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"contracts/external/openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol\";\nimport \"contracts/external/openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\";\nimport \"contracts/external/openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol\";\nimport \"contracts/external/openzeppelin/contracts-upgradeable/proxy/Initializable.sol\";\n\n/**\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\n */\nabstract contract AccessControlEnumerableUpgradeable is\n  Initializable,\n  IAccessControlEnumerableUpgradeable,\n  AccessControlUpgradeable\n{\n  function __AccessControlEnumerable_init() internal onlyInitializing {}\n\n  function __AccessControlEnumerable_init_unchained()\n    internal\n    onlyInitializing\n  {}\n\n  using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\n\n  mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers;\n\n  /**\n   * @dev See {IERC165-supportsInterface}.\n   */\n  function supportsInterface(bytes4 interfaceId)\n    public\n    view\n    virtual\n    override\n    returns (bool)\n  {\n    return\n      interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId ||\n      super.supportsInterface(interfaceId);\n  }\n\n  /**\n   * @dev Returns one of the accounts that have `role`. `index` must be a\n   * value between 0 and {getRoleMemberCount}, non-inclusive.\n   *\n   * Role bearers are not sorted in any particular way, and their ordering may\n   * change at any point.\n   *\n   * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\n   * you perform all queries on the same block. See the following\n   * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\n   * for more information.\n   */\n  function getRoleMember(bytes32 role, uint256 index)\n    public\n    view\n    virtual\n    override\n    returns (address)\n  {\n    return _roleMembers[role].at(index);\n  }\n\n  /**\n   * @dev Returns the number of accounts that have `role`. Can be used\n   * together with {getRoleMember} to enumerate all bearers of a role.\n   */\n  function getRoleMemberCount(bytes32 role)\n    public\n    view\n    virtual\n    override\n    returns (uint256)\n  {\n    return _roleMembers[role].length();\n  }\n\n  /**\n   * @dev Overload {_grantRole} to track enumerable memberships\n   */\n  function _grantRole(bytes32 role, address account) internal virtual override {\n    super._grantRole(role, account);\n    _roleMembers[role].add(account);\n  }\n\n  /**\n   * @dev Overload {_revokeRole} to track enumerable memberships\n   */\n  function _revokeRole(bytes32 role, address account)\n    internal\n    virtual\n    override\n  {\n    super._revokeRole(role, account);\n    _roleMembers[role].remove(account);\n  }\n\n  /**\n   * @dev This empty reserved space is put in place to allow future versions to add new\n   * variables without shifting down storage in the inheritance chain.\n   * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n   */\n  uint256[49] private __gap;\n}\n"},{"file_path":"contracts/xManager/interfaces/IOndoRateLimiter.sol","source_code":"// SPDX-License-Identifier: MIT\n/*\n      ▄▄█████████▄\n   ╓██▀└ ,╓▄▄▄, '▀██▄\n  ██▀ ▄██▀▀╙╙▀▀██▄ └██µ           ,,       ,,      ,     ,,,            ,,,\n ██ ,██¬ ▄████▄  ▀█▄ ╙█▄      ▄███▀▀███▄   ███▄    ██  ███▀▀▀███▄    ▄███▀▀███,\n██  ██ ╒█▀'   ╙█▌ ╙█▌ ██     ▐██      ███  █████,  ██  ██▌    └██▌  ██▌     └██▌\n██ ▐█▌ ██      ╟█  █▌ ╟█     ██▌      ▐██  ██ └███ ██  ██▌     ╟██ j██       ╟██\n╟█  ██ ╙██    ▄█▀ ▐█▌ ██     ╙██      ██▌  ██   ╙████  ██▌    ▄██▀  ██▌     ,██▀\n ██ \"██, ╙▀▀███████████⌐      ╙████████▀   ██     ╙██  ███████▀▀     ╙███████▀`\n  ██▄ ╙▀██▄▄▄▄▄,,,                ¬─                                    '─¬\n   ╙▀██▄ '╙╙╙▀▀▀▀▀▀▀▀\n      ╙▀▀██████R⌐\n */\npragma solidity 0.8.16;\n\ninterface IOndoRateLimiter {\n  enum TransactionType {\n    SUBSCRIPTION,\n    REDEMPTION\n  }\n\n  function checkAndUpdateRateLimit(\n    TransactionType transactionType,\n    address rwaToken,\n    bytes32 userID,\n    uint256 usdValue\n  ) external;\n}\n"},{"file_path":"contracts/sanctions/SanctionsListClientUpgradeable.sol","source_code":"/**SPDX-License-Identifier: BUSL-1.1\n\n      ▄▄█████████▄\n   ╓██▀└ ,╓▄▄▄, '▀██▄\n  ██▀ ▄██▀▀╙╙▀▀██▄ └██µ           ,,       ,,      ,     ,,,            ,,,\n ██ ,██¬ ▄████▄  ▀█▄ ╙█▄      ▄███▀▀███▄   ███▄    ██  ███▀▀▀███▄    ▄███▀▀███,\n██  ██ ╒█▀'   ╙█▌ ╙█▌ ██     ▐██      ███  █████,  ██  ██▌    └██▌  ██▌     └██▌\n██ ▐█▌ ██      ╟█  █▌ ╟█     ██▌      ▐██  ██ └███ ██  ██▌     ╟██ j██       ╟██\n╟█  ██ ╙██    ▄█▀ ▐█▌ ██     ╙██      ██▌  ██   ╙████  ██▌    ▄██▀  ██▌     ,██▀\n ██ \"██, ╙▀▀███████████⌐      ╙████████▀   ██     ╙██  ███████▀▀     ╙███████▀`\n  ██▄ ╙▀██▄▄▄▄▄,,,                ¬─                                    '─¬\n   ╙▀██▄ '╙╙╙▀▀▀▀▀▀▀▀\n      ╙▀▀██████R⌐\n\n */\npragma solidity 0.8.16;\n\nimport \"contracts/external/openzeppelin/contracts-upgradeable/proxy/Initializable.sol\";\nimport \"contracts/external/chainalysis/ISanctionsList.sol\";\nimport \"contracts/sanctions/ISanctionsListClient.sol\";\n\n/**\n * @title SanctionsListClient\n * @author Ondo Finance\n * @notice This abstract contract enables inheritors to query whether accounts\n *         are sanctioned or not\n */\nabstract contract SanctionsListClientUpgradeable is\n  Initializable,\n  ISanctionsListClient\n{\n  // Sanctions list address\n  ISanctionsList public override sanctionsList;\n\n  /**\n   * @notice Initialize the contract by setting blocklist variable\n   *\n   * @param _sanctionsList Address of the sanctionsList contract\n   *\n   * @dev Function should be called by the inheriting contract on\n   *      initialization\n   */\n  function __SanctionsListClientInitializable_init(\n    address _sanctionsList\n  ) internal onlyInitializing {\n    __SanctionsListClientInitializable_init_unchained(_sanctionsList);\n  }\n\n  /**\n   * @dev Internal function to future-proof parent linearization. Matches OZ\n   *      upgradeable suggestions\n   */\n  function __SanctionsListClientInitializable_init_unchained(\n    address _sanctionsList\n  ) internal onlyInitializing {\n    _setSanctionsList(_sanctionsList);\n  }\n\n  /**\n   * @notice Sets the sanctions list address for this client\n   *\n   * @param _sanctionsList The new sanctions list address\n   */\n  function _setSanctionsList(address _sanctionsList) internal {\n    if (_sanctionsList == address(0)) {\n      revert SanctionsListZeroAddress();\n    }\n    address oldSanctionsList = address(sanctionsList);\n    sanctionsList = ISanctionsList(_sanctionsList);\n    emit SanctionsListSet(oldSanctionsList, _sanctionsList);\n  }\n\n  /**\n   * @notice Checks whether an address has been sanctioned\n   *\n   * @param account The account to check\n   */\n  function _isSanctioned(address account) internal view returns (bool) {\n    return sanctionsList.isSanctioned(account);\n  }\n\n  /**\n   * @dev This empty reserved space is put in place to allow future versions to add new\n   * variables without shifting down storage in the inheritance chain.\n   * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n   */\n  uint256[50] private __gap;\n}\n"},{"file_path":"contracts/external/chainalysis/ISanctionsList.sol","source_code":"/// SPDX-License-Identifier: UNLICENSED\npragma solidity 0.8.16;\n\ninterface ISanctionsList {\n  function isSanctioned(address addr) external view returns (bool);\n}\n"},{"file_path":"contracts/external/openzeppelin/contracts/token/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.0;\n\nimport \"contracts/external/openzeppelin/contracts/token/IERC20.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 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}"},{"file_path":"contracts/external/openzeppelin/contracts/utils/ERC165.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"contracts/external/openzeppelin/contracts/utils/IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n  /**\n   * @dev See {IERC165-supportsInterface}.\n   */\n  function supportsInterface(bytes4 interfaceId)\n    public\n    view\n    virtual\n    override\n    returns (bool)\n  {\n    return interfaceId == type(IERC165).interfaceId;\n  }\n}\n"},{"file_path":"contracts/external/openzeppelin/contracts-upgradeable/utils/IERC165Upgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165Upgradeable {\n  /**\n   * @dev Returns true if this contract implements the interface defined by\n   * `interfaceId`. See the corresponding\n   * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n   * to learn more about how these ids are created.\n   *\n   * This function call must use less than 30 000 gas.\n   */\n  function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"},{"file_path":"contracts/external/openzeppelin/contracts/security/ReentrancyGuard.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuard {\n  // Booleans are more expensive than uint256 or any type that takes up a full\n  // word because each write operation emits an extra SLOAD to first read the\n  // slot's contents, replace the bits taken up by the boolean, and then write\n  // back. This is the compiler's defense against contract upgrades and\n  // pointer aliasing, and it cannot be disabled.\n\n  // The values being non-zero value makes deployment a bit more expensive,\n  // but in exchange the refund on every call to nonReentrant will be lower in\n  // amount. Since refunds are capped to a percentage of the total\n  // transaction's gas, it is best to keep them low in cases like this one, to\n  // increase the likelihood of the full refund coming into effect.\n  uint256 private constant _NOT_ENTERED = 1;\n  uint256 private constant _ENTERED = 2;\n\n  uint256 private _status;\n\n  constructor() {\n    _status = _NOT_ENTERED;\n  }\n\n  /**\n   * @dev Prevents a contract from calling itself, directly or indirectly.\n   * Calling a `nonReentrant` function from another `nonReentrant`\n   * function is not supported. It is possible to prevent this from happening\n   * by making the `nonReentrant` function external, and making it call a\n   * `private` function that does the actual work.\n   */\n  modifier nonReentrant() {\n    // On the first call to nonReentrant, _notEntered will be true\n    require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n    // Any calls to nonReentrant after this point will fail\n    _status = _ENTERED;\n\n    _;\n\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"},{"file_path":"contracts/rwaOracles/IRWADynamicOracle.sol","source_code":"/**SPDX-License-Identifier: BUSL-1.1\n\n      ▄▄█████████▄\n   ╓██▀└ ,╓▄▄▄, '▀██▄\n  ██▀ ▄██▀▀╙╙▀▀██▄ └██µ           ,,       ,,      ,     ,,,            ,,,\n ██ ,██¬ ▄████▄  ▀█▄ ╙█▄      ▄███▀▀███▄   ███▄    ██  ███▀▀▀███▄    ▄███▀▀███,\n██  ██ ╒█▀'   ╙█▌ ╙█▌ ██     ▐██      ███  █████,  ██  ██▌    └██▌  ██▌     └██▌\n██ ▐█▌ ██      ╟█  █▌ ╟█     ██▌      ▐██  ██ └███ ██  ██▌     ╟██ j██       ╟██\n╟█  ██ ╙██    ▄█▀ ▐█▌ ██     ╙██      ██▌  ██   ╙████  ██▌    ▄██▀  ██▌     ,██▀\n ██ \"██, ╙▀▀███████████⌐      ╙████████▀   ██     ╙██  ███████▀▀     ╙███████▀`\n  ██▄ ╙▀██▄▄▄▄▄,,,                ¬─                                    '─¬\n   ╙▀██▄ '╙╙╙▀▀▀▀▀▀▀▀\n      ╙▀▀██████R⌐\n\n */\npragma solidity 0.8.16;\n\ninterface IRWADynamicOracle {\n  /// @notice Retrieve RWA price data\n  function getPrice() external view returns (uint256);\n}\n"},{"file_path":"contracts/external/openzeppelin/contracts-upgradeable/token/ERC20/IERC20MetadataUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"contracts/external/openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\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":"contracts/external/openzeppelin/contracts/token/IERC20.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n  /**\n   * @dev Returns the amount of tokens in existence.\n   */\n  function totalSupply() external view returns (uint256);\n\n  /**\n   * @dev Returns the amount of tokens owned by `account`.\n   */\n  function balanceOf(address account) external view returns (uint256);\n\n  /**\n   * @dev Moves `amount` 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 amount) 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)\n    external\n    view\n    returns (uint256);\n\n  /**\n   * @dev Sets `amount` as the allowance of `spender` over the 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 amount) external returns (bool);\n\n  /**\n   * @dev Moves `amount` tokens from `from` to `to` using the\n   * allowance mechanism. `amount` 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(\n    address from,\n    address to,\n    uint256 amount\n  ) external returns (bool);\n\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"},{"file_path":"contracts/external/openzeppelin/contracts/access/IAccessControl.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControl {\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   * _Available since v3.1._\n   */\n  event RoleAdminChanged(\n    bytes32 indexed role,\n    bytes32 indexed previousAdminRole,\n    bytes32 indexed newAdminRole\n  );\n\n  /**\n   * @dev Emitted when `account` is granted `role`.\n   *\n   * `sender` is the account that originated the contract call, an admin role\n   * bearer except when using {AccessControl-_setupRole}.\n   */\n  event RoleGranted(\n    bytes32 indexed role,\n    address indexed account,\n    address indexed sender\n  );\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(\n    bytes32 indexed role,\n    address indexed account,\n    address indexed sender\n  );\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 `account`.\n   */\n  function renounceRole(bytes32 role, address account) external;\n}\n"},{"file_path":"contracts/external/openzeppelin/contracts/utils/IERC165.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n  /**\n   * @dev Returns true if this contract implements the interface defined by\n   * `interfaceId`. See the corresponding\n   * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n   * to learn more about how these ids are created.\n   *\n   * This function call must use less than 30 000 gas.\n   */\n  function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"},{"file_path":"contracts/external/openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20Upgradeable {\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 amount of tokens in existence.\n   */\n  function totalSupply() external view returns (uint256);\n\n  /**\n   * @dev Returns the amount of tokens owned by `account`.\n   */\n  function balanceOf(address account) external view returns (uint256);\n\n  /**\n   * @dev Moves `amount` 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 amount) 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)\n    external\n    view\n    returns (uint256);\n\n  /**\n   * @dev Sets `amount` as the allowance of `spender` over the 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 amount) external returns (bool);\n\n  /**\n   * @dev Moves `amount` tokens from `from` to `to` using the\n   * allowance mechanism. `amount` 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(\n    address from,\n    address to,\n    uint256 amount\n  ) external returns (bool);\n}\n"},{"file_path":"contracts/xManager/interfaces/IOndoFees.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\n/*\n      ▄▄█████████▄\n   ╓██▀└ ,╓▄▄▄, '▀██▄\n  ██▀ ▄██▀▀╙╙▀▀██▄ └██µ           ,,       ,,      ,     ,,,            ,,,\n ██ ,██¬ ▄████▄  ▀█▄ ╙█▄      ▄███▀▀███▄   ███▄    ██  ███▀▀▀███▄    ▄███▀▀███,\n██  ██ ╒█▀'   ╙█▌ ╙█▌ ██     ▐██      ███  █████,  ██  ██▌    └██▌  ██▌     └██▌\n██ ▐█▌ ██      ╟█  █▌ ╟█     ██▌      ▐██  ██ └███ ██  ██▌     ╟██ j██       ╟██\n╟█  ██ ╙██    ▄█▀ ▐█▌ ██     ╙██      ██▌  ██   ╙████  ██▌    ▄██▀  ██▌     ,██▀\n ██ \"██, ╙▀▀███████████⌐      ╙████████▀   ██     ╙██  ███████▀▀     ╙███████▀`\n  ██▄ ╙▀██▄▄▄▄▄,,,                ¬─                                    '─¬\n   ╙▀██▄ '╙╙╙▀▀▀▀▀▀▀▀\n      ╙▀▀██████R⌐\n */\npragma solidity 0.8.16;\n\ninterface IOndoFees {\n  function getAndUpdateFee(\n    address rwaToken,\n    address stablecoin,\n    bytes32 userID,\n    uint256 usdValue\n  ) external returns (uint256 usdFee);\n}\n"},{"file_path":"contracts/external/openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControlUpgradeable {\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   * _Available since v3.1._\n   */\n  event RoleAdminChanged(\n    bytes32 indexed role,\n    bytes32 indexed previousAdminRole,\n    bytes32 indexed newAdminRole\n  );\n\n  /**\n   * @dev Emitted when `account` is granted `role`.\n   *\n   * `sender` is the account that originated the contract call, an admin role\n   * bearer except when using {AccessControl-_setupRole}.\n   */\n  event RoleGranted(\n    bytes32 indexed role,\n    address indexed account,\n    address indexed sender\n  );\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(\n    bytes32 indexed role,\n    address indexed account,\n    address indexed sender\n  );\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 `account`.\n   */\n  function renounceRole(bytes32 role, address account) external;\n}\n"},{"file_path":"contracts/external/openzeppelin/contracts/access/AccessControlEnumerable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"contracts/external/openzeppelin/contracts/access/IAccessControlEnumerable.sol\";\nimport \"contracts/external/openzeppelin/contracts/access/AccessControl.sol\";\nimport \"contracts/external/openzeppelin/contracts/utils/EnumerableSet.sol\";\n\n/**\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\n */\nabstract contract AccessControlEnumerable is\n  IAccessControlEnumerable,\n  AccessControl\n{\n  using EnumerableSet for EnumerableSet.AddressSet;\n\n  mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\n\n  /**\n   * @dev See {IERC165-supportsInterface}.\n   */\n  function supportsInterface(bytes4 interfaceId)\n    public\n    view\n    virtual\n    override\n    returns (bool)\n  {\n    return\n      interfaceId == type(IAccessControlEnumerable).interfaceId ||\n      super.supportsInterface(interfaceId);\n  }\n\n  /**\n   * @dev Returns one of the accounts that have `role`. `index` must be a\n   * value between 0 and {getRoleMemberCount}, non-inclusive.\n   *\n   * Role bearers are not sorted in any particular way, and their ordering may\n   * change at any point.\n   *\n   * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\n   * you perform all queries on the same block. See the following\n   * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\n   * for more information.\n   */\n  function getRoleMember(bytes32 role, uint256 index)\n    public\n    view\n    virtual\n    override\n    returns (address)\n  {\n    return _roleMembers[role].at(index);\n  }\n\n  /**\n   * @dev Returns the number of accounts that have `role`. Can be used\n   * together with {getRoleMember} to enumerate all bearers of a role.\n   */\n  function getRoleMemberCount(bytes32 role)\n    public\n    view\n    virtual\n    override\n    returns (uint256)\n  {\n    return _roleMembers[role].length();\n  }\n\n  /**\n   * @dev Overload {_grantRole} to track enumerable memberships\n   */\n  function _grantRole(bytes32 role, address account) internal virtual override {\n    super._grantRole(role, account);\n    _roleMembers[role].add(account);\n  }\n\n  /**\n   * @dev Overload {_revokeRole} to track enumerable memberships\n   */\n  function _revokeRole(bytes32 role, address account)\n    internal\n    virtual\n    override\n  {\n    super._revokeRole(role, account);\n    _roleMembers[role].remove(account);\n  }\n}\n"},{"file_path":"contracts/sanctions/ISanctionsListClient.sol","source_code":"/**SPDX-License-Identifier: BUSL-1.1\n\n      ▄▄█████████▄\n   ╓██▀└ ,╓▄▄▄, '▀██▄\n  ██▀ ▄██▀▀╙╙▀▀██▄ └██µ           ,,       ,,      ,     ,,,            ,,,\n ██ ,██¬ ▄████▄  ▀█▄ ╙█▄      ▄███▀▀███▄   ███▄    ██  ███▀▀▀███▄    ▄███▀▀███,\n██  ██ ╒█▀'   ╙█▌ ╙█▌ ██     ▐██      ███  █████,  ██  ██▌    └██▌  ██▌     └██▌\n██ ▐█▌ ██      ╟█  █▌ ╟█     ██▌      ▐██  ██ └███ ██  ██▌     ╟██ j██       ╟██\n╟█  ██ ╙██    ▄█▀ ▐█▌ ██     ╙██      ██▌  ██   ╙████  ██▌    ▄██▀  ██▌     ,██▀\n ██ \"██, ╙▀▀███████████⌐      ╙████████▀   ██     ╙██  ███████▀▀     ╙███████▀`\n  ██▄ ╙▀██▄▄▄▄▄,,,                ¬─                                    '─¬\n   ╙▀██▄ '╙╙╙▀▀▀▀▀▀▀▀\n      ╙▀▀██████R⌐\n\n */\npragma solidity 0.8.16;\n\nimport \"contracts/external/chainalysis/ISanctionsList.sol\";\n\n/**\n * @title ISanctionsListClient\n * @author Ondo Finance\n * @notice The client interface for sanctions contract.\n */\ninterface ISanctionsListClient {\n  /// @notice Returns reference to the sanctions list that this client queries\n  function sanctionsList() external view returns (ISanctionsList);\n\n  /// @notice Sets the sanctions list reference\n  function setSanctionsList(address sanctionsList) external;\n\n  /// @notice Error for when caller attempts to set the `sanctionsList`\n  ///         reference to the zero address\n  error SanctionsListZeroAddress();\n\n  /// @notice Error for when caller attempts to perform an action on a\n  ///         sanctioned account\n  error SanctionedAccount();\n\n  /**\n   * @dev Event for when the sanctions list reference is set\n   *\n   * @param oldSanctionsList The old list\n   * @param newSanctionsList The new list\n   */\n  event SanctionsListSet(address oldSanctionsList, address newSanctionsList);\n}\n"},{"file_path":"contracts/external/openzeppelin/contracts/access/AccessControl.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControl.sol)\n\npragma solidity ^0.8.0;\n\nimport \"contracts/external/openzeppelin/contracts/access/IAccessControl.sol\";\nimport \"contracts/external/openzeppelin/contracts/utils/Context.sol\";\nimport \"contracts/external/openzeppelin/contracts/utils/Strings.sol\";\nimport \"contracts/external/openzeppelin/contracts/utils/ERC165.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```\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 * ```\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.\n */\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\n  struct RoleData {\n    mapping(address => bool) members;\n    bytes32 adminRole;\n  }\n\n  mapping(bytes32 => RoleData) private _roles;\n\n  bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n\n  /**\n   * @dev Modifier that checks that an account has a specific role. Reverts\n   * with a standardized message including the required role.\n   *\n   * The format of the revert reason is given by the following regular expression:\n   *\n   *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n   *\n   * _Available since v4.1._\n   */\n  modifier onlyRole(bytes32 role) {\n    _checkRole(role, _msgSender());\n    _;\n  }\n\n  /**\n   * @dev See {IERC165-supportsInterface}.\n   */\n  function supportsInterface(bytes4 interfaceId)\n    public\n    view\n    virtual\n    override\n    returns (bool)\n  {\n    return\n      interfaceId == type(IAccessControl).interfaceId ||\n      super.supportsInterface(interfaceId);\n  }\n\n  /**\n   * @dev Returns `true` if `account` has been granted `role`.\n   */\n  function hasRole(bytes32 role, address account)\n    public\n    view\n    virtual\n    override\n    returns (bool)\n  {\n    return _roles[role].members[account];\n  }\n\n  /**\n   * @dev Revert with a standard message if `account` is missing `role`.\n   *\n   * The format of the revert reason is given by the following regular expression:\n   *\n   *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n   */\n  function _checkRole(bytes32 role, address account) internal view virtual {\n    if (!hasRole(role, account)) {\n      revert(\n        string(\n          abi.encodePacked(\n            \"AccessControl: account \",\n            Strings.toHexString(uint160(account), 20),\n            \" is missing role \",\n            Strings.toHexString(uint256(role), 32)\n          )\n        )\n      );\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)\n    public\n    view\n    virtual\n    override\n    returns (bytes32)\n  {\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  function grantRole(bytes32 role, address account)\n    public\n    virtual\n    override\n    onlyRole(getRoleAdmin(role))\n  {\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  function revokeRole(bytes32 role, address account)\n    public\n    virtual\n    override\n    onlyRole(getRoleAdmin(role))\n  {\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 `account`.\n   */\n  function renounceRole(bytes32 role, address account) public virtual override {\n    require(\n      account == _msgSender(),\n      \"AccessControl: can only renounce roles for self\"\n    );\n\n    _revokeRole(role, account);\n  }\n\n  /**\n   * @dev Grants `role` to `account`.\n   *\n   * If `account` had not been already granted `role`, emits a {RoleGranted}\n   * event. Note that unlike {grantRole}, this function doesn't perform any\n   * checks on the calling account.\n   *\n   * [WARNING]\n   * ====\n   * This function should only be called from the constructor when setting\n   * up the initial roles for the system.\n   *\n   * Using this function in any other way is effectively circumventing the admin\n   * system imposed by {AccessControl}.\n   * ====\n   *\n   * NOTE: This function is deprecated in favor of {_grantRole}.\n   */\n  function _setupRole(bytes32 role, address account) internal virtual {\n    _grantRole(role, account);\n  }\n\n  /**\n   * @dev Sets `adminRole` as ``role``'s admin role.\n   *\n   * Emits a {RoleAdminChanged} event.\n   */\n  function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\n    bytes32 previousAdminRole = getRoleAdmin(role);\n    _roles[role].adminRole = adminRole;\n    emit RoleAdminChanged(role, previousAdminRole, adminRole);\n  }\n\n  /**\n   * @dev Grants `role` to `account`.\n   *\n   * Internal function without access restriction.\n   */\n  function _grantRole(bytes32 role, address account) internal virtual {\n    if (!hasRole(role, account)) {\n      _roles[role].members[account] = true;\n      emit RoleGranted(role, account, _msgSender());\n    }\n  }\n\n  /**\n   * @dev Revokes `role` from `account`.\n   *\n   * Internal function without access restriction.\n   */\n  function _revokeRole(bytes32 role, address account) internal virtual {\n    if (hasRole(role, account)) {\n      _roles[role].members[account] = false;\n      emit RoleRevoked(role, account, _msgSender());\n    }\n  }\n}\n"},{"file_path":"contracts/external/openzeppelin/contracts/token/IERC20Metadata.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"contracts/external/openzeppelin/contracts/token/IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\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":"contracts/interfaces/IRWALike.sol","source_code":"/**SPDX-License-Identifier: BUSL-1.1\n\n      ▄▄█████████▄\n   ╓██▀└ ,╓▄▄▄, '▀██▄\n  ██▀ ▄██▀▀╙╙▀▀██▄ └██µ           ,,       ,,      ,     ,,,            ,,,\n ██ ,██¬ ▄████▄  ▀█▄ ╙█▄      ▄███▀▀███▄   ███▄    ██  ███▀▀▀███▄    ▄███▀▀███,\n██  ██ ╒█▀'   ╙█▌ ╙█▌ ██     ▐██      ███  █████,  ██  ██▌    └██▌  ██▌     └██▌\n██ ▐█▌ ██      ╟█  █▌ ╟█     ██▌      ▐██  ██ └███ ██  ██▌     ╟██ j██       ╟██\n╟█  ██ ╙██    ▄█▀ ▐█▌ ██     ╙██      ██▌  ██   ╙████  ██▌    ▄██▀  ██▌     ,██▀\n ██ \"██, ╙▀▀███████████⌐      ╙████████▀   ██     ╙██  ███████▀▀     ╙███████▀`\n  ██▄ ╙▀██▄▄▄▄▄,,,                ¬─                                    '─¬\n   ╙▀██▄ '╙╙╙▀▀▀▀▀▀▀▀\n      ╙▀▀██████R⌐\n */\npragma solidity 0.8.16;\n\n// This interface is not inherited directly by RWA, instead, it is a\n// subset of functions provided by all RWA tokens that the RWA Hub\n// Client uses.\nimport \"contracts/external/openzeppelin/contracts/token/IERC20.sol\";\n\ninterface IRWALike is IERC20 {\n  function mint(address to, uint256 amount) external;\n\n  function burn(uint256 amount) external;\n\n  function burnFrom(address from, uint256 amount) external;\n}\n"},{"file_path":"contracts/interfaces/IBlocklist.sol","source_code":"/**SPDX-License-Identifier: BUSL-1.1\n\n      ▄▄█████████▄\n   ╓██▀└ ,╓▄▄▄, '▀██▄\n  ██▀ ▄██▀▀╙╙▀▀██▄ └██µ           ,,       ,,      ,     ,,,            ,,,\n ██ ,██¬ ▄████▄  ▀█▄ ╙█▄      ▄███▀▀███▄   ███▄    ██  ███▀▀▀███▄    ▄███▀▀███,\n██  ██ ╒█▀'   ╙█▌ ╙█▌ ██     ▐██      ███  █████,  ██  ██▌    └██▌  ██▌     └██▌\n██ ▐█▌ ██      ╟█  █▌ ╟█     ██▌      ▐██  ██ └███ ██  ██▌     ╟██ j██       ╟██\n╟█  ██ ╙██    ▄█▀ ▐█▌ ██     ╙██      ██▌  ██   ╙████  ██▌    ▄██▀  ██▌     ,██▀\n ██ \"██, ╙▀▀███████████⌐      ╙████████▀   ██     ╙██  ███████▀▀     ╙███████▀`\n  ██▄ ╙▀██▄▄▄▄▄,,,                ¬─                                    '─¬\n   ╙▀██▄ '╙╙╙▀▀▀▀▀▀▀▀\n      ╙▀▀██████R⌐\n\n */\npragma solidity 0.8.16;\n\ninterface IBlocklist {\n  function addToBlocklist(address[] calldata accounts) external;\n\n  function removeFromBlocklist(address[] calldata accounts) external;\n\n  function isBlocked(address account) external view returns (bool);\n\n  /**\n   * @notice Event emitted when addresses are added to the blocklist\n   *\n   * @param accounts The addresses that were added to the blocklist\n   */\n  event BlockedAddressesAdded(address[] accounts);\n\n  /**\n   * @notice Event emitted when addresses are removed from the blocklist\n   *\n   * @param accounts The addresses that were removed from the blocklist\n   */\n  event BlockedAddressesRemoved(address[] accounts);\n}\n"},{"file_path":"contracts/xManager/interfaces/IUSDY_InstantManager.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\n/*\n      ▄▄█████████▄\n   ╓██▀└ ,╓▄▄▄, '▀██▄\n  ██▀ ▄██▀▀╙╙▀▀██▄ └██µ           ,,       ,,      ,     ,,,            ,,,\n ██ ,██¬ ▄████▄  ▀█▄ ╙█▄      ▄███▀▀███▄   ███▄    ██  ███▀▀▀███▄    ▄███▀▀███,\n██  ██ ╒█▀'   ╙█▌ ╙█▌ ██     ▐██      ███  █████,  ██  ██▌    └██▌  ██▌     └██▌\n██ ▐█▌ ██      ╟█  █▌ ╟█     ██▌      ▐██  ██ └███ ██  ██▌     ╟██ j██       ╟██\n╟█  ██ ╙██    ▄█▀ ▐█▌ ██     ╙██      ██▌  ██   ╙████  ██▌    ▄██▀  ██▌     ,██▀\n ██ \"██, ╙▀▀███████████⌐      ╙████████▀   ██     ╙██  ███████▀▀     ╙███████▀`\n  ██▄ ╙▀██▄▄▄▄▄,,,                ¬─                                    '─¬\n   ╙▀██▄ '╙╙╙▀▀▀▀▀▀▀▀\n      ╙▀▀██████R⌐\n */\npragma solidity 0.8.16;\n\ninterface IUSDY_InstantManager {\n  function subscribe(\n    address depositToken,\n    uint256 depositAmount,\n    uint256 minimumRwaReceived\n  ) external returns (uint256 rwaAmountOut);\n\n  function subscribeRebasingUSDY(\n    address depositToken,\n    uint256 depositAmount,\n    uint256 minimumRwaReceived\n  ) external returns (uint256 rusdyAmountOut);\n\n  function adminSubscribe(\n    address recipient,\n    uint256 rwaAmount,\n    bytes32 metadata\n  ) external;\n\n  function adminSubscribeRebasingUSDY(\n    address recipient,\n    uint256 rusdyAmount,\n    bytes32 metadata\n  ) external;\n\n  function redeem(\n    uint256 rwaAmount,\n    address receivingToken,\n    uint256 minimumTokenReceived\n  ) external returns (uint256 receiveTokenAmount);\n\n  function redeemRebasingUSDY(\n    uint256 rwaAmount,\n    address receivingToken,\n    uint256 minimumTokenReceived\n  ) external returns (uint256 receiveTokenAmount);\n}\n"},{"file_path":"contracts/xManager/rwaManagers/IBaseRWAManagerErrors.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\n/*\n      ▄▄█████████▄\n   ╓██▀└ ,╓▄▄▄, '▀██▄\n  ██▀ ▄██▀▀╙╙▀▀██▄ └██µ           ,,       ,,      ,     ,,,            ,,,\n ██ ,██¬ ▄████▄  ▀█▄ ╙█▄      ▄███▀▀███▄   ███▄    ██  ███▀▀▀███▄    ▄███▀▀███,\n██  ██ ╒█▀'   ╙█▌ ╙█▌ ██     ▐██      ███  █████,  ██  ██▌    └██▌  ██▌     └██▌\n██ ▐█▌ ██      ╟█  █▌ ╟█     ██▌      ▐██  ██ └███ ██  ██▌     ╟██ j██       ╟██\n╟█  ██ ╙██    ▄█▀ ▐█▌ ██     ╙██      ██▌  ██   ╙████  ██▌    ▄██▀  ██▌     ,██▀\n ██ \"██, ╙▀▀███████████⌐      ╙████████▀   ██     ╙██  ███████▀▀     ╙███████▀`\n  ██▄ ╙▀██▄▄▄▄▄,,,                ¬─                                    '─¬\n   ╙▀██▄ '╙╙╙▀▀▀▀▀▀▀▀\n      ╙▀▀██████R⌐\n */\npragma solidity 0.8.16;\n\ninterface IBaseRWAManagerErrors {\n  /// Error emitted when the token address is zero\n  error TokenAddressCantBeZero();\n\n  /// Error emitted when the token is not accepted for subscription\n  error TokenNotAccepted();\n\n  /// Error emitted when the deposit amount is too small\n  error DepositAmountTooSmall();\n\n  /// Error emitted when rwa amount is below the `minimumRwaReceived` in a subscription\n  error RwaReceiveAmountTooSmall();\n\n  /// Error emitted when the user is not registered with the ID registry\n  error UserNotRegistered();\n\n  /// Error emitted when the redemption amount is too small\n  error RedemptionAmountTooSmall();\n\n  /// Error emitted when the receive amount is below the `minimumReceiveAmount` in a redemption\n  error ReceiveAmountTooSmall();\n\n  /// Error emitted when attempting to set the `OndoTokenRouter` address to zero\n  error RouterAddressCantBeZero();\n\n  /// Error emitted when attempting to set the `OndoOracle` address to zero\n  error OracleAddressCantBeZero();\n\n  /// Error emitted when attempting to set the `OndoCompliance` address to zero\n  error ComplianceAddressCantBeZero();\n\n  /// Error emitted when attempting to set the `OndoIDRegistry` address to zero\n  error IDRegistryAddressCantBeZero();\n\n  /// Error emitted when attempting to set the `OndoRateLimiter` address to zero\n  error RateLimiterAddressCantBeZero();\n\n  /// Error emitted when attempting to set the `OndoFees` address to zero\n  error FeesAddressCantBeZero();\n\n  /// Error emitted when attempting to set the `AdminSubscriptionChecker` address to zero\n  error AdminSubscriptionCheckerAddressCantBeZero();\n\n  /// Error emitted when the price of RWA token returned from the oracle is below the minimum price\n  error RWAPriceTooLow();\n\n  /// Error emitted when the subscription functionality is paused\n  error SubscriptionsPaused();\n\n  /// Error emitted when the redemption functionality is paused\n  error RedemptionsPaused();\n\n  /// Error emitted when the fee is greater than the redemption amount\n  error FeeGreaterThanRedemption();\n\n  /// Error emitted when the fee is greater than the subscription amount\n  error FeeGreaterThanSubscription();\n}\n"},{"file_path":"contracts/xManager/interfaces/IOndoOracle.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\n/*\n      ▄▄█████████▄\n   ╓██▀└ ,╓▄▄▄, '▀██▄\n  ██▀ ▄██▀▀╙╙▀▀██▄ └██µ           ,,       ,,      ,     ,,,            ,,,\n ██ ,██¬ ▄████▄  ▀█▄ ╙█▄      ▄███▀▀███▄   ███▄    ██  ███▀▀▀███▄    ▄███▀▀███,\n██  ██ ╒█▀'   ╙█▌ ╙█▌ ██     ▐██      ███  █████,  ██  ██▌    └██▌  ██▌     └██▌\n██ ▐█▌ ██      ╟█  █▌ ╟█     ██▌      ▐██  ██ └███ ██  ██▌     ╟██ j██       ╟██\n╟█  ██ ╙██    ▄█▀ ▐█▌ ██     ╙██      ██▌  ██   ╙████  ██▌    ▄██▀  ██▌     ,██▀\n ██ \"██, ╙▀▀███████████⌐      ╙████████▀   ██     ╙██  ███████▀▀     ╙███████▀`\n  ██▄ ╙▀██▄▄▄▄▄,,,                ¬─                                    '─¬\n   ╙▀██▄ '╙╙╙▀▀▀▀▀▀▀▀\n      ╙▀▀██████R⌐\n */\npragma solidity 0.8.16;\n\ninterface IOndoOracle {\n  function getAssetPrice(address token) external view returns (uint256 price);\n}\n"},{"file_path":"contracts/external/openzeppelin/contracts/utils/EnumerableSet.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for managing\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n * types.\n *\n * Sets have the following properties:\n *\n * - Elements are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```\n * contract Example {\n *     // Add the library methods\n *     using EnumerableSet for EnumerableSet.AddressSet;\n *\n *     // Declare a set state variable\n *     EnumerableSet.AddressSet private mySet;\n * }\n * ```\n *\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\n * and `uint256` (`UintSet`) are supported.\n */\nlibrary EnumerableSet {\n  // To implement this library for multiple types with as little code\n  // repetition as possible, we write it in terms of a generic Set type with\n  // bytes32 values.\n  // The Set implementation uses private functions, and user-facing\n  // implementations (such as AddressSet) are just wrappers around the\n  // underlying Set.\n  // This means that we can only create new EnumerableSets for types that fit\n  // in bytes32.\n\n  struct Set {\n    // Storage of set values\n    bytes32[] _values;\n    // Position of the value in the `values` array, plus 1 because index 0\n    // means a value is not in the set.\n    mapping(bytes32 => uint256) _indexes;\n  }\n\n  /**\n   * @dev Add a value to a set. O(1).\n   *\n   * Returns true if the value was added to the set, that is if it was not\n   * already present.\n   */\n  function _add(Set storage set, bytes32 value) private returns (bool) {\n    if (!_contains(set, value)) {\n      set._values.push(value);\n      // The value is stored at length-1, but we add 1 to all indexes\n      // and use 0 as a sentinel value\n      set._indexes[value] = set._values.length;\n      return true;\n    } else {\n      return false;\n    }\n  }\n\n  /**\n   * @dev Removes a value from a set. O(1).\n   *\n   * Returns true if the value was removed from the set, that is if it was\n   * present.\n   */\n  function _remove(Set storage set, bytes32 value) private returns (bool) {\n    // We read and store the value's index to prevent multiple reads from the same storage slot\n    uint256 valueIndex = set._indexes[value];\n\n    if (valueIndex != 0) {\n      // Equivalent to contains(set, value)\n      // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\n      // the array, and then remove the last element (sometimes called as 'swap and pop').\n      // This modifies the order of the array, as noted in {at}.\n\n      uint256 toDeleteIndex = valueIndex - 1;\n      uint256 lastIndex = set._values.length - 1;\n\n      if (lastIndex != toDeleteIndex) {\n        bytes32 lastvalue = set._values[lastIndex];\n\n        // Move the last value to the index where the value to delete is\n        set._values[toDeleteIndex] = lastvalue;\n        // Update the index for the moved value\n        set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex\n      }\n\n      // Delete the slot where the moved value was stored\n      set._values.pop();\n\n      // Delete the index for the deleted slot\n      delete set._indexes[value];\n\n      return true;\n    } else {\n      return false;\n    }\n  }\n\n  /**\n   * @dev Returns true if the value is in the set. O(1).\n   */\n  function _contains(Set storage set, bytes32 value)\n    private\n    view\n    returns (bool)\n  {\n    return set._indexes[value] != 0;\n  }\n\n  /**\n   * @dev Returns the number of values on the set. O(1).\n   */\n  function _length(Set storage set) private view returns (uint256) {\n    return set._values.length;\n  }\n\n  /**\n   * @dev Returns the value stored at position `index` in the set. O(1).\n   *\n   * Note that there are no guarantees on the ordering of values inside the\n   * array, and it may change when more values are added or removed.\n   *\n   * Requirements:\n   *\n   * - `index` must be strictly less than {length}.\n   */\n  function _at(Set storage set, uint256 index) private view returns (bytes32) {\n    return set._values[index];\n  }\n\n  /**\n   * @dev Return the entire set in an array\n   *\n   * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n   * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n   * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n   * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n   */\n  function _values(Set storage set) private view returns (bytes32[] memory) {\n    return set._values;\n  }\n\n  // Bytes32Set\n\n  struct Bytes32Set {\n    Set _inner;\n  }\n\n  /**\n   * @dev Add a value to a set. O(1).\n   *\n   * Returns true if the value was added to the set, that is if it was not\n   * already present.\n   */\n  function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n    return _add(set._inner, value);\n  }\n\n  /**\n   * @dev Removes a value from a set. O(1).\n   *\n   * Returns true if the value was removed from the set, that is if it was\n   * present.\n   */\n  function remove(Bytes32Set storage set, bytes32 value)\n    internal\n    returns (bool)\n  {\n    return _remove(set._inner, value);\n  }\n\n  /**\n   * @dev Returns true if the value is in the set. O(1).\n   */\n  function contains(Bytes32Set storage set, bytes32 value)\n    internal\n    view\n    returns (bool)\n  {\n    return _contains(set._inner, value);\n  }\n\n  /**\n   * @dev Returns the number of values in the set. O(1).\n   */\n  function length(Bytes32Set storage set) internal view returns (uint256) {\n    return _length(set._inner);\n  }\n\n  /**\n   * @dev Returns the value stored at position `index` in the set. O(1).\n   *\n   * Note that there are no guarantees on the ordering of values inside the\n   * array, and it may change when more values are added or removed.\n   *\n   * Requirements:\n   *\n   * - `index` must be strictly less than {length}.\n   */\n  function at(Bytes32Set storage set, uint256 index)\n    internal\n    view\n    returns (bytes32)\n  {\n    return _at(set._inner, index);\n  }\n\n  /**\n   * @dev Return the entire set in an array\n   *\n   * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n   * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n   * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n   * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n   */\n  function values(Bytes32Set storage set)\n    internal\n    view\n    returns (bytes32[] memory)\n  {\n    return _values(set._inner);\n  }\n\n  // AddressSet\n\n  struct AddressSet {\n    Set _inner;\n  }\n\n  /**\n   * @dev Add a value to a set. O(1).\n   *\n   * Returns true if the value was added to the set, that is if it was not\n   * already present.\n   */\n  function add(AddressSet storage set, address value) internal returns (bool) {\n    return _add(set._inner, bytes32(uint256(uint160(value))));\n  }\n\n  /**\n   * @dev Removes a value from a set. O(1).\n   *\n   * Returns true if the value was removed from the set, that is if it was\n   * present.\n   */\n  function remove(AddressSet storage set, address value)\n    internal\n    returns (bool)\n  {\n    return _remove(set._inner, bytes32(uint256(uint160(value))));\n  }\n\n  /**\n   * @dev Returns true if the value is in the set. O(1).\n   */\n  function contains(AddressSet storage set, address value)\n    internal\n    view\n    returns (bool)\n  {\n    return _contains(set._inner, bytes32(uint256(uint160(value))));\n  }\n\n  /**\n   * @dev Returns the number of values in the set. O(1).\n   */\n  function length(AddressSet storage set) internal view returns (uint256) {\n    return _length(set._inner);\n  }\n\n  /**\n   * @dev Returns the value stored at position `index` in the set. O(1).\n   *\n   * Note that there are no guarantees on the ordering of values inside the\n   * array, and it may change when more values are added or removed.\n   *\n   * Requirements:\n   *\n   * - `index` must be strictly less than {length}.\n   */\n  function at(AddressSet storage set, uint256 index)\n    internal\n    view\n    returns (address)\n  {\n    return address(uint160(uint256(_at(set._inner, index))));\n  }\n\n  /**\n   * @dev Return the entire set in an array\n   *\n   * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n   * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n   * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n   * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n   */\n  function values(AddressSet storage set)\n    internal\n    view\n    returns (address[] memory)\n  {\n    bytes32[] memory store = _values(set._inner);\n    address[] memory result;\n\n    assembly {\n      result := store\n    }\n\n    return result;\n  }\n\n  // UintSet\n\n  struct UintSet {\n    Set _inner;\n  }\n\n  /**\n   * @dev Add a value to a set. O(1).\n   *\n   * Returns true if the value was added to the set, that is if it was not\n   * already present.\n   */\n  function add(UintSet storage set, uint256 value) internal returns (bool) {\n    return _add(set._inner, bytes32(value));\n  }\n\n  /**\n   * @dev Removes a value from a set. O(1).\n   *\n   * Returns true if the value was removed from the set, that is if it was\n   * present.\n   */\n  function remove(UintSet storage set, uint256 value) internal returns (bool) {\n    return _remove(set._inner, bytes32(value));\n  }\n\n  /**\n   * @dev Returns true if the value is in the set. O(1).\n   */\n  function contains(UintSet storage set, uint256 value)\n    internal\n    view\n    returns (bool)\n  {\n    return _contains(set._inner, bytes32(value));\n  }\n\n  /**\n   * @dev Returns the number of values on the set. O(1).\n   */\n  function length(UintSet storage set) internal view returns (uint256) {\n    return _length(set._inner);\n  }\n\n  /**\n   * @dev Returns the value stored at position `index` in the set. O(1).\n   *\n   * Note that there are no guarantees on the ordering of values inside the\n   * array, and it may change when more values are added or removed.\n   *\n   * Requirements:\n   *\n   * - `index` must be strictly less than {length}.\n   */\n  function at(UintSet storage set, uint256 index)\n    internal\n    view\n    returns (uint256)\n  {\n    return uint256(_at(set._inner, index));\n  }\n\n  /**\n   * @dev Return the entire set in an array\n   *\n   * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n   * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n   * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n   * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n   */\n  function values(UintSet storage set)\n    internal\n    view\n    returns (uint256[] memory)\n  {\n    bytes32[] memory store = _values(set._inner);\n    uint256[] memory result;\n\n    assembly {\n      result := store\n    }\n\n    return result;\n  }\n}\n"},{"file_path":"contracts/xManager/interfaces/IAdminSubscriptionChecker.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\n/*\n      ▄▄█████████▄\n   ╓██▀└ ,╓▄▄▄, '▀██▄\n  ██▀ ▄██▀▀╙╙▀▀██▄ └██µ           ,,       ,,      ,     ,,,            ,,,\n ██ ,██¬ ▄████▄  ▀█▄ ╙█▄      ▄███▀▀███▄   ███▄    ██  ███▀▀▀███▄    ▄███▀▀███,\n██  ██ ╒█▀'   ╙█▌ ╙█▌ ██     ▐██      ███  █████,  ██  ██▌    └██▌  ██▌     └██▌\n██ ▐█▌ ██      ╟█  █▌ ╟█     ██▌      ▐██  ██ └███ ██  ██▌     ╟██ j██       ╟██\n╟█  ██ ╙██    ▄█▀ ▐█▌ ██     ╙██      ██▌  ██   ╙████  ██▌    ▄██▀  ██▌     ,██▀\n ██ \"██, ╙▀▀███████████⌐      ╙████████▀   ██     ╙██  ███████▀▀     ╙███████▀`\n  ██▄ ╙▀██▄▄▄▄▄,,,                ¬─                                    '─¬\n   ╙▀██▄ '╙╙╙▀▀▀▀▀▀▀▀\n      ╙▀▀██████R⌐\n */\npragma solidity 0.8.16;\n\ninterface IAdminSubscriptionChecker {\n  function checkAndUpdateAdminSubscriptionAllowance(\n    address admin,\n    uint256 usdAmount\n  ) external;\n}\n"},{"file_path":"contracts/external/openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\nimport \"contracts/external/openzeppelin/contracts-upgradeable/proxy/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  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  /**\n   * @dev This empty reserved space is put in place to allow future versions to add new\n   * variables without shifting down storage in the inheritance chain.\n   * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n   */\n  uint256[50] private __gap;\n}\n"},{"file_path":"contracts/external/openzeppelin/contracts-upgradeable/proxy/Initializable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"contracts/external/openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\";\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 * ```\n * contract MyToken is ERC20Upgradeable {\n *     function initialize() initializer public {\n *         __ERC20_init(\"MyToken\", \"MTK\");\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 Indicates that the contract has been initialized.\n   * @custom:oz-retyped-from bool\n   */\n  uint8 private _initialized;\n\n  /**\n   * @dev Indicates that the contract is in the process of being initialized.\n   */\n  bool private _initializing;\n\n  /**\n   * @dev Triggered when the contract has been initialized or reinitialized.\n   */\n  event Initialized(uint8 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. Equivalent to `reinitializer(1)`.\n   */\n  modifier initializer() {\n    bool isTopLevelCall = !_initializing;\n    require(\n      (isTopLevelCall && _initialized < 1) ||\n        (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n      \"Initializable: contract is already initialized\"\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   * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\n   * initialization step. This is essential to configure modules that are added through upgrades and that require\n   * initialization.\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  modifier reinitializer(uint8 version) {\n    require(\n      !_initializing && _initialized < version,\n      \"Initializable: contract is already initialized\"\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    require(_initializing, \"Initializable: contract is not initializing\");\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  function _disableInitializers() internal virtual {\n    require(!_initializing, \"Initializable: contract is initializing\");\n    if (_initialized < type(uint8).max) {\n      _initialized = type(uint8).max;\n      emit Initialized(type(uint8).max);\n    }\n  }\n}\n"},{"file_path":"contracts/interfaces/IUSDY.sol","source_code":"/**SPDX-License-Identifier: BUSL-1.1\n\n      ▄▄█████████▄\n   ╓██▀└ ,╓▄▄▄, '▀██▄\n  ██▀ ▄██▀▀╙╙▀▀██▄ └██µ           ,,       ,,      ,     ,,,            ,,,\n ██ ,██¬ ▄████▄  ▀█▄ ╙█▄      ▄███▀▀███▄   ███▄    ██  ███▀▀▀███▄    ▄███▀▀███,\n██  ██ ╒█▀'   ╙█▌ ╙█▌ ██     ▐██      ███  █████,  ██  ██▌    └██▌  ██▌     └██▌\n██ ▐█▌ ██      ╟█  █▌ ╟█     ██▌      ▐██  ██ └███ ██  ██▌     ╟██ j██       ╟██\n╟█  ██ ╙██    ▄█▀ ▐█▌ ██     ╙██      ██▌  ██   ╙████  ██▌    ▄██▀  ██▌     ,██▀\n ██ \"██, ╙▀▀███████████⌐      ╙████████▀   ██     ╙██  ███████▀▀     ╙███████▀`\n  ██▄ ╙▀██▄▄▄▄▄,,,                ¬─                                    '─¬\n   ╙▀██▄ '╙╙╙▀▀▀▀▀▀▀▀\n      ╙▀▀██████R⌐\n\n */\n\nimport \"contracts/external/openzeppelin/contracts/token/IERC20.sol\";\n\npragma solidity 0.8.16; // latest available for using OZ\n\ninterface IUSDY is IERC20 {\n  function getPooledCashByShares(uint256) external view returns (uint256);\n\n  function getSharesByPooledCash(uint256) external view returns (uint256);\n}\n"},{"file_path":"contracts/external/openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlUpgradeable.sol\";\n\n/**\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\n */\ninterface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable {\n  /**\n   * @dev Returns one of the accounts that have `role`. `index` must be a\n   * value between 0 and {getRoleMemberCount}, non-inclusive.\n   *\n   * Role bearers are not sorted in any particular way, and their ordering may\n   * change at any point.\n   *\n   * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\n   * you perform all queries on the same block. See the following\n   * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\n   * for more information.\n   */\n  function getRoleMember(bytes32 role, uint256 index)\n    external\n    view\n    returns (address);\n\n  /**\n   * @dev Returns the number of accounts that have `role`. Can be used\n   * together with {getRoleMember} to enumerate all bearers of a role.\n   */\n  function getRoleMemberCount(bytes32 role) external view returns (uint256);\n}\n"},{"file_path":"contracts/interfaces/IBlocklistClient.sol","source_code":"/**SPDX-License-Identifier: BUSL-1.1\n\n      ▄▄█████████▄\n   ╓██▀└ ,╓▄▄▄, '▀██▄\n  ██▀ ▄██▀▀╙╙▀▀██▄ └██µ           ,,       ,,      ,     ,,,            ,,,\n ██ ,██¬ ▄████▄  ▀█▄ ╙█▄      ▄███▀▀███▄   ███▄    ██  ███▀▀▀███▄    ▄███▀▀███,\n██  ██ ╒█▀'   ╙█▌ ╙█▌ ██     ▐██      ███  █████,  ██  ██▌    └██▌  ██▌     └██▌\n██ ▐█▌ ██      ╟█  █▌ ╟█     ██▌      ▐██  ██ └███ ██  ██▌     ╟██ j██       ╟██\n╟█  ██ ╙██    ▄█▀ ▐█▌ ██     ╙██      ██▌  ██   ╙████  ██▌    ▄██▀  ██▌     ,██▀\n ██ \"██, ╙▀▀███████████⌐      ╙████████▀   ██     ╙██  ███████▀▀     ╙███████▀`\n  ██▄ ╙▀██▄▄▄▄▄,,,                ¬─                                    '─¬\n   ╙▀██▄ '╙╙╙▀▀▀▀▀▀▀▀\n      ╙▀▀██████R⌐\n\n */\npragma solidity 0.8.16;\n\nimport \"contracts/interfaces/IBlocklist.sol\";\n\n/**\n * @title IBlocklistClient\n * @author Ondo Finance\n * @notice The client interface for the Blocklist contract.\n */\ninterface IBlocklistClient {\n  /// @notice Returns reference to the blocklist that this client queries\n  function blocklist() external view returns (IBlocklist);\n\n  /// @notice Sets the blocklist reference\n  function setBlocklist(address registry) external;\n\n  /// @notice Error for when caller attempts to set the blocklist reference\n  ///         to the zero address\n  error BlocklistZeroAddress();\n\n  /// @notice Error for when caller attempts to perform action on a blocked\n  ///         account\n  error BlockedAccount();\n\n  /**\n   * @dev Event for when the blocklist reference is set\n   *\n   * @param oldBlocklist The old blocklist\n   * @param newBlocklist The new blocklist\n   */\n  event BlocklistSet(address oldBlocklist, address newBlocklist);\n}\n"},{"file_path":"contracts/external/openzeppelin/contracts/utils/Strings.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n  bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\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    // Inspired by OraclizeAPI's implementation - MIT licence\n    // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n    if (value == 0) {\n      return \"0\";\n    }\n    uint256 temp = value;\n    uint256 digits;\n    while (temp != 0) {\n      digits++;\n      temp /= 10;\n    }\n    bytes memory buffer = new bytes(digits);\n    while (value != 0) {\n      digits -= 1;\n      buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n      value /= 10;\n    }\n    return string(buffer);\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    if (value == 0) {\n      return \"0x00\";\n    }\n    uint256 temp = value;\n    uint256 length = 0;\n    while (temp != 0) {\n      length++;\n      temp >>= 8;\n    }\n    return toHexString(value, length);\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)\n    internal\n    pure\n    returns (string memory)\n  {\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_SYMBOLS[value & 0xf];\n      value >>= 4;\n    }\n    require(value == 0, \"Strings: hex length insufficient\");\n    return string(buffer);\n  }\n}\n"},{"file_path":"contracts/external/openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"contracts/external/openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\";\nimport \"contracts/external/openzeppelin/contracts-upgradeable/proxy/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  /**\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  bool private _paused;\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    _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    return _paused;\n  }\n\n  /**\n   * @dev Throws if the contract is paused.\n   */\n  function _requireNotPaused() internal view virtual {\n    require(!paused(), \"Pausable: paused\");\n  }\n\n  /**\n   * @dev Throws if the contract is not paused.\n   */\n  function _requirePaused() internal view virtual {\n    require(paused(), \"Pausable: not paused\");\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    _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    _paused = false;\n    emit Unpaused(_msgSender());\n  }\n\n  /**\n   * @dev This empty reserved space is put in place to allow future versions to add new\n   * variables without shifting down storage in the inheritance chain.\n   * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n   */\n  uint256[49] private __gap;\n}\n"},{"file_path":"contracts/usdy/blocklist/BlocklistClientUpgradeable.sol","source_code":"/**SPDX-License-Identifier: BUSL-1.1\n\n      ▄▄█████████▄\n   ╓██▀└ ,╓▄▄▄, '▀██▄\n  ██▀ ▄██▀▀╙╙▀▀██▄ └██µ           ,,       ,,      ,     ,,,            ,,,\n ██ ,██¬ ▄████▄  ▀█▄ ╙█▄      ▄███▀▀███▄   ███▄    ██  ███▀▀▀███▄    ▄███▀▀███,\n██  ██ ╒█▀'   ╙█▌ ╙█▌ ██     ▐██      ███  █████,  ██  ██▌    └██▌  ██▌     └██▌\n██ ▐█▌ ██      ╟█  █▌ ╟█     ██▌      ▐██  ██ └███ ██  ██▌     ╟██ j██       ╟██\n╟█  ██ ╙██    ▄█▀ ▐█▌ ██     ╙██      ██▌  ██   ╙████  ██▌    ▄██▀  ██▌     ,██▀\n ██ \"██, ╙▀▀███████████⌐      ╙████████▀   ██     ╙██  ███████▀▀     ╙███████▀`\n  ██▄ ╙▀██▄▄▄▄▄,,,                ¬─                                    '─¬\n   ╙▀██▄ '╙╙╙▀▀▀▀▀▀▀▀\n      ╙▀▀██████R⌐\n\n */\npragma solidity 0.8.16;\n\nimport \"contracts/interfaces/IBlocklist.sol\";\nimport \"contracts/interfaces/IBlocklistClient.sol\";\nimport \"contracts/external/openzeppelin/contracts-upgradeable/proxy/Initializable.sol\";\n\n/**\n * @title BlocklistClient\n * @author Ondo Finance\n * @notice This abstract contract manages state for upgradeable blocklist\n *         clients\n */\nabstract contract BlocklistClientUpgradeable is\n  Initializable,\n  IBlocklistClient\n{\n  // Blocklist contract\n  IBlocklist public override blocklist;\n\n  /**\n   * @notice Initialize the contract by setting blocklist variable\n   *\n   * @param _blocklist Address of the blocklist contract\n   *\n   * @dev Function should be called by the inheriting contract on\n   *      initialization\n   */\n  function __BlocklistClientInitializable_init(\n    address _blocklist\n  ) internal onlyInitializing {\n    __BlocklistClientInitializable_init_unchained(_blocklist);\n  }\n\n  /**\n   * @dev Internal function to future-proof parent linearization. Matches OZ\n   *      upgradeable suggestions\n   */\n  function __BlocklistClientInitializable_init_unchained(\n    address _blocklist\n  ) internal onlyInitializing {\n    _setBlocklist(_blocklist);\n  }\n\n  /**\n   * @notice Sets the blocklist address for this client\n   *\n   * @param _blocklist The new blocklist address\n   */\n  function _setBlocklist(address _blocklist) internal {\n    if (_blocklist == address(0)) {\n      revert BlocklistZeroAddress();\n    }\n    address oldBlocklist = address(blocklist);\n    blocklist = IBlocklist(_blocklist);\n    emit BlocklistSet(oldBlocklist, _blocklist);\n  }\n\n  /**\n   * @notice Checks whether an address has been blocked\n   *\n   * @param account The account to check\n   */\n  function _isBlocked(address account) internal view returns (bool) {\n    return blocklist.isBlocked(account);\n  }\n\n  /**\n   * @dev This empty reserved space is put in place to allow future versions to add new\n   * variables without shifting down storage in the inheritance chain.\n   * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n   */\n  uint256[50] private __gap;\n}\n"},{"file_path":"contracts/xManager/interfaces/ITokenRecipient.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\n/*\n      ▄▄█████████▄\n   ╓██▀└ ,╓▄▄▄, '▀██▄\n  ██▀ ▄██▀▀╙╙▀▀██▄ └██µ           ,,       ,,      ,     ,,,            ,,,\n ██ ,██¬ ▄████▄  ▀█▄ ╙█▄      ▄███▀▀███▄   ███▄    ██  ███▀▀▀███▄    ▄███▀▀███,\n██  ██ ╒█▀'   ╙█▌ ╙█▌ ██     ▐██      ███  █████,  ██  ██▌    └██▌  ██▌     └██▌\n██ ▐█▌ ██      ╟█  █▌ ╟█     ██▌      ▐██  ██ └███ ██  ██▌     ╟██ j██       ╟██\n╟█  ██ ╙██    ▄█▀ ▐█▌ ██     ╙██      ██▌  ██   ╙████  ██▌    ▄██▀  ██▌     ,██▀\n ██ \"██, ╙▀▀███████████⌐      ╙████████▀   ██     ╙██  ███████▀▀     ╙███████▀`\n  ██▄ ╙▀██▄▄▄▄▄,,,                ¬─                                    '─¬\n   ╙▀██▄ '╙╙╙▀▀▀▀▀▀▀▀\n      ╙▀▀██████R⌐\n */\npragma solidity 0.8.16;\n\ninterface ITokenRecipient {\n  /**\n   * @notice Emitted when tokens are deposited into the recipient\n   * @param  depositToken       The address of the token deposited\n   * @param  depositDestination The address of the recipient contract that received the tokens\n   * @param  depositAmount      The amount of tokens that were deposited, denoted in the decimals\n   *                            of `depositToken`\n   */\n  event TokensDeposited(\n    address indexed depositToken,\n    address indexed depositDestination,\n    uint256 depositAmount\n  );\n\n  /// Error thrown when attempting to set a zero address\n  error ZeroAddressNotAllowed();\n\n  function depositToken(address depositToken, uint256 depositAmount) external;\n}\n"},{"file_path":"contracts/usdy/rusdy/rUSDY.sol","source_code":"/**SPDX-License-Identifier: BUSL-1.1\n\n      ▄▄█████████▄\n   ╓██▀└ ,╓▄▄▄, '▀██▄\n  ██▀ ▄██▀▀╙╙▀▀██▄ └██µ           ,,       ,,      ,     ,,,            ,,,\n ██ ,██¬ ▄████▄  ▀█▄ ╙█▄      ▄███▀▀███▄   ███▄    ██  ███▀▀▀███▄    ▄███▀▀███,\n██  ██ ╒█▀'   ╙█▌ ╙█▌ ██     ▐██      ███  █████,  ██  ██▌    └██▌  ██▌     └██▌\n██ ▐█▌ ██      ╟█  █▌ ╟█     ██▌      ▐██  ██ └███ ██  ██▌     ╟██ j██       ╟██\n╟█  ██ ╙██    ▄█▀ ▐█▌ ██     ╙██      ██▌  ██   ╙████  ██▌    ▄██▀  ██▌     ,██▀\n ██ \"██, ╙▀▀███████████⌐      ╙████████▀   ██     ╙██  ███████▀▀     ╙███████▀`\n  ██▄ ╙▀██▄▄▄▄▄,,,                ¬─                                    '─¬\n   ╙▀██▄ '╙╙╙▀▀▀▀▀▀▀▀\n      ╙▀▀██████R⌐\n\n */\npragma solidity 0.8.16;\n\nimport \"contracts/external/openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\nimport \"contracts/external/openzeppelin/contracts-upgradeable/token/ERC20/IERC20MetadataUpgradeable.sol\";\nimport \"contracts/external/openzeppelin/contracts-upgradeable/proxy/Initializable.sol\";\nimport \"contracts/external/openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\";\nimport \"contracts/external/openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport \"contracts/external/openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\";\nimport \"contracts/usdy/blocklist/BlocklistClientUpgradeable.sol\";\nimport \"contracts/sanctions/SanctionsListClientUpgradeable.sol\";\nimport \"contracts/interfaces/IUSDY.sol\";\nimport \"contracts/rwaOracles/IRWADynamicOracle.sol\";\n\n/**\n * @title Interest-bearing ERC20-like token for USDY.\n *\n * rUSDY balances are dynamic and represent the holder's share of the underlying USDY\n * controlled by the protocol. To calculate each account's balance, we do\n *\n *   shares[account] * usdyPrice\n *\n * For example, assume that we have:\n *\n *   usdyPrice = 1.05 (18 decimals)\n *   rusdy.sharesOf(user1) -> 1 (22 decimals)\n *   rusdy.sharesOf(user2) -> 4 (22 decimals)\n *   rusdy.balanceOf(rusdy) -> 5 USDY (18 decimals)\n *\n * Below would be the balances of the users:\n *\n *   balanceOf(user1) -> 1.05 rUSDY (18 decimals)\n *   balanceOf(user2) -> 4.2 rUSDY (18 decimals)\n *\n * Since balances of all token holders change when the price of USDY changes, this\n * token cannot fully implement ERC20 standard: it only emits `Transfer` events\n * upon explicit transfer between holders. In contrast, when total amount of pooled\n * Cash increases, no `Transfer` events are generated: doing so would require emitting\n * an event for each token holder and thus running an unbounded loop.\n *\n */\n\ncontract rUSDY is\n  Initializable,\n  ContextUpgradeable,\n  PausableUpgradeable,\n  AccessControlEnumerableUpgradeable,\n  BlocklistClientUpgradeable,\n  SanctionsListClientUpgradeable,\n  IERC20Upgradeable,\n  IERC20MetadataUpgradeable\n{\n  /**\n   * @dev rUSDY balances are dynamic and are calculated based on the accounts' shares (USDY)\n   * and the the price of USDY. Account shares aren't\n   * normalized, so the contract also stores the sum of all shares to calculate\n   * each account's token balance which equals to:\n   *\n   *   shares[account] * usdyPrice\n   */\n  mapping(address => uint256) private shares;\n\n  /// @dev Allowances are nominated in tokens, not token shares.\n  mapping(address => mapping(address => uint256)) private allowances;\n\n  // Total shares in existence\n  uint256 public totalShares;\n\n  // Address of the oracle that updates `usdyPrice`\n  IRWADynamicOracle public oracle;\n\n  // Address of the USDY token\n  IUSDY public usdy;\n\n  // Used to scale up usdy amount -> shares\n  uint256 public constant USDY_TO_RUSDY_SHARES_MULTIPLIER = 10_000;\n\n  // Name of the token\n  string internal _name;\n\n  // Symbol of the token\n  string internal _symbol;\n\n  // Error when redeeming shares < `USDY_TO_RUSDY_SHARES_MULTIPLIER`\n  error UnwrapTooSmall();\n\n  // Error when setting the oracle address to zero\n  error CannotSetToZeroAddress();\n\n  /// @dev Role based access control roles\n  bytes32 public constant PAUSER_ROLE = keccak256(\"PAUSER_ROLE\");\n  bytes32 public constant BURNER_ROLE = keccak256(\"BURN_ROLE\");\n  bytes32 public constant LIST_CONFIGURER_ROLE =\n    keccak256(\"LIST_CONFIGURER_ROLE\");\n\n  /// @custom:oz-upgrades-unsafe-allow constructor\n  constructor() {\n    _disableInitializers();\n  }\n\n  function initialize(\n    address blocklist,\n    address sanctionsList,\n    address _usdy,\n    address guardian,\n    address _oracle\n  ) public virtual initializer {\n    __rUSDY_init(blocklist, sanctionsList, _usdy, guardian, _oracle);\n  }\n\n  function __rUSDY_init(\n    address blocklist,\n    address sanctionsList,\n    address _usdy,\n    address guardian,\n    address _oracle\n  ) internal onlyInitializing {\n    __BlocklistClientInitializable_init(blocklist);\n    __SanctionsListClientInitializable_init(sanctionsList);\n    __rUSDY_init_unchained(_usdy, guardian, _oracle);\n  }\n\n  function __rUSDY_init_unchained(\n    address _usdy,\n    address guardian,\n    address _oracle\n  ) internal onlyInitializing {\n    usdy = IUSDY(_usdy);\n    oracle = IRWADynamicOracle(_oracle);\n    _grantRole(DEFAULT_ADMIN_ROLE, guardian);\n    _grantRole(PAUSER_ROLE, guardian);\n    _grantRole(BURNER_ROLE, guardian);\n    _grantRole(LIST_CONFIGURER_ROLE, guardian);\n    _name = \"Ondo U.S. Dollar Yield (Rebasing)\";\n    _symbol = \"rUSDY\";\n  }\n\n  /**\n   * @notice Emitted when the name is set\n   *\n   * @param oldName The old name of the token\n   * @param newName The new name of the token\n   */\n  event NameSet(string oldName, string newName);\n\n  /**\n   * @notice Emitted when the symbol is set\n   *\n   * @param oldSymbol The old symbol of the token\n   * @param newSymbol The new symbol of the token\n   */\n\n  event SymbolSet(string oldSymbol, string newSymbol);\n\n  /**\n   * @notice An executed shares transfer.\n   *\n   * @dev emitted in pair with an ERC20-defined `Transfer` event.\n   */\n  event TransferShares(\n    address indexed from,\n    address indexed to,\n    uint256 sharesValue\n  );\n\n  /**\n   * @notice Emitted when the oracle address is set\n   *\n   * @param oldOracle The address of the old oracle\n   * @param newOracle The address of the new oracle\n   */\n  event OracleSet(address indexed oldOracle, address indexed newOracle);\n\n  /**\n   * @return the name of the token.\n   */\n  function name() public view returns (string memory) {\n    return _name;\n  }\n\n  /**\n   * @return the symbol of the token, usually a shorter version of the\n   * name.\n   */\n  function symbol() public view returns (string memory) {\n    return _symbol;\n  }\n\n  /**\n   * @return the number of decimals for getting user representation of a token amount.\n   */\n  function decimals() public pure returns (uint8) {\n    return 18;\n  }\n\n  /**\n   * @return the amount of tokens in existence.\n   */\n  function totalSupply() public view returns (uint256) {\n    return\n      (totalShares * oracle.getPrice()) /\n      (1e18 * USDY_TO_RUSDY_SHARES_MULTIPLIER);\n  }\n\n  /**\n   * @return the amount of tokens owned by the `_account`.\n   *\n   * @dev Balances are dynamic and equal the `_account`'s USDY shares multiplied\n   *      by the price of USDY\n   */\n  function balanceOf(address _account) public view returns (uint256) {\n    return\n      (_sharesOf(_account) * oracle.getPrice()) /\n      (1e18 * USDY_TO_RUSDY_SHARES_MULTIPLIER);\n  }\n\n  /**\n   * @notice Moves `_amount` tokens from the caller's account to the `_recipient` account.\n   *\n   * @return a boolean value indicating whether the operation succeeded.\n   * Emits a `Transfer` event.\n   * Emits a `TransferShares` event.\n   *\n   * Requirements:\n   *\n   * - `_recipient` cannot be the zero address.\n   * - the caller must have a balance of at least `_amount`.\n   * - the contract must not be paused.\n   *\n   * @dev The `_amount` argument is the amount of tokens, not shares.\n   */\n  function transfer(address _recipient, uint256 _amount) public returns (bool) {\n    _transfer(msg.sender, _recipient, _amount);\n    return true;\n  }\n\n  /**\n   * @return the remaining number of tokens that `_spender` is allowed to spend\n   * on behalf of `_owner` through `transferFrom`. This is zero by default.\n   *\n   * @dev This value changes when `approve` or `transferFrom` is called.\n   */\n  function allowance(\n    address _owner,\n    address _spender\n  ) public view returns (uint256) {\n    return allowances[_owner][_spender];\n  }\n\n  /**\n   * @notice Sets `_amount` as the allowance of `_spender` over the caller's tokens.\n   *\n   * @return a boolean value indicating whether the operation succeeded.\n   * Emits an `Approval` event.\n   *\n   * Requirements:\n   *\n   * - `_spender` cannot be the zero address.\n   * - the contract must not be paused.\n   *\n   * @dev The `_amount` argument is the amount of tokens, not shares.\n   */\n  function approve(address _spender, uint256 _amount) public returns (bool) {\n    _approve(msg.sender, _spender, _amount);\n    return true;\n  }\n\n  /**\n   * @notice Moves `_amount` tokens from `_sender` to `_recipient` using the\n   * allowance mechanism. `_amount` is then deducted from the caller's\n   * allowance.\n   *\n   * @return a boolean value indicating whether the operation succeeded.\n   *\n   * Emits a `Transfer` event.\n   * Emits a `TransferShares` event.\n   * Emits an `Approval` event indicating the updated allowance.\n   *\n   * Requirements:\n   *\n   * - `_sender` and `_recipient` cannot be the zero addresses.\n   * - `_sender` must have a balance of at least `_amount`.\n   * - the caller must have allowance for `_sender`'s tokens of at least `_amount`.\n   * - the contract must not be paused.\n   *\n   * @dev The `_amount` argument is the amount of tokens, not shares.\n   */\n  function transferFrom(\n    address _sender,\n    address _recipient,\n    uint256 _amount\n  ) public returns (bool) {\n    uint256 currentAllowance = allowances[_sender][msg.sender];\n    require(currentAllowance >= _amount, \"TRANSFER_AMOUNT_EXCEEDS_ALLOWANCE\");\n\n    _transfer(_sender, _recipient, _amount);\n    _approve(_sender, msg.sender, currentAllowance - _amount);\n    return true;\n  }\n\n  /**\n   * @notice Atomically increases the allowance granted to `_spender` by the caller by `_addedValue`.\n   *\n   * This is an alternative to `approve` that can be used as a mitigation for\n   * problems described in:\n   * https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/IERC20.sol#L42\n   * Emits an `Approval` event indicating the updated allowance.\n   *\n   * Requirements:\n   *\n   * - `_spender` cannot be the the zero address.\n   * - the contract must not be paused.\n   */\n  function increaseAllowance(\n    address _spender,\n    uint256 _addedValue\n  ) public returns (bool) {\n    _approve(\n      msg.sender,\n      _spender,\n      allowances[msg.sender][_spender] + _addedValue\n    );\n    return true;\n  }\n\n  /**\n   * @notice Atomically decreases the allowance granted to `_spender` by the caller by `_subtractedValue`.\n   *\n   * This is an alternative to `approve` that can be used as a mitigation for\n   * problems described in:\n   * https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/IERC20.sol#L42\n   * Emits an `Approval` event indicating the updated allowance.\n   *\n   * Requirements:\n   *\n   * - `_spender` cannot be the zero address.\n   * - `_spender` must have allowance for the caller of at least `_subtractedValue`.\n   * - the contract must not be paused.\n   */\n  function decreaseAllowance(\n    address _spender,\n    uint256 _subtractedValue\n  ) public returns (bool) {\n    uint256 currentAllowance = allowances[msg.sender][_spender];\n    require(\n      currentAllowance >= _subtractedValue,\n      \"DECREASED_ALLOWANCE_BELOW_ZERO\"\n    );\n    _approve(msg.sender, _spender, currentAllowance - _subtractedValue);\n    return true;\n  }\n\n  /**\n   * @return the amount of shares owned by `_account`.\n   *\n   * @dev This is the equivalent to the amount of USDY wrapped by `_account`.\n   */\n  function sharesOf(address _account) public view returns (uint256) {\n    return _sharesOf(_account);\n  }\n\n  /**\n   * @return the amount of shares that corresponds to `_rUSDYAmount` of rUSDY\n   */\n  function getSharesByRUSDY(\n    uint256 _rUSDYAmount\n  ) public view returns (uint256) {\n    return\n      (_rUSDYAmount * 1e18 * USDY_TO_RUSDY_SHARES_MULTIPLIER) /\n      oracle.getPrice();\n  }\n\n  /**\n   * @return the amount of rUSDY that corresponds to `_shares` of usdy.\n   */\n  function getRUSDYByShares(uint256 _shares) public view returns (uint256) {\n    return\n      (_shares * oracle.getPrice()) / (1e18 * USDY_TO_RUSDY_SHARES_MULTIPLIER);\n  }\n\n  /**\n   * @notice Moves `_sharesAmount` token shares from the caller's account to the `_recipient` account.\n   *\n   * @return amount of transferred tokens.\n   * Emits a `TransferShares` event.\n   * Emits a `Transfer` event.\n   *\n   * Requirements:\n   *\n   * - `_recipient` cannot be the zero address.\n   * - the caller must have at least `_sharesAmount` shares.\n   * - the contract must not be paused.\n   *\n   * @dev The `_sharesAmount` argument is the amount of shares, not tokens.\n   */\n  function transferShares(\n    address _recipient,\n    uint256 _sharesAmount\n  ) public returns (uint256) {\n    _transferShares(msg.sender, _recipient, _sharesAmount);\n    emit TransferShares(msg.sender, _recipient, _sharesAmount);\n    uint256 tokensAmount = getRUSDYByShares(_sharesAmount);\n    emit Transfer(msg.sender, _recipient, tokensAmount);\n    return tokensAmount;\n  }\n\n  /**\n   * @notice Function called by users to wrap their USDY tokens\n   *\n   * @param _USDYAmount The amount of USDY Tokens to wrap\n   *\n   * @dev Sanctions and Blocklist checks implicit in USDY Transfer\n   */\n  function wrap(uint256 _USDYAmount) external whenNotPaused {\n    require(_USDYAmount > 0, \"rUSDY: can't wrap zero USDY tokens\");\n    uint256 usdySharesAmount = _USDYAmount * USDY_TO_RUSDY_SHARES_MULTIPLIER;\n    _mintShares(msg.sender, usdySharesAmount);\n    usdy.transferFrom(msg.sender, address(this), _USDYAmount);\n    emit Transfer(address(0), msg.sender, getRUSDYByShares(usdySharesAmount));\n    emit TransferShares(address(0), msg.sender, usdySharesAmount);\n  }\n\n  /**\n   * @notice Function called by users to unwrap their rUSDY tokens by rUSDY amount\n   *\n   * @param _rUSDYAmount The amount of rUSDY to unwrap\n   *\n   * @dev Sanctions and Blocklist checks implicit in USDY Transfer\n   */\n  function unwrap(uint256 _rUSDYAmount) external whenNotPaused {\n    require(_rUSDYAmount > 0, \"rUSDY: can't unwrap zero rUSDY tokens\");\n    uint256 usdySharesAmount = getSharesByRUSDY(_rUSDYAmount);\n    if (usdySharesAmount < USDY_TO_RUSDY_SHARES_MULTIPLIER)\n      revert UnwrapTooSmall();\n    _burnShares(msg.sender, usdySharesAmount);\n    usdy.transfer(\n      msg.sender,\n      usdySharesAmount / USDY_TO_RUSDY_SHARES_MULTIPLIER\n    );\n    emit Transfer(msg.sender, address(0), _rUSDYAmount);\n    emit TransferShares(msg.sender, address(0), usdySharesAmount);\n  }\n\n  /**\n   * @notice Function called by users to unwrap their rUSDY tokens by shares\n   *\n   * @param _sharesAmount The amount of shares to transfer\n   *\n   * @dev Sanctions and Blocklist checks implicit in USDY Transfer\n   * @dev This is a more precise unwrap, as it avoids the division by price when converting rUSDY to shares\n   */\n  function unwrapShares(uint256 _sharesAmount) external whenNotPaused {\n    if (_sharesAmount < USDY_TO_RUSDY_SHARES_MULTIPLIER)\n      revert UnwrapTooSmall();\n\n    uint256 rUSDYAmount = getRUSDYByShares(_sharesAmount);\n\n    _burnShares(msg.sender, _sharesAmount);\n    usdy.transfer(msg.sender, _sharesAmount / USDY_TO_RUSDY_SHARES_MULTIPLIER);\n    emit Transfer(msg.sender, address(0), rUSDYAmount);\n    emit TransferShares(msg.sender, address(0), _sharesAmount);\n  }\n\n  /**\n   * @notice Moves `_amount` tokens from `_sender` to `_recipient`.\n   * Emits a `Transfer` event.\n   * Emits a `TransferShares` event.\n   */\n  function _transfer(\n    address _sender,\n    address _recipient,\n    uint256 _amount\n  ) internal {\n    uint256 _sharesToTransfer = getSharesByRUSDY(_amount);\n    _transferShares(_sender, _recipient, _sharesToTransfer);\n    emit Transfer(_sender, _recipient, _amount);\n    emit TransferShares(_sender, _recipient, _sharesToTransfer);\n  }\n\n  /**\n   * @notice Sets `_amount` as the allowance of `_spender` over the `_owner` s tokens.\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   * - the contract must not be paused.\n   */\n  function _approve(\n    address _owner,\n    address _spender,\n    uint256 _amount\n  ) internal whenNotPaused {\n    require(_owner != address(0), \"APPROVE_FROM_ZERO_ADDRESS\");\n    require(_spender != address(0), \"APPROVE_TO_ZERO_ADDRESS\");\n\n    allowances[_owner][_spender] = _amount;\n    emit Approval(_owner, _spender, _amount);\n  }\n\n  /**\n   * @return the amount of shares owned by `_account`.\n   */\n  function _sharesOf(address _account) internal view returns (uint256) {\n    return shares[_account];\n  }\n\n  /**\n   * @notice Moves `_sharesAmount` shares from `_sender` to `_recipient`.\n   *\n   * Requirements:\n   *\n   * - `_sender` cannot be the zero address.\n   * - `_recipient` cannot be the zero address.\n   * - `_sender` must hold at least `_sharesAmount` shares.\n   * - the contract must not be paused.\n   */\n  function _transferShares(\n    address _sender,\n    address _recipient,\n    uint256 _sharesAmount\n  ) internal whenNotPaused {\n    require(_sender != address(0), \"TRANSFER_FROM_THE_ZERO_ADDRESS\");\n    require(_recipient != address(0), \"TRANSFER_TO_THE_ZERO_ADDRESS\");\n\n    _beforeTokenTransfer(_sender, _recipient, _sharesAmount);\n\n    uint256 currentSenderShares = shares[_sender];\n    require(\n      _sharesAmount <= currentSenderShares,\n      \"TRANSFER_AMOUNT_EXCEEDS_BALANCE\"\n    );\n\n    shares[_sender] = currentSenderShares - _sharesAmount;\n    shares[_recipient] += _sharesAmount;\n  }\n\n  /**\n   * @notice Creates `_sharesAmount` shares and assigns them to `_recipient`, increasing the total amount of shares.\n   *\n   * Requirements:\n   *\n   * - `_recipient` cannot be the zero address.\n   * - the contract must not be paused.\n   */\n  function _mintShares(address _recipient, uint256 _sharesAmount) internal {\n    require(_recipient != address(0), \"MINT_TO_THE_ZERO_ADDRESS\");\n\n    _beforeTokenTransfer(address(0), _recipient, _sharesAmount);\n\n    totalShares += _sharesAmount;\n\n    shares[_recipient] += _sharesAmount;\n  }\n\n  /**\n   * @notice Destroys `_sharesAmount` shares from `_account`'s holdings, decreasing the total amount of shares.\n   *\n   * Requirements:\n   *\n   * - `_account` cannot be the zero address.\n   * - `_account` must hold at least `_sharesAmount` shares.\n   * - the contract must not be paused.\n   */\n  function _burnShares(address _account, uint256 _sharesAmount) internal {\n    require(_account != address(0), \"BURN_FROM_THE_ZERO_ADDRESS\");\n\n    _beforeTokenTransfer(_account, address(0), _sharesAmount);\n\n    uint256 accountShares = shares[_account];\n    require(_sharesAmount <= accountShares, \"BURN_AMOUNT_EXCEEDS_BALANCE\");\n\n    totalShares -= _sharesAmount;\n\n    shares[_account] = accountShares - _sharesAmount;\n  }\n\n  /**\n   * @dev Hook that is called before any transfer of tokens. This includes\n   * minting and burning.\n   *\n   * Calling conditions:\n   *\n   * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n   * will be transferred to `to`.\n   * - when `from` is zero, `amount` tokens will be minted for `to`.\n   * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n   * - `from` and `to` are never both zero.\n   *\n   * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n   */\n  function _beforeTokenTransfer(\n    address from,\n    address to,\n    uint256\n  ) internal view {\n    // Check constraints when `transferFrom` is called to facliitate\n    // a transfer between two parties that are not `from` or `to`.\n    if (from != msg.sender && to != msg.sender) {\n      require(!_isBlocked(msg.sender), \"rUSDY: 'sender' address blocked\");\n      require(!_isSanctioned(msg.sender), \"rUSDY: 'sender' address sanctioned\");\n    }\n\n    if (from != address(0)) {\n      // If not minting\n      require(!_isBlocked(from), \"rUSDY: 'from' address blocked\");\n      require(!_isSanctioned(from), \"rUSDY: 'from' address sanctioned\");\n    }\n\n    if (to != address(0)) {\n      // If not burning\n      require(!_isBlocked(to), \"rUSDY: 'to' address blocked\");\n      require(!_isSanctioned(to), \"rUSDY: 'to' address sanctioned\");\n    }\n  }\n\n  /**\n   * @notice Sets the Oracle address\n   * @dev The new oracle must comply with the IRWADynamicOracle interface\n   * @param _oracle Address of the new oracle\n   */\n  function setOracle(address _oracle) external onlyRole(DEFAULT_ADMIN_ROLE) {\n    if (_oracle == address(0)) {\n      revert CannotSetToZeroAddress();\n    }\n    emit OracleSet(address(oracle), _oracle);\n    oracle = IRWADynamicOracle(_oracle);\n  }\n\n  /**\n   * @notice Sets the token name\n   * @param newName New name of the token\n   */\n  function setName(\n    string memory newName\n  ) external onlyRole(DEFAULT_ADMIN_ROLE) {\n    emit NameSet(_name, newName);\n    _name = newName;\n  }\n\n  /**\n   * @notice Sets the token symbol\n   * @param newSymbol New symbol of the token\n   */\n  function setSymbol(\n    string memory newSymbol\n  ) external onlyRole(DEFAULT_ADMIN_ROLE) {\n    emit SymbolSet(_symbol, newSymbol);\n    _symbol = newSymbol;\n  }\n\n  /**\n   * @notice Admin burn function to burn rUSDY tokens from any account\n   * @param _account The account to burn tokens from\n   * @param _sharesAmount  The amount of USDY shares to burn\n   * @dev Burns shares and transfers USDY (if any) to `msg.sender`\n   */\n  function burnShares(\n    address _account,\n    uint256 _sharesAmount\n  ) external onlyRole(BURNER_ROLE) {\n    require(_sharesAmount > 0, \"rUSDY: can't burn zero shares\");\n\n    uint256 rUSDYAmount = getRUSDYByShares(_sharesAmount);\n\n    _burnShares(_account, _sharesAmount);\n    emit TransferShares(_account, address(0), _sharesAmount);\n\n    if (_sharesAmount >= USDY_TO_RUSDY_SHARES_MULTIPLIER) {\n      usdy.transfer(\n        msg.sender,\n        _sharesAmount / USDY_TO_RUSDY_SHARES_MULTIPLIER\n      );\n      emit Transfer(_account, address(0), rUSDYAmount);\n    }\n  }\n\n  function pause() external onlyRole(PAUSER_ROLE) {\n    _pause();\n  }\n\n  function unpause() external onlyRole(DEFAULT_ADMIN_ROLE) {\n    _unpause();\n  }\n\n  /**\n   * @notice Sets the blocklist address\n   *\n   * @param blocklist New blocklist address\n   */\n  function setBlocklist(\n    address blocklist\n  ) external override onlyRole(LIST_CONFIGURER_ROLE) {\n    _setBlocklist(blocklist);\n  }\n\n  /**\n   * @notice Sets the sanctions list address\n   *\n   * @param sanctionsList New sanctions list address\n   */\n  function setSanctionsList(\n    address sanctionsList\n  ) external override onlyRole(LIST_CONFIGURER_ROLE) {\n    _setSanctionsList(sanctionsList);\n  }\n}\n"},{"file_path":"contracts/external/openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\n\npragma solidity ^0.8.0;\n\nimport \"contracts/external/openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\";\nimport \"contracts/external/openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\";\nimport \"contracts/external/openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\";\nimport \"contracts/external/openzeppelin/contracts-upgradeable/utils/ERC165Upgradeable.sol\";\nimport \"contracts/external/openzeppelin/contracts-upgradeable/proxy/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 * ```\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 * ```\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.\n */\nabstract contract AccessControlUpgradeable is\n  Initializable,\n  ContextUpgradeable,\n  IAccessControlUpgradeable,\n  ERC165Upgradeable\n{\n  function __AccessControl_init() internal onlyInitializing {}\n\n  function __AccessControl_init_unchained() internal onlyInitializing {}\n\n  struct RoleData {\n    mapping(address => bool) members;\n    bytes32 adminRole;\n  }\n\n  mapping(bytes32 => RoleData) private _roles;\n\n  bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n\n  /**\n   * @dev Modifier that checks that an account has a specific role. Reverts\n   * with a standardized message including the required role.\n   *\n   * The format of the revert reason is given by the following regular expression:\n   *\n   *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n   *\n   * _Available since v4.1._\n   */\n  modifier onlyRole(bytes32 role) {\n    _checkRole(role);\n    _;\n  }\n\n  /**\n   * @dev See {IERC165-supportsInterface}.\n   */\n  function supportsInterface(bytes4 interfaceId)\n    public\n    view\n    virtual\n    override\n    returns (bool)\n  {\n    return\n      interfaceId == type(IAccessControlUpgradeable).interfaceId ||\n      super.supportsInterface(interfaceId);\n  }\n\n  /**\n   * @dev Returns `true` if `account` has been granted `role`.\n   */\n  function hasRole(bytes32 role, address account)\n    public\n    view\n    virtual\n    override\n    returns (bool)\n  {\n    return _roles[role].members[account];\n  }\n\n  /**\n   * @dev Revert with a standard message if `_msgSender()` is missing `role`.\n   * Overriding this function changes the behavior of the {onlyRole} modifier.\n   *\n   * Format of the revert message is described in {_checkRole}.\n   *\n   * _Available since v4.6._\n   */\n  function _checkRole(bytes32 role) internal view virtual {\n    _checkRole(role, _msgSender());\n  }\n\n  /**\n   * @dev Revert with a standard message if `account` is missing `role`.\n   *\n   * The format of the revert reason is given by the following regular expression:\n   *\n   *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n   */\n  function _checkRole(bytes32 role, address account) internal view virtual {\n    if (!hasRole(role, account)) {\n      revert(\n        string(\n          abi.encodePacked(\n            \"AccessControl: account \",\n            StringsUpgradeable.toHexString(uint160(account), 20),\n            \" is missing role \",\n            StringsUpgradeable.toHexString(uint256(role), 32)\n          )\n        )\n      );\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)\n    public\n    view\n    virtual\n    override\n    returns (bytes32)\n  {\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)\n    public\n    virtual\n    override\n    onlyRole(getRoleAdmin(role))\n  {\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)\n    public\n    virtual\n    override\n    onlyRole(getRoleAdmin(role))\n  {\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 `account`.\n   *\n   * May emit a {RoleRevoked} event.\n   */\n  function renounceRole(bytes32 role, address account) public virtual override {\n    require(\n      account == _msgSender(),\n      \"AccessControl: can only renounce roles for self\"\n    );\n\n    _revokeRole(role, account);\n  }\n\n  /**\n   * @dev Grants `role` to `account`.\n   *\n   * If `account` had not been already granted `role`, emits a {RoleGranted}\n   * event. Note that unlike {grantRole}, this function doesn't perform any\n   * checks on the calling account.\n   *\n   * May emit a {RoleGranted} event.\n   *\n   * [WARNING]\n   * ====\n   * This function should only be called from the constructor when setting\n   * up the initial roles for the system.\n   *\n   * Using this function in any other way is effectively circumventing the admin\n   * system imposed by {AccessControl}.\n   * ====\n   *\n   * NOTE: This function is deprecated in favor of {_grantRole}.\n   */\n  function _setupRole(bytes32 role, address account) internal virtual {\n    _grantRole(role, account);\n  }\n\n  /**\n   * @dev Sets `adminRole` as ``role``'s admin role.\n   *\n   * Emits a {RoleAdminChanged} event.\n   */\n  function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\n    bytes32 previousAdminRole = getRoleAdmin(role);\n    _roles[role].adminRole = adminRole;\n    emit RoleAdminChanged(role, previousAdminRole, adminRole);\n  }\n\n  /**\n   * @dev Grants `role` to `account`.\n   *\n   * Internal function without access restriction.\n   *\n   * May emit a {RoleGranted} event.\n   */\n  function _grantRole(bytes32 role, address account) internal virtual {\n    if (!hasRole(role, account)) {\n      _roles[role].members[account] = true;\n      emit RoleGranted(role, account, _msgSender());\n    }\n  }\n\n  /**\n   * @dev Revokes `role` from `account`.\n   *\n   * Internal function without access restriction.\n   *\n   * May emit a {RoleRevoked} event.\n   */\n  function _revokeRole(bytes32 role, address account) internal virtual {\n    if (hasRole(role, account)) {\n      _roles[role].members[account] = false;\n      emit RoleRevoked(role, account, _msgSender());\n    }\n  }\n\n  /**\n   * @dev This empty reserved space is put in place to allow future versions to add new\n   * variables without shifting down storage in the inheritance chain.\n   * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n   */\n  uint256[49] private __gap;\n}\n"},{"file_path":"contracts/xManager/rwaManagers/BaseRWAManager.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\n/*\n      ▄▄█████████▄\n   ╓██▀└ ,╓▄▄▄, '▀██▄\n  ██▀ ▄██▀▀╙╙▀▀██▄ └██µ           ,,       ,,      ,     ,,,            ,,,\n ██ ,██¬ ▄████▄  ▀█▄ ╙█▄      ▄███▀▀███▄   ███▄    ██  ███▀▀▀███▄    ▄███▀▀███,\n██  ██ ╒█▀'   ╙█▌ ╙█▌ ██     ▐██      ███  █████,  ██  ██▌    └██▌  ██▌     └██▌\n██ ▐█▌ ██      ╟█  █▌ ╟█     ██▌      ▐██  ██ └███ ██  ██▌     ╟██ j██       ╟██\n╟█  ██ ╙██    ▄█▀ ▐█▌ ██     ╙██      ██▌  ██   ╙████  ██▌    ▄██▀  ██▌     ,██▀\n ██ \"██, ╙▀▀███████████⌐      ╙████████▀   ██     ╙██  ███████▀▀     ╙███████▀`\n  ██▄ ╙▀██▄▄▄▄▄,,,                ¬─                                    '─¬\n   ╙▀██▄ '╙╙╙▀▀▀▀▀▀▀▀\n      ╙▀▀██████R⌐\n */\npragma solidity 0.8.16;\nimport \"contracts/xManager/interfaces/ITokenSource.sol\";\nimport \"contracts/xManager/interfaces/ITokenRecipient.sol\";\nimport \"contracts/xManager/interfaces/IOndoTokenRouter.sol\";\nimport \"contracts/xManager/interfaces/IOndoIDRegistry.sol\";\nimport \"contracts/xManager/interfaces/IOndoCompliance.sol\";\nimport \"contracts/xManager/interfaces/IOndoRateLimiter.sol\";\nimport \"contracts/xManager/interfaces/IOndoOracle.sol\";\nimport \"contracts/xManager/interfaces/IOndoFees.sol\";\nimport \"contracts/xManager/interfaces/IAdminSubscriptionChecker.sol\";\nimport \"contracts/interfaces/IRWALike.sol\";\nimport \"contracts/xManager/rwaManagers/IBaseRWAManagerEvents.sol\";\nimport \"contracts/xManager/rwaManagers/IBaseRWAManagerErrors.sol\";\nimport \"contracts/external/openzeppelin/contracts/token/IERC20Metadata.sol\";\nimport \"contracts/external/openzeppelin/contracts/access/AccessControlEnumerable.sol\";\nimport \"contracts/external/openzeppelin/contracts/security/ReentrancyGuard.sol\";\nimport \"contracts/external/openzeppelin/contracts/token/SafeERC20.sol\";\n\n/**\n * @title  BaseRWAManager\n * @author Ondo Finance\n * @notice The BaseRWAManager contract contains the core logic for processing subscriptions\n *         and redemptions of RWA tokens. The abstract logic of this contract never touches\n *         RWA tokens, so inheriting child classes may implement the RWA token processing as they\n *         see fit.\n *         The responsibilities of this contract are:\n *          - Receiving deposits of tokens and depositing them into the OndoTokenRouter\n *          - Calculating the amount of RWA tokens to mint and/or transfer\n *            based on the deposit amount of subscriptions\n *          - Calculating the amount of tokens to return to users based on the redemption amount\n *          - Withdrawing tokens from the OndoTokenRouter and sending them to users\n *          - Enforcing the minimum deposit and redemption amounts\n *          - Ensuring users are registered with the OndoIDRegistry\n *          - Ensuring users are compliant with the OndoCompliance contract\n *         -  Checking user-specific and global rate limits\n *         -  Calculating the fees incurred by users for subscriptions and\n *            redemptions\n */\nabstract contract BaseRWAManager is\n  IBaseRWAManagerEvents,\n  IBaseRWAManagerErrors,\n  ReentrancyGuard,\n  AccessControlEnumerable\n{\n  using SafeERC20 for IERC20;\n  /// The decimals normalizer for USD\n  uint256 public constant USD_NORMALIZER = 1e18;\n\n  /// The decimals normalizer for the RWA token\n  uint256 public immutable RWA_NORMALIZER;\n\n  /// Role to configure the contract\n  bytes32 public constant CONFIGURER_ROLE = keccak256(\"CONFIGURER_ROLE\");\n\n  /// Role to pause subscriptions and redemptions\n  bytes32 public constant PAUSER_ROLE = keccak256(\"PAUSER_ROLE\");\n\n  /// Role to manually service a subscription to RWA tokens\n  bytes32 public constant ADMIN_SUBSCRIPTION_ROLE =\n    keccak256(\"ADMIN_SUBSCRIPTION_ROLE\");\n\n  /**\n   * @notice Minimum USD amount required to subscribe to a RWA token, denoted in USD with 18\n   *         decimals.\n   */\n  uint256 public minimumDepositUSD;\n\n  /**\n   * @notice Minimum USD amount required to perform an RWA token redemption to be allowed,\n   *         denoted in USD with 18 decimals\n   */\n  uint256 public minimumRedemptionUSD;\n\n  /// Minimum price of RWA token that this contract will use, denoted in USD with 18 decimals\n  uint256 public minimumRwaPrice;\n\n  /// Whether subscriptions are paused for this contract\n  bool public subscribePaused;\n\n  /// Whether redemptions are paused for this contract\n  bool public redeemPaused;\n\n  /// The contract address for the RWA token this contract is responsible for\n  address public immutable rwaToken;\n\n  /// The `OndoTokenRouter` contract address\n  IOndoTokenRouter public ondoTokenRouter;\n\n  /// The `OndoOracle` contract address\n  IOndoOracle public ondoOracle;\n\n  /// The `OndoCompliance` contract address\n  IOndoCompliance public ondoCompliance;\n\n  /// The `OndoIDRegistry` contract address\n  IOndoIDRegistry public ondoIDRegistry;\n\n  /// The `OndoRateLimiter` contract address\n  IOndoRateLimiter public ondoRateLimiter;\n\n  /// The `OndoFees` contract for managing subscription fees\n  IOndoFees public ondoSubscriptionFees;\n\n  /// The `OndoFees` contract for managing redemption fees\n  IOndoFees public ondoRedemptionFees;\n\n  /// The `AdminSubscriptionChecker` contract\n  IAdminSubscriptionChecker public adminSubscriptionChecker;\n\n  /// Mapping of accepted subscription tokens\n  mapping(address => bool) public acceptedSubscriptionTokens;\n\n  /// Mapping of accepted redemption tokens\n  mapping(address => bool) public acceptedRedemptionTokens;\n\n  /**\n   * @param _defaultAdmin         The default admin role for the contract\n   * @param _rwaToken             The RWA token address\n   * @param _minimumDepositUSD    The minimum subscription amount, denoted in USD with 18 decimals\n   * @param _minimumRedemptionUSD The minimum redemption amount, denoted in USD with 18 decimals\n   */\n  constructor(\n    address _defaultAdmin,\n    address _rwaToken,\n    uint256 _minimumDepositUSD,\n    uint256 _minimumRedemptionUSD\n  ) {\n    if (_rwaToken == address(0)) revert TokenAddressCantBeZero();\n\n    rwaToken = _rwaToken;\n    RWA_NORMALIZER = 10 ** IERC20Metadata(_rwaToken).decimals();\n    minimumDepositUSD = _minimumDepositUSD;\n    minimumRedemptionUSD = _minimumRedemptionUSD;\n    _grantRole(DEFAULT_ADMIN_ROLE, _defaultAdmin);\n  }\n\n  /**\n   * @notice Internal function for processing subscriptions\n   * @param  depositToken       The token to deposit\n   * @param  depositAmount      The amount of tokens to deposit, in decimals of the\n   *                            token being deposited\n   * @param  minimumRwaReceived The minimum amount of RWA tokens to receive, in\n   *                            decimals of the RWA token\n   * @return rwaAmountOut       The amount of RWA tokens to mint or transfer, in\n   *                            decimals of the RWA token\n   * @dev    This function will transfer the deposit tokens from the `msg.sender` to this contract\n   *         and then deposit them via the `OndoTokenRouter`. The mint or transfer of the RWA token\n   *         must be done in the child class.\n   */\n  function _processSubscription(\n    address depositToken,\n    uint256 depositAmount,\n    uint256 minimumRwaReceived\n  ) internal whenSubscribeNotPaused returns (uint256 rwaAmountOut) {\n    if (!acceptedSubscriptionTokens[depositToken]) revert TokenNotAccepted();\n\n    // Reverts if user address is not compliant\n    ondoCompliance.checkIsCompliant(rwaToken, _msgSender());\n    bytes32 userId = ondoIDRegistry.getRegisteredID(rwaToken, _msgSender());\n    if (userId == bytes32(0)) revert UserNotRegistered();\n\n    IERC20(depositToken).safeTransferFrom(\n      _msgSender(),\n      address(this),\n      depositAmount\n    );\n    IERC20(depositToken).forceApprove(address(ondoTokenRouter), depositAmount);\n\n    ondoTokenRouter.depositToken(rwaToken, depositToken, depositAmount);\n\n    // USD values are normalized to 18 decimals\n    uint256 depositUSDValue = (ondoOracle.getAssetPrice(depositToken) *\n      depositAmount) / 10 ** IERC20Metadata(depositToken).decimals();\n\n    if (depositUSDValue < minimumDepositUSD) revert DepositAmountTooSmall();\n\n    // Fee in USD with 18 decimals\n    uint256 fee = ondoSubscriptionFees.getAndUpdateFee(\n      rwaToken,\n      depositToken,\n      userId,\n      depositUSDValue\n    );\n\n    if (fee > depositUSDValue) revert FeeGreaterThanSubscription();\n\n    // Prices are returned in 18 decimals, so multiply by the rwa normalizer to get the RWA amount\n    rwaAmountOut = ((depositUSDValue - fee) * RWA_NORMALIZER) / _getRwaPrice();\n\n    if (rwaAmountOut < minimumRwaReceived) revert RwaReceiveAmountTooSmall();\n\n    ondoRateLimiter.checkAndUpdateRateLimit(\n      IOndoRateLimiter.TransactionType.SUBSCRIPTION,\n      rwaToken,\n      userId,\n      depositUSDValue\n    );\n\n    emit Subscription(\n      _msgSender(),\n      userId,\n      rwaAmountOut,\n      depositToken,\n      depositAmount,\n      depositUSDValue,\n      fee\n    );\n  }\n\n  /**\n   * @notice Internal function for processing redemptions\n   * @param  rwaAmount            The amount of RWA tokens to redeem, in decimals of\n   *                              the RWA token\n   * @param  receivingToken       The token the user receives\n   * @param  minimumTokenReceived The minimum amount of tokens to receive, in\n   *                              decimals of `receivingToken`\n   * @return receiveTokenAmount   The amount of tokens to sent back to the caller,\n   *                              in decimals of `receivingToken`\n   * @dev    This function will send tokens to send back to the caller to service redemptions.\n   *         The transfer/burn of the RWA itself must be done in the child class.\n   */\n  function _processRedemption(\n    uint256 rwaAmount,\n    address receivingToken,\n    uint256 minimumTokenReceived\n  ) internal whenRedeemNotPaused returns (uint256 receiveTokenAmount) {\n    if (!acceptedRedemptionTokens[receivingToken]) revert TokenNotAccepted();\n\n    // Reverts if the user address is not compliant\n    ondoCompliance.checkIsCompliant(rwaToken, _msgSender());\n    bytes32 userId = ondoIDRegistry.getRegisteredID(rwaToken, _msgSender());\n    if (userId == bytes32(0)) revert UserNotRegistered();\n\n    // USD values are normalized to 18 decimals\n    uint256 redemptionUSDValue = (_getRwaPrice() * rwaAmount) / RWA_NORMALIZER;\n    if (redemptionUSDValue < minimumRedemptionUSD)\n      revert RedemptionAmountTooSmall();\n\n    // Fee is denoted in USD with 18 decimals\n    uint256 fee = ondoRedemptionFees.getAndUpdateFee(\n      rwaToken,\n      receivingToken,\n      userId,\n      redemptionUSDValue\n    );\n\n    if (fee > redemptionUSDValue) revert FeeGreaterThanRedemption();\n\n    ondoRateLimiter.checkAndUpdateRateLimit(\n      IOndoRateLimiter.TransactionType.REDEMPTION,\n      rwaToken,\n      userId,\n      redemptionUSDValue\n    );\n\n    // Prices are returned in 18 decimals\n    receiveTokenAmount =\n      ((redemptionUSDValue - fee) *\n        10 ** IERC20Metadata(receivingToken).decimals()) /\n      ondoOracle.getAssetPrice(receivingToken);\n\n    if (receiveTokenAmount < minimumTokenReceived)\n      revert ReceiveAmountTooSmall();\n\n    ondoTokenRouter.withdrawToken(\n      address(rwaToken),\n      receivingToken,\n      userId,\n      receiveTokenAmount\n    );\n\n    IERC20(receivingToken).safeTransfer(_msgSender(), receiveTokenAmount);\n\n    emit Redemption(\n      _msgSender(),\n      userId,\n      rwaAmount,\n      receivingToken,\n      receiveTokenAmount,\n      redemptionUSDValue,\n      fee\n    );\n  }\n\n  /**\n   * @notice Admin function to service a subscription whose corresponding deposit been made outside\n   *         of this contracts system. This is almost identical to the `_processSubscription`\n   *         function, but skips the deposit token transfer and fee calculation (fees are\n   *         managed off-chain). The mint and/or transfer itself must be done in the child contract\n   *         implementation.\n   * @param  recipient The address to send the RWA tokens to\n   * @param  rwaAmount The amount of RWA tokens to mint and/or transfer\n   * @param  metadata  Additional metadata to emit with the subscription\n   */\n  function _adminProcessSubscription(\n    address recipient,\n    uint256 rwaAmount,\n    bytes32 metadata\n  ) internal whenSubscribeNotPaused onlyRole(ADMIN_SUBSCRIPTION_ROLE) {\n    // Will revert if the user is not compliant.\n    ondoCompliance.checkIsCompliant(rwaToken, recipient);\n    bytes32 userId = ondoIDRegistry.getRegisteredID(rwaToken, recipient);\n    if (userId == bytes32(0)) revert UserNotRegistered();\n\n    // All USD values are normalized to 18 decimals.\n    uint256 depositUSDValue = (rwaAmount * _getRwaPrice()) / RWA_NORMALIZER;\n\n    adminSubscriptionChecker.checkAndUpdateAdminSubscriptionAllowance(\n      _msgSender(),\n      depositUSDValue\n    );\n    ondoRateLimiter.checkAndUpdateRateLimit(\n      IOndoRateLimiter.TransactionType.SUBSCRIPTION,\n      rwaToken,\n      userId,\n      depositUSDValue\n    );\n    emit AdminSubscription(\n      _msgSender(),\n      recipient,\n      userId,\n      rwaAmount,\n      depositUSDValue,\n      metadata\n    );\n  }\n\n  /**\n   * @notice Gets the rwa token price from the oracle\n   * @return rwaPrice The price of the RWA token\n   */\n  function _getRwaPrice() internal view returns (uint256 rwaPrice) {\n    rwaPrice = ondoOracle.getAssetPrice(rwaToken);\n    if (rwaPrice < minimumRwaPrice) revert RWAPriceTooLow();\n  }\n\n  /**\n   * @notice Sets whether a token is accepted for subscriptions\n   * @param  token    The token address\n   * @param  accepted Whether the token is accepted for subscription\n   */\n  function setAcceptedSubscriptionToken(\n    address token,\n    bool accepted\n  ) external onlyRole(DEFAULT_ADMIN_ROLE) {\n    if (token == address(0)) revert TokenAddressCantBeZero();\n    // Ensure the oracle supports the token\n    if (accepted) ondoOracle.getAssetPrice(token);\n    emit AcceptedSubscriptionTokenSet(token, accepted);\n    acceptedSubscriptionTokens[token] = accepted;\n  }\n\n  /**\n   * @notice Sets whether a token is accepted for redemption.\n   * @param  token    The token address\n   * @param  accepted Whether the token is accepted for redemption\n   */\n  function setAcceptedRedemptionToken(\n    address token,\n    bool accepted\n  ) external onlyRole(DEFAULT_ADMIN_ROLE) {\n    if (token == address(0)) revert TokenAddressCantBeZero();\n    // Ensure the oracle supports the token\n    if (accepted) ondoOracle.getAssetPrice(token);\n    emit AcceptedRedemptionTokenSet(token, accepted);\n    acceptedRedemptionTokens[token] = accepted;\n  }\n\n  /**\n   * @notice Admin function to set the `OndoTokenRouter` contract\n   * @param  _ondoTokenRouter The `OndoTokenRouter` contract address\n   */\n  function setOndoTokenRouter(\n    address _ondoTokenRouter\n  ) external onlyRole(DEFAULT_ADMIN_ROLE) {\n    if (_ondoTokenRouter == address(0)) revert RouterAddressCantBeZero();\n    emit OndoTokenRouterSet(address(ondoTokenRouter), _ondoTokenRouter);\n    ondoTokenRouter = IOndoTokenRouter(_ondoTokenRouter);\n  }\n\n  /**\n   * @notice Admin function to set the `OndoOracle` contract\n   * @param  _ondoOracle The `OndoOracle` contract address\n   * @dev    Will revert if new `OndoOracle` contract returns a price lower than the minimum\n   *         configured price of the RWA token\n   */\n  function setOndoOracle(\n    address _ondoOracle\n  ) external onlyRole(DEFAULT_ADMIN_ROLE) {\n    if (_ondoOracle == address(0)) revert OracleAddressCantBeZero();\n    emit OndoOracleSet(address(ondoOracle), _ondoOracle);\n    ondoOracle = IOndoOracle(_ondoOracle);\n\n    uint256 price = ondoOracle.getAssetPrice(rwaToken);\n    if (price < minimumRwaPrice) revert RWAPriceTooLow();\n  }\n\n  /**\n   * @notice Sets the `OndoCompliance` contract\n   * @param  _ondoCompliance The `OndoCompliance` contract address\n   */\n  function setOndoCompliance(\n    address _ondoCompliance\n  ) external onlyRole(DEFAULT_ADMIN_ROLE) {\n    if (_ondoCompliance == address(0)) revert ComplianceAddressCantBeZero();\n    emit OndoComplianceSet(address(ondoCompliance), _ondoCompliance);\n    ondoCompliance = IOndoCompliance(_ondoCompliance);\n\n    // Ensure that the `OndoCompliance` interface is supported and\n    // this contract is compliant\n    ondoCompliance.checkIsCompliant(rwaToken, address(this));\n  }\n\n  /**\n   * @notice Sets the `OndoIDRegistry` contract\n   * @param  _ondoIDRegistry The `OndoIDRegistry` contract address\n   */\n  function setOndoIDRegistry(\n    address _ondoIDRegistry\n  ) external onlyRole(DEFAULT_ADMIN_ROLE) {\n    if (_ondoIDRegistry == address(0)) revert IDRegistryAddressCantBeZero();\n    emit OndoIDRegistrySet(address(ondoIDRegistry), _ondoIDRegistry);\n    ondoIDRegistry = IOndoIDRegistry(_ondoIDRegistry);\n    // Ensure that the `OndoIDRegistry` interface is supported\n    ondoIDRegistry.getRegisteredID(rwaToken, address(this));\n  }\n\n  /**\n   * @notice Sets the `OndoRateLimiter` contract\n   * @param  _ondoRateLimiter The `OndoRateLimiter` contract address\n   */\n  function setOndoRateLimiter(\n    address _ondoRateLimiter\n  ) external onlyRole(DEFAULT_ADMIN_ROLE) {\n    if (_ondoRateLimiter == address(0)) revert RateLimiterAddressCantBeZero();\n    emit OndoRateLimiterSet(address(ondoRateLimiter), _ondoRateLimiter);\n    ondoRateLimiter = IOndoRateLimiter(_ondoRateLimiter);\n  }\n\n  /**\n   * @notice Sets the `AdminSubscriptionChecker` contract\n   * @param  _adminSubscriptionChecker The `AdminSubscriptionChecker` contract address\n   */\n  function setAdminSubscriptionChecker(\n    address _adminSubscriptionChecker\n  ) external onlyRole(DEFAULT_ADMIN_ROLE) {\n    if (_adminSubscriptionChecker == address(0))\n      revert AdminSubscriptionCheckerAddressCantBeZero();\n    emit AdminSubscriptionCheckerSet(\n      address(adminSubscriptionChecker),\n      _adminSubscriptionChecker\n    );\n    adminSubscriptionChecker = IAdminSubscriptionChecker(\n      _adminSubscriptionChecker\n    );\n  }\n\n  /**\n   * @notice Sets the `OndoFees` contract for subscriptions\n   * @param  _ondoSubscriptionFees The `OndoFees` contract address\n   */\n  function setOndoSubscriptionFees(\n    address _ondoSubscriptionFees\n  ) external onlyRole(DEFAULT_ADMIN_ROLE) {\n    if (_ondoSubscriptionFees == address(0)) revert FeesAddressCantBeZero();\n    emit OndoSubscriptionFeesSet(\n      address(ondoSubscriptionFees),\n      _ondoSubscriptionFees\n    );\n    ondoSubscriptionFees = IOndoFees(_ondoSubscriptionFees);\n  }\n\n  /**\n   * @notice Sets the `OndoFees` contract for redemptions\n   * @param  _ondoRedemptionFees The `OndoFees` contract address\n   */\n  function setOndoRedemptionFees(\n    address _ondoRedemptionFees\n  ) external onlyRole(DEFAULT_ADMIN_ROLE) {\n    if (_ondoRedemptionFees == address(0)) revert FeesAddressCantBeZero();\n    emit OndoRedemptionFeesSet(\n      address(ondoRedemptionFees),\n      _ondoRedemptionFees\n    );\n    ondoRedemptionFees = IOndoFees(_ondoRedemptionFees);\n  }\n\n  /**\n   * @notice Sets the minimum amount required for a subscription\n   * @param  _minimumDepositUSD The minimum amount required to subscribe, denoted in\n   *                            USD with 18 decimals\n   */\n  function setMinimumDepositAmount(\n    uint256 _minimumDepositUSD\n  ) external onlyRole(CONFIGURER_ROLE) {\n    emit MinimumDepositAmountSet(minimumDepositUSD, _minimumDepositUSD);\n    minimumDepositUSD = _minimumDepositUSD;\n  }\n\n  /**\n   * @notice Sets the minimum amount to redeem\n   * @param  _minimumRedemptionUSD The minimum amount required to redeem,\n   *                               denoted in USD with 18.\n   */\n  function setMinimumRedemptionAmount(\n    uint256 _minimumRedemptionUSD\n  ) external onlyRole(CONFIGURER_ROLE) {\n    emit MinimumRedemptionAmountSet(\n      minimumRedemptionUSD,\n      _minimumRedemptionUSD\n    );\n    minimumRedemptionUSD = _minimumRedemptionUSD;\n  }\n\n  /**\n   * @notice Sets the minimum price of RWA token\n   * @param  _minimumRwaPrice The minimum price of the RWA token\n   */\n  function setMinimumRwaPrice(\n    uint256 _minimumRwaPrice\n  ) external onlyRole(CONFIGURER_ROLE) {\n    emit MinimumRwaPriceSet(minimumRwaPrice, _minimumRwaPrice);\n    minimumRwaPrice = _minimumRwaPrice;\n  }\n\n  /**\n   * @notice Rescue and transfer tokens locked in this contract\n   * @param  token  The address of the token\n   * @param  to     The address of the recipient\n   * @param  amount The amount of token to transfer\n   */\n  function retrieveTokens(\n    address token,\n    address to,\n    uint256 amount\n  ) external onlyRole(DEFAULT_ADMIN_ROLE) {\n    IERC20(token).safeTransfer(to, amount);\n  }\n\n  /*//////////////////////////////////////////////////////////////\n                          Pause/Unpause\n  //////////////////////////////////////////////////////////////*/\n\n  /// Pause the subscribe functionality.\n  function pauseSubscribe() external onlyRole(PAUSER_ROLE) {\n    subscribePaused = true;\n    emit SubscribePaused();\n  }\n\n  /// Unpause the subscribe functionality.\n  function unpauseSubscribe() external onlyRole(DEFAULT_ADMIN_ROLE) {\n    subscribePaused = false;\n    emit SubscribeUnpaused();\n  }\n\n  /// Pause the redeem functionality.\n  function pauseRedeem() external onlyRole(PAUSER_ROLE) {\n    redeemPaused = true;\n    emit RedeemPaused();\n  }\n\n  /// Unpause the redeem functionality.\n  function unpauseRedeem() external onlyRole(DEFAULT_ADMIN_ROLE) {\n    redeemPaused = false;\n    emit RedeemUnpaused();\n  }\n\n  /// Ensure that the subscribe functionality is not paused\n  modifier whenSubscribeNotPaused() {\n    if (subscribePaused) revert SubscriptionsPaused();\n    _;\n  }\n\n  /// Ensure that the redeem functionality is not paused\n  modifier whenRedeemNotPaused() {\n    if (redeemPaused) revert RedemptionsPaused();\n    _;\n  }\n}\n"},{"file_path":"contracts/xManager/interfaces/IOndoTokenRouter.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\n/*\n      ▄▄█████████▄\n   ╓██▀└ ,╓▄▄▄, '▀██▄\n  ██▀ ▄██▀▀╙╙▀▀██▄ └██µ           ,,       ,,      ,     ,,,            ,,,\n ██ ,██¬ ▄████▄  ▀█▄ ╙█▄      ▄███▀▀███▄   ███▄    ██  ███▀▀▀███▄    ▄███▀▀███,\n██  ██ ╒█▀'   ╙█▌ ╙█▌ ██     ▐██      ███  █████,  ██  ██▌    └██▌  ██▌     └██▌\n██ ▐█▌ ██      ╟█  █▌ ╟█     ██▌      ▐██  ██ └███ ██  ██▌     ╟██ j██       ╟██\n╟█  ██ ╙██    ▄█▀ ▐█▌ ██     ╙██      ██▌  ██   ╙████  ██▌    ▄██▀  ██▌     ,██▀\n ██ \"██, ╙▀▀███████████⌐      ╙████████▀   ██     ╙██  ███████▀▀     ╙███████▀`\n  ██▄ ╙▀██▄▄▄▄▄,,,                ¬─                                    '─¬\n   ╙▀██▄ '╙╙╙▀▀▀▀▀▀▀▀\n      ╙▀▀██████R⌐\n */\npragma solidity 0.8.16;\n\ninterface IOndoTokenRouter {\n  function depositToken(\n    address rwaToken,\n    address tokenToDeposit,\n    uint256 depositAmount\n  ) external;\n\n  function withdrawToken(\n    address rwaTokenRedeemed,\n    address tokenToWithdraw,\n    bytes32 userID,\n    uint256 withdrawAmount\n  ) external;\n\n  function availableToWithdraw(\n    address rwaToken,\n    address tokenToWithdraw,\n    bytes32 userID\n  ) external view returns (uint256 totalAvailable);\n}\n"},{"file_path":"contracts/xManager/interfaces/IOndoCompliance.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\n/*\n      ▄▄█████████▄\n   ╓██▀└ ,╓▄▄▄, '▀██▄\n  ██▀ ▄██▀▀╙╙▀▀██▄ └██µ           ,,       ,,      ,     ,,,            ,,,\n ██ ,██¬ ▄████▄  ▀█▄ ╙█▄      ▄███▀▀███▄   ███▄    ██  ███▀▀▀███▄    ▄███▀▀███,\n██  ██ ╒█▀'   ╙█▌ ╙█▌ ██     ▐██      ███  █████,  ██  ██▌    └██▌  ██▌     └██▌\n██ ▐█▌ ██      ╟█  █▌ ╟█     ██▌      ▐██  ██ └███ ██  ██▌     ╟██ j██       ╟██\n╟█  ██ ╙██    ▄█▀ ▐█▌ ██     ╙██      ██▌  ██   ╙████  ██▌    ▄██▀  ██▌     ,██▀\n ██ \"██, ╙▀▀███████████⌐      ╙████████▀   ██     ╙██  ███████▀▀     ╙███████▀`\n  ██▄ ╙▀██▄▄▄▄▄,,,                ¬─                                    '─¬\n   ╙▀██▄ '╙╙╙▀▀▀▀▀▀▀▀\n      ╙▀▀██████R⌐\n */\npragma solidity 0.8.16;\n\ninterface IOndoCompliance {\n  function checkIsCompliant(address rwaToken, address user) external;\n}\n"},{"file_path":"contracts/external/openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n  /**\n   * @dev Returns true if `account` is a contract.\n   *\n   * [IMPORTANT]\n   * ====\n   * It is unsafe to assume that an address for which this function returns\n   * false is an externally-owned account (EOA) and not a contract.\n   *\n   * Among others, `isContract` will return false for the following\n   * types of addresses:\n   *\n   *  - an externally-owned account\n   *  - a contract in construction\n   *  - an address where a contract will be created\n   *  - an address where a contract lived, but was destroyed\n   * ====\n   *\n   * [IMPORTANT]\n   * ====\n   * You shouldn't rely on `isContract` to protect against flash loan attacks!\n   *\n   * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n   * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n   * constructor.\n   * ====\n   */\n  function isContract(address account) internal view returns (bool) {\n    // This method relies on extcodesize/address.code.length, which returns 0\n    // for contracts in construction, since the code is only stored at the end\n    // of the constructor execution.\n\n    return account.code.length > 0;\n  }\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://diligence.consensys.net/posts/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.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n   */\n  function sendValue(address payable recipient, uint256 amount) internal {\n    require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n    (bool success, ) = recipient.call{value: amount}(\"\");\n    require(\n      success,\n      \"Address: unable to send value, recipient may have reverted\"\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, it is bubbled up by this\n   * function (like regular Solidity function calls).\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   * _Available since v3.1._\n   */\n  function functionCall(address target, bytes memory data)\n    internal\n    returns (bytes memory)\n  {\n    return functionCall(target, data, \"Address: low-level call failed\");\n  }\n\n  /**\n   * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n   * `errorMessage` as a fallback revert reason when `target` reverts.\n   *\n   * _Available since v3.1._\n   */\n  function functionCall(\n    address target,\n    bytes memory data,\n    string memory errorMessage\n  ) internal returns (bytes memory) {\n    return functionCallWithValue(target, data, 0, errorMessage);\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   * _Available since v3.1._\n   */\n  function functionCallWithValue(\n    address target,\n    bytes memory data,\n    uint256 value\n  ) internal returns (bytes memory) {\n    return\n      functionCallWithValue(\n        target,\n        data,\n        value,\n        \"Address: low-level call with value failed\"\n      );\n  }\n\n  /**\n   * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n   * with `errorMessage` as a fallback revert reason when `target` reverts.\n   *\n   * _Available since v3.1._\n   */\n  function functionCallWithValue(\n    address target,\n    bytes memory data,\n    uint256 value,\n    string memory errorMessage\n  ) internal returns (bytes memory) {\n    require(\n      address(this).balance >= value,\n      \"Address: insufficient balance for call\"\n    );\n    require(isContract(target), \"Address: call to non-contract\");\n\n    (bool success, bytes memory returndata) = target.call{value: value}(data);\n    return verifyCallResult(success, returndata, errorMessage);\n  }\n\n  /**\n   * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n   * but performing a static call.\n   *\n   * _Available since v3.3._\n   */\n  function functionStaticCall(address target, bytes memory data)\n    internal\n    view\n    returns (bytes memory)\n  {\n    return\n      functionStaticCall(target, data, \"Address: low-level static call failed\");\n  }\n\n  /**\n   * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n   * but performing a static call.\n   *\n   * _Available since v3.3._\n   */\n  function functionStaticCall(\n    address target,\n    bytes memory data,\n    string memory errorMessage\n  ) internal view returns (bytes memory) {\n    require(isContract(target), \"Address: static call to non-contract\");\n\n    (bool success, bytes memory returndata) = target.staticcall(data);\n    return verifyCallResult(success, returndata, errorMessage);\n  }\n\n  /**\n   * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n   * revert reason using the provided one.\n   *\n   * _Available since v4.3._\n   */\n  function verifyCallResult(\n    bool success,\n    bytes memory returndata,\n    string memory errorMessage\n  ) internal pure returns (bytes memory) {\n    if (success) {\n      return returndata;\n    } else {\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        /// @solidity memory-safe-assembly\n        assembly {\n          let returndata_size := mload(returndata)\n          revert(add(32, returndata), returndata_size)\n        }\n      } else {\n        revert(errorMessage);\n      }\n    }\n  }\n}\n"},{"file_path":"contracts/external/openzeppelin/contracts/access/IAccessControlEnumerable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"contracts/external/openzeppelin/contracts/access/IAccessControl.sol\";\n\n/**\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\n */\ninterface IAccessControlEnumerable is IAccessControl {\n  /**\n   * @dev Returns one of the accounts that have `role`. `index` must be a\n   * value between 0 and {getRoleMemberCount}, non-inclusive.\n   *\n   * Role bearers are not sorted in any particular way, and their ordering may\n   * change at any point.\n   *\n   * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\n   * you perform all queries on the same block. See the following\n   * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\n   * for more information.\n   */\n  function getRoleMember(bytes32 role, uint256 index)\n    external\n    view\n    returns (address);\n\n  /**\n   * @dev Returns the number of accounts that have `role`. Can be used\n   * together with {getRoleMember} to enumerate all bearers of a role.\n   */\n  function getRoleMemberCount(bytes32 role) external view returns (uint256);\n}\n"},{"file_path":"contracts/external/openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for managing\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n * types.\n *\n * Sets have the following properties:\n *\n * - Elements are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```\n * contract Example {\n *     // Add the library methods\n *     using EnumerableSet for EnumerableSet.AddressSet;\n *\n *     // Declare a set state variable\n *     EnumerableSet.AddressSet private mySet;\n * }\n * ```\n *\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\n * and `uint256` (`UintSet`) are supported.\n *\n * [WARNING]\n * ====\n *  Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\n *  See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\n *\n *  In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\n * ====\n */\nlibrary EnumerableSetUpgradeable {\n  // To implement this library for multiple types with as little code\n  // repetition as possible, we write it in terms of a generic Set type with\n  // bytes32 values.\n  // The Set implementation uses private functions, and user-facing\n  // implementations (such as AddressSet) are just wrappers around the\n  // underlying Set.\n  // This means that we can only create new EnumerableSets for types that fit\n  // in bytes32.\n\n  struct Set {\n    // Storage of set values\n    bytes32[] _values;\n    // Position of the value in the `values` array, plus 1 because index 0\n    // means a value is not in the set.\n    mapping(bytes32 => uint256) _indexes;\n  }\n\n  /**\n   * @dev Add a value to a set. O(1).\n   *\n   * Returns true if the value was added to the set, that is if it was not\n   * already present.\n   */\n  function _add(Set storage set, bytes32 value) private returns (bool) {\n    if (!_contains(set, value)) {\n      set._values.push(value);\n      // The value is stored at length-1, but we add 1 to all indexes\n      // and use 0 as a sentinel value\n      set._indexes[value] = set._values.length;\n      return true;\n    } else {\n      return false;\n    }\n  }\n\n  /**\n   * @dev Removes a value from a set. O(1).\n   *\n   * Returns true if the value was removed from the set, that is if it was\n   * present.\n   */\n  function _remove(Set storage set, bytes32 value) private returns (bool) {\n    // We read and store the value's index to prevent multiple reads from the same storage slot\n    uint256 valueIndex = set._indexes[value];\n\n    if (valueIndex != 0) {\n      // Equivalent to contains(set, value)\n      // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\n      // the array, and then remove the last element (sometimes called as 'swap and pop').\n      // This modifies the order of the array, as noted in {at}.\n\n      uint256 toDeleteIndex = valueIndex - 1;\n      uint256 lastIndex = set._values.length - 1;\n\n      if (lastIndex != toDeleteIndex) {\n        bytes32 lastValue = set._values[lastIndex];\n\n        // Move the last value to the index where the value to delete is\n        set._values[toDeleteIndex] = lastValue;\n        // Update the index for the moved value\n        set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\n      }\n\n      // Delete the slot where the moved value was stored\n      set._values.pop();\n\n      // Delete the index for the deleted slot\n      delete set._indexes[value];\n\n      return true;\n    } else {\n      return false;\n    }\n  }\n\n  /**\n   * @dev Returns true if the value is in the set. O(1).\n   */\n  function _contains(Set storage set, bytes32 value)\n    private\n    view\n    returns (bool)\n  {\n    return set._indexes[value] != 0;\n  }\n\n  /**\n   * @dev Returns the number of values on the set. O(1).\n   */\n  function _length(Set storage set) private view returns (uint256) {\n    return set._values.length;\n  }\n\n  /**\n   * @dev Returns the value stored at position `index` in the set. O(1).\n   *\n   * Note that there are no guarantees on the ordering of values inside the\n   * array, and it may change when more values are added or removed.\n   *\n   * Requirements:\n   *\n   * - `index` must be strictly less than {length}.\n   */\n  function _at(Set storage set, uint256 index) private view returns (bytes32) {\n    return set._values[index];\n  }\n\n  /**\n   * @dev Return the entire set in an array\n   *\n   * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n   * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n   * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n   * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n   */\n  function _values(Set storage set) private view returns (bytes32[] memory) {\n    return set._values;\n  }\n\n  // Bytes32Set\n\n  struct Bytes32Set {\n    Set _inner;\n  }\n\n  /**\n   * @dev Add a value to a set. O(1).\n   *\n   * Returns true if the value was added to the set, that is if it was not\n   * already present.\n   */\n  function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n    return _add(set._inner, value);\n  }\n\n  /**\n   * @dev Removes a value from a set. O(1).\n   *\n   * Returns true if the value was removed from the set, that is if it was\n   * present.\n   */\n  function remove(Bytes32Set storage set, bytes32 value)\n    internal\n    returns (bool)\n  {\n    return _remove(set._inner, value);\n  }\n\n  /**\n   * @dev Returns true if the value is in the set. O(1).\n   */\n  function contains(Bytes32Set storage set, bytes32 value)\n    internal\n    view\n    returns (bool)\n  {\n    return _contains(set._inner, value);\n  }\n\n  /**\n   * @dev Returns the number of values in the set. O(1).\n   */\n  function length(Bytes32Set storage set) internal view returns (uint256) {\n    return _length(set._inner);\n  }\n\n  /**\n   * @dev Returns the value stored at position `index` in the set. O(1).\n   *\n   * Note that there are no guarantees on the ordering of values inside the\n   * array, and it may change when more values are added or removed.\n   *\n   * Requirements:\n   *\n   * - `index` must be strictly less than {length}.\n   */\n  function at(Bytes32Set storage set, uint256 index)\n    internal\n    view\n    returns (bytes32)\n  {\n    return _at(set._inner, index);\n  }\n\n  /**\n   * @dev Return the entire set in an array\n   *\n   * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n   * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n   * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n   * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n   */\n  function values(Bytes32Set storage set)\n    internal\n    view\n    returns (bytes32[] memory)\n  {\n    return _values(set._inner);\n  }\n\n  // AddressSet\n\n  struct AddressSet {\n    Set _inner;\n  }\n\n  /**\n   * @dev Add a value to a set. O(1).\n   *\n   * Returns true if the value was added to the set, that is if it was not\n   * already present.\n   */\n  function add(AddressSet storage set, address value) internal returns (bool) {\n    return _add(set._inner, bytes32(uint256(uint160(value))));\n  }\n\n  /**\n   * @dev Removes a value from a set. O(1).\n   *\n   * Returns true if the value was removed from the set, that is if it was\n   * present.\n   */\n  function remove(AddressSet storage set, address value)\n    internal\n    returns (bool)\n  {\n    return _remove(set._inner, bytes32(uint256(uint160(value))));\n  }\n\n  /**\n   * @dev Returns true if the value is in the set. O(1).\n   */\n  function contains(AddressSet storage set, address value)\n    internal\n    view\n    returns (bool)\n  {\n    return _contains(set._inner, bytes32(uint256(uint160(value))));\n  }\n\n  /**\n   * @dev Returns the number of values in the set. O(1).\n   */\n  function length(AddressSet storage set) internal view returns (uint256) {\n    return _length(set._inner);\n  }\n\n  /**\n   * @dev Returns the value stored at position `index` in the set. O(1).\n   *\n   * Note that there are no guarantees on the ordering of values inside the\n   * array, and it may change when more values are added or removed.\n   *\n   * Requirements:\n   *\n   * - `index` must be strictly less than {length}.\n   */\n  function at(AddressSet storage set, uint256 index)\n    internal\n    view\n    returns (address)\n  {\n    return address(uint160(uint256(_at(set._inner, index))));\n  }\n\n  /**\n   * @dev Return the entire set in an array\n   *\n   * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n   * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n   * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n   * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n   */\n  function values(AddressSet storage set)\n    internal\n    view\n    returns (address[] memory)\n  {\n    bytes32[] memory store = _values(set._inner);\n    address[] memory result;\n\n    /// @solidity memory-safe-assembly\n    assembly {\n      result := store\n    }\n\n    return result;\n  }\n\n  // UintSet\n\n  struct UintSet {\n    Set _inner;\n  }\n\n  /**\n   * @dev Add a value to a set. O(1).\n   *\n   * Returns true if the value was added to the set, that is if it was not\n   * already present.\n   */\n  function add(UintSet storage set, uint256 value) internal returns (bool) {\n    return _add(set._inner, bytes32(value));\n  }\n\n  /**\n   * @dev Removes a value from a set. O(1).\n   *\n   * Returns true if the value was removed from the set, that is if it was\n   * present.\n   */\n  function remove(UintSet storage set, uint256 value) internal returns (bool) {\n    return _remove(set._inner, bytes32(value));\n  }\n\n  /**\n   * @dev Returns true if the value is in the set. O(1).\n   */\n  function contains(UintSet storage set, uint256 value)\n    internal\n    view\n    returns (bool)\n  {\n    return _contains(set._inner, bytes32(value));\n  }\n\n  /**\n   * @dev Returns the number of values on the set. O(1).\n   */\n  function length(UintSet storage set) internal view returns (uint256) {\n    return _length(set._inner);\n  }\n\n  /**\n   * @dev Returns the value stored at position `index` in the set. O(1).\n   *\n   * Note that there are no guarantees on the ordering of values inside the\n   * array, and it may change when more values are added or removed.\n   *\n   * Requirements:\n   *\n   * - `index` must be strictly less than {length}.\n   */\n  function at(UintSet storage set, uint256 index)\n    internal\n    view\n    returns (uint256)\n  {\n    return uint256(_at(set._inner, index));\n  }\n\n  /**\n   * @dev Return the entire set in an array\n   *\n   * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n   * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n   * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n   * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n   */\n  function values(UintSet storage set)\n    internal\n    view\n    returns (uint256[] memory)\n  {\n    bytes32[] memory store = _values(set._inner);\n    uint256[] memory result;\n\n    /// @solidity memory-safe-assembly\n    assembly {\n      result := store\n    }\n\n    return result;\n  }\n}\n"},{"file_path":"contracts/external/openzeppelin/contracts-upgradeable/utils/ERC165Upgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"contracts/external/openzeppelin/contracts-upgradeable/utils/IERC165Upgradeable.sol\";\nimport \"contracts/external/openzeppelin/contracts-upgradeable/proxy/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {\n  function __ERC165_init() internal onlyInitializing {}\n\n  function __ERC165_init_unchained() internal onlyInitializing {}\n\n  /**\n   * @dev See {IERC165-supportsInterface}.\n   */\n  function supportsInterface(bytes4 interfaceId)\n    public\n    view\n    virtual\n    override\n    returns (bool)\n  {\n    return interfaceId == type(IERC165Upgradeable).interfaceId;\n  }\n\n  /**\n   * @dev This empty reserved space is put in place to allow future versions to add new\n   * variables without shifting down storage in the inheritance chain.\n   * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n   */\n  uint256[50] private __gap;\n}\n"},{"file_path":"contracts/xManager/interfaces/IOndoIDRegistry.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\n/*\n      ▄▄█████████▄\n   ╓██▀└ ,╓▄▄▄, '▀██▄\n  ██▀ ▄██▀▀╙╙▀▀██▄ └██µ           ,,       ,,      ,     ,,,            ,,,\n ██ ,██¬ ▄████▄  ▀█▄ ╙█▄      ▄███▀▀███▄   ███▄    ██  ███▀▀▀███▄    ▄███▀▀███,\n██  ██ ╒█▀'   ╙█▌ ╙█▌ ██     ▐██      ███  █████,  ██  ██▌    └██▌  ██▌     └██▌\n██ ▐█▌ ██      ╟█  █▌ ╟█     ██▌      ▐██  ██ └███ ██  ██▌     ╟██ j██       ╟██\n╟█  ██ ╙██    ▄█▀ ▐█▌ ██     ╙██      ██▌  ██   ╙████  ██▌    ▄██▀  ██▌     ,██▀\n ██ \"██, ╙▀▀███████████⌐      ╙████████▀   ██     ╙██  ███████▀▀     ╙███████▀`\n  ██▄ ╙▀██▄▄▄▄▄,,,                ¬─                                    '─¬\n   ╙▀██▄ '╙╙╙▀▀▀▀▀▀▀▀\n      ╙▀▀██████R⌐\n */\npragma solidity 0.8.16;\n\ninterface IOndoIDRegistry {\n  function getRegisteredID(\n    address rwaToken,\n    address user\n  ) external view returns (bytes32 userID);\n}\n"},{"file_path":"contracts/external/openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary StringsUpgradeable {\n  bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\n  uint8 private constant _ADDRESS_LENGTH = 20;\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    // Inspired by OraclizeAPI's implementation - MIT licence\n    // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n    if (value == 0) {\n      return \"0\";\n    }\n    uint256 temp = value;\n    uint256 digits;\n    while (temp != 0) {\n      digits++;\n      temp /= 10;\n    }\n    bytes memory buffer = new bytes(digits);\n    while (value != 0) {\n      digits -= 1;\n      buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n      value /= 10;\n    }\n    return string(buffer);\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    if (value == 0) {\n      return \"0x00\";\n    }\n    uint256 temp = value;\n    uint256 length = 0;\n    while (temp != 0) {\n      length++;\n      temp >>= 8;\n    }\n    return toHexString(value, length);\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)\n    internal\n    pure\n    returns (string memory)\n  {\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_SYMBOLS[value & 0xf];\n      value >>= 4;\n    }\n    require(value == 0, \"Strings: hex length insufficient\");\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 representation.\n   */\n  function toHexString(address addr) internal pure returns (string memory) {\n    return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n  }\n}\n"},{"file_path":"contracts/xManager/interfaces/ITokenSource.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\n/*\n      ▄▄█████████▄\n   ╓██▀└ ,╓▄▄▄, '▀██▄\n  ██▀ ▄██▀▀╙╙▀▀██▄ └██µ           ,,       ,,      ,     ,,,            ,,,\n ██ ,██¬ ▄████▄  ▀█▄ ╙█▄      ▄███▀▀███▄   ███▄    ██  ███▀▀▀███▄    ▄███▀▀███,\n██  ██ ╒█▀'   ╙█▌ ╙█▌ ██     ▐██      ███  █████,  ██  ██▌    └██▌  ██▌     └██▌\n██ ▐█▌ ██      ╟█  █▌ ╟█     ██▌      ▐██  ██ └███ ██  ██▌     ╟██ j██       ╟██\n╟█  ██ ╙██    ▄█▀ ▐█▌ ██     ╙██      ██▌  ██   ╙████  ██▌    ▄██▀  ██▌     ,██▀\n ██ \"██, ╙▀▀███████████⌐      ╙████████▀   ██     ╙██  ███████▀▀     ╙███████▀`\n  ██▄ ╙▀██▄▄▄▄▄,,,                ¬─                                    '─¬\n   ╙▀██▄ '╙╙╙▀▀▀▀▀▀▀▀\n      ╙▀▀██████R⌐\n */\npragma solidity 0.8.16;\n\ninterface ITokenSource {\n  /**\n   * @notice Emitted when tokens are withdrawn from the source\n   * @param  requestedBy    The address of the account that requested the withdraw\n   * @param  withdrawnFrom  The address of the source contract from which the tokens were withdrawn\n   * @param  withdrawToken  The address of the token that was withdrawn\n   * @param  withdrawAmount The amount of tokens that were withdrawn, denoted in the decimals of\n   *                        `withdrawToken`\n   */\n  event TokensWithdrawn(\n    address indexed requestedBy,\n    address indexed withdrawnFrom,\n    address indexed withdrawToken,\n    uint256 withdrawAmount\n  );\n\n  /// Thrown when the requested token is not the expected token\n  error InvalidTokenAddressForTokenSource();\n\n  /// Thrown when attempting to set an address to address(0) which is not allowed\n  error ZeroAddressNotAllowed();\n\n  function withdrawToken(\n    address tokenToWithdraw,\n    uint256 withdrawAmount\n  ) external;\n\n  function availableToWithdraw(\n    address tokenToWithdraw\n  ) external view returns (uint256);\n}\n"}],"certified":false,"conflicting_implementations":null,"abi":[{"inputs":[{"internalType":"address","name":"_defaultAdmin","type":"address"},{"internalType":"address","name":"_rwaToken","type":"address"},{"internalType":"address","name":"_rusdy","type":"address"},{"internalType":"uint256","name":"_minimumDepositAmount","type":"uint256"},{"internalType":"uint256","name":"_minimumRedemptionAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AdminSubscriptionCheckerAddressCantBeZero","type":"error"},{"inputs":[],"name":"ComplianceAddressCantBeZero","type":"error"},{"inputs":[],"name":"DepositAmountTooSmall","type":"error"},{"inputs":[],"name":"FeeGreaterThanRedemption","type":"error"},{"inputs":[],"name":"FeeGreaterThanSubscription","type":"error"},{"inputs":[],"name":"FeesAddressCantBeZero","type":"error"},{"inputs":[],"name":"IDRegistryAddressCantBeZero","type":"error"},{"inputs":[],"name":"OracleAddressCantBeZero","type":"error"},{"inputs":[],"name":"RWAPriceTooLow","type":"error"},{"inputs":[],"name":"RateLimiterAddressCantBeZero","type":"error"},{"inputs":[],"name":"RebasingUSDYCantBeZeroAddress","type":"error"},{"inputs":[],"name":"ReceiveAmountTooSmall","type":"error"},{"inputs":[],"name":"RedemptionAmountTooSmall","type":"error"},{"inputs":[],"name":"RedemptionsPaused","type":"error"},{"inputs":[],"name":"RouterAddressCantBeZero","type":"error"},{"inputs":[],"name":"RwaReceiveAmountTooSmall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[],"name":"SubscriptionsPaused","type":"error"},{"inputs":[],"name":"TokenAddressCantBeZero","type":"error"},{"inputs":[],"name":"TokenNotAccepted","type":"error"},{"inputs":[],"name":"UserNotRegistered","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"bool","name":"accepted","type":"bool"}],"name":"AcceptedRedemptionTokenSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"bool","name":"accepted","type":"bool"}],"name":"AcceptedSubscriptionTokenSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"adminCaller","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":true,"internalType":"bytes32","name":"recipientId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"rwaAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"usdAmount","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"metadata","type":"bytes32"}],"name":"AdminSubscription","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldAdminSubscriptionChecker","type":"address"},{"indexed":true,"internalType":"address","name":"newAdminSubscriptionChecker","type":"address"}],"name":"AdminSubscriptionCheckerSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"usdyAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rusdyAmount","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"metadata","type":"bytes32"}],"name":"AdminSubscriptionRebasingUSDY","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"redeemer","type":"address"},{"indexed":false,"internalType":"uint256","name":"usdyAmountIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rusdyAmountIn","type":"uint256"},{"indexed":false,"internalType":"address","name":"receivingToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"receiveTokenAmount","type":"uint256"}],"name":"InstantRedemptionRebasingUSDY","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"usdyAmountOut","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rusdyAmountOut","type":"uint256"},{"indexed":false,"internalType":"address","name":"depositToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"depositAmount","type":"uint256"}],"name":"InstantSubscriptionRebasingUSDY","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldMinDepositAmount","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newMinDepositAmount","type":"uint256"}],"name":"MinimumDepositAmountSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldMinRedemptionAmount","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newMinRedemptionAmount","type":"uint256"}],"name":"MinimumRedemptionAmountSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldMinimumRwaPrice","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newMinimumRwaPrice","type":"uint256"}],"name":"MinimumRwaPriceSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldOndoCompliance","type":"address"},{"indexed":true,"internalType":"address","name":"newOndoCompliance","type":"address"}],"name":"OndoComplianceSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldOndoIDRegistry","type":"address"},{"indexed":true,"internalType":"address","name":"newOndoIDRegistry","type":"address"}],"name":"OndoIDRegistrySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldOndoOracle","type":"address"},{"indexed":true,"internalType":"address","name":"newOndoOracle","type":"address"}],"name":"OndoOracleSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldOndoRateLimiter","type":"address"},{"indexed":true,"internalType":"address","name":"newOndoRateLimiter","type":"address"}],"name":"OndoRateLimiterSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldOndoRedemptionFees","type":"address"},{"indexed":true,"internalType":"address","name":"newOndoRedemptionFees","type":"address"}],"name":"OndoRedemptionFeesSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldOndoSubscriptionFees","type":"address"},{"indexed":true,"internalType":"address","name":"newOndoSubscriptionFees","type":"address"}],"name":"OndoSubscriptionFeesSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldOndoTokenRouter","type":"address"},{"indexed":true,"internalType":"address","name":"newOndoTokenRouter","type":"address"}],"name":"OndoTokenRouterSet","type":"event"},{"anonymous":false,"inputs":[],"name":"RedeemPaused","type":"event"},{"anonymous":false,"inputs":[],"name":"RedeemUnpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"redeemer","type":"address"},{"indexed":true,"internalType":"bytes32","name":"redeemerId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"rwaAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"receivingToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"receiveTokenAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"redemptionUSDValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"Redemption","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":[],"name":"SubscribePaused","type":"event"},{"anonymous":false,"inputs":[],"name":"SubscribeUnpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"subscriber","type":"address"},{"indexed":true,"internalType":"bytes32","name":"subscriberId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"rwaAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"depositToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"depositAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"depositUSDValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"Subscription","type":"event"},{"inputs":[],"name":"ADMIN_SUBSCRIPTION_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CONFIGURER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RWA_NORMALIZER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDY_TO_RUSDY_SHARES_MULTIPLIER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USD_NORMALIZER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"acceptedRedemptionTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"acceptedSubscriptionTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"rwaAmount","type":"uint256"},{"internalType":"bytes32","name":"metadata","type":"bytes32"}],"name":"adminSubscribe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"rusdyAmount","type":"uint256"},{"internalType":"bytes32","name":"metadata","type":"bytes32"}],"name":"adminSubscribeRebasingUSDY","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"adminSubscriptionChecker","outputs":[{"internalType":"contract IAdminSubscriptionChecker","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumDepositUSD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumRedemptionUSD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumRwaPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ondoCompliance","outputs":[{"internalType":"contract IOndoCompliance","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ondoIDRegistry","outputs":[{"internalType":"contract IOndoIDRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ondoOracle","outputs":[{"internalType":"contract IOndoOracle","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ondoRateLimiter","outputs":[{"internalType":"contract IOndoRateLimiter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ondoRedemptionFees","outputs":[{"internalType":"contract IOndoFees","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ondoSubscriptionFees","outputs":[{"internalType":"contract IOndoFees","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ondoTokenRouter","outputs":[{"internalType":"contract IOndoTokenRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauseRedeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pauseSubscribe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"rwaAmount","type":"uint256"},{"internalType":"address","name":"receivingToken","type":"address"},{"internalType":"uint256","name":"minimumTokenReceived","type":"uint256"}],"name":"redeem","outputs":[{"internalType":"uint256","name":"receiveTokenAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"redeemPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"rusdyAmount","type":"uint256"},{"internalType":"address","name":"receivingToken","type":"address"},{"internalType":"uint256","name":"minimumTokenReceived","type":"uint256"}],"name":"redeemRebasingUSDY","outputs":[{"internalType":"uint256","name":"receiveTokenAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"retrieveTokens","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":[],"name":"rusdy","outputs":[{"internalType":"contract rUSDY","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rwaToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"bool","name":"accepted","type":"bool"}],"name":"setAcceptedRedemptionToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"bool","name":"accepted","type":"bool"}],"name":"setAcceptedSubscriptionToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_adminSubscriptionChecker","type":"address"}],"name":"setAdminSubscriptionChecker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minimumDepositUSD","type":"uint256"}],"name":"setMinimumDepositAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minimumRedemptionUSD","type":"uint256"}],"name":"setMinimumRedemptionAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minimumRwaPrice","type":"uint256"}],"name":"setMinimumRwaPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_ondoCompliance","type":"address"}],"name":"setOndoCompliance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_ondoIDRegistry","type":"address"}],"name":"setOndoIDRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_ondoOracle","type":"address"}],"name":"setOndoOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_ondoRateLimiter","type":"address"}],"name":"setOndoRateLimiter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_ondoRedemptionFees","type":"address"}],"name":"setOndoRedemptionFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_ondoSubscriptionFees","type":"address"}],"name":"setOndoSubscriptionFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_ondoTokenRouter","type":"address"}],"name":"setOndoTokenRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"depositToken","type":"address"},{"internalType":"uint256","name":"depositAmount","type":"uint256"},{"internalType":"uint256","name":"minimumRwaReceived","type":"uint256"}],"name":"subscribe","outputs":[{"internalType":"uint256","name":"rwaAmountOut","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"subscribePaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"depositToken","type":"address"},{"internalType":"uint256","name":"depositAmount","type":"uint256"},{"internalType":"uint256","name":"minimumRusdyReceived","type":"uint256"}],"name":"subscribeRebasingUSDY","outputs":[{"internalType":"uint256","name":"rusdyAmountOut","type":"uint256"}],"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":"unpauseRedeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpauseSubscribe","outputs":[],"stateMutability":"nonpayable","type":"function"}],"is_changed_bytecode":false,"is_partially_verified":true,"constructor_args":"0x0000000000000000000000001dd6bcf6d188f11d8de64b5c8575fb86c4b3d9ff00000000000000000000000096f6ef951840721adbf46ac996b59e0235cb985c000000000000000000000000af37c1167910ebc994e266949387d2c7c326b8790000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000de0b6b3a7640000"}