diff --git a/projects/stakestone-btc/index.js b/projects/stakestone-btc/index.js new file mode 100644 index 00000000000..17cb64fafd8 --- /dev/null +++ b/projects/stakestone-btc/index.js @@ -0,0 +1,21 @@ +const ADDRESSES = require('../helper/coreAssets.json') + +const vaultABI = { + "getDepositAmounts": "function getDepositAmounts() view returns (address[], uint256[])" +} + +const VaultBSC = '0xc6f830BB162e6CFb7b4Bac242B0E43cF1984c853'; + +const bscTvl = async (api) => { + const btclist = await api.call({ abi: vaultABI.getDepositAmounts, target: VaultBSC }) + api.add(ADDRESSES.bsc.BTCB, btclist[1][0] / 10**18) + return api.sumTokens({ owner: VaultBSC, tokens: [ADDRESSES.bsc.BTCB] }) +} + + +module.exports = { + start: 42326440, + bsc: { + tvl: bscTvl, + } +}