Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
ianlapham authored Mar 8, 2022
2 parents 4ba146f + 9f09b04 commit 4ab4dc6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/mappings/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ import {
import { createTick, feeTierToTickSpacing } from '../utils/tick'

export function handleInitialize(event: Initialize): void {
// update pool sqrt price and tick
let pool = Pool.load(event.address.toHexString())
pool.sqrtPrice = event.params.sqrtPriceX96
pool.tick = BigInt.fromI32(event.params.tick)
pool.save()

// update token prices
let token0 = Token.load(pool.token0)
let token1 = Token.load(pool.token1)
Expand Down
3 changes: 2 additions & 1 deletion src/utils/pricing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ export let WHITELIST_TOKENS: string[] = [
'0xdf5e0e81dff6faf3a7e52ba697820c5e32d806a8', // yCurv
'0x956f47f50a910163d8bf957cf5846d573e7f87ca', // FEI
'0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0', // MATIC
'0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9' // AAVE
'0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9', // AAVE
'0xfe2e637202056d30016725477c5da089ab0a043a' // sETH2
]

let STABLE_COINS: string[] = [
Expand Down
4 changes: 2 additions & 2 deletions subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ repository: https://github.com/Uniswap/uniswap-v3-subgraph
schema:
file: ./schema.graphql
graft:
base: QmS13421u6qsbVdBCrZhdRaZw2wH67drwF3urmueJvvJ5P
block: 13591197
base: QmZeCuoZeadgHkGwLwMeguyqUKz1WPWQYKcKyMCeQqGhsF
block: 12673736
dataSources:
- kind: ethereum/contract
name: Factory
Expand Down

0 comments on commit 4ab4dc6

Please sign in to comment.