Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GLUE blockchain #13678

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions projects/glue/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const { sumTokens2 } = require('../helper/unwrapLPs')


const config = {
base: [
'0x7ea76bcabb63d40549e02e63da31e2378d0496d8',
],
}

Object.keys(config).forEach(chain => {
const pools = config[chain]
module.exports[chain] = {
tvl: async (api) => {
const tokens0 = await api.multiCall({ abi: 'address:token0', calls: pools })
const tokens1 = await api.multiCall({ abi: 'address:token1', calls: pools })

const ownerTokens = pools.map((pool, i) => [[tokens0[i], tokens1[i]], pool])

return sumTokens2({ api, ownerTokens, resolveLP: true })
}
}
})
1 change: 1 addition & 0 deletions projects/helper/chains.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@
"fusion",
"genesys",
"genshiro",
"glue",
"gochain",
"godwoken",
"godwoken_v1",
Expand Down
Loading