-
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.
* Add elocks adapter * fix lint issues * fix lint errors * code refactor --------- Co-authored-by: g1nt0ki <[email protected]>
- Loading branch information
Showing
2 changed files
with
24 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const { sumTokens2 } = require("../helper/unwrapLPs") | ||
|
||
const IELOCKS = { | ||
lockedAssets: "function lockedAssets(uint) public view returns (address token, uint balance, uint)" | ||
} | ||
|
||
const elocks = { | ||
fantom: "0x2f20A659601d1c161A108E0725FEF31256a907ad" | ||
} | ||
|
||
module.exports = { | ||
misrepresentedTokens: true, | ||
} | ||
|
||
Object.keys(elocks).forEach(chain => { | ||
module.exports[chain] = { | ||
tvl: async (api) => { | ||
const data = await api.fetchList({ lengthAbi: 'totalSupply', itemAbi: IELOCKS.lockedAssets, target: elocks[api.chain], startFromOne: true, }) | ||
data.forEach(i => api.addToken(i.token, i.balance)) | ||
return sumTokens2({ api, resolveLP: true}) | ||
}, | ||
} | ||
}) |
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