diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..82e09f45 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,6 @@ +{ + "semi": false, + "singleQuote": true, + "printWidth": 120, + "trailingComma": "all" +} diff --git a/package.json b/package.json index 14867ded..975967ca 100644 --- a/package.json +++ b/package.json @@ -27,10 +27,5 @@ "npm-run-all": "^4.1.5", "prettier": "^1.18.2", "typescript": "^3.5.2" - }, - "prettier": { - "printWidth": 120, - "semi": false, - "singleQuote": true } } diff --git a/src/mappings/pool/collect.ts b/src/mappings/pool/collect.ts index cc4e8080..af71d561 100644 --- a/src/mappings/pool/collect.ts +++ b/src/mappings/pool/collect.ts @@ -35,7 +35,7 @@ export function handleCollect(event: CollectEvent): void { collectedAmountToken0, token0 as Token, collectedAmountToken1, - token1 as Token + token1 as Token, ) // Reset tvl aggregates until new amounts calculated diff --git a/src/mappings/pool/swap.ts b/src/mappings/pool/swap.ts index 1743b261..f20d680a 100644 --- a/src/mappings/pool/swap.ts +++ b/src/mappings/pool/swap.ts @@ -48,7 +48,7 @@ export function handleSwap(event: SwapEvent): void { // get amount that should be tracked only - div 2 because cant count both input and output as volume const amountTotalUSDTracked = getTrackedAmountUSD(amount0Abs, token0 as Token, amount1Abs, token1 as Token).div( - BigDecimal.fromString('2') + BigDecimal.fromString('2'), ) const amountTotalETHTracked = safeDiv(amountTotalUSDTracked, bundle.ethPriceUSD) const amountTotalUSDUntracked = amount0USD.plus(amount1USD).div(BigDecimal.fromString('2')) diff --git a/src/utils/pricing.ts b/src/utils/pricing.ts index bf9c49e6..1f53c9d7 100644 --- a/src/utils/pricing.ts +++ b/src/utils/pricing.ts @@ -42,7 +42,7 @@ const STABLE_COINS: string[] = [ '0x4dd28568d05f09b02220b09c2cb307bfd837cb95', ] -const MINIMUM_ETH_LOCKED = BigDecimal.fromString('60') +const MINIMUM_ETH_LOCKED = BigDecimal.fromString('20') const Q192 = BigInt.fromI32(2).pow(192 as u8) export function sqrtPriceX96ToTokenPrices(sqrtPriceX96: BigInt, token0: Token, token1: Token): BigDecimal[] { @@ -132,7 +132,7 @@ export function getTrackedAmountUSD( tokenAmount0: BigDecimal, token0: Token, tokenAmount1: BigDecimal, - token1: Token + token1: Token, ): BigDecimal { const bundle = Bundle.load('1')! const price0USD = token0.derivedETH.times(bundle.ethPriceUSD)