diff --git a/src/services/liquidate/AbstractLiquidator.ts b/src/services/liquidate/AbstractLiquidator.ts index e646cfe..b8845ec 100644 --- a/src/services/liquidate/AbstractLiquidator.ts +++ b/src/services/liquidate/AbstractLiquidator.ts @@ -159,8 +159,9 @@ export default abstract class AbstractLiquidator { const raw = await this.compressor.read.getCreditManagersV3List(); const result = raw.map(d => new CreditManagerData(d)); - if (this.config.optimistic) { - for (const cm of result) { + for (const cm of result) { + TxParserHelper.addCreditManager(cm); + if (this.config.optimistic) { this.#cmCache[cm.address.toLowerCase()] = cm; } } diff --git a/src/services/liquidate/BatchLiquidator.ts b/src/services/liquidate/BatchLiquidator.ts index 6dfc526..174bdf5 100644 --- a/src/services/liquidate/BatchLiquidator.ts +++ b/src/services/liquidate/BatchLiquidator.ts @@ -10,6 +10,7 @@ import { parseEventLogs } from "viem"; import type { CreditAccountData, CreditManagerData } from "../../data/index.js"; import type { EstimateBatchInput } from "../../utils/ethers-6-temp/pathfinder/viem-types.js"; +import { TxParserHelper } from "../../utils/ethers-6-temp/txparser/index.js"; import { BatchLiquidationErrorMessage, BatchLiquidationFinishedMessage, @@ -189,7 +190,9 @@ export default class BatchLiquidator }; const results = accounts.map( (a): OptimisticResult => ({ - callsHuman: [], + callsHuman: TxParserHelper.parseMultiCall({ + calls: [...(batch[a.addr]?.calls ?? [])], + }), balancesBefore: a.filterDust(), balancesAfter: {}, hfBefore: a.healthFactor,