generated from BuiltByMom/LookMom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.tsx
64 lines (57 loc) · 1.58 KB
/
types.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import type {TYDaemonVault} from '@yearn-finance/web-lib/utils/schemas/yDaemonVaultsSchemas';
import type {TAddress, TNormalizedBN} from '@builtbymom/web3/types';
export type TVaultListItem = {
name: string;
tokenSymbol: string;
rewardSymbol: string;
decimals: number;
chainID: number;
vaultAddress: TAddress;
tokenAddress: TAddress;
stakingAddress: TAddress;
rewardAddress: TAddress;
autoCompoundingAddress: TAddress;
version: 1 | 2;
};
export type TPriceData = {
underlyingToken: TNormalizedBN;
vaultToken: TNormalizedBN;
rewardToken: TNormalizedBN;
};
export type TVaultOnchainData = {
totalVaultSupply: TNormalizedBN;
vaultBalanceOf: TNormalizedBN;
tokenBalanceOf: TNormalizedBN;
totalStakingSupply: TNormalizedBN;
stakingBalanceOf: TNormalizedBN;
rewardEarned: TNormalizedBN;
vaultPricePerShare: TNormalizedBN;
autoCompoundingVaultPricePerShare: TNormalizedBN;
autoCoumpoundingVaultSupply: TNormalizedBN;
autoCoumpoundingVaultBalance: TNormalizedBN;
weeklyStakingRewards: number;
unlockedShares: TNormalizedBN;
};
export type TVaultData = TVaultListItem & {
onChainData: TVaultOnchainData | undefined;
prices: TPriceData | undefined;
yDaemonData: TYDaemonVault;
autoCompoundingAPY: number;
};
export type TVault = {
totalDeposit: number;
vaultAddress: TAddress;
isFetched: boolean;
APY: number;
tvl: number;
rewardValue: number;
rewardClaimable: number;
};
export type TVaultUIProps = {
vault: TVaultListItem;
onChainData?: TVaultOnchainData;
prices?: TPriceData;
yDaemonData: TYDaemonVault;
onRefreshVaultData: () => void;
expectedAutoCompoundAPY: number;
};