Skip to content

Commit

Permalink
mTBILL price/TVL update (#11569)
Browse files Browse the repository at this point in the history
Co-authored-by: g1nt0ki <[email protected]>
  • Loading branch information
ahorner2 and g1nt0ki authored Sep 9, 2024
1 parent a8853ea commit 841a331
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions projects/midas/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
async function tvl(api) {
const MTBILL_TOKEN_CONTRACT = "0xDD629E5241CbC5919847783e6C96B2De4754e438";
const mtbillSupply = await await api.call({ abi: "erc20:totalSupply", target: MTBILL_TOKEN_CONTRACT, });
const mtbillSupply = await await api.call({ abi: "erc20:totalSupply", target: MTBILL_TOKEN_CONTRACT, })

const rate = await api.call({
target: "0x32d1463EB53b73C095625719Afa544D5426354cB", // IB01/USD
abi: "function latestRoundData() external view returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound)",
});
api.addCGToken('tether', (mtbillSupply / 1e18) * (rate.answer / 1e8))
api.addCGToken("tether", (mtbillSupply / 1e18) * ((rate.answer / 1e8) / 100))
}

const chains = ["ethereum"];
Expand Down

0 comments on commit 841a331

Please sign in to comment.