mirror of
https://github.com/alexgo-io/DefiLlama-Adapters.git
synced 2026-01-12 16:53:02 +08:00
13 lines
552 B
JavaScript
13 lines
552 B
JavaScript
const { getConfig } = require('../helper/cache')
|
|
const { nullAddress } = require('../helper/tokenMapping')
|
|
|
|
async function tvl(api) {
|
|
const { tokens } = await getConfig('morph/bridge', 'https://raw.githubusercontent.com/morph-l2/morph-list/main/src/mainnet/tokenList.json')
|
|
const tokensAndOwners = tokens.filter(i => i.chainId === '1').map(i => [i.address, i.gatewayAddress])
|
|
tokensAndOwners.push([nullAddress, '0xDc71366EFFA760804DCFC3EDF87fa2A6f1623304'])
|
|
return api.sumTokens({ tokensAndOwners })
|
|
}
|
|
|
|
module.exports = {
|
|
ethereum: { tvl },
|
|
} |