Skip to content

Commit

Permalink
fix(lint): auto-fix [ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
mzywang committed May 30, 2024
1 parent 22321a2 commit bc7080b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/mappings/pool/initialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import {
getEthPriceInUSD,
MINIMUM_ETH_LOCKED,
STABLE_COINS,
USDC_WETH_03_POOL,
STABLECOIN_IS_TOKEN0,
USDC_WETH_05_POOL,
WETH_ADDRESS,
} from '../../utils/pricing'

Expand All @@ -18,8 +19,8 @@ export function handleInitialize(event: Initialize): void {

export function handleInitializeHelper(
event: Initialize,
stablecoinWrappedNativePoolAddress: string = USDC_WETH_03_POOL,
stablecoinIsToken0: boolean = true,
stablecoinWrappedNativePoolAddress: string = USDC_WETH_05_POOL,
stablecoinIsToken0: boolean = STABLECOIN_IS_TOKEN0,
wrappedNativeAddress: string = WETH_ADDRESS,
stablecoinAddresses: string[] = STABLE_COINS,
minimumEthLocked: BigDecimal = MINIMUM_ETH_LOCKED,
Expand Down
3 changes: 2 additions & 1 deletion src/utils/pricing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { ONE_BD, ZERO_BD, ZERO_BI } from './constants'

export const WETH_ADDRESS = '0x4200000000000000000000000000000000000006'
export const USDC_WETH_05_POOL = '0x4c36388be6f416a29c8d8eee81c771ce6be14b18'
export const STABLECOIN_IS_TOKEN0 = false

const USDC_ADDRESS = '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913'

Expand All @@ -29,7 +30,7 @@ export function sqrtPriceX96ToTokenPrices(sqrtPriceX96: BigInt, token0: Token, t

export function getEthPriceInUSD(
stablecoinWrappedNativePoolAddress: string = USDC_WETH_05_POOL,
stablecoinIsToken0: boolean = false, // true is stablecoin is token0, false if stablecoin is token1
stablecoinIsToken0: boolean = STABLECOIN_IS_TOKEN0, // true is stablecoin is token0, false if stablecoin is token1
): BigDecimal {
const stablecoinWrappedNativePool = Pool.load(stablecoinWrappedNativePoolAddress)
if (stablecoinWrappedNativePool !== null) {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/staticTokenDefinition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class StaticTokenDefinition {

export const getStaticDefinition = (
tokenAddress: Address,
staticDefinitions: Array<StaticTokenDefinition>
staticDefinitions: Array<StaticTokenDefinition>,
): StaticTokenDefinition | null => {
const tokenAddressHex = tokenAddress.toHexString()

Expand Down

0 comments on commit bc7080b

Please sign in to comment.