UniV4StandardModuleResolver

Git Source

Inherits: IResolver, IUniV4StandardModuleResolver

State Variables

poolManager

address public immutable poolManager;

Functions

constructor

constructor( address poolManager_ );

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'.

computeMintAmounts

function computeMintAmounts( uint256 current0_, uint256 current1_, uint256 totalSupply_, uint256 amount0Max_, uint256 amount1Max_ ) public pure returns (uint256 mintAmount);