Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Adapter, lisUSD: add pool2 #11969

Merged
merged 2 commits into from
Oct 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions projects/helio-money/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@ const ADDRESSES = require("../helper/coreAssets.json");
const { staking } = require("../helper/staking");
const { sumTokensExport } = require("../helper/unknownTokens");

const lisLPs = [
"0xe8f4644637f127aFf11F9492F41269eB5e8b8dD2", // Lista LP Stable-LP
"0xFf5ed1E64aCA62c822B178FFa5C36B40c112Eb00", // Lista LP aSnBNB-WBNB
"0x4b2D67Bf25245783Fc4C33a48962775437F9159c", // Lista LP aUSDT-LISTA
"0xC23d348f9cC86dDB059ec798e87E7F76FBC077C1", // Lista LP aHAY-USDT
"0xF6aB5cfdB46357f37b0190b793fB199D62Dcf504", // Lista LP UV-17-THE
"0x1Cf9c6D475CdcA67942d41B0a34BD9cB9D336C4d", // Lista LP sAMM-HAY/FRAX
];

const abi = {
lpToken: "address:lpToken",
lpTotalSupply: "uint256:lpTotalSupply",
};

const pool2 = async (api) => {
const [lisLpTokens, lisLpBalances] = await Promise.all([
api.multiCall({calls: lisLPs.map((lis) => ({ target: lis })), abi: abi.lpToken }),
api.multiCall({calls: lisLPs.map((lis) => ({ target: lis })), abi: abi.lpTotalSupply }),
]);

lisLPs.forEach((_lp, i) => {
api.add(lisLpTokens[i], lisLpBalances[i])
})
}

module.exports = {
methodology: "The TVL is calculated by summing the values of tokens held in the specified vault addresses",
hallmarks: [
Expand Down Expand Up @@ -66,6 +91,7 @@ module.exports = {
],
],
}),
pool2,
staking: staking('0xd0C380D31DB43CD291E2bbE2Da2fD6dc877b87b3','0xFceB31A79F71AC9CBDCF853519c1b12D379EdC46')
},
};
Loading