Skip to content

Commit

Permalink
add pancake-stryke (DefiLlama#11247)
Browse files Browse the repository at this point in the history
* add git checkout -b pancake-stryke

* code refactor

---------

Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com>
  • Loading branch information
Define101 and g1nt0ki authored Aug 9, 2024
1 parent 79f20e0 commit 9796f1e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions projects/pancake-stryke/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const config = {
arbitrum: {
pools: [
"0x501B03BdB431154b8Df17BF1c00756E3a8F21744", // WETHUSDC
"0x550e7E236912DaA302F7d5D0d6e5D7b6EF191f04", // WBTCUSDC
"0x4eed3A2b797Bf5630517EcCe2e31C1438A76bb92", // ARBUSDC
],
},
}

Object.keys(config).forEach(chain => {
const { pools } = config[chain]
module.exports[chain] = {
tvl: async (api) => {
const callAssets = await api.multiCall({ abi: 'address:callAsset', calls: pools })
const putAssets = await api.multiCall({ abi: 'address:putAsset', calls: pools })

return api.sumTokens({ tokensAndOwners2: [callAssets.concat(putAssets), pools.concat(pools)]})
}
}
})

0 comments on commit 9796f1e

Please sign in to comment.