Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

IUniswapV4PoolManagerLike

Git Source

Title: IUniswapV4PoolManagerLike

Author: Phylax Systems

Minimal Uniswap v4 PoolManager surface needed by the example assertion bundle.

Currency and IHooks are typed address here. The canonical Uniswap v4 ABI encodes both as address, so the function selectors derived from these signatures match the production PoolManager exactly.

Functions

initialize

function initialize(PoolKey calldata key, uint160 sqrtPriceX96) external returns (int24 tick);

modifyLiquidity

function modifyLiquidity(PoolKey calldata key, ModifyLiquidityParams calldata params, bytes calldata hookData)
    external
    returns (int256 callerDelta, int256 feesAccrued);

swap

function swap(PoolKey calldata key, SwapParams calldata params, bytes calldata hookData)
    external
    returns (int256 swapDelta);
function donate(PoolKey calldata key, uint256 amount0, uint256 amount1, bytes calldata hookData)
    external
    returns (int256 delta);

take

function take(address currency, address to, uint256 amount) external;

settle

function settle() external payable returns (uint256);

sync

function sync(address currency) external;

mint

function mint(address to, uint256 id, uint256 amount) external;

burn

function burn(address from, uint256 id, uint256 amount) external;

updateDynamicLPFee

function updateDynamicLPFee(PoolKey calldata key, uint24 newDynamicLPFee) external;

setProtocolFee

function setProtocolFee(PoolKey calldata key, uint24 newProtocolFee) external;

setProtocolFeeController

function setProtocolFeeController(address controller) external;

collectProtocolFees

function collectProtocolFees(address recipient, address currency, uint256 amount) external returns (uint256);

unlock

function unlock(bytes calldata data) external returns (bytes memory);

protocolFeesAccrued

function protocolFeesAccrued(address currency) external view returns (uint256);

extsload

function extsload(bytes32 slot) external view returns (bytes32);

extsload

function extsload(bytes32 startSlot, uint256 nSlots) external view returns (bytes32[] memory);

Structs

PoolKey

struct PoolKey {
    address currency0;
    address currency1;
    uint24 fee;
    int24 tickSpacing;
    address hooks;
}

SwapParams

struct SwapParams {
    bool zeroForOne;
    int256 amountSpecified;
    uint160 sqrtPriceLimitX96;
}

ModifyLiquidityParams

struct ModifyLiquidityParams {
    int24 tickLower;
    int24 tickUpper;
    int256 liquidityDelta;
    bytes32 salt;
}