///
import type BN from "bn.js";
import type { ContractOptions } from "web3-eth-contract";
import type { EventLog } from "web3-core";
import type { EventEmitter } from "events";
import type { Callback, NonPayableTransactionObject, BlockType, ContractEventLog, BaseContract } from "./types";
export interface EventOptions {
filter?: object;
fromBlock?: BlockType;
topics?: string[];
}
export type Borrow = ContractEventLog<{
reserve: string;
user: string;
onBehalfOf: string;
amount: string;
borrowRateMode: string;
borrowRate: string;
referral: string;
0: string;
1: string;
2: string;
3: string;
4: string;
5: string;
6: string;
}>;
export type Deposit = ContractEventLog<{
reserve: string;
user: string;
onBehalfOf: string;
amount: string;
referral: string;
0: string;
1: string;
2: string;
3: string;
4: string;
}>;
export type FlashLoan = ContractEventLog<{
target: string;
initiator: string;
asset: string;
amount: string;
premium: string;
referralCode: string;
0: string;
1: string;
2: string;
3: string;
4: string;
5: string;
}>;
export type LiquidationCall = ContractEventLog<{
collateralAsset: string;
debtAsset: string;
user: string;
debtToCover: string;
liquidatedCollateralAmount: string;
liquidator: string;
receiveAToken: boolean;
0: string;
1: string;
2: string;
3: string;
4: string;
5: string;
6: boolean;
}>;
export type Paused = ContractEventLog<{}>;
export type RebalanceStableBorrowRate = ContractEventLog<{
reserve: string;
user: string;
0: string;
1: string;
}>;
export type Repay = ContractEventLog<{
reserve: string;
user: string;
repayer: string;
amount: string;
0: string;
1: string;
2: string;
3: string;
}>;
export type ReserveDataUpdated = ContractEventLog<{
reserve: string;
liquidityRate: string;
stableBorrowRate: string;
variableBorrowRate: string;
liquidityIndex: string;
variableBorrowIndex: string;
0: string;
1: string;
2: string;
3: string;
4: string;
5: string;
}>;
export type ReserveUsedAsCollateralDisabled = ContractEventLog<{
reserve: string;
user: string;
0: string;
1: string;
}>;
export type ReserveUsedAsCollateralEnabled = ContractEventLog<{
reserve: string;
user: string;
0: string;
1: string;
}>;
export type Swap = ContractEventLog<{
reserve: string;
user: string;
rateMode: string;
0: string;
1: string;
2: string;
}>;
export type Unpaused = ContractEventLog<{}>;
export type Withdraw = ContractEventLog<{
reserve: string;
user: string;
to: string;
amount: string;
0: string;
1: string;
2: string;
3: string;
}>;
export interface IAaveLendingPool extends BaseContract {
constructor(jsonInterface: any[], address?: string, options?: ContractOptions): IAaveLendingPool;
clone(): IAaveLendingPool;
methods: {
borrow(asset: string, amount: number | string | BN, interestRateMode: number | string | BN, referralCode: number | string | BN, onBehalfOf: string): NonPayableTransactionObject;
deposit(asset: string, amount: number | string | BN, onBehalfOf: string, referralCode: number | string | BN): NonPayableTransactionObject;
finalizeTransfer(asset: string, from: string, to: string, amount: number | string | BN, balanceFromAfter: number | string | BN, balanceToBefore: number | string | BN): NonPayableTransactionObject;
flashLoan(receiverAddress: string, assets: string[], amounts: (number | string | BN)[], modes: (number | string | BN)[], onBehalfOf: string, params: string | number[], referralCode: number | string | BN): NonPayableTransactionObject;
getAddressesProvider(): NonPayableTransactionObject;
getConfiguration(asset: string): NonPayableTransactionObject<[string]>;
getReserveData(asset: string): NonPayableTransactionObject<[
[
string
],
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string
]>;
getReserveNormalizedIncome(asset: string): NonPayableTransactionObject;
getReserveNormalizedVariableDebt(asset: string): NonPayableTransactionObject;
getReservesList(): NonPayableTransactionObject;
getUserAccountData(user: string): NonPayableTransactionObject<{
totalCollateralETH: string;
totalDebtETH: string;
availableBorrowsETH: string;
currentLiquidationThreshold: string;
ltv: string;
healthFactor: string;
0: string;
1: string;
2: string;
3: string;
4: string;
5: string;
}>;
getUserConfiguration(user: string): NonPayableTransactionObject<[string]>;
initReserve(reserve: string, aTokenAddress: string, stableDebtAddress: string, variableDebtAddress: string, interestRateStrategyAddress: string): NonPayableTransactionObject;
liquidationCall(collateralAsset: string, debtAsset: string, user: string, debtToCover: number | string | BN, receiveAToken: boolean): NonPayableTransactionObject;
paused(): NonPayableTransactionObject;
rebalanceStableBorrowRate(asset: string, user: string): NonPayableTransactionObject;
repay(asset: string, amount: number | string | BN, rateMode: number | string | BN, onBehalfOf: string): NonPayableTransactionObject;
setConfiguration(reserve: string, configuration: number | string | BN): NonPayableTransactionObject;
setPause(val: boolean): NonPayableTransactionObject;
setReserveInterestRateStrategyAddress(reserve: string, rateStrategyAddress: string): NonPayableTransactionObject;
setUserUseReserveAsCollateral(asset: string, useAsCollateral: boolean): NonPayableTransactionObject;
swapBorrowRateMode(asset: string, rateMode: number | string | BN): NonPayableTransactionObject;
withdraw(asset: string, amount: number | string | BN, to: string): NonPayableTransactionObject;
};
events: {
Borrow(cb?: Callback): EventEmitter;
Borrow(options?: EventOptions, cb?: Callback): EventEmitter;
Deposit(cb?: Callback): EventEmitter;
Deposit(options?: EventOptions, cb?: Callback): EventEmitter;
FlashLoan(cb?: Callback): EventEmitter;
FlashLoan(options?: EventOptions, cb?: Callback): EventEmitter;
LiquidationCall(cb?: Callback): EventEmitter;
LiquidationCall(options?: EventOptions, cb?: Callback): EventEmitter;
Paused(cb?: Callback): EventEmitter;
Paused(options?: EventOptions, cb?: Callback): EventEmitter;
RebalanceStableBorrowRate(cb?: Callback): EventEmitter;
RebalanceStableBorrowRate(options?: EventOptions, cb?: Callback): EventEmitter;
Repay(cb?: Callback): EventEmitter;
Repay(options?: EventOptions, cb?: Callback): EventEmitter;
ReserveDataUpdated(cb?: Callback): EventEmitter;
ReserveDataUpdated(options?: EventOptions, cb?: Callback): EventEmitter;
ReserveUsedAsCollateralDisabled(cb?: Callback): EventEmitter;
ReserveUsedAsCollateralDisabled(options?: EventOptions, cb?: Callback): EventEmitter;
ReserveUsedAsCollateralEnabled(cb?: Callback): EventEmitter;
ReserveUsedAsCollateralEnabled(options?: EventOptions, cb?: Callback): EventEmitter;
Swap(cb?: Callback): EventEmitter;
Swap(options?: EventOptions, cb?: Callback): EventEmitter;
Unpaused(cb?: Callback): EventEmitter;
Unpaused(options?: EventOptions, cb?: Callback): EventEmitter;
Withdraw(cb?: Callback): EventEmitter;
Withdraw(options?: EventOptions, cb?: Callback): EventEmitter;
allEvents(options?: EventOptions, cb?: Callback): EventEmitter;
};
once(event: "Borrow", cb: Callback): void;
once(event: "Borrow", options: EventOptions, cb: Callback): void;
once(event: "Deposit", cb: Callback): void;
once(event: "Deposit", options: EventOptions, cb: Callback): void;
once(event: "FlashLoan", cb: Callback): void;
once(event: "FlashLoan", options: EventOptions, cb: Callback): void;
once(event: "LiquidationCall", cb: Callback): void;
once(event: "LiquidationCall", options: EventOptions, cb: Callback): void;
once(event: "Paused", cb: Callback): void;
once(event: "Paused", options: EventOptions, cb: Callback): void;
once(event: "RebalanceStableBorrowRate", cb: Callback): void;
once(event: "RebalanceStableBorrowRate", options: EventOptions, cb: Callback): void;
once(event: "Repay", cb: Callback): void;
once(event: "Repay", options: EventOptions, cb: Callback): void;
once(event: "ReserveDataUpdated", cb: Callback): void;
once(event: "ReserveDataUpdated", options: EventOptions, cb: Callback): void;
once(event: "ReserveUsedAsCollateralDisabled", cb: Callback): void;
once(event: "ReserveUsedAsCollateralDisabled", options: EventOptions, cb: Callback): void;
once(event: "ReserveUsedAsCollateralEnabled", cb: Callback): void;
once(event: "ReserveUsedAsCollateralEnabled", options: EventOptions, cb: Callback): void;
once(event: "Swap", cb: Callback): void;
once(event: "Swap", options: EventOptions, cb: Callback): void;
once(event: "Unpaused", cb: Callback): void;
once(event: "Unpaused", options: EventOptions, cb: Callback): void;
once(event: "Withdraw", cb: Callback): void;
once(event: "Withdraw", options: EventOptions, cb: Callback): void;
}