Skip to content

Commit

Permalink
add fee vault in btcfi-cdp (#13009)
Browse files Browse the repository at this point in the history
  • Loading branch information
tlatkdgus1 authored Jan 8, 2025
1 parent 59e557d commit dbcc218
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions projects/helper/bitcoin-book/fetchers.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ module.exports = {
btcfi_cdp: async () => {
const target = "0x0000000000000000000000000000000000000100";
const api = new sdk.ChainApi({ chain: 'bfc' })
const round = await api.call({ abi: 'uint32:current_round', target })
return api.call({ abi: 'function vault_addresses(uint32 pool_round) view returns (string[])', target, params: round })
const round = await api.call({ abi: 'uint32:current_round', target})

const utxoVault = await api.call({ abi: 'function registration_info(address target, uint32 pool_round) view returns (address, string, string, address[], bytes[])', target, params: [target, round] })
const vault = await api.call({ abi: 'function vault_addresses(uint32 pool_round) view returns (string[])', target, params: round });
vault.push(utxoVault[2])

return vault
},
bedrock: async () => {
const API_URL = 'https://raw.githubusercontent.com/Bedrock-Technology/uniBTC/refs/heads/main/data/tvl/reserve_address.json'
Expand Down

0 comments on commit dbcc218

Please sign in to comment.