Skip to content

Commit

Permalink
Add equation v3 and refactor code (#10187)
Browse files Browse the repository at this point in the history
* add equation v3

* code refactor

---------

Co-authored-by: waldo <[email protected]>
  • Loading branch information
g1nt0ki and waldoclayton authored May 13, 2024
1 parent 77b96cd commit 0c1faa9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions projects/equation-v3/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const config = {
arbitrum: { marketManager: "0xDe2b77bcbAEf4C5ECE3b827B21fbD8556e8Fa5a4", }
}

Object.keys(config).forEach(chain => {
const { marketManager, } = config[chain]
module.exports[chain] = {
tvl: async (api) => {
const token = await api.call({ abi: 'address:USD', target: marketManager })
return api.sumTokens({ owner: marketManager, tokens: [token] })
}
}
})

0 comments on commit 0c1faa9

Please sign in to comment.