circle-exclamation
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
The Silo Facet handles Depositing, Withdrawing, and transferring Deposits (whitelisted assets in the Silo).
Stems keep track of when the Deposit was created. When the Deposit was created determines how much Grown Stalk per BDV the Deposit has.
Copy function deposit (
address token ,
uint256 _amount ,
LibTransfer . From mode
)
external
payable
nonReentrant
mowSender ( token )
returns ( uint256 amount , uint256 bdv , int96 stem ); Deposits ERC20 token into internal Farmer balances.
Address of the token to Deposit.
Amount of the token to be Deposited.
Return value
Type
Description
Amount of the token Deposited.
Withdraws a single Deposit.
Address of ERC20 being Withdrawn.
Stem of the Deposit to Withdraw.
Withdraws multiple Deposits.
Address of ERC20 being Withdrawn.
Stems of the Deposits to Withdraw.
Array of token amounts to Withdraw from corresponding stems.
Transfers single Farmer's Deposit.
Address of Deposited ERC20 being transferred.
Stem of Deposit to Transfer.
Amount of tokens to transfer.
Return Value
Type
Description
BDV now owned by recipient.
Transfers multiple Farmer Deposits.
Address of ERC20 being transferred.
Stems of Deposits to transfer.
Array of token amounts to transfer based on corresponding stems.
Return Value
Type
Description
Array of BDVs of each Deposit transferred.
Transfer a single Deposit, conforming to the ERC1155 standard.
ID of Deposit to transfer.
Amount of ERC1155 to transfer.
Transfer a single Deposit, conforming to the ERC1155 standard.
Array of IDs of Deposits to transfer.
Array of amounts of ERC1155 to transfer, corresponding to depositIds.
Yield Distribution
Claim Grown Stalk for an account for a particular whitelisted asset.
Address of ERC20 Deposit to Mow for.
Mow for multiple whitelisted assets for an account.
Array of addresses of ERC20 Deposits to Mow for.
Claim Earned Beans and their associated Stalk and Plantable Seeds for msg.sender.
Return Value
Type
Description
Amount of Earned Beans given.
Claims rewards from a Flood (Season of Plenty) for msg.sender.
Get the last Season in which account updated their Silo.
Last Season account updated their Silo.
Returns the total supply of Stalk. Does NOT include Grown Stalk.
Returns the total supply of Roots.
The total supply of Roots.
Returns the total supply of Earned Beans.
Total supply of Earned Beans.
Silo Account Balances
Returns the balance of Stalk for a particular Farmer. Does NOT include Grown Stalk; does include Earned Stalk.
Farmer to get the Stalk balance for.
Stalk balance of account.
Returns the balance of Roots for a particular Farmer.
Farmer to get the Roots balance for.
Roots balance of account.
Returns the balance of Grown Stalk for account. Grown Stalk is earned each Season from BDV and must be Mown to add it to a user's Stalk balance.
Farmer to get the Grown Stalk balance for.
Grown Stalk balance of account.
Returns the balance of Grown Stalk for a single deposit of token in stem for account.
Farmer that owns the Deposit to get the Grown Stalk balance for.
ERC20 token address of the Deposit.
Return Value
Type
Description
Returns the balance of Earned Beans for a Farmer.
Farmer to get the Earned Bean balance for.
Return Value
Type
Description
Earned Bean balance of account.
Return the account balance of Earned Stalk, the Stalk associated with Earned Beans.
Farmer to get the Earned Stalk balance for.
Earned Stalk balance of account.
Return the balance of Deposited BDV of a whitelisted asset for a given Farmer.
Farmer to get the Deposited BDV balance for.
Whitelisted asset to get the balance of Deposited BDV for.
Return Value
Type
Description
Balance of Deposited BDV given account and token.
Return the Stem at the time that a Farmer last Mowed a particular whitelisted asset.
Farmer to get the last Mowed Stem for.
Whitelisted asset to get the last Mowed Stem for.
Last Mowed Stem for token given account.
Return the Mow Status struct of token for a given account.
Farmer to get the Mow Status of.
Token to get the Mow Status of account for.
Season of Plenty (Flood)
Returns the last Season that a Season of Plenty started.
The last Season it started Flooding.
Returns the Farmer's balance of unclaimed 3CRV earned from the Season of Plenty.
Farmer to get the unclaimed 3CRV balance for.
Return Value
Type
Description
Unclaimed 3CRV balance of account.
Returns the account balance of Roots the last time it was Raining during a Silo update.
Farmer to get "Rain Roots" balance for.
Root balance last time it was Raining for account.
Returns the account Season of Plenty related state variables.
Farmer to get SOP related state variables for.
Return Value
Type
Description
Struct containing SOP related state variables.
Returns the "stemTip", or cumulative Grown Stalk Per BDV of a given Deposited asset since whitelist, for a given whitelisted token.
ERC20 token to get the Stem tip for.
Return Value
Type
Description
Returns the Stem tip for token.
Get the Stem associated with a particular Deposit (via its token and Season). Kept for legacy reasons.
ERC20 token of the Deposit.
Return Value
Type
Description
Gets the Seeds per token for legacy whitelisted assets. Calling with an non-legacy token will return 0, even after the token is whitelisted. Kept for legacy reasons.
Legacy token to get the Seeds for.
Seeds for the legacy token.
Returns the Season in which Beanstalk initialized Silo V3arrow-up-right , i.e., the Season in which Stems were initialized.
Season in which Stems were initialized.
Returns whether or not a Farmer needs to migrate to Silo V3arrow-up-right .
Farmer to check if migration is needed for.
Whether or not account needs to migrate to Silo V3.
Returns if Earned Beans from the previous gm call are still vesting. Vesting Earned Beans cannot be received via plant until the Vesting Period is over, and will be forfeited if a Farmer Withdraws during the Vesting Period.
Whether or not Earned Beans from the previous gm function call are still vesting.
Find the amount and BDV of token that a Farmer has Deposited in a given Stem.
Farmer to get Deposit data for.
ERC20 token of the Deposit.
Number of tokens in the Deposit.
Get the total amount of token currently Deposited in the Silo across all Farmers.
Whitelisted token address.
Total number of token Deposited in the Silo.
Get the total BDV of token currently Deposited in the Silo across all Farmers.
Whitelisted token address.
Total BDV of token Deposited in the Silo.
Get the Storage.SiloSettings for a whitelisted token.
Whitelisted token address.
Struct with Silo variables for token.
Returns the total BDV of a number of tokens on the Deposit Whitelist.
The whitelisted token address.
Gets the amount of tokens in a Deposit type for a given Farmer.
Farmer to get Deposit amount for.
Deposit ID corresponding to account.
Amount of tokens in a Deposit type for account.
Gets an array of amounts corresponding to Deposits.
List of Deposit IDs corresponding to accounts.
Array of amounts corresponding to the list of Deposits.
Gets the Deposit ID given an whitelisted token address and Stem.
Whitelisted token address.
Deposit ID of token with stem.
Emitted when the deposit associated with the Earned Beans of account are Planted.
Farmer that Planted their Earned Beans.
The amount of Earned Beans claimed.
Emitted when 3CRV paid to account during a Flood is claimed.
Farmer that claimed the assets.
The amount of 3CRV claimed by account.
Emitted when account gains or loses Stalk.
The Farmer whose Stalk balance changed.
Emitted when account adds a single Deposit to the Silo. There is no AddDeposits event because there is currently no operation in which Beanstalk creates multiple Deposits in different Stems.
The Farmer that added a Deposit to Beanstalk.
Whitelisted token address.
Token amount of the Deposit.
The BDV associated with amount of token at the time of Deposit.
Emitted when account removes a single Deposit from the Silo. Occurs during Withdraw and Convert.
The Farmer whose Deposit was removed.
Whitelisted token address.
The token amount of the Deposit.
The BDV associated with the Deposit.
Emitted when account removes multiple Deposits from the Silo. Occurs during Withdraw and Convert.
The Farmer whose Deposit was removed.
Whitelisted token address.
The token amounts of the Deposits, corresponding to stems.
The BDVs associated with the Deposits, corresponding to stems and amounts.
ERC-1155 event. Emitted when a Deposit is created, removed, or transferred.
The address that performed the operation.
The address the Deposit is being transferred from.
The address the Deposit is being transferred to.
The Deposit ID of the Deposit.
The amount of the Deposit.
ERC-1155 event. Emitted when multiple deposits are withdrawn or transferred.
The address that performed the operation.
The address the Deposit is being transferred from.
The address the Deposit is being transferred to.
The Deposit IDs of the Deposits.
The amounts of the Deposits.
Legacy event. This event is kept for backwards compatibility in order for the ABI to generate properly.
Farmer that claimed the Withdrawals.
Whitelisted token address.
Seasons of claimed Withdrawn assets.
Legacy event. This event is kept for backwards compatibility in order for the ABI to generate properly.
Farmer that claimed the Withdrawal.
Whitelisted token address.
Seasons of claimed Withdrawn asset.