DiamondCut
event that reports all functions/facets that are added/replaced/removed on a diamond, making upgrades on diamonds transparent.AavegotchiFacet
, CollateralFacet
, ItemsFacet
etc, are added to AavegotchiDiamond when it is deployed.In the diamond industry a loupe is a small magnifying glass used to look at diamonds.
facetAddresses()
function returns all the Ethereum addresses of all facets used by a diamond.facetFunctionSelectors(address _facet)
function is used to return all the 4-byte function selectors of a facet that is used by a diamond. The 4-byte function selectors and the ABI of a facet are used to get the function names and arguments.facetAddress(bytes4 _functionSelector)
function returns the facet address used by a diamond for the 4-byte function selector that is provided.facets()
function returns all the facet addresses and function selectors used by a diamond.diamondCut
function to upgrade diamonds.diamondCut
function can be used to add and/or replace and/or remove any number of functions in a single transactions. This enables a number of specific changes to occur at the same time which prevents a diamond from getting into a bad or inconsistent state.DiamondCut
event is emitted. This provides a historical and transparent record of all changes to a diamond over time.DiamondCut
event must be emitted for all functions that are added, replaced or removed.diamondCut
function. It has no custom upgrade functions. See the governance section about upgrading AavegotchiDiamond.