Skip to content

Commit

Permalink
track g8keep.xyz
Browse files Browse the repository at this point in the history
  • Loading branch information
g1nt0ki committed Nov 5, 2024
1 parent 5c01f4f commit a216132
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions projects/g8keep/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const { getLogs2 } = require('../helper/cache/getLogs')
const { sumUnknownTokens } = require('../helper/unknownTokens')

const config = {
base: { factory: '0x3C0B43867Cd04fEdfD6a95497e5ea7e3aFF8cCaE', fromBlock: 21977940 },
}

Object.keys(config).forEach(chain => {
const { factory, fromBlock } = config[chain]
module.exports[chain] = {
tvl: async (api) => {
const logs = await getLogs2({ api, factory, eventAbi: 'event TokenDeployed (address indexed token, address indexed pair, address indexed deployer, string symbol)', fromBlock, })
const tokens = logs.map(log => log.pair)
return sumUnknownTokens({api, owner: factory, tokens, useDefaultCoreAssets: true, lps: tokens})
}
}
})

module.exports.doublecounted = true
module.exports.misrepresentedTokens = true

0 comments on commit a216132

Please sign in to comment.