735546619e
Signed-off-by: T-Hax <>
10 lines
421 B
TypeScript
10 lines
421 B
TypeScript
import { BigNumber } from 'ethers'
|
|
|
|
export const getMinTick = (tickSpacing: number) => Math.ceil(-887272 / tickSpacing) * tickSpacing
|
|
export const getMaxTick = (tickSpacing: number) => Math.floor(887272 / tickSpacing) * tickSpacing
|
|
export const getMaxLiquidityPerTick = (tickSpacing: number) =>
|
|
BigNumber.from(2)
|
|
.pow(128)
|
|
.sub(1)
|
|
.div((getMaxTick(tickSpacing) - getMinTick(tickSpacing)) / tickSpacing + 1)
|