Skip to content

Commit

Permalink
Add UniswapV3 vault type (#11738)
Browse files Browse the repository at this point in the history
  • Loading branch information
VitaliyShulik authored Sep 25, 2024
1 parent 20bb62a commit d49d045
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions projects/clip-finance/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const VaultType = {
NileCl: 6,
ZeroLend: 7,
StargateFarming: 8,
UniswapV3: 9,
};

const typesDataInterfaces = {
Expand All @@ -37,7 +38,8 @@ const typesDataInterfaces = {
[VaultType.LynexAlgebra]: ["uint256", "address"], // vaultType, algebra pool address
[VaultType.NileCl]: ["uint256", "address", "address"], // vaultType, nileCl pool address, stacking contract address
[VaultType.ZeroLend]: ["uint256", "address"], // vaultType, ZeroLend strategy address
[VaultType.StargateFarming]: ["uint256", "address"] // vaultType, Stargate strategy address
[VaultType.StargateFarming]: ["uint256", "address"], // vaultType, Stargate strategy address
[VaultType.UniswapV3]: ["uint256", "address"], // vaultType, v3 pool address
};

const tvl = async (api) => {
Expand All @@ -49,7 +51,7 @@ const tvl = async (api) => {
const vaults = vaultDatas.map((i) => ({ ...i, vaultType: decoder.decode(typesDataInterfaces.any, i.data) }));

// ammVaults
const ammTypes = [VaultType.PancakeV3, VaultType.LynexAlgebra, VaultType.NileCl];
const ammTypes = [VaultType.PancakeV3, VaultType.LynexAlgebra, VaultType.NileCl, VaultType.UniswapV3];
const ammVaults = vaults.filter((i) => ammTypes.includes(Number(i.vaultType.toString()))).map((i) => i.vault);
const ammPools = vaults
.filter((i) => ammTypes.includes(Number(i.vaultType.toString())))
Expand Down

0 comments on commit d49d045

Please sign in to comment.