From 920bea9e77092dee8d2f3d426deed97e34a87793 Mon Sep 17 00:00:00 2001 From: Topleft <87454455+topleft1562@users.noreply.github.com> Date: Thu, 14 Mar 2024 12:36:49 -0500 Subject: [PATCH] Add multiDex per chain --- projects/marswap/index.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/projects/marswap/index.js b/projects/marswap/index.js index 4e5179495660..c798121331e0 100644 --- a/projects/marswap/index.js +++ b/projects/marswap/index.js @@ -1,11 +1,12 @@ const { getUniTVL } = require('../helper/unknownTokens') +const sdk = require('@defillama/sdk') const config = { - bsc: '0xe19165248159B6cB2A2e35bF398581C777C9979A', - ethereum: '0x5e763172d59b3b580af29a1c9fa4ac1cee69c5dd', - shibarium: "0xBe0223f65813C7c82E195B48F8AAaAcb304FbAe7", - base: "0xeE42fe6d6Be1eF43701DDAbc417AD22d82C5ecC3", - cronos: "0xD716B78F0002C23190B024fc93C33CF73E30b8A6", + bsc: ['0xe19165248159B6cB2A2e35bF398581C777C9979A'], + ethereum: ['0x5e763172d59b3b580af29a1c9fa4ac1cee69c5dd'], + shibarium: ["0xBe0223f65813C7c82E195B48F8AAaAcb304FbAe7","0xd871a3f5d3bB9c00DDB0cC772690351B9712968D"], + base: ["0xeE42fe6d6Be1eF43701DDAbc417AD22d82C5ecC3"], + cronos: ["0xD716B78F0002C23190B024fc93C33CF73E30b8A6"], } module.exports = { @@ -13,5 +14,5 @@ module.exports = { }; Object.keys(config).forEach(chain => { - module.exports[chain] = { tvl: getUniTVL({ factory: config[chain], useDefaultCoreAssets: true, }) } + module.exports[chain] = { tvl: sdk.util.sumChainTvls(config[chain].map((factory) => getUniTVL({ factory, useDefaultCoreAssets: true, hasStablePools: true, }))) } }) \ No newline at end of file