Skip to content

Commit 09abeae

Browse files
Jin-K-Yangg1nt0ki
andauthored
Add lazyotter adapter (DefiLlama#9205)
* add lazyotter project * modify methodology * code refactor --------- Co-authored-by: g1nt0ki <[email protected]>
1 parent 1f4aee7 commit 09abeae

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

projects/lazyotter/index.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
const aaveVaults = [
2+
'0x7100409baaeda121ab92f663e3ddb898f11ff745',
3+
'0x844Ccc93888CAeBbAd91332FCa1045e6926a084d',
4+
]
5+
6+
async function tvl(_, _1, _2, { api }) {
7+
const tokens = await api.multiCall({ abi: 'address:asset', calls: aaveVaults})
8+
const aTokens = await api.multiCall({ abi: 'address:aToken', calls: aaveVaults})
9+
const tokensAndOwners2 = [tokens.concat(aTokens), aaveVaults.concat(aaveVaults)]
10+
return api.sumTokens({ tokensAndOwners2 })
11+
}
12+
13+
module.exports = {
14+
methodology: "TVL: Returns the total assets owned by the LazyOtter Vault on Scroll.",
15+
scroll: {
16+
tvl,
17+
},
18+
};

0 commit comments

Comments
 (0)