The interface for the Algebra Factory
Developer note: Credit to Uniswap Labs under GPL-2.0-or-later license: https://github.com/Uniswap/v3-core/tree/main/contracts/interfaces
event Owner(address newOwner)
Emitted when the owner of the factory is changed
Name | Type | Description |
---|---|---|
event VaultAddress(address newVaultAddress)
Emitted when the vault address is changed
Name | Type | Description |
---|---|---|
event Pool(address token0, address token1, address pool)
Emitted when a pool is created
Name | Type | Description |
---|---|---|
event FarmingAddress(address newFarmingAddress)
Emitted when the farming address is changed
event FeeConfiguration(uint16 alpha1, uint16 alpha2, uint32 beta1, uint32 beta2, uint16 gamma1, uint16 gamma2, uint32 volumeBeta, uint16 volumeGamma, uint16 baseFee)
function owner() external view returns (address)
view external
Returns the current owner of the factory Developer note: Can be changed by the current owner via setOwner
Returns:
function poolDeployer() external view returns (address)
view external
Returns the current poolDeployerAddress
Returns:
function farmingAddress() external view returns (address)
view external
Developer note: Is retrieved from the pools to restrict calling certain functions not by a tokenomics contract
Returns:
function vaultAddress() external view returns (address)
view external
Returns:
function poolByPair(address tokenA, address tokenB) external view returns (address pool)
view external
Returns the pool address for a given pair of tokens and a fee, or address 0 if it does not exist Developer note: tokenA and tokenB may be passed in either token0/token1 or token1/token0 order
Returns:
function createPool(address tokenA, address tokenB) external returns (address pool)
external
Creates a pool for the given two tokens and fee Developer note: tokenA and tokenB may be passed in either order: token0/token1 or token1/token0. tickSpacing is retrieved from the fee. The call will revert if the pool already exists, the fee is invalid, or the token arguments are invalid.
Returns:
function setOwner(address _owner) external
external
Updates the owner of the factory Developer note: Must be called by the current owner
function setFarmingAddress(address _farmingAddress) external
external
Developer note: updates tokenomics address on the factory
function setVaultAddress(address _vaultAddress) external
external
Developer note: updates vault address on the factory
function setBaseFeeConfiguration(uint16 alpha1, uint16 alpha2, uint32 beta1, uint32 beta2, uint16 gamma1, uint16 gamma2, uint32 volumeBeta, uint16 volumeGamma, uint16 baseFee) external
external
Changes initial fee configuration for new pools Developer note: changes coefficients for sigmoids: Îą / (1 + e^( (β-x) / Îŗ)) alpha1 + alpha2 + baseFee (max possible fee) must be <= type(uint16).max gammas must be > 0
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|