Skip to content

Commit

Permalink
feat: add halmark (DefiLlama#12726)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xTimepunk authored Dec 16, 2024
1 parent b15bbba commit b0f13c9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions projects/superform/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ async function tvl(api) {
const getSuperformRes = await api.multiCall({ abi: "function getSuperform(uint256) external view returns(address, uint32, uint64)", calls: forms, target: api.chainId === 250 ? fantom_factory_contract : factory_contract })
const super4626 = getSuperformRes.map(v => v[0])
const vaults = await api.multiCall({ abi: 'address:vault', calls: super4626 })

// Filter out blacklisted vaults
const filteredVaults = vaults.filter(vault => !blacklisted_vaults.includes(vault.toLowerCase()));
const filteredSuper4626 = super4626.filter((_, index) => !blacklisted_vaults.includes(vaults[index].toLowerCase()));

const assets = await api.multiCall({ abi: 'address:asset', calls: filteredSuper4626 })
const vBals = await api.multiCall({ abi: "erc20:balanceOf", calls: filteredVaults.map((v, i) => ({ target: v, params: filteredSuper4626[i] })) })
const bals = await api.multiCall({ abi: "function previewRedeemFrom(uint256) external view returns(uint256)", calls: filteredSuper4626.map((v, i) => ({ target: v, params: vBals[i] })), permitFailure: true })
Expand All @@ -26,8 +26,9 @@ async function tvl(api) {
module.exports = {
methodology: "counts the TVL of each superform across all the supported networks",
hallmarks: [
[1707350400,"Early Access"],
[1715212800,"Open Launch"]
[1707350400, "Early Access"],
[1715212800, "Open Launch"],
[1734012000, "SuperVaults Launch"],
]
};

Expand Down

0 comments on commit b0f13c9

Please sign in to comment.