mirror of
https://github.com/alexgo-io/DefiLlama-Adapters.git
synced 2026-04-30 22:02:28 +08:00
Chest finance: adding cash chest
Chest finance: adding cash chest with a replacementCoingeckoId
This commit is contained in:
@@ -5,13 +5,18 @@ const BigNumber = require("bignumber.js");
|
|||||||
const SOL_chest_owner = "3SGP67y3XAxZivaz2peNTxS6E44cQXErnEMyBXaCeT2n";
|
const SOL_chest_owner = "3SGP67y3XAxZivaz2peNTxS6E44cQXErnEMyBXaCeT2n";
|
||||||
const mSOL = "mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So";
|
const mSOL = "mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So";
|
||||||
const soETH = "2FPyTwcZLUg1MDrwsyoP4D6s1tM7hAkHYRjkNb5w6Pxk";
|
const soETH = "2FPyTwcZLUg1MDrwsyoP4D6s1tM7hAkHYRjkNb5w6Pxk";
|
||||||
const soBTC = "9n4nbM75f5Ui33ZbPYXn59EwSgE8CGsHtAeTH5YFeJ9E";
|
const BTC = "9n4nbM75f5Ui33ZbPYXn59EwSgE8CGsHtAeTH5YFeJ9E";
|
||||||
const soUSDC = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
|
const USDC = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
|
||||||
const tokensAndAccounts = [mSOL, soETH, soBTC, soUSDC].map((token) => [
|
|
||||||
|
const tokensAndAccounts = [mSOL, soETH, BTC, USDC].map((token) => [
|
||||||
token,
|
token,
|
||||||
SOL_chest_owner,
|
SOL_chest_owner,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
// Tokens with no Coingecko ID, need a replacementCoingeckoId to avoid erroring out
|
||||||
|
const CASH = "CASHVDm2wsJXfhj6VWxb7GiMdoLc17Du7paH4bNr5woT";
|
||||||
|
tokensAndAccounts.push([CASH, SOL_chest_owner, "dai"]);
|
||||||
|
|
||||||
async function solanaTVL() {
|
async function solanaTVL() {
|
||||||
// Sum Tokens balances
|
// Sum Tokens balances
|
||||||
let balances = await sumTokens(tokensAndAccounts);
|
let balances = await sumTokens(tokensAndAccounts);
|
||||||
@@ -22,7 +27,6 @@ async function solanaTVL() {
|
|||||||
balances["solana"] = new BigNumber(balances["solana"] || "0").plus(
|
balances["solana"] = new BigNumber(balances["solana"] || "0").plus(
|
||||||
new BigNumber(solBalance)
|
new BigNumber(solBalance)
|
||||||
);
|
);
|
||||||
|
|
||||||
return balances;
|
return balances;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user