Abstract
GNSDiamondCut
Based on EIP-2535: Diamonds (https://eips.ethereum.org/EIPS/eip-2535) Follows diamond-3 implementation (https://github.com/mudgen/diamond-3-hardhat/) Manages all actions (calls, updates and initializations) related to the diamond and its facets.
Forwards call to the right facet using msg.sig using delegatecall. Reverts if signature is not known.
Allows the contract to receive ether
Add/replace/remove any number of functions and optionally execute a function with delegatecall
Internal function for diamondCut()
Adds the facet if it wasn’t added yet, and adds its functions to the diamond
Updates facet contract address for given function selectors
Removes some function selectors of a facet from diamond
Adds a new facet contract address to the diamond
Adds a new function to the diamond for a given facet contract
Removes a function from a facet of the diamond
Initializes a facet after updating the diamond using delegatecall
Reverts if the given address is not a contract
