Added debug logs

This commit is contained in:
lomonoshka
2023-09-20 15:43:46 +04:00
parent 2fe599f8d3
commit 0b67ea0b86
2 changed files with 6 additions and 2 deletions

View File

@@ -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",

View File

@@ -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,