LibVersion
getSelectorFacetAddress
function getSelectorFacetAddress(bytes4 _selector, struct IDiamondLoupe.Facet[] _facets) internal pure returns (address)
Retrieves the function selector's facet address from a list of Facet structs
Parameters
Name | Type | Description |
---|---|---|
_selector | bytes4 | function selector to look up |
_facets | struct IDiamondLoupe.Facet[] | Array of Facet structs that could contain the function selector |
getSelectorFacetCutAddress
function getSelectorFacetCutAddress(bytes4 _selector, struct IDiamondCut.FacetCut[] _facets) internal pure returns (address)
Retrieves the function selector's facet address from a list of FacetCut structs
Parameters
Name | Type | Description |
---|---|---|
_selector | bytes4 | function selector to look up |
_facets | struct IDiamondCut.FacetCut[] | Array of FacetCut structs that could contain the function selector |
diamondEquals
function diamondEquals(struct IDiamondLoupe.Facet[] _currentFacets, struct IDiamondCut.FacetCut[] _modelDiamondCut) internal pure returns (bool)
Compares two EIP-2535 Diamonds and checks if have same facets
Parameters
Name | Type | Description |
---|---|---|
_currentFacets | struct IDiamondLoupe.Facet[] | Current Diamond facets (array of Facut structs retrieved from the facets() function in the DiamondLouperFacet ) |
_modelDiamondCut | struct IDiamondCut.FacetCut[] | Model Diamond facets (as array of FacetCut structs) |