Skip to content

Commit bfead96

Browse files
committed
fix: bump sdk
1 parent 69fc55c commit bfead96

File tree

5 files changed

+38
-32
lines changed

5 files changed

+38
-32
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
"@commitlint/cli": "^20.2.0",
2828
"@commitlint/config-conventional": "^20.2.0",
2929
"@gearbox-protocol/biome-config": "^1.0.14",
30-
"@gearbox-protocol/cli-utils": "^5.62.1",
30+
"@gearbox-protocol/cli-utils": "^5.63.0",
3131
"@gearbox-protocol/liquidator-contracts": "^1.36.0-experimental.67",
3232
"@gearbox-protocol/liquidator-v2-contracts": "^2.4.0",
33-
"@gearbox-protocol/sdk": "11.11.0",
33+
"@gearbox-protocol/sdk": "11.12.0",
3434
"@gearbox-protocol/types": "^1.14.8",
3535
"@types/node": "^25.0.0",
3636
"@uniswap/sdk-core": "^7.10.0",

src/Liquidator.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ export default class Liquidator {
4545
await this.client.launch();
4646

4747
this.healthChecker.launch();
48-
await this.deleverage.launch();
4948
await this.swapper.launch(this.config.network);
5049
await this.scanner.launch();
5150

src/attachSDK.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export default async function attachSDK(): Promise<ICreditAccountsService> {
7474
// we need prices to calculate things like numsplits
7575
ignoreUpdateablePrices: false,
7676
plugins: {
77-
bots: new BotsPlugin(false),
77+
bots: new BotsPlugin(config.liquidationMode === "deleverage"),
7878
},
7979
redstone: {
8080
historicTimestamp: optimisticTimestamp,

src/services/DeleverageService.ts

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
import { iBotListV310Abi } from "@gearbox-protocol/sdk/abi/310/generated";
99
import type {
1010
BotsPlugin,
11+
PartialLiquidationBotV310Contract,
1112
BotParameters as TBotParameters,
1213
} from "@gearbox-protocol/sdk/plugins/bots";
1314
import type { Address } from "viem";
@@ -48,30 +49,13 @@ export default class DeleverageService {
4849
@DI.Inject(DI.Client)
4950
client!: Client;
5051

51-
#bots: BotParameters[] = [];
52-
53-
public async launch(): Promise<void> {
54-
if (this.config.liquidationMode !== "deleverage") {
55-
return;
56-
}
57-
const bots =
58-
await this.sdk.plugins.bots.findDeployedPartialLiquidationBots();
59-
this.#bots = bots.entries().map(([address, bot]) => ({
60-
...bot,
61-
address,
62-
}));
63-
this.log.info(
64-
`Found ${this.#bots.length} deployed partial liquidation bots`,
65-
);
66-
}
67-
68-
public get bots(): BotParameters[] {
69-
return this.#bots;
52+
public get bots(): PartialLiquidationBotV310Contract[] {
53+
return this.sdk.plugins.bots.bots;
7054
}
7155

72-
public get bot(): BotParameters {
56+
public get bot(): PartialLiquidationBotV310Contract {
7357
// TODO: support multiple bots
74-
return this.#bots[0];
58+
return this.bots[0];
7559
}
7660

7761
public async filterDeleverageAccounts(

yarn.lock

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1878,9 +1878,9 @@ __metadata:
18781878
languageName: node
18791879
linkType: hard
18801880

1881-
"@gearbox-protocol/cli-utils@npm:^5.62.1":
1882-
version: 5.62.1
1883-
resolution: "@gearbox-protocol/cli-utils@npm:5.62.1"
1881+
"@gearbox-protocol/cli-utils@npm:^5.63.0":
1882+
version: 5.63.0
1883+
resolution: "@gearbox-protocol/cli-utils@npm:5.63.0"
18841884
dependencies:
18851885
"@aws-sdk/client-secrets-manager": "npm:^3.948.0"
18861886
"@aws-sdk/client-ssm": "npm:^3.948.0"
@@ -1891,7 +1891,7 @@ __metadata:
18911891
viem: "npm:^2.41.2"
18921892
yaml: "npm:^2.8.2"
18931893
zod: "npm:^4.1.13"
1894-
checksum: 10c0/b942b5c5df85367ba171fdd05372f51312e908da7028edb28f2d43f5d91940d983a7208abb43147197919d35a79043dac22d9ebe19b55728064d3ea2b4b5e098
1894+
checksum: 10c0/671561cdd8294ac4f649bf21c35c4a723ac1dd566b965311ad478382582c3939004bbaca2f6c63f0d55783f53313dbcca534511c31a9684bae13d6a5f65cc602
18951895
languageName: node
18961896
linkType: hard
18971897

@@ -1926,10 +1926,10 @@ __metadata:
19261926
"@commitlint/cli": "npm:^20.2.0"
19271927
"@commitlint/config-conventional": "npm:^20.2.0"
19281928
"@gearbox-protocol/biome-config": "npm:^1.0.14"
1929-
"@gearbox-protocol/cli-utils": "npm:^5.62.1"
1929+
"@gearbox-protocol/cli-utils": "npm:^5.63.0"
19301930
"@gearbox-protocol/liquidator-contracts": "npm:^1.36.0-experimental.67"
19311931
"@gearbox-protocol/liquidator-v2-contracts": "npm:^2.4.0"
1932-
"@gearbox-protocol/sdk": "npm:11.11.0"
1932+
"@gearbox-protocol/sdk": "npm:11.12.0"
19331933
"@gearbox-protocol/types": "npm:^1.14.8"
19341934
"@types/node": "npm:^25.0.0"
19351935
"@uniswap/sdk-core": "npm:^7.10.0"
@@ -1956,7 +1956,30 @@ __metadata:
19561956
languageName: unknown
19571957
linkType: soft
19581958

1959-
"@gearbox-protocol/sdk@npm:11.11.0, @gearbox-protocol/sdk@npm:>=11.11.0":
1959+
"@gearbox-protocol/sdk@npm:11.12.0":
1960+
version: 11.12.0
1961+
resolution: "@gearbox-protocol/sdk@npm:11.12.0"
1962+
dependencies:
1963+
"@gearbox-protocol/integrations-v3": "npm:1.52.1"
1964+
"@redstone-finance/evm-connector": "npm:^0.9.0"
1965+
"@redstone-finance/protocol": "npm:^0.9.0"
1966+
"@redstone-finance/sdk": "npm:^0.9.0"
1967+
"@types/bn.js": "npm:^5.2.0"
1968+
abitype: "npm:^1.2.2"
1969+
bn.js: "npm:^5.2.2"
1970+
buffer: "npm:^6.0.3"
1971+
date-fns: "npm:^4.1.0"
1972+
decimal.js-light: "npm:^2.5.1"
1973+
viem: "npm:>=2.23.15 <3.0.0"
1974+
zod: "npm:^4.1.13"
1975+
peerDependencies:
1976+
axios: ^1.0.0
1977+
viem-deal: ^2.0.4
1978+
checksum: 10c0/6c6c900e7f781782f05d764b1bb0a2d5594370514c80028550793a01c69db910979641c82629c88719d1e85f34a2b3370153333ff1e894ff9d0c7ea163ec3fe7
1979+
languageName: node
1980+
linkType: hard
1981+
1982+
"@gearbox-protocol/sdk@npm:>=11.11.0":
19601983
version: 11.11.0
19611984
resolution: "@gearbox-protocol/sdk@npm:11.11.0"
19621985
dependencies:

0 commit comments

Comments
 (0)