> For the complete documentation index, see [llms.txt](https://docs.forgenie.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.forgenie.com/specification/diamond-foundry/facets/diamondcutfacet.md).

# DiamondCutFacet

[Git Source](https://github.com/Forgenie/diamond-foundry/blob/e69a7af04e0636b77b9dd15df62c58172ec045da/src/facets/cut/DiamondCutFacet.sol)

**Inherits:** IDiamondCut, DiamondCutBase, Facet

## Functions

### DiamondCut\_init

```solidity
function DiamondCut_init() external onlyInitializing;
```

### diamondCut

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

```solidity
function diamondCut(
    IDiamond.FacetCut[] memory facetCuts,
    address init,
    bytes memory initData
)
    external
    onlyDiamondOwner
    reinitializer(_nextVersion());
```

**Parameters**

| Name        | Type                  | Description                                                                                            |
| ----------- | --------------------- | ------------------------------------------------------------------------------------------------------ |
| `facetCuts` | `IDiamond.FacetCut[]` | Contains the facet addresses and function selectors.                                                   |
| `init`      | `address`             | The address of the contract or facet to execute initData.                                              |
| `initData`  | `bytes`               | A function call, including function selector and arguments executed with delegatecall on address init. |
