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 { sumTokens2 } = require ( "../helper/chain/cardano" )
2
+ const { get } = require ( "../helper/http" )
3
+ const EncoinsLedgerAddress = 'addr1q8u2rh5uud6yzmhq0de7vt7p0rvqpfadwnee3tjnz2tl4rct6qt03wjc2lfwyqnd54gwfdey50s7342e3jl6kxwww4kqzfah2x'
4
+ const EncoinsWalletAddress = 'addr1zxf7ugf90tp2zfhr47e88jl4jc6nvhtl24r4r2und09dmuqt6qt03wjc2lfwyqnd54gwfdey50s7342e3jl6kxwww4kquasqvy'
5
+ const Encoins_Token = 'cardano:9abf0afd2f236a19f2842d502d0450cbcd9c79f123a9708f96fd9b96454e4353'
6
+
7
+ async function tvl ( ) {
8
+ const lockedAssets = await sumTokens2 ( {
9
+ owners : [ EncoinsLedgerAddress , EncoinsWalletAddress ]
10
+ } )
11
+ return lockedAssets
12
+ }
13
+
14
+ async function stake ( ) {
15
+ const RegisteredRelayNodes = await get ( 'https://l2y0u35vje.execute-api.eu-central-1.amazonaws.com/servers' ) ;
16
+ const relayNodeBalances = Object . values ( RegisteredRelayNodes ) . reduce ( ( acc , value ) => acc + value , 0 ) ;
17
+ return {
18
+ [ Encoins_Token ] : relayNodeBalances
19
+ }
20
+ }
21
+
22
+ module . exports = {
23
+ timetravel : false ,
24
+ cardano : {
25
+ tvl,
26
+ staking : stake
27
+ }
28
+ }
You can’t perform that action at this time.
0 commit comments