Skip to content

Commit f4a13e7

Browse files
authored
Taparoo Dex TVL adapter (DefiLlama#14294)
1 parent 8e5dee8 commit f4a13e7

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

projects/taparoo/index.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const { get } = require('../helper/http')
2+
3+
module.exports = {
4+
misrepresentedTokens: true,
5+
icp: { tvl },
6+
}
7+
8+
async function tvl(api) {
9+
let response = await get('https://ic0.app/api/v2/canister/5ez4n-ayaaa-aaaah-qdqua-cai/query/getTvl')
10+
const satoshiAmount = parseInt(response.replace(/"/g, ''))
11+
const btcAmount = satoshiAmount / 100000000
12+
api.add('bitcoin', btcAmount)
13+
}

0 commit comments

Comments
 (0)