Last active
March 2, 2026 22:07
-
-
Save mudgen/d5323d7e8f6450ab7c8e4dc7f0951f59 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pragma solidity ^0.8.0; | |
| contract ERC721Registry { | |
| // A loupe is a small magnifying glass used to look at diamonds. | |
| // These functions look at diamonds | |
| interface IDiamondLoupe { | |
| struct Facet { | |
| address facetAddress; | |
| bytes4[] functionSelectors; | |
| } | |
| /// @notice Gets all facet addresses and their four byte function selectors. | |
| /// @return facets_ Facet | |
| function facets() external view returns (Facet[] memory facets_); | |
| /// @notice Gets all the function selectors supported by a specific facet. | |
| /// @param _facet The facet address. | |
| /// @return facetFunctionSelectors_ | |
| function facetFunctionSelectors(address _facet) external view returns (bytes4[] memory facetFunctionSelectors_); | |
| /// @notice Get all the facet addresses used by a diamond. | |
| /// @return facetAddresses_ | |
| function facetAddresses() external view returns (address[] memory facetAddresses_); | |
| /// @notice Gets the facet that supports the given selector. | |
| /// @dev If facet is not found return address(0). | |
| /// @param _functionSelector The function selector. | |
| /// @return facetAddress_ The facet address. | |
| function facetAddress(bytes4 _functionSelector) external view returns (address facetAddress_); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment