Skip to content

Commit

Permalink
chore: Add more tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
0xjojoex committed Aug 10, 2023
1 parent 29bcc59 commit cbb09de
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 17 deletions.
9 changes: 9 additions & 0 deletions config/linea.ts → config/linea.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,17 @@ module.exports = {
startBlock: 1444,
stableCoins: [
"0x176211869ca2b568f2a7d4ee941e073a821ee1ff", // USDC
"0xa219439258ca9da29e9cc4ce5596924745e12b93", // USDT
"0x4af15ec2a0bd43db75dd04e62faa3b8ef36b00d5", // DAI
"0x7d43AABC515C356145049227CeE54B608342c0ad", // BUSD
],
whitelistAddresses: [
WETH,
"0x176211869ca2b568f2a7d4ee941e073a821ee1ff", // USDC
"0x3aab2285ddcddad8edf438c1bab47e1a9d05a9b4", // WBTC
"0xa219439258ca9da29e9cc4ce5596924745e12b93", // USDT
"0x4af15ec2a0bd43db75dd04e62faa3b8ef36b00d5", // DAI
"0x7d43AABC515C356145049227CeE54B608342c0ad", // BUSD
],
nonfungiblePositionManagerAddress: "0x46a15b0b27311cedf172ab29e4f4766fbe7f4364",
nonfungiblePositionManagerStartBlock: 1459,
Expand All @@ -33,6 +39,9 @@ module.exports = {
WETH,
"0x176211869ca2b568f2a7d4ee941e073a821ee1ff", // USDC
"0x3aab2285ddcddad8edf438c1bab47e1a9d05a9b4", // WBTC
"0xa219439258ca9da29e9cc4ce5596924745e12b93", // USDT
"0x4af15ec2a0bd43db75dd04e62faa3b8ef36b00d5", // DAI
"0x7d43AABC515C356145049227CeE54B608342c0ad", // BUSD
],
minETHLocked: 0,
},
Expand Down
8 changes: 4 additions & 4 deletions subgraphs/exchange-v2/mappings/pricing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { Bundle, Pair, Token } from "../generated/schema";
import { ADDRESS_ZERO, factoryContract, ONE_BD, ZERO_BD } from "./utils";

// prettier-ignore
let WETH_ADDRESS = "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1";
let WETH_ADDRESS = "0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f";
// prettier-ignore
let WETH_USDT_PAIR = "0xa59bd260f9707ea44551c510f714ccd482ec75d8";
let WETH_USDT_PAIR = "0x0000000000000000000000000000000000000000";
// prettier-ignore
let WETH_USDC_PAIR = "0x0000000000000000000000000000000000000000";
let WETH_USDC_PAIR = "0xb91a09d3794e815008194b0423802af8359516db";

