FacetRegistry
Inherits: IFacetRegistry, FacetRegistryBase
Functions
addFacet
Registers a new facet.
function addFacet(address facet, bytes4[] memory selectors) external;
Parameters
facet
address
Address of the facet to add.
selectors
bytes4[]
Function selectors of the facet.
removeFacet
Removes a facet from the registry.
function removeFacet(address facet) external;
Parameters
facet
address
Address of the facet to remove.
deployFacet
Deploys a new facet and registers it.
function deployFacet(
bytes32 salt,
bytes memory creationCode,
bytes4[] memory selectors
)
external
override
returns (address facet);
Parameters
salt
bytes32
Salt used to create the address of the new facet.
creationCode
bytes
Creation code of the new facet.
selectors
bytes4[]
Function selectors of the new facet.
Returns
facet
address
Address of the new facet.
computeFacetAddress
Computes the address of a facet deployed with the given salt and creation code.
function computeFacetAddress(bytes32 salt, bytes memory creationCode) external view override returns (address facet);
Parameters
salt
bytes32
Salt used to create the address of the new facet.
creationCode
bytes
Creation code of the new facet.
facetSelectors
Returns the selectors of a registered facet.
function facetSelectors(address facet) external view returns (bytes4[] memory);
Parameters
facet
address
The address of the facet.
Returns
<none>
bytes4[]
selectors The selectors of the facet.
facetAddresses
Returns the addresses of all registered facets.
function facetAddresses() external view returns (address[] memory);
Returns
<none>
address[]
facets The addresses of all registered facets.
Was this helpful?