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 RenounceOwnershipStart(uint256 timestamp, uint256 finishTimestamp)
Emitted when a process of ownership renounce is started
Name | Type | Description |
---|---|---|
event RenounceOwnershipStop(uint256 timestamp)
Emitted when a process of ownership renounce cancelled
Name | Type | Description |
---|---|---|
event RenounceOwnershipFinish(uint256 timestamp)
Emitted when a process of ownership renounce finished
event Pool(address token0, address token1, address pool)
Emitted when a pool is created
event FarmingAddress(address newFarmingAddress)
Emitted when the farming address is changed
event DefaultFeeConfiguration(struct AlgebraFeeConfiguration newConfig)
Emitted when the default fee configuration is changed Developer note: See the AdaptiveFee library for more details
event DefaultCommunityFee(uint8 newDefaultCommunityFee)
Emitted when the default community fee is changed
function POOLS_ADMINISTRATOR_ROLE() external view returns (bytes32)
view external
role that can change communityFee and tickspacing in pools
Returns:
function hasRoleOrOwner(bytes32 role, address account) external view returns (bool)
view external
Developer note: Returns `true` if `account` has been granted `role` or `account` is owner.
Returns:
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 transferOwnership(address newOwner)
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 communityVault() external view returns (address)
view external
Returns the current communityVaultAddress
Returns:
function defaultCommunityFee() external view returns (uint8)
view external
Returns the default community fee
Returns:
function poolByPair(address tokenA, address tokenB) external view returns (address pool)
view external
Returns the pool address for a given pair of tokens, 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 renounceOwnershipStartTimestamp() external view returns (uint256 timestamp)
view external
Returns:
function createPool(address tokenA, address tokenB) external returns (address pool)
external
Creates a pool for the given two tokens Developer note: tokenA and tokenB may be passed in either order: token0/token1 or token1/token0. The call will revert if the pool already exists or the token arguments are invalid.
Returns:
function setFarmingAddress(address newFarmingAddress) external
external
Developer note: updates tokenomics address on the factory
function setDefaultCommunityFee(uint8 newDefaultCommunityFee) external
external
Developer note: updates default community fee for new pools
function setDefaultFeeConfiguration(struct AlgebraFeeConfiguration newConfig) 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 and gammas must be > 0
function startRenounceOwnership() external
external
Starts process of renounceOwnership. After that, a certain period of time must pass before the ownership renounce can be completed.
function stopRenounceOwnership() external
external
Stops process of renounceOwnership and removes timer.
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 |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
timestamp
uint256
The timestamp of event
finishTimestamp
uint256
The timestamp when ownership renounce will be possible to finish
timestamp
uint256
The timestamp of event
timestamp
uint256
The timestamp of ownership renouncement
token0
address
The first token of the pool by address sort order
token1
address
The second token of the pool by address sort order
pool
address
The address of the created pool
newFarmingAddress
address
The farming address after the address was changed
newConfig
struct AlgebraFeeConfiguration
The structure with dynamic fee parameters
newDefaultCommunityFee
uint8
The new default community fee value
[0]
bytes32
role
bytes32
account
address
[0]
bool
[0]
address
The address of the factory owner
[0]
address
The address of the poolDeployer
[0]
address
The tokenomics contract address
[0]
address
The address to which community fees are transferred
[0]
uint8
Fee which will be set at the creation of the pool
tokenA
address
The contract address of either token0 or token1
tokenB
address
The contract address of the other token
pool
address
The pool address
timestamp
uint256
The timestamp of the beginning of the renounceOwnership process
tokenA
address
One of the two tokens in the desired pool
tokenB
address
The other of the two tokens in the desired pool
pool
address
The address of the newly created pool
newFarmingAddress
address
The new tokenomics contract address
newDefaultCommunityFee
uint8
The new community fee, must be <= MAX_COMMUNITY_FEE
newConfig
struct AlgebraFeeConfiguration
new default fee configuration. See the #AdaptiveFee.sol library for details