Skip to content

Commit 4be9e7f

Browse files
committed
minor fix
1 parent 9f6e655 commit 4be9e7f

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

projects/moneta/index.js

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
1-
const { addressesUtxosAssetAll, getScriptsDatum} = require('../helper/chain/cardano/blockfrost')
1+
const { addressesUtxosAssetAll, getScriptsDatum } = require('../helper/chain/cardano/blockfrost')
22

33
const usdm_count_nft_asset = "e319d8e6629ff7991c8ae4f8aec2e0f10463ebdf29b57d26d34914f65553444d5f434f554e54"
44
const count_address = "addr1wyl82v9qy06hsz50hqqdy0u6xw9hdewy7twjahgek2tpp7c0qajez"
55

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)
1512
}
1613

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+
}
2321
}

0 commit comments

Comments
 (0)