Beanstalk
  • Agronomics Handbook
  • Farmers' Almanac
  • Whitepaper
  • Contract Addresses
  • 🌱Overview
    • Introduction
    • Development Ethos
    • EIP-2535 Diamond
    • App Storage
    • Internal Balances
  • 🌾Protocol
    • Overview
    • Louper
    • Sun
      • Season Facet
    • Silo
      • Silo Facet
      • BDV Facet
      • Whitelist Facet
      • Convert Facet
      • Convert Getters Facet
      • Enroot Facet
      • Approval Facet
      • Metadata Facet
      • Migration Facet
      • Legacy Claim Withdrawal Facet
    • Field
      • Field Facet
      • Fundraiser Facet
    • Barn
      • Fertilizer Facet
      • Unripe Facet
    • Market
      • Marketplace Facet
    • Farm
      • Farm Facet
      • Depot Facet
      • Token Facet
      • Token Support Facet
      • Curve Facet
    • Diamond
      • Diamond Cut Facet
      • Diamond Loupe Facet
      • Ownership Facet
      • Pause Facet
  • 📜Misc.
    • Technical Recordings
    • Upgrade History
    • FAQ
    • Terminology Discrepancies
Powered by GitBook
On this page
  • Call Functions
  • Chop
  • Pick
  • Add Unripe Token
  • View Functions
  • Picked
  • Get Underlying
  • Get Penalty
  • Get Penalized Underlying
  • _Get Penalized Underlying
  • Is Unripe
  • Balance Of Underlying
  • Balance Of Penalized Underlying
  • Get Recap Funded Percent
  • Get Percent Penalty
  • Get Recap Paid Percent
  • Get Recap Paid Percent Amount
  • Get Underlying Per Unripe Token
  • Get Total Underlying
  • Get Underlying Token
  • Events
  • Add Unripe Token
  • Change Underlying
  • Chop
  • Pick
Edit on GitHub
Export as PDF
  1. Protocol
  2. Barn

Unripe Facet

PreviousFertilizer FacetNextMarket

Last updated 7 months ago

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

The Unripe Facet handles logic for the vesting of Unripe assets.

Call Functions

function chop(
    address unripeToken,
    uint256 amount,
    LibTransfer.From fromMode,
    LibTransfer.To toMode
) external payable nonReentrant returns (uint256 underlyingAmount);

WIP

Parameter
Type
Description

unripeToken

address

WIP

amount

uint256

WIP

fromMode

From

WIP

toMode

To

WIP

Return Value
Type
Description

underlyingAmount

uint256

WIP

function pick(
    address token,
    uint256 amount,
    bytes32[] memory proof,
    LibTransfer.To mode
) external payable nonReentrant;

WIP

Parameter
Type
Description

token

address

WIP

amount

uint256

WIP

proof

bytes32[]

WIP

mode

To

WIP

function addUnripeToken(
    address unripeToken,
    address underlyingToken,
    bytes32 root
) external payable nonReentrant;

WIP

Parameter
Type
Description

unripeToken

address

WIP

underlyingToken

address

WIP

root

bytes32

WIP

View Functions

function picked(address account, address token)
    public
    view
    returns (bool);

WIP

Parameter
Type
Description

account

address

WIP

token

address

WIP

Return Type
Description

bool

WIP

function getUnderlying(address unripeToken, uint256 amount)
    public
    view
    returns (uint256 redeem);

WIP

Parameter
Type
Description

unripeToken

address

WIP

amount

uint256

WIP

Return Value
Type
Description

redeem

uint256

WIP

function getPenalty(address unripeToken)
    external
    view
    returns (uint256 penalty);

WIP

Parameter
Type
Description

unripeToken

address

WIP

Return Value
Type
Description

penalty

uint256

WIP

function getPenalizedUnderlying(address unripeToken, uint256 amount)
    public
    view
    returns (uint256 redeem);

WIP

Parameter
Type
Description

unripeToken

address

WIP

amount

uint256

