Skip to content

Commit

Permalink
update filliquid (#11116)
Browse files Browse the repository at this point in the history
  • Loading branch information
g1nt0ki committed Aug 14, 2024
1 parent 3d1c1dd commit ebb3187
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions projects/filliquid/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
async function tvl(api) {
// https://github.com/FILL-Lab/FILLiquid/blob/main/contracts/FILLiquid.sol
const res = await api.call({ abi: abi.getStatus, target: '0xFD669BDDfbb0d085135cBd92521785C39c95bA4b'})
api.addGasToken(res.totalFIL)
}
const abi = {
getStatus: "function getStatus() view returns ((uint256 totalFIL, uint256 availableFIL, uint256 utilizedLiquidity, uint256 accumulatedDeposit, uint256 accumulatedRedeem, uint256 accumulatedBurntFILTrust, uint256 accumulatedMintFILTrust, uint256 accumulatedBorrow, uint256 accumulatedPayback, uint256 accumulatedInterest, uint256 accumulatedRedeemFee, uint256 accumulatedBorrowFee, uint256 accumulatedBadDebt, uint256 accumulatedLiquidateReward, uint256 accumulatedLiquidateFee, uint256 accumulatedDeposits, uint256 accumulatedBorrows, uint256 utilizationRate, uint256 exchangeRate, uint256 interestRate, uint256 collateralizedMiner, uint256 minerWithBorrows, uint256 rateBase))"
const res = await api.call({ abi: 'uint256:getTVL', target: '0xA25F892cF2731ba89b88750423Fc618De0959C43'})
api.addGasToken(res)
}

module.exports = {
methodology: 'Get the total amount of pledge and account balance of fil in the statistical contract',
filecoin: { tvl }
}

0 comments on commit ebb3187

Please sign in to comment.