From ece620d01be901e0a4a9e0c7924cf08ae1432a55 Mon Sep 17 00:00:00 2001 From: g1ntoki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 24 Sep 2024 11:22:32 +0200 Subject: [PATCH] refactor imBTC --- projects/imbtc.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/projects/imbtc.js b/projects/imbtc.js index 7d80f59ec1..65dbf6ae6d 100644 --- a/projects/imbtc.js +++ b/projects/imbtc.js @@ -1,11 +1,14 @@ - -async function tvl(api) { - const imBTC = '0x3212b29E33587A00FB1C83346f5dBFA69A458923' - const supply = await api.call({ abi: 'erc20:totalSupply', target: imBTC }) - api.add(imBTC, supply) -} +const { sumTokens } = require('./helper/chain/bitcoin') module.exports = { - ethereum: { tvl }, - methodology: `TVL for imBTC consists of the BTC deposits in custody that were used to mint imBTC` + ethereum: { tvl: () => ({}) }, + bitcoin: { + tvl: () => sumTokens({ + owners: ['3JMjHDTJjKPnrvS7DycPAgYcA6HrHRk8UG', '3GH4EhMi1MG8rxSiAWqfoiUCMLaWPTCxuy'], + }) + }, + methodology: `TVL for imBTC consists of the BTC deposits in custody that were used to mint imBTC`, + hallmarks: [ + [Math.floor(new Date('2024-01-31') / 1e3), 'Project ceases operation'], + ], }