# Diamond Cut Facet

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

The Diamond Cut Facet is used by the owner to upgrade Beanstalk.

## Call Functions

### [Diamond Cut](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/diamond/DiamondCutFacet.sol#L22)

```solidity
function diamondCut(
    FacetCut[] calldata _diamondCut,
    address _init,
    bytes calldata _calldata
) external override;
```

Add, replace, and/or remove any number of functions and optionally execute a function with `delegatecall`. Can only be called by the owner of Beanstalk.

| Parameter     | Type         | Description                                                                                                          |
| ------------- | ------------ | -------------------------------------------------------------------------------------------------------------------- |
| `_diamondCut` | `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`). |

## View Functions

None.

## Events

None.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bean.money/developers/protocol/diamond/diamond-cut-facet.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
