Skip to content

Commit

Permalink
Update CL pool names to include tickspacing. (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
jfarid27 authored Nov 20, 2024
1 parent 6441992 commit 4f41fa4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/EventHandlers/CLFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ CLFactory.PoolCreated.handlerWithLoader({
poolTokenSymbols[0],
poolTokenSymbols[1],
false, // Pool is not stable
true // Pool is CL
Number(event.params.tickSpacing) // Pool is CL
),
token0_id: TokenIdByChain(event.params.token0, event.chainId),
token1_id: TokenIdByChain(event.params.token1, event.chainId),
Expand Down
2 changes: 1 addition & 1 deletion src/EventHandlers/PoolFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ PoolFactory.PoolCreated.handlerWithLoader({
poolTokenSymbols[0],
poolTokenSymbols[1],
event.params.stable,
false // Pool is not CL
0 // Pool is not CL
),
token0_id: TokenIdByChain(event.params.token0, event.chainId),
token1_id: TokenIdByChain(event.params.token1, event.chainId),
Expand Down
6 changes: 3 additions & 3 deletions src/Helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ export function generatePoolName(
token0Symbol: string,
token1Symbol: string,
isStable: boolean,
isCL: boolean
clTickSpacing: number
): string {
let poolType = "";
if (isStable) {
poolType = "Stable";
} else {
poolType = "Volatile";
}
if (isCL) {
poolType = "CL";
if (clTickSpacing != 0) {
poolType = "CL-" + clTickSpacing;
}
return `${poolType} AMM - ${token0Symbol}/${token1Symbol}`;
}

0 comments on commit 4f41fa4

Please sign in to comment.