Skip to content

Commit c7fd923

Browse files
Update index.js
1 parent b2b93e5 commit c7fd923

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

projects/thesauros/index.js

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Vault addresses by chain
12
const config = {
23
arbitrum: [
34
'0x57C10bd3fdB2849384dDe954f63d37DfAD9d7d70', // tUSDC Vault
@@ -8,6 +9,28 @@ const config = {
89
]
910
};
1011

12+
// Provider addresses by chain (for reference)
13+
// Note: Active provider is determined dynamically from each vault contract
14+
const providers = {
15+
arbitrum: {
16+
aaveV3: '0xbeEdb89DC47cab2678eBB796cfc8131062F16E39',
17+
compoundV3: '0xaBD932E0Fff6417a4Af16431d8D86a4e62d62fA3',
18+
dolomite: '0x3D036B97482CC6c42753dA51917B3302D5d0E9AE',
19+
steakhouseHighYieldMorpho: '0x00651b3E70873AfC852d9068Da4d359C473aA6c3',
20+
yearnDegenMorpho: '0x7b77caFe29d62c984e569793AD1C1DC9eD542413',
21+
gauntletCoreMorpho: '0xfFD8B1A9B97787c169154a485925512C79CA53E7',
22+
hyperithmMorpho: '0x54E5FF7FF115E2B01332D81f7efFB02adEF3c23D',
23+
},
24+
base: {
25+
aaveV3: '0x034a62f9617E8A1770f7c7EbA04e2DAb2Fda7f12',
26+
compoundV3: '0xFFAc48125fa4Bd8BC03CDCA725459563aAe77406',
27+
re7Morpho: '0x642E31bE2fF6d3Eba38dC16760f3a146092d89e3',
28+
steakhouseHighYieldMorpho: '0x0EF8ceD75e5877c69ac8619145219b67D76193a1',
29+
steakhousePrimeMorpho: '0x4516F8324bfAcC71e5099FabFC51E97e4905c062',
30+
gauntletCoreMorpho: '0x34c164e7021e38921aE20a723234d2b1B52289E9',
31+
},
32+
};
33+
1134
const abi = "function getDepositBalance(address user, address vault) view returns (uint256 balance)";
1235

1336
module.exports = {
@@ -27,7 +50,7 @@ Object.keys(config).forEach((chain) => {
2750
*/
2851
const tvl = async (api, vaults) => {
2952
// Get active provider and asset address for each vault
30-
const [providers, assets] = await Promise.all([
53+
const [activeProviders, assets] = await Promise.all([
3154
api.multiCall({ calls: vaults, abi: "address:activeProvider" }),
3255
api.multiCall({ calls: vaults, abi: "address:asset" }),
3356
]);
@@ -37,7 +60,7 @@ const tvl = async (api, vaults) => {
3760
// The vault acts as both the user and the vault parameter
3861
const balances = await api.multiCall({
3962
calls: vaults.map((vault, i) => ({
40-
target: providers[i],
63+
target: activeProviders[i],
4164
params: [vault, vault]
4265
})),
4366
abi

0 commit comments

Comments
 (0)