Skip to main content

CallbackValidation

Provides validation for callbacks from Pegasys V3 Pools

Functions

verifyCallback

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

Returns the address of a valid Pegasys V3 Pool

Parameters:

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

verifyCallback

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

Returns the address of a valid Pegasys V3 Pool

Parameters:

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

Return Values:

NameTypeDescription
poolIPegasysV3PoolThe V3 pool contract address