"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AgaveLendingPoolProvider__factory = void 0;
const ethers_1 = require("ethers");
const _abi = [
    {
        type: 'event',
        name: 'Borrow',
        inputs: [
            {
                type: 'address',
                name: 'reserve',
                internalType: 'address',
                indexed: true,
            },
            {
                type: 'address',
                name: 'user',
                internalType: 'address',
                indexed: false,
            },
            {
                type: 'address',
                name: 'onBehalfOf',
                internalType: 'address',
                indexed: true,
            },
            {
                type: 'uint256',
                name: 'amount',
                internalType: 'uint256',
                indexed: false,
            },
            {
                type: 'uint256',
                name: 'borrowRateMode',
                internalType: 'uint256',
                indexed: false,
            },
            {
                type: 'uint256',
                name: 'borrowRate',
                internalType: 'uint256',
                indexed: false,
            },
            {
                type: 'uint16',
                name: 'referral',
                internalType: 'uint16',
                indexed: true,
            },
        ],
        anonymous: false,
    },
    {
        type: 'event',
        name: 'Deposit',
        inputs: [
            {
                type: 'address',
                name: 'reserve',
                internalType: 'address',
                indexed: true,
            },
            {
                type: 'address',
                name: 'user',
                internalType: 'address',
                indexed: false,
            },
            {
                type: 'address',
                name: 'onBehalfOf',
                internalType: 'address',
                indexed: true,
            },
            {
                type: 'uint256',
                name: 'amount',
                internalType: 'uint256',
                indexed: false,
            },
            {
                type: 'uint16',
                name: 'referral',
                internalType: 'uint16',
                indexed: true,
            },
        ],
        anonymous: false,
    },
    {
        type: 'event',
        name: 'FlashLoan',
        inputs: [
            {
                type: 'address',
                name: 'target',
                internalType: 'address',
                indexed: true,
            },
            {
                type: 'address',
                name: 'initiator',
                internalType: 'address',
                indexed: true,
            },
            {
                type: 'address',
                name: 'asset',
                internalType: 'address',
                indexed: true,
            },
            {
                type: 'uint256',
                name: 'amount',
                internalType: 'uint256',
                indexed: false,
            },
            {
                type: 'uint256',
                name: 'premium',
                internalType: 'uint256',
                indexed: false,
            },
            {
                type: 'uint16',
                name: 'referralCode',
                internalType: 'uint16',
                indexed: false,
            },
        ],
        anonymous: false,
    },
    {
        type: 'event',
        name: 'LiquidationCall',
        inputs: [
            {
                type: 'address',
                name: 'collateralAsset',
                internalType: 'address',
                indexed: true,
            },
            {
                type: 'address',
                name: 'debtAsset',
                internalType: 'address',
                indexed: true,
            },
            {
                type: 'address',
                name: 'user',
                internalType: 'address',
                indexed: true,
            },
            {
                type: 'uint256',
                name: 'debtToCover',
                internalType: 'uint256',
                indexed: false,
            },
            {
                type: 'uint256',
                name: 'liquidatedCollateralAmount',
                internalType: 'uint256',
                indexed: false,
            },
            {
                type: 'address',
                name: 'liquidator',
                internalType: 'address',
                indexed: false,
            },
            {
                type: 'bool',
                name: 'receiveAToken',
                internalType: 'bool',
                indexed: false,
            },
        ],
        anonymous: false,
    },
    {
        type: 'event',
        name: 'Paused',
        inputs: [],
        anonymous: false,
    },
    {
        type: 'event',
        name: 'RebalanceStableBorrowRate',
        inputs: [
            {
                type: 'address',
                name: 'reserve',
                internalType: 'address',
                indexed: true,
            },
            {
                type: 'address',
                name: 'user',
                internalType: 'address',
                indexed: true,
            },
        ],
        anonymous: false,
    },
    {
        type: 'event',
        name: 'Repay',
        inputs: [
            {
                type: 'address',
                name: 'reserve',
                internalType: 'address',
                indexed: true,
            },
            {
                type: 'address',
                name: 'user',
                internalType: 'address',
                indexed: true,
            },
            {
                type: 'address',
                name: 'repayer',
                internalType: 'address',
                indexed: true,
            },
            {
                type: 'uint256',
                name: 'amount',
                internalType: 'uint256',
                indexed: false,
            },
        ],
        anonymous: false,
    },
    {
        type: 'event',
        name: 'ReserveDataUpdated',
        inputs: [
            {
                type: 'address',
                name: 'reserve',
                internalType: 'address',
                indexed: true,
            },
            {
                type: 'uint256',
                name: 'liquidityRate',
                internalType: 'uint256',
                indexed: false,
            },
            {
                type: 'uint256',
                name: 'stableBorrowRate',
                internalType: 'uint256',
                indexed: false,
            },
            {
                type: 'uint256',
                name: 'variableBorrowRate',
                internalType: 'uint256',
                indexed: false,
            },
            {
                type: 'uint256',
                name: 'liquidityIndex',
                internalType: 'uint256',
                indexed: false,
            },
            {
                type: 'uint256',
                name: 'variableBorrowIndex',
                internalType: 'uint256',
                indexed: false,
            },
        ],
        anonymous: false,
    },
    {
        type: 'event',
        name: 'ReserveUsedAsCollateralDisabled',
        inputs: [
            {
                type: 'address',
                name: 'reserve',
                internalType: 'address',
                indexed: true,
            },
            {
                type: 'address',
                name: 'user',
                internalType: 'address',
                indexed: true,
            },
        ],
        anonymous: false,
    },
    {
        type: 'event',
        name: 'ReserveUsedAsCollateralEnabled',
        inputs: [
            {
                type: 'address',
                name: 'reserve',
                internalType: 'address',
                indexed: true,
            },
            {
                type: 'address',
                name: 'user',
                internalType: 'address',
                indexed: true,
            },
        ],
        anonymous: false,
    },
    {
        type: 'event',
        name: 'Swap',
        inputs: [
            {
                type: 'address',
                name: 'reserve',
                internalType: 'address',
                indexed: true,
            },
            {
                type: 'address',
                name: 'user',
                internalType: 'address',
                indexed: true,
            },
            {
                type: 'uint256',
                name: 'rateMode',
                internalType: 'uint256',
                indexed: false,
            },
        ],
        anonymous: false,
    },
    {
        type: 'event',
        name: 'Unpaused',
        inputs: [],
        anonymous: false,
    },
    {
        type: 'event',
        name: 'Withdraw',
        inputs: [
            {
                type: 'address',
                name: 'reserve',
                internalType: 'address',
                indexed: true,
            },
            {
                type: 'address',
                name: 'user',
                internalType: 'address',
                indexed: true,
            },
            {
                type: 'address',
                name: 'to',
                internalType: 'address',
                indexed: true,
            },
            {
                type: 'uint256',
                name: 'amount',
                internalType: 'uint256',
                indexed: false,
            },
        ],
        anonymous: false,
    },
    {
        type: 'function',
        stateMutability: 'view',
        outputs: [
            {
                type: 'uint256',
                name: '',
                internalType: 'uint256',
            },
        ],
        name: 'FLASHLOAN_PREMIUM_TOTAL',
        inputs: [],
    },
    {
        type: 'function',
        stateMutability: 'view',
        outputs: [
            {
                type: 'uint256',
                name: '',
                internalType: 'uint256',
            },
        ],
        name: 'LENDINGPOOL_REVISION',
        inputs: [],
    },
    {
        type: 'function',
        stateMutability: 'view',
        outputs: [
            {
                type: 'uint256',
                name: '',
                internalType: 'uint256',
            },
        ],
        name: 'MAX_NUMBER_RESERVES',
        inputs: [],
    },
    {
        type: 'function',
        stateMutability: 'view',
        outputs: [
            {
                type: 'uint256',
                name: '',
                internalType: 'uint256',
            },
        ],
        name: 'MAX_STABLE_RATE_BORROW_SIZE_PERCENT',
        inputs: [],
    },
    {
        type: 'function',
        stateMutability: 'nonpayable',
        outputs: [],
        name: 'borrow',
        inputs: [
            {
                type: 'address',
                name: 'asset',
                internalType: 'address',
            },
            {
                type: 'uint256',
                name: 'amount',
                internalType: 'uint256',
            },
            {
                type: 'uint256',
                name: 'interestRateMode',
                internalType: 'uint256',
            },
            {
                type: 'uint16',
                name: 'referralCode',
                internalType: 'uint16',
            },
            {
                type: 'address',
                name: 'onBehalfOf',
                internalType: 'address',
            },
        ],
    },
    {
        type: 'function',
        stateMutability: 'nonpayable',
        outputs: [],
        name: 'deposit',
        inputs: [
            {
                type: 'address',
                name: 'asset',
                internalType: 'address',
            },
            {
                type: 'uint256',
                name: 'amount',
                internalType: 'uint256',
            },
            {
                type: 'address',
                name: 'onBehalfOf',
                internalType: 'address',
            },
            {
                type: 'uint16',
                name: 'referralCode',
                internalType: 'uint16',
            },
        ],
    },
    {
        type: 'function',
        stateMutability: 'nonpayable',
        outputs: [],
        name: 'finalizeTransfer',
        inputs: [
            {
                type: 'address',
                name: 'asset',
                internalType: 'address',
            },
            {
                type: 'address',
                name: 'from',
                internalType: 'address',
            },
            {
                type: 'address',
                name: 'to',
                internalType: 'address',
            },
            {
                type: 'uint256',
                name: 'amount',
                internalType: 'uint256',
            },
            {
                type: 'uint256',
                name: 'balanceFromBefore',
                internalType: 'uint256',
            },
            {
                type: 'uint256',
                name: 'balanceToBefore',
                internalType: 'uint256',
            },
        ],
    },
    {
        type: 'function',
        stateMutability: 'nonpayable',
        outputs: [],
        name: 'flashLoan',
        inputs: [
            {
                type: 'address',
                name: 'receiverAddress',
                internalType: 'address',
            },
            {
                type: 'address[]',
                name: 'assets',
                internalType: 'address[]',
            },
            {
                type: 'uint256[]',
                name: 'amounts',
                internalType: 'uint256[]',
            },
            {
                type: 'uint256[]',
                name: 'modes',
                internalType: 'uint256[]',
            },
            {
                type: 'address',
                name: 'onBehalfOf',
                internalType: 'address',
            },
            {
                type: 'bytes',
                name: 'params',
                internalType: 'bytes',
            },
            {
                type: 'uint16',
                name: 'referralCode',
                internalType: 'uint16',
            },
        ],
    },
    {
        type: 'function',
        stateMutability: 'view',
        outputs: [
            {
                type: 'address',
                name: '',
                internalType: 'contract ILendingPoolAddressesProvider',
            },
        ],
        name: 'getAddressesProvider',
        inputs: [],
    },
    {
        type: 'function',
        stateMutability: 'view',
        outputs: [
            {
                type: 'tuple',
                name: '',
                internalType: 'struct DataTypes.ReserveConfigurationMap',
                components: [
                    {
                        type: 'uint256',
                        name: 'data',
                        internalType: 'uint256',
                    },
                ],
            },
        ],
        name: 'getConfiguration',
        inputs: [
            {
                type: 'address',
                name: 'asset',
                internalType: 'address',
            },
        ],
    },
    {
        type: 'function',
        stateMutability: 'view',
        outputs: [
            {
                type: 'tuple',
                name: '',
                internalType: 'struct DataTypes.ReserveData',
                components: [
                    {
                        type: 'tuple',
                        name: 'configuration',
                        internalType: 'struct DataTypes.ReserveConfigurationMap',
                        components: [
                            {
                                type: 'uint256',
                                name: 'data',
                                internalType: 'uint256',
                            },
                        ],
                    },
                    {
                        type: 'uint128',
                        name: 'liquidityIndex',
                        internalType: 'uint128',
                    },
                    {
                        type: 'uint128',
                        name: 'variableBorrowIndex',
                        internalType: 'uint128',
                    },
                    {
                        type: 'uint128',
                        name: 'currentLiquidityRate',
                        internalType: 'uint128',
                    },
                    {
                        type: 'uint128',
                        name: 'currentVariableBorrowRate',
                        internalType: 'uint128',
                    },
                    {
                        type: 'uint128',
                        name: 'currentStableBorrowRate',
                        internalType: 'uint128',
                    },
                    {
                        type: 'uint40',
                        name: 'lastUpdateTimestamp',
                        internalType: 'uint40',
                    },
                    {
                        type: 'address',
                        name: 'aTokenAddress',
                        internalType: 'address',
                    },
                    {
                        type: 'address',
                        name: 'stableDebtTokenAddress',
                        internalType: 'address',
                    },
                    {
                        type: 'address',
                        name: 'variableDebtTokenAddress',
                        internalType: 'address',
                    },
                    {
                        type: 'address',
                        name: 'interestRateStrategyAddress',
                        internalType: 'address',
                    },
                    {
                        type: 'uint8',
                        name: 'id',
                        internalType: 'uint8',
                    },
                ],
            },
        ],
        name: 'getReserveData',
        inputs: [
            {
                type: 'address',
                name: 'asset',
                internalType: 'address',
            },
        ],
    },
    {
        type: 'function',
        stateMutability: 'view',
        outputs: [
            {
                type: 'uint256',
                name: '',
                internalType: 'uint256',
            },
        ],
        name: 'getReserveNormalizedIncome',
        inputs: [
            {
                type: 'address',
                name: 'asset',
                internalType: 'address',
            },
        ],
    },
    {
        type: 'function',
        stateMutability: 'view',
        outputs: [
            {
                type: 'uint256',
                name: '',
                internalType: 'uint256',
            },
        ],
        name: 'getReserveNormalizedVariableDebt',
        inputs: [
            {
                type: 'address',
                name: 'asset',
                internalType: 'address',
            },
        ],
    },
    {
        type: 'function',
        stateMutability: 'view',
        outputs: [
            {
                type: 'address[]',
                name: '',
                internalType: 'address[]',
            },
        ],
        name: 'getReservesList',
        inputs: [],
    },
    {
        type: 'function',
        stateMutability: 'view',
        outputs: [
            {
                type: 'uint256',
                name: 'totalCollateralETH',
                internalType: 'uint256',
            },
            {
                type: 'uint256',
                name: 'totalDebtETH',
                internalType: 'uint256',
            },
            {
                type: 'uint256',
                name: 'availableBorrowsETH',
                internalType: 'uint256',
            },
            {
                type: 'uint256',
                name: 'currentLiquidationThreshold',
                internalType: 'uint256',
            },
            {
                type: 'uint256',
                name: 'ltv',
                internalType: 'uint256',
            },
            {
                type: 'uint256',
                name: 'healthFactor',
                internalType: 'uint256',
            },
        ],
        name: 'getUserAccountData',
        inputs: [
            {
                type: 'address',
                name: 'user',
                internalType: 'address',
            },
        ],
    },
    {
        type: 'function',
        stateMutability: 'view',
        outputs: [
            {
                type: 'tuple',
                name: '',
                internalType: 'struct DataTypes.UserConfigurationMap',
                components: [
                    {
                        type: 'uint256',
                        name: 'data',
                        internalType: 'uint256',
                    },
                ],
            },
        ],
        name: 'getUserConfiguration',
        inputs: [
            {
                type: 'address',
                name: 'user',
                internalType: 'address',
            },
        ],
    },
    {
        type: 'function',
        stateMutability: 'nonpayable',
        outputs: [],
        name: 'initReserve',
        inputs: [
            {
                type: 'address',
                name: 'asset',
                internalType: 'address',
            },
            {
                type: 'address',
                name: 'aTokenAddress',
                internalType: 'address',
            },
            {
                type: 'address',
                name: 'stableDebtAddress',
                internalType: 'address',
            },
            {
                type: 'address',
                name: 'variableDebtAddress',
                internalType: 'address',
            },
            {
                type: 'address',
                name: 'interestRateStrategyAddress',
                internalType: 'address',
            },
        ],
    },
    {
        type: 'function',
        stateMutability: 'nonpayable',
        outputs: [],
        name: 'initialize',
        inputs: [
            {
                type: 'address',
                name: 'provider',
                internalType: 'contract ILendingPoolAddressesProvider',
            },
        ],
    },
    {
        type: 'function',
        stateMutability: 'nonpayable',
        outputs: [],
        name: 'liquidationCall',
        inputs: [
            {
                type: 'address',
                name: 'collateralAsset',
                internalType: 'address',
            },
            {
                type: 'address',
                name: 'debtAsset',
                internalType: 'address',
            },
            {
                type: 'address',
                name: 'user',
                internalType: 'address',
            },
            {
                type: 'uint256',
                name: 'debtToCover',
                internalType: 'uint256',
            },
            {
                type: 'bool',
                name: 'receiveAToken',
                internalType: 'bool',
            },
        ],
    },
    {
        type: 'function',
        stateMutability: 'view',
        outputs: [
            {
                type: 'bool',
                name: '',
                internalType: 'bool',
            },
        ],
        name: 'paused',
        inputs: [],
    },
    {
        type: 'function',
        stateMutability: 'nonpayable',
        outputs: [],
        name: 'rebalanceStableBorrowRate',
        inputs: [
            {
                type: 'address',
                name: 'asset',
                internalType: 'address',
            },
            {
                type: 'address',
                name: 'user',
                internalType: 'address',
            },
        ],
    },
    {
        type: 'function',
        stateMutability: 'nonpayable',
        outputs: [
            {
                type: 'uint256',
                name: '',
                internalType: 'uint256',
            },
        ],
        name: 'repay',
        inputs: [
            {
                type: 'address',
                name: 'asset',
                internalType: 'address',
            },
            {
                type: 'uint256',
                name: 'amount',
                internalType: 'uint256',
            },
            {
                type: 'uint256',
                name: 'rateMode',
                internalType: 'uint256',
            },
            {
                type: 'address',
                name: 'onBehalfOf',
                internalType: 'address',
            },
        ],
    },
    {
        type: 'function',
        stateMutability: 'nonpayable',
        outputs: [],
        name: 'setConfiguration',
        inputs: [
            {
                type: 'address',
                name: 'asset',
                internalType: 'address',
            },
            {
                type: 'uint256',
                name: 'configuration',
                internalType: 'uint256',
            },
        ],
    },
    {
        type: 'function',
        stateMutability: 'nonpayable',
        outputs: [],
        name: 'setPause',
        inputs: [
            {
                type: 'bool',
                name: 'val',
                internalType: 'bool',
            },
        ],
    },
    {
        type: 'function',
        stateMutability: 'nonpayable',
        outputs: [],
        name: 'setReserveInterestRateStrategyAddress',
        inputs: [
            {
                type: 'address',
                name: 'asset',
                internalType: 'address',
            },
            {
                type: 'address',
                name: 'rateStrategyAddress',
                internalType: 'address',
            },
        ],
    },
    {
        type: 'function',
        stateMutability: 'nonpayable',
        outputs: [],
        name: 'setUserUseReserveAsCollateral',
        inputs: [
            {
                type: 'address',
                name: 'asset',
                internalType: 'address',
            },
            {
                type: 'bool',
                name: 'useAsCollateral',
                internalType: 'bool',
            },
        ],
    },
    {
        type: 'function',
        stateMutability: 'nonpayable',
        outputs: [],
        name: 'swapBorrowRateMode',
        inputs: [
            {
                type: 'address',
                name: 'asset',
                internalType: 'address',
            },
            {
                type: 'uint256',
                name: 'rateMode',
                internalType: 'uint256',
            },
        ],
    },
    {
        type: 'function',
        stateMutability: 'nonpayable',
        outputs: [
            {
                type: 'uint256',
                name: '',
                internalType: 'uint256',
            },
        ],
        name: 'withdraw',
        inputs: [
            {
                type: 'address',
                name: 'asset',
                internalType: 'address',
            },
            {
                type: 'uint256',
                name: 'amount',
                internalType: 'uint256',
            },
            {
                type: 'address',
                name: 'to',
                internalType: 'address',
            },
        ],
    },
];
class AgaveLendingPoolProvider__factory {
    static createInterface() {
        return new ethers_1.utils.Interface(_abi);
    }
    static connect(address, signerOrProvider) {
        return new ethers_1.Contract(address, _abi, signerOrProvider);
    }
}
exports.AgaveLendingPoolProvider__factory = AgaveLendingPoolProvider__factory;
AgaveLendingPoolProvider__factory.abi = _abi;
//# sourceMappingURL=AgaveLendingPoolProvider__factory.js.map