Skip to content

Commit

Permalink
add Spice TVL (#13715)
Browse files Browse the repository at this point in the history
  • Loading branch information
zelmkhan authored Mar 3, 2025
1 parent 52f22b7 commit b0f9c29
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions projects/spice/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const { sumTokens2 } = require('../helper/solana');
const { PublicKey } = require('@solana/web3.js');

async function tvl() {
const programId = new PublicKey('CcoYv1X4RczUmuGCUw3Vg1XWxspaofsh8dtD26cmN7nm');

const SPICE_SEED = Buffer.from("SPICE");
const TREASURY_SEED = Buffer.from("TREASURY");

const [treasuryAccount] = PublicKey.findProgramAddressSync(
[SPICE_SEED, TREASURY_SEED],
programId
);

return sumTokens2({ tokenAccounts: [treasuryAccount.toBase58()] });
}

module.exports = {
timetravel: false,
solana: { tvl },
};

0 comments on commit b0f9c29

Please sign in to comment.