Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update network to blast #162

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/mappings/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Factory as FactoryContract } from '../types/templates/Pair/Factory'
import { TokenDefinition } from './tokenDefinition'

export const ADDRESS_ZERO = '0x0000000000000000000000000000000000000000'
export const FACTORY_ADDRESS = '0xf1D7CC64Fb4452F05c498126312eBE29f30Fbcf9'
export const FACTORY_ADDRESS = '0x5C346464d33F90bABaf70dB6388507CC889C1070'

export let ZERO_BI = BigInt.fromI32(0)
export let ONE_BI = BigInt.fromI32(1)
Expand Down
20 changes: 8 additions & 12 deletions src/mappings/pricing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,23 @@ import { Address, BigDecimal, BigInt } from '@graphprotocol/graph-ts/index'
import { Bundle, Pair, Token } from '../types/schema'
import { ADDRESS_ZERO, factoryContract, ONE_BD, UNTRACKED_PAIRS, ZERO_BD } from './helpers'

const WETH_ADDRESS = '0x82af49447d8a07e3bd95bd0d56f35241523fbab1'
const USDC_WETH_PAIR = '0xf64dfe17c8b87f012fcf50fbda1d62bfa148366a'
const WETH_ADDRESS = '0x4300000000000000000000000000000000000004'
const USDB_ADDRESS = '0x4300000000000000000000000000000000000003'
const USDC_WETH_PAIR = '0xad06cd451fe4034a6dd515af08e222a3d95b4a1c'

export function getEthPriceInUSD(): BigDecimal {
let usdcPair = Pair.load(USDC_WETH_PAIR) // usdc is token1
let usdcPair = Pair.load(USDC_WETH_PAIR) // usdb is token0
if (usdcPair !== null) {
return usdcPair.token1Price
return usdcPair.token0Price
} else {
return ZERO_BD
}
}

// token where amounts should contribute to tracked volume and liquidity
let WHITELIST: string[] = [
'0x82af49447d8a07e3bd95bd0d56f35241523fbab1', // WETH
'0xaf88d065e77c8cc2239327c5edb3a432268e5831', // USDC
]

const STABLECOINS: string[] = [
'0xaf88d065e77c8cc2239327c5edb3a432268e5831', // USDC
]
let WHITELIST: string[] = [WETH_ADDRESS, USDB_ADDRESS]

const STABLECOINS: string[] = [USDB_ADDRESS]

// minimum liquidity required to count towards tracked volume for pairs with small # of Lps
let MINIMUM_USD_THRESHOLD_NEW_PAIRS = BigDecimal.fromString('10000')
Expand Down
8 changes: 4 additions & 4 deletions subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ schema:
dataSources:
- kind: ethereum/contract
name: Factory
network: arbitrum-one
network: blast-mainnet
source:
address: '0xf1D7CC64Fb4452F05c498126312eBE29f30Fbcf9'
address: '0x5C346464d33F90bABaf70dB6388507CC889C1070'
abi: Factory
startBlock: 150442611
startBlock: 399405
mapping:
kind: ethereum/events
apiVersion: 0.0.7
Expand All @@ -34,7 +34,7 @@ dataSources:
templates:
- kind: ethereum/contract
name: Pair
network: arbitrum-one
network: blast-mainnet
source:
abi: Pair
mapping:
Expand Down
Loading