PoolAddress

Functions

getPoolKey

  function getPoolKey(
    address tokenA,
    address tokenB,
    uint24 fee
  ) internal returns (struct PoolAddress.PoolKey)

Returns PoolKey: the ordered tokens with the matched fee levels

Parameters:

NameTypeDescription

tokenA

address

The first token of a pool, unsorted

tokenB

address

The second token of a pool, unsorted

fee

uint24

The fee level of the pool

Return Values:

NameTypeDescription

Poolkey

PoolAddress.PoolKey

The pool details with ordered token0 and token1 assignments

computeAddress

  function computeAddress(
    address factory,
    struct PoolAddress.PoolKey key
  ) internal returns (address pool)

Deterministically computes the pool address given the factory and PoolKey

Parameters:

NameTypeDescription

factory

address

The DragonswapV2 factory contract address

key

struct PoolAddress.PoolKey

The PoolKey

Return Values:

NameTypeDescription

pool

address

The contract address of the V2 pool

Last updated