Skip to main content

CallbackValidation

Provides validation for callbacks from Unicorn V3 Pools

Functions

verifyCallback

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

Returns the address of a valid Unicorn V3 Pool

Parameters:

NameTypeDescription
factoryaddressThe contract address of the Unicorn 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
poolIUnicornV3PoolThe V3 pool contract address

verifyCallback

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

Returns the address of a valid Unicorn V3 Pool

Parameters:

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

Return Values:

NameTypeDescription
poolIUnicornV3PoolThe V3 pool contract address