From ceda95dd8550a9670bf3d387492fecc3bce38558 Mon Sep 17 00:00:00 2001 From: waynebruce0x Date: Tue, 13 Aug 2024 17:33:02 +0100 Subject: [PATCH] spiko --- projects/spiko/index.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 projects/spiko/index.js diff --git a/projects/spiko/index.js b/projects/spiko/index.js new file mode 100644 index 000000000000..969fbee11a08 --- /dev/null +++ b/projects/spiko/index.js @@ -0,0 +1,21 @@ +const assets = { + polygon: [ + '0xe4880249745eAc5F1eD9d8F7DF844792D560e750', + '0xa0769f7A8fC65e47dE93797b4e21C073c117Fc80' + ], + ethereum: [ + '0xe4880249745eAc5F1eD9d8F7DF844792D560e750', + '0xa0769f7A8fC65e47dE93797b4e21C073c117Fc80' + ] +} + +module.exports = {} + +Object.keys(assets).forEach(chain => { + module.exports[chain] = { + tvl: (api) => api.multiCall({ + abi: 'erc20:totalSupply', + calls: assets[api.chain].map(target => ({ target })) + }).then(supplies => api.add(assets[api.chain], supplies)) + } +}) \ No newline at end of file