Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
g1nt0ki committed Jan 30, 2025
1 parent bc858f1 commit 33c8e04
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
4 changes: 3 additions & 1 deletion projects/helper/tokenMapping.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ const ibcMappings = {
}

const fixBalancesTokens = {

hedera: {
'0x00000000000000000000000000000000000c01f3': { coingeckoId: "hsuite", decimals: 4 },
},
// Sample Code
ozone: {
// '0x83048f0bf34feed8ced419455a4320a735a92e9d': { coingeckoId: "ozonechain", decimals: 18 }, // was mapped to wrong chain
Expand Down
30 changes: 30 additions & 0 deletions projects/sirio-fi/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
const { sumTokens2, nullAddress } = require("../helper/unwrapLPs")

const markets = [
'0x0e2c1659B6A120CFE582717b51444389878676Ac', // HBAR_MARKET
'0xA810340Ca70e24aF6d6C3e59A3d2b88E6d5f1F27', // USDC_MARKET
'0x086eDAe2722FE6F355793adF8F19fAeE93aca7d6', // SAUCE_MARKET
'0x7D0f4cD67301afAdbbBF3512F31aF9247a37e7a7', // XSAUCE_MARKET
'0xdd9FA7C0080062df71d729fBA6EEf074C5F03A45', // HBARX_MARKET
'0xb9a76104658AbBB998C8b146dF9c523b3b3D271b', // HSUITE_MARKET
'0x23E49b26D82674eea26E49f447D8a00dae7Ff01B', // PACK_MARKET
]

async function tvl(api) {
const tokens = await api.multiCall({ abi: 'address:underlyingToken', calls: markets })
tokens[0] = nullAddress // replace wrapped token with gas token
return sumTokens2({ api, tokensAndOwners2: [tokens, markets] })
}

async function borrowed(api) {
const tokens = await api.multiCall({ abi: 'address:underlyingToken', calls: markets })
const bals = await api.multiCall({ abi: 'uint256:totalBorrows', calls: markets })
api.add(tokens, bals)
return sumTokens2({ api, })
}

module.exports = {
methodology: "TVL on Sirio Finance",
timetravel: false,
hedera: { tvl, borrowed, }
}

0 comments on commit 33c8e04

Please sign in to comment.