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.
Deposits ERC20 token into internal Farmer balances.
Withdraws a single Deposit.
Withdraws multiple Deposits.
Transfers single Farmer's Deposit.
Transfers multiple Farmer Deposits.
Transfer a single Deposit, conforming to the ERC1155 standard.
Transfer a single Deposit, conforming to the ERC1155 standard.
Claim Grown Stalk for an account for a particular whitelisted asset.
Mow for multiple whitelisted assets for an account.
Claim Earned Beans and their associated Stalk and Plantable Seeds for msg.sender
.
Claims rewards from a Flood (Season of Plenty) for msg.sender
.
Get the last Season in which account
updated their Silo.
Returns the total supply of Stalk. Does NOT include Grown Stalk.
Returns the total supply of Roots.
Returns the total supply of Earned Beans.
Returns the balance of Stalk for a particular Farmer. Does NOT include Grown Stalk; does include Earned Stalk.
Returns the balance of Roots for a particular Farmer.
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.
Returns the balance of Grown Stalk for a single deposit of token
in stem
for account
.
Returns the balance of Earned Beans for a Farmer.
Return the account
balance of Earned Stalk, the Stalk associated with Earned Beans.
Return the balance of Deposited BDV of a whitelisted asset for a given Farmer.
Return the Stem at the time that a Farmer last Mowed a particular whitelisted asset.
Return the Mow Status struct of token
for a given account
.
Returns the last Season that a Season of Plenty started.
Returns the Farmer's balance of unclaimed 3CRV earned from the Season of Plenty.
Returns the account
balance of Roots the last time it was Raining during a Silo update.
Returns the account
Season of Plenty related state variables.
Returns the "stemTip", or cumulative Grown Stalk Per BDV of a given Deposited asset since whitelist, for a given whitelisted token.
Get the Stem associated with a particular Deposit (via its token and Season). Kept for legacy reasons.
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.
Returns the Season in which Beanstalk initialized Silo V3, i.e., the Season in which Stems were initialized.
Returns whether or not a Farmer 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.
Find the amount and BDV of token
that a Farmer has Deposited in a given Stem.
Get the total amount of token
currently Deposited in the Silo across all Farmers.
Get the total BDV of token
currently Deposited in the Silo across all Farmers.
Get the Storage.SiloSettings
for a whitelisted token.
Returns the total BDV of a number of tokens on the Deposit Whitelist.
Gets the amount of tokens in a Deposit type for a given Farmer.
Gets an array of amounts corresponding to Deposits.
Gets the Deposit ID given an whitelisted token address and Stem.
Emitted when the deposit associated with the Earned Beans of account
are Planted.
Emitted when 3CRV paid to account
during a Flood is claimed.
Emitted when account
gains or loses Stalk.
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.
Emitted when account
removes a single Deposit from the Silo. Occurs during Withdraw and Convert.
Emitted when account
removes multiple Deposits from the Silo. Occurs during Withdraw and Convert.
ERC-1155 event. Emitted when a Deposit is created, removed, or transferred.
ERC-1155 event. Emitted when multiple deposits are withdrawn or transferred.
Legacy event. This event is kept for backwards compatibility in order for the ABI to generate properly.
Legacy event. This event is kept for backwards compatibility in order for the ABI to generate properly.
Parameter | Type | Description |
---|---|---|
Return value | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Return Value | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Return Value | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Return Value | Type | Description |
---|---|---|
Return Type | Description |
---|---|
Return Type | Description |
---|---|
Return Type | Description |
---|---|
Return Type | Description |
---|---|
Parameter | Type | Description |
---|---|---|
Return Type | Description |
---|---|
Parameter | Type | Description |
---|---|---|
Return Type | Description |
---|---|
Parameter | Type | Description |
---|---|---|
Return Type | Description |
---|---|
Parameter | Type | Description |
---|---|---|
Return Value | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Return Value | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Return Type | Description |
---|---|
Parameter | Type | Description |
---|---|---|
Return Value | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Return Value | Description | |
---|---|---|
Parameter | Type | Description |
---|---|---|
Type |
---|
Return Value | Description |
---|---|
Parameter | Type | Description |
---|---|---|
Return Value | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Return Value | Description |
---|---|
Parameter | Type | Description |
---|---|---|
Return Value | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Return Value | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Return Value | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Return Type | Description |
---|---|
Return Type | Description |
---|---|
Parameter | Type | Description |
---|---|---|
Return Type | Description |
---|---|
Return Type | Description |
---|---|
Parameter | Type | Description |
---|---|---|
Return Value | Description |
---|---|
Parameter | Type | Description |
---|---|---|
Return Type | Description |
---|---|
Parameter | Type | Description |
---|---|---|
Return Type | Description |
---|---|
Parameter | Type | Description |
---|---|---|
Return Type | Description |
---|---|
Parameter | Type | Description |
---|---|---|
Type |
---|
Parameter | Type | Description |
---|---|---|
Return Type | Description |
---|---|
Parameter | Type | Description |
---|---|---|
Return Type | Description |
---|---|
Parameter | Type | Description |
---|---|---|
Return Type | Description |
---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
token
address
Address of the token to Deposit.
_amount
uint256
Amount of the token to be Deposited.
mode
From
The balance to transfer the token from; see LibTransfer.From
.
amount
address
Amount of the token Deposited.
bdv
uint256
BDV of the Deposit.
stem
int96
Stem of the Deposit.
token
address
Address of ERC20 being Withdrawn.
stem
int96
Stem of the Deposit to Withdraw.
amount
uint256
Tokens to be Withdrawn.
mode
To
The balance to transfer the token to; see LibTransfer.To
.
token
address
Address of ERC20 being Withdrawn.
stems
int96[]
Stems of the Deposits to Withdraw.
amounts
uint256[]
Array of token amounts to Withdraw from corresponding stems
.
mode
To
The balance to transfer the token to; see LibTransfer.To
.
sender
address
Source of Deposit.
recipient
address
Destination of Deposit.
token
address
Address of Deposited ERC20 being transferred.
stem
int96
Stem of Deposit to Transfer.
amount
uint256
Amount of tokens to transfer.
bdv
uint256
BDV now owned by recipient
.
sender
address
Source of Deposit.
recipient
address
Destination of Deposit.
token
address
Address of ERC20 being transferred.
stem
int96[]
Stems of Deposits to transfer.
amounts
uint256[]
Array of token amounts to transfer based on corresponding stems
.
bdvs
uint256[]
Array of BDVs of each Deposit transferred.
sender
address
Source of Deposit.
recipient
address
Destination of Deposit.
depositId
uint256
ID of Deposit to transfer.
amount
uint256
Amount of ERC1155 to transfer.
sender
address
Source of Deposit.
recipient
address
Destination of Deposit.
depositIds
uint256[]
Array of IDs of Deposits to transfer.
amounts
uint256[]
Array of amounts of ERC1155 to transfer, corresponding to depositIds
.
account
address
Address to Mow for.
token
address
Address of ERC20 Deposit to Mow for.
account
address
Address to Mow for.
tokens
address[]
Array of addresses of ERC20 Deposits to Mow for.
beans
uint256
Amount of Earned Beans given.
stem
int96
Stem of the new Deposit.
uint32
Last Season account
updated their Silo.
uint256
Total supply of Stalk.
uint256
The total supply of Roots.
uint256
Total supply of Earned Beans.
account
address
Farmer to get the Stalk balance for.
uint256
Stalk balance of account
.
account
address
Farmer to get the Roots balance for.
uint256
Roots balance of account
.
account
address
Farmer to get the Grown Stalk balance for.
uint256
Grown Stalk balance of account
.
account
address
Farmer that owns the Deposit to get the Grown Stalk balance for.
token
address
ERC20 token address of the Deposit.
stem
int96
Stem of the Deposit.
grownStalk
uint
Grown Stalk for Deposit.
account
address
Farmer to get the Earned Bean balance for.
beans
uint256
Earned Bean balance of account
.
account
address
Farmer to get the Earned Stalk balance for.
uint256
Earned Stalk balance of account
.
account
address
Farmer to get the Deposited BDV balance for.
token
address
Whitelisted asset to get the balance of Deposited BDV for.
depositedBdv
uint256
Balance of Deposited BDV given account
and token
.
account
address
Farmer to get the last Mowed Stem for.
token
address
Whitelisted asset to get the last Mowed Stem for.
lastStem
int96
Last Mowed Stem for token
given account
.
account
address
Farmer to get the Mow Status of.
token
address
Token to get the Mow Status of account
for.
Account.MowStatus
uint32
The last Season it started Flooding.
account
address
Farmer to get the unclaimed 3CRV balance for.
plenty
uint256
Unclaimed 3CRV balance of account
.
account
address
Farmer to get "Rain Roots" balance for.
uint256
Root balance last time it was Raining for account
.
account
address
Farmer to get SOP related state variables for.
sop
AccountSeasonOfPlenty
Struct containing SOP related state variables.
token
address
ERC20 token to get the Stem tip for.
_stemTip
int96
Returns the Stem tip for token
.
token
address
ERC20 token of the Deposit.
season
uint32
Season of the Deposit.
stem
int96
Stem of the Deposit.
token
address
Legacy token to get the Seeds for.
uint256
Seeds for the legacy token.
uint16
Season in which Stems were initialized.
account
address
Farmer to check if migration is needed for.
bool
Whether or not account
needs to migrate to Silo V3.
bool
Whether or not Earned Beans from the previous gm
function call are still vesting.
account
address
Farmer to get Deposit data for.
token
address
ERC20 token of the Deposit.
stem
int96
Stem of the Deposit.
uint256
Number of tokens in the Deposit.
uint256
BDV of the Deposit.
token
address
Whitelisted token address.
uint256
Total number of token
Deposited in the Silo.
token
address
Whitelisted token address.
uint256
Total BDV of token
Deposited in the Silo.
token
address
Whitelisted token address.
Storage.SiloSettings
Struct with Silo variables for token
.
token
address
The whitelisted token address.
amount
uint256
The number of tokens.
uint256
account
address
Farmer to get Deposit amount for.
depositId
uint256
Deposit ID corresponding to account
.
amount
Amount of tokens in a Deposit type for account
.
accounts
address[]
List of Farmers.
depositIds
uint256[]
List of Deposit IDs corresponding to accounts
.
uint256[]
Array of amounts corresponding to the list of Deposits.
token
address
Whitelisted token address.
stem
int96
Stem of the Deposit.
uint256
Deposit ID of token
with stem
.
account
address
Farmer that Planted their Earned Beans.
beans
uint256
The amount of Earned Beans claimed.
account
address
Farmer that claimed the assets.
plenty
uint256
The amount of 3CRV claimed by account
.
account
address
The Farmer whose Stalk balance changed.
delta
int256
The change in Stalk.
deltaRoots
int256
The change in Roots.
account
address
The Farmer that added a Deposit to Beanstalk.
token
address
Whitelisted token address.
stem
int96
The Stem of the Deposit.
amount
uint256
Token amount of the Deposit.
bdv
uint256
The BDV associated with amount
of token
at the time of Deposit.
account
address
The Farmer whose Deposit was removed.
token
address
Whitelisted token address.
stem
int96
The Stem of the Deposit.
amount
uint256
The token amount of the Deposit.
bdv
uint256
The BDV associated with the Deposit.
account
address
The Farmer whose Deposit was removed.
token
address
Whitelisted token address.
stems
uint32[]
Stems of the Deposits.
amounts
uint256[]
The token amounts of the Deposits, corresponding to stems
.
amount
uint256
Sum of amounts
.
bdvs
uint256[]
The BDVs associated with the Deposits, corresponding to stems
and amounts
.
operator
address
The address that performed the operation.
from
address
The address the Deposit is being transferred from.
to
address
The address the Deposit is being transferred to.
id
uint256
The Deposit ID of the Deposit.
value
uint256
The amount of the Deposit.
operator
address
The address that performed the operation.
from
address
The address the Deposit is being transferred from.
to
address
The address the Deposit is being transferred to.
ids
uint256[]
The Deposit IDs of the Deposits.
values
uint256[]
The amounts of the Deposits.
account
address
Farmer that claimed the Withdrawals.
token
address
Whitelisted token address.
seasons
uint32[]
Seasons of claimed Withdrawn assets.
amount
uint256
Amount of claimed asset.
account
address
Farmer that claimed the Withdrawal.
token
address
Whitelisted token address.
season
uint32
Seasons of claimed Withdrawn asset.
amount
uint256
Amount of claimed asset.