-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #322 from batphonghan/kelp_new_protocolsb
kelp : nuri | nile | yay | camelot : tvl
- Loading branch information
Showing
12 changed files
with
8,028 additions
and
5,431 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import BigNumber from "bignumber.js"; | ||
import { | ||
getAllV3Positions, | ||
getAllV3Share, | ||
getPoolPosition, | ||
getToken0And1 | ||
} from "./v3query"; | ||
import { CAMELOT_START_TIMESTAMP, NURI_START_TIMESTAMP } from "./utils"; | ||
import { getArbBlock } from "./fetcher"; | ||
|
||
const CAMELOT_SUBGRAPH_BY_GATEWAY = | ||
"https://api.thegraph.com/subgraphs/id/QmUjsQpF3mewR2nNyWkpCeKqosaNbRefeqiJJtdEoHQpC7"; | ||
const CAMELOT_AGETH_RSETH_POOL = "0x8039cd846fd1f1fe3f560bdbea5f799e499f7873"; | ||
|
||
export async function getCamelotAgEthHodlers(timestamp: number) { | ||
if (timestamp < CAMELOT_START_TIMESTAMP) { | ||
return []; | ||
} | ||
|
||
const arbBlockNumber = await getArbBlock(timestamp); | ||
const balances = await getAllV3Share( | ||
arbBlockNumber, | ||
CAMELOT_SUBGRAPH_BY_GATEWAY, | ||
CAMELOT_AGETH_RSETH_POOL | ||
); | ||
|
||
return balances; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import BigNumber from "bignumber.js"; | ||
import { | ||
getAllV3Positions, | ||
getAllV3Share, | ||
getPoolPosition, | ||
getToken0And1 | ||
} from "./v3query"; | ||
import { NILE_START_BLOCK } from "./utils"; | ||
|
||
const NILE_AGETH_RSETH_POOL = "0x6d1ff6a6ea1b54dacd9609949593e7244aea8a4c"; | ||
|
||
const NILE_SUBGRAPH_BY_DEPLOY_ID = | ||
"https://api.thegraph.com/subgraphs/id/QmPWcLm9K92GkSwD4UtikFqpHbrHgC2tRMUEiaZ8B7p2Xb"; | ||
|
||
export async function getNileAgEthHodlers(lineaBlockNumber: number) { | ||
if (lineaBlockNumber < NILE_START_BLOCK) { | ||
return []; | ||
} | ||
|
||
const balances = await getAllV3Share( | ||
lineaBlockNumber, | ||
NILE_SUBGRAPH_BY_DEPLOY_ID, | ||
NILE_AGETH_RSETH_POOL | ||
); | ||
|
||
return balances; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import BigNumber from "bignumber.js"; | ||
import { | ||
getAllV3Positions, | ||
getAllV3Share, | ||
getPoolPosition, | ||
getToken0And1 | ||
} from "./v3query"; | ||
import { NURI_START_TIMESTAMP } from "./utils"; | ||
import { getScrollBlock } from "./fetcher"; | ||
|
||
const NURI_AGETH_RSETH_POOL = "0x107d317617e82f1871906cf6fee702a5daa4d135"; | ||
const API_KEY = process.env.SUBGRAPH_API_KEY || ""; | ||
const NURI_SUBGRAPH_BY_GATEWAY = `https://gateway.thegraph.com/api/${API_KEY}/subgraphs/id/Eqr2CueSusTohoTsXCiQgQbaApjuK2ikFvpqkVTPo1y5`; | ||
|
||
export async function getNuriAgEthHodlers(timestamp: number) { | ||
if (timestamp < NURI_START_TIMESTAMP) { | ||
return []; | ||
} | ||
|
||
const scrollBlockNumber = await getScrollBlock(timestamp); | ||
const balances = await getAllV3Share( | ||
scrollBlockNumber, | ||
NURI_SUBGRAPH_BY_GATEWAY, | ||
NURI_AGETH_RSETH_POOL | ||
); | ||
|
||
return balances; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.