Skip to content

Commit fc997c8

Browse files
committed
keeta-bridge: fixes #17941
1 parent 39322f2 commit fc997c8

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

projects/keeta-bridge/index.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
const { getLogs2 } = require('../helper/cache/getLogs')
2+
3+
const config = {
4+
base : { bridge: '0x1c24a0fb7bcf2154a9d37b7b3aa443bc63fcc698', fromBlock: 35899017},
5+
}
6+
7+
Object.keys(config).forEach(chain => {
8+
const { bridge: factory, fromBlock } = config[chain]
9+
module.exports[chain] = {
10+
tvl: async (api) => {
11+
const logs = await getLogs2({ api, factory, eventAbi: "event TokenAdded(address indexed token)", fromBlock, })
12+
const tokens = logs.map(i => i.token)
13+
return api.sumTokens({ tokens, owner: factory })
14+
}
15+
}
16+
})

0 commit comments

Comments
 (0)