UniswapV3FactoryUpgradeable
UniswapV3FactoryUpgradeable.sol
Factory contract for creating AMM pools.
Table of Contents
Variables
feeDistributor
Address of NFTXFeeDistributorV3
.
feeAmountTickSpacing
Tick spacing value for a given fee tier. Tick spacing is capped at 16384, which represents a >5x price change with ticks of 1 bip.
getPool
Pool address for a given pair and fee, or 0 if the pool does not exist.
rewardTierCardinality
The CardinalityNext value for the RewardFeeTier pools.
Events
PoolCreated
Emitted by createPool()
.
Parameters | Type | Description |
---|---|---|
token0 |
| Address of token0. |
token1 |
| Address of token1. |
fee |
| Fee tier of pool. |
tickSpacing |
| Tick spacing of pool. |
pool |
| Address of pool. |
FeeAmountEnabled
Emitted by __UniswapV3FactoryUpgradeable_init()
and enableFeeAmount()
.
Parameters | Type | Description |
---|---|---|
fee |
| New fee tier just added. |
tickSpacing |
| Tick spacing for the fee tier. |
Write Functions
createPool
Deploys a new pool, using a BeaconProxy.
Parameters | Type | Description |
---|---|---|
tokenA |
| First token for pair. |
tokenB |
| Second token for pair. |
fee |
| Fee tier of pool. Must be one of the enabled fee tiers. |
Return values | Type | Description |
---|---|---|
pool |
| Address of new pool. |
Owner Functions
setFeeDistributor
Sets the NFTXFeeDistributorV3
address.
Parameters | Type | Description |
---|---|---|
feeDistributor_ |
| Updated address for fee distributor. |
setRewardTierCardinality
Sets the CardinalityNext value for the RewardFeeTier pools.
Parameters | Type | Description |
---|---|---|
rewardTierCardinality_ |
| New reward tier cardinality. |
enableFeeAmount
Enables a new fee amount option for pools, with a given tick spacing. Once enabled, fee amounts cannot be removed.
Parameters | Type | Description |
---|---|---|
fee |
| New fee tier being added. |
tickSpacing |
| Tick spacing for the new fee tier. |
Read Functions
owner
Returns the contract owner.
Return values | Type | Description |
---|---|---|
unnamed |
| Address of contract owner |
Last updated