Algebra Factory
Algebra factory
Is used to deploy pools and its plugins
Version: Algebra Integral
Inherits: IAlgebraFactory Ownable2Step AccessControlEnumerable
Public variables
POOLS_ADMINISTRATOR_ROLE
Selector: 0xb500a48b
role that can change communityFee and tickspacing in pools
poolDeployer
Selector: 0x3119049a
Returns the current poolDeployerAddress
communityVault
Selector: 0x53e97868
Returns the current communityVaultAddress
defaultCommunityFee
Selector: 0x2f8a39dd
Returns the default community fee
defaultFee
Selector: 0x5a6c72d0
Returns the default fee
defaultTickspacing
Selector: 0x29bc3446
Returns the default tickspacing
renounceOwnershipStartTimestamp
Selector: 0x084bfff9
defaultPluginFactory
Selector: 0xd0ad2792
Return the current pluginFactory address
poolByPair
Selector: 0xd9a641e1
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
POOL_INIT_CODE_HASH
Selector: 0xdc6fd8ab
returns keccak256 of AlgebraPool init bytecode.
Developer note: keccak256 of AlgebraPool init bytecode. Used to compute pool address deterministically
Functions
constructor
owner
Selector: 0x8da5cb5b
Returns the current owner of the factory
Developer note: Can be changed by the current owner via transferOwnership(address newOwner)
Returns:
hasRoleOrOwner
Selector: 0xe8ae2b69
Returns `true` if `account` has been granted `role` or `account` is owner.
Returns:
defaultConfigurationForPool
Selector: 0x25b355d6
Returns the default communityFee and tickspacing
Returns:
computePoolAddress
Selector: 0xd8ed2241
Deterministically computes the pool address given the token0 and token1
Developer note: The method does not check if such a pool has been created
Returns:
createPool
Selector: 0xe3433615
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:
setDefaultCommunityFee
Selector: 0x8d5a8711
Developer note: updates default community fee for new pools
setDefaultFee
Selector: 0x77326584
Developer note: updates default fee for new pools
setDefaultTickspacing
Selector: 0xf09489ac
Developer note: updates default tickspacing for new pools
setDefaultPluginFactory
Selector: 0x2939dd97
Developer note: updates pluginFactory address
startRenounceOwnership
Selector: 0x469388c4
Starts process of renounceOwnership. After that, a certain period of time must pass before the ownership renounce can be completed.
stopRenounceOwnership
Selector: 0x238a1d74
Stops process of renounceOwnership and removes timer.
renounceOwnership
Selector: 0x715018a6
Developer note: Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner if RENOUNCE_OWNERSHIP_DELAY seconds have passed since the call to the startRenounceOwnership() function.
Events
RenounceOwnershipStart
Emitted when a process of ownership renounce is started
RenounceOwnershipStop
Emitted when a process of ownership renounce cancelled
RenounceOwnershipFinish
Emitted when a process of ownership renounce finished
Pool
Emitted when a pool is created
DefaultCommunityFee
Emitted when the default community fee is changed
DefaultTickspacing
Emitted when the default tickspacing is changed
DefaultFee
Emitted when the default fee is changed
DefaultPluginFactory
Emitted when the defaultPluginFactory address is changed