From a3b2c206f055f9f0a04d0d26cd4ba6cc9251c509 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 16 Aug 2024 10:44:06 +0200 Subject: [PATCH] track more sol staking projects --- projects/bonk-sol/index.js | 12 ++++++++++++ projects/helius-sol/index.js | 12 ++++++++++++ projects/jupSOL/index.js | 12 ++++++++++++ projects/shinobi-sol/index.js | 12 ++++++++++++ projects/solayer/index.js | 36 ++++++++++++++--------------------- projects/vsol/index.js | 12 ++++++++++++ 6 files changed, 74 insertions(+), 22 deletions(-) create mode 100644 projects/bonk-sol/index.js create mode 100644 projects/helius-sol/index.js create mode 100644 projects/jupSOL/index.js create mode 100644 projects/shinobi-sol/index.js create mode 100644 projects/vsol/index.js diff --git a/projects/bonk-sol/index.js b/projects/bonk-sol/index.js new file mode 100644 index 000000000000..913d9a817cc6 --- /dev/null +++ b/projects/bonk-sol/index.js @@ -0,0 +1,12 @@ +const { getSolBalanceFromStakePool } = require('../helper/solana') + +async function tvl(api) { + await getSolBalanceFromStakePool('ArAQfbzsdotoKB5jJcZa3ajQrrPcWr2YQoDAEAiFxJAC', api) +} + +module.exports = { + timetravel: false, + solana: { + tvl + } +} \ No newline at end of file diff --git a/projects/helius-sol/index.js b/projects/helius-sol/index.js new file mode 100644 index 000000000000..97dc4ee5b997 --- /dev/null +++ b/projects/helius-sol/index.js @@ -0,0 +1,12 @@ +const { getSolBalanceFromStakePool } = require('../helper/solana') + +async function tvl(api) { + await getSolBalanceFromStakePool('3wK2g8ZdzAH8FJ7PKr2RcvGh7V9VYson5hrVsJM5Lmws', api) +} + +module.exports = { + timetravel: false, + solana: { + tvl + } +} \ No newline at end of file diff --git a/projects/jupSOL/index.js b/projects/jupSOL/index.js new file mode 100644 index 000000000000..ad1870130917 --- /dev/null +++ b/projects/jupSOL/index.js @@ -0,0 +1,12 @@ +const { getSolBalanceFromStakePool } = require('../helper/solana') + +async function tvl(api) { + await getSolBalanceFromStakePool('8VpRhuxa7sUUepdY3kQiTmX9rS5vx4WgaXiAnXq4KCtr', api) +} + +module.exports = { + timetravel: false, + solana: { + tvl + } +} \ No newline at end of file diff --git a/projects/shinobi-sol/index.js b/projects/shinobi-sol/index.js new file mode 100644 index 000000000000..763e467561bc --- /dev/null +++ b/projects/shinobi-sol/index.js @@ -0,0 +1,12 @@ +const { getSolBalanceFromStakePool } = require('../helper/solana') + +async function tvl(api) { + await getSolBalanceFromStakePool('spp1mo6shdcrRyqDK2zdurJ8H5uttZE6H6oVjHxN1QN', api) +} + +module.exports = { + timetravel: false, + solana: { + tvl + } +} \ No newline at end of file diff --git a/projects/solayer/index.js b/projects/solayer/index.js index 93a68c5879e0..6e4b7d6a45c7 100644 --- a/projects/solayer/index.js +++ b/projects/solayer/index.js @@ -1,26 +1,18 @@ -const { sumTokens2, getConnection } = require("../helper/solana"); -const { PublicKey } = require("@solana/web3.js"); +const { sumTokens2, getSolBalanceFromStakePool } = require("../helper/solana"); -async function tvl() { - const connection = getConnection(); - const [account, lst] = await Promise.all([ - connection.getAccountInfo(new PublicKey('po1osKDWYF9oiVEGmzKA4eTs8eMveFRMox3bUKazGN2')), - sumTokens2({ - tokensAndOwners: [ - ['J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn', 'GgTE2exWZ36Q82FoVgEEzEHYCfsbGjm3P6zRfx3hLUv4'], - ['mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So', 'E9LmYVKU5oyjWs9Zmzv9ji8NkzhJxJQbUEH3FWDKZt8D'], - ['bSo13r4TkiE4KumL71LsHTPpL2euBYLFx6h9HP3piy1', '2DRZbbse5b5souvMQkifpS8CRBsDeLt6a9xDqqVJvmdw'], - ['5oVNBeEEQvYi1cX3ir8Dx5n1P7pdxydbGF2X4TxVusJm', 'GF8jvNGY44tnCfhnzdoSUBpgfog9YnLc6BRBCnt8j9do'], - ['HUBsveNpjo5pWqNkH57QzxjQASdTVXcSK7bVKTSZtcSX', '49EXLuCxc2ArgFfpJBeuci6DgULxMzrETAHpAGvsFBf1'], - ['Gwa3a4VJbAyorLhn6TEeWLbQ4tWyup4E6oL3WjAga7tx', '2DriEN733SMxEzqDBVSGwev7KwcdHPXVy65sw9u5mR14'] - ], - }) - ]); - - return { - solana: Number(account.data.readBigUint64LE(258)) / 1e9, - ...lst - }; +async function tvl(api) { + await getSolBalanceFromStakePool('po1osKDWYF9oiVEGmzKA4eTs8eMveFRMox3bUKazGN2', api) + return sumTokens2({ + tokenAccounts: [ + 'AGuwBAj91dgz1fhaK4qgYcH7SohyZEMK1VXTizFsWjq7', + 'Q75n2KgZp7insTKkavJWftWWuGDDUuHMquosQ5hbn7G', + 'HBjQ1jF2ynYFpwx46qiZsKE3rmvgEcxnkhvKeGP6omUd', + '6eLZQKhbiBNmR4PiDFJgE6TZAoH3BwR6ceVwc3K1YjBZ', + 'HNw9tA7sWvjDH4cDCykj23Q4ifkKZerr6MbMfFXgyp62', + 'Gwa3a4VJbAyorLhn6TEeWLbQ4tWyup4E6oL3WjAga7tx', + ], + balances: api.getBalances() + }) } module.exports = { diff --git a/projects/vsol/index.js b/projects/vsol/index.js new file mode 100644 index 000000000000..8099c9524b0f --- /dev/null +++ b/projects/vsol/index.js @@ -0,0 +1,12 @@ +const { getSolBalanceFromStakePool } = require('../helper/solana') + +async function tvl(api) { + await getSolBalanceFromStakePool('Fu9BYC6tWBo1KMKaP3CFoKfRhqv9akmy3DuYwnCyWiyC', api) +} + +module.exports = { + timetravel: false, + solana: { + tvl + } +} \ No newline at end of file