Season Facet
The Season Facet contains the gm function and handles all logic for Season changes.
Call Functions
Sunrise
function sunrise() external payable returns (uint256);Advances Beanstalk to the next Season, sending reward Beans to the caller's Circulating balance.
uint256
The number of Beans minted to the caller.
GM
function gm(
address account,
LibTransfer.To mode
) public payable returns (uint256);Advances Beanstalk to the next Season, sending reward Beans to a specified address and balance.
account
address
Indicates to which address reward Beans should be sent.
uint256
The number of Beans minted to the caller.
View Functions
Season
Returns the current Season number.
uint32
The current Season number.
Paused
Returns whether Beanstalk is Paused. When Paused, sunrise cannot be called.
bool
Whether Beanstalk is Paused.
Time
Returns the Season struct.
Season
The Season struct in App Storage.
Above Peg
Returns whether Beanstalk started this Season above or below peg.
bool
Whether Beanstalk started this Season above or below peg.
Sunrise Block
Returns the block during which the current Season started.
uint32
The block during which the current Season started.
Season Time
Returns the expected Season number given the current block timestamp. The sunrise function can be called when seasonTime() > season().
uint32
The expected Season number given the current block timestamp.
Weather
Returns the Weather struct.
Weather
Returns the Weather struct in App Storage.
Rain
Returns the Rain struct.
Rain
Returns the Rain struct in App Storage.
Plenty Per Root
Returns the Season of Plenty (SOP) rewards per Root for the given Season.
season
uint32
The Season to fetch SOP rewards per Root for.
uint256
The SOP rewards for the given Season.
Total deltaB
Returns the cumulative deltaB across all pools on the Oracle Whitelist.
deltaB
int256
The cumulative deltaB.
Pool deltaB
Returns the deltaB for a given pool.
pool
address
The address of the pool .
int256
The deltaB for the given pool.
Well Oracle Snapshot
Returns the last Well oracle snapshot for a given Well.
well
address
The address of the pool to get the snapshot for.
int256
Curve Oracle
Returns the last Curve oracle data snapshot for the BEAN:3CRV pool.
co
Storage.CurveMetapoolOracle
Last Curve oracle data snapshot.
Events
Sunrise
Emitted when the Season changes.
season
uint256
The new Season number.
Incentivization
Emitted when Beanstalk pays Beans to the sunrise caller.
account
address
The address to which the reward Beans were sent.
beans
uint256
The amount of Beans paid as a reward.
Reward
Emitted during Sunrise when Beans are distributed to the Field, the Silo, and Fertilizer.
season
uint32
The Season in which Beans were distributed.
toField
uint256
The number of Beans distributed to the Field.
toSilo
uint256
The number of Beans distributed to the Silo.
toFertilizer
uint256
The number of Beans distributed to Fertilizer holders.
Soil
Emitted during Sunrise when Beanstalk adjusts the amount of available Soil.
season
uint32
The Season in which Soil was adjusted.
soil
uint256
The new amount of Soil available.
Weather Change
Emitted when the Weather (now Temperature) changes.
season
uint256
The current Season.
change
int8
The change in Temperature from the previous value.
Season of Plenty
Emitted when Beans are minted during the Season of Plenty.
season
uint256
The Season in which Beans were minted for distribution.
amount
uint256
The amount of 3CRV which was received for swapping Beans.
toField
uint256
The amount of Beans which were distributed to remaining Pods in the Field.
Last updated