From 0b67ea0b8694b264d29e7be4340a22d842dcb00e Mon Sep 17 00:00:00 2001 From: lomonoshka Date: Wed, 20 Sep 2023 15:43:46 +0400 Subject: [PATCH] Added debug logs --- package.json | 2 +- src/Unit/Exchange/generateSwapCalldata.ts | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 8af2ed2..fe24c38 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@orionprotocol/sdk", - "version": "0.19.81-rc9", + "version": "0.19.81-rc10", "description": "Orion Protocol SDK", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/Unit/Exchange/generateSwapCalldata.ts b/src/Unit/Exchange/generateSwapCalldata.ts index 516a40d..c15ac49 100644 --- a/src/Unit/Exchange/generateSwapCalldata.ts +++ b/src/Unit/Exchange/generateSwapCalldata.ts @@ -62,6 +62,8 @@ export default async function generateSwapCalldata({ if (path_ == undefined || path_.length == 0) { throw new Error('Empty path'); } + console.log("Initial path") + console.log(path_) const wethAddress = safeGet(unit.contracts, 'WETH') const curveRegistryAddress = safeGet(unit.contracts, 'curveRegistry') const { assetToAddress, swapExecutorContractAddress, exchangeContractAddress } = await simpleFetch(unit.blockchainService.getInfo)(); @@ -74,7 +76,9 @@ export default async function generateSwapCalldata({ if (!path.every(swapInfo => swapInfo.factory === factory)) { throw new Error('Supporting only swaps with single factory'); } - + console.log("Updated path") + console.log(path) + console.log(factory) const swapDescription: ExchangeWithGenericSwap.SwapDescriptionStruct = { srcToken: path.first().assetIn, dstToken: path.last().assetOut,