IAutoSwapperWusdnSdex

Git Source

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

NameTypeDescription
tokenaddressThe address of the token to send.
toaddressThe recipient address.
amountuint256The amount of tokens to send.

getSwapSlippage

Get the current swap slippage setting (in basis points)

function getSwapSlippage() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256Current slippage tolerance

updateSwapSlippage

Updates the allowed slippage percentage for swaps.

function updateSwapSlippage(uint256 swapSlippage) external;

Parameters

NameTypeDescription
swapSlippageuint256The new slippage value (in basis points).

Events

SwapSlippageUpdated

Emitted when the swap slippage percentage is updated.

event SwapSlippageUpdated(uint256 newSwapSlippage);

Parameters

NameTypeDescription
newSwapSlippageuint256The 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();