aUniswap docs
AUniswap
uniswapRouter02
Returns the address of the Uniswap swap router contract.
Return Values
uniswapv3Npm
Returns the address of the Uniswap NPM contract.
Return Values
weth
Returns the address of the Weth contract.
Return Values
constructor
swapExactTokensForTokens
Swaps amountIn
of one token for as much as possible of another token.
Setting amountIn
to 0 will cause the contract to look up its own balance, and swap the entire amount, enabling contracts to send tokens before calling this function.
Parameters
amountIn
uint256
The amount of token to swap.
amountOutMin
uint256
The minimum amount of output that must be received.
path
address[]
The ordered list of tokens to swap through.
to
address
The recipient address.
Return Values
amountOut
uint256
The amount of the received token.
swapTokensForExactTokens
Swaps as little as possible of one token for an exact amount of another token.
Parameters
amountOut
uint256
The amount of token to swap for.
amountInMax
uint256
The maximum amount of input that the caller will pay.
path
address[]
The ordered list of tokens to swap through.
to
address
The recipient address.
Return Values
amountIn
uint256
The amount of token to pay.
exactInputSingle
Swaps amountIn
of one token for as much as possible of another token.
Parameters
params
struct IV3SwapRouter.ExactInputSingleParams
The parameters necessary for the swap, encoded as ExactInputSingleParams
in memory.
Return Values
amountOut
uint256
The amount of the received token.
exactInput
Swaps amountIn
of one token for as much as possible of another along the specified path.
Parameters
params
struct IV3SwapRouter.ExactInputParams
The parameters necessary for the multi-hop swap, encoded as ExactInputParams
in memory.
Return Values
amountOut
uint256
The amount of the received token.
exactOutputSingle
Swaps as little as possible of one token for amountOut
of another token.
Parameters
params
struct IV3SwapRouter.ExactOutputSingleParams
The parameters necessary for the swap, encoded as ExactOutputSingleParams
in memory.
Return Values
amountIn
uint256
The amount of the input token.
exactOutput
Swaps as little as possible of one token for amountOut
of another along the specified path (reversed).
Parameters
params
struct IV3SwapRouter.ExactOutputParams
The parameters necessary for the multi-hop swap, encoded as ExactOutputParams
in memory.
Return Values
amountIn
uint256
The amount of the input token.
sweepToken
Transfers the full amount of a token held by this contract to recipient.
The amountMinimum parameter prevents malicious contracts from stealing the token from users.
Parameters
token
address
The contract address of the token which will be transferred to recipient
.
amountMinimum
uint256
The minimum amount of token required for a transfer.
sweepToken
Transfers the full amount of a token held by this contract to recipient.
The amountMinimum parameter prevents malicious contracts from stealing the token from users.
Parameters
token
address
The contract address of the token which will be transferred to recipient
.
amountMinimum
uint256
The minimum amount of token required for a transfer.
recipient
address
The destination address of the token.
sweepTokenWithFee
Transfers the full amount of a token held by this contract to recipient, with a percentage between 0 (exclusive) and 1 (inclusive) going to feeRecipient.
The amountMinimum parameter prevents malicious contracts from stealing the token from users.
Parameters
token
address
The contract address of the token which will be transferred to recipient
.
amountMinimum
uint256
The minimum amount of token required for a transfer.
feeBips
uint256
The amount of fee in basis points.
feeRecipient
address
The destination address of the token.
sweepTokenWithFee
Transfers the full amount of a token held by this contract to recipient, with a percentage between 0 (exclusive) and 1 (inclusive) going to feeRecipient.
The amountMinimum parameter prevents malicious contracts from stealing the token from users.
Parameters
token
address
The contract address of the token which will be transferred to recipient
.
amountMinimum
uint256
The minimum amount of token required for a transfer.
recipient
address
The destination address of the token.
feeBips
uint256
The amount of fee in basis points.
feeRecipient
address
The destination address of the token.
unwrapWETH9
Unwraps the contract's WETH9 balance and sends it to recipient as ETH.
The amountMinimum parameter prevents malicious contracts from stealing WETH9 from users.
Parameters
amountMinimum
uint256
The minimum amount of WETH9 to unwrap.
unwrapWETH9
Unwraps ETH from WETH9.
Parameters
amountMinimum
uint256
The minimum amount of WETH9 to unwrap.
recipient
address
The address to keep same uniswap npm selector.
unwrapWETH9WithFee
Unwraps the contract's WETH9 balance and sends it to recipient as ETH, with a percentage between 0 (exclusive), and 1 (inclusive) going to feeRecipient.
The amountMinimum parameter prevents malicious contracts from stealing WETH9 from users.
Parameters
amountMinimum
uint256
The minimum amount of token required for a transfer.
feeBips
uint256
The amount of fee in basis points.
feeRecipient
address
The destination address of the token.
unwrapWETH9WithFee
Unwraps the contract's WETH9 balance and sends it to recipient as ETH, with a percentage between 0 (exclusive), and 1 (inclusive) going to feeRecipient.
The amountMinimum parameter prevents malicious contracts from stealing WETH9 from users.
Parameters
amountMinimum
uint256
The minimum amount of token required for a transfer.
recipient
address
The destination address of the token.
feeBips
uint256
The amount of fee in basis points.
feeRecipient
address
The destination address of the token.
wrapETH
Wraps ETH.
Client must wrap if input is native currency.
Parameters
value
uint256
The ETH amount to be wrapped.
refundETH
Allows sending pool transactions exactly as Uniswap original transactions.
Declared virtual as we never send ETH to Uniswap router contract.
_safeApprove
_assertTokenWhitelisted
_getUniswapNpm
_isContract
_getUniswapRouter2
_getWeth
Last updated