Skip to main content

DiamondLoupeFacet.sol

DiamondLoupeFacet

facets

function facets() external view returns (struct IDiamondLoupe.Facet[] facets_)

Gets all facets and their selectors.

  • Return Values:

    NameTypeDescription
    facets_struct IDiamondLoupe.Facet[]Facet

facetFunctionSelectors

function facetFunctionSelectors(address _facet) external view returns (bytes4[] _facetFunctionSelectors)

Gets all the function selectors supported by a specific facet.

  • Parameters:

    NameTypeDescription
    _facetaddressThe facet address.
  • Return Values:

    NameTypeDescription
    _facetFunctionSelectorsbytes4[]The selectors associated with a facet address.

facetAddresses

function facetAddresses() external view returns (address[] facetAddresses_)

Get all the facet addresses used by a diamond.

  • Return Values:

    NameTypeDescription
    facetAddresses_address[]

facetAddress

function facetAddress(bytes4 _functionSelector) external view returns (address facetAddress_)

Gets the facet that supports the given selector.

If facet is not found return address(0).

  • Parameters:

    NameTypeDescription
    _functionSelectorbytes4The function selector.
  • Return Values:

    NameTypeDescription
    facetAddress_addressThe facet address.

supportsInterface

function supportsInterface(bytes4 _interfaceId) external view returns (bool)