> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gains.trade/llms.txt
> Use this file to discover all available pages before exploring further.

# IGNSDiamondCut

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

## diamondCut

```solidity theme={null}
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 | [IDiamondStorage.FacetCut\[\]](/developer/technical-reference/contracts/interfaces/types/idiamondstorage#facetcut) | 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

```solidity theme={null}
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

```solidity theme={null}
error InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata)
```

## InvalidFacetCutAction

```solidity theme={null}
error InvalidFacetCutAction()
```

## NotContract

```solidity theme={null}
error NotContract()
```

## NotFound

```solidity theme={null}
error NotFound()
```
