aave-protocol-v2/types/LendingPoolDataProvider.d.ts
2020-07-13 11:54:08 +03:00

422 lines
11 KiB
TypeScript

/* Generated by ts-generator ver. 0.0.8 */
/* tslint:disable */
import {Contract, ContractTransaction, EventFilter, Signer} from 'ethers';
import {Listener, Provider} from 'ethers/providers';
import {Arrayish, BigNumber, BigNumberish, Interface} from 'ethers/utils';
import {TransactionOverrides, TypedEventDescription, TypedFunctionDescription} from '.';
interface LendingPoolDataProviderInterface extends Interface {
functions: {
DATA_PROVIDER_REVISION: TypedFunctionDescription<{
encode([]: []): string;
}>;
HEALTH_FACTOR_LIQUIDATION_THRESHOLD: TypedFunctionDescription<{
encode([]: []): string;
}>;
addressesProvider: TypedFunctionDescription<{encode([]: []): string}>;
balanceDecreaseAllowed: TypedFunctionDescription<{
encode([_reserve, _user, _amount]: [string, string, BigNumberish]): string;
}>;
calculateCollateralNeededInETH: TypedFunctionDescription<{
encode([
_reserve,
_amount,
_fee,
_userCurrentBorrowBalanceTH,
_userCurrentFeesETH,
_userCurrentLtv,
]: [string, BigNumberish, BigNumberish, BigNumberish, BigNumberish, BigNumberish]): string;
}>;
calculateUserGlobalData: TypedFunctionDescription<{
encode([_user]: [string]): string;
}>;
core: TypedFunctionDescription<{encode([]: []): string}>;
getHealthFactorLiquidationThreshold: TypedFunctionDescription<{
encode([]: []): string;
}>;
getReserveConfigurationData: TypedFunctionDescription<{
encode([_reserve]: [string]): string;
}>;
getReserveData: TypedFunctionDescription<{
encode([_reserve]: [string]): string;
}>;
getUserAccountData: TypedFunctionDescription<{
encode([_user]: [string]): string;
}>;
getUserReserveData: TypedFunctionDescription<{
encode([_reserve, _user]: [string, string]): string;
}>;
initialize: TypedFunctionDescription<{
encode([_addressesProvider]: [string]): string;
}>;
};
events: {};
}
export class LendingPoolDataProvider extends Contract {
connect(signerOrProvider: Signer | Provider | string): LendingPoolDataProvider;
attach(addressOrName: string): LendingPoolDataProvider;
deployed(): Promise<LendingPoolDataProvider>;
on(event: EventFilter | string, listener: Listener): LendingPoolDataProvider;
once(event: EventFilter | string, listener: Listener): LendingPoolDataProvider;
addListener(eventName: EventFilter | string, listener: Listener): LendingPoolDataProvider;
removeAllListeners(eventName: EventFilter | string): LendingPoolDataProvider;
removeListener(eventName: any, listener: Listener): LendingPoolDataProvider;
interface: LendingPoolDataProviderInterface;
functions: {
DATA_PROVIDER_REVISION(): Promise<BigNumber>;
HEALTH_FACTOR_LIQUIDATION_THRESHOLD(): Promise<BigNumber>;
addressesProvider(): Promise<string>;
balanceDecreaseAllowed(
_reserve: string,
_user: string,
_amount: BigNumberish
): Promise<boolean>;
calculateCollateralNeededInETH(
_reserve: string,
_amount: BigNumberish,
_fee: BigNumberish,
_userCurrentBorrowBalanceTH: BigNumberish,
_userCurrentFeesETH: BigNumberish,
_userCurrentLtv: BigNumberish
): Promise<BigNumber>;
calculateUserGlobalData(
_user: string
): Promise<{
totalLiquidityBalanceETH: BigNumber;
totalCollateralBalanceETH: BigNumber;
totalBorrowBalanceETH: BigNumber;
totalFeesETH: BigNumber;
currentLtv: BigNumber;
currentLiquidationThreshold: BigNumber;
healthFactor: BigNumber;
healthFactorBelowThreshold: boolean;
0: BigNumber;
1: BigNumber;
2: BigNumber;
3: BigNumber;
4: BigNumber;
5: BigNumber;
6: BigNumber;
7: boolean;
}>;
core(): Promise<string>;
getHealthFactorLiquidationThreshold(): Promise<BigNumber>;
getReserveConfigurationData(
_reserve: string
): Promise<{
ltv: BigNumber;
liquidationThreshold: BigNumber;
liquidationBonus: BigNumber;
rateStrategyAddress: string;
usageAsCollateralEnabled: boolean;
borrowingEnabled: boolean;
stableBorrowRateEnabled: boolean;
isActive: boolean;
0: BigNumber;
1: BigNumber;
2: BigNumber;
3: string;
4: boolean;
5: boolean;
6: boolean;
7: boolean;
}>;
getReserveData(
_reserve: string
): Promise<{
totalLiquidity: BigNumber;
availableLiquidity: BigNumber;
totalBorrowsStable: BigNumber;
totalBorrowsVariable: BigNumber;
liquidityRate: BigNumber;
variableBorrowRate: BigNumber;
stableBorrowRate: BigNumber;
averageStableBorrowRate: BigNumber;
utilizationRate: BigNumber;
liquidityIndex: BigNumber;
variableBorrowIndex: BigNumber;
aTokenAddress: string;
lastUpdateTimestamp: number;
0: BigNumber;
1: BigNumber;
2: BigNumber;
3: BigNumber;
4: BigNumber;
5: BigNumber;
6: BigNumber;
7: BigNumber;
8: BigNumber;
9: BigNumber;
10: BigNumber;
11: string;
12: number;
}>;
getUserAccountData(
_user: string
): Promise<{
totalLiquidityETH: BigNumber;
totalCollateralETH: BigNumber;
totalBorrowsETH: BigNumber;
totalFeesETH: BigNumber;
availableBorrowsETH: BigNumber;
currentLiquidationThreshold: BigNumber;
ltv: BigNumber;
healthFactor: BigNumber;
0: BigNumber;
1: BigNumber;
2: BigNumber;
3: BigNumber;
4: BigNumber;
5: BigNumber;
6: BigNumber;
7: BigNumber;
}>;
getUserReserveData(
_reserve: string,
_user: string
): Promise<{
currentATokenBalance: BigNumber;
currentBorrowBalance: BigNumber;
principalBorrowBalance: BigNumber;
borrowRateMode: BigNumber;
borrowRate: BigNumber;
liquidityRate: BigNumber;
originationFee: BigNumber;
variableBorrowIndex: BigNumber;
lastUpdateTimestamp: BigNumber;
usageAsCollateralEnabled: boolean;
0: BigNumber;
1: BigNumber;
2: BigNumber;
3: BigNumber;
4: BigNumber;
5: BigNumber;
6: BigNumber;
7: BigNumber;
8: BigNumber;
9: boolean;
}>;
initialize(
_addressesProvider: string,
overrides?: TransactionOverrides
): Promise<ContractTransaction>;
};
DATA_PROVIDER_REVISION(): Promise<BigNumber>;
HEALTH_FACTOR_LIQUIDATION_THRESHOLD(): Promise<BigNumber>;
addressesProvider(): Promise<string>;
balanceDecreaseAllowed(_reserve: string, _user: string, _amount: BigNumberish): Promise<boolean>;
calculateCollateralNeededInETH(
_reserve: string,
_amount: BigNumberish,
_fee: BigNumberish,
_userCurrentBorrowBalanceTH: BigNumberish,
_userCurrentFeesETH: BigNumberish,
_userCurrentLtv: BigNumberish
): Promise<BigNumber>;
calculateUserGlobalData(
_user: string
): Promise<{
totalLiquidityBalanceETH: BigNumber;
totalCollateralBalanceETH: BigNumber;
totalBorrowBalanceETH: BigNumber;
totalFeesETH: BigNumber;
currentLtv: BigNumber;
currentLiquidationThreshold: BigNumber;
healthFactor: BigNumber;
healthFactorBelowThreshold: boolean;
0: BigNumber;
1: BigNumber;
2: BigNumber;
3: BigNumber;
4: BigNumber;
5: BigNumber;
6: BigNumber;
7: boolean;
}>;
core(): Promise<string>;
getHealthFactorLiquidationThreshold(): Promise<BigNumber>;
getReserveConfigurationData(
_reserve: string
): Promise<{
ltv: BigNumber;
liquidationThreshold: BigNumber;
liquidationBonus: BigNumber;
rateStrategyAddress: string;
usageAsCollateralEnabled: boolean;
borrowingEnabled: boolean;
stableBorrowRateEnabled: boolean;
isActive: boolean;
0: BigNumber;
1: BigNumber;
2: BigNumber;
3: string;
4: boolean;
5: boolean;
6: boolean;
7: boolean;
}>;
getReserveData(
_reserve: string
): Promise<{
totalLiquidity: BigNumber;
availableLiquidity: BigNumber;
totalBorrowsStable: BigNumber;
totalBorrowsVariable: BigNumber;
liquidityRate: BigNumber;
variableBorrowRate: BigNumber;
stableBorrowRate: BigNumber;
averageStableBorrowRate: BigNumber;
utilizationRate: BigNumber;
liquidityIndex: BigNumber;
variableBorrowIndex: BigNumber;
aTokenAddress: string;
lastUpdateTimestamp: number;
0: BigNumber;
1: BigNumber;
2: BigNumber;
3: BigNumber;
4: BigNumber;
5: BigNumber;
6: BigNumber;
7: BigNumber;
8: BigNumber;
9: BigNumber;
10: BigNumber;
11: string;
12: number;
}>;
getUserAccountData(
_user: string
): Promise<{
totalLiquidityETH: BigNumber;
totalCollateralETH: BigNumber;
totalBorrowsETH: BigNumber;
totalFeesETH: BigNumber;
availableBorrowsETH: BigNumber;
currentLiquidationThreshold: BigNumber;
ltv: BigNumber;
healthFactor: BigNumber;
0: BigNumber;
1: BigNumber;
2: BigNumber;
3: BigNumber;
4: BigNumber;
5: BigNumber;
6: BigNumber;
7: BigNumber;
}>;
getUserReserveData(
_reserve: string,
_user: string
): Promise<{
currentATokenBalance: BigNumber;
currentBorrowBalance: BigNumber;
principalBorrowBalance: BigNumber;
borrowRateMode: BigNumber;
borrowRate: BigNumber;
liquidityRate: BigNumber;
originationFee: BigNumber;
variableBorrowIndex: BigNumber;
lastUpdateTimestamp: BigNumber;
usageAsCollateralEnabled: boolean;
0: BigNumber;
1: BigNumber;
2: BigNumber;
3: BigNumber;
4: BigNumber;
5: BigNumber;
6: BigNumber;
7: BigNumber;
8: BigNumber;
9: boolean;
}>;
initialize(
_addressesProvider: string,
overrides?: TransactionOverrides
): Promise<ContractTransaction>;
filters: {};
estimate: {
DATA_PROVIDER_REVISION(): Promise<BigNumber>;
HEALTH_FACTOR_LIQUIDATION_THRESHOLD(): Promise<BigNumber>;
addressesProvider(): Promise<BigNumber>;
balanceDecreaseAllowed(
_reserve: string,
_user: string,
_amount: BigNumberish
): Promise<BigNumber>;
calculateCollateralNeededInETH(
_reserve: string,
_amount: BigNumberish,
_fee: BigNumberish,
_userCurrentBorrowBalanceTH: BigNumberish,
_userCurrentFeesETH: BigNumberish,
_userCurrentLtv: BigNumberish
): Promise<BigNumber>;
calculateUserGlobalData(_user: string): Promise<BigNumber>;
core(): Promise<BigNumber>;
getHealthFactorLiquidationThreshold(): Promise<BigNumber>;
getReserveConfigurationData(_reserve: string): Promise<BigNumber>;
getReserveData(_reserve: string): Promise<BigNumber>;
getUserAccountData(_user: string): Promise<BigNumber>;
getUserReserveData(_reserve: string, _user: string): Promise<BigNumber>;
initialize(_addressesProvider: string): Promise<BigNumber>;
};
}