QilinV2Factory

QILINV2Factory

Managing all Qilin trading pools, and managing system parameters by the contract owner

createPoolFromUni

Create a trading pool on Qilin (based on uniswap)

function createPoolFromUni(
    address tradeToken,
    address poolToken,
    uint24 fee,
    bool reverse
) external

parameters:

name

type

description

tradeToken

address

Trading assets, not used for actual transaction payment, together with the pool assets constitute a trading pair

poolToken

address

Pool assets, that is, the assets that traders actually use to pay for tradings

fee

uint24

This fee is the fee in the uniswap v3 pool, which uniquely determines a uniswap price feed source together with the trading pair. When this parameter is 0, a pool is built based on uniswap v2

reverse

bool

Whether it is reversed or not, it is used to identify whether the price of this trading pool is reversed

createPoolFromSushi

Create a trading pool on Qilin (based on sushiswap)

function createPoolFromSushi(
    address tradeToken,
    address poolToken,
    bool reverse
) external

parameters:

name

type

description

tradeToken

address

Trading assets, not used for actual transaction payment, together with the pool assets constitute a trading pair

poolToken

address

Pool assets, that is, the assets that traders actually use to pay for tradings

reverse

bool

Whether it is reversed or not, it is used to identify whether the price of this trading pool is reversed

pools

Inquire address of a trading pool through some info on Qilin

function pools(
    address poolToken,
    address oraclePool,
    bool reverse
) external view returns (address pool)

parameters:

name

type

description

poolToken

address

Pool assets, that is, the assets that traders actually use to pay for tradings

oraclePool

address

Address of oracle pool

reverse

bool

Whether it is reversed or not, it is used to identify whether the price of this trading pool is reversed

returns:

name

type

description

pool

address

Address of Qilin v2 trading pool

Last updated