DiamondLoupeFacet

Git Source

Inherits: IDiamondLoupe, DiamondLoupeBase, Facet

Functions

DiamondLoupe_init

function DiamondLoupe_init() external onlyInitializing;

facets

Gets all facet addresses and the selectors of supported functions.

function facets() external view returns (Facet[] memory);

Returns

Name
Type
Description

<none>

Facet[]

facetInfo An array of Facet structs.

facetFunctionSelectors

Gets all the function selectors supported by a specific facet.

function facetFunctionSelectors(address facet) external view returns (bytes4[] memory);

Parameters

Name
Type
Description

facet

address

The facet address.

Returns

Name
Type
Description

<none>

bytes4[]

selectors An array of function selectors.

facetAddresses

Get all the facet addresses used by a diamond.

Returns

Name
Type
Description

<none>

address[]

facets The facet addresses.

facetAddress

Gets the facet that supports the given selector.

If facet is not found return address(0).

Parameters

Name
Type
Description

selector

bytes4

The function selector.

Returns

Name
Type
Description

<none>

address

facetAddress The facet address.

supportsInterface

Was this helpful?