Libraries
Functionalities used by other contracts
Last updated
Functionalities used by other contracts
Last updated
Computes the amount of liquidity to be received by the pool, for a given amount of collateral and price range
Params:
Returns:
Computes the amount of liquidity to be received by the pool, for a given amount of Spear or Shield tokens and price range
Params:
Returns:
Provides validation for callbacks from battle
Verifies the arena address of the battle
Params:
Name
Type
Description
sqrtRatioX96
uint160
The current square root ratio
sqrtRatioAX96
uint160
A sqrt ratio
sqrtRatioBX96
uint160
Another sqrt ratio
amount
uint256
The seed collateral amount for minting the liquidity position
Name
Type
Description
liquidity
uint128
The amount of liquidity to be received by the pool
Name
Type
Description
sqrtRatioAX96
uint160
A sqrt ratio
sqrtRatioBX96
uint160
Another sqrt ratio
amount
uint256
The seed Spear or Shield amount for minting the liquidity position
Name
Type
Description
liquidity
uint128
The calculated liquidity amount
Name
Type
Description
arenaAddr
address
The address for the arena contract
battleKey
BattleKey
The battle Key containing a battle's specifications