DiamondLoupe Facet Functions
Facet Overview
DiamondLoupe Facet helps us see what other facets, function selectors, and facet addresses, the Diamond contract is pointing. All it's functions are expected to be called frequently by tools.
Function Selectors
Every time a function is called the EVM (Ethereum Virtual Machine) reads the first 4 bytes of calldata, which specifies the function we are looking to call. This 4 bytes are called the "function selector" and it is the way the Diamond contract knows exactly about the function.
Function Overview
Functions are divided into writeable & read-only functions.
DiamondLoupe Facet function overview
Writeable functions
On this facet there's none writeable functions
Read-only functions
facets
returns (Facets[])
Returns all facets and their selectors. Facets[] consists of facet address and an array of function selectors
facetFunctionSelectors
address _facet
returns (bytes4[])
Returns all the function selectors provided by a given facet's address
facetAddresses
returns (adress[])
Returns all the facet's addresses used by the Diamond
facetAddress
bytes4 functionSelector
returns (address)
Returns the facet that support the given selector
Last updated