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
  • View Functions
  • Facets
  • Facet Function Selectors
  • Facet Addresses
  • Facet Address
  • Supports Interface
  • Events
Edit on GitHub
Export as PDF
  1. Protocol
  2. Diamond

Diamond Loupe Facet

PreviousDiamond Cut FacetNextOwnership 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 Diamond Loupe Facet allows anyone to see the available functions within Beanstalk.

Call Functions

None.

View Functions

function facets() external view override returns (Facet[] memory facets_);

Returns facet info for all facets of Beanstalk

Return Value
Type
Description

facets_

Facet[]

Array of facet info.

function facetFunctionSelectors(address _facet)
    external
    view
    override
    returns (bytes4[] memory facetFunctionSelectors_);

Returns all the function selectors provided by a facet.

Parameter
Type
Description

_facet

address

Facet to get selectors for.

Return Value
Type
Description

facetFunctionSelectors_

bytes4[]

Selectors on _facet.

function facetAddresses() 
    external 
    view 
    override 
    returns (address[] memory facetAddresses_);

Get all the facet addresses used by the Beanstalk Diamond.

Return Value
Type
Description

facetAddresses_

address[]

All facet addresses used by Beanstalk.

function facetAddress(bytes4 _functionSelector)
    external
    view
    override
    returns (address facetAddress_);

Gets the facet that supports the given selector.

Parameter
Type
Description

_functionSelector

bytes4

Selector to get the corresponding facet for.

Return Value
Type
Description

facetAddress_

address

Facet that has _functionSelector.

function supportsInterface(bytes4 _interfaceId) 
    external 
    view 
    override 
    returns (bool);
Parameter
Type
Description

_interfaceId

bytes4

The interface ID, as specified in ERC-165.

Return Type
Description

bool

True if the contract implements _interfaceId, false otherwise.

Events

None.

Returns if a contract implements an interface. Implements .

🌾
Facets
Facet Function Selectors
Facet Addresses
Facet Address
Supports Interface
ERC-165