diff --git a/packages/sdk-router/src/operations/bridge.ts b/packages/sdk-router/src/operations/bridge.ts index 1ce6c6fcca..514a637fa6 100644 --- a/packages/sdk-router/src/operations/bridge.ts +++ b/packages/sdk-router/src/operations/bridge.ts @@ -10,6 +10,7 @@ import { Query, applyDeadlineToQuery, } from '../module' +import { logger } from '../utils/logger' /** * Creates a populated bridge transaction ready for signing and submission to the origin chain. @@ -169,6 +170,10 @@ export async function allBridgeQuotes( amountIn, options.originUserAddress ) + logger.info( + { routes }, + `Found ${routes.length} routes for ${moduleSet.bridgeModuleName}` + ) // Filter out routes with zero minAmountOut and finalize the rest return Promise.all( routes diff --git a/packages/sdk-router/src/rfq/api.ts b/packages/sdk-router/src/rfq/api.ts index 18ae9eb3ea..12430eb74d 100644 --- a/packages/sdk-router/src/rfq/api.ts +++ b/packages/sdk-router/src/rfq/api.ts @@ -244,6 +244,7 @@ export const getBestRelayerQuote = async ( logger.info({ rfqRequest, rfqResponse }, 'No RFQ quote returned') return ZeroQuote } + logger.info({ rfqRequest, rfqResponse }, 'Received RFQ quote') return { destAmount, relayerAddress: rfqResponse.relayer_address, diff --git a/packages/sdk-router/src/rfq/engine/defaultEngine.ts b/packages/sdk-router/src/rfq/engine/defaultEngine.ts index fe3ce0a620..f6d2d923b9 100644 --- a/packages/sdk-router/src/rfq/engine/defaultEngine.ts +++ b/packages/sdk-router/src/rfq/engine/defaultEngine.ts @@ -95,6 +95,7 @@ export class DefaultEngine implements SwapEngine { // Remove extra fields before the encoding return { engineID: this.id, + engineName: EngineID[this.id], chainId, expectedAmountOut: amountOut, steps: stepsOutput.map(({ token, amount, msgValue, zapData }) => ({ diff --git a/packages/sdk-router/src/rfq/engine/kyberSwapEngine.ts b/packages/sdk-router/src/rfq/engine/kyberSwapEngine.ts index 9b94d8280c..efd5c096ba 100644 --- a/packages/sdk-router/src/rfq/engine/kyberSwapEngine.ts +++ b/packages/sdk-router/src/rfq/engine/kyberSwapEngine.ts @@ -66,6 +66,7 @@ type KyberSwapQuote = SwapEngineQuote & { const EmptyKyberSwapQuote: KyberSwapQuote = { engineID: EngineID.KyberSwap, + engineName: EngineID[EngineID.KyberSwap], chainId: 0, expectedAmountOut: Zero, routeSummary: { @@ -129,6 +130,7 @@ export class KyberSwapEngine implements SwapEngine { } return { engineID: this.id, + engineName: EngineID[this.id], chainId, expectedAmountOut, routeSummary: kyberSwapQuoteResponse.data.routeSummary, diff --git a/packages/sdk-router/src/rfq/engine/liFiEngine.ts b/packages/sdk-router/src/rfq/engine/liFiEngine.ts index 6999e84f52..adab7d0e85 100644 --- a/packages/sdk-router/src/rfq/engine/liFiEngine.ts +++ b/packages/sdk-router/src/rfq/engine/liFiEngine.ts @@ -44,6 +44,7 @@ type LiFiQuote = SwapEngineQuote & { const EmptyLiFiQuote: LiFiQuote = { engineID: EngineID.LiFi, + engineName: EngineID[EngineID.LiFi], chainId: 0, expectedAmountOut: Zero, } @@ -84,6 +85,7 @@ export class LiFiEngine implements SwapEngine { } return { engineID: this.id, + engineName: EngineID[this.id], chainId, expectedAmountOut: BigNumber.from(liFiResponse.estimate.toAmount), tx: liFiResponse.transactionRequest, diff --git a/packages/sdk-router/src/rfq/engine/noOpEngine.ts b/packages/sdk-router/src/rfq/engine/noOpEngine.ts index 9e16695ad8..625c7b0d35 100644 --- a/packages/sdk-router/src/rfq/engine/noOpEngine.ts +++ b/packages/sdk-router/src/rfq/engine/noOpEngine.ts @@ -20,6 +20,7 @@ export class NoOpEngine implements SwapEngine { } return { engineID: this.id, + engineName: EngineID[this.id], chainId, expectedAmountOut: BigNumber.from(amountIn), steps: [], diff --git a/packages/sdk-router/src/rfq/engine/paraSwapEngine.ts b/packages/sdk-router/src/rfq/engine/paraSwapEngine.ts index f415e27d5e..cca17bd188 100644 --- a/packages/sdk-router/src/rfq/engine/paraSwapEngine.ts +++ b/packages/sdk-router/src/rfq/engine/paraSwapEngine.ts @@ -68,6 +68,7 @@ type ParaSwapQuote = SwapEngineQuote & { const EmptyParaSwapQuote: ParaSwapQuote = { engineID: EngineID.ParaSwap, + engineName: EngineID[EngineID.ParaSwap], chainId: 0, expectedAmountOut: Zero, priceRoute: { @@ -127,6 +128,7 @@ export class ParaSwapEngine implements SwapEngine { } return { engineID: this.id, + engineName: EngineID[this.id], chainId, expectedAmountOut: BigNumber.from(paraSwapResponse.priceRoute.destAmount), priceRoute: paraSwapResponse.priceRoute, diff --git a/packages/sdk-router/src/rfq/engine/response.ts b/packages/sdk-router/src/rfq/engine/response.ts index 22bd7ee6e6..5237d0afe9 100644 --- a/packages/sdk-router/src/rfq/engine/response.ts +++ b/packages/sdk-router/src/rfq/engine/response.ts @@ -60,6 +60,7 @@ export const generateAPIRoute = ( return { engineID, + engineName: EngineID[engineID], chainId: input.chainId, expectedAmountOut: response.amountOut, steps: [ diff --git a/packages/sdk-router/src/rfq/engine/swapEngine.ts b/packages/sdk-router/src/rfq/engine/swapEngine.ts index 4931d5f13d..841642e180 100644 --- a/packages/sdk-router/src/rfq/engine/swapEngine.ts +++ b/packages/sdk-router/src/rfq/engine/swapEngine.ts @@ -15,6 +15,7 @@ export enum EngineID { export type SwapEngineQuote = { engineID: EngineID + engineName: string chainId: number expectedAmountOut: BigNumber steps?: StepParams[] @@ -120,6 +121,7 @@ export const applySlippage = ( export const getEmptyQuote = (engineID: EngineID): SwapEngineQuote => { return { engineID, + engineName: EngineID[engineID], chainId: 0, expectedAmountOut: Zero, } @@ -128,6 +130,7 @@ export const getEmptyQuote = (engineID: EngineID): SwapEngineQuote => { export const getEmptyRoute = (engineID: EngineID): SwapEngineRoute => { return { engineID, + engineName: EngineID[engineID], chainId: 0, expectedAmountOut: Zero, steps: [],