From 99ee2838378eebd668323a57b3d613b2ec4e5817 Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Fri, 9 Aug 2024 11:04:41 +0100 Subject: [PATCH] add pancake-stryke (#11247) * add git checkout -b pancake-stryke * code refactor --------- Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/pancake-stryke/index.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 projects/pancake-stryke/index.js diff --git a/projects/pancake-stryke/index.js b/projects/pancake-stryke/index.js new file mode 100644 index 000000000000..c73068a60ff7 --- /dev/null +++ b/projects/pancake-stryke/index.js @@ -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)]}) + } + } +}) \ No newline at end of file