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
  • Claim Fertilized Beans
  • Mint Fertilizer
  • Add Fertilizer Owner
  • Pay Fertilizer
  • View Functions
  • Total Fertilized Beans
  • Total Unfertilized Beans
  • Total Fertilizer Beans
  • Get Fertilizer
  • Get Next
  • Get First
  • Get Last
  • Get Active Fertilizer
  • Is Fertilizing
  • Beans Per Fertilizer
  • Get Humidity
  • Get Current Humidity
  • Get End BPF
  • Remaining Recapitalization
  • Balance of Unfertilized
  • Balance of Fertilized
  • Balance of Fertilizer
  • Balance of Batch Fertilizer
  • Get Fertilizers
  • Events
  • Set Fertilizer
Edit on GitHub
Export as PDF
  1. Protocol
  2. Barn

Fertilizer Facet

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

The Fertilizer Facet handles the minting of Fertilizer and Beans paid to Fertilizer holders.

Call Functions

Claim Fertilized Beans

function claimFertilized(uint256[] calldata ids, LibTransfer.To mode)
    external
    payable;

WIP

Parameter
Type
Description

ids

uint256[]

WIP

mode

To

WIP

Mint Fertilizer

function mintFertilizer(
    uint128 amount,
    uint256 minLP,
    LibTransfer.From mode
) external payable;

WIP

Parameter
Type
Description

amount

uint128

WIP

minLP

uint256

WIP

mode

From

WIP

Add Fertilizer Owner

function addFertilizerOwner(
    uint128 id,
    uint128 amount,
    uint256 minLP
) external payable;

WIP

Parameter
Type
Description

id

uint128

WIP

amount

uint128

WIP

minLP

uint256

WIP

Pay Fertilizer

function payFertilizer(address account, uint256 amount) external payable

WIP

Parameter
Type
Description

account

address

WIP

amount

uint256

WIP

View Functions

Total Fertilized Beans

function totalFertilizedBeans() external view returns (uint256 beans);

WIP

Return Value
Type
Description

beans

uint256

WIP

Total Unfertilized Beans

function totalUnfertilizedBeans() external view returns (uint256 beans);

WIP

Return Value
Type
Description

beans

uint256

WIP

Total Fertilizer Beans

function totalFertilizerBeans() external view returns (uint256 beans);

WIP

Return Value
Type
Description

beans

uint256

WIP

Get Fertilizer

function getFertilizer(uint128 id) external view returns (uint256);

WIP

Parameter
Type
Description

id

uint128

WIP

Return Type
Description

uint256

WIP

Get Next

function getNext(uint128 id) external view returns (uint128);

WIP

Parameter
Type
Description

id

uint128

WIP

Return Type
Description

uint128

WIP

Get First

function getFirst() external view returns (uint128);

WIP

Return Type
Description

uint128

WIP

Get Last

function getLast() external view returns (uint128);

WIP

Return Type
Description

uint128

WIP

Get Active Fertilizer

function getActiveFertilizer() external view returns (uint256);

WIP

Return Type
Description

uint256

WIP

Is Fertilizing

function isFertilizing() external view returns (bool);

WIP

Return Type
Description

bool

WIP

Beans Per Fertilizer

function beansPerFertilizer() external view returns (uint128 bpf);

WIP

Return Value
Type
Description

bpf

uint128

WIP

Get Humidity

function getHumidity(uint128 _s) external pure returns (uint128 humidity);

WIP

Parameter
Type
Description

_s

uint128

WIP

Return Value
Type
Description

humidity

uint128

WIP

Get Current Humidity

function getCurrentHumidity() external view returns (uint128 humidity);

WIP

Return Value
Type
Description

humidity

uint128

WIP

Get End BPF

function getEndBpf() external view returns (uint128 endBpf);

WIP

Return Value
Type
Description

endBpf

uint128

WIP

Remaining Recapitalization

function remainingRecapitalization() external view returns (uint256);

WIP

Return Type
Description

uint256

WIP

Balance of Unfertilized

function balanceOfUnfertilized(address account, uint256[] memory ids)
    external
    view
    returns (uint256 beans);

WIP

Parameter
Type
Description

account

address

WIP

ids

uint256[]

WIP

Return Value
Type
Description

beans

uint256

WIP

Balance of Fertilized

function balanceOfFertilized(address account, uint256[] memory ids)
    external
    view
    returns (uint256 beans);

WIP

Parameter
Type
Description

account

address

WIP

ids

uint256[]

WIP

Return Value
Type
Description

beans

uint256

WIP

Balance of Fertilizer

function balanceOfFertilizer(address account, uint256 id)
    external
    view
    returns (IFertilizer.Balance memory);

WIP

Parameter
Type
Description

account

address

WIP

id

uint256

WIP

Return Type
Description

IFertilizer.Balance

WIP

Balance of Batch Fertilizer

function balanceOfBatchFertilizer(
    address[] memory accounts,
    uint256[] memory ids
) external view returns (IFertilizer.Balance[] memory);

WIP

Parameter
Type
Description

accounts

address[]

WIP

ids

uint256[]

WIP

Return Type
Description

IFertilizer.Balance[]

WIP

Get Fertilizers

function getFertilizers()
    external
    view
    returns (Supply[] memory fertilizers);

WIP

Return Value
Type
Description

fertilizers

Supply[]

WIP

Events

Set Fertilizer

event SetFertilizer(uint128 id, uint128 bpf);

WIP

Parameter
Type
Description

id

uint128

WIP

bpf

uint128

WIP

PreviousBarnNextUnripe Facet

Last updated 8 months ago

🌾