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 3bd0adf commit 9ceaf6cCopy full SHA for 9ceaf6c
projects/palladium/index.js
@@ -0,0 +1,20 @@
1
+const { sumTokens2 } = require("../helper/unwrapLPs")
2
+
3
+const ADMIN_ADDRESSES = {
4
+ btnx: "0x741145aF40A46cD8B7653Be09EC59CEb9c6c45e1"
5
+}
6
7
+async function tvl(api) {
8
+ const adminContract = ADMIN_ADDRESSES[api.chain];
9
+ const collAddresses = await api.call({ abi: "address[]:getValidCollateral", target: adminContract, })
10
+ const activePool = await api.call({ abi: "address:activePool", target: adminContract, })
11
+ await sumTokens2({ api, tokens: collAddresses, owner: activePool, })
12
13
14
+module.exports = {
15
+ methodology: "Adds up the total value locked as collateral on the Palladium protocol",
16
17
18
+Object.keys(ADMIN_ADDRESSES).forEach((chain) => {
19
+ module.exports[chain] = { tvl }
20
+})
0 commit comments