Skip to content

Commit

Permalink
fix: update sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
doomsower committed Dec 24, 2024
1 parent d3c0e76 commit 4244825
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"test": "vitest"
},
"dependencies": {
"@gearbox-protocol/sdk": "3.0.0-vfour.130",
"@gearbox-protocol/sdk": "3.0.0-vfour.135",
"node-pty": "^1.0.0",
"pino-pretty": "^13.0.0"
},
Expand All @@ -29,7 +29,7 @@
"@gearbox-protocol/eslint-config": "2.0.0-next.2",
"@gearbox-protocol/liquidator-v2-contracts": "^2.2.2",
"@gearbox-protocol/prettier-config": "2.0.0",
"@gearbox-protocol/sdk-gov": "^2.33.1",
"@gearbox-protocol/sdk-gov": "^2.33.2",
"@gearbox-protocol/types": "^1.14.1",
"@redstone-finance/evm-connector": "^0.7.3",
"@types/node": "^22.10.2",
Expand Down
1 change: 1 addition & 0 deletions src/attachSDK.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export default async function attachSDK(): Promise<CreditAccountsService> {
const sdk = await GearboxSDK.attach({
rpcURLs: config.ethProviderRpcs,
addressProvider: config.addressProviderOverride,
marketConfigurators: [config.marketConfigurator],
timeout: 600_000,
chainId: config.chainId,
networkType: config.network,
Expand Down
1 change: 1 addition & 0 deletions src/config/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { ConfigSchema } from "./schema.js";

const envConfigMapping: Record<keyof ConfigSchema, string | string[]> = {
addressProviderOverride: "ADDRESS_PROVIDER",
marketConfigurator: "MARKET_CONFIGURATOR",
appName: "APP_NAME",
batchLiquidatorAddress: "BATCH_LIQUIDATOR_ADDRESS",
debugAccount: "DEBUG_ACCOUNT",
Expand Down
4 changes: 4 additions & 0 deletions src/config/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ export const ConfigSchema = z.object({
* Use this option to override address provider
*/
addressProviderOverride: Address.optional(),
/**
* Market configurator address to attach SDK
*/
marketConfigurator: Address,
/**
* App name used in various messages to distinguish instances
*/
Expand Down
1 change: 1 addition & 0 deletions src/services/liquidate/SingularPartialLiquidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ export default class SingularPartialLiquidator extends SingularLiquidator<Partia
};
} catch (e) {
if (this.#fallback) {
logger.debug(`partial preview failed: ${e}`);
logger.debug("previewing with fallback liquidator");
const result = await this.#fallback.preview(ca);
return {
Expand Down
17 changes: 13 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1592,10 +1592,19 @@
humanize-duration-ts "^2.1.1"
zod "^3.22.2"

"@gearbox-protocol/[email protected]":
version "3.0.0-vfour.130"
resolved "https://registry.yarnpkg.com/@gearbox-protocol/sdk/-/sdk-3.0.0-vfour.130.tgz#2e16f3cbe544f870e64f7705d754be3c37b7a1ea"
integrity sha512-9fltsB17GDbQbgTT5U0cLp19umI1eRvsvRe5R3U0Y3JW3H13OrinJ7UVA9zU/PtxBkLonbBYlCuxGDgpjlOVEA==
"@gearbox-protocol/sdk-gov@^2.33.2":
version "2.33.2"
resolved "https://registry.yarnpkg.com/@gearbox-protocol/sdk-gov/-/sdk-gov-2.33.2.tgz#ae8a3f802d4553cacd0d4a1e832052599facb7c8"
integrity sha512-P1Bcb8kBg1ZVdloLMQpqkJvPxp4cV7vIRBPRI0XRzsLciJM5ME1dAWiwaZENZGlN52aOzu024gal0HIYZYuR5g==
dependencies:
ethers "6.12.1"
humanize-duration-ts "^2.1.1"
zod "^3.22.2"

"@gearbox-protocol/[email protected]":
version "3.0.0-vfour.135"
resolved "https://registry.yarnpkg.com/@gearbox-protocol/sdk/-/sdk-3.0.0-vfour.135.tgz#f34a780cc03b49d63b0c9ae44ca7024aa7040c7d"
integrity sha512-Ih0WQ0tyYwYpR4mL7HJB6J/XaxKh+eYc+rTBWJfPKK5asGF9CcGPAObbxSbUsmc8IcrTamG7KhrRo2AxjF3x9w==
dependencies:
"@gearbox-protocol/sdk-gov" "^2.33.1"
"@redstone-finance/evm-connector" "^0.7.3"
Expand Down

0 comments on commit 4244825

Please sign in to comment.