@gearbox-protocol/sdk 3.0.0-vfour.310 → 3.0.0-vfour.312

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/cjs/adapters/{GearboxAdaptersPlugin.js → AdaptersPlugin.js} +6 -6
  2. package/dist/cjs/adapters/index.js +2 -2
  3. package/dist/cjs/bots/BotsPlugin.js +191 -0
  4. package/dist/cjs/bots/PartialLiquidationBotV300Contract.js +55 -0
  5. package/dist/cjs/bots/abi/iPartialLiquidationBotV300.js +164 -0
  6. package/dist/cjs/{sdk/bots → bots/abi}/index.js +4 -6
  7. package/dist/cjs/bots/index.js +28 -0
  8. package/dist/cjs/bots/package.json +1 -0
  9. package/dist/cjs/{sdk/bots/utils.js → bots/types.js} +19 -2
  10. package/dist/cjs/sdk/index.js +0 -2
  11. package/dist/cjs/sdk/market/MarketRegister.js +2 -2
  12. package/dist/cjs/sdk/market/pricefeeds/AbstractPriceFeed.js +20 -6
  13. package/dist/cjs/sdk/market/pricefeeds/PriceFeedsRegister.js +43 -40
  14. package/dist/cjs/sdk/market/pricefeeds/RedstonePriceFeed.js +7 -2
  15. package/dist/cjs/zappers/{GearboxZappersPlugin.js → ZappersPlugin.js} +6 -6
  16. package/dist/cjs/zappers/index.js +3 -3
  17. package/dist/esm/adapters/{GearboxAdaptersPlugin.js → AdaptersPlugin.js} +2 -2
  18. package/dist/esm/adapters/index.js +1 -1
  19. package/dist/esm/bots/BotsPlugin.js +171 -0
  20. package/dist/esm/bots/PartialLiquidationBotV300Contract.js +31 -0
  21. package/dist/esm/bots/abi/iPartialLiquidationBotV300.js +140 -0
  22. package/dist/esm/bots/abi/index.js +1 -0
  23. package/dist/esm/bots/index.js +4 -0
  24. package/dist/esm/bots/package.json +1 -0
  25. package/dist/esm/bots/types.js +9 -0
  26. package/dist/esm/sdk/index.js +0 -1
  27. package/dist/esm/sdk/market/MarketRegister.js +2 -2
  28. package/dist/esm/sdk/market/pricefeeds/AbstractPriceFeed.js +18 -5
  29. package/dist/esm/sdk/market/pricefeeds/PriceFeedsRegister.js +46 -41
  30. package/dist/esm/sdk/market/pricefeeds/RedstonePriceFeed.js +5 -1
  31. package/dist/esm/zappers/{GearboxZappersPlugin.js → ZappersPlugin.js} +2 -2
  32. package/dist/esm/zappers/index.js +1 -1
  33. package/dist/types/adapters/{GearboxAdaptersPlugin.d.ts → AdaptersPlugin.d.ts} +1 -1
  34. package/dist/types/adapters/index.d.ts +1 -1
  35. package/dist/types/bots/BotsPlugin.d.ts +18 -0
  36. package/dist/types/bots/PartialLiquidationBotV300Contract.d.ts +223 -0
  37. package/dist/types/bots/abi/iPartialLiquidationBotV300.d.ts +210 -0
  38. package/dist/types/bots/abi/index.d.ts +1 -0
  39. package/dist/types/bots/index.d.ts +4 -0
  40. package/dist/types/bots/types.d.ts +23 -0
  41. package/dist/types/sdk/base/types.d.ts +0 -1
  42. package/dist/types/sdk/index.d.ts +0 -1
  43. package/dist/types/sdk/market/pricefeeds/AbstractPriceFeed.d.ts +4 -0
  44. package/dist/types/sdk/market/pricefeeds/PriceFeedsRegister.d.ts +6 -3
  45. package/dist/types/sdk/market/pricefeeds/RedstonePriceFeed.d.ts +2 -0
  46. package/dist/types/zappers/{GearboxZappersPlugin.d.ts → ZappersPlugin.d.ts} +1 -1
  47. package/dist/types/zappers/index.d.ts +1 -1
  48. package/package.json +6 -1
  49. package/dist/cjs/sdk/bots/BotsService.js +0 -100
  50. package/dist/esm/sdk/bots/BotsService.js +0 -76
  51. package/dist/esm/sdk/bots/index.js +0 -2
  52. package/dist/esm/sdk/bots/utils.js +0 -0
  53. package/dist/types/sdk/bots/BotsService.d.ts +0 -12
  54. package/dist/types/sdk/bots/index.d.ts +0 -2
  55. package/dist/types/sdk/bots/utils.d.ts +0 -13
