ISimpleSwap

Git Source

This interface defines the essential structures and functions for the SimpleSwap contract.

Events

EthWithdrawn

event EthWithdrawn(address indexed to, uint256 amount);

TokensWithdrawn

event TokensWithdrawn(address indexed to, string identifier, uint256 amount);

SimpleSwapInitialized

event SimpleSwapInitialized(address indexed creator);

SimpleSwapUpgraded

event SimpleSwapUpgraded(address indexed previousImplementation, address indexed newImplementation);

ContractAddressUpdated

event ContractAddressUpdated(
    string identifier, address indexed previousContractAddress, address indexed newContractAddress
);

TokenAddressUpdated

event TokenAddressUpdated(string identifier, address indexed previousTokenAddress, address indexed newTokenAddress);

UniswapV3PoolUpdated

event UniswapV3PoolUpdated(string identifier, address indexed newUniswapV3PoolAddress, uint24 newUniswapV3PoolFee);

SlippageToleranceUpdated

event SlippageToleranceUpdated(uint16 previousSlippageTolerance, uint16 newSlippageTolerance);

Errors

SimpleSwap__NoEthToWithdraw

error SimpleSwap__NoEthToWithdraw();

SimpleSwap__SwapAmountInZero

error SimpleSwap__SwapAmountInZero();

SimpleSwap__WithdrawEthFailed

error SimpleSwap__WithdrawEthFailed();

SimpleSwap__AddressNotAnOwner

error SimpleSwap__AddressNotAnOwner();

SimpleSwap__NoTokensToWithdraw

error SimpleSwap__NoTokensToWithdraw();

SimpleSwap__FunctionDoesNotExist

error SimpleSwap__FunctionDoesNotExist();

SimpleSwap__ZeroTokensOutFromSwap

error SimpleSwap__ZeroTokensOutFromSwap();

SimpleSwap__SlippageToleranceUnchanged

error SimpleSwap__SlippageToleranceUnchanged();

SimpleSwap__SlippageToleranceAboveMaximum

error SimpleSwap__SlippageToleranceAboveMaximum();

TokenSwap__NotEnoughTokensForSwap

error TokenSwap__NotEnoughTokensForSwap(string tokenInIdentifier);

Structs

ContractAddress

struct ContractAddress {
    string identifier;
    address contractAddress;
}

TokenAddress

struct TokenAddress {
    string identifier;
    address tokenAddress;
}

UniswapV3Pool

struct UniswapV3Pool {
    string identifier;
    address poolAddress;
    uint24 fee;
}