IAutoSwapperWusdnSdex
Interface for the AutoSwapperWusdnSdex contract that provides automated token swapping functionality.
Functions
swapWusdnToSdex
Swap WUSDN to SDEX.
function swapWusdnToSdex() external;
sweep
Admin function to send the contract token balance to a specified address.
function sweep(address token, address to, uint256 amount) external;
Parameters
Name | Type | Description |
---|---|---|
token | address | The address of the token to send. |
to | address | The recipient address. |
amount | uint256 | The amount of tokens to send. |
getSwapSlippage
Get the current swap slippage setting (in basis points)
function getSwapSlippage() external view returns (uint256);
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | Current slippage tolerance |
updateSwapSlippage
Updates the allowed slippage percentage for swaps.
function updateSwapSlippage(uint256 swapSlippage) external;
Parameters
Name | Type | Description |
---|---|---|
swapSlippage | uint256 | The new slippage value (in basis points). |
Events
SwapSlippageUpdated
Emitted when the swap slippage percentage is updated.
event SwapSlippageUpdated(uint256 newSwapSlippage);
Parameters
Name | Type | Description |
---|---|---|
newSwapSlippage | uint256 | The new swap slippage (in basis points). |
FailedSwap
Emitted when a swap fails.
event FailedSwap();
Errors
AutoSwapperSwapFailed
Thrown when a swap fails.
error AutoSwapperSwapFailed();
AutoSwapperInvalidSwapSlippage
Thrown when slippage configuration is invalid.
error AutoSwapperInvalidSwapSlippage();
AutoSwapperInvalidCaller
Thrown when the caller is not authorized to perform the operation.
error AutoSwapperInvalidCaller();