Skip to main content
Helpful?

V4Router

Git Source | Generated with forge doc

Inherits: IV4Router, BaseActionsRouter, DeltaResolver

Abstract contract that contains all internal logic needed for routing through Uniswap V4 pools

the entry point to executing actions in this contract is calling BaseActionsRouter._executeActions An inheriting contract should call _executeActions at the point that they wish actions to be executed

Functions

constructor

constructor(IPoolManager _poolManager) BaseActionsRouter(_poolManager);

_handleAction

function _handleAction(uint256 action, bytes calldata params) internal override;

_swapExactInputSingle

function _swapExactInputSingle(IV4Router.ExactInputSingleParams calldata params) private;

_swapExactInput

function _swapExactInput(IV4Router.ExactInputParams calldata params) private;

_swapExactOutputSingle

function _swapExactOutputSingle(IV4Router.ExactOutputSingleParams calldata params) private;

_swapExactOutput

function _swapExactOutput(IV4Router.ExactOutputParams calldata params) private;

_swap

function _swap(
PoolKey memory poolKey,
bool zeroForOne,
int256 amountSpecified,
uint160 sqrtPriceLimitX96,
bytes calldata hookData
) private returns (int128 reciprocalAmount);
Helpful?