Skip to content

Commit e93f732

Browse files
authored
Merge branch 'DefiLlama:main' into main
2 parents 3c520a3 + 4043b40 commit e93f732

File tree

477 files changed

+2701
-2948
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

477 files changed

+2701
-2948
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

projects/0xzebra/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const ADDRESSES = require('../helper/coreAssets.json')
2+
const { sumTokensExport } = require('../helper/sumTokens')
3+
4+
module.exports = {
5+
zeta: {
6+
tvl: sumTokensExport({ owner: '0x3aC3d90dc8cB1Cacf1Fd8bc07e4B76c5EA443279', tokens: [ADDRESSES.zeta.WZETA] }),
7+
}
8+
}

projects/1bch/index.js

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,9 @@ const FACTORY = "0x3dC4e6aC26df957a908cfE1C0E6019545D08319b";
99
const MASTERBREEDER = "0xeC0A7496e66a206181034F86B261DDDC1A2c406E";
1010
const rBCH_WBCH_LP = "0xb9659B524447F53FF1019952A6eeDBb99776Ab4A";
1111
const COREASSETNAME = "bitcoin-cash";
12-
const CHAIN = "smartbch";
1312

14-
async function bchMasterChef(timestamp, ethBlock, {[CHAIN]: block}) {
15-
16-
const stakedBCH = (await sdk.api.erc20.balanceOf({
17-
target: WBCH,
18-
owner: MASTERBREEDER,
19-
chain: CHAIN,
20-
block: block,
21-
decimals: 18
22-
})).output;
23-
24-
return {
25-
[COREASSETNAME]: Number(stakedBCH)
26-
}
13+
async function bchMasterChef(api) {
14+
return api.sumTokens({ owner: MASTERBREEDER, tokens: [WBCH]})
2715
}
2816

2917
const bchDexTvl = getUniTVL({ factory: FACTORY, useDefaultCoreAssets: true, })

projects/2pi/index.js

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
const sdk = require('@defillama/sdk')
21
const { getUniqueAddresses } = require('../helper/utils')
32
const { getConfig } = require('../helper/cache')
43
const archimedesAbi = require('./archimedes.json')
@@ -17,21 +16,14 @@ const fetchChainAddresses = async chain => {
1716
}
1817

1918
const fetchTvl = chain => {
20-
return async (_timestamp, _block, chainBlocks) => {
21-
const block = chainBlocks[chain]
19+
return async (api) => {
2220
const addresses = await fetchChainAddresses(chains[chain])
23-
let pools = await Promise.all(addresses.map(i => sdk.api2.abi.fetchList({ withMetadata: true, chain, block, target: i, lengthAbi: archimedesAbi['poolLength'], itemAbi: archimedesAbi['poolInfo'] })))
21+
let pools = await Promise.all(addresses.map(i => api.fetchList({ withMetadata: true, target: i, lengthAbi: archimedesAbi['poolLength'], itemAbi: archimedesAbi['poolInfo'] })))
2422
pools = pools.flat()
2523
const wantTokens = pools.map(i => i.output.want)
2624
const calls = pools.map(i => i.input)
27-
const { output: bal } = await sdk.api.abi.multiCall({
28-
abi: archimedesAbi.balance,
29-
calls,
30-
chain, block,
31-
})
32-
const balances = {}
33-
bal.forEach(({ output}, i) => sdk.util.sumSingleBalance(balances,wantTokens[i],output, chain))
34-
return balances
25+
const bal = await api.multiCall({ abi: archimedesAbi.balance, calls, })
26+
api.add(wantTokens, bal)
3527
}
3628
}
3729

projects/Caketomb/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = {
1414
deadFrom: 1648765747,
1515
bsc: {
1616
tvl: async () => ({}),
17-
staking: staking(boardroom, shares, "bsc"),
17+
staking: staking(boardroom, shares),
1818
pool2: pool2Exports(shareRewardPool, pancakeLPs, "bsc", addr=>`bsc:${addr}`)
1919
}
2020
}

projects/Equalizer/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ module.exports = {
55
misrepresentedTokens: true,
66
fantom:{
77
tvl: uniTvlExport("0xc6366EFD0AF1d09171fe0EBF32c7943BB310832a", "fantom", undefined, undefined, { hasStablePools: true, useDefaultCoreAssets: true, }),
8-
staking: staking("0x8313f3551C4D3984FfbaDFb42f780D0c8763Ce94", "0x3Fd3A0c85B70754eFc07aC9Ac0cbBDCe664865A6","fantom"),
8+
staking: staking("0x8313f3551C4D3984FfbaDFb42f780D0c8763Ce94", "0x3Fd3A0c85B70754eFc07aC9Ac0cbBDCe664865A6"),
99
},
1010
}

projects/FirepotSwap/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const { getUniTVL } = require('../helper/unknownTokens')
22

33
const FACTORY = "0xe63Cf585Dae8273A5e37AfF6da2f823FBf3Eb5BE" // This factory is on AirDAO Mainnet (Chain Id: 16718)
44

5-
const dexTVL = getUniTVL({ factory: FACTORY, useDefaultCoreAssets: true, fetchBalances: true, chain: "airdao" })
5+
const dexTVL = getUniTVL({ factory: FACTORY, useDefaultCoreAssets: true, fetchBalances: true, })
66

77
module.exports = {
88
misrepresentedTokens: true,

projects/GoSwap/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ module.exports={
44
misrepresentedTokens: true,
55
methodology: "Factory address (0xe93c2cD333902d8dd65bF9420B68fC7B1be94bB3) is used to find the LP pairs. TVL is equal to the liquidity on the AMM.",
66
gochain: {
7-
tvl: getUniTVL({ factory: '0xe93c2cD333902d8dd65bF9420B68fC7B1be94bB3', chain: 'gochain', useDefaultCoreAssets: true }),
7+
tvl: getUniTVL({ factory: '0xe93c2cD333902d8dd65bF9420B68fC7B1be94bB3', useDefaultCoreAssets: true }),
88
}
99
}

projects/LeaperFinance/index.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
const { compoundExports2, } = require('../helper/compound')
2+
const { stakings } = require("../helper/staking")
3+
const { mergeExports } = require("../helper/utils")
4+
const { yieldHelper, } = require("../helper/yieldHelper")
5+
6+
const lend = compoundExports2({ comptroller: '0xB37e4151603bD0A83329CDB3F7AB0Ba608D2b9e4' })
7+
8+
const stake = '0x94C84CdA39fc7099d745Fea787b2e42BAe51B5a5'
9+
const contract = '0x8B0eB5bD61c790E2CC6FB61a08210736ae66B462'
10+
const token = '0x49cD19636855C00Dd0408C0C40e0951a41c4512A'
11+
const abis = {
12+
poolInfo: 'function poolInfo(uint256) view returns (address want, uint256 allocPoint, uint256 lastRewardTime, uint256 accSushiPerShare, uint256 amount, address strat)',
13+
}
14+
15+
const arbi_helper = yieldHelper({
16+
project: 'leaper-finance',
17+
chain: 'blast',
18+
masterchef: contract,
19+
nativeToken: token,
20+
abis,
21+
})
22+
23+
module.exports = mergeExports([
24+
arbi_helper,
25+
{ blast: lend, },
26+
{ blast: { staking: stakings([stake], token) }, }
27+
])

projects/LizardExchange/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const { getUniTVL } = require('../helper/unknownTokens')
22
module.exports = {
33
oasis: {
4-
tvl: getUniTVL({ factory: '0xefA6861931991CCE372c477a015619A21dfEBE8c', chain: 'oasis', useDefaultCoreAssets: true }),
4+
tvl: getUniTVL({ factory: '0xefA6861931991CCE372c477a015619A21dfEBE8c', useDefaultCoreAssets: true }),
55
}
66
};

0 commit comments

Comments
 (0)