šŸŽ‰ Welcome to PartyFinance documentation!
Protocol
Contracts
libraries
LibVersion

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

NameTypeDescription
_selectorbytes4function selector to look up
_facetsstruct 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

NameTypeDescription
_selectorbytes4function selector to look up
_facetsstruct 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

NameTypeDescription
_currentFacetsstruct IDiamondLoupe.Facet[]Current Diamond facets (array of Facut structs retrieved from the facets() function in the DiamondLouperFacet)
_modelDiamondCutstruct IDiamondCut.FacetCut[]Model Diamond facets (as array of FacetCut structs)