Params
Parameters for functions contained in the periphery contracts:
CreateAndInitBattleParams
The parameters for creating and initializing a battle
Params:
Name
Type
Description
bk
BattleKey
The battle key containing a pool's specifications
sqrtPriceX96
uint160
The starting sqrtPrice of the pool
AddLiquidityParams
The parameters for adding liquidity to a battle
Params:
Name
Type
Description
battleKey
BattleKey
The battle key
recipient
address
The address that receives the NFT
tickLower
int24
The lower tick of the position
tickUpper
int24
The upper tick of the position
liquidityType
LiquidityType
Specifies the type of liquidity seeded to the position is collateral, Spear, or Shield
amount
uint128
The amount of collateral, Spear or Shield to add
deadline
uint256
The deadline of the transaction
TradeParams
Represents the parameters for a trade
Params:
Name
Type
Description
battleKey
BattleKey
The battle key
tradeType
TradeType
The trade type (buy Spear or buy Shield)
amountSpecified
uint256
How much collateral input or SToken output amount to be swapped in/out
recipient
address
The address to receive the output of the swap
amountOutMin
uint256
The minimum amount of Spear or Shield output to receive
sqrtPriceLimitX96
uint160
The maximum/minimum Q64.96 sqrtPrice limit. When reached, the trade is completed
deadline
uint256
The deadline of the transaction
Last updated