-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
125 changed files
with
2,116 additions
and
770 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
const { getLogs2 } = require('../helper/cache/getLogs') | ||
const { sumTokens2 } = require('../helper/unwrapLPs') | ||
|
||
const EVENT_ABI = 'event Initialize(bytes32 id, address indexed currency0, address indexed currency1, uint24 fee, int24 tickSpacing, address hooks)' | ||
|
||
const config = { | ||
zora: { | ||
pool: "0xB43287b2106BC044F07aE674794f5492E851d3dC", | ||
router: "0x0Fee97363deEFBE4De038D437D805A98dbEbA400", | ||
fromBlock: 13704184, | ||
}, | ||
} | ||
|
||
module.exports = { | ||
start: 1714060800, // Apr 26 2024 | ||
} | ||
|
||
Object.keys(config).forEach(chain => { | ||
const { pool, fromBlock, } = config[chain] | ||
module.exports[chain] = { | ||
tvl: async (api) => { | ||
const logs = await getLogs2({ api, factory: pool, eventAbi: EVENT_ABI, fromBlock, }) | ||
const tokens = logs.map(i => [i.currency0, i.currency1]).flat() | ||
return sumTokens2({ api, owner: pool, tokens, }) | ||
} | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const ADDRESSES = require('../helper/coreAssets.json'); | ||
const { sumTokens } = require('../helper/sumTokens'); | ||
|
||
const bridge = "0xAB13B8eecf5AA2460841d75da5d5D861fD5B8A39"; | ||
|
||
async function tvl(api) { | ||
const balances = {}; | ||
await sumTokens({ | ||
api, | ||
balances, | ||
owners: [bridge], | ||
tokens: [ADDRESSES.ethereum.tBTC, ADDRESSES.ethereum.WBTC] | ||
}) | ||
return balances | ||
} | ||
|
||
module.exports = { | ||
ethereum: { tvl } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const ADDRESSES = require('../helper/coreAssets.json') | ||
const STETH_CONTRACT = ADDRESSES.ethereum.STETH; | ||
const PROJECT_CONTRACT = '0x47176B2Af9885dC6C4575d4eFd63895f7Aaa4790'; | ||
|
||
async function tvl(_, __, ___, { api }) { | ||
const stEthBalance = await api.call({ | ||
abi: 'erc20:balanceOf', | ||
target: STETH_CONTRACT, | ||
params: [PROJECT_CONTRACT], | ||
}); | ||
|
||
api.add(STETH_CONTRACT, stEthBalance); | ||
} | ||
|
||
module.exports = { | ||
timetravel: true, | ||
misrepresentedTokens: false, | ||
methodology: 'Calculates TVL based on stETH deposits in the project contract.', | ||
ethereum: { | ||
tvl, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const { masterchefExports } = require("../helper/unknownTokens"); | ||
|
||
module.exports = masterchefExports({ | ||
chain: "pulse", | ||
masterchef: "0x1b9DD75c79Ef7308bC9aD449A9171fC5406403D8", | ||
nativeTokens: ["0xa39e7837B0c283e7ce07cfA7ca3DeEe58fbcbCd8"], | ||
useDefaultCoreAssets: true, | ||
poolInfoABI: "function poolInfo(uint256) view returns (address)", | ||
getToken: (i) => i, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const { uniTvlExport } = require('../helper/unknownTokens') | ||
|
||
module.exports = uniTvlExport('pulse', '0x5c92d17f52987DED8D2c0Fa0d5fbfcD68A09B074') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.