Skip to content

Commit bf7c17d

Browse files
committed
lumin: update staking
1 parent ae0f743 commit bf7c17d

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

projects/lumin-finance/index.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
const { nullAddress } = require("../helper/tokenMapping");
2-
const { staking } = require('../helper/staking')
32

43
const LUMIN_V1_CONTRACT_ASSET_MANAGER = "0x61c6b185fafd2727ddeac6247e6770f5eadd823a"
54
const LUMIN_V2_CONTRACT = "0x1F00009c0310A4804925695F44355dE5110EC074"
@@ -29,12 +28,22 @@ async function borrowed(api) {
2928
const deposit = await api.multiCall({ abi: abi.v1.depositOf, target: LUMIN_V1_CONTRACT_ASSET_MANAGER, calls: assetIds.map(i => ({ params: [i, nullAddress] })) });
3029
tokens.forEach((token, i) => api.add(token, deposit[i][1]))
3130
}
31+
async function staking(api) {
32+
const stakingBalance = await api.call({
33+
abi: abi.v2.stakeStats,
34+
target: LUMIN_V2_CONTRACT,
35+
params: [],
36+
});
37+
38+
api.add('0x1FC01117E196800f416A577350CB1938d10501C2', stakingBalance[0][0])
39+
api.add('0x1FC01117E196800f416A577350CB1938d10501C2', stakingBalance[1][0])
40+
}
3241

3342
module.exports = {
3443
methodology: 'Gets v1 total deposits, and v2 staking statistics on-chain.',
3544
start: 194344665,
3645
arbitrum: {
37-
staking: staking('0x1F5FAB72ED3Be2F1cf8F4E20BC9096C94a04D5c5', '0x1FC01117E196800f416A577350CB1938d10501C2'),
46+
staking,
3847
tvl, borrowed,
3948
}
4049
}

0 commit comments

Comments
 (0)