-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
3 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 } | ||
} |