From fe537b3231733b5ea2c31c0f812615a9b2d95d25 Mon Sep 17 00:00:00 2001 From: Michael Wang <44713145+mzywang@users.noreply.github.com> Date: Wed, 24 Apr 2024 13:29:28 -0400 Subject: [PATCH] remove dupe --- src/mappings/factory.ts | 6 +----- src/mappings/pool/initialize.ts | 4 ++-- src/utils/pricing.ts | 6 +++--- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/mappings/factory.ts b/src/mappings/factory.ts index e90a88e8..986c9211 100644 --- a/src/mappings/factory.ts +++ b/src/mappings/factory.ts @@ -13,7 +13,6 @@ import { populateEmptyPools } from '../utils/backfill' // The subgraph handler must have this signature to be able to handle events, // however, we invoke a helper in order to inject dependencies for unit tests. export function handlePoolCreated(event: PoolCreated): void { -<<<<<<< HEAD handlePoolCreatedHelper(event) } @@ -24,9 +23,6 @@ export function handlePoolCreatedHelper( whitelistTokens: string[] = WHITELIST_TOKENS, staticTokenDefinitions: StaticTokenDefinition[] = STATIC_TOKEN_DEFINITIONS, ): void { - // temp fix - if (event.params.pool == Address.fromHexString('0x8fe8d9bb8eeba3ed688069c3d6b556c9ca258248')) { -======= // fix for pool overflow - this pool has a token that overflows on one of its values, but theres no way in // assembly ts to error catch for this. // Transaction - https://optimistic.etherscan.io/tx/0x16312a52237ce08e4bb7534648f4c8da6cd4c192f0b955cf6770b2d347f19d2b @@ -36,7 +32,6 @@ export function handlePoolCreatedHelper( event.params.pool === Address.fromHexString('0x5500721e5a063f0396c5e025a640e8491eb89aac') || event.params.pool === Address.fromHexString('0x1ffd370f9d01f75de2cc701956886acec9749e80') ) { ->>>>>>> 3b4a84e (update network to optimism) return } @@ -62,6 +57,7 @@ export function handlePoolCreatedHelper( bundle.ethPriceUSD = ZERO_BD bundle.save() + // on factory creation, create the inital pools from pre-regenesis populateEmptyPools(event) } diff --git a/src/mappings/pool/initialize.ts b/src/mappings/pool/initialize.ts index 86a14cf2..795adf4f 100644 --- a/src/mappings/pool/initialize.ts +++ b/src/mappings/pool/initialize.ts @@ -4,12 +4,12 @@ import { Bundle, Pool, Token } from '../../types/schema' import { Initialize } from '../../types/templates/Pool/Pool' import { updatePoolDayData, updatePoolHourData } from '../../utils/intervalUpdates' import { + DAI_WETH_03_POOL, findEthPerToken, getEthPriceInUSD, MINIMUM_ETH_LOCKED, STABLE_COINS, STABLECOIN_IS_TOKEN0, - USDC_WETH_05_POOL, WETH_ADDRESS, } from '../../utils/pricing' @@ -19,7 +19,7 @@ export function handleInitialize(event: Initialize): void { export function handleInitializeHelper( event: Initialize, - stablecoinWrappedNativePoolAddress: string = USDC_WETH_05_POOL, + stablecoinWrappedNativePoolAddress: string = DAI_WETH_03_POOL, stablecoinIsToken0: boolean = STABLECOIN_IS_TOKEN0, wrappedNativeAddress: string = WETH_ADDRESS, stablecoinAddresses: string[] = STABLE_COINS, diff --git a/src/utils/pricing.ts b/src/utils/pricing.ts index f8a25ec2..4be88cdf 100644 --- a/src/utils/pricing.ts +++ b/src/utils/pricing.ts @@ -8,9 +8,9 @@ export const WETH_ADDRESS = '0x4200000000000000000000000000000000000006' export const DAI_WETH_03_POOL = '0x03af20bdaaffb4cc0a521796a223f7d85e2aac31' export const STABLECOIN_IS_TOKEN0 = false -const DAI_ADDRESS = '0xda10009cbd5d07dd0cecc66161fc93d7c9000da1' // DAI -const USDC_ADDRESS = '0x7f5c764cbc14f9669b88837ca1490cca17c31607' // USDC -const USDT_ADDRESS = '0x94b008aa00579c1307b0ef2c499ad98a8ce58e58' // USDT +const DAI_ADDRESS = '0xda10009cbd5d07dd0cecc66161fc93d7c9000da1' +const USDC_ADDRESS = '0x7f5c764cbc14f9669b88837ca1490cca17c31607' +const USDT_ADDRESS = '0x94b008aa00579c1307b0ef2c499ad98a8ce58e58' // token where amounts should contribute to tracked volume and liquidity // usually tokens that many tokens are paired with