Skip to content

Commit

Permalink
changing into own tokes as the dex prices are available
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-magpie committed Jan 12, 2025
1 parent d7f6903 commit 99cc32c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
6 changes: 3 additions & 3 deletions projects/babypie/config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
module.exports = {
ethereum: {
mbtc: "0xbDf245957992bfBC62B07e344128a1EEc7b7eE3f",
wbtc: "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599"


},
bsc: {
mbtc: "0x7c1cCA5b25Fa0bC9AF9275Fb53cBA89DC172b878",
wbtc: "0x7130d2A12B9BCbFAe4f2634d864A1Ee1Ce3Ead9c"


},
arbitrum: {
mbtc: "0x2172fAD929E857dDfD7dDC31E24904438434cB0B",
wbtc: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f"


},

Expand Down
12 changes: 4 additions & 8 deletions projects/babypie/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,13 @@ const sdk = require('@defillama/sdk')


async function tvl(api) {
const { mbtc,wbtc } = config[api.chain];
const { mbtc } = config[api.chain];

// getting total supply of pegged tokesn

tokenSupply = await api.call({ abi: 'uint256:totalSupply', target: mbtc });
//when chain is bsc the decimals of pegged token is 18, but btcb is 8
if (api.chain === "bsc") {
tokenSupply = tokenSupply * Math.pow(10, 10);
}


api.add(wbtc, tokenSupply);

api.add(mbtc, tokenSupply);
}

module.exports = {
Expand Down

0 comments on commit 99cc32c

Please sign in to comment.