-
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
8 additions
and
9 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,15 +1,14 @@ | ||
const { sumTokens2 } = require('../helper/unwrapLPs') | ||
|
||
const contract = '0x5753fBeC29De6E2b56F73f7d7786e9f0d34897bb' | ||
|
||
async function tvl(api) { | ||
return sumTokens2({ api, owner: contract, fetchCoValentTokens: true }) | ||
} | ||
const { sumTokens2 } = require("../helper/unwrapLPs") | ||
|
||
module.exports = { | ||
sophon: { | ||
tvl, | ||
start: 810461, | ||
}, | ||
methodology: 'Counts all ERC20 token balances in the Sophon Farm contract' | ||
} | ||
|
||
async function tvl(api) { | ||
const farm = '0x5753fBeC29De6E2b56F73f7d7786e9f0d34897bb' | ||
const pools = await api.call({ abi: "function getPoolInfo() view returns ((address lpToken, address l2Farm, uint256 amount, uint256 boostAmount, uint256 depositAmount, uint256 allocPoint, uint256 lastRewardBlock, uint256 accPointsPerShare, uint256 totalRewards, string description)[] poolInfos)", target: farm}) | ||
const tokens = pools.map(i => i.lpToken) | ||
return sumTokens2({ owner: farm, tokens, api, }) | ||
} |