Everything evaluateRedeem needs, already read from the chain.

interface EvaluateRedeemInput {
    amount: bigint;
    canMint: boolean;
    eligible: EligibleTrove[];
    globalInterestRateBps: bigint;
    marginSeconds?: bigint;
    minNetDebt: bigint;
    musdBalance: bigint;
    price: bigint;
    sortedTrovesSize: bigint;
    tcr: bigint;
    troveOwnersCount: bigint;
}

Properties

amount: bigint
canMint: boolean
eligible: EligibleTrove[]

Eligible Troves in the order the loop visits them, lowest ICR first, with those below MCR already skipped exactly as :341-349 and :375-378 skip them.

globalInterestRateBps: bigint

interestRateManager.interestRate(), which the contract's hint band uses (:358, :1281).

marginSeconds?: bigint

Whole consumption margin in seconds. Default REDEMPTION_ADVICE_MARGIN_SECONDS (MK-104).

minNetDebt: bigint
musdBalance: bigint
price: bigint
sortedTrovesSize: bigint
tcr: bigint
troveOwnersCount: bigint

TroveManager.getTroveOwnersCount() and SortedTroves.getSize(), the two counts _requireMoreThanOneTroveInSystem compares (TroveManager.sol:1488-1496), and musd.mintList(borrowerOperations), the flag that decides whether it runs at all (:1397) (MK-245). Required: an absent count is not "more than one", and a preview that assumed it would call viable a redemption the chain reverts.