{"constructor_args":"0x000000000000000000000000fc580f2a77e85f1f47b60f096d36fdc97ce2d827","is_partially_verified":true,"is_changed_bytecode":false,"abi":[{"inputs":[{"internalType":"address","name":"initialOwner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"CannotAddFunctionToDiamondThatAlreadyExists","type":"error"},{"inputs":[{"internalType":"bytes4[]","name":"selectors","type":"bytes4[]"}],"name":"CannotAddSelectorsToZeroAddress","type":"error"},{"inputs":[{"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"CannotRemoveFunctionThatDoesNotExist","type":"error"},{"inputs":[{"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"CannotRemoveImmutableFunction","type":"error"},{"inputs":[{"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"CannotReplaceFunctionThatDoesNotExists","type":"error"},{"inputs":[{"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet","type":"error"},{"inputs":[{"internalType":"bytes4[]","name":"selectors","type":"bytes4[]"}],"name":"CannotReplaceFunctionsFromFacetWithZeroAddress","type":"error"},{"inputs":[{"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"CannotReplaceImmutableFunction","type":"error"},{"inputs":[],"name":"CannotUseDiamondAsFacet","type":"error"},{"inputs":[{"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"FunctionNotFound","type":"error"},{"inputs":[{"internalType":"uint8","name":"action","type":"uint8"}],"name":"IncorrectFacetCutAction","type":"error"},{"inputs":[{"internalType":"address","name":"initializationContractAddress","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"InitializationFunctionReverted","type":"error"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"string","name":"message","type":"string"}],"name":"NoBytecodeAtAddress","type":"error"},{"inputs":[{"internalType":"address","name":"facetAddress","type":"address"}],"name":"NoSelectorsProvidedForFacetForCut","type":"error"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"contractOwner","type":"address"}],"name":"NotContractOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"NotPendingOwner","type":"error"},{"inputs":[{"internalType":"address","name":"facetAddress","type":"address"}],"name":"RemoveFacetAddressMustBeZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"components":[{"internalType":"address","name":"facetAddress","type":"address"},{"internalType":"enum IDiamond.FacetCutAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"functionSelectors","type":"bytes4[]"}],"indexed":false,"internalType":"struct IDiamond.FacetCut[]","name":"_diamondCut","type":"tuple[]"},{"indexed":false,"internalType":"address","name":"_init","type":"address"},{"indexed":false,"internalType":"bytes","name":"_calldata","type":"bytes"}],"name":"DiamondCut","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"facetAddress","type":"address"},{"internalType":"enum IDiamond.FacetCutAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"functionSelectors","type":"bytes4[]"}],"internalType":"struct IDiamond.FacetCut[]","name":"cuts","type":"tuple[]"},{"internalType":"address","name":"init","type":"address"},{"internalType":"bytes","name":"initData","type":"bytes"}],"name":"diamondCut","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"functionSelector","type":"bytes4"}],"name":"facetAddress","outputs":[{"internalType":"address","name":"facetAddress_","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"facetAddresses","outputs":[{"internalType":"address[]","name":"facetAddresses_","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"facet","type":"address"}],"name":"facetFunctionSelectors","outputs":[{"internalType":"bytes4[]","name":"facetFunctionSelectors_","type":"bytes4[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"facets","outputs":[{"components":[{"internalType":"address","name":"facetAddress","type":"address"},{"internalType":"bytes4[]","name":"functionSelectors","type":"bytes4[]"}],"internalType":"struct IDiamondLoupe.Facet[]","name":"facets_","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}],"conflicting_implementations":null,"certified":false,"additional_sources":[{"file_path":"dependencies/openzeppelin-contracts-5.0.1/contracts/utils/introspection/IERC165.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\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":"src/interfaces/IDiamond.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity 0.8.33;\n\n/******************************************************************************\\\n* Author: Nick Mudge <nick@perfectabstractions.com> (https://twitter.com/mudgen)\n* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535\n*\n* Adapted from diamond-1-hardhat (https://github.com/mudgen/diamond-1-hardhat), MIT.\n/******************************************************************************/\n\ninterface IDiamond {\n    enum FacetCutAction {\n        Add,\n        Replace,\n        Remove\n    }\n\n    struct FacetCut {\n        address facetAddress;\n        FacetCutAction action;\n        bytes4[] functionSelectors;\n    }\n\n    event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\n}\n"},{"file_path":"src/interfaces/IDiamondCut.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity 0.8.33;\n\n/******************************************************************************\\\n* Author: Nick Mudge <nick@perfectabstractions.com> (https://twitter.com/mudgen)\n* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535\n*\n* Adapted from diamond-1-hardhat (https://github.com/mudgen/diamond-1-hardhat), MIT.\n/******************************************************************************/\n\nimport {IDiamond} from \"./IDiamond.sol\";\n\ninterface IDiamondCut is IDiamond {\n    /// @notice Adds, replaces or removes functions, then optionally runs an initialization.\n    /// @param cuts The facet addresses, actions and function selectors.\n    /// @param init The contract to delegatecall with `initData`; zero skips the initialization.\n    /// @param initData The calldata of the initialization, usually a function call with its arguments.\n    function diamondCut(FacetCut[] calldata cuts, address init, bytes calldata initData) external;\n}\n"},{"file_path":"src/interfaces/IDiamondLoupe.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity 0.8.33;\n\n/******************************************************************************\\\n* Author: Nick Mudge <nick@perfectabstractions.com> (https://twitter.com/mudgen)\n* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535\n*\n* Adapted from diamond-1-hardhat (https://github.com/mudgen/diamond-1-hardhat), MIT.\n/******************************************************************************/\n\n/// @notice The loupe: which functions a diamond has and which facet runs each.\ninterface IDiamondLoupe {\n    struct Facet {\n        address facetAddress;\n        bytes4[] functionSelectors;\n    }\n\n    /// @notice Every facet address with its function selectors.\n    function facets() external view returns (Facet[] memory facets_);\n\n    /// @notice The function selectors a facet runs.\n    function facetFunctionSelectors(address facet) external view returns (bytes4[] memory facetFunctionSelectors_);\n\n    /// @notice Every facet address.\n    function facetAddresses() external view returns (address[] memory facetAddresses_);\n\n    /// @notice The facet that runs a function; zero when the diamond has no such function.\n    function facetAddress(bytes4 functionSelector) external view returns (address facetAddress_);\n}\n"},{"file_path":"src/interfaces/IERC173.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity 0.8.33;\n\n/// @title ERC-173 Contract Ownership Standard\n/// @dev The ERC-165 identifier of this interface is 0x7f5828d0.\ninterface IERC173 {\n    /// @dev Emitted when ownership of a contract changes.\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /// @notice The address of the owner.\n    function owner() external view returns (address owner_);\n\n    /// @notice Sets the address of the new owner of the contract.\n    function transferOwnership(address newOwner) external;\n}\n"},{"file_path":"src/libraries/LibDiamond.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity 0.8.33;\n\n/******************************************************************************\\\n* Author: Nick Mudge <nick@perfectabstractions.com> (https://twitter.com/mudgen)\n* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535\n*\n* Adapted from diamond-1-hardhat (https://github.com/mudgen/diamond-1-hardhat), MIT:\n* storage in an ERC-7201 namespace, a two-step owner, and functions defined in the\n* diamond itself that no cut can replace or remove.\n/******************************************************************************/\n\nimport {IDiamond} from \"../interfaces/IDiamond.sol\";\n\nerror NoSelectorsProvidedForFacetForCut(address facetAddress);\nerror NotContractOwner(address user, address contractOwner);\nerror CannotAddSelectorsToZeroAddress(bytes4[] selectors);\nerror CannotUseDiamondAsFacet();\nerror NoBytecodeAtAddress(address contractAddress, string message);\nerror IncorrectFacetCutAction(uint8 action);\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 selector);\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] selectors);\nerror CannotReplaceImmutableFunction(bytes4 selector);\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 selector);\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 selector);\nerror RemoveFacetAddressMustBeZeroAddress(address facetAddress);\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 selector);\nerror CannotRemoveImmutableFunction(bytes4 selector);\nerror InitializationFunctionReverted(address initializationContractAddress, bytes data);\n\n/// @notice The diamond's routing table, supported interfaces and owner, and the cut logic that edits the table.\n/// @dev Functions defined in the diamond itself are registered with the diamond's own address as their facet. They\n/// are immutable: a cut can neither replace nor remove them, nor register anything else under that address.\nlibrary LibDiamond {\n    /// @dev keccak256(abi.encode(uint256(keccak256(\"steakhouse.operator.diamond\")) - 1)) & ~bytes32(uint256(0xff))\n    bytes32 internal constant STORAGE_LOCATION = 0x097ce880f191a93320e3ba1d622d145a06ed1c4076820e39fd18e2d78a6aea00;\n\n    struct FacetAddressAndSelectorPosition {\n        address facetAddress;\n        uint16 selectorPosition;\n    }\n\n    /// @custom:storage-location erc7201:steakhouse.operator.diamond\n    struct DiamondStorage {\n        /// @dev Function selector => the facet that runs it and the selector's position in `selectors`.\n        mapping(bytes4 => FacetAddressAndSelectorPosition) facetAddressAndSelectorPosition;\n        bytes4[] selectors;\n        mapping(bytes4 => bool) supportedInterfaces;\n        address contractOwner;\n        address pendingOwner;\n    }\n\n    function diamondStorage() internal pure returns (DiamondStorage storage ds) {\n        bytes32 position = STORAGE_LOCATION;\n        assembly {\n            ds.slot := position\n        }\n    }\n\n    function contractOwner() internal view returns (address) {\n        return diamondStorage().contractOwner;\n    }\n\n    function enforceIsContractOwner() internal view {\n        address owner = diamondStorage().contractOwner;\n        if (msg.sender != owner) revert NotContractOwner(msg.sender, owner);\n    }\n\n    function diamondCut(IDiamond.FacetCut[] memory cuts, address init, bytes memory initData) internal {\n        for (uint256 facetIndex; facetIndex < cuts.length; facetIndex++) {\n            bytes4[] memory functionSelectors = cuts[facetIndex].functionSelectors;\n            address facetAddress = cuts[facetIndex].facetAddress;\n            if (functionSelectors.length == 0) revert NoSelectorsProvidedForFacetForCut(facetAddress);\n            IDiamond.FacetCutAction action = cuts[facetIndex].action;\n            if (action == IDiamond.FacetCutAction.Add) {\n                addFunctions(facetAddress, functionSelectors);\n            } else if (action == IDiamond.FacetCutAction.Replace) {\n                replaceFunctions(facetAddress, functionSelectors);\n            } else if (action == IDiamond.FacetCutAction.Remove) {\n                removeFunctions(facetAddress, functionSelectors);\n            } else {\n                revert IncorrectFacetCutAction(uint8(action));\n            }\n        }\n        emit IDiamond.DiamondCut(cuts, init, initData);\n        initializeDiamondCut(init, initData);\n    }\n\n    /// @dev The diamond's own address is accepted only while the diamond is being constructed (it has no code\n    /// yet), which is when it registers its own functions.\n    function addFunctions(address facetAddress, bytes4[] memory functionSelectors) internal {\n        if (facetAddress == address(0)) revert CannotAddSelectorsToZeroAddress(functionSelectors);\n        if (facetAddress == address(this)) {\n            if (address(this).code.length != 0) revert CannotUseDiamondAsFacet();\n        } else {\n            enforceHasContractCode(facetAddress, \"LibDiamondCut: Add facet has no code\");\n        }\n        DiamondStorage storage ds = diamondStorage();\n        uint16 selectorCount = uint16(ds.selectors.length);\n        for (uint256 selectorIndex; selectorIndex < functionSelectors.length; selectorIndex++) {\n            bytes4 selector = functionSelectors[selectorIndex];\n            address oldFacetAddress = ds.facetAddressAndSelectorPosition[selector].facetAddress;\n            if (oldFacetAddress != address(0)) revert CannotAddFunctionToDiamondThatAlreadyExists(selector);\n            ds.facetAddressAndSelectorPosition[selector] =\n                FacetAddressAndSelectorPosition({facetAddress: facetAddress, selectorPosition: selectorCount});\n            ds.selectors.push(selector);\n            selectorCount++;\n        }\n    }\n\n    function replaceFunctions(address facetAddress, bytes4[] memory functionSelectors) internal {\n        DiamondStorage storage ds = diamondStorage();\n        if (facetAddress == address(0)) revert CannotReplaceFunctionsFromFacetWithZeroAddress(functionSelectors);\n        if (facetAddress == address(this)) revert CannotUseDiamondAsFacet();\n        enforceHasContractCode(facetAddress, \"LibDiamondCut: Replace facet has no code\");\n        for (uint256 selectorIndex; selectorIndex < functionSelectors.length; selectorIndex++) {\n            bytes4 selector = functionSelectors[selectorIndex];\n            address oldFacetAddress = ds.facetAddressAndSelectorPosition[selector].facetAddress;\n            if (oldFacetAddress == address(this)) revert CannotReplaceImmutableFunction(selector);\n            if (oldFacetAddress == facetAddress) {\n                revert CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(selector);\n            }\n            if (oldFacetAddress == address(0)) revert CannotReplaceFunctionThatDoesNotExists(selector);\n            ds.facetAddressAndSelectorPosition[selector].facetAddress = facetAddress;\n        }\n    }\n\n    function removeFunctions(address facetAddress, bytes4[] memory functionSelectors) internal {\n        DiamondStorage storage ds = diamondStorage();\n        uint256 selectorCount = ds.selectors.length;\n        if (facetAddress != address(0)) revert RemoveFacetAddressMustBeZeroAddress(facetAddress);\n        for (uint256 selectorIndex; selectorIndex < functionSelectors.length; selectorIndex++) {\n            bytes4 selector = functionSelectors[selectorIndex];\n            FacetAddressAndSelectorPosition memory old = ds.facetAddressAndSelectorPosition[selector];\n            if (old.facetAddress == address(0)) revert CannotRemoveFunctionThatDoesNotExist(selector);\n            if (old.facetAddress == address(this)) revert CannotRemoveImmutableFunction(selector);\n            // Move the last selector into the removed one's position.\n            selectorCount--;\n            if (old.selectorPosition != selectorCount) {\n                bytes4 lastSelector = ds.selectors[selectorCount];\n                ds.selectors[old.selectorPosition] = lastSelector;\n                ds.facetAddressAndSelectorPosition[lastSelector].selectorPosition = old.selectorPosition;\n            }\n            ds.selectors.pop();\n            delete ds.facetAddressAndSelectorPosition[selector];\n        }\n    }\n\n    function initializeDiamondCut(address init, bytes memory initData) internal {\n        if (init == address(0)) return;\n        enforceHasContractCode(init, \"LibDiamondCut: _init address has no code\");\n        (bool success, bytes memory error) = init.delegatecall(initData);\n        if (!success) {\n            if (error.length > 0) {\n                assembly (\"memory-safe\") {\n                    revert(add(32, error), mload(error))\n                }\n            }\n            revert InitializationFunctionReverted(init, initData);\n        }\n    }\n\n    function enforceHasContractCode(address target, string memory errorMessage) internal view {\n        if (target.code.length == 0) revert NoBytecodeAtAddress(target, errorMessage);\n    }\n}\n"}],"is_verified_via_sourcify":false,"can_be_visualized_via_sol2uml":true,"evm_version":"cancun","language":"solidity","is_verified_via_eth_bytecode_db":false,"is_fully_verified":false,"license_type":"none","is_blueprint":false,"name":"SteakhouseOperator","creation_bytecode":"0x60806040523461055f57611c876020813803918261001c81610582565b93849283398101031261055f57516001600160a01b0381169081900361055f576101609061004982610582565b600a815291601f19013660208401376307e4c70760e21b610069836105a7565b528151600110156102be57637a0ed62760e01b60408301528151600210156102be576356fe50af60e11b60608301528151600310156102be576314bbdacb60e21b60808301528151600410156102be576366ffd66360e11b60a08301528151600510156102be576301ffc9a760e01b60c08301528151600610156102be57638da5cb5b60e01b60e08301528151600710156102be5763f2fde38b60e01b6101008301528151600810156102be57631c61872f60e31b6101208301528151600910156102be576379ba509760e01b610140830152301561053957303b61052a5761ffff5f516020611c475f395f51905f525416915f925b81518410156102f95781518410156102be5760208460051b8301015163ffffffff60e01b811691825f525f516020611c675f395f51905f5260205260018060a01b0360405f2054166102e65760408051919082016001600160401b038111838210176102d257604090815230835261ffff9190911660208084018281525f9687525f516020611c675f395f51905f52909152919094209151825491516001600160b01b03199092166001600160a01b03919091161760a09190911b61ffff60a01b161790555f516020611c475f395f51905f525490680100000000000000008210156102d25760018201805f516020611c475f395f51905f52558210156102be575f516020611c475f395f51905f525f5260205f208260031c019163ffffffff60e084549260051b169260e01c831b921b191617905561ffff81146102aa576001938401930161015f565b634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52604160045260245ffd5b8263ebbf5d0760e01b5f5260045260245ffd5b5060409061030682610582565b6001815290601f1983015f5b818110610505575050610323610563565b903082525f60208301528382015261033a826105a7565b52610344816105a7565b50815190606082016060835281518091526080830190602060808260051b8601019301915f5b8281106104935787877f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb673886020895f828401525f838203918287860152520190a16301ffc9a760e01b5f9081527f097ce880f191a93320e3ba1d622d145a06ed1c4076820e39fd18e2d78a6aea026020528181208054600160ff1991821681179092556307e4c70760e21b835283832080548216831790556348e2b09360e01b835283832080548216831790556307f5828d60e41b8352838320805490911690911790557f097ce880f191a93320e3ba1d622d145a06ed1c4076820e39fd18e2d78a6aea0380546001600160a01b03191684179055905191907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a361165590816105f28239f35b858503607f19018252835180516001600160a01b0316865260208101519495939492939192919060038310156104f1576104e58260608b602095946001978780970152015191818d82015201906105b4565b9601949301910161036a565b634e487b7160e01b5f52602160045260245ffd5b602090610510610563565b5f81525f8382015260608782015282828701015201610312565b632f97e44760e11b5f5260045ffd5b6040516302b8da0760e21b8152602060048201528061055b60248201856105b4565b0390fd5b5f80fd5b60405190606082016001600160401b038111838210176102d257604052565b6040519190601f01601f191682016001600160401b038111838210176102d257604052565b8051156102be5760200190565b90602080835192838152019201905f5b8181106105d15750505090565b82516001600160e01b0319168452602093840193909201916001016105c456fe60806040526004361015610015575b36610ca057005b5f3560e01c806301ffc9a7146100b45780631f931c1c146100af57806352ef6b2c146100aa57806379ba5097146100a55780637a0ed627146100a05780638da5cb5b1461009b578063adfca15e14610096578063cdffacc614610091578063e30c39781461008c5763f2fde38b0361000e5761088d565b610859565b610829565b61076c565b6106f5565b6104ee565b610392565b61027e565b6101b2565b6100e9565b600435906001600160e01b0319821682036100d057565b5f80fd5b35906001600160e01b0319821682036100d057565b346100d05760203660031901126100d0576101026100b9565b63ffffffff60e01b165f527f097ce880f191a93320e3ba1d622d145a06ed1c4076820e39fd18e2d78a6aea02602052602060ff60405f2054166040519015158152f35b602435906001600160a01b03821682036100d057565b600435906001600160a01b03821682036100d057565b35906001600160a01b03821682036100d057565b9181601f840112156100d0578235916001600160401b0383116100d057602083818601950101116100d057565b346100d05760603660031901126100d0576004356001600160401b0381116100d057366023820112156100d0578060040135906001600160401b0382116100d0573660248360051b830101116100d05761020a610145565b90604435916001600160401b0383116100d05761023a936102316024943690600401610185565b94909301610a25565b005b60206040818301928281528451809452019201905f5b81811061025f5750505090565b82516001600160a01b0316845260209384019390920191600101610252565b346100d0575f3660031901126100d0575f5160206115e95f395f51905f52546102a681610b3d565b5f5f925b8084106102c657818352604051806102c2858261023c565b0390f35b906102f86102eb6102e66102d987610b79565b90549060031b1c60e01b90565b610911565b546001600160a01b031690565b5f6001600160a01b038216815b84811061034f575b5050610345578161033661033b9261032760019588610c04565b6001600160a01b039091169052565b610c2c565b935b0192906102aa565b509260019061033d565b61037861036c61035f838a610c04565b516001600160a01b031690565b6001600160a01b031690565b821461038657600101610305565b50505060015f8061030d565b346100d0575f3660031901126100d0575f5160206116295f395f51905f52546001600160a01b03163303610427575f5160206116095f395f51905f5280546001600160a01b0319808216339081179093555f5160206116295f395f51905f52805490911690556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b63a09b9a4360e01b5f523360045260245ffd5b90602080835192838152019201905f5b8181106104575750505090565b82516001600160e01b03191684526020938401939092019160010161044a565b602081016020825282518091526040820191602060408360051b8301019401925f915b8383106104a957505050505090565b90919293946020806104df600193603f198682030187526040838b51878060a01b0381511684520151918185820152019061043a565b9701930193019193929061049a565b346100d0575f3660031901126100d0575f5160206115e95f395f51905f525461051681610c3f565b61051f82610b3d565b915f905f905b8082106105805750505f5b81811061054857818352604051806102c28582610477565b8061056a61056361055b60019488610c04565b5161ffff1690565b61ffff1690565b60206105768387610c04565b5101515201610530565b909161058e6102d984610b79565b61059a6102eb82610911565b5f806001600160a01b0383165b858210610643575b5050610638579161061c61062f926105dd6001956105cd858b610c04565b516001600160a01b039091169052565b6105e686610b3d565b60206105f2858b610c04565b51015261060c6020610604858b610c04565b510151610bf7565b6001600160e01b03199091169052565b6103366106298289610c04565b60019052565b925b0190610525565b505091600190610631565b8061066d61036c61065f858d989c9d9e97969e9b999a9b610c04565b51516001600160a01b031690565b14610688576001809a019192995097969297959493956105a7565b505096806106c48561060c8b6106be61056361055b878a9f9e9a6106b59c9e9d9c6106ec9b602092610c04565b51015194610c04565b90610c04565b6106e36106dc6106d761055b848d610c04565b610c8d565b918a610c04565b9061ffff169052565b60015f806105af565b346100d0575f3660031901126100d0575f5160206116095f395f51905f52546040516001600160a01b039091168152602090f35b60206040818301928281528451809452019201905f5b81811061074c5750505090565b82516001600160e01b03191684526020938401939092019160010161073f565b346100d05760203660031901126100d05761078561015b565b5f5160206115e95f395f51905f52545f61079e82610b3d565b6001600160a01b0390931692915f5b8181106107c557828452604051806102c28682610729565b6107ce81610b79565b905460039190911b1c60e01b6001600160a01b036107eb82610911565b541686146107fd575b506001016107ad565b836108229161080f6001949688610c04565b6001600160e01b03199091169052610c2c565b92906107f4565b346100d05760203660031901126100d05760206001600160a01b0361084f6102e66100b9565b5416604051908152f35b346100d0575f3660031901126100d0575f5160206116295f395f51905f52546040516001600160a01b039091168152602090f35b346100d05760203660031901126100d0576108a661015b565b6108ae610cf5565b5f5160206116295f395f51905f5280546001600160a01b0319166001600160a01b039283169081179091555f5160206116095f395f51905f52549091167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e227005f80a3005b63ffffffff60e01b165f527f097ce880f191a93320e3ba1d622d145a06ed1c4076820e39fd18e2d78a6aea0060205260405f2090565b634e487b7160e01b5f52604160045260245ffd5b60405190606082018281106001600160401b0382111761097a57604052565b610947565b60405190604082018281106001600160401b0382111761097a57604052565b6040519190601f01601f191682016001600160401b0381118382101761097a57604052565b6001600160401b03811161097a5760051b60200190565b6001600160401b03811161097a57601f01601f191660200190565b929192610a09610a04836109da565b61099e565b93828552828201116100d057815f926020928387013784010152565b92949390610a31610cf5565b610a3d610a04826109c3565b93602085838152019160051b8101903682116100d05780925b828410610a795750505050610a779394610a719136916109f5565b91610e34565b565b83356001600160401b0381116100d05782016060813603126100d057610a9d61095b565b90610aa781610171565b8252602081013560038110156100d05760208301526040810135906001600160401b0382116100d0570136601f820112156100d057803590610aeb610a04836109c3565b9160208084838152019160051b830101913683116100d057602001905b828210610b25575050506040820152815260209384019301610a56565b60208091610b32846100d4565b815201910190610b08565b90610b4a610a04836109c3565b8281528092610b5b601f19916109c3565b0190602036910137565b634e487b7160e01b5f52603260045260245ffd5b905f5160206115e95f395f51905f5254821015610bd1575f5160206115e95f395f51905f525f52600382901c7f086813de59d5066be198149d0747a724b3672dae7ec0313af09c2f2030c77b87019160021b601c1690565b610b65565b9190918054831015610bd1575f52601c60205f208360031c019260021b1690565b805115610bd15760200190565b8051821015610bd15760209160051b010190565b634e487b7160e01b5f52601160045260245ffd5b5f198114610c3a5760010190565b610c18565b90610c4c610a04836109c3565b8281528092610c5d601f19916109c3565b01905f5b828110610c6d57505050565b602090610c7861097f565b5f815260608382015282828501015201610c61565b61ffff1661ffff8114610c3a5760010190565b5f356001600160e01b0319166001600160a01b03610cbd82610911565b5416908115610ce3575f8083368280378136915af43d5f803e15610cdf573d5ff35b3d5ffd5b630a82dd7360e31b5f5260045260245ffd5b5f5160206116095f395f51905f52546001600160a01b031633819003610d185750565b63ff4127cb60e01b5f523360045260245260445ffd5b60031115610d3857565b634e487b7160e01b5f52602160045260245ffd5b516003811015610d385790565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b93929091936060810160608252835180915260808201602060808360051b8501019501915f5b818110610dd4575050506001600160a01b039095166020820152929350610dd1926040818403910152610d59565b90565b848703607f19018352835180516001600160a01b031688526020810151949793949293919291906003831015610d3857610e288260606040602095946001978780970152015191816040820152019061043a565b98019401929101610da3565b9290915f5b8451811015610f20576040610e4e8287610c04565b510151610e5e61065f8388610c04565b815115610f0557610e7b6020610e74858a610c04565b5101610d4c565b610e8481610d2e565b80610e9d575060019291610e97916113c6565b01610e39565b610ea681610d2e565b60018103610ec1575060019291610ebc916111dc565b610e97565b610eca81610d2e565b60028103610ee0575060019291610ebc91610ff7565b80610eed610f0292610d2e565b633ff4d20f60e11b5f5260ff16600452602490565b5ffd5b63e767f91f60e01b5f526001600160a01b031660045260245ffd5b509092917f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb67381610a7794610f5a8560405193849384610d7d565b0390a16114ff565b9061ffff610f6e61097f565b92546001600160a01b038116845260a01c166020830152565b8015610c3a575f190190565b5f5160206115e95f395f51905f52548015610fe3575f1901610fc2815f5160206115e95f395f51905f52610bd6565b63ffffffff82549160031b1b191690555f5160206115e95f395f51905f5255565b634e487b7160e01b5f52603160045260245ffd5b5f5160206115e95f395f51905f52549291906001600160a01b03811661117957505f5b81518110156111735761103e6110308284610c04565b516001600160e01b03191690565b61104f61104a82610911565b610f62565b8051909590611066906001600160a01b031661036c565b156111565785513090611081906001600160a01b031661036c565b14611139576110bb6001939260206110995f94610f87565b98018861ffff6110ab835161ffff1690565b16036110c2575b506102e6610f93565b550161101a565b6111339061111461110e6110d86102d98d610b79565b9261055b846110f16110ec845161ffff1690565b610b79565b90919063ffffffff83549160031b9260e01c831b921b1916179055565b91610911565b805461ffff60a01b191660a09290921b61ffff60a01b16919091179055565b5f6110b2565b630df5fd6160e31b5f526001600160e01b0319821660045260245ffd5b637a08a22d60e01b5f526001600160e01b0319821660045260245ffd5b50509050565b63d091bc8160e01b5f526001600160a01b031660045260245ffd5b61119e606061099e565b906028825267206e6f20636f646560c01b6040837f4c69624469616d6f6e644375743a205265706c6163652066616365742068617360208201520152565b6001600160a01b038116929183156112e1573084146112d257611206611200611194565b836115a9565b5f5b81518110156112cb5761121e6110308284610c04565b61122d61036c6102eb83610911565b3081146112ae578681146112915715611275579061126f84611250600194610911565b80546001600160a01b0319166001600160a01b03909216919091179055565b01611208565b637479f93960e01b5f526001600160e01b03191660045260245ffd5b631ac6ce8d60e11b5f526001600160e01b0319821660045260245ffd5b632901806d60e11b5f526001600160e01b0319821660045260245ffd5b5050509050565b632f97e44760e11b5f5260045ffd5b60405163cd98a96f60e01b81529081906112fe9060048301610729565b0390fd5b61130c606061099e565b906024825263636f646560e01b6040837f4c69624469616d6f6e644375743a2041646420666163657420686173206e6f2060208201520152565b8151815460209093015161ffff60a01b60a09190911b166001600160b01b03199093166001600160a01b0390911617919091179055565b5f5160206115e95f395f51905f525490600160401b82101561097a576110f1826001610a7794015f5160206115e95f395f51905f52555f5160206115e95f395f51905f52610bd6565b91906001600160a01b038316801561149d57300361148757303b6112d2575b5f5160206115e95f395f51905f525461ffff16905f915b81518310156112cb576114126110308484610c04565b61142161036c6102eb83610911565b61146b576001916106d76114639261145e61143a61097f565b6001600160a01b038b16815261ffff8516602082015261145983610911565b611346565b61137d565b9201916113fc565b63ebbf5d0760e01b5f526001600160e01b03191660045260245ffd5b611498611492611302565b846115a9565b6113e5565b6040516302b8da0760e21b8152806112fe8460048301610729565b3d156114d8573d906114cc610a04836109da565b9182523d5f602084013e565b606090565b6001600160a01b039091168152604060208201819052610dd192910190610d59565b6001600160a01b038116156115a55761155c61151b606061099e565b602881527f4c69624469616d6f6e644375743a205f696e6974206164647265737320686173602082015267206e6f20636f646560c01b6040820152826115a9565b5f80835160208501845af461156f6114b8565b901561157a57505050565b805190816115a05750506112fe60405192839263192105d760e01b8452600484016114dd565b602001fd5b5050565b803b156115b4575050565b6040805163919834b960e01b81526001600160a01b03909216600483015260248201529081906112fe906044830190610d5956fe097ce880f191a93320e3ba1d622d145a06ed1c4076820e39fd18e2d78a6aea01097ce880f191a93320e3ba1d622d145a06ed1c4076820e39fd18e2d78a6aea03097ce880f191a93320e3ba1d622d145a06ed1c4076820e39fd18e2d78a6aea04a164736f6c6343000821000a097ce880f191a93320e3ba1d622d145a06ed1c4076820e39fd18e2d78a6aea01097ce880f191a93320e3ba1d622d145a06ed1c4076820e39fd18e2d78a6aea00000000000000000000000000fc580f2a77e85f1f47b60f096d36fdc97ce2d827","external_libraries":[],"proxy_type":"eip2535","implementations":[{"address_hash":"0xD088155cD8489130F5A36D0FD5bca4A7E6d07c5e","name":null},{"address_hash":"0xe0AA2Ca640158A38d05850B56Ee5bd7a5F8070f7","name":null},{"address_hash":"0x967E5A29eC501e1B04fdf166e7380F23Cf350846","name":null},{"address_hash":"0x5547D87caa6158e4e2EE18a52105198d7f19d870","name":null},{"address_hash":"0x061B26877Aa5C2d3b0413A9fB589FC359cdfFa17","name":null},{"address_hash":"0x3999dbA69e6cFd619240e6643690b864e1568954","name":null},{"address_hash":"0x61b0df76e71509a420e6eAB11809768B6e3ff8Cc","name":null}],"verified_at":"2026-10-13T11:57:40.803559Z","is_verified_via_verifier_alliance":false,"compiler_version":"v0.8.33+commit.64118f21","decoded_constructor_args":[["0xfC580f2a77e85f1F47b60F096D36fDc97cE2d827",{"internalType":"address","name":"initialOwner","type":"address"}]],"sourcify_repo_url":null,"optimization_runs":100,"compiler_settings":{"evmVersion":"cancun","libraries":{},"metadata":{"appendCBOR":true,"bytecodeHash":"none","useLiteralContent":false},"optimizer":{"enabled":true,"runs":100},"outputSelection":{"*":{"":["*"],"*":["*"]}},"remappings":["@morpho-blue/=dependencies/morpho-blue-1.0.0/src/","@openzeppelin/contracts/=dependencies/openzeppelin-contracts-5.0.1/contracts/","@steakhouse/deploy-kit/=../deploy-kit/src/","@vault-v2/=dependencies/vault-v2-41a90d1/","forge-std/=dependencies/forge-std-c7be2a3/src/"],"viaIR":true},"is_verified":true,"verified_twin_address_hash":null,"optimization_enabled":true,"deployed_bytecode":"0x60806040526004361015610015575b36610ca057005b5f3560e01c806301ffc9a7146100b45780631f931c1c146100af57806352ef6b2c146100aa57806379ba5097146100a55780637a0ed627146100a05780638da5cb5b1461009b578063adfca15e14610096578063cdffacc614610091578063e30c39781461008c5763f2fde38b0361000e5761088d565b610859565b610829565b61076c565b6106f5565b6104ee565b610392565b61027e565b6101b2565b6100e9565b600435906001600160e01b0319821682036100d057565b5f80fd5b35906001600160e01b0319821682036100d057565b346100d05760203660031901126100d0576101026100b9565b63ffffffff60e01b165f527f097ce880f191a93320e3ba1d622d145a06ed1c4076820e39fd18e2d78a6aea02602052602060ff60405f2054166040519015158152f35b602435906001600160a01b03821682036100d057565b600435906001600160a01b03821682036100d057565b35906001600160a01b03821682036100d057565b9181601f840112156100d0578235916001600160401b0383116100d057602083818601950101116100d057565b346100d05760603660031901126100d0576004356001600160401b0381116100d057366023820112156100d0578060040135906001600160401b0382116100d0573660248360051b830101116100d05761020a610145565b90604435916001600160401b0383116100d05761023a936102316024943690600401610185565b94909301610a25565b005b60206040818301928281528451809452019201905f5b81811061025f5750505090565b82516001600160a01b0316845260209384019390920191600101610252565b346100d0575f3660031901126100d0575f5160206115e95f395f51905f52546102a681610b3d565b5f5f925b8084106102c657818352604051806102c2858261023c565b0390f35b906102f86102eb6102e66102d987610b79565b90549060031b1c60e01b90565b610911565b546001600160a01b031690565b5f6001600160a01b038216815b84811061034f575b5050610345578161033661033b9261032760019588610c04565b6001600160a01b039091169052565b610c2c565b935b0192906102aa565b509260019061033d565b61037861036c61035f838a610c04565b516001600160a01b031690565b6001600160a01b031690565b821461038657600101610305565b50505060015f8061030d565b346100d0575f3660031901126100d0575f5160206116295f395f51905f52546001600160a01b03163303610427575f5160206116095f395f51905f5280546001600160a01b0319808216339081179093555f5160206116295f395f51905f52805490911690556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b63a09b9a4360e01b5f523360045260245ffd5b90602080835192838152019201905f5b8181106104575750505090565b82516001600160e01b03191684526020938401939092019160010161044a565b602081016020825282518091526040820191602060408360051b8301019401925f915b8383106104a957505050505090565b90919293946020806104df600193603f198682030187526040838b51878060a01b0381511684520151918185820152019061043a565b9701930193019193929061049a565b346100d0575f3660031901126100d0575f5160206115e95f395f51905f525461051681610c3f565b61051f82610b3d565b915f905f905b8082106105805750505f5b81811061054857818352604051806102c28582610477565b8061056a61056361055b60019488610c04565b5161ffff1690565b61ffff1690565b60206105768387610c04565b5101515201610530565b909161058e6102d984610b79565b61059a6102eb82610911565b5f806001600160a01b0383165b858210610643575b5050610638579161061c61062f926105dd6001956105cd858b610c04565b516001600160a01b039091169052565b6105e686610b3d565b60206105f2858b610c04565b51015261060c6020610604858b610c04565b510151610bf7565b6001600160e01b03199091169052565b6103366106298289610c04565b60019052565b925b0190610525565b505091600190610631565b8061066d61036c61065f858d989c9d9e97969e9b999a9b610c04565b51516001600160a01b031690565b14610688576001809a019192995097969297959493956105a7565b505096806106c48561060c8b6106be61056361055b878a9f9e9a6106b59c9e9d9c6106ec9b602092610c04565b51015194610c04565b90610c04565b6106e36106dc6106d761055b848d610c04565b610c8d565b918a610c04565b9061ffff169052565b60015f806105af565b346100d0575f3660031901126100d0575f5160206116095f395f51905f52546040516001600160a01b039091168152602090f35b60206040818301928281528451809452019201905f5b81811061074c5750505090565b82516001600160e01b03191684526020938401939092019160010161073f565b346100d05760203660031901126100d05761078561015b565b5f5160206115e95f395f51905f52545f61079e82610b3d565b6001600160a01b0390931692915f5b8181106107c557828452604051806102c28682610729565b6107ce81610b79565b905460039190911b1c60e01b6001600160a01b036107eb82610911565b541686146107fd575b506001016107ad565b836108229161080f6001949688610c04565b6001600160e01b03199091169052610c2c565b92906107f4565b346100d05760203660031901126100d05760206001600160a01b0361084f6102e66100b9565b5416604051908152f35b346100d0575f3660031901126100d0575f5160206116295f395f51905f52546040516001600160a01b039091168152602090f35b346100d05760203660031901126100d0576108a661015b565b6108ae610cf5565b5f5160206116295f395f51905f5280546001600160a01b0319166001600160a01b039283169081179091555f5160206116095f395f51905f52549091167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e227005f80a3005b63ffffffff60e01b165f527f097ce880f191a93320e3ba1d622d145a06ed1c4076820e39fd18e2d78a6aea0060205260405f2090565b634e487b7160e01b5f52604160045260245ffd5b60405190606082018281106001600160401b0382111761097a57604052565b610947565b60405190604082018281106001600160401b0382111761097a57604052565b6040519190601f01601f191682016001600160401b0381118382101761097a57604052565b6001600160401b03811161097a5760051b60200190565b6001600160401b03811161097a57601f01601f191660200190565b929192610a09610a04836109da565b61099e565b93828552828201116100d057815f926020928387013784010152565b92949390610a31610cf5565b610a3d610a04826109c3565b93602085838152019160051b8101903682116100d05780925b828410610a795750505050610a779394610a719136916109f5565b91610e34565b565b83356001600160401b0381116100d05782016060813603126100d057610a9d61095b565b90610aa781610171565b8252602081013560038110156100d05760208301526040810135906001600160401b0382116100d0570136601f820112156100d057803590610aeb610a04836109c3565b9160208084838152019160051b830101913683116100d057602001905b828210610b25575050506040820152815260209384019301610a56565b60208091610b32846100d4565b815201910190610b08565b90610b4a610a04836109c3565b8281528092610b5b601f19916109c3565b0190602036910137565b634e487b7160e01b5f52603260045260245ffd5b905f5160206115e95f395f51905f5254821015610bd1575f5160206115e95f395f51905f525f52600382901c7f086813de59d5066be198149d0747a724b3672dae7ec0313af09c2f2030c77b87019160021b601c1690565b610b65565b9190918054831015610bd1575f52601c60205f208360031c019260021b1690565b805115610bd15760200190565b8051821015610bd15760209160051b010190565b634e487b7160e01b5f52601160045260245ffd5b5f198114610c3a5760010190565b610c18565b90610c4c610a04836109c3565b8281528092610c5d601f19916109c3565b01905f5b828110610c6d57505050565b602090610c7861097f565b5f815260608382015282828501015201610c61565b61ffff1661ffff8114610c3a5760010190565b5f356001600160e01b0319166001600160a01b03610cbd82610911565b5416908115610ce3575f8083368280378136915af43d5f803e15610cdf573d5ff35b3d5ffd5b630a82dd7360e31b5f5260045260245ffd5b5f5160206116095f395f51905f52546001600160a01b031633819003610d185750565b63ff4127cb60e01b5f523360045260245260445ffd5b60031115610d3857565b634e487b7160e01b5f52602160045260245ffd5b516003811015610d385790565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b93929091936060810160608252835180915260808201602060808360051b8501019501915f5b818110610dd4575050506001600160a01b039095166020820152929350610dd1926040818403910152610d59565b90565b848703607f19018352835180516001600160a01b031688526020810151949793949293919291906003831015610d3857610e288260606040602095946001978780970152015191816040820152019061043a565b98019401929101610da3565b9290915f5b8451811015610f20576040610e4e8287610c04565b510151610e5e61065f8388610c04565b815115610f0557610e7b6020610e74858a610c04565b5101610d4c565b610e8481610d2e565b80610e9d575060019291610e97916113c6565b01610e39565b610ea681610d2e565b60018103610ec1575060019291610ebc916111dc565b610e97565b610eca81610d2e565b60028103610ee0575060019291610ebc91610ff7565b80610eed610f0292610d2e565b633ff4d20f60e11b5f5260ff16600452602490565b5ffd5b63e767f91f60e01b5f526001600160a01b031660045260245ffd5b509092917f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb67381610a7794610f5a8560405193849384610d7d565b0390a16114ff565b9061ffff610f6e61097f565b92546001600160a01b038116845260a01c166020830152565b8015610c3a575f190190565b5f5160206115e95f395f51905f52548015610fe3575f1901610fc2815f5160206115e95f395f51905f52610bd6565b63ffffffff82549160031b1b191690555f5160206115e95f395f51905f5255565b634e487b7160e01b5f52603160045260245ffd5b5f5160206115e95f395f51905f52549291906001600160a01b03811661117957505f5b81518110156111735761103e6110308284610c04565b516001600160e01b03191690565b61104f61104a82610911565b610f62565b8051909590611066906001600160a01b031661036c565b156111565785513090611081906001600160a01b031661036c565b14611139576110bb6001939260206110995f94610f87565b98018861ffff6110ab835161ffff1690565b16036110c2575b506102e6610f93565b550161101a565b6111339061111461110e6110d86102d98d610b79565b9261055b846110f16110ec845161ffff1690565b610b79565b90919063ffffffff83549160031b9260e01c831b921b1916179055565b91610911565b805461ffff60a01b191660a09290921b61ffff60a01b16919091179055565b5f6110b2565b630df5fd6160e31b5f526001600160e01b0319821660045260245ffd5b637a08a22d60e01b5f526001600160e01b0319821660045260245ffd5b50509050565b63d091bc8160e01b5f526001600160a01b031660045260245ffd5b61119e606061099e565b906028825267206e6f20636f646560c01b6040837f4c69624469616d6f6e644375743a205265706c6163652066616365742068617360208201520152565b6001600160a01b038116929183156112e1573084146112d257611206611200611194565b836115a9565b5f5b81518110156112cb5761121e6110308284610c04565b61122d61036c6102eb83610911565b3081146112ae578681146112915715611275579061126f84611250600194610911565b80546001600160a01b0319166001600160a01b03909216919091179055565b01611208565b637479f93960e01b5f526001600160e01b03191660045260245ffd5b631ac6ce8d60e11b5f526001600160e01b0319821660045260245ffd5b632901806d60e11b5f526001600160e01b0319821660045260245ffd5b5050509050565b632f97e44760e11b5f5260045ffd5b60405163cd98a96f60e01b81529081906112fe9060048301610729565b0390fd5b61130c606061099e565b906024825263636f646560e01b6040837f4c69624469616d6f6e644375743a2041646420666163657420686173206e6f2060208201520152565b8151815460209093015161ffff60a01b60a09190911b166001600160b01b03199093166001600160a01b0390911617919091179055565b5f5160206115e95f395f51905f525490600160401b82101561097a576110f1826001610a7794015f5160206115e95f395f51905f52555f5160206115e95f395f51905f52610bd6565b91906001600160a01b038316801561149d57300361148757303b6112d2575b5f5160206115e95f395f51905f525461ffff16905f915b81518310156112cb576114126110308484610c04565b61142161036c6102eb83610911565b61146b576001916106d76114639261145e61143a61097f565b6001600160a01b038b16815261ffff8516602082015261145983610911565b611346565b61137d565b9201916113fc565b63ebbf5d0760e01b5f526001600160e01b03191660045260245ffd5b611498611492611302565b846115a9565b6113e5565b6040516302b8da0760e21b8152806112fe8460048301610729565b3d156114d8573d906114cc610a04836109da565b9182523d5f602084013e565b606090565b6001600160a01b039091168152604060208201819052610dd192910190610d59565b6001600160a01b038116156115a55761155c61151b606061099e565b602881527f4c69624469616d6f6e644375743a205f696e6974206164647265737320686173602082015267206e6f20636f646560c01b6040820152826115a9565b5f80835160208501845af461156f6114b8565b901561157a57505050565b805190816115a05750506112fe60405192839263192105d760e01b8452600484016114dd565b602001fd5b5050565b803b156115b4575050565b6040805163919834b960e01b81526001600160a01b03909216600483015260248201529081906112fe906044830190610d5956fe097ce880f191a93320e3ba1d622d145a06ed1c4076820e39fd18e2d78a6aea01097ce880f191a93320e3ba1d622d145a06ed1c4076820e39fd18e2d78a6aea03097ce880f191a93320e3ba1d622d145a06ed1c4076820e39fd18e2d78a6aea04a164736f6c6343000821000a","source_code":"// SPDX-License-Identifier: MIT\npragma solidity 0.8.33;\n\n/******************************************************************************\\\n* Author: Nick Mudge <nick@perfectabstractions.com> (https://twitter.com/mudgen)\n* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535\n*\n* Adapted from diamond-1-hardhat (https://github.com/mudgen/diamond-1-hardhat), MIT:\n* the cut, the loupe and a two-step ownership are functions of the diamond itself.\n/******************************************************************************/\n\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\n\nimport {IDiamondCut} from \"./interfaces/IDiamondCut.sol\";\nimport {IDiamondLoupe} from \"./interfaces/IDiamondLoupe.sol\";\nimport {IERC173} from \"./interfaces/IERC173.sol\";\nimport {LibDiamond} from \"./libraries/LibDiamond.sol\";\n\n/// @title SteakhouseOperator\n/// @notice Steakhouse's operator: an EIP-2535 diamond that the bots call, whose facets act on Morpho vaults under\n/// one role table.\n/// @dev The cut, the loupe and the two-step ownership are defined here and are immutable: they are registered in the\n/// routing table under the diamond's own address, so the loupe reports them and no cut can replace or remove them.\n/// Every other function is routed by the fallback to its facet. The constructor takes only the owner, so the init\n/// code, and with one CREATE2 salt the address, is the same on every chain.\ncontract SteakhouseOperator is IDiamondCut, IDiamondLoupe, IERC173, IERC165 {\n    error FunctionNotFound(bytes4 selector);\n    error NotPendingOwner(address account);\n\n    event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);\n\n    constructor(address initialOwner) {\n        bytes4[] memory selectors = new bytes4[](10);\n        selectors[0] = IDiamondCut.diamondCut.selector;\n        selectors[1] = IDiamondLoupe.facets.selector;\n        selectors[2] = IDiamondLoupe.facetFunctionSelectors.selector;\n        selectors[3] = IDiamondLoupe.facetAddresses.selector;\n        selectors[4] = IDiamondLoupe.facetAddress.selector;\n        selectors[5] = IERC165.supportsInterface.selector;\n        selectors[6] = IERC173.owner.selector;\n        selectors[7] = IERC173.transferOwnership.selector;\n        selectors[8] = SteakhouseOperator.pendingOwner.selector;\n        selectors[9] = SteakhouseOperator.acceptOwnership.selector;\n        LibDiamond.addFunctions(address(this), selectors);\n        FacetCut[] memory cut = new FacetCut[](1);\n        cut[0] = FacetCut({facetAddress: address(this), action: FacetCutAction.Add, functionSelectors: selectors});\n        emit DiamondCut(cut, address(0), \"\");\n\n        LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\n        ds.supportedInterfaces[type(IERC165).interfaceId] = true;\n        ds.supportedInterfaces[type(IDiamondCut).interfaceId] = true;\n        ds.supportedInterfaces[type(IDiamondLoupe).interfaceId] = true;\n        ds.supportedInterfaces[type(IERC173).interfaceId] = true;\n\n        ds.contractOwner = initialOwner;\n        emit OwnershipTransferred(address(0), initialOwner);\n    }\n\n    /// @notice Runs the function of the facet registered for the call's selector, with the diamond's storage.\n    fallback() external payable {\n        address facet = LibDiamond.diamondStorage().facetAddressAndSelectorPosition[msg.sig].facetAddress;\n        if (facet == address(0)) revert FunctionNotFound(msg.sig);\n        assembly {\n            calldatacopy(0, 0, calldatasize())\n            let result := delegatecall(gas(), facet, 0, calldatasize(), 0, 0)\n            returndatacopy(0, 0, returndatasize())\n            switch result\n            case 0 { revert(0, returndatasize()) }\n            default { return(0, returndatasize()) }\n        }\n    }\n\n    /// @notice Accepts ETH within a 2300-gas stipend: Morpho's public allocator pays its fees with `transfer`.\n    receive() external payable {}\n\n    // ---------------------------------------------------------------- cut\n\n    /// @inheritdoc IDiamondCut\n    /// @dev Owner only.\n    function diamondCut(FacetCut[] calldata cuts, address init, bytes calldata initData) external {\n        LibDiamond.enforceIsContractOwner();\n        LibDiamond.diamondCut(cuts, init, initData);\n    }\n\n    // ---------------------------------------------------------------- loupe\n\n    /// @inheritdoc IDiamondLoupe\n    function facets() external view returns (Facet[] memory facets_) {\n        LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\n        uint256 selectorCount = ds.selectors.length;\n        // Sized for the worst case (one facet per selector), then trimmed.\n        facets_ = new Facet[](selectorCount);\n        uint16[] memory numFacetSelectors = new uint16[](selectorCount);\n        uint256 numFacets = 0;\n        for (uint256 selectorIndex; selectorIndex < selectorCount; selectorIndex++) {\n            bytes4 selector = ds.selectors[selectorIndex];\n            address facetAddress_ = ds.facetAddressAndSelectorPosition[selector].facetAddress;\n            bool found = false;\n            for (uint256 facetIndex; facetIndex < numFacets; facetIndex++) {\n                if (facets_[facetIndex].facetAddress == facetAddress_) {\n                    facets_[facetIndex].functionSelectors[numFacetSelectors[facetIndex]] = selector;\n                    numFacetSelectors[facetIndex]++;\n                    found = true;\n                    break;\n                }\n            }\n            if (found) continue;\n            facets_[numFacets].facetAddress = facetAddress_;\n            facets_[numFacets].functionSelectors = new bytes4[](selectorCount);\n            facets_[numFacets].functionSelectors[0] = selector;\n            numFacetSelectors[numFacets] = 1;\n            numFacets++;\n        }\n        for (uint256 facetIndex; facetIndex < numFacets; facetIndex++) {\n            uint256 numSelectors = numFacetSelectors[facetIndex];\n            bytes4[] memory selectors = facets_[facetIndex].functionSelectors;\n            assembly (\"memory-safe\") {\n                mstore(selectors, numSelectors)\n            }\n        }\n        assembly (\"memory-safe\") {\n            mstore(facets_, numFacets)\n        }\n    }\n\n    /// @inheritdoc IDiamondLoupe\n    function facetFunctionSelectors(address facet) external view returns (bytes4[] memory facetFunctionSelectors_) {\n        LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\n        uint256 selectorCount = ds.selectors.length;\n        uint256 numSelectors = 0;\n        facetFunctionSelectors_ = new bytes4[](selectorCount);\n        for (uint256 selectorIndex; selectorIndex < selectorCount; selectorIndex++) {\n            bytes4 selector = ds.selectors[selectorIndex];\n            if (facet == ds.facetAddressAndSelectorPosition[selector].facetAddress) {\n                facetFunctionSelectors_[numSelectors] = selector;\n                numSelectors++;\n            }\n        }\n        assembly (\"memory-safe\") {\n            mstore(facetFunctionSelectors_, numSelectors)\n        }\n    }\n\n    /// @inheritdoc IDiamondLoupe\n    function facetAddresses() external view returns (address[] memory facetAddresses_) {\n        LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\n        uint256 selectorCount = ds.selectors.length;\n        facetAddresses_ = new address[](selectorCount);\n        uint256 numFacets = 0;\n        for (uint256 selectorIndex; selectorIndex < selectorCount; selectorIndex++) {\n            address facetAddress_ = ds.facetAddressAndSelectorPosition[ds.selectors[selectorIndex]].facetAddress;\n            bool found = false;\n            for (uint256 facetIndex; facetIndex < numFacets; facetIndex++) {\n                if (facetAddress_ == facetAddresses_[facetIndex]) {\n                    found = true;\n                    break;\n                }\n            }\n            if (found) continue;\n            facetAddresses_[numFacets] = facetAddress_;\n            numFacets++;\n        }\n        assembly (\"memory-safe\") {\n            mstore(facetAddresses_, numFacets)\n        }\n    }\n\n    /// @inheritdoc IDiamondLoupe\n    function facetAddress(bytes4 functionSelector) external view returns (address facetAddress_) {\n        facetAddress_ = LibDiamond.diamondStorage().facetAddressAndSelectorPosition[functionSelector].facetAddress;\n    }\n\n    /// @inheritdoc IERC165\n    function supportsInterface(bytes4 interfaceId) external view returns (bool) {\n        return LibDiamond.diamondStorage().supportedInterfaces[interfaceId];\n    }\n\n    // ---------------------------------------------------------------- ownership\n\n    /// @inheritdoc IERC173\n    function owner() external view returns (address) {\n        return LibDiamond.contractOwner();\n    }\n\n    /// @notice The account that may complete the current transfer of ownership with `acceptOwnership`.\n    function pendingOwner() external view returns (address) {\n        return LibDiamond.diamondStorage().pendingOwner;\n    }\n\n    /// @notice Starts a transfer of ownership, which `newOwner` completes with `acceptOwnership`. Owner only; zero\n    /// cancels a pending transfer. Ownership can be transferred but never renounced.\n    function transferOwnership(address newOwner) external {\n        LibDiamond.enforceIsContractOwner();\n        LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\n        ds.pendingOwner = newOwner;\n        emit OwnershipTransferStarted(ds.contractOwner, newOwner);\n    }\n\n    /// @notice Completes a transfer of ownership; only the pending owner may call it.\n    function acceptOwnership() external {\n        LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\n        if (msg.sender != ds.pendingOwner) revert NotPendingOwner(msg.sender);\n        address previousOwner = ds.contractOwner;\n        ds.contractOwner = msg.sender;\n        ds.pendingOwner = address(0);\n        emit OwnershipTransferred(previousOwner, msg.sender);\n    }\n}\n","creation_status":"success","file_path":"src/SteakhouseOperator.sol"}