@gala-chain/chaincode ∙ API
API > createPool
Function: createPool()
createPool(
ctx
,dto
):Promise
\<Pool
>
Parameters
▪ ctx: GalaChainContext
GalaChainContext – The execution context providing access to the GalaChain environment.
▪ dto: CreatePoolDto
CreatePoolDto – A data transfer object containing: - Token details – The token class keys. - sqrtPrice – The initial square root price of the pool (used for setting up the starting price ratio). - Fee tier details – The swap fee tier applied to trades in the pool. - Protocol fees – The percentage of fees collected by the protocol.
Returns
Dev
The createPool function initializes a new Uniswap V3 liquidity pool within the GalaChain ecosystem. It sets up the pool with the specified token pair, initial price, fee structure, and protocol fee settings.