File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ const { queryContract } = require ( "../helper/chain/cosmos" ) ;
2
+ const CORE_ASSETS = require ( '../helper/coreAssets.json' ) ;
3
+
4
+ const consts = {
5
+ EBABY_CONTRACT : 'bbn1m7zr5jw4k9z22r9ajggf4ucalwy7uxvu9gkw6tnsmv42lvjpkwasagek5g' ,
6
+ }
7
+
8
+ async function eBabyTVL ( api ) {
9
+ const data = await queryContract ( {
10
+ contract : consts . EBABY_CONTRACT ,
11
+ chain : api . chain ,
12
+ data : { staking_liquidity : { } } ,
13
+ } ) ;
14
+
15
+ //
16
+ const totalStakedAmount = parseInt ( data . amount ) ;
17
+
18
+ const token = CORE_ASSETS . babylon . BABY ;
19
+ api . add ( token , totalStakedAmount ) ;
20
+ }
21
+
22
+
23
+ module . exports = {
24
+ methodology : 'TVL counts the tokens that are locked in the Escher staking hub' ,
25
+ babylon : {
26
+ tvl : eBabyTVL ,
27
+ } ,
28
+ } // node test.js projects/milky-way/index.js
You can’t perform that action at this time.
0 commit comments