Skip to content

Commit

Permalink
remove dupe
Browse files Browse the repository at this point in the history
  • Loading branch information
mzywang committed May 30, 2024
1 parent 5b939bd commit fe537b3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
6 changes: 1 addition & 5 deletions src/mappings/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand All @@ -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
Expand All @@ -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
}

Expand All @@ -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)
}

Expand Down
4 changes: 2 additions & 2 deletions src/mappings/pool/initialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions src/utils/pricing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fe537b3

Please sign in to comment.