"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Previewer__factory = void 0;
const ethers_1 = require("ethers");
const _abi = [
    {
        inputs: [
            {
                internalType: 'contract Auditor',
                name: 'auditor_',
                type: 'address',
            },
            {
                internalType: 'contract IPriceFeed',
                name: 'basePriceFeed_',
                type: 'address',
            },
        ],
        stateMutability: 'nonpayable',
        type: 'constructor',
    },
    {
        inputs: [],
        name: 'AlreadyMatured',
        type: 'error',
    },
    {
        inputs: [],
        name: 'auditor',
        outputs: [
            {
                internalType: 'contract Auditor',
                name: '',
                type: 'address',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'basePriceFeed',
        outputs: [
            {
                internalType: 'contract IPriceFeed',
                name: '',
                type: 'address',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: 'account',
                type: 'address',
            },
        ],
        name: 'exactly',
        outputs: [
            {
                components: [
                    {
                        internalType: 'contract Market',
                        name: 'market',
                        type: 'address',
                    },
                    {
                        internalType: 'string',
                        name: 'symbol',
                        type: 'string',
                    },
                    {
                        internalType: 'uint8',
                        name: 'decimals',
                        type: 'uint8',
                    },
                    {
                        internalType: 'address',
                        name: 'asset',
                        type: 'address',
                    },
                    {
                        internalType: 'string',
                        name: 'assetName',
                        type: 'string',
                    },
                    {
                        internalType: 'string',
                        name: 'assetSymbol',
                        type: 'string',
                    },
                    {
                        components: [
                            {
                                internalType: 'address',
                                name: 'id',
                                type: 'address',
                            },
                            {
                                internalType: 'uint256',
                                name: 'fixedCurveA',
                                type: 'uint256',
                            },
                            {
                                internalType: 'int256',
                                name: 'fixedCurveB',
                                type: 'int256',
                            },
                            {
                                internalType: 'uint256',
                                name: 'fixedMaxUtilization',
                                type: 'uint256',
                            },
                            {
                                internalType: 'uint256',
                                name: 'floatingCurveA',
                                type: 'uint256',
                            },
                            {
                                internalType: 'int256',
                                name: 'floatingCurveB',
                                type: 'int256',
                            },
                            {
                                internalType: 'uint256',
                                name: 'floatingMaxUtilization',
                                type: 'uint256',
                            },
                        ],
                        internalType: 'struct Previewer.InterestRateModel',
                        name: 'interestRateModel',
                        type: 'tuple',
                    },
                    {
                        internalType: 'uint256',
                        name: 'usdPrice',
                        type: 'uint256',
                    },
                    {
                        internalType: 'uint256',
                        name: 'penaltyRate',
                        type: 'uint256',
                    },
                    {
                        internalType: 'uint256',
                        name: 'adjustFactor',
                        type: 'uint256',
                    },
                    {
                        internalType: 'uint8',
                        name: 'maxFuturePools',
                        type: 'uint8',
                    },
                    {
                        components: [
                            {
                                internalType: 'uint256',
                                name: 'maturity',
                                type: 'uint256',
                            },
                            {
                                internalType: 'uint256',
                                name: 'borrowed',
                                type: 'uint256',
                            },
                            {
                                internalType: 'uint256',
                                name: 'supplied',
                                type: 'uint256',
                            },
                            {
                                internalType: 'uint256',
                                name: 'available',
                                type: 'uint256',
                            },
                            {
                                internalType: 'uint256',
                                name: 'utilization',
                                type: 'uint256',
                            },
                            {
                                internalType: 'uint256',
                                name: 'depositRate',
                                type: 'uint256',
                            },
                            {
                                internalType: 'uint256',
                                name: 'minBorrowRate',
                                type: 'uint256',
                            },
                            {
                                internalType: 'uint256',
                                name: 'optimalDeposit',
                                type: 'uint256',
                            },
                        ],
                        internalType: 'struct Previewer.FixedPool[]',
                        name: 'fixedPools',
                        type: 'tuple[]',
                    },
                    {
                        components: [
                            {
                                internalType: 'address',
                                name: 'asset',
                                type: 'address',
                            },
                            {
                                internalType: 'string',
                                name: 'assetName',
                                type: 'string',
                            },
                            {
                                internalType: 'string',
                                name: 'assetSymbol',
                                type: 'string',
                            },
                            {
                                internalType: 'uint256',
                                name: 'usdPrice',
                                type: 'uint256',
                            },
                            {
                                internalType: 'uint256',
                                name: 'borrow',
                                type: 'uint256',
                            },
                            {
                                internalType: 'uint256',
                                name: 'floatingDeposit',
                                type: 'uint256',
                            },
                            {
                                internalType: 'uint256[]',
                                name: 'maturities',
                                type: 'uint256[]',
                            },
                        ],
                        internalType: 'struct Previewer.RewardRate[]',
                        name: 'rewardRates',
                        type: 'tuple[]',
                    },
                    {
                        internalType: 'uint256',
                        name: 'floatingBorrowRate',
                        type: 'uint256',
                    },
                    {
                        internalType: 'uint256',
                        name: 'floatingUtilization',
                        type: 'uint256',
                    },
                    {
                        internalType: 'uint256',
                        name: 'floatingBackupBorrowed',
                        type: 'uint256',
                    },
                    {
                        internalType: 'uint256',
                        name: 'floatingAvailableAssets',
                        type: 'uint256',
                    },
                    {
                        internalType: 'uint256',
                        name: 'totalFloatingBorrowAssets',
                        type: 'uint256',
                    },
                    {
                        internalType: 'uint256',
                        name: 'totalFloatingDepositAssets',
                        type: 'uint256',
                    },
                    {
                        internalType: 'uint256',
                        name: 'totalFloatingBorrowShares',
                        type: 'uint256',
                    },
                    {
                        internalType: 'uint256',
                        name: 'totalFloatingDepositShares',
                        type: 'uint256',
                    },
                    {
                        internalType: 'bool',
                        name: 'isCollateral',
                        type: 'bool',
                    },
                    {
                        internalType: 'uint256',
                        name: 'maxBorrowAssets',
                        type: 'uint256',
                    },
                    {
                        internalType: 'uint256',
                        name: 'floatingBorrowShares',
                        type: 'uint256',
                    },
                    {
                        internalType: 'uint256',
                        name: 'floatingBorrowAssets',
                        type: 'uint256',
                    },
                    {
                        internalType: 'uint256',
                        name: 'floatingDepositShares',
                        type: 'uint256',
                    },
                    {
                        internalType: 'uint256',
                        name: 'floatingDepositAssets',
                        type: 'uint256',
                    },
                    {
                        components: [
                            {
                                internalType: 'uint256',
                                name: 'maturity',
                                type: 'uint256',
                            },
                            {
                                internalType: 'uint256',
                                name: 'previewValue',
                                type: 'uint256',
                            },
                            {
                                components: [
                                    {
                                        internalType: 'uint256',
                                        name: 'principal',
                                        type: 'uint256',
                                    },
                                    {
                                        internalType: 'uint256',
                                        name: 'fee',
                                        type: 'uint256',
                                    },
                                ],
                                internalType: 'struct FixedLib.Position',
                                name: 'position',
                                type: 'tuple',
                            },
                        ],
                        internalType: 'struct Previewer.FixedPosition[]',
                        name: 'fixedDepositPositions',
                        type: 'tuple[]',
                    },
                    {
                        components: [
                            {
                                internalType: 'uint256',
                                name: 'maturity',
                                type: 'uint256',
                            },
                            {
                                internalType: 'uint256',
                                name: 'previewValue',
                                type: 'uint256',
                            },
                            {
                                components: [
                                    {
                                        internalType: 'uint256',
                                        name: 'principal',
                                        type: 'uint256',
                                    },
                                    {
                                        internalType: 'uint256',
                                        name: 'fee',
                                        type: 'uint256',
                                    },
                                ],
                                internalType: 'struct FixedLib.Position',
                                name: 'position',
                                type: 'tuple',
                            },
                        ],
                        internalType: 'struct Previewer.FixedPosition[]',
                        name: 'fixedBorrowPositions',
                        type: 'tuple[]',
                    },
                    {
                        components: [
                            {
                                internalType: 'address',
                                name: 'asset',
                                type: 'address',
                            },
                            {
                                internalType: 'string',
                                name: 'assetName',
                                type: 'string',
                            },
                            {
                                internalType: 'string',
                                name: 'assetSymbol',
                                type: 'string',
                            },
                            {
                                internalType: 'uint256',
                                name: 'amount',
                                type: 'uint256',
                            },
                        ],
                        internalType: 'struct Previewer.ClaimableReward[]',
                        name: 'claimableRewards',
                        type: 'tuple[]',
                    },
                ],
                internalType: 'struct Previewer.MarketAccount[]',
                name: 'data',
                type: 'tuple[]',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'contract Market',
                name: 'market',
                type: 'address',
            },
            {
                internalType: 'uint256',
                name: 'assets',
                type: 'uint256',
            },
        ],
        name: 'previewBorrowAtAllMaturities',
        outputs: [
            {
                components: [
                    {
                        internalType: 'uint256',
                        name: 'maturity',
                        type: 'uint256',
                    },
                    {
                        internalType: 'uint256',
                        name: 'assets',
                        type: 'uint256',
                    },
                    {
                        internalType: 'uint256',
                        name: 'utilization',
                        type: 'uint256',
                    },
                ],
                internalType: 'struct Previewer.FixedPreview[]',
                name: 'previews',
                type: 'tuple[]',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'contract Market',
                name: 'market',
                type: 'address',
            },
            {
                internalType: 'uint256',
                name: 'maturity',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: 'assets',
                type: 'uint256',
            },
        ],
        name: 'previewBorrowAtMaturity',
        outputs: [
            {
                components: [
                    {
                        internalType: 'uint256',
                        name: 'maturity',
                        type: 'uint256',
                    },
                    {
                        internalType: 'uint256',
                        name: 'assets',
                        type: 'uint256',
                    },
                    {
                        internalType: 'uint256',
                        name: 'utilization',
                        type: 'uint256',
                    },
                ],
                internalType: 'struct Previewer.FixedPreview',
                name: '',
                type: 'tuple',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'contract Market',
                name: 'market',
                type: 'address',
            },
            {
                internalType: 'uint256',
                name: 'assets',
                type: 'uint256',
            },
        ],
        name: 'previewDepositAtAllMaturities',
        outputs: [
            {
                components: [
                    {
                        internalType: 'uint256',
                        name: 'maturity',
                        type: 'uint256',
                    },
                    {
                        internalType: 'uint256',
                        name: 'assets',
                        type: 'uint256',
                    },
                    {
                        internalType: 'uint256',
                        name: 'utilization',
                        type: 'uint256',
                    },
                ],
                internalType: 'struct Previewer.FixedPreview[]',
                name: 'previews',
                type: 'tuple[]',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'contract Market',
                name: 'market',
                type: 'address',
            },
            {
                internalType: 'uint256',
                name: 'maturity',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: 'assets',
                type: 'uint256',
            },
        ],
        name: 'previewDepositAtMaturity',
        outputs: [
            {
                components: [
                    {
                        internalType: 'uint256',
                        name: 'maturity',
                        type: 'uint256',
                    },
                    {
                        internalType: 'uint256',
                        name: 'assets',
                        type: 'uint256',
                    },
                    {
                        internalType: 'uint256',
                        name: 'utilization',
                        type: 'uint256',
                    },
                ],
                internalType: 'struct Previewer.FixedPreview',
                name: '',
                type: 'tuple',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'contract Market',
                name: 'market',
                type: 'address',
            },
            {
                internalType: 'uint256',
                name: 'maturity',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: 'positionAssets',
                type: 'uint256',
            },
            {
                internalType: 'address',
                name: 'borrower',
                type: 'address',
            },
        ],
        name: 'previewRepayAtMaturity',
        outputs: [
            {
                components: [
                    {
                        internalType: 'uint256',
                        name: 'maturity',
                        type: 'uint256',
                    },
                    {
                        internalType: 'uint256',
                        name: 'assets',
                        type: 'uint256',
                    },
                    {
                        internalType: 'uint256',
                        name: 'utilization',
                        type: 'uint256',
                    },
                ],
                internalType: 'struct Previewer.FixedPreview',
                name: '',
                type: 'tuple',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'contract Market',
                name: 'market',
                type: 'address',
            },
            {
                internalType: 'uint256',
                name: 'maturity',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: 'positionAssets',
                type: 'uint256',
            },
            {
                internalType: 'address',
                name: 'owner',
                type: 'address',
            },
        ],
        name: 'previewWithdrawAtMaturity',
        outputs: [
            {
                components: [
                    {
                        internalType: 'uint256',
                        name: 'maturity',
                        type: 'uint256',
                    },
                    {
                        internalType: 'uint256',
                        name: 'assets',
                        type: 'uint256',
                    },
                    {
                        internalType: 'uint256',
                        name: 'utilization',
                        type: 'uint256',
                    },
                ],
                internalType: 'struct Previewer.FixedPreview',
                name: '',
                type: 'tuple',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
];
class Previewer__factory {
    static createInterface() {
        return new ethers_1.utils.Interface(_abi);
    }
    static connect(address, signerOrProvider) {
        return new ethers_1.Contract(address, _abi, signerOrProvider);
    }
}
exports.Previewer__factory = Previewer__factory;
Previewer__factory.abi = _abi;
//# sourceMappingURL=Previewer__factory.js.map