IResolver

Git Source

Functions

getMintAmounts

getMintAmounts used to get the shares we can mint from some max amounts.

function getMintAmounts(
    address vault_,
    uint256 maxAmount0_,
    uint256 maxAmount1_
)
    external
    view
    returns (
        uint256 shareToMint,
        uint256 amount0ToDeposit,
        uint256 amount1ToDeposit
    );

Parameters

NameTypeDescription
vault_addressmeta vault address.
maxAmount0_uint256maximum amount of token0 user want to contribute.
maxAmount1_uint256maximum amount of token1 user want to contribute.

Returns

NameTypeDescription
shareToMintuint256maximum amount of share user can get for 'maxAmount0*' and 'maxAmount1*'.
amount0ToDeposituint256amount of token0 user should deposit into the vault for minting 'shareToMint'.
amount1ToDeposituint256amount of token1 user should deposit into the vault for minting 'shareToMint'.