From a2ed459fb5ece91638f251649d90afc19f22d18b Mon Sep 17 00:00:00 2001 From: doomsower <12031673+doomsower@users.noreply.github.com> Date: Tue, 15 Oct 2024 16:32:54 -0300 Subject: [PATCH] fix: update sdk --- package.json | 3 +-- src/services/liquidate/SingularFullLiquidator.ts | 16 +++++++++++++--- yarn.lock | 13 ++++--------- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index fa82655..0f1fd9a 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "test": "vitest" }, "dependencies": { - "@gearbox-protocol/sdk": "3.0.0-vfour.55", + "@gearbox-protocol/sdk": "3.0.0-vfour.58", "node-pty": "^1.0.0", "pino-pretty": "^11.2.2" }, @@ -26,7 +26,6 @@ "@aws-sdk/client-s3": "^3.670.0", "@commitlint/cli": "^19.5.0", "@commitlint/config-conventional": "^19.5.0", - "@flashbots/ethers-provider-bundle": "^1.0.0", "@gearbox-protocol/eslint-config": "2.0.0-next.2", "@gearbox-protocol/liquidator-v2-contracts": "^2.2.1", "@gearbox-protocol/prettier-config": "2.0.0", diff --git a/src/services/liquidate/SingularFullLiquidator.ts b/src/services/liquidate/SingularFullLiquidator.ts index 7c2036b..d6b2dff 100644 --- a/src/services/liquidate/SingularFullLiquidator.ts +++ b/src/services/liquidate/SingularFullLiquidator.ts @@ -25,9 +25,19 @@ export default class SingularFullLiquidator extends SingularLiquidator - this.#bestClosePath.upsert(e.creditAccount, e), - ); + this.creditAccountService.sdk.router.addHook("foundBestClosePath", e => { + this.#bestClosePath.upsert(e.creditAccount, e); + this.logger.debug( + { account: e.creditAccount, ...e }, + "found best close path", + ); + }); + // this.creditAccountService.sdk.router.addHook("foundPathOptions", e => { + // this.logger.debug( + // { account: e.creditAccount, ...e }, + // "found path options", + // ); + // }); } public async makeLiquidatable( diff --git a/yarn.lock b/yarn.lock index c20f967..bd132b2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1568,11 +1568,6 @@ "@ethersproject/properties" "^5.7.0" "@ethersproject/strings" "^5.7.0" -"@flashbots/ethers-provider-bundle@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@flashbots/ethers-provider-bundle/-/ethers-provider-bundle-1.0.0.tgz#555c6208c668d1818820143b067d38f2a63a8556" - integrity sha512-KXOSA2RFFq91KN7H6nskbBaV+yd3QKI9jj8r1CEsD00sXBV3uSoQ3wG6u7qkjxp2EfvWy31pynWfZZVoWyNQ3Q== - "@gearbox-protocol/eslint-config@2.0.0-next.2": version "2.0.0-next.2" resolved "https://registry.yarnpkg.com/@gearbox-protocol/eslint-config/-/eslint-config-2.0.0-next.2.tgz#c3595959714c7da4daea822138d61e82238f5a29" @@ -1607,10 +1602,10 @@ humanize-duration-ts "^2.1.1" zod "^3.22.2" -"@gearbox-protocol/sdk@3.0.0-vfour.55": - version "3.0.0-vfour.55" - resolved "https://registry.yarnpkg.com/@gearbox-protocol/sdk/-/sdk-3.0.0-vfour.55.tgz#39afa00bbe6c0eb82165593ddaad1a0cf9d59706" - integrity sha512-VuPvHTPgrAaiSzc0l1ZFHPUeyX74qpJ1kDUpruhW/NOkL3dKkqqUzMvOceYyLjZLFMGabklZM5zuqrkyiTv9rQ== +"@gearbox-protocol/sdk@3.0.0-vfour.58": + version "3.0.0-vfour.58" + resolved "https://registry.yarnpkg.com/@gearbox-protocol/sdk/-/sdk-3.0.0-vfour.58.tgz#cddc31c0fca601ade1b182ec9b178e23f8c82644" + integrity sha512-eOIOE1zjtXpkPTWGd75C7DKotib05YSYgb9gYvXfEqkKHtVggp+JTQKuxrTOAyby0RYIr9PVhBKZT7KC5UKrtw== dependencies: "@gearbox-protocol/sdk-gov" "^2.22.0" "@redstone-finance/evm-connector" "^0.6.2"