File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,14 @@ const V1_SPECIAL_ADDRESSES = {
16
16
monusd : "0x051baaA86328Fc7F522431932B8010F66f260A6a"
17
17
}
18
18
}
19
- // V2
20
- const roeUSD = "0xF88DF111343BffE7a2d89FB770d77A264d53f043"
19
+ const DETERMINISTIC_roeUSD = "0x87196DB491ee1C77B91853CB79C118A322d6A9c0"
20
+ // V2 addresses
21
+ const V2_ADDRESSES = {
22
+ manta : "0xF88DF111343BffE7a2d89FB770d77A264d53f043" ,
23
+ avax : "0xF88DF111343BffE7a2d89FB770d77A264d53f043" ,
24
+ arbitrum : DETERMINISTIC_roeUSD ,
25
+ ethereum : DETERMINISTIC_roeUSD
26
+ }
21
27
22
28
async function tvl ( api ) {
23
29
const owners = [ ]
@@ -37,9 +43,10 @@ async function tvl(api) {
37
43
38
44
// V2
39
45
if ( V2_CHAINS . indexOf ( api . chain ) > - 1 ) {
40
- const vaultLengthV2 = await api . call ( { abi : "uint:getVaultsLength" , target : roeUSD } )
46
+ const vaultLengthV2 = await api . call ( { abi : "uint:getVaultsLength" , target : V2_ADDRESSES [ api . chain ] } )
41
47
const vaultCallsV2 = createIncrementArray ( vaultLengthV2 )
42
- const vaultsV2 = await api . multiCall ( { abi : "function vaults(uint vaultId) view returns (address)" , calls : vaultCallsV2 , target : roeUSD } )
48
+ const vaultsV2 = await api . multiCall ( { abi : "function vaults(uint vaultId) view returns (address)" , calls : vaultCallsV2 , target : V2_ADDRESSES [ api . chain ] } )
49
+
43
50
const _tokensV2 = await api . multiCall ( { abi : 'address:collateralAsset' , calls : vaultsV2 } )
44
51
tokens . push ( ..._tokensV2 )
45
52
owners . push ( ...vaultsV2 )
You can’t perform that action at this time.
0 commit comments