@@ -1,6 +1,16 @@
1
1
  import { ilpPriceFeedAbi } from "../../abi/index.js";
2
2
  import { BaseContract } from "../../base/index.js";
3
3
  import { PriceFeedRef } from "./PriceFeedRef.js";
4
+ class PartialPriceFeedInitError extends Error {
5
+ priceFeed;
6
+ constructor(priceFeed) {
7
+ super(
8
+ `price feed ${priceFeed.baseParams.addr} has been initialized with BaseParams only`
9
+ );
10
+ this.name = "ErrPartialPriceFeed";
11
+ this.priceFeed = priceFeed;
12
+ }
13
+ }
4
14
  class AbstractPriceFeedContract extends BaseContract {
5
15
  /**
6
16
  * True if the contract deployed at this address implements IUpdatablePriceFeed interface
@@ -9,6 +19,7 @@ class AbstractPriceFeedContract extends BaseContract {
9
19
  #decimals;
10
20
  #underlyingPriceFeeds;
11
21
  #skipCheck;
22
+ #args;
12
23
  hasLowerBoundCap = false;
13
24
  description;
14
25
  constructor(sdk, args) {
@@ -19,6 +30,7 @@ class AbstractPriceFeedContract extends BaseContract {
19
30
  contractType: args.baseParams.contractType,
20
31
  version: args.baseParams.version
21
32
  });
33
+ this.#args = args;
22
34
  this.description = args.description;
23
35
  this.#decimals = args.decimals;
24
36
  this.#updatable = args.updatable;
@@ -38,25 +50,25 @@ class AbstractPriceFeedContract extends BaseContract {
38
50
  }
39
51
  get decimals() {
40
52
  if (this.#decimals === void 0) {
41
- throw new Error("price feed has been initialized with BaseParams only");
53
+ throw new PartialPriceFeedInitError(this);
42
54
  }
43
55
  return this.#decimals;
44
56
  }
45
57
  get updatable() {
46
58
  if (this.#updatable === void 0) {
47
- throw new Error("price feed has been initialized with BaseParams only");
59
+ throw new PartialPriceFeedInitError(this.#args);
48
60
  }
49
61
  return this.#updatable;
50
62
  }
51
63
  get skipCheck() {
52
64
  if (this.#skipCheck === void 0) {
53
- throw new Error("price feed has been initialized with BaseParams only");
65
+ throw new PartialPriceFeedInitError(this.#args);
54
66
  }
55
67
  return this.#skipCheck;
56
68
  }
57
69
  get underlyingPriceFeeds() {
58
70
  if (!this.#underlyingPriceFeeds) {
59
- throw new Error("price feed has been initialized with BaseParams only");
71
+ throw new PartialPriceFeedInitError(this.#args);
60
72
  }
61
73
  return this.#underlyingPriceFeeds;
62
74
  }
@@ -96,5 +108,6 @@ class AbstractPriceFeedContract extends BaseContract {
96
108
  }
97
109
  }
98
110
  export {
99
- AbstractPriceFeedContract
111
+ AbstractPriceFeedContract,
112
+ PartialPriceFeedInitError
100
113
  };
@@ -12,6 +12,9 @@ import {
12
12
  createRawTx
13
13
  } from "../../utils/index.js";
14
14
  import { Hooks } from "../../utils/internal/index.js";
15
+ import {
16
+ PartialPriceFeedInitError
17
+ } from "./AbstractPriceFeed.js";
15
18
  import { BalancerStablePriceFeedContract } from "./BalancerStablePriceFeed.js";
16
19
  import { BalancerWeightedPriceFeedContract } from "./BalancerWeightedPriceFeed.js";
17
20
  import { BoundedPriceFeedContract } from "./BoundedPriceFeed.js";
@@ -24,7 +27,7 @@ import { ExternalPriceFeedContract } from "./ExternalPriceFeed.js";
24
27
  import { MellowLRTPriceFeedContract } from "./MellowLRTPriceFeed.js";
25
28
  import { PendleTWAPPTPriceFeed } from "./PendleTWAPPTPriceFeed.js";
26
29
  import { PythPriceFeed } from "./PythPriceFeed.js";
27
- import { RedstonePriceFeedContract } from "./RedstonePriceFeed.js";
30
+ import { isRedstone, RedstonePriceFeedContract } from "./RedstonePriceFeed.js";
28
31
  import { RedstoneUpdater } from "./RedstoneUpdater.js";
29
32
  import { WstETHPriceFeedContract } from "./WstETHPriceFeed.js";
30
33
  import { YearnPriceFeedContract } from "./YearnPriceFeed.js";
@@ -63,35 +66,55 @@ class PriceFeedRegister extends SDKConstruct {
63
66
  return existing;
64
67
  }
65
68
  const feed = this.create(data);
69
+ if (!feed.loaded) {
70
+ throw new PartialPriceFeedInitError({ ...data, abi: [], name: "" });
71
+ }
66
72
  this.#feeds.upsert(data.baseParams.addr, feed);
67
73
  return feed;
68
74
  }
69
75
  /**
70
76
  * Loads PARTIAL information about all updatable price feeds from MarketCompressor
71
- * This can later be used to load price feed updates
77
+ * This is not saved anywhere in PriceFeedRegister, and can later be used to load price feed updates
72
78
  */
73
- async preloadUpdatablePriceFeeds(marketConfigurators, pools) {
74
- const feedsData = await this.#loadUpdatablePriceFeeds(
75
- marketConfigurators,
76
- pools
79
+ async getPartialUpdatablePriceFeeds(marketConfigurators, pools) {
80
+ const marketCompressorAddress = this.sdk.addressProvider.getAddress(
81
+ AP_MARKET_COMPRESSOR,
82
+ 310
77
83
  );
78
- for (const data of feedsData) {
79
- const feed = this.create({ baseParams: data });
80
- this.#feeds.upsert(feed.address, feed);
81
- }
84
+ const configurators = marketConfigurators ?? this.sdk.marketRegister.marketConfigurators.map((mc) => mc.address);
85
+ this.logger?.debug(
86
+ { configurators, pools },
87
+ "calling getUpdatablePriceFeeds"
88
+ );
89
+ const result = await this.provider.publicClient.readContract({
90
+ address: marketCompressorAddress,
91
+ abi: iMarketCompressorAbi,
92
+ functionName: "getUpdatablePriceFeeds",
93
+ args: [
94
+ {
95
+ configurators,
96
+ pools: pools ?? [],
97
+ underlying: ADDRESS_0X0
98
+ }
99
+ ]
100
+ });
101
+ this.logger?.debug(`loaded ${result.length} partial updatable price feeds`);
102
+ return result.map((baseParams) => this.#createUpdatableProxy({ baseParams }));
82
103
  }
83
104
  /**
84
105
  * Generates price update transaction via multicall3 without any market data knowledge
106
+ *
107
+ * @deprecated TODO: seems that it's not used anywhere
108
+ *
85
109
  * @param marketConfigurators
86
110
  * @param pools
87
111
  * @returns
88
112
  */
89
113
  async getUpdatePriceFeedsTx(marketConfigurators, pools) {
90
- const feedsData = await this.#loadUpdatablePriceFeeds(
114
+ const feeds = await this.getPartialUpdatablePriceFeeds(
91
115
  marketConfigurators,
92
116
  pools
93
117
  );
94
- const feeds = feedsData.map((data) => this.create({ baseParams: data }));
95
118
  const updates = await this.#generatePriceFeedsUpdateTxs(feeds);
96
119
  return createRawTx(
97
120
  getChainContractAddress({
@@ -115,7 +138,7 @@ class PriceFeedRegister extends SDKConstruct {
115
138
  const txs = [];
116
139
  const redstonePFs = [];
117
140
  for (const pf of updateables) {
118
- if (pf instanceof RedstonePriceFeedContract) {
141
+ if (isRedstone(pf)) {
119
142
  redstonePFs.push(pf);
120
143
  }
121
144
  }
@@ -142,34 +165,6 @@ class PriceFeedRegister extends SDKConstruct {
142
165
  }
143
166
  return result;
144
167
  }
145
- async #loadUpdatablePriceFeeds(marketConfigurators, pools) {
146
- const marketCompressorAddress = this.sdk.addressProvider.getAddress(
147
- AP_MARKET_COMPRESSOR,
148
- 310
149
- );
150
- const configurators = marketConfigurators ?? this.sdk.marketRegister.marketConfigurators.map((mc) => mc.address);
151
- this.logger?.debug(
152
- { configurators, pools },
153
- "calling getUpdatablePriceFeeds"
154
- );
155
- const result = await this.provider.publicClient.readContract({
156
- address: marketCompressorAddress,
157
- abi: iMarketCompressorAbi,
158
- functionName: "getUpdatablePriceFeeds",
159
- args: [
160
- {
161
- configurators,
162
- pools: pools ?? [],
163
- underlying: ADDRESS_0X0
164
- }
165
- ]
166
- // It's passed as ...rest in viem readContract action, but this might change
167
- // @ts-ignore
168
- // gas: 500_000_000n,
169
- });
170
- this.logger?.debug(`loaded ${result.length} updatable price feeds`);
171
- return result;
172
- }
173
168
  create(data) {
174
169
  const contractType = bytes32ToString(
175
170
  data.baseParams.contractType
@@ -219,6 +214,16 @@ class PriceFeedRegister extends SDKConstruct {
219
214
  }
220
215
  }
221
216
  }
217
+ #createUpdatableProxy(data) {
218
+ return new Proxy(this.create(data), {
219
+ get(target, prop) {
220
+ if (prop === "updatableDependencies") {
221
+ return () => [];
222
+ }
223
+ return target[prop];
224
+ }
225
+ });
226
+ }
222
227
  }
223
228
  export {
224
229
  PriceFeedRegister
@@ -76,6 +76,10 @@ class RedstonePriceFeedContract extends AbstractPriceFeedContract {
76
76
  };
77
77
  }
78
78
  }
79
+ function isRedstone(pf) {
80
+ return pf.contractType === "PRICE_FEED::REDSTONE";
81
+ }
79
82
  export {
80
- RedstonePriceFeedContract
83
+ RedstonePriceFeedContract,
84
+ isRedstone
81
85
  };
@@ -4,7 +4,7 @@ import {
4
4
  SDKConstruct
5
5
  } from "../sdk/index.js";
6
6
  import { AddressMap } from "../sdk/index.js";
7
- class GearboxZappersPlugin extends SDKConstruct {
7
+ class ZappersPlugin extends SDKConstruct {
8
8
  #zappers;
9
9
  async attach() {
10
10
  await this.loadZappers();
@@ -69,5 +69,5 @@ class GearboxZappersPlugin extends SDKConstruct {
69
69
  }
70
70
  }
71
71
  export {
72
- GearboxZappersPlugin
72
+ ZappersPlugin
73
73
  };
@@ -1,2 +1,2 @@
1
- export * from "./GearboxZappersPlugin.js";
2
1
  export * from "./types.js";
2
+ export * from "./ZappersPlugin.js";
@@ -1,6 +1,6 @@
1
1
  import type { BaseState, IBaseContract, IGearboxSDKPlugin } from "../sdk/index.js";
2
2
  import { SDKConstruct } from "../sdk/index.js";
3
- export declare class GearboxAdaptersPlugin extends SDKConstruct implements IGearboxSDKPlugin {
3
+ export declare class AdaptersPlugin extends SDKConstruct implements IGearboxSDKPlugin {
4
4
  readonly name = "Adapters";
5
5
  createContract(data: BaseState): IBaseContract | undefined;
6
6
  stateHuman(raw?: boolean): {};
@@ -1,5 +1,6 @@
1
1
  export * from "./abi/index.js";
2
2
  export * from "./AbstractAdapter.js";
3
+ export * from "./AdaptersPlugin.js";
3
4
  export * from "./BalancerV2VaultAdapterContract.js";
4
5
  export * from "./BalancerV3RouterAdapterContract.js";
5
6
  export * from "./CamelotV3AdapterContract.js";
@@ -14,7 +15,6 @@ export * from "./CurveV1StableNGAdapterContract.js";
14
15
  export * from "./DaiUsdsAdapterContract.js";
15
16
  export * from "./EqualizerRouterAdapterContract.js";
16
17
  export * from "./ERC4626AdapterContract.js";
17
- export * from "./GearboxAdaptersPlugin.js";
18
18
  export * from "./MellowERC4626VaultAdapterContract.js";
19
19
  export * from "./MellowVaultAdapterContract.js";
20
20
  export * from "./PendleRouterAdapterContract.js";
@@ -0,0 +1,18 @@
1
+ import type { Address } from "viem";
2
+ import type { GearboxSDK, IGearboxSDKPlugin } from "../sdk/index.js";
3
+ import { SDKConstruct } from "../sdk/index.js";
4
+ import { PartialLiquidationBotV300Contract } from "./PartialLiquidationBotV300Contract.js";
5
+ import type { BotsPluginStateHuman, BotState } from "./types.js";
6
+ export declare class UnsupportedBotVersionError extends Error {
7
+ readonly state: BotState;
8
+ constructor(state: BotState);
9
+ }
10
+ export declare class BotsPlugin extends SDKConstruct implements IGearboxSDKPlugin {
11
+ #private;
12
+ constructor(sdk: GearboxSDK);
13
+ attach(): Promise<void>;
14
+ syncState(): Promise<void>;
15
+ botsByMarketConfigurator(mc: Address): PartialLiquidationBotV300Contract[];
16
+ get allBots(): PartialLiquidationBotV300Contract[];
17
+ stateHuman(raw?: boolean): BotsPluginStateHuman;
18
+ }
@@ -0,0 +1,223 @@
1
+ import type { GearboxSDK } from "../sdk/index.js";
2
+ import { BaseContract } from "../sdk/index.js";
3
+ import type { BotParameters, BotState, BotStateV300Human, BotType } from "./types.js";
4
+ declare const abi: readonly [{
5
+ readonly type: "function";
6
+ readonly name: "feeScaleFactor";
7
+ readonly inputs: readonly [];
8
+ readonly outputs: readonly [{
9
+ readonly name: "";
10
+ readonly type: "uint16";
11
+ readonly internalType: "uint16";
12
+ }];
13
+ readonly stateMutability: "view";
14
+ }, {
15
+ readonly type: "function";
16
+ readonly name: "liquidateExactCollateral";
17
+ readonly inputs: readonly [{
18
+ readonly name: "creditAccount";
19
+ readonly type: "address";
20
+ readonly internalType: "address";
21
+ }, {
22
+ readonly name: "token";
23
+ readonly type: "address";
24
+ readonly internalType: "address";
25
+ }, {
26
+ readonly name: "seizedAmount";
27
+ readonly type: "uint256";
28
+ readonly internalType: "uint256";
29
+ }, {
30
+ readonly name: "maxRepaidAmount";
31
+ readonly type: "uint256";
32
+ readonly internalType: "uint256";
33
+ }, {
34
+ readonly name: "to";
35
+ readonly type: "address";
36
+ readonly internalType: "address";
37
+ }, {
38
+ readonly name: "priceUpdates";
39
+ readonly type: "tuple[]";
40
+ readonly internalType: "struct IPartialLiquidationBotV3.PriceUpdate[]";
41
+ readonly components: readonly [{
42
+ readonly name: "token";
43
+ readonly type: "address";
44
+ readonly internalType: "address";
45
+ }, {
46
+ readonly name: "reserve";
47
+ readonly type: "bool";
48
+ readonly internalType: "bool";
49
+ }, {
50
+ readonly name: "data";
51
+ readonly type: "bytes";
52
+ readonly internalType: "bytes";
53
+ }];
54
+ }];
55
+ readonly outputs: readonly [{
56
+ readonly name: "repaidAmount";
57
+ readonly type: "uint256";
58
+ readonly internalType: "uint256";
59
+ }];
60
+ readonly stateMutability: "nonpayable";
61
+ }, {
62
+ readonly type: "function";
63
+ readonly name: "liquidateExactDebt";
64
+ readonly inputs: readonly [{
65
+ readonly name: "creditAccount";
66
+ readonly type: "address";
67
+ readonly internalType: "address";
68
+ }, {
69
+ readonly name: "token";
70
+ readonly type: "address";
71
+ readonly internalType: "address";
72
+ }, {
73
+ readonly name: "repaidAmount";
74
+ readonly type: "uint256";
75
+ readonly internalType: "uint256";
76
+ }, {
77
+ readonly name: "minSeizedAmount";
78
+ readonly type: "uint256";
79
+ readonly internalType: "uint256";
80
+ }, {
81
+ readonly name: "to";
82
+ readonly type: "address";
83
+ readonly internalType: "address";
84
+ }, {
85
+ readonly name: "priceUpdates";
86
+ readonly type: "tuple[]";
87
+ readonly internalType: "struct IPartialLiquidationBotV3.PriceUpdate[]";
88
+ readonly components: readonly [{
89
+ readonly name: "token";
90
+ readonly type: "address";
91
+ readonly internalType: "address";
92
+ }, {
93
+ readonly name: "reserve";
94
+ readonly type: "bool";
95
+ readonly internalType: "bool";
96
+ }, {
97
+ readonly name: "data";
98
+ readonly type: "bytes";
99
+ readonly internalType: "bytes";
100
+ }];
101
+ }];
102
+ readonly outputs: readonly [{
103
+ readonly name: "seizedAmount";
104
+ readonly type: "uint256";
105
+ readonly internalType: "uint256";
106
+ }];
107
+ readonly stateMutability: "nonpayable";
108
+ }, {
109
+ readonly type: "function";
110
+ readonly name: "maxHealthFactor";
111
+ readonly inputs: readonly [];
112
+ readonly outputs: readonly [{
113
+ readonly name: "";
114
+ readonly type: "uint16";
115
+ readonly internalType: "uint16";
116
+ }];
117
+ readonly stateMutability: "view";
118
+ }, {
119
+ readonly type: "function";
120
+ readonly name: "minHealthFactor";
121
+ readonly inputs: readonly [];
122
+ readonly outputs: readonly [{
123
+ readonly name: "";
124
+ readonly type: "uint16";
125
+ readonly internalType: "uint16";
126
+ }];
127
+ readonly stateMutability: "view";
128
+ }, {
129
+ readonly type: "function";
130
+ readonly name: "premiumScaleFactor";
131
+ readonly inputs: readonly [];
132
+ readonly outputs: readonly [{
133
+ readonly name: "";
134
+ readonly type: "uint16";
135
+ readonly internalType: "uint16";
136
+ }];
137
+ readonly stateMutability: "view";
138
+ }, {
139
+ readonly type: "function";
140
+ readonly name: "treasury";
141
+ readonly inputs: readonly [];
142
+ readonly outputs: readonly [{
143
+ readonly name: "";
144
+ readonly type: "address";
145
+ readonly internalType: "address";
146
+ }];
147
+ readonly stateMutability: "view";
148
+ }, {
149
+ readonly type: "function";
150
+ readonly name: "version";
151
+ readonly inputs: readonly [];
152
+ readonly outputs: readonly [{
153
+ readonly name: "";
154
+ readonly type: "uint256";
155
+ readonly internalType: "uint256";
156
+ }];
157
+ readonly stateMutability: "view";
158
+ }, {
159
+ readonly type: "event";
160
+ readonly name: "LiquidatePartial";
161
+ readonly inputs: readonly [{
162
+ readonly name: "creditManager";
163
+ readonly type: "address";
164
+ readonly indexed: true;
165
+ readonly internalType: "address";
166
+ }, {
167
+ readonly name: "creditAccount";
168
+ readonly type: "address";
169
+ readonly indexed: true;
170
+ readonly internalType: "address";
171
+ }, {
172
+ readonly name: "token";
173
+ readonly type: "address";
174
+ readonly indexed: true;
175
+ readonly internalType: "address";
176
+ }, {
177
+ readonly name: "repaidDebt";
178
+ readonly type: "uint256";
179
+ readonly indexed: false;
180
+ readonly internalType: "uint256";
181
+ }, {
182
+ readonly name: "seizedCollateral";
183
+ readonly type: "uint256";
184
+ readonly indexed: false;
185
+ readonly internalType: "uint256";
186
+ }, {
187
+ readonly name: "fee";
188
+ readonly type: "uint256";
189
+ readonly indexed: false;
190
+ readonly internalType: "uint256";
191
+ }];
192
+ readonly anonymous: false;
193
+ }, {
194
+ readonly type: "error";
195
+ readonly name: "LiquidatedLessThanNeededException";
196
+ readonly inputs: readonly [];
197
+ }, {
198
+ readonly type: "error";
199
+ readonly name: "LiquidatedMoreThanNeededException";
200
+ readonly inputs: readonly [];
201
+ }, {
202
+ readonly type: "error";
203
+ readonly name: "RepaidMoreThanAllowedException";
204
+ readonly inputs: readonly [];
205
+ }, {
206
+ readonly type: "error";
207
+ readonly name: "SeizedLessThanRequiredException";
208
+ readonly inputs: readonly [];
209
+ }, {
210
+ readonly type: "error";
211
+ readonly name: "UnderlyingNotLiquidatableException";
212
+ readonly inputs: readonly [];
213
+ }];
214
+ type abi = typeof abi;
215
+ export interface PartialLiquidationBotV300Contract extends BotParameters, BaseContract<abi> {
216
+ }
217
+ export declare class PartialLiquidationBotV300Contract extends BaseContract<abi> {
218
+ readonly requiredPermissions: bigint;
219
+ readonly botType: BotType;
220
+ constructor(sdk: GearboxSDK, args: BotState, params: BotParameters, type: BotType);
221
+ stateHuman(raw?: boolean): BotStateV300Human;
222
+ }
223
+ export {};