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

feat: New chains #229

Merged
merged 26 commits into from
Aug 7, 2023
Merged
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
28 changes: 26 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,22 @@ Currently, there are multiple subgraphs, but additional subgraphs can be added t
## Subgraphs

1. **[Blocks](https://thegraph.com/legacy-explorer/subgraph/pancakeswap/blocks)**: Tracks all blocks on Binance Smart Chain.
- BSC https://thegraph.com/legacy-explorer/subgraph/pancakeswap/blocks
- zkSync https://api.studio.thegraph.com/query/45376/blocks-zksync/version/latest
- zkSync testnet https://api.studio.thegraph.com/query/45376/blocks-zksync-testnet/version/latest
- Polygon zkEVM https://api.studio.thegraph.com/query/45376/polygon-zkevm-block/version/latest

2. **[Exchange V2](https://nodereal.io/meganode/api-marketplace/pancakeswap-graphql)**: Tracks all PancakeSwap V2 Exchange data with price, volume, liquidity, ...
- BSC https://nodereal.io/meganode/api-marketplace/pancakeswap-graphql
- ETH https://api.thegraph.com/subgraphs/name/pancakeswap/exhange-eth
- ARB
- Hosted https://thegraph.com/hosted-service/subgraph/pancakeswap/exchange-v2-arb
- Studio https://api.studio.thegraph.com/query/45376/exchange-v2-arbitrum/version/latest
- ARB GRO https://api.thegraph.com/subgraphs/name/chef-jojo/exchange-v2-arb-goerli
- Polygon zkEVM https://api.studio.thegraph.com/query/45376/exchange-v2-polygon-zkevm/version/latest
- Polygon zkEVM testnet https://api.studio.thegraph.com/query/45376/exchange-v2-polygon-zkevm-test/version/latest
- zkSync https://api.studio.thegraph.com/query/45376/exchange-v2-zksync/version/latest
- zkSync testnet https://api.studio.thegraph.com/query/45376/exchange-v2-zksync-testnet/version/latest

3. **[Farm Auctions](https://thegraph.com/legacy-explorer/subgraph/pancakeswap/farm-auctions)**: Tracks all PancakeSwap Farm Auctions with auctions and bids.

Expand Down Expand Up @@ -38,13 +52,23 @@ Currently, there are multiple subgraphs, but additional subgraphs can be added t
- BSC https://thegraph.com/hosted-service/subgraph/pancakeswap/masterchef-v3-bsc
- BSC testnet https://thegraph.com/hosted-service/subgraph/pancakeswap/masterchef-v3-chapel
- ETH https://thegraph.com/hosted-service/subgraph/pancakeswap/masterchef-v3-eth
- ETH https://thegraph.com/hosted-service/subgraph/pancakeswap/masterchef-v3-goerli
- GOR https://thegraph.com/hosted-service/subgraph/pancakeswap/masterchef-v3-goerli
- Polygon zkEVM https://api.studio.thegraph.com/query/45376/masterchef-v3-polygon-zkevm/version/latest
- Polygon zkEVM testnet https://api.studio.thegraph.com/query/45376/masterchef-v3-zkevm-testnet/version/latest

16. **Exchange (v3)**: Tracks all PancakeSwap V3 Exchange data with price, volume, liquidity
- BSC https://thegraph.com/hosted-service/subgraph/pancakeswap/exchange-v3-bsc
- BSC testnet https://thegraph.com/hosted-service/subgraph/pancakeswap/exchange-v3-chapel
- ETH https://thegraph.com/hosted-service/subgraph/pancakeswap/exchange-v3-eth
- ETH https://thegraph.com/hosted-service/subgraph/pancakeswap/exchange-v3-goerli
- GOR https://thegraph.com/hosted-service/subgraph/pancakeswap/exchange-v3-goerli
- ARB
- Hosted https://thegraph.com/hosted-service/subgraph/pancakeswap/exchange-v3-arb
- Studio https://api.studio.thegraph.com/query/45376/exchange-v3-arbitrum/version/latest
- ARB GOR https://api.thegraph.com/subgraphs/name/chef-jojo/exhange-v3-arb-goerli
- Polygon zkEVM https://api.studio.thegraph.com/query/45376/exchange-v3-polygon-zkevm/version/latest
- Polygon zkEVM testnet https://api.studio.thegraph.com/query/45376/exchange-v3-polygon-zkevm-test/version/latest
- zkSync https://api.studio.thegraph.com/query/45376/exchange-v3-zksync/version/latest
- zkSync testnet https://api.studio.thegraph.com/query/45376/exchange-v3-zksync-testnet/version/latest


## Dependencies
Expand Down
38 changes: 38 additions & 0 deletions config/arbitrum-goerli.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
const WETH = "0xee01c0cd76354c383b8c7b4e65ea88d00b06f36f";

/**
* @type import('./config').NetworkConfig
*/
module.exports = {
network: "arbitrum-goerli",
wNativeAddress: WETH,
v3: {
// WETH-USDT 500
wNativeStablePoolAddress: "0x18a05774773b0886c19e3c3f6ed918869eb2aea2",
stableIsToken0: true,
factoryAddress: "0xba40c83026213f9cbc79998752721a0312bdb74a",
startBlock: 22705895,
stableCoins: [
"0x179522635726710dd7d2035a81d856de4aa7836c", // USDC
],
whitelistAddresses: [
WETH,
"0x179522635726710dd7d2035a81d856de4aa7836c", // USDC
"0xbe737d08fb505ad45e08a89ac7fda9791f025bf2", // ARB
],
nonfungiblePositionManagerAddress: "0xb10120961f7504766976a89e29802fa00553da5b",
nonfungiblePositionManagerStartBlock: 22708195,
minETHLocked: 0,
},
v2: {
factoryAddress: "0x333eae459075b1d7de8eb57997b5d4eee5f1070a",
startBlock: 22109729,
wNativeStablePair0: "0xee01c0cd76354c383b8c7b4e65ea88d00b06f36f", // WETH-USDC
wNativeStablePair1: "0x0000000000000000000000000000000000000000",
whitelistAddresses: [
WETH,
"0x179522635726710dd7d2035a81d856de4aa7836c", // USDC
"0xbe737d08fb505ad45e08a89ac7fda9791f025bf2", // ARB
],
},
};
49 changes: 49 additions & 0 deletions config/arbitrum.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
const WETH = "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1";

/**
* @type import('./config').NetworkConfig
*/
module.exports = {
network: "arbitrum-one",
wNativeAddress: WETH,
v3: {
// WETH-USDC 500
wNativeStablePoolAddress: "0xd9e2a1a61b6e61b275cec326465d417e52c1b95c",
stableIsToken0: false,
factoryAddress: "0x0bfbcf9fa4f9c56b0f40a671ad40e0805a091865",
startBlock: 101028949,
stableCoins: [
"0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9", // USDT
"0xaf88d065e77c8cc2239327c5edb3a432268e5831", // USDC
"0xff970a61a04b1ca14834a43f5de4533ebddb5cc8", // USDC.e
"0xda10009cbd5d07dd0cecc66161fc93d7c9000da1", // DAI
],
whitelistAddresses: [
WETH,
"0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9", // USDT
"0xaf88d065e77c8cc2239327c5edb3a432268e5831", // USDC
"0xff970a61a04b1ca14834a43f5de4533ebddb5cc8", // USDC.e
"0x912ce59144191c1204e64559fe8253a0e49e6548", // ARB
"0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f", // WBTC
"0xda10009cbd5d07dd0cecc66161fc93d7c9000da1", // DAI
],
nonfungiblePositionManagerAddress: "0x46a15b0b27311cedf172ab29e4f4766fbe7f4364",
nonfungiblePositionManagerStartBlock: 101032520,
minETHLocked: 0,
},
v2: {
factoryAddress: "0x02a84c1b3bbd7401a5f7fa98a384ebc70bb5749e",
startBlock: 101022992,
wNativeStablePair0: "0x0000000000000000000000000000000000000000",
wNativeStablePair1: "0xa59bd260f9707ea44551c510f714ccd482ec75d8", // WETH-USDC
whitelistAddresses: [
WETH,
"0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9", // USDT
"0xaf88d065e77c8cc2239327c5edb3a432268e5831", // USDC
"0xff970a61a04b1ca14834a43f5de4533ebddb5cc8", // USDC.e
"0x912ce59144191c1204e64559fe8253a0e49e6548", // ARB
"0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f", // WBTC
"0xda10009cbd5d07dd0cecc66161fc93d7c9000da1", // DAI
],
},
};
8 changes: 8 additions & 0 deletions config/config.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ export type NetworkConfig = {
stableIsToken0: boolean;
minETHLocked: number;
};
v2: {
wNativeStablePoolAddress: string;
factoryAddress: string;
startBlock: number;
whitelistAddresses: string[];
wNativeStablePair0: string;
wNativeStablePair1: string;
};
masterChefV3: {
startBlock: number;
masterChefAddress: string;
Expand Down
37 changes: 37 additions & 0 deletions config/linea-testnet.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
const WETH = "0x2c1b868d6596a18e32e61b901e4060c872647b6c";

/**
* @type import('./config').NetworkConfig
*/
module.exports = {
network: "linea-testnet",
wNativeAddress: WETH,
v3: {
// WETH-USDT 500
wNativeStablePoolAddress: "0x0b3470b916cf46172940147b81941fd7b4ea2935",
stableIsToken0: true,
factoryAddress: "0x02a84c1b3bbd7401a5f7fa98a384ebc70bb5749e",
startBlock: 710947,
stableCoins: [
"0xf56dc6695cf1f5c364edebc7dc7077ac9b586068", // USDC
],
whitelistAddresses: [
WETH,
"0xf56dc6695cf1f5c364edebc7dc7077ac9b586068", // USDC
],
nonfungiblePositionManagerAddress: "0xacfa791c833120c769fd3066c940b7d30cd8bc73",
nonfungiblePositionManagerStartBlock: 711068,
minETHLocked: 0,
},
v2: {
factoryAddress: "0xb6fafd4adbcd21cf665909767e0ed0d05709abfb",
startBlock: 703863,
wNativeStablePair0: "0x947435ac2c2b4f6d025acaffac2db410bf874aed",
wNativeStablePair1: "0x0000000000000000000000000000000000000000",
whitelistAddresses: [
WETH,
"0xf56dc6695cf1f5c364edebc7dc7077ac9b586068", // USDC
],
minETHLocked: 0,
},
};
40 changes: 40 additions & 0 deletions config/polygon-zkevm-testnet.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
const WETH = "0x30ec47f7dfae72ea79646e6cf64a8a7db538915b";

/**
* @type import('./config').NetworkConfig
*/
module.exports = {
network: "polygon-zkevm-testnet",
wNativeAddress: WETH,
v3: {
// WETH-USDT 500
wNativeStablePoolAddress: "0x885cd30213b89cb53e812eb2dd56c61a8178a256",
stableIsToken0: false,
factoryAddress: "0x2430dbd123bc40f8be6110065a448c1aa0619cb1",
startBlock: 776055,
stableCoins: [
"0x7379a261bC347BDD445484A91648Abf4A2BDEe5E", // USDT
],
whitelistAddresses: [
WETH,
"0x7379a261bC347BDD445484A91648Abf4A2BDEe5E", // USDT
],
nonfungiblePositionManagerAddress: "0x1f489dd5b559e976ae74303f939cfd0af1b62c2b",
nonfungiblePositionManagerStartBlock: 774445,
minETHLocked: 0,
},
v2: {
factoryAddress: "0xba40c83026213f9cbc79998752721a0312bdb74a",
startBlock: 773605,
wNativeStablePair0: "0x30ac79ce17f99cec768fbc6d5d4596f6582fe284",
wNativeStablePair1: "0x0000000000000000000000000000000000000000",
whitelistAddresses: [
WETH,
"0x7379a261bC347BDD445484A91648Abf4A2BDEe5E", // USDT
],
},
masterChefV3: {
masterChefAddress: "0xb66b07590b30d4e6e22e45ddc83b06bb018a7b44",
startBlock: 1097428,
},
};
51 changes: 51 additions & 0 deletions config/polygon-zkevm.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
const WETH = "0x4f9a0e7fd2bf6067db6994cf12e4495df938e6e9";

/**
* @type import('./config').NetworkConfig
*/
module.exports = {
network: "polygon-zkevm",
wNativeAddress: WETH,
v3: {
// WETH-USDT 500
wNativeStablePoolAddress: "0x4a080d9488ce2c8258185d78852275d6d3c2820c",
stableIsToken0: true,
factoryAddress: "0x0bfbcf9fa4f9c56b0f40a671ad40e0805a091865",
startBlock: 750149,
stableCoins: [
"0x1e4a5963abfd975d8c9021ce480b42188849d41d", // USDT
"0xa8ce8aee21bc2a48a5ef670afcc9274c7bbbc035", // USDC
"0xc5015b9d9161dca7e18e32f6f25c4ad850731fd4", // DAI
"0xea034fb02eb1808c2cc3adbc15f447b93cbe08e1", // WBTC
],
whitelistAddresses: [
WETH,
"0x1e4a5963abfd975d8c9021ce480b42188849d41d", // USDT
"0xa8ce8aee21bc2a48a5ef670afcc9274c7bbbc035", // USDC
"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270", // WMATIC
"0xc5015b9d9161dca7e18e32f6f25c4ad850731fd4", // DAI
"0xea034fb02eb1808c2cc3adbc15f447b93cbe08e1", // WBTC
],
nonfungiblePositionManagerAddress: "0x46a15b0b27311cedf172ab29e4f4766fbe7f4364",
nonfungiblePositionManagerStartBlock: 750354,
minETHLocked: 0,
},
v2: {
factoryAddress: "0x02a84c1b3bbd7401a5f7fa98a384ebc70bb5749e",
startBlock: 749593,
wNativeStablePair0: "0x03a9a6a8f62af9376a83c391fd90eeeea67fad6c", // WETH-USDT
wNativeStablePair1: "0xcf6030b2bfb39bb51f70bf666581483b36ee0113", // WETH-USDC
whitelistAddresses: [
WETH,
"0x1e4a5963abfd975d8c9021ce480b42188849d41d", // USDT
"0xa8ce8aee21bc2a48a5ef670afcc9274c7bbbc035", // USDC
"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270", // WMATIC
"0xc5015b9d9161dca7e18e32f6f25c4ad850731fd4", // DAI
"0xea034fb02eb1808c2cc3adbc15f447b93cbe08e1", // WBTC
],
},
masterChefV3: {
masterChefAddress: "0xe9c7f3196ab8c09f6616365e8873daeb207c0391",
startBlock: 1731157,
},
};
44 changes: 44 additions & 0 deletions config/zksync-era.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
const WETH = "0x5aea5775959fbc2557cc8789bc1bf90a239d9a91";

/**
* @type import('./config').NetworkConfig
*/
module.exports = {
network: "zksync-era",
wNativeAddress: WETH,
v3: {
// WETH-USDC 500
wNativeStablePoolAddress: "0x291d9f9764c72c9ba6ff47b451a9f7885ebf9977",
stableIsToken0: true,
factoryAddress: "0x1bb72e0cbbea93c08f535fc7856e0338d7f7a8ab",
startBlock: 8639214,
stableCoins: [
"0x493257fd37edb34451f62edf8d2a0c418852ba4c", // USDT
"0x3355df6d4c9c3035724fd0e3914de96a5a83aaf4", // USDC
"0x2039bb4116b4efc145ec4f0e2ea75012d6c0f181", // BUSD
],
whitelistAddresses: [
WETH,
"0x493257fd37edb34451f62edf8d2a0c418852ba4c", // USDT
"0x2039bb4116b4efc145ec4f0e2ea75012d6c0f181", // BUSD
"0x3355df6d4c9c3035724fd0e3914de96a5a83aaf4", // USDC
"0xbbeb516fb02a01611cbbe0453fe3c580d7281011", // WBTC
],
nonfungiblePositionManagerAddress: "0xa815e2ed7f7d5b0c49fda367f249232a1b9d2883",
nonfungiblePositionManagerStartBlock: 8640657,
minETHLocked: 0,
},
v2: {
factoryAddress: "0xd03d8d566183f0086d8d09a84e1e30b58dd5619d",
startBlock: 8637655,
wNativeStablePair0: "0x63edb9338d81c6d8219856548251bacf2a9b1830",
wNativeStablePair1: "0x0000000000000000000000000000000000000000",
whitelistAddresses: [
WETH,
"0x493257fd37edb34451f62edf8d2a0c418852ba4c", // USDT
"0x2039bb4116b4efc145ec4f0e2ea75012d6c0f181", // BUSD
"0x3355df6d4c9c3035724fd0e3914de96a5a83aaf4", // USDC
"0xbbeb516fb02a01611cbbe0453fe3c580d7281011", // WBTC
],
},
};
36 changes: 36 additions & 0 deletions config/zksync-goerli.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
const WETH = "0x02968db286f24cb18bb5b24903ec8ebfacf591c0";

/**
* @type import('./config').NetworkConfig
*/
module.exports = {
network: "zkSync2-testnet",
wNativeAddress: WETH,
v3: {
// WETH-USDT 500
wNativeStablePoolAddress: "0xfc02e31553a979a5827ee95e17bae43ae79d6761",
stableIsToken0: false,
factoryAddress: "0x48e6bc3f2546e63908cd09b04e2b3f78e57b6292",
startBlock: 9053839,
stableCoins: [
"0x0faf6df7054946141266420b43783387a78d82a9", // USDC
],
whitelistAddresses: [
WETH,
"0x0faf6df7054946141266420b43783387a78d82a9", // USDC
],
nonfungiblePositionManagerAddress: "0xf84697cfe7c88f846e4ba5dae14a6a8f67def5c2",
nonfungiblePositionManagerStartBlock: 9054587,
minETHLocked: 0,
},
v2: {
factoryAddress: "0x48a33610cd0e130af2024d55f67ae72a8c51ac27",
startBlock: 9053101,
wNativeStablePair0: "0x0000000000000000000000000000000000000000",
wNativeStablePair1: "0x6470f17db9b338df4955328077ce59b52fb5a961",
whitelistAddresses: [
WETH,
"0x0faf6df7054946141266420b43783387a78d82a9", // USDC
],
},
};
Loading
Loading