diff --git a/core/services/ocr2/plugins/liquiditymanager/bridge/arb/l1_to_l2.go b/core/services/ocr2/plugins/liquiditymanager/bridge/arb/l1_to_l2.go index 725fe52c6c..072bcd4dfa 100644 --- a/core/services/ocr2/plugins/liquiditymanager/bridge/arb/l1_to_l2.go +++ b/core/services/ocr2/plugins/liquiditymanager/bridge/arb/l1_to_l2.go @@ -365,8 +365,9 @@ func (l *l1ToL2Bridge) toPendingTransfers( TxHash: transfer.Raw.TxHash, LogIndex: int64(transfer.Raw.Index), }].BlockTimestamp, - BridgeData: []byte{}, // no finalization data, not ready - Stage: bridgecommon.StageRebalanceConfirmed, + BridgeData: []byte{}, // no finalization data, not ready + Stage: bridgecommon.StageRebalanceConfirmed, + NativeBridgeFee: ubig.NewI(0), }, Status: models.TransferStatusNotReady, ID: fmt.Sprintf("%s-%d", transfer.Raw.TxHash.Hex(), transfer.Raw.Index), @@ -386,8 +387,9 @@ func (l *l1ToL2Bridge) toPendingTransfers( TxHash: transfer.Raw.TxHash, LogIndex: int64(transfer.Raw.Index), }].BlockTimestamp, - BridgeData: readyData[i], // finalization data since its ready - Stage: bridgecommon.StageFinalizeReady, + BridgeData: readyData[i], // finalization data since its ready + Stage: bridgecommon.StageFinalizeReady, + NativeBridgeFee: ubig.NewI(0), }, Status: models.TransferStatusReady, // ready == finalized for L1 -> L2 transfers due to auto-finalization by the native bridge ID: fmt.Sprintf("%s-%d", transfer.Raw.TxHash.Hex(), transfer.Raw.Index), diff --git a/core/services/ocr2/plugins/liquiditymanager/bridge/arb/l1_to_l2_test.go b/core/services/ocr2/plugins/liquiditymanager/bridge/arb/l1_to_l2_test.go index 6206a212fc..72e1ff1671 100644 --- a/core/services/ocr2/plugins/liquiditymanager/bridge/arb/l1_to_l2_test.go +++ b/core/services/ocr2/plugins/liquiditymanager/bridge/arb/l1_to_l2_test.go @@ -1377,6 +1377,7 @@ func Test_l1ToL2Bridge_toPendingTransfers(t *testing.T) { Date: time.Time{}, BridgeData: []byte{}, Stage: 1, + NativeBridgeFee: ubig.NewI(0), }, Status: models.TransferStatusNotReady, ID: fmt.Sprintf("%s-%d", common.HexToHash("0x1"), 1), @@ -1393,6 +1394,7 @@ func Test_l1ToL2Bridge_toPendingTransfers(t *testing.T) { Date: time.Time{}, BridgeData: []byte{1, 2, 3}, Stage: 2, + NativeBridgeFee: ubig.NewI(0), }, Status: models.TransferStatusReady, ID: fmt.Sprintf("%s-%d", common.HexToHash("0x2"), 2), diff --git a/core/services/ocr2/plugins/liquiditymanager/bridge/arb/l2_to_l1.go b/core/services/ocr2/plugins/liquiditymanager/bridge/arb/l2_to_l1.go index 6263603436..ea06c363e0 100644 --- a/core/services/ocr2/plugins/liquiditymanager/bridge/arb/l2_to_l1.go +++ b/core/services/ocr2/plugins/liquiditymanager/bridge/arb/l2_to_l1.go @@ -339,8 +339,9 @@ func (l *l2ToL1Bridge) toPendingTransfers( TxHash: transfer.Raw.TxHash, LogIndex: int64(transfer.Raw.Index), }].BlockTimestamp, - BridgeData: readyData[i], // finalization data for withdrawals that are ready - Stage: bridgecommon.StageFinalizeReady, + BridgeData: readyData[i], // finalization data for withdrawals that are ready + Stage: bridgecommon.StageFinalizeReady, + NativeBridgeFee: ubig.NewI(0), }, Status: models.TransferStatusReady, ID: fmt.Sprintf("%s-%d", transfer.Raw.TxHash.Hex(), transfer.Raw.Index), @@ -360,8 +361,9 @@ func (l *l2ToL1Bridge) toPendingTransfers( TxHash: transfer.Raw.TxHash, LogIndex: int64(transfer.Raw.Index), }].BlockTimestamp, - BridgeData: []byte{}, // No data since its not ready - Stage: bridgecommon.StageRebalanceConfirmed, + BridgeData: []byte{}, // No data since its not ready + Stage: bridgecommon.StageRebalanceConfirmed, + NativeBridgeFee: ubig.NewI(0), }, Status: models.TransferStatusNotReady, ID: fmt.Sprintf("%s-%d", transfer.Raw.TxHash.Hex(), transfer.Raw.Index), diff --git a/core/services/ocr2/plugins/liquiditymanager/bridge/opstack/l1_to_l2.go b/core/services/ocr2/plugins/liquiditymanager/bridge/opstack/l1_to_l2.go index 8d51f7929b..f80cc86634 100644 --- a/core/services/ocr2/plugins/liquiditymanager/bridge/opstack/l1_to_l2.go +++ b/core/services/ocr2/plugins/liquiditymanager/bridge/opstack/l1_to_l2.go @@ -496,8 +496,9 @@ func (l *l1ToL2Bridge) toPendingTransfers( TxHash: transfer.Raw.TxHash, LogIndex: int64(transfer.Raw.Index), }].BlockTimestamp, - BridgeData: transfer.BridgeReturnData, // unique nonce from the OP Bridge Adapter - Stage: bridgecommon.StageRebalanceConfirmed, + BridgeData: transfer.BridgeReturnData, // unique nonce from the OP Bridge Adapter + Stage: bridgecommon.StageRebalanceConfirmed, + NativeBridgeFee: ubig.NewI(0), }, Status: models.TransferStatusNotReady, ID: fmt.Sprintf("%s-%d", transfer.Raw.TxHash.Hex(), transfer.Raw.Index), @@ -517,8 +518,9 @@ func (l *l1ToL2Bridge) toPendingTransfers( TxHash: transfer.Raw.TxHash, LogIndex: int64(transfer.Raw.Index), }].BlockTimestamp, - BridgeData: transfer.BridgeReturnData, // unique nonce from the OP Bridge Adapter - Stage: bridgecommon.StageFinalizeReady, + BridgeData: transfer.BridgeReturnData, // unique nonce from the OP Bridge Adapter + Stage: bridgecommon.StageFinalizeReady, + NativeBridgeFee: ubig.NewI(0), }, Status: models.TransferStatusReady, // ready == finalized for L1 -> L2 transfers due to auto-finalization by the native bridge ID: fmt.Sprintf("%s-%d", transfer.Raw.TxHash.Hex(), transfer.Raw.Index), diff --git a/core/services/ocr2/plugins/liquiditymanager/bridge/opstack/l2_to_l1.go b/core/services/ocr2/plugins/liquiditymanager/bridge/opstack/l2_to_l1.go index 5a70619e66..ce354593a7 100644 --- a/core/services/ocr2/plugins/liquiditymanager/bridge/opstack/l2_to_l1.go +++ b/core/services/ocr2/plugins/liquiditymanager/bridge/opstack/l2_to_l1.go @@ -215,6 +215,10 @@ func (l *l2ToL1Bridge) GetTransfers( if len(missingSent) > 0 { l.lggr.Errorw("missing sent logs", "missingSent", missingSent) } + l.lggr.Infow("partitioned withdrawal transfers", + "needsToBeProven", needsToBeProven, + "needsToBeFinalized", needsToBeFinalized, + ) return l.toPendingTransfers(ctx, lggr, localToken, remoteToken, needsToBeProven, needsToBeFinalized, parsedToLp) } @@ -382,8 +386,9 @@ func (l *l2ToL1Bridge) toPendingTransfers( TxHash: transfer.Raw.TxHash, LogIndex: int64(transfer.Raw.Index), }].BlockTimestamp, - BridgeData: provePayload, - Stage: bridgecommon.StageRebalanceConfirmed, + BridgeData: provePayload, + Stage: bridgecommon.StageRebalanceConfirmed, + NativeBridgeFee: ubig.NewI(0), }, // Both "prove" and "finalize" are handled by the "finalizeWithdrawalERC20" call in the // OptimismL1BridgeAdapter, therefore we set the status to "Ready" @@ -409,8 +414,9 @@ func (l *l2ToL1Bridge) toPendingTransfers( TxHash: transfer.Raw.TxHash, LogIndex: int64(transfer.Raw.Index), }].BlockTimestamp, - BridgeData: finalizePayload, - Stage: bridgecommon.StageFinalizeReady, + BridgeData: finalizePayload, + Stage: bridgecommon.StageFinalizeReady, + NativeBridgeFee: ubig.NewI(0), }, Status: models.TransferStatusReady, // Ready to be finalized ID: fmt.Sprintf("%s-%d", transfer.Raw.TxHash.Hex(), transfer.Raw.Index),