Skip to content

Commit 533d087

Browse files
committed
Add VIRTUS Protocol TVL adapter (Base)
1 parent 767dc61 commit 533d087

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

projects/virtus-protocol/index.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
const sdk = require('@defillama/sdk')
2+
const { uniV3Export } = require('../helper/uniswapV3')
3+
const { getUniTVL } = require('../helper/unknownTokens')
4+
5+
const v2Abis = {
6+
allPairsLength: 'uint256:allPoolsLength',
7+
allPairs: 'function allPools(uint256) view returns (address)',
8+
}
9+
10+
const clTvl = uniV3Export({
11+
base: {
12+
factory: '0x0e5Ab24beBdA7e5Bb3961f7E9b3532a83aE86B48',
13+
fromBlock: 42960000,
14+
eventAbi: 'event PoolCreated(address indexed token0, address indexed token1, int24 indexed tickSpacing, address pool)',
15+
topics: ['0xab0d57f0df537bb25e80245ef7748fa62353808c54d6e528a9dd20887aed9ac2'],
16+
},
17+
})
18+
19+
module.exports = {
20+
misrepresentedTokens: true,
21+
base: {
22+
tvl: sdk.util.sumChainTvls([
23+
clTvl.base.tvl,
24+
getUniTVL({ factory: '0x7F03ae4452192b0E280fB0d4f9c225DDa88C7623', useDefaultCoreAssets: true, hasStablePools: true, abis: v2Abis }),
25+
]),
26+
},
27+
}

0 commit comments

Comments
 (0)