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

Feat: Add UniBTC #11236

Merged
merged 6 commits into from
Aug 8, 2024
Merged
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
4 changes: 3 additions & 1 deletion projects/helper/coreAssets.json
Original file line number Diff line number Diff line change
Expand Up @@ -1810,7 +1810,9 @@
"TBTC": "0xbba2ef945d523c4e2608c9e1214c2cc64d4fc2e2"
},
"btr": {
"ETH": "0xef63d4e178b3180beec9b0e143e0f37f4c93f4c2"
"ETH": "0xef63d4e178b3180beec9b0e143e0f37f4c93f4c2",
"WBTC": "0xff204e2681a6fa0e2c3fade68a1b28fb90e4fc5f"

},
"taiko": {
"USDC": "0x07d83526730c7438048D55A4fc0b850e2aaB6f0b",
Expand Down
41 changes: 41 additions & 0 deletions projects/unibtc/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
const ADDRESSES = require('../helper/coreAssets.json')
const defaultVault = '0xF9775085d726E782E83585033B58606f7731AB18'

const config = {
ethereum: {
vault: '0x047D41F2544B7F63A8e991aF2068a363d210d6Da',
tokens: [ADDRESSES['ethereum'].WBTC, '0xc96de26018a54d51c097160568752c4e3bd6c364']
},
optimism: {
vault: defaultVault,
tokens: [ADDRESSES['optimism'].WBTC]
},
mantle: {
vault: defaultVault,
tokens: ['0xC96dE26018A54D51c097160568752c4E3BD6C364']
},
bsquared: {
vault: defaultVault,
tokens: [ADDRESSES.null,ADDRESSES['bsquared'].WBTC]
},
merlin: {
vault: defaultVault,
tokens: [ADDRESSES.null,ADDRESSES['merlin'].WBTC_1]
},
btr: {
vault: defaultVault,
tokens: [ADDRESSES.null, ADDRESSES['btr'].WBTC]
},
}

const tvl = (chainConfig) => {
return async (api) => {
return api.sumTokens({ tokens: chainConfig.tokens, owner: chainConfig.vault })
}
}

Object.keys(config).forEach(chain => {
module.exports[chain] = {
tvl: tvl(config[chain])
}
})
Loading