diff --git a/src/clients/mocks/MockSpokePoolClient.ts b/src/clients/mocks/MockSpokePoolClient.ts index a12c6c09..7386be2f 100644 --- a/src/clients/mocks/MockSpokePoolClient.ts +++ b/src/clients/mocks/MockSpokePoolClient.ts @@ -323,11 +323,11 @@ export class MockSpokePoolClient extends SpokePoolClient { depositor: fill.depositor ?? randomAddress(), recipient, message, - updatableRelayData: { - updatedRecipient: fill.updatableRelayData?.recipient ?? recipient, - updatedMessage: fill.updatableRelayData?.message ?? message, - updatedOutputAmount: fill.updatableRelayData?.outputAmount ?? outputAmount, - fillType: fill.updatableRelayData?.fillType ?? FillType.FastFill, + relayExecutionInfo: { + updatedRecipient: fill.relayExecutionInfo?.recipient ?? recipient, + updatedMessage: fill.relayExecutionInfo?.message ?? message, + updatedOutputAmount: fill.relayExecutionInfo?.outputAmount ?? outputAmount, + fillType: fill.relayExecutionInfo?.fillType ?? FillType.FastFill, }, }; @@ -392,7 +392,7 @@ export class MockSpokePoolClient extends SpokePoolClient { destinationChainId: this.chainId, relayer: ZERO_ADDRESS, repaymentChainId: 0, - updatableRelayData: { + relayExecutionInfo: { recipient: leaf.relayData.recipient, outputAmount: leaf.updatedOutputAmount, message: leaf.relayData.message, diff --git a/src/interfaces/SpokePool.ts b/src/interfaces/SpokePool.ts index 0eb69c26..604cb09c 100644 --- a/src/interfaces/SpokePool.ts +++ b/src/interfaces/SpokePool.ts @@ -105,7 +105,7 @@ export interface V3Fill extends V3RelayData { destinationChainId: number; relayer: string; repaymentChainId: number; - updatableRelayData: V3RelayExecutionEventInfo; + relayExecutionInfo: V3RelayExecutionEventInfo; } export interface V2FillWithBlock extends V2Fill, SortableEvent {} diff --git a/src/interfaces/UBA.ts b/src/interfaces/UBA.ts deleted file mode 100644 index a66cee63..00000000 --- a/src/interfaces/UBA.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { BigNumber } from "ethers"; -import { DepositWithBlock, FillWithBlock } from "./"; - -export type UbaInflow = DepositWithBlock; -export type UbaOutflow = FillWithBlock & { matchedDeposit: DepositWithBlock }; -export type UbaFlow = UbaInflow | UbaOutflow; - -export const isUbaInflow = (flow: UbaFlow): flow is UbaInflow => { - return (flow as UbaInflow)?.quoteTimestamp !== undefined; -}; - -export const isUbaOutflow = (flow: UbaFlow): flow is UbaOutflow => { - return !isUbaInflow(flow) && outflowIsFill(flow); -}; - -export const outflowIsFill = (outflow: UbaOutflow): outflow is FillWithBlock & { matchedDeposit: DepositWithBlock } => { - return (outflow as FillWithBlock)?.updatableRelayData !== undefined; -}; - -export type UBASpokeBalanceType = { - chainId: number; - blockNumber: number; - lastValidatedRunningBalance?: BigNumber; - recentRequestFlow: UbaFlow[]; -}; - -export type UBAFeeResult = { depositorFee: BigNumber; refundFee: BigNumber; totalUBAFee: BigNumber }; diff --git a/src/interfaces/index.ts b/src/interfaces/index.ts index 92373728..a74b85f4 100644 --- a/src/interfaces/index.ts +++ b/src/interfaces/index.ts @@ -3,7 +3,6 @@ export * from "./ConfigStore"; export * from "./HubPool"; export * from "./SpokePool"; export * from "./Bridge"; -export * from "./UBA"; export * from "./Error"; export * from "./TypedData"; export * from "./CachingMechanism"; diff --git a/src/utils/V3Utils.ts b/src/utils/V3Utils.ts index 63a8bd5f..833256a0 100644 --- a/src/utils/V3Utils.ts +++ b/src/utils/V3Utils.ts @@ -85,7 +85,7 @@ export function isV3RelayData; diff --git a/test/utils/SpokePoolUtils.ts b/test/utils/SpokePoolUtils.ts index b2a4f13e..05722d08 100644 --- a/test/utils/SpokePoolUtils.ts +++ b/test/utils/SpokePoolUtils.ts @@ -57,7 +57,7 @@ export function v3FillFromDeposit(deposit: V3DepositWithBlock, relayer: string): // Caller can modify these later. exclusiveRelayer: relayer, repaymentChainId: deposit.destinationChainId, - updatableRelayData: { + relayExecutionInfo: { recipient: deposit.updatedRecipient ?? recipient, message: deposit.updatedMessage ?? message, outputAmount: deposit.updatedOutputAmount ?? deposit.outputAmount,