aave-protocol-v2/types/LendingPool.d.ts
2020-06-03 12:23:21 +02:00

817 lines
19 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 LendingPoolInterface extends Interface {
functions: {
LENDINGPOOL_REVISION: TypedFunctionDescription<{ encode([]: []): string }>;
UINT_MAX_VALUE: TypedFunctionDescription<{ encode([]: []): string }>;
addressesProvider: TypedFunctionDescription<{ encode([]: []): string }>;
borrow: TypedFunctionDescription<{
encode([_reserve, _amount, _interestRateMode, _referralCode]: [
string,
BigNumberish,
BigNumberish,
BigNumberish
]): string;
}>;
core: TypedFunctionDescription<{ encode([]: []): string }>;
dataProvider: TypedFunctionDescription<{ encode([]: []): string }>;
deposit: TypedFunctionDescription<{
encode([_reserve, _amount, _referralCode]: [
string,
BigNumberish,
BigNumberish
]): string;
}>;
flashLoan: TypedFunctionDescription<{
encode([_receiver, _reserve, _amount, _params]: [
string,
string,
BigNumberish,
Arrayish
]): string;
}>;
getReserveConfigurationData: TypedFunctionDescription<{
encode([_reserve]: [string]): string;
}>;
getReserveData: TypedFunctionDescription<{
encode([_reserve]: [string]): string;
}>;
getReserves: TypedFunctionDescription<{ encode([]: []): string }>;
getUserAccountData: TypedFunctionDescription<{
encode([_user]: [string]): string;
}>;
getUserReserveData: TypedFunctionDescription<{
encode([_reserve, _user]: [string, string]): string;
}>;
initialize: TypedFunctionDescription<{
encode([_addressesProvider]: [string]): string;
}>;
liquidationCall: TypedFunctionDescription<{
encode([_collateral, _reserve, _user, _purchaseAmount, _receiveAToken]: [
string,
string,
string,
BigNumberish,
boolean
]): string;
}>;
parametersProvider: TypedFunctionDescription<{ encode([]: []): string }>;
rebalanceStableBorrowRate: TypedFunctionDescription<{
encode([_reserve, _user]: [string, string]): string;
}>;
redeemUnderlying: TypedFunctionDescription<{
encode([_reserve, _user, _amount, _aTokenBalanceAfterRedeem]: [
string,
string,
BigNumberish,
BigNumberish
]): string;
}>;
repay: TypedFunctionDescription<{
encode([_reserve, _amount, _onBehalfOf]: [
string,
BigNumberish,
string
]): string;
}>;
setUserUseReserveAsCollateral: TypedFunctionDescription<{
encode([_reserve, _useAsCollateral]: [string, boolean]): string;
}>;
swapBorrowRateMode: TypedFunctionDescription<{
encode([_reserve]: [string]): string;
}>;
};
events: {
Borrow: TypedEventDescription<{
encodeTopics([
_reserve,
_user,
_amount,
_borrowRateMode,
_borrowRate,
_originationFee,
_borrowBalanceIncrease,
_referral,
_timestamp
]: [
string | null,
string | null,
null,
null,
null,
null,
null,
BigNumberish | null,
null
]): string[];
}>;
Deposit: TypedEventDescription<{
encodeTopics([_reserve, _user, _amount, _referral, _timestamp]: [
string | null,
string | null,
null,
BigNumberish | null,
null
]): string[];
}>;
FlashLoan: TypedEventDescription<{
encodeTopics([
_target,
_reserve,
_amount,
_totalFee,
_protocolFee,
_timestamp
]: [string | null, string | null, null, null, null, null]): string[];
}>;
LiquidationCall: TypedEventDescription<{
encodeTopics([
_collateral,
_reserve,
_user,
_purchaseAmount,
_liquidatedCollateralAmount,
_accruedBorrowInterest,
_liquidator,
_receiveAToken,
_timestamp
]: [
string | null,
string | null,
string | null,
null,
null,
null,
null,
null,
null
]): string[];
}>;
OriginationFeeLiquidated: TypedEventDescription<{
encodeTopics([
_collateral,
_reserve,
_user,
_feeLiquidated,
_liquidatedCollateralForFee,
_timestamp
]: [
string | null,
string | null,
string | null,
null,
null,
null
]): string[];
}>;
RebalanceStableBorrowRate: TypedEventDescription<{
encodeTopics([
_reserve,
_user,
_newStableRate,
_borrowBalanceIncrease,
_timestamp
]: [string | null, string | null, null, null, null]): string[];
}>;
RedeemUnderlying: TypedEventDescription<{
encodeTopics([_reserve, _user, _amount, _timestamp]: [
string | null,
string | null,
null,
null
]): string[];
}>;
Repay: TypedEventDescription<{
encodeTopics([
_reserve,
_user,
_repayer,
_amountMinusFees,
_fees,
_borrowBalanceIncrease,
_timestamp
]: [
string | null,
string | null,
string | null,
null,
null,
null,
null
]): string[];
}>;
ReserveUsedAsCollateralDisabled: TypedEventDescription<{
encodeTopics([_reserve, _user]: [string | null, string | null]): string[];
}>;
ReserveUsedAsCollateralEnabled: TypedEventDescription<{
encodeTopics([_reserve, _user]: [string | null, string | null]): string[];
}>;
Swap: TypedEventDescription<{
encodeTopics([
_reserve,
_user,
_newRateMode,
_newRate,
_borrowBalanceIncrease,
_timestamp
]: [string | null, string | null, null, null, null, null]): string[];
}>;
};
}
export class LendingPool extends Contract {
connect(signerOrProvider: Signer | Provider | string): LendingPool;
attach(addressOrName: string): LendingPool;
deployed(): Promise<LendingPool>;
on(event: EventFilter | string, listener: Listener): LendingPool;
once(event: EventFilter | string, listener: Listener): LendingPool;
addListener(eventName: EventFilter | string, listener: Listener): LendingPool;
removeAllListeners(eventName: EventFilter | string): LendingPool;
removeListener(eventName: any, listener: Listener): LendingPool;
interface: LendingPoolInterface;
functions: {
LENDINGPOOL_REVISION(): Promise<BigNumber>;
UINT_MAX_VALUE(): Promise<BigNumber>;
addressesProvider(): Promise<string>;
borrow(
_reserve: string,
_amount: BigNumberish,
_interestRateMode: BigNumberish,
_referralCode: BigNumberish,
overrides?: TransactionOverrides
): Promise<ContractTransaction>;
core(): Promise<string>;
dataProvider(): Promise<string>;
deposit(
_reserve: string,
_amount: BigNumberish,
_referralCode: BigNumberish,
overrides?: TransactionOverrides
): Promise<ContractTransaction>;
flashLoan(
_receiver: string,
_reserve: string,
_amount: BigNumberish,
_params: Arrayish,
overrides?: TransactionOverrides
): Promise<ContractTransaction>;
getReserveConfigurationData(
_reserve: string
): Promise<{
ltv: BigNumber;
liquidationThreshold: BigNumber;
liquidationBonus: BigNumber;
interestRateStrategyAddress: 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;
}>;
getReserves(): Promise<string[]>;
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>;
liquidationCall(
_collateral: string,
_reserve: string,
_user: string,
_purchaseAmount: BigNumberish,
_receiveAToken: boolean,
overrides?: TransactionOverrides
): Promise<ContractTransaction>;
parametersProvider(): Promise<string>;
rebalanceStableBorrowRate(
_reserve: string,
_user: string,
overrides?: TransactionOverrides
): Promise<ContractTransaction>;
redeemUnderlying(
_reserve: string,
_user: string,
_amount: BigNumberish,
_aTokenBalanceAfterRedeem: BigNumberish,
overrides?: TransactionOverrides
): Promise<ContractTransaction>;
repay(
_reserve: string,
_amount: BigNumberish,
_onBehalfOf: string,
overrides?: TransactionOverrides
): Promise<ContractTransaction>;
setUserUseReserveAsCollateral(
_reserve: string,
_useAsCollateral: boolean,
overrides?: TransactionOverrides
): Promise<ContractTransaction>;
swapBorrowRateMode(
_reserve: string,
overrides?: TransactionOverrides
): Promise<ContractTransaction>;
};
LENDINGPOOL_REVISION(): Promise<BigNumber>;
UINT_MAX_VALUE(): Promise<BigNumber>;
addressesProvider(): Promise<string>;
borrow(
_reserve: string,
_amount: BigNumberish,
_interestRateMode: BigNumberish,
_referralCode: BigNumberish,
overrides?: TransactionOverrides
): Promise<ContractTransaction>;
core(): Promise<string>;
dataProvider(): Promise<string>;
deposit(
_reserve: string,
_amount: BigNumberish,
_referralCode: BigNumberish,
overrides?: TransactionOverrides
): Promise<ContractTransaction>;
flashLoan(
_receiver: string,
_reserve: string,
_amount: BigNumberish,
_params: Arrayish,
overrides?: TransactionOverrides
): Promise<ContractTransaction>;
getReserveConfigurationData(
_reserve: string
): Promise<{
ltv: BigNumber;
liquidationThreshold: BigNumber;
liquidationBonus: BigNumber;
interestRateStrategyAddress: 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;
}>;
getReserves(): Promise<string[]>;
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>;
liquidationCall(
_collateral: string,
_reserve: string,
_user: string,
_purchaseAmount: BigNumberish,
_receiveAToken: boolean,
overrides?: TransactionOverrides
): Promise<ContractTransaction>;
parametersProvider(): Promise<string>;
rebalanceStableBorrowRate(
_reserve: string,
_user: string,
overrides?: TransactionOverrides
): Promise<ContractTransaction>;
redeemUnderlying(
_reserve: string,
_user: string,
_amount: BigNumberish,
_aTokenBalanceAfterRedeem: BigNumberish,
overrides?: TransactionOverrides
): Promise<ContractTransaction>;
repay(
_reserve: string,
_amount: BigNumberish,
_onBehalfOf: string,
overrides?: TransactionOverrides
): Promise<ContractTransaction>;
setUserUseReserveAsCollateral(
_reserve: string,
_useAsCollateral: boolean,
overrides?: TransactionOverrides
): Promise<ContractTransaction>;
swapBorrowRateMode(
_reserve: string,
overrides?: TransactionOverrides
): Promise<ContractTransaction>;
filters: {
Borrow(
_reserve: string | null,
_user: string | null,
_amount: null,
_borrowRateMode: null,
_borrowRate: null,
_originationFee: null,
_borrowBalanceIncrease: null,
_referral: BigNumberish | null,
_timestamp: null
): EventFilter;
Deposit(
_reserve: string | null,
_user: string | null,
_amount: null,
_referral: BigNumberish | null,
_timestamp: null
): EventFilter;
FlashLoan(
_target: string | null,
_reserve: string | null,
_amount: null,
_totalFee: null,
_protocolFee: null,
_timestamp: null
): EventFilter;
LiquidationCall(
_collateral: string | null,
_reserve: string | null,
_user: string | null,
_purchaseAmount: null,
_liquidatedCollateralAmount: null,
_accruedBorrowInterest: null,
_liquidator: null,
_receiveAToken: null,
_timestamp: null
): EventFilter;
OriginationFeeLiquidated(
_collateral: string | null,
_reserve: string | null,
_user: string | null,
_feeLiquidated: null,
_liquidatedCollateralForFee: null,
_timestamp: null
): EventFilter;
RebalanceStableBorrowRate(
_reserve: string | null,
_user: string | null,
_newStableRate: null,
_borrowBalanceIncrease: null,
_timestamp: null
): EventFilter;
RedeemUnderlying(
_reserve: string | null,
_user: string | null,
_amount: null,
_timestamp: null
): EventFilter;
Repay(
_reserve: string | null,
_user: string | null,
_repayer: string | null,
_amountMinusFees: null,
_fees: null,
_borrowBalanceIncrease: null,
_timestamp: null
): EventFilter;
ReserveUsedAsCollateralDisabled(
_reserve: string | null,
_user: string | null
): EventFilter;
ReserveUsedAsCollateralEnabled(
_reserve: string | null,
_user: string | null
): EventFilter;
Swap(
_reserve: string | null,
_user: string | null,
_newRateMode: null,
_newRate: null,
_borrowBalanceIncrease: null,
_timestamp: null
): EventFilter;
};
estimate: {
LENDINGPOOL_REVISION(): Promise<BigNumber>;
UINT_MAX_VALUE(): Promise<BigNumber>;
addressesProvider(): Promise<BigNumber>;
borrow(
_reserve: string,
_amount: BigNumberish,
_interestRateMode: BigNumberish,
_referralCode: BigNumberish
): Promise<BigNumber>;
core(): Promise<BigNumber>;
dataProvider(): Promise<BigNumber>;
deposit(
_reserve: string,
_amount: BigNumberish,
_referralCode: BigNumberish
): Promise<BigNumber>;
flashLoan(
_receiver: string,
_reserve: string,
_amount: BigNumberish,
_params: Arrayish
): Promise<BigNumber>;
getReserveConfigurationData(_reserve: string): Promise<BigNumber>;
getReserveData(_reserve: string): Promise<BigNumber>;
getReserves(): Promise<BigNumber>;
getUserAccountData(_user: string): Promise<BigNumber>;
getUserReserveData(_reserve: string, _user: string): Promise<BigNumber>;
initialize(_addressesProvider: string): Promise<BigNumber>;
liquidationCall(
_collateral: string,
_reserve: string,
_user: string,
_purchaseAmount: BigNumberish,
_receiveAToken: boolean
): Promise<BigNumber>;
parametersProvider(): Promise<BigNumber>;
rebalanceStableBorrowRate(
_reserve: string,
_user: string
): Promise<BigNumber>;
redeemUnderlying(
_reserve: string,
_user: string,
_amount: BigNumberish,
_aTokenBalanceAfterRedeem: BigNumberish
): Promise<BigNumber>;
repay(
_reserve: string,
_amount: BigNumberish,
_onBehalfOf: string
): Promise<BigNumber>;
setUserUseReserveAsCollateral(
_reserve: string,
_useAsCollateral: boolean
): Promise<BigNumber>;
swapBorrowRateMode(_reserve: string): Promise<BigNumber>;
};
}