WIP

Return Value
Type
Description

redeem

uint256

WIP

function _getPenalizedUnderlying(address unripeToken, uint256 amount, uint256 supply)
    public
    view
    returns (uint256 redeem);

WIP

Parameter
Type
Description

unripeToken

address

WIP

amount

uint256

WIP

supply

uint256

WIP

Return Value
Type
Description

redeem

uint256

WIP

function isUnripe(address unripeToken) public view returns (bool unripe);

WIP

Parameter
Type
Description

unripeToken

address

WIP

Return Value
Type
Description

unripe

bool

WIP

function balanceOfUnderlying(address unripeToken, address account)
    external
    view
    returns (uint256 underlying);

WIP

Parameter
Type
Description

unripeToken

address

WIP

account

address

WIP

Return Value
Type
Description

underlying

uint256

WIP

function balanceOfPenalizedUnderlying(address unripeToken, address account)
    external
    view
    returns (uint256 underlying);

WIP

Parameter
Type
Description

unripeToken

address

WIP

account

address

WIP

Return Value
Type
Description

underlying

uint256

WIP

function getRecapFundedPercent(address unripeToken)
    public
    view
    returns (uint256 percent);

WIP

Parameter
Type
Description

unripeToken

address

WIP

Return Value
Type
Description

percent

uint256

WIP

function getPercentPenalty(address unripeToken)
    external
    view
    returns (uint256 penalty);

WIP

Parameter
Type
Description

unripeToken

address

WIP

Return Value
Type
Description

penalty

uint256

WIP

function getRecapPaidPercent() external view returns (uint256 penalty);

WIP

Return Value
Type
Description

penalty

uint256

WIP

function getRecapPaidPercentAmount(uint256 amount)
    private
    view
    returns (uint256 penalty);

WIP

Parameter
Type
Description

amount

uint256

WIP

Return Value
Type
Description

penalty

uint256

WIP

function getUnderlyingPerUnripeToken(address unripeToken)
    external
    view
    returns (uint256 underlyingPerToken);

WIP

Parameter
Type
Description

unripeToken

address

WIP

Return Value
Type
Description

underlyingPerToken

uint256

WIP

function getTotalUnderlying(address unripeToken)
    external
    view
    returns (uint256 underlying);

WIP

Parameter
Type
Description

unripeToken

address

WIP

Return Value
Type
Description

underlying

uint256

WIP

function getUnderlyingToken(address unripeToken)
    external
    view
    returns (address underlyingToken)

WIP

Parameter
Type
Description

unripeToken

address

WIP

Return Value
Type
Description

underlyingToken

address

WIP

Events

event AddUnripeToken(
    address indexed unripeToken,
    address indexed underlyingToken,
    bytes32 merkleRoot
);

WIP

Parameter
Type
Description

unripeToken

address

WIP

underlyingToken

address

WIP

merkleRoot

bytes32

WIP

event ChangeUnderlying(address indexed token, int256 underlying);

WIP

Parameter
Type
Description

token

address

WIP

underlying

int256

WIP

event Chop(
    address indexed account,
    address indexed token,
    uint256 amount,
    uint256 underlying
);

WIP

Parameter
Type
Description

account

address

WIP

token

address

WIP

amount

uint256

WIP

underlying

uint256

WIP

event Pick(
    address indexed account,
    address indexed token,
    uint256 amount
);

WIP

Parameter
Type
Description

account

address

WIP

token

address

WIP

amount

uint256

WIP

🌾
Chop
Pick
Add Unripe Token
Picked
Get Underlying
Get Penalty
Get Penalized Underlying
_Get Penalized Underlying
Is Unripe
Balance Of Underlying
Balance Of Penalized Underlying
Get Recap Funded Percent
Get Percent Penalty
Get Recap Paid Percent
Get Recap Paid Percent Amount
Get Underlying Per Unripe Token
Get Total Underlying
Get Underlying Token
Add Unripe Token
Change Underlying
Chop
Pick