Import TICK_MIN from util and fix lint errors. (#187)

Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
This commit is contained in:
Ashwin Phatak
2021-08-05 18:33:47 +05:30
committed by GitHub
co-authored by prathamesh
parent df85f961db
commit b6fe8a8c47
3 changed files with 14 additions and 11 deletions
+10 -4
View File
@@ -11,10 +11,16 @@ import {
export { abi as TESTERC20_ABI } from '../artifacts/test/contracts/TestERC20.sol/TestERC20.json';
const TICK_MIN = -887272;
const TICK_MAX = 887272;
export const getMinTick = (tickSpacing: number) => Math.ceil(TICK_MIN / tickSpacing) * tickSpacing;
export const getMaxTick = (tickSpacing: number) => Math.floor(TICK_MAX / tickSpacing) * tickSpacing;
export const TICK_MIN = -887272;
export const TICK_MAX = 887272;
export const getMinTick = (tickSpacing: number): number => {
return Math.ceil(TICK_MIN / tickSpacing) * tickSpacing;
};
export const getMaxTick = (tickSpacing: number): number => {
return Math.floor(TICK_MAX / tickSpacing) * tickSpacing;
};
export const deployTokens = async (signer: Signer): Promise<{token0Address: string, token1Address: string}> => {
const Token = new ethers.ContractFactory(TESTERC20_ABI, TESTERC20_BYTECODE, signer);