PathKey
Git Source - Generated with forge doc
struct PathKey {
Currency intermediateCurrency;
uint24 fee;
int24 tickSpacing;
IHooks hooks;
bytes hookData;
}
PathKeyLibrary
Functions for working with PathKeys
Functions
getPoolAndSwapDirection
Get the pool and swap direction for a given PathKey
function getPoolAndSwapDirection(PathKey calldata params, Currency currencyIn)
internal
pure
returns (PoolKey memory poolKey, bool zeroForOne);
Parameters
Name | Type | Description |
---|---|---|
params | PathKey | the given PathKey |
currencyIn | Currency | the input currency |
Returns
Name | Type | Description |
---|---|---|
poolKey | PoolKey | the pool key of the swap |
zeroForOne | bool | the direction of the swap, true if currency0 is being swapped for currency1 |