Skip to content

Commit

Permalink
chore: Add zksync v3 whitelist (#258)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xjojoex authored Mar 27, 2024
1 parent e57f631 commit 2161064
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 13 deletions.
7 changes: 7 additions & 0 deletions config/zksync-era.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,20 @@ module.exports = {
"0x493257fd37edb34451f62edf8d2a0c418852ba4c", // USDT
"0x3355df6d4c9c3035724fd0e3914de96a5a83aaf4", // USDC
"0x2039bb4116b4efc145ec4f0e2ea75012d6c0f181", // BUSD
"0x4b9eb6c0b6ea15176bbf62841c6b2a8a398cb656", // DAI
"0x8e86e46278518efc1c5ced245cba2c7e3ef11557", // USD+
],
whitelistAddresses: [
WETH,
"0x493257fd37edb34451f62edf8d2a0c418852ba4c", // USDT
"0x2039bb4116b4efc145ec4f0e2ea75012d6c0f181", // BUSD
"0x3355df6d4c9c3035724fd0e3914de96a5a83aaf4", // USDC
"0xbbeb516fb02a01611cbbe0453fe3c580d7281011", // WBTC
"0x32fd44bb869620c0ef993754c8a00be67c464806", // rETH
"0x703b52f2b28febcb60e1372858af5b18849fe867", // wstETH
"0x3a287a06c66f9e95a56327185ca2bdf5f031cecd", // CAKE
"0x4b9eb6c0b6ea15176bbf62841c6b2a8a398cb656", // DAI
"0x8e86e46278518efc1c5ced245cba2c7e3ef11557", // USD+
],
nonfungiblePositionManagerAddress: "0xa815e2ed7f7d5b0c49fda367f249232a1b9d2883",
nonfungiblePositionManagerStartBlock: 8640657,
Expand Down
14 changes: 7 additions & 7 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: zksync-era
source:
address: "0x0bfbcf9fa4f9c56b0f40a671ad40e0805a091865"
address: "0x1bb72e0cbbea93c08f535fc7856e0338d7f7a8ab"
abi: Factory
startBlock: 101028949
startBlock: 8639214
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: zksync-era
source:
address: "0x46a15b0b27311cedf172ab29e4f4766fbe7f4364"
address: "0xa815e2ed7f7d5b0c49fda367f249232a1b9d2883"
abi: NonfungiblePositionManager
startBlock: 101032520
startBlock: 8640657
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: zksync-era
source:
abi: Pool
mapping:
Expand Down
2 changes: 1 addition & 1 deletion subgraphs/exchange-v3/template/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Factory as FactoryContract } from "../generated/templates/Pool/Factory"

export const ADDRESS_ZERO = "0x0000000000000000000000000000000000000000";
// prettier-ignore
export const FACTORY_ADDRESS = "0x0bfbcf9fa4f9c56b0f40a671ad40e0805a091865";
export const FACTORY_ADDRESS = "0x1bb72e0cbbea93c08f535fc7856e0338d7f7a8ab";

export let ZERO_BI = BigInt.fromI32(0);
export let ONE_BI = BigInt.fromI32(1);
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 = "0x5aea5775959fbc2557cc8789bc1bf90a239d9a91";
// prettier-ignore
const USDC_WETH_03_POOL = "0xd9e2a1a61b6e61b275cec326465d417e52c1b95c";
const USDC_WETH_03_POOL = "0x291d9f9764c72c9ba6ff47b451a9f7885ebf9977";

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,0xe80772eaf6e2e18b651f160bc9158b2a5cafca65,0xb1084db8d3c05cebd5fa9335df95ee4b8a0edc30".split(",");
export let WHITELIST_TOKENS: string[] = "0x5aea5775959fbc2557cc8789bc1bf90a239d9a91,0x493257fd37edb34451f62edf8d2a0c418852ba4c,0x2039bb4116b4efc145ec4f0e2ea75012d6c0f181,0x3355df6d4c9c3035724fd0e3914de96a5a83aaf4,0xbbeb516fb02a01611cbbe0453fe3c580d7281011,0x32fd44bb869620c0ef993754c8a00be67c464806,0x703b52f2b28febcb60e1372858af5b18849fe867,0x3a287a06c66f9e95a56327185ca2bdf5f031cecd,0x4b9eb6c0b6ea15176bbf62841c6b2a8a398cb656,0x8e86e46278518efc1c5ced245cba2c7e3ef11557".split(",");

// prettier-ignore
let STABLE_COINS: string[] = "0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9,0xaf88d065e77c8cc2239327c5edb3a432268e5831,0xff970a61a04b1ca14834a43f5de4533ebddb5cc8,0xda10009cbd5d07dd0cecc66161fc93d7c9000da1".split(",");
let STABLE_COINS: string[] = "0x493257fd37edb34451f62edf8d2a0c418852ba4c,0x3355df6d4c9c3035724fd0e3914de96a5a83aaf4,0x2039bb4116b4efc145ec4f0e2ea75012d6c0f181,0x4b9eb6c0b6ea15176bbf62841c6b2a8a398cb656,0x8e86e46278518efc1c5ced245cba2c7e3ef11557".split(",");

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

Expand Down

0 comments on commit 2161064

Please sign in to comment.