Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
The Diamond Loupe Facet allows anyone to see the available functions within Beanstalk.
None.
Returns facet info for all facets of Beanstalk
facets_
Facet[]
Array of facet info.
Returns all the function selectors provided by a facet.
_facet
address
Facet to get selectors for.
facetFunctionSelectors_
bytes4[]
Selectors on _facet
.
Get all the facet addresses used by the Beanstalk Diamond.
facetAddresses_
address[]
All facet addresses used by Beanstalk.
Gets the facet that supports the given selector.
_functionSelector
bytes4
Selector to get the corresponding facet for.
facetAddress_
address
Facet that has _functionSelector
.
Returns if a contract implements an interface. Implements ERC-165.
_interfaceId
bytes4
The interface ID, as specified in ERC-165.
bool
True if the contract implements _interfaceId
, false otherwise.
None.
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
The Pause Facet handles the Pausing and Unpausing of Beanstalk.
Pause Beanstalk, which makes it such that the gm
function cannot be successfully called. Only callable by the owner of Beanstalk.
Unpause Beanstalk, which allows the gm
function to be successfully called at the top of the 2nd hour. The TWAP oracle and Season timer are reset as well.
None.
Emitted when Beanstalk is Paused.
timestamp
uint256
Timestamp of the current block when Beanstalk is Paused.
Emitted when Beanstalk is Unpaused.
timestamp
uint256
Timestamp of the current block when Beanstalk is Unpaused.
timePassed
uint256
How much time passed while Beanstalk was Paused.
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
The Ownership Facet handles the ownership of Beanstalk.
Transfers ownership of Beanstalk to a new address. Can only be called by the owner of Beanstalk.
_newOwner
address
The address to transfer ownership to.
Callable by candidate for ownership after a successful transferOwnership
function call.
Returns the address of the owner of Beanstalk.
owner_
address
The address of the owner of Beanstalk.
Returns the owner candidate of Beanstalk.
ownerCandidate_
address
The owner candidate of Beanstalk.
Emitted when ownership of Beanstalk is transferred.
previousOwner
address
The previous owner of Beanstalk.
newOwner
address
The new owner of Beanstalk.
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
The Diamond module contains various functions that require ownership of Beanstalk to execute in Beanstalk. This includes Pausing and Unpausing Beanstalk and upgrading Beanstalk via Diamond Cuts.
See EIP-2535 Diamond to read more about Beanstalk's upgradable proxy implementation.
The Diamond consists of 4 facets:
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
The Diamond Cut Facet is used by the owner to upgrade Beanstalk.
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.
None.
None.
_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
).