Tags
The diamondCut function updates any number of functions from any number of facets in a single transaction. Executing all changes within a single transaction prevents data corruption which could occur in upgrades done over multiple transactions.
Diamond Cut Facet
docs.bean.money

BIP Runbooks will include a JSON file of the diamondCut data, and this data can be verified to be the same diamondCut data in the BIP on Safe.
A diamondCut has 3 inputs:
_diamondCut: An array ofFacetCuts(see below). This input can be empty._init: The address of the contract to execute_calldata. Essentially, if there is code that needs to be executed before each of theFacetCuts(such as changing data in storage, minting Beans, etc.), an init contract will be deployed with that code and_initwill be that contract’s address. This input can be the null address._calldata: A function call executed withdelegatecallon_init.
A FacetCut is a tuple with 3 items:
facetAddress: The facet address being added, changed or removed.action: 0 if the facet is being added, 1 if it is being replaced and 2 if it is being removed.functionSelectors: The function selectors infacetAddressthat are havingactiondone on them.
Louper, the Ethereum Diamond Inspector, is a way to verify which facets and function selectors are currently part of Beanstalk: https://louper.dev/diamond/0xc1e088fc1323b20bcbee9bd1b9fc9546db5624c5
Here’s an example of diamondCut data from BIP-24 (Safe transaction):
bip24.json8.1KB