From 4c12996ae468621f3ca962626afd622ba5c2984f Mon Sep 17 00:00:00 2001 From: Jean-Grimal <83286814+Jean-Grimal@users.noreply.github.com> Date: Fri, 3 Jan 2025 17:13:26 +0100 Subject: [PATCH] test: add more logs --- .../examples/whitelistedMarkets.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/liquidation-sdk-viem/examples/whitelistedMarkets.ts b/packages/liquidation-sdk-viem/examples/whitelistedMarkets.ts index f91e583f..97b982b0 100644 --- a/packages/liquidation-sdk-viem/examples/whitelistedMarkets.ts +++ b/packages/liquidation-sdk-viem/examples/whitelistedMarkets.ts @@ -254,6 +254,9 @@ export const check = async < repaidAssets, ); + if (seizableCollateral.preLiquidation) + console.log("result", result); + if (result) { dstAmount = result.dstAmount; } else { @@ -297,6 +300,9 @@ export const check = async < maxUint256, ); + if (seizableCollateral.preLiquidation) + console.log("pre liquidation encoding"); + seizableCollateral.preLiquidation ? encoder.preLiquidationPreLiquidate( position.preLiquidation!.address, @@ -314,6 +320,9 @@ export const check = async < encoder.flush(), ); + if (seizableCollateral.preLiquidation) + console.log("pre liquidation encoded"); + const populatedTx = await encoder.encodeExec(); const [gasLimit, blockNumber, txCount, { maxFeePerGas }] = await Promise.all([ @@ -352,6 +361,9 @@ export const check = async < maxFeePerGas, }; + if (seizableCollateral.preLiquidation) + console.log("transaction", transaction); + if (chainId === ChainId.EthMainnet) { const signedBundle = await Flashbots.signBundle([ {