Skip to content

Commit

Permalink
Merge pull request #11282 from waynebruce0x/main
Browse files Browse the repository at this point in the history
Spiko
  • Loading branch information
waynebruce0x authored Aug 13, 2024
2 parents 4088c1b + d020c87 commit 0d9a3df
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions projects/spiko/index.js
Original file line number Diff line number Diff line change
@@ -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))
}
})

0 comments on commit 0d9a3df

Please sign in to comment.