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 3eb0929 commit 4f44606Copy full SHA for 4f44606
projects/theo-network/index.js
@@ -0,0 +1,20 @@
1
+const { getConfig } = require('../helper/cache')
2
+
3
+const config = {
4
+ ethereum: {},
5
+ arbitrum: {},
6
+ base: {},
7
+}
8
9
+Object.keys(config).forEach(chain => {
10
+ module.exports[chain] = {
11
+ tvl: async (api) => {
12
+ const { [chain]: data } = await getConfig('theo-network', "https://vaults.theo.xyz/vaults/vaultInfo");
13
14
+ const calls = Object.values(data).map(i => i.contract)
15
+ const tokens = Object.values(data).map(i => i.asset)
16
+ const bals = await api.multiCall({ abi: 'uint256:totalBalance', calls })
17
+ api.add(tokens, bals)
18
+ }
19
20
+})
0 commit comments