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
  • Dewhitelist Token
  • Whitelist Token
  • Whitelist Token with Encode Type
  • Update Stalk per BDV per Season for Token
  • View Functions
  • Events
  • Whitelist Token
  • Update Stalk per BDV per Season
  • Dewhitelist Token
Edit on GitHub
Export as PDF
  1. Protocol
  2. Silo

Whitelist Facet

PreviousBDV FacetNextConvert 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.

Whitelist Facet handles the whitelisting/dewhitelisting of assets on the .

Call Functions

function dewhitelistToken(address token) external payable;

Dewhitelists tokens on the Deposit Whitelist. A token can no longer be Deposited in the Silo after dewhitelisting. Can only be called by the owner of Beanstalk.

Parameter
Type
Description

token

address

The token address to dewhitelist.

function whitelistToken(
    address token,
    bytes4 selector,
    uint32 stalkIssuedPerBdv,
    uint32 stalkEarnedPerSeason
) external payable;

Adds a token to the Deposit Whitelist. Can only be called by the owner of Beanstalk.

Parameter
Type
Description

token

address

The token address to whitelist.

selector

bytes4

The selector for the BDV function of token.

stalkIssuedPerBdv

uint32

Stalk per BDV for token issued upon Deposit.

stalkEarnedPerSeason

uint32

Grown Stalk per BDV per Season for token.

function whitelistTokenWithEncodeType(
    address token,
    bytes4 selector,
    uint32 stalkIssuedPerBdv,
    uint32 stalkEarnedPerSeason,
    bytes1 encodeType
) external payable;

Adds a token to the Deposit Whitelist with an encodeType. Can only be called by the owner of Beanstalk.

Parameter
Type
Description

token

address

The token address to whitelist.

selector

bytes4

The selector for the BDV function of token.

stalkIssuedPerBdv

uint32

Stalk per BDV for token issued upon Deposit.

stalkEarnedPerSeason

uint32

Grown Stalk per BDV per Season for token.

encodeType

bytes1

The encode type that should be used to encode the BDV function call.

function updateStalkPerBdvPerSeasonForToken(
    address token,
    uint32 stalkEarnedPerSeason
) external payable;

Changes the Grown Stalk per BDV per Season for a token on the Deposit Whitelist. Can only be called by the owner of Beanstalk.

Parameter
Type
Description

token

address

The token address on the Deposit Whitelist.

stalkEarnedPerSeason

uint32

The new Grown Stalk per BDV per Season.

View Functions

None.

Events

event WhitelistToken(
    address indexed token,
    bytes4 selector,
    uint32 stalkEarnedPerSeason,
    uint256 stalkIssuedPerBdv
);

Emitted when a token is added to the Deposit Whitelist.

Parameter
Type
Description

token

address

The whitelisted token address.

selector

bytes4

The selector for the BDV function of token.

stalkEarnedPerSeason

uint32

Grown Stalk per BDV per Season for token.

stalkIssuedPerBdv

uint256

Stalk per BDV for token issued upon Deposit.

event UpdatedStalkPerBdvPerSeason(
    address indexed token,
    uint32 stalkEarnedPerSeason,
    uint32 season
);

Emitted when the Grown Stalk per BDV per Season for a token on the Deposit Whitelist is changed.

Parameter
Type
Description

token

address

The token address on the Deposit Whitelist.

stalkEarnedPerSeason

uint32

The new Grown Stalk per BDV per Season.

season

uint32

The current Season at the time of the change.

event DewhitelistToken(address indexed token);

Emitted when a token is removed from the Deposit Whitelist.

Parameter
Type
Description

token

address

The dewhitelisted token address.

🌾
Deposit Whitelist
Dewhitelist Token
Whitelist Token
Whitelist Token with Encode Type
Update Stalk per BDV per Season for Token
Whitelist Token
Update Stalk per BDV per Season
Dewhitelist Token