We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 213034c commit 761f254Copy full SHA for 761f254
projects/zoofi-io/index.js
@@ -0,0 +1,13 @@
1
+async function tvl(api) {
2
+ const zooProtocol = '0xc0fA386aE92f18A783476d09121291A1972C30Dc'
3
+ const assets = await api.call({ abi: 'address[]:assetTokens', target: zooProtocol })
4
+ const vaults = (await api.multiCall({ abi: 'function getVaultAddresses(address) view returns (address[])', calls: assets, target: zooProtocol })).flat()
5
+ const bals = await api.multiCall({ abi: 'uint256:assetBalance', calls: vaults })
6
+ const tokens = await api.multiCall({ abi: 'address:assetToken', calls: vaults })
7
+ api.add(tokens, bals)
8
+}
9
+
10
+module.exports = {
11
+ doublecounted: true,
12
+ berachain: { tvl }
13
0 commit comments