-
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
784 changed files
with
17,618 additions
and
8,725 deletions.
There are no files selected for viewing
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,2 @@ | ||
# Ignore all files | ||
* |
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
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
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 |
---|---|---|
@@ -1,27 +1,12 @@ | ||
const ADDRESSES = require('../helper/coreAssets.json') | ||
const { sumTokens2 } = require('../helper/solana') | ||
const { sumTokensExport } = require('../helper/solana') | ||
|
||
async function tvl() { | ||
const tokens = [ | ||
ADDRESSES.solana.USDC, | ||
ADDRESSES.solana.SOL, | ||
ADDRESSES.solana.USDT, | ||
"7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs", | ||
"9n4nbM75f5Ui33ZbPYXn59EwSgE8CGsHtAeTH5YFeJ9E", | ||
"mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So", | ||
"9vMJfxuKxXBoEa7rM12mYLMwTacLMLDJqHozw96WQL8i", | ||
] | ||
const owner = 'HjHSNe8hhvZ8hKCRrhKg1DGiGPd9NYQbUjT1SQRDo4kZ' | ||
|
||
return sumTokens2({ owner, tokens }) | ||
} | ||
module.exports = { | ||
hallmarks:[ | ||
[1667865600, "FTX collapse"] | ||
], | ||
timetravel: false, | ||
solana: { | ||
tvl, | ||
tvl: sumTokensExport({ owner: 'HjHSNe8hhvZ8hKCRrhKg1DGiGPd9NYQbUjT1SQRDo4kZ' }), | ||
}, | ||
methodology: `To obtain the tvl we're getting the vault accounts information where user deposited collateral is stored.`, | ||
} |
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,27 @@ | ||
const abi = { | ||
vaultParams: "function vaultParams() view returns (bool isPut, uint8 decimals, address asset, address underlying, uint56 minimumSupply, uint104 cap)" | ||
} | ||
|
||
const config = { | ||
ethereum: { | ||
vaults: [ | ||
"0xAcD147A5bbCB7166c5BB13A9354ad7a59b99fB4d", // weETH call vault | ||
] | ||
} | ||
} | ||
|
||
module.exports = { | ||
methodology: "Sums the totalBalance of all 3Jane Theta Vaults", | ||
}; | ||
|
||
Object.keys(config).forEach(chain => { | ||
const { vaults } = config[chain] | ||
module.exports[chain] = { | ||
tvl: async (api) => { | ||
const balances = await api.multiCall({ abi: "uint256:totalBalance", calls: vaults }) | ||
const data = await api.multiCall({ abi: abi.vaultParams, calls: vaults }) | ||
const tokens = data.map(d => d.asset) | ||
api.add(tokens, balances) | ||
} | ||
} | ||
}) |
Oops, something went wrong.