Factory Module
The Factory module is responsible for creating and managing pools. It maintains a registry of all pools and ensures proper initialization with DAMM-specific features.
Overview
Key Features
Data Structures
Pools
struct Pools has key, store {
id: UID,
list: LinkedTable<ID, PoolSimpleInfo>,
index: u64,
}PoolSimpleInfo
Main Functions
create_pool
Parameter
Type
Description
new_pool_key
fetch_pools
Utility Functions
Events
InitFactoryEvent
CreatePoolEvent
Error Codes
Code
Constant
Description
Usage Examples
Creating a Pool with Fee Scheduler
Querying Pools
Fee Scheduler Modes
Linear Mode (0)
Exponential Mode (1)
Best Practices
Last updated