FluidDexLite ​
Inherits:CoreInternals
Functions ​
constructor ​
solidity
constructor(address auth_, address liquidity_, address deployerContract_);swapSingle ​
Swap through a single dex pool
Uses swapIn for positive amountSpecified (user provides input), _swapOut for negative (user receives output).
solidity
function swapSingle(
    DexKey calldata dexKey_,
    bool swap0To1_,
    int256 amountSpecified_,
    uint256 amountLimit_,
    address to_,
    bool isCallback_,
    bytes calldata callbackData_,
    bytes calldata extraData_
) external payable _reentrancyLock returns (uint256 amountUnspecified_);Parameters
| Name | Type | Description | 
|---|---|---|
dexKey_ | DexKey | The dex pool to swap through. | 
swap0To1_ | bool | Whether to swap from token0 to token1 or vice versa. | 
amountSpecified_ | int256 | The amount to swap (positive for exact input, negative for exact output). | 
amountLimit_ | uint256 | The minimum/maximum amount for the unspecified side. | 
to_ | address | The recipient address. | 
isCallback_ | bool | |
callbackData_ | bytes | |
extraData_ | bytes | 
swapHop ​
Swap through a path of dex pools
Uses swapIn for positive amountSpecified (user provides input), _swapOut for negative (user receives output).
solidity
function swapHop(
    address[] calldata path_,
    DexKey[] calldata dexKeys_,
    int256 amountSpecified_,
    uint256[] calldata amountLimits_,
    TransferParams calldata transferParams_
) external payable _reentrancyLock returns (uint256 amountUnspecified_);Parameters
| Name | Type | Description | 
|---|---|---|
path_ | address[] | The path of the swap. | 
dexKeys_ | DexKey[] | The dex pools to swap through. | 
amountSpecified_ | int256 | The amount to swap (positive for exact input, negative for exact output). | 
amountLimits_ | uint256[] | The minimum/maximum amount for the unspecified side for all swaps. | 
transferParams_ | TransferParams | The parameters for the transfer. | 
Returns
| Name | Type | Description | 
|---|---|---|
amountUnspecified_ | uint256 | The amount of the unspecified token. | 
readFromStorage ​
solidity
function readFromStorage(bytes32 slot_) external view returns (uint256 result_);fallback ​
solidity
fallback(bytes calldata data_) external payable _reentrancyLock returns (bytes memory);receive ​
solidity
receive() external payable;
