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 d23653b commit 4d257c9Copy full SHA for 4d257c9
projects/EthStrategy/index.js
@@ -0,0 +1,22 @@
1
+const USDS_CONTRACT_ADDRESS = '0xdC035D45d973E3EC169d2276DDab16f1e407384F';
2
+const ESPN_CONTRACT_ADDRESS = '0xb250C9E0F7bE4cfF13F94374C993aC445A1385fE';
3
+
4
+const ESPN_ABI = {
5
+ totalAssets: "function totalAssets() view returns (uint256)",
6
+};
7
8
+async function tvl(api) {
9
+ const espnTotalAssets = await api.call({
10
+ abi: ESPN_ABI.totalAssets,
11
+ target: ESPN_CONTRACT_ADDRESS,
12
+ });
13
+ api.add(USDS_CONTRACT_ADDRESS, espnTotalAssets);
14
+ return api.getBalances();
15
+}
16
17
+module.exports = {
18
+ methodology: 'Calculates total USDS TVL from ESPN contract totalAssets() only.',
19
+ ethereum: {
20
+ tvl,
21
+ },
22
0 commit comments