Convert Getters Facet

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

The Convert Getters Facet contains view functions for Convert data.

Call Functions

None.

View Functions

function getMaxAmountIn(address tokenIn, address tokenOut)
    external
    view
    returns (uint256 amountIn);

Estimate the maximum number of tokens that can currently be Converted from tokenIn to tokenOut.

ParameterTypeDescription

tokenIn

address

The whitelisted token to estimate Converting from.

tokenOut

address

The whitelisted token to estimate Converting to.

Return ValueTypeDescription

amountIn

uint256

The maximum number of tokens that can currently be Converted from tokenIn to tokenOut.

function getAmountOut(
    address tokenIn,
    address tokenOut,
    uint256 amountIn
) external view returns (uint256 amountOut);

Estimate the amount of tokens received from Converting tokenIn to tokenOut given an amount of tokenIn.

ParameterTypeDescription

tokenIn

address

The whitelisted token to estimate Converting from.

tokenOut

address

The whitelisted token to estimate Converting to.

Return ValueTypeDescription

amountOut

uint256

The amount of tokenOut received from a Conversion from tokenIn to tokenOut.

Events

None.

Last updated