Skip to content

Commit

Permalink
Fetch kamino lend markets dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
peroxy committed Mar 6, 2024
1 parent 5a47ac0 commit 2f3e468
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion projects/kamino-lending/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ const { getConnection, sumTokens } = require('../helper/solana');
const { Program } = require('@project-serum/anchor');
const kaminoIdl = require('./kamino-lending-idl.json');
const { MintLayout } = require("../helper/utils/solana/layouts/mixed-layout");
const axios = require("axios");

async function tvl() {
const connection = getConnection();
const programId = new PublicKey('KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD');
const markets = ['7u3HeHxYDLhnCoErrtycNokbQYbWGzLs6JSDqGAv5PfF', 'DxXdAyU3kCjnyggvHmY5nAwg5cRbbmdyX3npfDMjjMek'];
const markets = (await axios.get('https://api.kamino.finance/v2/kamino-market')).data.map(x => x.lendingMarket);
const lendingMarketAuthSeed = 'lma';
const tokensAndOwners = [];
const ktokens = {};
Expand Down

0 comments on commit 2f3e468

Please sign in to comment.