From ea50d2f83b73f5fceb2eaba3cb171589166d77f2 Mon Sep 17 00:00:00 2001 From: Paul <108695806+pxrl@users.noreply.github.com> Date: Mon, 12 Feb 2024 12:03:24 +0100 Subject: [PATCH] chore: Update UnfilledDeposit types for V3 The Dataworker needs a V3 variant to track the realizedLpFeePct of the deposit with payout on the destination chain. --- src/interfaces/SpokePool.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/interfaces/SpokePool.ts b/src/interfaces/SpokePool.ts index 0eb69c26..02a26416 100644 --- a/src/interfaces/SpokePool.ts +++ b/src/interfaces/SpokePool.ts @@ -173,13 +173,19 @@ export interface V3RelayerRefundExecutionWithBlock extends V3RelayerRefundExecut export type RelayerRefundExecution = V2RelayerRefundExecution | V3RelayerRefundExecution; export type RelayerRefundExecutionWithBlock = V2RelayerRefundExecutionWithBlock | V3RelayerRefundExecutionWithBlock; -export interface UnfilledDeposit { - deposit: Deposit; +export interface V2UnfilledDeposit { + deposit: V2Deposit; unfilledAmount: BigNumber; hasFirstPartialFill?: boolean; relayerBalancingFee?: BigNumber; } +export interface V3UnfilledDeposit extends V3Deposit { + realizedLpFeePct: BigNumber; // Assumes repayment on the destination chain. +} + +export type UnfilledDeposit = V2UnfilledDeposit | V3UnfilledDeposit; + export interface UnfilledDepositsForOriginChain { [originChainIdPlusDepositId: string]: UnfilledDeposit[]; }