Everything evaluateAdjust needs, already read from the chain.

interface EvaluateAdjustInput {
    addCollateral: bigint;
    capacity: bigint;
    collateral: bigint;
    entireDebt: bigint;
    fee: bigint;
    increaseDebt: bigint;
    isDebtIncrease?: boolean;
    isRecoveryMode: boolean;
    minNetDebt: bigint;
    musdBalance: bigint;
    price: bigint;
    repayDebt: bigint;
    status: number;
    systemColl: bigint;
    systemDebt: bigint;
    withdrawCollateral: bigint;
}

Properties

addCollateral: bigint
capacity: bigint

getTroveMaxBorrowingCapacity.

collateral: bigint

Live collateral.

entireDebt: bigint

Live entire debt, principal plus accrued interest.

fee: bigint

The fee the contract will actually charge, already zeroed for Recovery Mode or exemption.

increaseDebt: bigint
isDebtIncrease?: boolean

_adjustTrove's own _isDebtIncrease parameter (BorrowerOperations.sol:757), which the contract takes independently of _mUSDChange and then reconciles at :785-787.

MK-060. Deriving it from increaseDebt > 0n inside this evaluator would make (true, 0) inexpressible, and (true, 0) is exactly the input _requireNonZeroDebtChange (:1351-1356) exists to refuse, so the flag stays a separate parameter as the contract has it.

MK-244, and MK-252 for this comment: the flag is now derived FROM THE VALUE, by adjustLegsOf (increaseDebt > 0n), and both previewAdjustTrove and the write path in trove/index.ts pass what that derivation returns. This comment said both read it from presence until 0.5.0, which was true only until MK-244. The one caller that still states the flag itself is previewBorrow, because withdrawMUSD sends (mUSDChange, true) unconditionally (:243-257).

isRecoveryMode: boolean
minNetDebt: bigint

Live minNetDebt().

musdBalance: bigint

The caller's MUSD balance, for the repayment gate.

price: bigint
repayDebt: bigint
status: number

TroveManager.getTroveStatus. 1 is active.

systemColl: bigint
systemDebt: bigint
withdrawCollateral: bigint