export function getETHPriceInUSD(): BigDecimal {
// fetch eth prices for each stablecoin
Expand All @@ -35,7 +35,7 @@ export function getETHPriceInUSD(): BigDecimal {

// token where amounts should contribute to tracked volume and liquidity
// prettier-ignore
let WHITELIST: string[] = "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1,0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9,0xaf88d065e77c8cc2239327c5edb3a432268e5831,0xff970a61a04b1ca14834a43f5de4533ebddb5cc8,0x912ce59144191c1204e64559fe8253a0e49e6548,0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f,0xda10009cbd5d07dd0cecc66161fc93d7c9000da1".split(",");
let WHITELIST: string[] = "0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f,0x176211869ca2b568f2a7d4ee941e073a821ee1ff,0x3aab2285ddcddad8edf438c1bab47e1a9d05a9b4,0xa219439258ca9da29e9cc4ce5596924745e12b93,0x4af15ec2a0bd43db75dd04e62faa3b8ef36b00d5,0x7d43AABC515C356145049227CeE54B608342c0ad".split(",");

// minimum liquidity for price to get tracked
let MINIMUM_LIQUIDITY_THRESHOLD_ETH = BigDecimal.fromString("5");
Expand Down
6 changes: 3 additions & 3 deletions subgraphs/exchange-v2/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: linea
source:
address: "0x02a84c1b3bbd7401a5f7fa98a384ebc70bb5749e"
abi: Factory
startBlock: 101022992
startBlock: 1439
mapping:
kind: ethereum/events
apiVersion: 0.0.4
Expand All @@ -34,7 +34,7 @@ dataSources:
templates:
- kind: ethereum/contract
name: Pair
network: arbitrum-one
network: linea
source:
abi: Pair
mapping:
Expand Down
10 changes: 5 additions & 5 deletions subgraphs/exchange-v3/template/subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ features:
dataSources:
- kind: ethereum/contract
name: Factory
network: arbitrum-one
network: linea
source:
address: "0x0bfbcf9fa4f9c56b0f40a671ad40e0805a091865"
abi: Factory
startBlock: 101028949
startBlock: 1444
mapping:
kind: ethereum/events
apiVersion: 0.0.4
Expand All @@ -37,11 +37,11 @@ dataSources:
handler: handlePoolCreated
- kind: ethereum/contract
name: NonfungiblePositionManager
network: arbitrum-one
network: linea
source:
address: "0x46a15b0b27311cedf172ab29e4f4766fbe7f4364"
abi: NonfungiblePositionManager
startBlock: 101032520
startBlock: 1459
mapping:
kind: ethereum/events
apiVersion: 0.0.4
Expand Down Expand Up @@ -71,7 +71,7 @@ dataSources:
templates:
- kind: ethereum/contract
name: Pool
network: arbitrum-one
network: linea
source:
abi: Pool
mapping:
Expand Down
10 changes: 5 additions & 5 deletions subgraphs/exchange-v3/template/utils/pricing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ import { BigDecimal, BigInt } from "@graphprotocol/graph-ts";
import { exponentToBigDecimal, safeDiv } from "./index";

// prettier-ignore
const WETH_ADDRESS = "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1";
const WETH_ADDRESS = "0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f";
// prettier-ignore
const USDC_WETH_03_POOL = "0xd9e2a1a61b6e61b275cec326465d417e52c1b95c";
const USDC_WETH_03_POOL = "0xd5539d0360438a66661148c633a9f0965e482845";

const STABLE_IS_TOKEN0 = "false" as string;
const STABLE_IS_TOKEN0 = "true" as string;

// token where amounts should contribute to tracked volume and liquidity
// usually tokens that many tokens are paired with s
// prettier-ignore
export let WHITELIST_TOKENS: string[] = "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1,0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9,0xaf88d065e77c8cc2239327c5edb3a432268e5831,0xff970a61a04b1ca14834a43f5de4533ebddb5cc8,0x912ce59144191c1204e64559fe8253a0e49e6548,0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f,0xda10009cbd5d07dd0cecc66161fc93d7c9000da1".split(",");
export let WHITELIST_TOKENS: string[] = "0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f,0x176211869ca2b568f2a7d4ee941e073a821ee1ff,0x3aab2285ddcddad8edf438c1bab47e1a9d05a9b4,0xa219439258ca9da29e9cc4ce5596924745e12b93,0x4af15ec2a0bd43db75dd04e62faa3b8ef36b00d5,0x7d43AABC515C356145049227CeE54B608342c0ad".split(",");

// prettier-ignore
let STABLE_COINS: string[] = "0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9,0xaf88d065e77c8cc2239327c5edb3a432268e5831,0xff970a61a04b1ca14834a43f5de4533ebddb5cc8,0xda10009cbd5d07dd0cecc66161fc93d7c9000da1".split(",");
let STABLE_COINS: string[] = "0x176211869ca2b568f2a7d4ee941e073a821ee1ff,0xa219439258ca9da29e9cc4ce5596924745e12b93,0x4af15ec2a0bd43db75dd04e62faa3b8ef36b00d5,0x7d43AABC515C356145049227CeE54B608342c0ad".split(",");

let MINIMUM_ETH_LOCKED = BigDecimal.fromString("0");

Expand Down

0 comments on commit cbb09de

Please sign in to comment.