xWin Swap V3
xWinSwapV3
SwapMethod
SwapInfo
Received
receive
onlyExecutor
swapData
Mapping containing swapInfo, for swap pair fromToken, toToken
executors
priceMaster
initialize
swapTokenToToken
Swap tokens using xWin Swap
Parameters
_amount
uint256
Amount of tokens to swap
_fromToken
address
Token to swap
_toToken
address
Token to receive
swapTokenToToken
Swap tokens using xWin Swap with slippage
Parameters
_amount
uint256
Amount of tokens to swap
_fromToken
address
Token to swap
_toToken
address
Token to receive
_slippage
uint32
Slippage for the swap
internalSwap
Main logic for swapping tokens
_swapV2
makes swaps using a uniswapV2 style router
_swapV3
makes direct swap using a uniswapV3 style router
_swapV3Multihop
makes a multihop swap using a uniswapV3 style router
getSwapData
View function to get swapInfo for a swap pair
Parameters
_fromtoken
address
Token to swap
_totoken
address
Token to receive
Return Values
_swapInfo
struct xWinSwapV3.SwapInfo
SwapInfo for the swap pair
addTokenPath
_xWinStratSwap
This function handles xWinStrategy Token swaps
check if input tokens are xWinStrategies, if yes handle the swap and return true else return false
adminMoveToken
setPriceMaster
setExecutor
depositToStrategy
withdrawFromStrategy
Last updated