FacetRegistry

Git Sourcearrow-up-right

Inherits: IFacetRegistry, FacetRegistryBase

Functions

addFacet

Registers a new facet.

function addFacet(address facet, bytes4[] memory selectors) external;

Parameters

Name
Type
Description

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

Name
Type
Description

facet

address

Address of the facet to remove.

deployFacet

Deploys a new facet and registers it.

Parameters

Name
Type
Description

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

Name
Type
Description

facet

address

Address of the new facet.

computeFacetAddress

Computes the address of a facet deployed with the given salt and creation code.

Parameters

Name
Type
Description

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.

Parameters

Name
Type
Description

facet

address

The address of the facet.

Returns

Name
Type
Description

<none>

bytes4[]

selectors The selectors of the facet.

facetAddresses

Returns the addresses of all registered facets.

Returns

Name
Type
Description

<none>

address[]

facets The addresses of all registered facets.