Skip to content

Commit

Permalink
solana: remove rate limit
Browse files Browse the repository at this point in the history
  • Loading branch information
g1nt0ki committed Jan 18, 2025
1 parent 8df3870 commit c444de7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions projects/helper/solana.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ function getAssociatedTokenAddress(mint, owner,) {


async function getTokenSupplies(tokens, { api } = {}) {
const sleepTime = tokens.length > 2000 ? 2000 : 200
// const sleepTime = tokens.length > 2000 ? 2000 : 200
const sleepTime = 200
const connection = getConnection()
tokens = tokens.map(i => typeof i === 'string' ? new PublicKey(i) : i)
const res = await runInChunks(tokens, chunk => connection.getMultipleAccountsInfo(chunk), { sleepTime })
Expand All @@ -94,7 +95,8 @@ async function getTokenSupplies(tokens, { api } = {}) {
}

async function getTokenAccountBalances(tokenAccounts, { individual = false, allowError = false, chain = 'solana' } = {}) {
const sleepTime = tokenAccounts.length > 2000 ? 2000 : 200
// const sleepTime = tokenAccounts.length > 2000 ? 2000 : 200
const sleepTime = 200
log('total token accounts: ', tokenAccounts.length, 'sleepTime: ', sleepTime)
tokenAccounts.forEach((val, i) => {
if (typeof val === 'string') tokenAccounts[i] = new PublicKey(val)
Expand Down
1 change: 1 addition & 0 deletions projects/meteora-dlmm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ async function tvl() {

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

0 comments on commit c444de7

Please sign in to comment.