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

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

Last updated