Quoter
Gets the expected token deltas without executing a swap or providing liquidity. Returns position information for liquidity providers.
Last updated
Gets the expected token deltas without executing a swap or providing liquidity. Returns position information for liquidity providers.
Last updated
Callback function that handles the result of a trade. It reverts with the trade amounts.
Params:
Parses a revert reason that should contain the numeric quote
Params:
Returns:
Returns the amounts to spend or receive for a given exact input swap without executing the swap
Params:
Returns:
Calculates the amount of Spear or shield tokens based on the given liquidity
Params:
Returns:
Calculates the amount of Spear or shield tokens based on the given amount of seed collateral when a liquidity position is created
Params:
Returns:
Gets the position information for the given token ID
Params:
Returns:
Gets the position information for the given token ID
Params:
Returns:
Gets the positions for the given account
Params:
Returns:
Name
Type
Description
cAmount
uint256
Amount of collateral token input spent to be spent for the trade
sAmount
uint256
Amount of Spear or Shield token output to be received for the trade
data
bytes
Data passed through by the caller
Name
Type
Description
reason
bytes
The revert reason bytes
Type
Description
uint256
The first parsed value
uint256
The second parsed value
Name
Type
Description
BattleTradeParams
memory
Parameters for a trade action. See Params
battleAddr
address
The address of the battle contract
Name
Type
Description
spend
uint256
The amount of collateral to spend
get
uint256
The amount of Spear or shield to receive
Name
Type
Description
AddLiqParams
params
Params required for adding liquidity. See Params
Name
Type
Description
SToken
uint256
The amount of Spear or Shield token calculated based on the given liquidity
Name
Type
Description
sqrtPriceX96
uint160
The current sqrt price
tickLower
int24
The lower tick boundary of the position
tickUpper
int24
The upper tick boundary of the position
amount
uint256
The seed collateral amount for minting the liquidity position
Type
Description
uint256
The amount of Spear or Shield token calculated based on the given liquidity
Name
Type
Description
tokenId
uint256
The ID of the NFT that represents the liquidity position
Type
Description
Position
The position data
Name
Type
Description
tokenId
uint256
The ID of the NFT that represents the liquidity position
Type
Description
Position
The position data
Name
Type
Description
account
address
The account address
Name
Type
Description
Position
memory
Position details