Skip to main content

CallbackValidation

Provides validation for callbacks from Uniswap V3 Pools

Functions#

verifyCallback#

function verifyCallback(
address factory,
address tokenA,
address tokenB,
uint24 fee
) internal returns (contract IUniswapV3Pool pool)

Returns the address of a valid Uniswap V3 Pool

Parameters:#

NameTypeDescription
factoryaddressThe contract address of the Uniswap V3 factory
tokenAaddressThe contract address of either token0 or token1
tokenBaddressThe contract address of the other token
feeuint24The fee collected upon every swap in the pool, denominated in hundredths of a bip

Return Values:#

NameTypeDescription
poolIUniswapV3PoolThe V3 pool contract address

verifyCallback#

function verifyCallback(
address factory,
struct PoolAddress.PoolKey poolKey
) internal returns (contract IUniswapV3Pool pool)

Returns the address of a valid Uniswap V3 Pool

Parameters:#

NameTypeDescription
factoryaddressThe contract address of the Uniswap V3 factory
poolKeystruct PoolAddress.PoolKeyThe identifying key of the V3 pool

Return Values:#

NameTypeDescription
poolIUniswapV3PoolThe V3 pool contract address