IGNSDiamondCut

Based on EIP-2535: Diamonds (https://eips.ethereum.org/EIPS/eip-2535) Follows diamond-3 implementation (https://github.com/mudgen/diamond-3-hardhat/) One of the diamond standard interfaces, used for diamond management.

diamondCut

function diamondCut(struct IDiamondStorage.FacetCut[] _diamondCut, address _init, bytes _calldata) external

Add/replace/remove any number of functions and optionally execute a function with delegatecall

Parameters

Name
Type
Description

_diamondCut

Contains the facet addresses and function selectors

_init

address

The address of the contract or facet to execute _calldata

_calldata

bytes

A function call, including function selector and arguments _calldata is executed with delegatecall on _init

DiamondCut

event DiamondCut(struct IDiamondStorage.FacetCut[] _diamondCut, address _init, bytes _calldata)

Emitted when function selectors of a facet of the diamond is added, replaced, or removed

Parameters

Name
Type
Description

_diamondCut

struct IDiamondStorage.FacetCut[]

Contains the update data (facet addresses, action, function selectors)

_init

address

The address of the contract or facet to execute _calldata

_calldata

bytes

Function call to execute after the diamond cut

InitializationFunctionReverted

error InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata)

InvalidFacetCutAction

error InvalidFacetCutAction()

NotContract

error NotContract()

NotFound

error NotFound()

Last updated