Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
The Migration Facet contains functions related to Silo V3. Farmers are required to migrate to the new accounting system created by the Silo V3 upgrade.
Migrates a Farmer's Deposits from the old (Seasons based) to the new Silo (Stems based) accounting system.
When migrating an account, a user must submit all of the account's Deposits or the migration will not pass because the Seed check will fail. The Seed check adds up the BDV of all submitted Deposits, multiplies by the corresponding Seed amount for each token type, then compares that to the total Seeds stored for that user. If everything matches, the migration is valid.
Parameter | Type | Description |
---|---|---|
Migrate an account to Silo V3 that has no Deposits.
Gets balance of Seeds for a Farmer that hasn't migrated.
Gets a Farmer's balance of Grown Stalk at the time of Stems deployment (Silo V3 upgrade).
Locate the token amount and BDV for a Farmer's Deposit in legacy storage.
None.
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Return Value | Description |
---|---|
Parameter | Type | Description |
---|---|---|
Return Value | Description |
---|---|
Parameter | Type | Description |
---|---|---|
Return Value | Description |
---|---|
account
address
Address of the account to migrate.
tokens
address[]
Array of whitelisted token addresses to migrate.
seasons
uint256[][]
The Seasons for the Deposits.
amounts
uint256[][]
The amounts of those Deposits which are to be migrated.
stalkDiff
uint256
Discrepancy between the calculated Stalk and the actual Stalk the account has.
seedsDiff
uint256
Discrepancy between the calculated Seeds and the actual Seeds the account has.
proof
bytes32[]
The Merkle proof that confirms stalkDiff
and seedsDiff
.
account
address
Address of the account to migrate.
account
address
A Farmer's address.
uint256
Balance of Seeds for an unmigrated Farmer.
account
address
Address of Farmer.
uint256
Grown Stalk balance for account
at the time of Stems deployment.
account
address
Address of Farmer.
token
address
Whitelisted token address to get Deposit for.
season
uint32
Season of the Deposit in legacy storage.
uint128
Amount of token
of the Deposit in legacy storage.
uint128
BDV of the Deposit in legacy storage.