Skip to content

Commit

Permalink
fix: add flaunch eth/fleth autowrap hooks (#1000)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsy1218 committed Feb 6, 2025
1 parent 5dc7064 commit 2fb7038
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions lib/util/v4HooksPoolsFiltering.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { V4SubgraphPool } from '@uniswap/smart-order-router'
import { log, V4SubgraphPool } from '@uniswap/smart-order-router'

Check failure on line 1 in lib/util/v4HooksPoolsFiltering.ts

View workflow job for this annotation

GitHub Actions / Prettier

lib/util/v4HooksPoolsFiltering.ts#L1

There are issues with this file's formatting, please run Prettier to fix the errors
import { Hook } from '@uniswap/v4-sdk'
import { HOOKS_ADDRESSES_ALLOWLIST } from './hooksAddressesAllowlist'
import { ChainId } from '@uniswap/sdk-core'
Expand Down Expand Up @@ -37,9 +37,20 @@ export function v4HooksPoolsFiltering(chainId: ChainId, pools: Array<V4SubgraphP
v4PoolsByTokenPairsAndFees[convertV4PoolToGroupingKey(pool)] ??
new PriorityQueue<V4SubgraphPool>(V4SubgraphPoolComparator)

let additionalAllowedPool = 0

if (
pool.id.toLowerCase() === '0x14287e3268eb628fcebd2d8f0730b01703109e112a7a41426a556d10211d2086'.toLowerCase() && chainId === ChainId.BASE
) {
pool.tvlETH = 1000 // similar to flETH/FLNCH pool (https://app.uniswap.org/explore/pools/base/0xf8f4afa64c443ff00630d089205140814c9c0ce79ff293d05913a161fcc7ec4a)
pool.tvlUSD = 5500000 // similar to flETH/FLNCH pool (https://app.uniswap.org/explore/pools/base/0xf8f4afa64c443ff00630d089205140814c9c0ce79ff293d05913a161fcc7ec4a)
log.debug(`Setting tvl for flETH/FLNCH pool ${JSON.stringify(pool)}`)
additionalAllowedPool += 1
}

v4Pools.push(pool)

if (v4Pools.size() > TOP_GROUPED_V4_POOLS) {
if (v4Pools.size() > TOP_GROUPED_V4_POOLS + additionalAllowedPool) {
v4Pools.dequeue()
}

Expand Down

0 comments on commit 2fb7038

Please sign in to comment.