Skip to content

Commit

Permalink
Add Compound v3 market for Base (DefiLlama#7137)
Browse files Browse the repository at this point in the history
* Add market for Base

* lint fix

---------

Co-authored-by: g1nt0ki <[email protected]>
  • Loading branch information
kevincheng96 and g1nt0ki authored Aug 14, 2023
1 parent d1e5769 commit 2162f1e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module.exports = {
"rules": {
"no-case-declarations": "off",
"no-unused-vars": "off",
"no-useless-escape": "warn",
"no-prototype-builtins": "off",
}
}
7 changes: 5 additions & 2 deletions projects/compound-v3/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ module.exports = compoundV3Exports({
markets: ['0xA5EDBDD9646f8dFF606d7448e414884C7d905dCA'],
},
polygon: {
markets:["0xF25212E676D1F7F89Cd72fFEe66158f541246445"],
markets: ["0xF25212E676D1F7F89Cd72fFEe66158f541246445"],
},
base: {
markets: ["0x9c4ec768c28520B50860ea7a15bd7213a9fF58bf"],
}
})
})
2 changes: 1 addition & 1 deletion projects/lemuriafinance.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { sumUnknownTokens } = require('./helper/unknownTokens')

async function tvl(_, _b, _cb, { api, }) {
let data = await getConfig('lemuria', 'https://raw.githubusercontent.com/lemuriafinance/lemuria-frontend-pub/main/src/features/configure/vault/milkomeda_pools.js')
data = JSON.parse(data.slice(data.indexOf('[')).replaceAll('\'', '"').replaceAll(/\n\s+(\w+)/g, '"$1"').split('\n').map(i => i.replaceAll(/\s+\/\/.*/g, '').trim()).join('').replaceAll(';', '').replaceAll(/\,(\]|\})/g, '$1'))
data = JSON.parse(data.slice(data.indexOf('[')).replaceAll('\'', '"').replaceAll(/\n\s+(\w+)/g, '"$1"').split('\n').map(i => i.replaceAll(/\s+\/\/.*/g, '').trim()).join('').replaceAll(';', '').replaceAll(/,(\]|\})/g, '$1'))
const pools = data.map(i => i.earnContractAddress)
const tokens = await api.multiCall({ abi: 'address:want', calls: pools})
const bals = await api.multiCall({ abi: 'uint256:balance', calls: pools})
Expand Down

0 comments on commit 2162f1e

Please sign in to comment.