File tree Expand file tree Collapse file tree 1 file changed +14
-16
lines changed Expand file tree Collapse file tree 1 file changed +14
-16
lines changed Original file line number Diff line number Diff line change 1
- const { addressesUtxosAssetAll, getScriptsDatum} = require ( '../helper/chain/cardano/blockfrost' )
1
+ const { addressesUtxosAssetAll, getScriptsDatum } = require ( '../helper/chain/cardano/blockfrost' )
2
2
3
3
const usdm_count_nft_asset = "e319d8e6629ff7991c8ae4f8aec2e0f10463ebdf29b57d26d34914f65553444d5f434f554e54"
4
4
const count_address = "addr1wyl82v9qy06hsz50hqqdy0u6xw9hdewy7twjahgek2tpp7c0qajez"
5
5
6
- async function tvl ( ) {
7
- const utxo = ( await addressesUtxosAssetAll ( count_address , usdm_count_nft_asset ) ) [ 0 ]
8
- const datum_hash = utxo . data_hash
9
- const datum = await getScriptsDatum ( datum_hash )
10
- const total_value_locked = datum . json_value . fields [ 0 ] . int / 1_000_000
11
- return {
12
- usd : total_value_locked
13
- }
14
-
6
+ async function tvl ( api ) {
7
+ const utxo = ( await addressesUtxosAssetAll ( count_address , usdm_count_nft_asset ) ) [ 0 ]
8
+ const datum_hash = utxo . data_hash
9
+ const datum = await getScriptsDatum ( datum_hash )
10
+ const total_value_locked = datum . json_value . fields [ 0 ] . int / 1_000_000
11
+ api . addUSDValue ( total_value_locked )
15
12
}
16
13
17
- module . exports = {
18
- timetravel : false ,
19
- methodology : "Gets the total circulating supply of USDM from the datum of the USDM counter UTxO." ,
20
- cardano :{
21
- tvl
22
- }
14
+ module . exports = {
15
+ timetravel : false ,
16
+ misrepresentedTokens : true ,
17
+ methodology : "Gets the total circulating supply of USDM from the datum of the USDM counter UTxO." ,
18
+ cardano : {
19
+ tvl
20
+ }
23
21
}
You can’t perform that action at this time.
0 commit comments