forked from curvefi/curve-stablecoin-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinterfaces.ts
77 lines (69 loc) · 2.05 KB
/
interfaces.ts
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
65
66
67
68
69
70
71
72
73
74
75
76
77
import { Contract, ethers } from "ethers";
import { Contract as MulticallContract, Provider as MulticallProvider } from "ethcall";
export interface IDict<T> {
[index: string]: T,
}
export interface ILlamma {
amm_address: string,
controller_address: string,
monetary_policy_address: string,
collateral_address: string,
health_calculator_zap?: string,
collateral_symbol: string,
collateral_decimals: number,
min_bands: number,
max_bands: number,
default_bands: number,
A: number,
monetary_policy_abi: any
}
export interface Icrvusd {
provider: ethers.providers.Web3Provider | ethers.providers.JsonRpcProvider,
multicallProvider: MulticallProvider,
signer: ethers.Signer | null,
signerAddress: string,
contracts: { [index: string]: { contract: Contract, multicallContract: MulticallContract } },
feeData: { gasPrice?: number, maxFeePerGas?: number, maxPriorityFeePerGas?: number },
constantOptions: { gasLimit: number },
options: { gasPrice?: number | ethers.BigNumber, maxFeePerGas?: number | ethers.BigNumber, maxPriorityFeePerGas?: number | ethers.BigNumber },
constants: {
LLAMMAS: IDict<ILlamma>,
};
}
export type INetworkName = "ethereum";
export interface ICoinFromPoolDataApi {
address: string,
symbol: string,
decimals: string,
usdPrice: number | string,
}
export interface IReward {
gaugeAddress: string,
tokenAddress: string,
tokenPrice?: number,
name?: string,
symbol: string,
decimals?: number,
apy: number
}
export interface IPoolDataFromApi {
id: string,
name: string,
symbol: string,
assetTypeName: string,
address: string,
lpTokenAddress?: string,
gaugeAddress?: string,
implementation: string,
implementationAddress: string,
coins: ICoinFromPoolDataApi[],
gaugeRewards?: IReward[],
usdTotal: number,
totalSupply: number,
amplificationCoefficient: string,
}
export interface IExtendedPoolDataFromApi {
poolData: IPoolDataFromApi[],
tvl?: number,
tvlAll: number,
}