creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "periphery/MilkmanRouter.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.21;\n\nimport \"@openzeppelin/Ownable2Step.sol\";\nimport \"@openzeppelin/IERC20.sol\";\nimport \"@openzeppelin/SafeERC20.sol\";\nimport \"./dependencies/milkman/IMilkman.sol\";\nimport \"./interfaces/IMilkmanRouter.sol\";\nimport \"./Executor.sol\";\nimport \"src/v2/Types.sol\";\n\n/// @title MilkmanRouter\n/// @notice Router for executing operations on the Milkman contract.\ncontract MilkmanRouter is IMilkmanRouter, Executor, Ownable2Step {\n    using SafeERC20 for IERC20;\n\n    /// @notice The address of the AeraVaultV2.\n    address public immutable vault;\n\n    /// @notice The address of the Milkman root contract.\n    IMilkman public immutable milkmanRoot;\n\n    /// ERRORS ///\n\n    /// @notice Error emitted when the vault address is zero.\n    error AeraPeriphery__VaultIsZeroAddress();\n\n    /// @notice Error emitted when the Milkman root address is zero.\n    error AeraPeriphery__MilkmanIsZeroAddress();\n\n    /// @notice Error emitted when the caller is not the vault.\n    error AeraPeriphery__CallerIsNotVault();\n\n    /// @notice Error emitted when the Milkman root failed to spend all approved tokens.\n    error AeraPeriphery__MilkmanRequestSwapExactTokensForTokensFailed(\n        IERC20 token\n    );\n\n    /// @notice Error emitted when the owner is the vault.\n    error AeraPeriphery__OwnerIsVault();\n\n    /// @notice Error emitted when the owner address is zero.\n    error AeraPeriphery__OwnerIsZeroAddress();\n\n    /// MODIFIERS ///\n\n    modifier onlyVault() {\n        // Requirements: check that the caller is the vault.\n        if (msg.sender != vault) {\n            revert AeraPeriphery__CallerIsNotVault();\n        }\n        _;\n    }\n\n    /// FUNCTIONS ///\n\n    /// @notice Constructor for the MilkmanRouter contract.\n    /// @param vault_ The address of the AeraVaultV2.\n    /// @param milkmanRoot_ The address of the Milkman root contract.\n    /// @param owner_ The address of the owner.\n    constructor(\n        address vault_,\n        address milkmanRoot_,\n        address owner_\n    ) Ownable() {\n        // Requirements: check that the vault address is not zero.\n        if (vault_ == address(0)) {\n            revert AeraPeriphery__VaultIsZeroAddress();\n        }\n        // Requirements: check that the Milkman root address is not zero.\n        if (milkmanRoot_ == address(0)) {\n            revert AeraPeriphery__MilkmanIsZeroAddress();\n        }\n        // Requirements: check that the owner address is not zero.\n        if (owner_ == address(0)) {\n            revert AeraPeriphery__OwnerIsZeroAddress();\n        }\n        // Requirements: check that the owner is not the vault.\n        if (owner_ == vault_) {\n            revert AeraPeriphery__OwnerIsVault();\n        }\n\n        // Effects: set the vault and Milkman root addresses.\n        vault = vault_;\n        milkmanRoot = IMilkman(milkmanRoot_);\n        // Effects: set the owner.\n        _transferOwnership(owner_);\n    }\n\n    /// @inheritdoc IMilkmanRouter\n    function requestSell(\n        uint256 sellAmount,\n        IERC20 sellToken,\n        IERC20 receiveToken,\n        address priceChecker,\n        bytes calldata priceCheckerData\n    ) external onlyVault nonReentrant {\n        // Requirements: check that the sellAmount is not zero.\n        if (sellAmount == 0) return;\n\n        // Interactions: approve the Milkman root to spend the sellToken.\n        sellToken.safeIncreaseAllowance(address(milkmanRoot), sellAmount);\n\n        // Interactions: forward swap request to Milkman root.\n        milkmanRoot.requestSwapExactTokensForTokens(\n            sellAmount,\n            sellToken,\n            receiveToken,\n            address(this),\n            priceChecker,\n            priceCheckerData\n        );\n\n        // Invariants: validate the Milkman root approval.\n        // We expect Milkman to spend all approved tokens.\n        if (sellToken.allowance(address(this), address(milkmanRoot)) > 0) {\n            revert AeraPeriphery__MilkmanRequestSwapExactTokensForTokensFailed(\n                sellToken\n            );\n        }\n\n        // Log that the swap was requested.\n        emit SellRequested(\n            sellAmount, sellToken, receiveToken, priceChecker, priceCheckerData\n        );\n    }\n\n    /// @inheritdoc IMilkmanRouter\n    function cancelSell(\n        address milkmanOrderContract,\n        uint256 sellAmount,\n        IERC20 sellToken,\n        IERC20 receiveToken,\n        address priceChecker,\n        bytes calldata priceCheckerData\n    ) external onlyVault nonReentrant {\n        // Interactions: forward swap cancellation to Milkman.\n        IMilkman(milkmanOrderContract).cancelSwap(\n            sellAmount,\n            sellToken,\n            receiveToken,\n            address(this),\n            priceChecker,\n            priceCheckerData\n        );\n\n        // Interactions: transfer tokens back to the Vault.\n        sellToken.safeTransfer(vault, sellAmount);\n\n        // Log that the swap was cancelled.\n        emit SellCancelled(\n            milkmanOrderContract,\n            sellAmount,\n            sellToken,\n            receiveToken,\n            priceChecker,\n            priceCheckerData\n        );\n    }\n\n    /// @inheritdoc IMilkmanRouter\n    function claim(IERC20 token) external onlyVault nonReentrant {\n        uint256 balance = token.balanceOf(address(this));\n        // Requirements: check that the balance is not zero.\n        // slither-disable-next-line incorrect-equality\n        if (balance == 0) return;\n        // Interactions: transfer tokens to the Vault.\n        token.safeTransfer(vault, balance);\n        // Log that the tokens were claimed.\n        emit Claimed(token, balance);\n    }\n\n    /// @inheritdoc Ownable\n    function transferOwnership(address newOwner) public override onlyOwner {\n        // Requirements: check that the new owner is not the vault.\n        if (newOwner == vault) {\n            revert AeraPeriphery__OwnerIsVault();\n        }\n        // Effects: transfer ownership.\n        super.transferOwnership(newOwner);\n    }\n\n    /// INTERNAL FUNCTIONS ///\n\n    /// @inheritdoc Executor\n    function _checkOperations(Operation[] calldata operations)\n        internal\n        view\n        override\n        onlyOwner\n    {}\n\n    /// @inheritdoc Executor\n    function _checkOperation(Operation calldata operation)\n        internal\n        view\n        override\n    {}\n}\n"
      },
      "src/v2/dependencies/openzeppelin/Ownable2Step.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./Ownable.sol\";\n\n/**\n * @dev Contract module which provides access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership} and {acceptOwnership}.\n *\n * This module is used through inheritance. It will make available all functions\n * from parent (Ownable).\n */\nabstract contract Ownable2Step is Ownable {\n    address private _pendingOwner;\n\n    event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Returns the address of the pending owner.\n     */\n    function pendingOwner() public view virtual returns (address) {\n        return _pendingOwner;\n    }\n\n    /**\n     * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual override onlyOwner {\n        _pendingOwner = newOwner;\n        emit OwnershipTransferStarted(owner(), newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual override {\n        delete _pendingOwner;\n        super._transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev The new owner accepts the ownership transfer.\n     */\n    function acceptOwnership() public virtual {\n        address sender = _msgSender();\n        require(pendingOwner() == sender, \"Ownable2Step: caller is not the new owner\");\n        _transferOwnership(sender);\n    }\n}\n"
      },
      "src/v2/dependencies/openzeppelin/IERC20.sol": {
        "content": "// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\r\n\r\npragma solidity ^0.8.0;\r\n\r\n/**\r\n * @dev Interface of the ERC20 standard as defined in the EIP.\r\n */\r\ninterface IERC20 {\r\n    /**\r\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\r\n     * another (`to`).\r\n     *\r\n     * Note that `value` may be zero.\r\n     */\r\n    event Transfer(address indexed from, address indexed to, uint256 value);\r\n\r\n    /**\r\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\r\n     * a call to {approve}. `value` is the new allowance.\r\n     */\r\n    event Approval(address indexed owner, address indexed spender, uint256 value);\r\n\r\n    /**\r\n     * @dev Returns the amount of tokens in existence.\r\n     */\r\n    function totalSupply() external view returns (uint256);\r\n\r\n    /**\r\n     * @dev Returns the amount of tokens owned by `account`.\r\n     */\r\n    function balanceOf(address account) external view returns (uint256);\r\n\r\n    /**\r\n     * @dev Moves `amount` tokens from the caller's account to `to`.\r\n     *\r\n     * Returns a boolean value indicating whether the operation succeeded.\r\n     *\r\n     * Emits a {Transfer} event.\r\n     */\r\n    function transfer(address to, uint256 amount) external returns (bool);\r\n\r\n    /**\r\n     * @dev Returns the remaining number of tokens that `spender` will be\r\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\r\n     * zero by default.\r\n     *\r\n     * This value changes when {approve} or {transferFrom} are called.\r\n     */\r\n    function allowance(address owner, address spender) external view returns (uint256);\r\n\r\n    /**\r\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\r\n     *\r\n     * Returns a boolean value indicating whether the operation succeeded.\r\n     *\r\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\r\n     * that someone may use both the old and the new allowance by unfortunate\r\n     * transaction ordering. One possible solution to mitigate this race\r\n     * condition is to first reduce the spender's allowance to 0 and set the\r\n     * desired value afterwards:\r\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\r\n     *\r\n     * Emits an {Approval} event.\r\n     */\r\n    function approve(address spender, uint256 amount) external returns (bool);\r\n\r\n    /**\r\n     * @dev Moves `amount` tokens from `from` to `to` using the\r\n     * allowance mechanism. `amount` is then deducted from the caller's\r\n     * allowance.\r\n     *\r\n     * Returns a boolean value indicating whether the operation succeeded.\r\n     *\r\n     * Emits a {Transfer} event.\r\n     */\r\n    function transferFrom(address from, address to, uint256 amount) external returns (bool);\r\n}\r\n"
      },
      "src/v2/dependencies/openzeppelin/SafeERC20.sol": {
        "content": "// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol)\r\n\r\npragma solidity ^0.8.0;\r\n\r\nimport \"./IERC20.sol\";\r\nimport \"./IERC20Permit.sol\";\r\nimport \"./Address.sol\";\r\n\r\n/**\r\n * @title SafeERC20\r\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\r\n * contract returns false). Tokens that return no value (and instead revert or\r\n * throw on failure) are also supported, non-reverting calls are assumed to be\r\n * successful.\r\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\r\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\r\n */\r\nlibrary SafeERC20 {\r\n    using Address for address;\r\n\r\n    /**\r\n     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\r\n     * non-reverting calls are assumed to be successful.\r\n     */\r\n    function safeTransfer(IERC20 token, address to, uint256 value) internal {\r\n        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\r\n    }\r\n\r\n    /**\r\n     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\r\n     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\r\n     */\r\n    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\r\n        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\r\n    }\r\n\r\n    /**\r\n     * @dev Deprecated. This function has issues similar to the ones found in\r\n     * {IERC20-approve}, and its usage is discouraged.\r\n     *\r\n     * Whenever possible, use {safeIncreaseAllowance} and\r\n     * {safeDecreaseAllowance} instead.\r\n     */\r\n    function safeApprove(IERC20 token, address spender, uint256 value) internal {\r\n        // safeApprove should only be called when setting an initial allowance,\r\n        // or when resetting it to zero. To increase and decrease it, use\r\n        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\r\n        require(\r\n            (value == 0) || (token.allowance(address(this), spender) == 0),\r\n            \"SafeERC20: approve from non-zero to non-zero allowance\"\r\n        );\r\n        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\r\n    }\r\n\r\n    /**\r\n     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\r\n     * non-reverting calls are assumed to be successful.\r\n     */\r\n    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\r\n        uint256 oldAllowance = token.allowance(address(this), spender);\r\n        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\r\n    }\r\n\r\n    /**\r\n     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\r\n     * non-reverting calls are assumed to be successful.\r\n     */\r\n    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\r\n        unchecked {\r\n            uint256 oldAllowance = token.allowance(address(this), spender);\r\n            require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\r\n            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\r\n        }\r\n    }\r\n\r\n    /**\r\n     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\r\n     * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to\r\n     * 0 before setting it to a non-zero value.\r\n     */\r\n    function forceApprove(IERC20 token, address spender, uint256 value) internal {\r\n        bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\r\n\r\n        if (!_callOptionalReturnBool(token, approvalCall)) {\r\n            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\r\n            _callOptionalReturn(token, approvalCall);\r\n        }\r\n    }\r\n\r\n    /**\r\n     * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\r\n     * Revert on invalid signature.\r\n     */\r\n    function safePermit(\r\n        IERC20Permit token,\r\n        address owner,\r\n        address spender,\r\n        uint256 value,\r\n        uint256 deadline,\r\n        uint8 v,\r\n        bytes32 r,\r\n        bytes32 s\r\n    ) internal {\r\n        uint256 nonceBefore = token.nonces(owner);\r\n        token.permit(owner, spender, value, deadline, v, r, s);\r\n        uint256 nonceAfter = token.nonces(owner);\r\n        require(nonceAfter == nonceBefore + 1, \"SafeERC20: permit did not succeed\");\r\n    }\r\n\r\n    /**\r\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\r\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\r\n     * @param token The token targeted by the call.\r\n     * @param data The call data (encoded using abi.encode or one of its variants).\r\n     */\r\n    function _callOptionalReturn(IERC20 token, bytes memory data) private {\r\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\r\n        // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\r\n        // the target address contains contract code and also asserts for success in the low-level call.\r\n\r\n        bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\r\n        require(returndata.length == 0 || abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\r\n    }\r\n\r\n    /**\r\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\r\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\r\n     * @param token The token targeted by the call.\r\n     * @param data The call data (encoded using abi.encode or one of its variants).\r\n     *\r\n     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\r\n     */\r\n    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\r\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\r\n        // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\r\n        // and not revert is the subcall reverts.\r\n\r\n        (bool success, bytes memory returndata) = address(token).call(data);\r\n        return\r\n            success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\r\n    }\r\n}\r\n"
      },
      "periphery/dependencies/milkman/IMilkman.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.21;\n\nimport \"@openzeppelin/IERC20.sol\";\n\ninterface IMilkman {\n    function requestSwapExactTokensForTokens(\n        uint256 amountIn,\n        IERC20 fromToken,\n        IERC20 toToken,\n        address to,\n        address priceChecker,\n        bytes calldata priceCheckerData\n    ) external;\n\n    function cancelSwap(\n        uint256 amountIn,\n        IERC20 fromToken,\n        IERC20 toToken,\n        address to,\n        address priceChecker,\n        bytes calldata priceCheckerData\n    ) external;\n}\n"
      },
      "periphery/interfaces/IMilkmanRouter.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.21;\n\nimport \"@openzeppelin/IERC20.sol\";\nimport \"src/v2/Types.sol\";\nimport \"./IMilkmanRouterEvents.sol\";\n\ninterface IMilkmanRouter is IMilkmanRouterEvents {\n    /// @notice Initiate a Milkman swap. This contract is effectively a very direct wrapper.\n    ///         The reason for it to exist at all is that creating the order from the router allows us to claim back received tokens in a submit call thus increasing the daily multiplier value of the vault.\n    /// @param sellAmount The amount of tokens to sell.\n    /// @param sellToken Token to sell.\n    /// @param receiveToken Token to receive.\n    /// @param priceChecker The address of the price checker contract.\n    /// @param priceCheckerData The data to pass to the price checker contract.\n    /// @dev    MUST revert if not called by vault.\n    function requestSell(\n        uint256 sellAmount,\n        IERC20 sellToken,\n        IERC20 receiveToken,\n        address priceChecker,\n        bytes calldata priceCheckerData\n    ) external;\n\n    /// @notice Cancel a Milkman swap at a specific Milkman order contract clone. Returns funds to vault.\n    ///         Arguments must match the ones used in the `requestSell` call.\n    /// @param milkmanOrderContract The address of the Milkman order contract clone.\n    /// @param sellAmount The amount of tokens to sell.\n    /// @param sellToken Token to sell.\n    /// @param receiveToken Token to receive.\n    /// @param priceChecker The address of the price checker contract.\n    /// @param priceCheckerData The data to pass to the price checker contract.\n    /// @dev    MUST revert if not called by vault.\n    function cancelSell(\n        address milkmanOrderContract,\n        uint256 sellAmount,\n        IERC20 sellToken,\n        IERC20 receiveToken,\n        address priceChecker,\n        bytes calldata priceCheckerData\n    ) external;\n\n    /// @notice Claim tokens from a completed Milkman order.\n    /// @param token The token to claim.\n    /// @dev    MUST revert if not called by vault.\n    function claim(IERC20 token) external;\n}\n"
      },
      "periphery/Executor.sol": {
        "content": "// SPDX-License-Identifier: BUSL-1.1\n// slither-disable-start unimplemented-functions\npragma solidity 0.8.21;\n\nimport \"@openzeppelin/ReentrancyGuard.sol\";\nimport \"./interfaces/IExecutor.sol\";\nimport \"src/v2/Types.sol\";\n\nabstract contract Executor is IExecutor, ReentrancyGuard {\n    /// FUNCTIONS ///\n\n    /// @inheritdoc IExecutor\n    function execute(Operation[] calldata operations) external nonReentrant {\n        // Requirements: check operations to be executed.\n        _checkOperations(operations);\n\n        uint256 numOperations = operations.length;\n\n        // Requirements: check that the number of operations is not zero.\n        if (numOperations == 0) return;\n\n        for (uint256 i = 0; i < numOperations;) {\n            // Effects: execute operation.\n            _executeOperation(operations[i]);\n            unchecked {\n                i++;\n            } // gas savings\n        }\n    }\n\n    /// INTERNAL FUNCTIONS ///\n\n    /// @dev Execute a single operation.\n    function _executeOperation(Operation calldata operation)\n        internal\n        virtual\n    {\n        // Requirements: check the operation.\n        _checkOperation(operation);\n\n        // Interactions: execute operation.\n        // slither-disable-next-line calls-loop,arbitrary-send-eth\n        (bool success, bytes memory result) =\n            operation.target.call{value: operation.value}(operation.data);\n\n        // Invariants: check that the operation was successful.\n        // Note: if operation.target is EOA, success will always be true.\n        // It is caller responsibility to check that the operation.target is a contract.\n        if (!success) {\n            revert AeraPeriphery__ExecutionFailed(result);\n        }\n\n        // Log that the operation was executed.\n        emit Executed(msg.sender, operation);\n    }\n\n    /// @dev Authorize the execution of operations. Intended to be marked by\n    ///      `onlyOwner` or similar access control modifier.\n    function _checkOperations(Operation[] calldata operations)\n        internal\n        view\n        virtual;\n\n    /// @dev Authorize the execution of a single operation.\n    function _checkOperation(Operation calldata operation)\n        internal\n        view\n        virtual;\n}\n// slither-disable-end unimplemented-functions\n"
      },
      "src/v2/Types.sol": {
        "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity 0.8.21;\n\nimport \"@openzeppelin/IERC20.sol\";\nimport \"./interfaces/IAssetRegistry.sol\";\n\n// Types.sol\n//\n// This file defines the types used in V2.\n\n/// @notice Combination of contract address and sighash to be used in allowlist.\n/// @dev It's packed as follows:\n///      [target 160 bits] [selector 32 bits] [<empty> 64 bits]\ntype TargetSighash is bytes32;\n\n/// @notice Struct encapulating an asset and an associated value.\n/// @param asset Asset address.\n/// @param value The associated value for this asset (e.g., amount or price).\nstruct AssetValue {\n    IERC20 asset;\n    uint256 value;\n}\n\n/// @notice Execution details for a vault operation.\n/// @param target Target contract address.\n/// @param value Native token amount.\n/// @param data Calldata.\nstruct Operation {\n    address target;\n    uint256 value;\n    bytes data;\n}\n\n/// @notice Contract address and sighash struct to be used in the public interface.\nstruct TargetSighashData {\n    address target;\n    bytes4 selector;\n}\n\n/// @notice Parameters for vault deployment.\n/// @param owner Initial owner address.\n/// @param assetRegistry Asset registry address.\n/// @param hooks Hooks address.\n/// @param guardian Guardian address.\n/// @param feeRecipient Fee recipient address.\n/// @param fee Fees accrued per second, denoted in 18 decimal fixed point format.\nstruct Parameters {\n    address owner;\n    address assetRegistry;\n    address hooks;\n    address guardian;\n    address feeRecipient;\n    uint256 fee;\n}\n\n/// @notice Vault parameters for vault deployment.\n/// @param owner Initial owner address.\n/// @param guardian Guardian address.\n/// @param feeRecipient Fee recipient address.\n/// @param fee Fees accrued per second, denoted in 18 decimal fixed point format.\nstruct VaultParameters {\n    address owner;\n    address guardian;\n    address feeRecipient;\n    uint256 fee;\n}\n\n/// @notice Asset registry parameters for asset registry deployment.\n/// @param factory Asset registry factory address.\n/// @param owner Initial owner address.\n/// @param assets Initial list of registered assets.\n/// @param numeraireToken Numeraire token address.\n/// @param feeToken Fee token address.\n/// @param sequencer Sequencer Uptime Feed address for L2.\nstruct AssetRegistryParameters {\n    address factory;\n    address owner;\n    IAssetRegistry.AssetInformation[] assets;\n    IERC20 numeraireToken;\n    IERC20 feeToken;\n    AggregatorV2V3Interface sequencer;\n}\n\n/// @notice Hooks parameters for hooks deployment.\n/// @param factory Hooks factory address.\n/// @param owner Initial owner address.\n/// @param minDailyValue The fraction of value that the vault has to retain per day\n///                      in the course of submissions.\n/// @param targetSighashAllowlist Array of target contract and sighash combinations to allow.\nstruct HooksParameters {\n    address factory;\n    address owner;\n    uint256 minDailyValue;\n    TargetSighashData[] targetSighashAllowlist;\n}\n"
      },
      "src/v2/dependencies/openzeppelin/Ownable.sol": {
        "content": "// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\r\n\r\npragma solidity ^0.8.0;\r\n\r\nimport \"./Context.sol\";\r\n\r\n/**\r\n * @dev Contract module which provides a basic access control mechanism, where\r\n * there is an account (an owner) that can be granted exclusive access to\r\n * specific functions.\r\n *\r\n * By default, the owner account will be the one that deploys the contract. This\r\n * can later be changed with {transferOwnership}.\r\n *\r\n * This module is used through inheritance. It will make available the modifier\r\n * `onlyOwner`, which can be applied to your functions to restrict their use to\r\n * the owner.\r\n */\r\nabstract contract Ownable is Context {\r\n    address private _owner;\r\n\r\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\r\n\r\n    /**\r\n     * @dev Initializes the contract setting the deployer as the initial owner.\r\n     */\r\n    constructor() {\r\n        _transferOwnership(_msgSender());\r\n    }\r\n\r\n    /**\r\n     * @dev Throws if called by any account other than the owner.\r\n     */\r\n    modifier onlyOwner() {\r\n        _checkOwner();\r\n        _;\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the address of the current owner.\r\n     */\r\n    function owner() public view virtual returns (address) {\r\n        return _owner;\r\n    }\r\n\r\n    /**\r\n     * @dev Throws if the sender is not the owner.\r\n     */\r\n    function _checkOwner() internal view virtual {\r\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\r\n    }\r\n\r\n    /**\r\n     * @dev Leaves the contract without owner. It will not be possible to call\r\n     * `onlyOwner` functions. Can only be called by the current owner.\r\n     *\r\n     * NOTE: Renouncing ownership will leave the contract without an owner,\r\n     * thereby disabling any functionality that is only available to the owner.\r\n     */\r\n    function renounceOwnership() public virtual onlyOwner {\r\n        _transferOwnership(address(0));\r\n    }\r\n\r\n    /**\r\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\r\n     * Can only be called by the current owner.\r\n     */\r\n    function transferOwnership(address newOwner) public virtual onlyOwner {\r\n        require(newOwner != address(0), \"Ownable: new owner is the zero address\");\r\n        _transferOwnership(newOwner);\r\n    }\r\n\r\n    /**\r\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\r\n     * Internal function without access restriction.\r\n     */\r\n    function _transferOwnership(address newOwner) internal virtual {\r\n        address oldOwner = _owner;\r\n        _owner = newOwner;\r\n        emit OwnershipTransferred(oldOwner, newOwner);\r\n    }\r\n}\r\n"
      },
      "src/v2/dependencies/openzeppelin/IERC20Permit.sol": {
        "content": "// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)\r\n\r\npragma solidity ^0.8.0;\r\n\r\n/**\r\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\r\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\r\n *\r\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\r\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\r\n * need to send a transaction, and thus is not required to hold Ether at all.\r\n */\r\ninterface IERC20Permit {\r\n    /**\r\n     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\r\n     * given ``owner``'s signed approval.\r\n     *\r\n     * IMPORTANT: The same issues {IERC20-approve} has related to transaction\r\n     * ordering also apply here.\r\n     *\r\n     * Emits an {Approval} event.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - `spender` cannot be the zero address.\r\n     * - `deadline` must be a timestamp in the future.\r\n     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\r\n     * over the EIP712-formatted function arguments.\r\n     * - the signature must use ``owner``'s current nonce (see {nonces}).\r\n     *\r\n     * For more information on the signature format, see the\r\n     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\r\n     * section].\r\n     */\r\n    function permit(\r\n        address owner,\r\n        address spender,\r\n        uint256 value,\r\n        uint256 deadline,\r\n        uint8 v,\r\n        bytes32 r,\r\n        bytes32 s\r\n    ) external;\r\n\r\n    /**\r\n     * @dev Returns the current nonce for `owner`. This value must be\r\n     * included whenever a signature is generated for {permit}.\r\n     *\r\n     * Every successful call to {permit} increases ``owner``'s nonce by one. This\r\n     * prevents a signature from being used multiple times.\r\n     */\r\n    function nonces(address owner) external view returns (uint256);\r\n\r\n    /**\r\n     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\r\n     */\r\n    // solhint-disable-next-line func-name-mixedcase\r\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\r\n}\r\n"
      },
      "src/v2/dependencies/openzeppelin/Address.sol": {
        "content": "// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\r\n\r\npragma solidity ^0.8.1;\r\n\r\n/**\r\n * @dev Collection of functions related to the address type\r\n */\r\nlibrary Address {\r\n    /**\r\n     * @dev Returns true if `account` is a contract.\r\n     *\r\n     * [IMPORTANT]\r\n     * ====\r\n     * It is unsafe to assume that an address for which this function returns\r\n     * false is an externally-owned account (EOA) and not a contract.\r\n     *\r\n     * Among others, `isContract` will return false for the following\r\n     * types of addresses:\r\n     *\r\n     *  - an externally-owned account\r\n     *  - a contract in construction\r\n     *  - an address where a contract will be created\r\n     *  - an address where a contract lived, but was destroyed\r\n     *\r\n     * Furthermore, `isContract` will also return true if the target contract within\r\n     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\r\n     * which only has an effect at the end of a transaction.\r\n     * ====\r\n     *\r\n     * [IMPORTANT]\r\n     * ====\r\n     * You shouldn't rely on `isContract` to protect against flash loan attacks!\r\n     *\r\n     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\r\n     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\r\n     * constructor.\r\n     * ====\r\n     */\r\n    function isContract(address account) internal view returns (bool) {\r\n        // This method relies on extcodesize/address.code.length, which returns 0\r\n        // for contracts in construction, since the code is only stored at the end\r\n        // of the constructor execution.\r\n\r\n        return account.code.length > 0;\r\n    }\r\n\r\n    /**\r\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\r\n     * `recipient`, forwarding all available gas and reverting on errors.\r\n     *\r\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\r\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\r\n     * imposed by `transfer`, making them unable to receive funds via\r\n     * `transfer`. {sendValue} removes this limitation.\r\n     *\r\n     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\r\n     *\r\n     * IMPORTANT: because control is transferred to `recipient`, care must be\r\n     * taken to not create reentrancy vulnerabilities. Consider using\r\n     * {ReentrancyGuard} or the\r\n     * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\r\n     */\r\n    function sendValue(address payable recipient, uint256 amount) internal {\r\n        require(address(this).balance >= amount, \"Address: insufficient balance\");\r\n\r\n        (bool success, ) = recipient.call{value: amount}(\"\");\r\n        require(success, \"Address: unable to send value, recipient may have reverted\");\r\n    }\r\n\r\n    /**\r\n     * @dev Performs a Solidity function call using a low level `call`. A\r\n     * plain `call` is an unsafe replacement for a function call: use this\r\n     * function instead.\r\n     *\r\n     * If `target` reverts with a revert reason, it is bubbled up by this\r\n     * function (like regular Solidity function calls).\r\n     *\r\n     * Returns the raw returned data. To convert to the expected return value,\r\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - `target` must be a contract.\r\n     * - calling `target` with `data` must not revert.\r\n     *\r\n     * _Available since v3.1._\r\n     */\r\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\r\n        return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\r\n    }\r\n\r\n    /**\r\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\r\n     * `errorMessage` as a fallback revert reason when `target` reverts.\r\n     *\r\n     * _Available since v3.1._\r\n     */\r\n    function functionCall(\r\n        address target,\r\n        bytes memory data,\r\n        string memory errorMessage\r\n    ) internal returns (bytes memory) {\r\n        return functionCallWithValue(target, data, 0, errorMessage);\r\n    }\r\n\r\n    /**\r\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\r\n     * but also transferring `value` wei to `target`.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - the calling contract must have an ETH balance of at least `value`.\r\n     * - the called Solidity function must be `payable`.\r\n     *\r\n     * _Available since v3.1._\r\n     */\r\n    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\r\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\r\n    }\r\n\r\n    /**\r\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\r\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\r\n     *\r\n     * _Available since v3.1._\r\n     */\r\n    function functionCallWithValue(\r\n        address target,\r\n        bytes memory data,\r\n        uint256 value,\r\n        string memory errorMessage\r\n    ) internal returns (bytes memory) {\r\n        require(address(this).balance >= value, \"Address: insufficient balance for call\");\r\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\r\n        return verifyCallResultFromTarget(target, success, returndata, errorMessage);\r\n    }\r\n\r\n    /**\r\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\r\n     * but performing a static call.\r\n     *\r\n     * _Available since v3.3._\r\n     */\r\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\r\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\r\n    }\r\n\r\n    /**\r\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\r\n     * but performing a static call.\r\n     *\r\n     * _Available since v3.3._\r\n     */\r\n    function functionStaticCall(\r\n        address target,\r\n        bytes memory data,\r\n        string memory errorMessage\r\n    ) internal view returns (bytes memory) {\r\n        (bool success, bytes memory returndata) = target.staticcall(data);\r\n        return verifyCallResultFromTarget(target, success, returndata, errorMessage);\r\n    }\r\n\r\n    /**\r\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\r\n     * but performing a delegate call.\r\n     *\r\n     * _Available since v3.4._\r\n     */\r\n    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\r\n        return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\r\n    }\r\n\r\n    /**\r\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\r\n     * but performing a delegate call.\r\n     *\r\n     * _Available since v3.4._\r\n     */\r\n    function functionDelegateCall(\r\n        address target,\r\n        bytes memory data,\r\n        string memory errorMessage\r\n    ) internal returns (bytes memory) {\r\n        (bool success, bytes memory returndata) = target.delegatecall(data);\r\n        return verifyCallResultFromTarget(target, success, returndata, errorMessage);\r\n    }\r\n\r\n    /**\r\n     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\r\n     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\r\n     *\r\n     * _Available since v4.8._\r\n     */\r\n    function verifyCallResultFromTarget(\r\n        address target,\r\n        bool success,\r\n        bytes memory returndata,\r\n        string memory errorMessage\r\n    ) internal view returns (bytes memory) {\r\n        if (success) {\r\n            if (returndata.length == 0) {\r\n                // only check isContract if the call was successful and the return data is empty\r\n                // otherwise we already know that it was a contract\r\n                require(isContract(target), \"Address: call to non-contract\");\r\n            }\r\n            return returndata;\r\n        } else {\r\n            _revert(returndata, errorMessage);\r\n        }\r\n    }\r\n\r\n    /**\r\n     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\r\n     * revert reason or using the provided one.\r\n     *\r\n     * _Available since v4.3._\r\n     */\r\n    function verifyCallResult(\r\n        bool success,\r\n        bytes memory returndata,\r\n        string memory errorMessage\r\n    ) internal pure returns (bytes memory) {\r\n        if (success) {\r\n            return returndata;\r\n        } else {\r\n            _revert(returndata, errorMessage);\r\n        }\r\n    }\r\n\r\n    function _revert(bytes memory returndata, string memory errorMessage) private pure {\r\n        // Look for revert reason and bubble it up if present\r\n        if (returndata.length > 0) {\r\n            // The easiest way to bubble the revert reason is using memory via assembly\r\n            /// @solidity memory-safe-assembly\r\n            assembly {\r\n                let returndata_size := mload(returndata)\r\n                revert(add(32, returndata), returndata_size)\r\n            }\r\n        } else {\r\n            revert(errorMessage);\r\n        }\r\n    }\r\n}\r\n"
      },
      "periphery/interfaces/IMilkmanRouterEvents.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.21;\n\nimport \"@openzeppelin/IERC20.sol\";\nimport \"src/v2/Types.sol\";\n\ninterface IMilkmanRouterEvents {\n    /// @notice Emitted when a sell is requested.\n    event SellRequested(\n        uint256 sellAmount,\n        IERC20 indexed sellToken,\n        IERC20 indexed receiveToken,\n        address priceChecker,\n        bytes priceCheckerData\n    );\n\n    /// @notice Emitted when a sell is cancelled.\n    event SellCancelled(\n        address indexed milkmanOrderContract,\n        uint256 sellAmount,\n        IERC20 indexed sellToken,\n        IERC20 indexed receiveToken,\n        address priceChecker,\n        bytes priceCheckerData\n    );\n\n    /// @notice Emitted when tokens are claimed.\n    event Claimed(IERC20 indexed token, uint256 amount);\n}\n"
      },
      "src/v2/dependencies/openzeppelin/ReentrancyGuard.sol": {
        "content": "// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\r\n\r\npragma solidity ^0.8.0;\r\n\r\n/**\r\n * @dev Contract module that helps prevent reentrant calls to a function.\r\n *\r\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\r\n * available, which can be applied to functions to make sure there are no nested\r\n * (reentrant) calls to them.\r\n *\r\n * Note that because there is a single `nonReentrant` guard, functions marked as\r\n * `nonReentrant` may not call one another. This can be worked around by making\r\n * those functions `private`, and then adding `external` `nonReentrant` entry\r\n * points to them.\r\n *\r\n * TIP: If you would like to learn more about reentrancy and alternative ways\r\n * to protect against it, check out our blog post\r\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\r\n */\r\nabstract contract ReentrancyGuard {\r\n    // Booleans are more expensive than uint256 or any type that takes up a full\r\n    // word because each write operation emits an extra SLOAD to first read the\r\n    // slot's contents, replace the bits taken up by the boolean, and then write\r\n    // back. This is the compiler's defense against contract upgrades and\r\n    // pointer aliasing, and it cannot be disabled.\r\n\r\n    // The values being non-zero value makes deployment a bit more expensive,\r\n    // but in exchange the refund on every call to nonReentrant will be lower in\r\n    // amount. Since refunds are capped to a percentage of the total\r\n    // transaction's gas, it is best to keep them low in cases like this one, to\r\n    // increase the likelihood of the full refund coming into effect.\r\n    uint256 private constant _NOT_ENTERED = 1;\r\n    uint256 private constant _ENTERED = 2;\r\n\r\n    uint256 private _status;\r\n\r\n    constructor() {\r\n        _status = _NOT_ENTERED;\r\n    }\r\n\r\n    /**\r\n     * @dev Prevents a contract from calling itself, directly or indirectly.\r\n     * Calling a `nonReentrant` function from another `nonReentrant`\r\n     * function is not supported. It is possible to prevent this from happening\r\n     * by making the `nonReentrant` function external, and making it call a\r\n     * `private` function that does the actual work.\r\n     */\r\n    modifier nonReentrant() {\r\n        _nonReentrantBefore();\r\n        _;\r\n        _nonReentrantAfter();\r\n    }\r\n\r\n    function _nonReentrantBefore() private {\r\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\r\n        require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\r\n\r\n        // Any calls to nonReentrant after this point will fail\r\n        _status = _ENTERED;\r\n    }\r\n\r\n    function _nonReentrantAfter() private {\r\n        // By storing the original value once again, a refund is triggered (see\r\n        // https://eips.ethereum.org/EIPS/eip-2200)\r\n        _status = _NOT_ENTERED;\r\n    }\r\n\r\n    /**\r\n     * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\r\n     * `nonReentrant` function in the call stack.\r\n     */\r\n    function _reentrancyGuardEntered() internal view returns (bool) {\r\n        return _status == _ENTERED;\r\n    }\r\n}\r\n"
      },
      "periphery/interfaces/IExecutor.sol": {
        "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity 0.8.21;\n\nimport {Operation} from \"src/v2/Types.sol\";\n\ninterface IExecutor {\n    /// EVENTS ///\n\n    /// @notice Emitted when operations are executed.\n    event Executed(address indexed caller, Operation operation);\n\n    /// ERRORS ///\n\n    /// @notice Error emitted when the execution of an operation fails.\n    error AeraPeriphery__ExecutionFailed(bytes result);\n\n    /// FUNCTIONS ///\n\n    /// @notice Execute arbitrary actions.\n    /// @param operations The operations to execute.\n    function execute(Operation[] calldata operations) external;\n}\n"
      },
      "src/v2/interfaces/IAssetRegistry.sol": {
        "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity 0.8.21;\n\nimport \"@chainlink/interfaces/AggregatorV2V3Interface.sol\";\nimport \"@openzeppelin/IERC20.sol\";\n\n/// @title IAssetRegistry\n/// @notice Asset registry interface.\n/// @dev Any implementation MUST also implement Ownable2Step and ERC165.\ninterface IAssetRegistry {\n    /// @param asset Asset address.\n    /// @param heartbeat Frequency of oracle price updates.\n    /// @param isERC4626 True if yield-bearing asset, false if just an ERC20 asset.\n    /// @param oracle If applicable, oracle address for asset.\n    struct AssetInformation {\n        IERC20 asset;\n        uint256 heartbeat;\n        bool isERC4626;\n        AggregatorV2V3Interface oracle;\n    }\n\n    /// @param asset Asset address.\n    /// @param spotPrice Spot price of an asset in Numeraire token terms.\n    struct AssetPriceReading {\n        IERC20 asset;\n        uint256 spotPrice;\n    }\n\n    /// @notice Get address of vault.\n    /// @return vault Address of vault.\n    function vault() external view returns (address vault);\n\n    /// @notice Get a list of all registered assets.\n    /// @return assets List of assets.\n    /// @dev MUST return assets in an order sorted by address.\n    function assets()\n        external\n        view\n        returns (AssetInformation[] memory assets);\n\n    /// @notice Get address of fee token.\n    /// @return feeToken Address of fee token.\n    /// @dev Represented as an address for efficiency reasons.\n    /// @dev MUST be present in assets array.\n    function feeToken() external view returns (IERC20 feeToken);\n\n    /// @notice Get the index of the Numeraire token in the assets array.\n    /// @return numeraireToken Numeraire token address.\n    /// @dev Represented as an index for efficiency reasons.\n    /// @dev MUST be a number between 0 (inclusive) and the length of assets array (exclusive).\n    function numeraireToken() external view returns (IERC20 numeraireToken);\n\n    /// @notice Calculate spot prices of non-ERC4626 assets.\n    /// @return spotPrices Spot prices of non-ERC4626 assets in 18 decimals.\n    /// @dev MUST return assets in the same order as in assets but with ERC4626 assets filtered out.\n    /// @dev MUST also include Numeraire token (spot price = 1).\n    /// @dev MAY revert if oracle prices for any asset are unreliable at the time.\n    function spotPrices()\n        external\n        view\n        returns (AssetPriceReading[] memory spotPrices);\n}\n"
      },
      "src/v2/dependencies/openzeppelin/Context.sol": {
        "content": "// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\r\n\r\npragma solidity ^0.8.0;\r\n\r\n/**\r\n * @dev Provides information about the current execution context, including the\r\n * sender of the transaction and its data. While these are generally available\r\n * via msg.sender and msg.data, they should not be accessed in such a direct\r\n * manner, since when dealing with meta-transactions the account sending and\r\n * paying for execution may not be the actual sender (as far as an application\r\n * is concerned).\r\n *\r\n * This contract is only required for intermediate, library-like contracts.\r\n */\r\nabstract contract Context {\r\n    function _msgSender() internal view virtual returns (address) {\r\n        return msg.sender;\r\n    }\r\n\r\n    function _msgData() internal view virtual returns (bytes calldata) {\r\n        return msg.data;\r\n    }\r\n}\r\n"
      },
      "src/v2/dependencies/chainlink/interfaces/AggregatorV2V3Interface.sol": {
        "content": "// SPDX-License-Identifier: MIT\r\npragma solidity ^0.8.0;\r\n\r\nimport \"./AggregatorInterface.sol\";\r\nimport \"./AggregatorV3Interface.sol\";\r\n\r\ninterface AggregatorV2V3Interface is AggregatorInterface, AggregatorV3Interface {}"
      },
      "src/v2/dependencies/chainlink/interfaces/AggregatorInterface.sol": {
        "content": "// SPDX-License-Identifier: MIT\r\npragma solidity ^0.8.0;\r\n\r\ninterface AggregatorInterface {\r\n  function latestAnswer() external view returns (int256);\r\n\r\n  function latestTimestamp() external view returns (uint256);\r\n\r\n  function latestRound() external view returns (uint256);\r\n\r\n  function getAnswer(uint256 roundId) external view returns (int256);\r\n\r\n  function getTimestamp(uint256 roundId) external view returns (uint256);\r\n\r\n  event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 updatedAt);\r\n\r\n  event NewRound(uint256 indexed roundId, address indexed startedBy, uint256 startedAt);\r\n}"
      },
      "src/v2/dependencies/chainlink/interfaces/AggregatorV3Interface.sol": {
        "content": "// SPDX-License-Identifier: MIT\r\npragma solidity ^0.8.0;\r\n\r\ninterface AggregatorV3Interface {\r\n  function decimals() external view returns (uint8);\r\n\r\n  function description() external view returns (string memory);\r\n\r\n  function version() external view returns (uint256);\r\n\r\n  // getRoundData and latestRoundData should both raise \"No data present\"\r\n  // if they do not have data to report, instead of returning unset values\r\n  // which could be misinterpreted as actual reported values.\r\n  function getRoundData(uint80 _roundId)\r\n    external\r\n    view\r\n    returns (\r\n      uint80 roundId,\r\n      int256 answer,\r\n      uint256 startedAt,\r\n      uint256 updatedAt,\r\n      uint80 answeredInRound\r\n    );\r\n\r\n  function latestRoundData()\r\n    external\r\n    view\r\n    returns (\r\n      uint80 roundId,\r\n      int256 answer,\r\n      uint256 startedAt,\r\n      uint256 updatedAt,\r\n      uint80 answeredInRound\r\n    );\r\n}"
      }
    },
    "settings": {
      "remappings": [
        "src/=src/",
        "test/=test/",
        "@chainlink/=src/v2/dependencies/chainlink/",
        "@openzeppelin/=src/v2/dependencies/openzeppelin/",
        "@uniswap/v3-periphery/=lib/v3-periphery/",
        "@uniswap/v3-core/=lib/v3-core/",
        "ds-test/=lib/forge-std/lib/ds-test/src/",
        "forge-std/=lib/forge-std/src/",
        "v3-core/=lib/v3-core/contracts/",
        "v3-periphery/=lib/v3-periphery/contracts/"
      ],
      "optimizer": {
        "enabled": true,
        "runs": 1000
      },
      "metadata": {
        "useLiteralContent": false,
        "bytecodeHash": "ipfs",
        "appendCBOR": true
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "evmVersion": "shanghai",
      "viaIR": true,
      "libraries": {}
    }
  }}