You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
facadeActions []*mpi.FacadeAccountAction, partialLiqAccount common.Address) (result []*mpi.FacadeAccountAction) { // facadeEvents from rpc, mainCalls from tenderly
23
-
iflen(mainCalls) >len(facadeActions) {
23
+
iflen(*mainCalls) >len(facadeActions) {
24
24
log.Warnf("Len of calls(%d) can't be more than separated close/liquidate and multicall(%d).",
25
-
len(mainCalls), len(facadeActions),
25
+
len(*mainCalls), len(facadeActions),
26
26
)
27
-
iflen(facadeActions) ==1&&len(mainCalls) ==2&&partialLiqAccount!=core.NULL_ADDR { // in the partial declaration in the open call, there is no instruction done, and there is another separate multi-call where all the instructions are done.
if (len(facadeActions) ==1&&mainCallLen==2&&partialLiqAccount!=core.NULL_ADDR) ||// in the partial declaration in the open call, there is no instruction done, and there is another separate multi-call where all the instructions are done.
34
+
len(facadeActions) ==2&&mainCallLen==3&& (*mainCalls)[1].Name=="FacadeBotMulticall" { // if liquidated using PartialLiquidationBotV3 such as in tx https://etherscan.io/tx/0x3df2f68621486ac4110cbcee7a94d4575ac402b6f52071cf9772877a663fd886#eventlog
log.Warnf(" with partial liquidation for account %s, combining open with multicall", partialLiqAccount.Hex())
33
-
mainCalls=mainCalls[:1] // skip the first main call which is open with partial liquidation
42
+
43
+
j:=append([]*ds.FacadeCallNameWithMulticall{liquidatingAccountCall}, (*mainCalls)[2:]...) // skip the first main call which is open with partial liquidation
0 commit comments