aave-protocol-v2/types/LendingPoolFactory.ts

1210 lines
64 KiB
TypeScript
Raw Normal View History

2020-06-03 10:23:21 +00:00
/* Generated by ts-generator ver. 0.0.8 */
/* tslint:disable */
2020-08-07 17:29:13 +00:00
import { Contract, ContractFactory, Signer } from "ethers";
import { Provider } from "ethers/providers";
import { UnsignedTransaction } from "ethers/utils/transaction";
2020-06-03 10:23:21 +00:00
2020-08-07 17:29:13 +00:00
import { TransactionOverrides } from ".";
import { LendingPool } from "./LendingPool";
2020-06-03 10:23:21 +00:00
export class LendingPoolFactory extends ContractFactory {
2020-08-07 17:29:13 +00:00
constructor(
linkLibraryAddresses: LendingPoolLibraryAddresses,
signer?: Signer
) {
2020-06-20 23:40:03 +00:00
super(_abi, LendingPoolFactory.linkBytecode(linkLibraryAddresses), signer);
}
2020-08-07 17:29:13 +00:00
static linkBytecode(
linkLibraryAddresses: LendingPoolLibraryAddresses
): string {
2020-06-20 23:40:03 +00:00
let linkedBytecode = _bytecode;
linkedBytecode = linkedBytecode.replace(
2020-08-07 17:29:13 +00:00
new RegExp("__\\$69254465eb8f179ea24caa73cf68b23524\\$__", "g"),
linkLibraryAddresses["__$69254465eb8f179ea24caa73cf68b23524$__"]
.replace(/^0x/, "")
2020-06-20 23:40:03 +00:00
.toLowerCase()
);
linkedBytecode = linkedBytecode.replace(
2020-08-07 17:29:13 +00:00
new RegExp("__\\$5e6137a1b5a0a366e2874209b5abf71c10\\$__", "g"),
linkLibraryAddresses["__$5e6137a1b5a0a366e2874209b5abf71c10$__"]
.replace(/^0x/, "")
2020-06-20 23:40:03 +00:00
.toLowerCase()
);
linkedBytecode = linkedBytecode.replace(
2020-08-07 17:29:13 +00:00
new RegExp("__\\$7347ff53b2b46c21e26a37164ae7f6739f\\$__", "g"),
linkLibraryAddresses["__$7347ff53b2b46c21e26a37164ae7f6739f$__"]
.replace(/^0x/, "")
2020-06-20 23:40:03 +00:00
.toLowerCase()
);
return linkedBytecode;
2020-06-03 10:23:21 +00:00
}
deploy(overrides?: TransactionOverrides): Promise<LendingPool> {
return super.deploy(overrides) as Promise<LendingPool>;
}
getDeployTransaction(overrides?: TransactionOverrides): UnsignedTransaction {
return super.getDeployTransaction(overrides);
}
attach(address: string): LendingPool {
return super.attach(address) as LendingPool;
}
connect(signer: Signer): LendingPoolFactory {
return super.connect(signer) as LendingPoolFactory;
}
2020-08-07 17:29:13 +00:00
static connect(
address: string,
signerOrProvider: Signer | Provider
): LendingPool {
2020-06-03 10:23:21 +00:00
return new Contract(address, _abi, signerOrProvider) as LendingPool;
}
}
const _abi = [
{
anonymous: false,
inputs: [
{
indexed: true,
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_reserve",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
indexed: true,
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_user",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_amount",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_borrowRateMode",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_borrowRate",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
indexed: true,
2020-08-07 17:29:13 +00:00
internalType: "uint16",
name: "_referral",
type: "uint16"
2020-06-03 10:23:21 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_timestamp",
type: "uint256"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
name: "Borrow",
type: "event"
2020-06-03 10:23:21 +00:00
},
{
anonymous: false,
inputs: [
{
indexed: true,
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_reserve",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
indexed: true,
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_user",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_amount",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
indexed: true,
2020-08-07 17:29:13 +00:00
internalType: "uint16",
name: "_referral",
type: "uint16"
2020-06-03 10:23:21 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_timestamp",
type: "uint256"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
name: "Deposit",
type: "event"
2020-06-03 10:23:21 +00:00
},
{
anonymous: false,
inputs: [
{
indexed: true,
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_target",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
indexed: true,
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_reserve",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_amount",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_totalFee",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_protocolFee",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_timestamp",
type: "uint256"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
name: "FlashLoan",
type: "event"
2020-06-03 10:23:21 +00:00
},
{
anonymous: false,
inputs: [
{
indexed: true,
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_collateral",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
indexed: true,
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_reserve",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
indexed: true,
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_user",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_purchaseAmount",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_liquidatedCollateralAmount",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_accruedBorrowInterest",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_liquidator",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "bool",
name: "_receiveAToken",
type: "bool"
2020-06-03 10:23:21 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_timestamp",
type: "uint256"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
name: "LiquidationCall",
type: "event"
2020-06-03 10:23:21 +00:00
},
{
anonymous: false,
inputs: [
{
indexed: true,
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_collateral",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
indexed: true,
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_reserve",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
indexed: true,
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_user",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_feeLiquidated",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_liquidatedCollateralForFee",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_timestamp",
type: "uint256"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
name: "OriginationFeeLiquidated",
type: "event"
2020-06-03 10:23:21 +00:00
},
{
anonymous: false,
inputs: [
{
indexed: true,
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_reserve",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
indexed: true,
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_user",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_timestamp",
type: "uint256"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
name: "RebalanceStableBorrowRate",
type: "event"
2020-06-03 10:23:21 +00:00
},
{
anonymous: false,
inputs: [
{
indexed: true,
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_reserve",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
indexed: true,
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_user",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_amount",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_timestamp",
type: "uint256"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
name: "RedeemUnderlying",
type: "event"
2020-06-03 10:23:21 +00:00
},
{
anonymous: false,
inputs: [
{
indexed: true,
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_reserve",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
indexed: true,
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_user",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
indexed: true,
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_repayer",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_amount",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_timestamp",
type: "uint256"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
name: "Repay",
type: "event"
2020-06-03 10:23:21 +00:00
},
{
anonymous: false,
inputs: [
{
indexed: true,
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_reserve",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
indexed: true,
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_user",
type: "address"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
name: "ReserveUsedAsCollateralDisabled",
type: "event"
2020-06-03 10:23:21 +00:00
},
{
anonymous: false,
inputs: [
{
indexed: true,
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_reserve",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
indexed: true,
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_user",
type: "address"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
name: "ReserveUsedAsCollateralEnabled",
type: "event"
2020-06-03 10:23:21 +00:00
},
{
anonymous: false,
inputs: [
{
indexed: true,
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_reserve",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
indexed: true,
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_user",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
indexed: false,
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_timestamp",
type: "uint256"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
name: "Swap",
type: "event"
2020-06-03 10:23:21 +00:00
},
{
inputs: [],
2020-08-07 17:29:13 +00:00
name: "LENDINGPOOL_REVISION",
2020-06-03 10:23:21 +00:00
outputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "",
type: "uint256"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
stateMutability: "view",
type: "function"
2020-06-03 10:23:21 +00:00
},
{
inputs: [],
2020-08-07 17:29:13 +00:00
name: "UINT_MAX_VALUE",
2020-06-03 10:23:21 +00:00
outputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "",
type: "uint256"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
stateMutability: "view",
type: "function"
2020-06-03 10:23:21 +00:00
},
{
inputs: [],
2020-08-07 17:29:13 +00:00
name: "addressesProvider",
2020-06-03 10:23:21 +00:00
outputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "contract LendingPoolAddressesProvider",
name: "",
type: "address"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
stateMutability: "view",
type: "function"
2020-06-03 10:23:21 +00:00
},
2020-06-20 23:40:03 +00:00
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_reserve",
type: "address"
2020-06-20 23:40:03 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_user",
type: "address"
2020-06-20 23:40:03 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_amount",
type: "uint256"
}
2020-06-20 23:40:03 +00:00
],
2020-08-07 17:29:13 +00:00
name: "balanceDecreaseAllowed",
2020-06-20 23:40:03 +00:00
outputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "bool",
name: "",
type: "bool"
}
2020-06-20 23:40:03 +00:00
],
2020-08-07 17:29:13 +00:00
stateMutability: "view",
type: "function"
2020-06-20 23:40:03 +00:00
},
2020-06-03 10:23:21 +00:00
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_reserve",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_amount",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_interestRateMode",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint16",
name: "_referralCode",
type: "uint16"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
name: "borrow",
2020-06-03 10:23:21 +00:00
outputs: [],
2020-08-07 17:29:13 +00:00
stateMutability: "nonpayable",
type: "function"
2020-06-03 10:23:21 +00:00
},
{
2020-06-20 23:40:03 +00:00
inputs: [
2020-06-03 10:23:21 +00:00
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_reserve",
type: "address"
2020-06-20 23:40:03 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_amount",
type: "uint256"
2020-06-20 23:40:03 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint16",
name: "_referralCode",
type: "uint16"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
name: "deposit",
2020-06-20 23:40:03 +00:00
outputs: [],
2020-08-07 17:29:13 +00:00
stateMutability: "payable",
type: "function"
2020-06-03 10:23:21 +00:00
},
{
2020-06-20 23:40:03 +00:00
inputs: [
2020-06-03 10:23:21 +00:00
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_receiver",
type: "address"
2020-07-13 08:54:08 +00:00
},
2020-06-03 10:23:21 +00:00
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_reserve",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_amount",
type: "uint256"
2020-06-20 23:40:03 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "bytes",
name: "_params",
type: "bytes"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
name: "flashLoan",
2020-06-03 10:23:21 +00:00
outputs: [],
2020-08-07 17:29:13 +00:00
stateMutability: "nonpayable",
type: "function"
2020-06-03 10:23:21 +00:00
},
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_reserve",
type: "address"
}
2020-07-23 15:18:06 +00:00
],
2020-08-07 17:29:13 +00:00
name: "getConfiguration",
2020-07-23 15:18:06 +00:00
outputs: [
2020-06-03 10:23:21 +00:00
{
2020-07-23 15:18:06 +00:00
components: [
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "data",
type: "uint256"
}
2020-07-23 15:18:06 +00:00
],
2020-08-07 17:29:13 +00:00
internalType: "struct ReserveConfiguration.Map",
name: "",
type: "tuple"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
stateMutability: "view",
type: "function"
2020-06-03 10:23:21 +00:00
},
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_reserve",
type: "address"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
name: "getReserveConfigurationData",
2020-06-03 10:23:21 +00:00
outputs: [
2020-07-08 15:26:50 +00:00
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "decimals",
type: "uint256"
2020-07-08 15:26:50 +00:00
},
2020-06-03 10:23:21 +00:00
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "ltv",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "liquidationThreshold",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "liquidationBonus",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "interestRateStrategyAddress",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "bool",
name: "usageAsCollateralEnabled",
type: "bool"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "bool",
name: "borrowingEnabled",
type: "bool"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "bool",
name: "stableBorrowRateEnabled",
type: "bool"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "bool",
name: "isActive",
type: "bool"
2020-06-27 02:13:32 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "bool",
name: "isFreezed",
type: "bool"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
stateMutability: "view",
type: "function"
2020-06-03 10:23:21 +00:00
},
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_reserve",
type: "address"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
name: "getReserveData",
2020-06-03 10:23:21 +00:00
outputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "availableLiquidity",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "totalBorrowsStable",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "totalBorrowsVariable",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "liquidityRate",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "variableBorrowRate",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "stableBorrowRate",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "averageStableBorrowRate",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "liquidityIndex",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "variableBorrowIndex",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint40",
name: "lastUpdateTimestamp",
type: "uint40"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
stateMutability: "view",
type: "function"
2020-06-03 10:23:21 +00:00
},
2020-06-20 23:40:03 +00:00
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_reserve",
type: "address"
}
2020-06-20 23:40:03 +00:00
],
2020-08-07 17:29:13 +00:00
name: "getReserveNormalizedIncome",
2020-06-20 23:40:03 +00:00
outputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "",
type: "uint256"
}
2020-06-20 23:40:03 +00:00
],
2020-08-07 17:29:13 +00:00
stateMutability: "view",
type: "function"
2020-06-20 23:40:03 +00:00
},
2020-06-30 12:09:28 +00:00
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_reserve",
type: "address"
}
2020-06-30 12:09:28 +00:00
],
2020-08-07 17:29:13 +00:00
name: "getReserveNormalizedVariableDebt",
2020-06-30 12:09:28 +00:00
outputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "",
type: "uint256"
}
2020-06-30 12:09:28 +00:00
],
2020-08-07 17:29:13 +00:00
stateMutability: "view",
type: "function"
2020-06-30 12:09:28 +00:00
},
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_reserve",
type: "address"
}
],
2020-08-07 17:29:13 +00:00
name: "getReserveTokensAddresses",
outputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "aTokenAddress",
type: "address"
},
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "stableDebtTokenAddress",
type: "address"
},
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "variableDebtTokenAddress",
type: "address"
}
],
2020-08-07 17:29:13 +00:00
stateMutability: "view",
type: "function"
},
2020-06-03 10:23:21 +00:00
{
inputs: [],
2020-08-07 17:29:13 +00:00
name: "getReserves",
2020-06-03 10:23:21 +00:00
outputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address[]",
name: "",
type: "address[]"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
stateMutability: "view",
type: "function"
2020-06-03 10:23:21 +00:00
},
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_user",
type: "address"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
name: "getUserAccountData",
2020-06-03 10:23:21 +00:00
outputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "totalCollateralETH",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "totalBorrowsETH",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "availableBorrowsETH",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "currentLiquidationThreshold",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "ltv",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "healthFactor",
type: "uint256"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
stateMutability: "view",
type: "function"
2020-06-03 10:23:21 +00:00
},
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_reserve",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_user",
type: "address"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
name: "getUserReserveData",
2020-06-03 10:23:21 +00:00
outputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "currentATokenBalance",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "currentStableDebt",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "currentVariableDebt",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "principalStableDebt",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "principalVariableDebt",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "stableBorrowRate",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "liquidityRate",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "variableBorrowIndex",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
2020-07-03 21:20:02 +00:00
{
2020-08-07 17:29:13 +00:00
internalType: "uint40",
name: "stableRateLastUpdated",
type: "uint40"
2020-07-03 21:20:02 +00:00
},
2020-06-03 10:23:21 +00:00
{
2020-08-07 17:29:13 +00:00
internalType: "bool",
name: "usageAsCollateralEnabled",
type: "bool"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
stateMutability: "view",
type: "function"
2020-06-03 10:23:21 +00:00
},
2020-06-20 23:40:03 +00:00
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_reserve",
type: "address"
2020-06-20 23:40:03 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_aTokenAddress",
type: "address"
2020-06-20 23:40:03 +00:00
},
2020-06-30 12:09:28 +00:00
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_stableDebtAddress",
type: "address"
2020-06-30 12:09:28 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_variableDebtAddress",
type: "address"
2020-06-30 12:09:28 +00:00
},
2020-06-20 23:40:03 +00:00
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_interestRateStrategyAddress",
type: "address"
}
2020-06-20 23:40:03 +00:00
],
2020-08-07 17:29:13 +00:00
name: "initReserve",
2020-06-20 23:40:03 +00:00
outputs: [],
2020-08-07 17:29:13 +00:00
stateMutability: "nonpayable",
type: "function"
2020-06-20 23:40:03 +00:00
},
2020-06-03 10:23:21 +00:00
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "contract LendingPoolAddressesProvider",
name: "_addressesProvider",
type: "address"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
name: "initialize",
2020-06-03 10:23:21 +00:00
outputs: [],
2020-08-07 17:29:13 +00:00
stateMutability: "nonpayable",
type: "function"
2020-06-03 10:23:21 +00:00
},
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_collateral",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_reserve",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_user",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_purchaseAmount",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "bool",
name: "_receiveAToken",
type: "bool"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
name: "liquidationCall",
2020-06-03 10:23:21 +00:00
outputs: [],
2020-08-07 17:29:13 +00:00
stateMutability: "payable",
type: "function"
2020-06-03 10:23:21 +00:00
},
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_reserve",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_user",
type: "address"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
name: "rebalanceStableBorrowRate",
2020-06-03 10:23:21 +00:00
outputs: [],
2020-08-07 17:29:13 +00:00
stateMutability: "nonpayable",
type: "function"
2020-06-03 10:23:21 +00:00
},
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_reserve",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "address payable",
name: "_user",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_amount",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_aTokenBalanceAfterRedeem",
type: "uint256"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
name: "redeemUnderlying",
2020-06-03 10:23:21 +00:00
outputs: [],
2020-08-07 17:29:13 +00:00
stateMutability: "nonpayable",
type: "function"
2020-06-03 10:23:21 +00:00
},
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_reserve",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_amount",
type: "uint256"
2020-06-03 10:23:21 +00:00
},
2020-06-30 12:09:28 +00:00
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_rateMode",
type: "uint256"
2020-06-30 12:09:28 +00:00
},
2020-06-03 10:23:21 +00:00
{
2020-08-07 17:29:13 +00:00
internalType: "address payable",
name: "_onBehalfOf",
type: "address"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
name: "repay",
2020-06-03 10:23:21 +00:00
outputs: [],
2020-08-07 17:29:13 +00:00
stateMutability: "payable",
type: "function"
2020-06-03 10:23:21 +00:00
},
2020-06-20 23:40:03 +00:00
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "",
type: "uint256"
}
2020-06-20 23:40:03 +00:00
],
2020-08-07 17:29:13 +00:00
name: "reservesList",
2020-06-20 23:40:03 +00:00
outputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "",
type: "address"
}
2020-06-20 23:40:03 +00:00
],
2020-08-07 17:29:13 +00:00
stateMutability: "view",
type: "function"
2020-06-20 23:40:03 +00:00
},
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_reserve",
type: "address"
2020-06-20 23:40:03 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_configuration",
type: "uint256"
}
2020-06-20 23:40:03 +00:00
],
2020-08-07 17:29:13 +00:00
name: "setConfiguration",
2020-06-20 23:40:03 +00:00
outputs: [],
2020-08-07 17:29:13 +00:00
stateMutability: "nonpayable",
type: "function"
2020-06-20 23:40:03 +00:00
},
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_reserve",
type: "address"
2020-06-20 23:40:03 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_rateStrategyAddress",
type: "address"
}
2020-06-20 23:40:03 +00:00
],
2020-08-07 17:29:13 +00:00
name: "setReserveInterestRateStrategyAddress",
2020-06-20 23:40:03 +00:00
outputs: [],
2020-08-07 17:29:13 +00:00
stateMutability: "nonpayable",
type: "function"
2020-06-20 23:40:03 +00:00
},
2020-06-03 10:23:21 +00:00
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_reserve",
type: "address"
2020-06-03 10:23:21 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "bool",
name: "_useAsCollateral",
type: "bool"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
name: "setUserUseReserveAsCollateral",
2020-06-03 10:23:21 +00:00
outputs: [],
2020-08-07 17:29:13 +00:00
stateMutability: "nonpayable",
type: "function"
2020-06-03 10:23:21 +00:00
},
{
inputs: [
{
2020-08-07 17:29:13 +00:00
internalType: "address",
name: "_reserve",
type: "address"
2020-07-07 10:07:31 +00:00
},
{
2020-08-07 17:29:13 +00:00
internalType: "uint256",
name: "_rateMode",
type: "uint256"
}
2020-06-03 10:23:21 +00:00
],
2020-08-07 17:29:13 +00:00
name: "swapBorrowRateMode",
2020-06-03 10:23:21 +00:00
outputs: [],
2020-08-07 17:29:13 +00:00
stateMutability: "nonpayable",
type: "function"
2020-06-20 23:40:03 +00:00
},
{
2020-08-07 17:29:13 +00:00
stateMutability: "payable",
type: "receive"
}
2020-06-03 10:23:21 +00:00
];
const _bytecode =
2020-08-07 17:29:13 +00:00
"0x6080604052600060015534801561001557600080fd5b506001600055614f7c8061002a6000396000f3fe60806040526004361061019f5760003560e01c80638afaff02116100ec578063c72c4d101161008a578063d0fc81d211610064578063d0fc81d21461051c578063d15e005314610531578063d2493b6c14610551578063d2d0e06614610580576101d4565b8063c72c4d10146104c7578063c858f5f9146104dc578063cd112382146104fc576101d4565b8063b8d29276116100c6578063b8d2927614610428578063bf92857c14610448578063c44b11f71461047a578063c4d66de8146104a7576101d4565b80638afaff02146103d357806394ba89a2146103e85780639895e3d814610408576101d4565b80633e150141116101595780635a3b74b9116101335780635a3b74b9146103465780635cffe9de1461036657806376e9d615146103865780637a708e92146103b3576101d4565b80633e150141146102d05780634fe7a6e514610306578063573ade8114610333576101d4565b8062a718a9146101d95780630902f1ac146101ec5780631d2118f91461021757806328dd2d011461023757806335ea6a751461026d578063386497fd146102a3576101d4565b366101d4576101ad33610593565b6101d25760405162461bcd60e51b81526004016101c990614a7e565b60405180910390fd5b005b600080fd5b6101d26101e73660046140cb565b6105d1565b3480156101f857600080fd5b506102016107a3565b60405161020e91906146fd565b60405180910390f35b34801561022357600080fd5b506101d2610232366004613fde565b610805565b34801561024357600080fd5b50610257610252366004613fde565b6108d8565b60405161020e9a99989796959493929190614e50565b34801561027957600080fd5b5061028d610288366004613fa6565b610bac565b60405161020e9a99989796959493929190614e04565b3480156102af57600080fd5b506102c36102be366004613fa6565b610e34565b60405161020e9190614d4a565b3480156102dc57600080fd5b506102f06102eb366004613fa6565b610e5b565b60405161020e9a99989796959493929190614d84565b34801561031257600080fd5b50610326610321366004614357565b610f31565b60405161020e919061452b565b6101d26103413660046142ae565b610f58565b34801561035257600080fd5b506101d261036136600461420f565b611299565b34801561037257600080fd5b506101d2610381366004614164565b61146b565b34801561039257600080fd5b506103a66103a1366004614124565b6118cf565b60405161020e919061474a565b3480156103bf57600080fd5b506101d26103ce36600461405b565b6119f4565b3480156103df57600080fd5b506102c3611b2d565b3480156103f457600080fd5b506101d261040336600461423c565b611b32565b34801561041457600080fd5b506101d2610423366004614016565b611e49565b34801561043457600080fd5b506101d261044336600461423c565b61200f565b34801561045457600080fd5b50610468610463366004613fa6565b6120d0565b60405161020e96959493929190614ddc565b34801561048657600080fd5b5061049a610495366004613fa6565b612292565b60405161020e9190614b6d565b3480156104b357600080fd5b506101d26104c2366004613fa6565b6122c9565b3480156104d357600080fd5b506103266123fd565b3480156104e857600080fd5b506101d26104f73660046142f7565b61240c565b34801561050857600080fd5b506101d2610517366004613fde565b61293e565b34801561052857600080fd5b506102c3612c2e565b34801561053d57600080fd5b506102c361054c366004613fa6565b612c34565b34801561055d57600080fd5b5061057161056c366004613fa6565b612c55565b60405161020e939291906145be565b6101d261058e366004614267565b612c8a565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906105c757508115155b925050505b919050565b600260005414156105f45760405162461bcd60e51b81526004016101c990614b36565b6002600090815560355460408051632c1a75cd60e11b815290516001600160a01b0390921691635834eb9a91600480820192602092909190829003018186803b15801561064057600080fd5b505afa158015610654573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106789190613fc2565b905060006060826001600160a01b031688888888886040516024016106a19594939291906145e1565b60408051601f198184030181529181526020820180516001600160e01b031662a718a960e01b179052516106d5919061450c565b600060405180830381855af49150503d8060008114610710576040519150601f19603f3d011682016040523d82523d6000602084013e610715565b606091505b5091509150816107375760405162461bcd60e51b81526004016101c99061497d565b600060608280602001905181019061074f9190614387565b9150915081600014610792578060405160200161076c919061450c565b60408051601f198184030181529082905262461bcd60e51b82526101c991600401614755565b505060016000555050505050505050565b606060398054806020026020016040519081016040528092919081815260200182805480156107fb57602002820191
2020-06-20 23:40:03 +00:00
export interface LendingPoolLibraryAddresses {
2020-08-07 17:29:13 +00:00
["__$69254465eb8f179ea24caa73cf68b23524$__"]: string;
["__$5e6137a1b5a0a366e2874209b5abf71c10$__"]: string;
["__$7347ff53b2b46c21e26a37164ae7f6739f$__"]: string;
2020-06-20 23:40:03 +00:00
}