Legacy Claim Withdrawal Facet

Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.

The Legacy Claim Withdrawal Facet allows anyone to Claim and read Withdrawals. Silo V3 removed the Withdrawal Freeze from the Silo. Withdrawing now directly sends ERC-20 tokens to the Farmer's Farm or Circulating balances instead of creating a Withdrawal.

Although new Withdrawals cannot be created, the claim Withdrawal functionality has been preserved in this facet to allow pre-existing unclaimed Withdrawals to still be claimed.

Call Functions

function claimWithdrawal(
    address token,
    uint32 season,
    LibTransfer.To mode
) external payable nonReentrant;

Claims tokens from a Withdrawal.

ParameterTypeDescription

token

address

Address of whitelisted token.

season

uint32

Season of Withdrawal to claim.

mode

To

The balance to transfer claimed assets to; see LibTransfer.To.

function claimWithdrawals(
    address token,
    uint32[] calldata seasons,
    LibTransfer.To mode
) external payable nonReentrant;

Claims tokens from multiple Withdrawals.

ParameterTypeDescription

token

address

Address of whitelisted token.

seasons

uint32[]

Array of Seasons to claim.

mode

To

The balance to transfer claimed assets to; see LibTransfer.To.

View Functions

function getWithdrawal(
    address account,
    address token,
    uint32 season
) external view returns (uint256);

Get the amount of token in the Withdrawal season for account.

ParameterTypeDescription

account

address

Farmer to get the Withdrawal for.

token

address

Token address of the Withdrawal.

season

uint32

Season of the Withdrawal.

Return ValueDescription

uint256

Amount of token Withdrawn for the Farmer in the given Season.

function getTotalWithdrawn(address token) external view returns (uint256);

Get the total amount of token currently Withdrawn from the Silo across all Farmers.

ParameterTypeDescription

token

address

The Withdrawn token address.

Return ValueDescription

uint256

Total amount of Withdrawn token.

Events

None.

Last updated