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

PreviousBarnNextUnripe Facet

Last updated 6 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 Fertilizer Facet handles the minting of Fertilizer and Beans paid to Fertilizer holders.

Call Functions

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

WIP

Parameter
Type
Description

ids

uint256[]

WIP

mode

To

WIP

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

WIP

Parameter
Type
Description

amount

uint128

WIP

minLP

uint256

WIP

mode

From

WIP

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

WIP

Parameter
Type
Description

id

uint128

WIP

amount

uint128

WIP

minLP

uint256

WIP

function payFertilizer(address account, uint256 amount) external payable

WIP

Parameter
Type
Description

account

address

WIP

amount

uint256

WIP

View Functions

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

WIP

Return Value
Type
Description

beans

uint256

WIP

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

WIP

Return Value
Type
Description

beans

uint256

WIP

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

WIP

Return Value
Type
Description

beans

uint256

WIP

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

WIP

Parameter
Type
Description

id

uint128

WIP

Return Type
Description

uint256

WIP

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

WIP

Parameter
Type
Description

id

uint128

WIP

Return Type
Description

uint128

WIP

function getFirst() external view returns (uint128);

WIP

Return Type
Description

uint128

WIP

function getLast() external view returns (uint128);

WIP

Return Type
Description

uint128

WIP

function getActiveFertilizer() external view returns (uint256);

WIP

Return Type
Description

uint256

WIP

function isFertilizing() external view returns (bool);

WIP

Return Type
Description

bool

WIP

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

WIP

Return Value
Type
Description

bpf

uint128

WIP

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

WIP

Parameter
Type
Description

_s

uint128

WIP

Return Value
Type
Description

humidity

uint128

WIP

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

WIP

Return Value
Type
Description

humidity

uint128

WIP

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

WIP

Return Value
Type
Description

endBpf

uint128

WIP

function remainingRecapitalization() external view returns (uint256);

WIP

Return Type
Description

uint256

WIP

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

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

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

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

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

WIP

Return Value
Type
Description

fertilizers

Supply[]

WIP

Events

event SetFertilizer(uint128 id, uint128 bpf);

WIP

Parameter
Type
Description

id

uint128

WIP

bpf

uint128

WIP

🌾
Claim Fertilized Beans
Mint Fertilizer
Add Fertilizer Owner
Pay Fertilizer
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
Set Fertilizer