@gearbox-protocol/sdk 14.12.0-next.56 → 14.12.0-next.58

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 (53) hide show
  1. package/dist/cjs/abi/ILiquidationCompressorV313.js +43 -1
  2. package/dist/cjs/abi/IWithdrawalCompressorV313.js +71 -41
  3. package/dist/cjs/abi/compressors/liquidationCompressor.js +43 -1
  4. package/dist/cjs/abi/compressors/rwaCompressor.js +4 -4
  5. package/dist/cjs/abi/compressors/subcompressors/liquidation/midasLiquidationSubcompressor.js +43 -1
  6. package/dist/cjs/abi/compressors/subcompressors/liquidation/securitizeLiquidationSubcompressor.js +43 -1
  7. package/dist/cjs/abi/compressors/subcompressors/withdrawal/midasWithdrawalSubcompressor.js +20 -0
  8. package/dist/cjs/abi/compressors/subcompressors/withdrawal/securitizeRedemptionSubcompressor.js +20 -0
  9. package/dist/cjs/abi/compressors/withdrawalCompressor.js +30 -0
  10. package/dist/cjs/plugins/adapters/abi/actionAbi.js +8 -2
  11. package/dist/cjs/plugins/adapters/abi/conctructorAbi.js +8 -2
  12. package/dist/cjs/plugins/adapters/contracts/MidasRedemptionVaultAdapterContract.js +67 -36
  13. package/dist/cjs/sdk/accounts/liquidations/LiquidationsService.js +27 -43
  14. package/dist/cjs/sdk/accounts/liquidations/constants.js +1 -1
  15. package/dist/cjs/sdk/accounts/liquidations/helpers.js +4 -2
  16. package/dist/cjs/sdk/accounts/withdrawal-compressor/AbstractWithdrawalCompressorContract.js +12 -0
  17. package/dist/cjs/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.js +10 -0
  18. package/dist/cjs/sdk/accounts/withdrawal-compressor/addresses.js +1 -1
  19. package/dist/esm/abi/ILiquidationCompressorV313.js +43 -1
  20. package/dist/esm/abi/IWithdrawalCompressorV313.js +71 -41
  21. package/dist/esm/abi/compressors/liquidationCompressor.js +43 -1
  22. package/dist/esm/abi/compressors/rwaCompressor.js +4 -4
  23. package/dist/esm/abi/compressors/subcompressors/liquidation/midasLiquidationSubcompressor.js +43 -1
  24. package/dist/esm/abi/compressors/subcompressors/liquidation/securitizeLiquidationSubcompressor.js +43 -1
  25. package/dist/esm/abi/compressors/subcompressors/withdrawal/midasWithdrawalSubcompressor.js +20 -0
  26. package/dist/esm/abi/compressors/subcompressors/withdrawal/securitizeRedemptionSubcompressor.js +20 -0
  27. package/dist/esm/abi/compressors/withdrawalCompressor.js +30 -0
  28. package/dist/esm/plugins/adapters/abi/actionAbi.js +8 -2
  29. package/dist/esm/plugins/adapters/abi/conctructorAbi.js +8 -2
  30. package/dist/esm/plugins/adapters/contracts/MidasRedemptionVaultAdapterContract.js +67 -36
  31. package/dist/esm/sdk/accounts/liquidations/LiquidationsService.js +29 -45
  32. package/dist/esm/sdk/accounts/liquidations/constants.js +1 -1
  33. package/dist/esm/sdk/accounts/liquidations/helpers.js +4 -2
  34. package/dist/esm/sdk/accounts/withdrawal-compressor/AbstractWithdrawalCompressorContract.js +12 -0
  35. package/dist/esm/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.js +10 -0
  36. package/dist/esm/sdk/accounts/withdrawal-compressor/addresses.js +1 -1
  37. package/dist/types/abi/ILiquidationCompressorV313.d.ts +36 -1
  38. package/dist/types/abi/IWithdrawalCompressorV313.d.ts +62 -38
  39. package/dist/types/abi/compressors/liquidationCompressor.d.ts +36 -1
  40. package/dist/types/abi/compressors/rwaCompressor.d.ts +4 -4
  41. package/dist/types/abi/compressors/subcompressors/liquidation/midasLiquidationSubcompressor.d.ts +36 -1
  42. package/dist/types/abi/compressors/subcompressors/liquidation/securitizeLiquidationSubcompressor.d.ts +36 -1
  43. package/dist/types/abi/compressors/subcompressors/withdrawal/midasWithdrawalSubcompressor.d.ts +16 -0
  44. package/dist/types/abi/compressors/subcompressors/withdrawal/securitizeRedemptionSubcompressor.d.ts +16 -0
  45. package/dist/types/abi/compressors/withdrawalCompressor.d.ts +24 -0
  46. package/dist/types/permissionless/bindings/compressors/withdrawal-compressor.d.ts +24 -0
  47. package/dist/types/plugins/adapters/contracts/MidasRedemptionVaultAdapterContract.d.ts +8 -5
  48. package/dist/types/sdk/accounts/liquidations/helpers.d.ts +8 -1
  49. package/dist/types/sdk/accounts/liquidations/types.d.ts +27 -5
  50. package/dist/types/sdk/accounts/withdrawal-compressor/AbstractWithdrawalCompressorContract.d.ts +3 -3
  51. package/dist/types/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.d.ts +62 -38
  52. package/dist/types/sdk/accounts/withdrawal-compressor/types.d.ts +10 -0
  53. package/package.json +1 -1
@@ -9,6 +9,7 @@ let viem = require("viem");
9
9
  const abi = require_plugins_adapters_abi_adapters_iMidasRedemptionVaultAdapterV310.iMidasRedemptionVaultAdapterV310Abi;
10
10
  const protocolAbi = require_plugins_adapters_abi_adapters_iMidasRedemptionVaultAdapterV310.iMidasRedemptionVaultGatewayV310Abi;
11
11
  var MidasRedemptionVaultAdapterContract = class extends require_plugins_adapters_contracts_AbstractAdapter.AbstractAdapterContract {
12
+ #version;
12
13
  #gateway;
13
14
  #mToken;
14
15
  #allowedTokens;
@@ -19,41 +20,68 @@ var MidasRedemptionVaultAdapterContract = class extends require_plugins_adapters
19
20
  protocolAbi
20
21
  });
21
22
  if (args.baseParams.serializedParams) {
22
- const decoded = (0, viem.decodeAbiParameters)([
23
- {
24
- type: "address",
25
- name: "creditManager"
26
- },
27
- {
28
- type: "address",
29
- name: "targetContract"
30
- },
31
- {
32
- type: "address",
33
- name: "gateway"
34
- },
35
- {
36
- type: "address",
37
- name: "mToken"
38
- },
39
- {
40
- type: "address[]",
41
- name: "allowedTokens"
42
- },
43
- {
44
- type: "address[]",
45
- name: "allowedPhantomTokens"
46
- }
47
- ], args.baseParams.serializedParams);
48
- this.#gateway = decoded[2];
49
- this.#mToken = decoded[3];
50
- this.#allowedTokens = decoded[4].map((token, index) => ({
51
- token,
52
- phantomToken: decoded[5][index]
53
- }));
23
+ const version = Number(args.baseParams.version);
24
+ this.#version = version;
25
+ if (version <= 310) {
26
+ const decoded = (0, viem.decodeAbiParameters)([
27
+ {
28
+ type: "address",
29
+ name: "creditManager"
30
+ },
31
+ {
32
+ type: "address",
33
+ name: "targetContract"
34
+ },
35
+ {
36
+ type: "address",
37
+ name: "gateway"
38
+ },
39
+ {
40
+ type: "address",
41
+ name: "mToken"
42
+ },
43
+ {
44
+ type: "address[]",
45
+ name: "allowedTokens"
46
+ },
47
+ {
48
+ type: "address[]",
49
+ name: "allowedPhantomTokens"
50
+ }
51
+ ], args.baseParams.serializedParams);
52
+ this.#gateway = decoded[2];
53
+ this.#mToken = decoded[3];
54
+ this.#allowedTokens = decoded[4].map((token, index) => ({
55
+ token,
56
+ phantomToken: decoded[5][index]
57
+ }));
58
+ } else {
59
+ const decoded = (0, viem.decodeAbiParameters)([
60
+ {
61
+ type: "address",
62
+ name: "creditManager"
63
+ },
64
+ {
65
+ type: "address",
66
+ name: "targetContract"
67
+ },
68
+ {
69
+ type: "address",
70
+ name: "mToken"
71
+ },
72
+ {
73
+ type: "address[]",
74
+ name: "supportedInputTokens"
75
+ }
76
+ ], args.baseParams.serializedParams);
77
+ this.#mToken = decoded[2];
78
+ this.#allowedTokens = [...decoded[3]];
79
+ }
54
80
  }
55
81
  }
56
82
  get gateway() {
83
+ if (!this.#version) throw new require_sdk_base_errors.MissingSerializedParamsError("version");
84
+ if (this.#version > 310) return void 0;
57
85
  if (!this.#gateway) throw new require_sdk_base_errors.MissingSerializedParamsError("gateway");
58
86
  return this.#gateway;
59
87
  }
@@ -70,10 +98,13 @@ var MidasRedemptionVaultAdapterContract = class extends require_plugins_adapters
70
98
  ...super.stateHuman(raw),
71
99
  gateway: this.#gateway ? this.labelAddress(this.#gateway) : void 0,
72
100
  mToken: this.#mToken ? this.labelAddress(this.#mToken) : void 0,
73
- allowedTokens: this.#allowedTokens?.map((t) => ({
74
- token: this.labelAddress(t.token),
75
- phantomToken: this.labelAddress(t.phantomToken)
76
- }))
101
+ allowedTokens: this.#allowedTokens?.map((t) => {
102
+ if (typeof t === "object") return {
103
+ token: this.labelAddress(t.token),
104
+ phantomToken: this.labelAddress(t.phantomToken)
105
+ };
106
+ return { token: this.labelAddress(t) };
107
+ })
77
108
  };
78
109
  }
79
110
  async applyBalanceChanges(balances, decoded) {
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_abi_ILiquidationCompressorV313 = require("../../../abi/ILiquidationCompressorV313.js");
3
- const require_abi_iPhantomToken = require("../../../abi/iPhantomToken.js");
4
3
  const require_sdk_utils_AddressSet = require("../../utils/AddressSet.js");
4
+ const require_sdk_utils_bytes32ToString = require("../../utils/bytes32ToString.js");
5
5
  const require_sdk_constants_addresses = require("../../constants/addresses.js");
6
6
  const require_sdk_constants_math = require("../../constants/math.js");
7
7
  require("../../constants/index.js");
@@ -16,7 +16,6 @@ const require_sdk_market_rwa_securitize_constants = require("../../market/rwa/se
16
16
  const require_sdk_market_rwa_securitize_SecuritizeLiquidatorContract = require("../../market/rwa/securitize/SecuritizeLiquidatorContract.js");
17
17
  require("../../market/rwa/securitize/index.js");
18
18
  const require_sdk_accounts_liquidations_constants = require("./constants.js");
19
- const require_abi_rwa_iRWAGateway = require("../../../abi/rwa/iRWAGateway.js");
20
19
  const require_sdk_accounts_liquidations_helpers = require("./helpers.js");
21
20
  //#region src/sdk/accounts/liquidations/LiquidationsService.ts
22
21
  /**
@@ -66,20 +65,21 @@ var LiquidationsService = class extends require_sdk_base_SDKConstruct.SDKConstru
66
65
  return {
67
66
  ...account,
68
67
  repaymentAmount: {
69
- token: account.totalValue.token,
70
- balance: data.requiredUnderlyingAmount
68
+ token: require_sdk_utils_hex.hexEq(data.requiredToken, "0x0000000000000000000000000000000000000000") ? account.totalValue.token : data.requiredToken,
69
+ balance: data.requiredAmount
71
70
  },
72
71
  isDelayed: data.expectedOutputs.some((o) => o.delayed),
73
72
  receivedAssets: require_sdk_accounts_liquidations_helpers.toReceivedAssets(data.expectedOutputs),
74
73
  isLiquidatorEligible: data.isLiquidatorEligible,
74
+ isCreditAccountFrozen: data.isCreditAccountFrozen,
75
75
  kycProtocol: data.kycProtocol || void 0,
76
76
  kycToken: require_sdk_utils_hex.hexEq(data.kycToken, "0x0000000000000000000000000000000000000000") ? void 0 : data.kycToken,
77
77
  approve: require_sdk_accounts_liquidations_helpers.toLiquidationApproval({
78
78
  target: data.liquidationCall.target,
79
79
  creditFacade: suite.creditFacade.address,
80
80
  creditManager: ca.creditManager,
81
- token: suite.underlying,
82
- amount: data.requiredUnderlyingAmount
81
+ token: data.requiredToken,
82
+ amount: data.requiredAmount
83
83
  })
84
84
  };
85
85
  }
@@ -107,56 +107,39 @@ var LiquidationsService = class extends require_sdk_base_SDKConstruct.SDKConstru
107
107
  * {@inheritDoc ILiquidationsService.loadRWALiquidators}
108
108
  **/
109
109
  async loadRWALiquidators() {
110
- await this.sdk.tokensMeta.loadTokenData();
111
- const phantomTokens = [];
112
- for (const meta of this.sdk.tokensMeta.phantomTokens.values()) switch (meta.contractType) {
113
- case require_sdk_market_rwa_securitize_constants.PHANTOM_TOKEN_SECURITIZE_REDEMPTION:
114
- case require_sdk_market_rwa_midas_constants.PHANTOM_TOKEN_MIDAS_REDEMPTION: phantomTokens.push(meta);
115
- }
116
- if (phantomTokens.length === 0) return;
117
- const ptResp = await this.client.multicall({
118
- contracts: phantomTokens.map(({ addr }) => ({
119
- address: addr,
120
- abi: require_abi_iPhantomToken.iPhantomTokenAbi,
121
- functionName: "getPhantomTokenInfo"
122
- })),
123
- allowFailure: false,
124
- batchSize: 0
125
- });
126
- const gateways = phantomTokens.map(({ contractType }, i) => ({
127
- gateway: ptResp[i][0],
128
- contractType
129
- }));
130
- const gwResp = await this.client.multicall({
131
- contracts: gateways.map(({ gateway }) => ({
132
- address: gateway,
133
- abi: require_abi_rwa_iRWAGateway.iRWAGatewayAbi,
134
- functionName: "transferMaster"
110
+ const configurators = this.sdk.marketRegister.marketConfigurators;
111
+ if (configurators.length === 0) return;
112
+ const resp = await this.client.multicall({
113
+ contracts: configurators.map((mc) => ({
114
+ address: require_sdk_accounts_liquidations_constants.LIQUIDATION_COMPRESSOR_V313_ADDRESS,
115
+ abi: require_abi_ILiquidationCompressorV313.iLiquidationCompressorV313Abi,
116
+ functionName: "getRWALiquidators",
117
+ args: [mc.address]
135
118
  })),
136
119
  allowFailure: false,
137
120
  batchSize: 0
138
121
  });
139
- const refs = gateways.map(({ contractType }, i) => ({
140
- liquidator: gwResp[i],
141
- contractType
142
- }));
143
- for (const ref of refs) this.#createRWALiquidator(ref);
122
+ for (const info of resp.flat()) this.#createRWALiquidator(info);
144
123
  }
145
124
  /**
146
125
  * Instantiates the liquidator contract, which registers it and labels its
147
126
  * address (see `BaseContract`).
148
127
  *
149
- * @param ref - Discovered liquidator address and its phantom token type
128
+ * @param info - Liquidator discovered by the compressor. The same gateway
129
+ * can be configured in several credit managers, so duplicates are expected
130
+ * and skipped.
150
131
  **/
151
- #createRWALiquidator(ref) {
152
- const { liquidator, contractType } = ref;
132
+ #createRWALiquidator(info) {
133
+ const liquidator = info.liquidatorAddress;
153
134
  if (this.sdk.getContract(liquidator)) return;
154
- switch (contractType) {
155
- case require_sdk_market_rwa_securitize_constants.PHANTOM_TOKEN_SECURITIZE_REDEMPTION:
135
+ switch (require_sdk_utils_bytes32ToString.bytes32ToString(info.contractType)) {
136
+ case require_sdk_market_rwa_securitize_constants.RWA_LIQUIDATOR_SECURITIZE:
156
137
  new require_sdk_market_rwa_securitize_SecuritizeLiquidatorContract.SecuritizeLiquidatorContract(this.sdk, liquidator);
138
+ this.logger?.debug(`registered Securitize liquidator ${liquidator}`);
157
139
  return;
158
- case require_sdk_market_rwa_midas_constants.PHANTOM_TOKEN_MIDAS_REDEMPTION:
140
+ case require_sdk_market_rwa_midas_constants.RWA_LIQUIDATOR_MIDAS:
159
141
  new require_sdk_market_rwa_midas_MidasLiquidatorContract.MidasLiquidatorContract(this.sdk, liquidator);
142
+ this.logger?.debug(`registered Midas liquidator ${liquidator}`);
160
143
  return;
161
144
  }
162
145
  }
@@ -251,7 +234,8 @@ var LiquidationsService = class extends require_sdk_base_SDKConstruct.SDKConstru
251
234
  token: unwrappedUnderlying,
252
235
  balance: require_sdk_accounts_liquidations_helpers.calcEstimatedProfit(ca.totalValue, liquidationDiscount)
253
236
  },
254
- isDelayed: ca.tokens.some((t) => t.balance > 10n && !!compressor?.getWithdrawalSourceToken(t.token))
237
+ isDelayed: ca.tokens.some((t) => t.balance > 10n && !!compressor?.getWithdrawalSourceToken(t.token)),
238
+ paused: suite.creditFacade.isPaused
255
239
  };
256
240
  }
257
241
  };
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  //#region src/sdk/accounts/liquidations/constants.ts
3
- const LIQUIDATION_COMPRESSOR_V313_ADDRESS = "0x04c5c47c3b9e29ce98fdd27103fbb6a0815b1712";
3
+ const LIQUIDATION_COMPRESSOR_V313_ADDRESS = "0xB70C4500a0afF02107eB983a348F22492fB6dC94";
4
4
  //#endregion
5
5
  exports.LIQUIDATION_COMPRESSOR_V313_ADDRESS = LIQUIDATION_COMPRESSOR_V313_ADDRESS;
@@ -76,14 +76,16 @@ function toLiquidatorWithdrawals(current, network) {
76
76
  network,
77
77
  sourceToken: w.token,
78
78
  token: o.token,
79
- amount: o.amount
79
+ amount: o.amount,
80
+ redeemer: w.redeemer
80
81
  });
81
82
  for (const w of current.pending) for (const o of w.expectedOutputs) rows.push({
82
83
  network,
83
84
  sourceToken: w.token,
84
85
  token: o.token,
85
86
  amount: o.amount,
86
- claimableAt: w.claimableAt
87
+ claimableAt: w.claimableAt,
88
+ redeemer: w.redeemer
87
89
  });
88
90
  return rows;
89
91
  }
@@ -1,5 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_sdk_utils_AddressMap = require("../../utils/AddressMap.js");
3
+ require("../../constants/addresses.js");
4
+ require("../../constants/index.js");
5
+ const require_sdk_utils_hex = require("../../utils/hex.js");
3
6
  require("../../utils/index.js");
4
7
  const require_sdk_base_BaseContract = require("../../base/BaseContract.js");
5
8
  require("../../base/index.js");
@@ -201,6 +204,13 @@ function toRequestableWithdrawal(resp) {
201
204
  };
202
205
  }
203
206
  /**
207
+ * Normalizes the redeemer of a withdrawal: legacy compressors do not report
208
+ * one, and v313+ uses the zero address for "not applicable".
209
+ **/
210
+ function toRedeemer(redeemer) {
211
+ return !redeemer || require_sdk_utils_hex.hexEq(redeemer, "0x0000000000000000000000000000000000000000") ? void 0 : redeemer;
212
+ }
213
+ /**
204
214
  * Normalizes a claimable withdrawal. The intent is decoded from `extraData`
205
215
  * only when `creditManager` is provided (it is required to build
206
216
  * {@link DelayedIntentExtended} and is only meaningful for credit account
@@ -218,6 +228,7 @@ function toClaimableWithdrawal(w, creditManager) {
218
228
  withdrawalTokenSpent: w.withdrawalTokenSpent,
219
229
  outputs: [...w.outputs],
220
230
  claimCalls: [...w.claimCalls],
231
+ redeemer: toRedeemer(w.redeemer),
221
232
  intent
222
233
  };
223
234
  }
@@ -236,6 +247,7 @@ function toPendingWithdrawal(w, creditManager) {
236
247
  withdrawalPhantomToken: w.withdrawalPhantomToken,
237
248
  expectedOutputs: [...w.expectedOutputs],
238
249
  claimableAt: w.claimableAt,
250
+ redeemer: toRedeemer(w.redeemer),
239
251
  intent
240
252
  };
241
253
  }
@@ -79,6 +79,11 @@ const iExternalWithdrawalsBatchAbi = [{
79
79
  internalType: "bytes"
80
80
  }]
81
81
  },
82
+ {
83
+ name: "redeemer",
84
+ type: "address",
85
+ internalType: "address"
86
+ },
82
87
  {
83
88
  name: "extraData",
84
89
  type: "bytes",
@@ -127,6 +132,11 @@ const iExternalWithdrawalsBatchAbi = [{
127
132
  type: "uint256",
128
133
  internalType: "uint256"
129
134
  },
135
+ {
136
+ name: "redeemer",
137
+ type: "address",
138
+ internalType: "address"
139
+ },
130
140
  {
131
141
  name: "extraData",
132
142
  type: "bytes",
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  //#region src/sdk/accounts/withdrawal-compressor/addresses.ts
3
3
  const WITHDRAWAL_COMPRESSORS = {
4
4
  Mainnet: {
5
- address: "0x5c80d7e7b18eCb00Cc9FAd57c59eEC4eF7516597",
5
+ address: "0x6FA0c5404C31D0161bb39Cc1311aac998A38ecD5",
6
6
  version: 313
7
7
  },
8
8
  Monad: {
@@ -46,7 +46,12 @@ const iLiquidationCompressorV313Abi = [
46
46
  internalType: "struct LiquidationData",
47
47
  components: [
48
48
  {
49
- name: "requiredUnderlyingAmount",
49
+ name: "requiredToken",
50
+ type: "address",
51
+ internalType: "address"
52
+ },
53
+ {
54
+ name: "requiredAmount",
50
55
  type: "uint256",
51
56
  internalType: "uint256"
52
57
  },
@@ -101,6 +106,11 @@ const iLiquidationCompressorV313Abi = [
101
106
  type: "bool",
102
107
  internalType: "bool"
103
108
  },
109
+ {
110
+ name: "isCreditAccountFrozen",
111
+ type: "bool",
112
+ internalType: "bool"
113
+ },
104
114
  {
105
115
  name: "kycProtocol",
106
116
  type: "string",
@@ -115,6 +125,38 @@ const iLiquidationCompressorV313Abi = [
115
125
  }],
116
126
  stateMutability: "nonpayable"
117
127
  },
128
+ {
129
+ type: "function",
130
+ name: "getRWALiquidators",
131
+ inputs: [{
132
+ name: "marketConfigurator",
133
+ type: "address",
134
+ internalType: "address"
135
+ }],
136
+ outputs: [{
137
+ name: "",
138
+ type: "tuple[]",
139
+ internalType: "struct RWALiquidatorInfo[]",
140
+ components: [
141
+ {
142
+ name: "gateway",
143
+ type: "address",
144
+ internalType: "address"
145
+ },
146
+ {
147
+ name: "liquidatorAddress",
148
+ type: "address",
149
+ internalType: "address"
150
+ },
151
+ {
152
+ name: "contractType",
153
+ type: "bytes32",
154
+ internalType: "bytes32"
155
+ }
156
+ ]
157
+ }],
158
+ stateMutability: "view"
159
+ },
118
160
  {
119
161
  type: "function",
120
162
  name: "version",
@@ -75,6 +75,11 @@ const iWithdrawalCompressorV313Abi = [
75
75
  internalType: "bytes"
76
76
  }]
77
77
  },
78
+ {
79
+ name: "redeemer",
80
+ type: "address",
81
+ internalType: "address"
82
+ },
78
83
  {
79
84
  name: "extraData",
80
85
  type: "bytes",
@@ -123,6 +128,11 @@ const iWithdrawalCompressorV313Abi = [
123
128
  type: "uint256",
124
129
  internalType: "uint256"
125
130
  },
131
+ {
132
+ name: "redeemer",
133
+ type: "address",
134
+ internalType: "address"
135
+ },
126
136
  {
127
137
  name: "extraData",
128
138
  type: "bytes",
@@ -136,9 +146,9 @@ const iWithdrawalCompressorV313Abi = [
136
146
  type: "function",
137
147
  name: "getExternalAccountCurrentWithdrawals",
138
148
  inputs: [{
139
- name: "withdrawalToken",
140
- type: "address",
141
- internalType: "address"
149
+ name: "withdrawalTokens",
150
+ type: "address[]",
151
+ internalType: "address[]"
142
152
  }, {
143
153
  name: "account",
144
154
  type: "address",
@@ -200,6 +210,11 @@ const iWithdrawalCompressorV313Abi = [
200
210
  internalType: "bytes"
201
211
  }]
202
212
  },
213
+ {
214
+ name: "redeemer",
215
+ type: "address",
216
+ internalType: "address"
217
+ },
203
218
  {
204
219
  name: "extraData",
205
220
  type: "bytes",
@@ -248,6 +263,11 @@ const iWithdrawalCompressorV313Abi = [
248
263
  type: "uint256",
249
264
  internalType: "uint256"
250
265
  },
266
+ {
267
+ name: "redeemer",
268
+ type: "address",
269
+ internalType: "address"
270
+ },
251
271
  {
252
272
  name: "extraData",
253
273
  type: "bytes",
@@ -261,9 +281,9 @@ const iWithdrawalCompressorV313Abi = [
261
281
  type: "function",
262
282
  name: "getExternalAccountCurrentWithdrawals",
263
283
  inputs: [{
264
- name: "withdrawalTokens",
265
- type: "address[]",
266
- internalType: "address[]"
284
+ name: "withdrawalToken",
285
+ type: "address",
286
+ internalType: "address"
267
287
  }, {
268
288
  name: "account",
269
289
  type: "address",
@@ -325,6 +345,11 @@ const iWithdrawalCompressorV313Abi = [
325
345
  internalType: "bytes"
326
346
  }]
327
347
  },
348
+ {
349
+ name: "redeemer",
350
+ type: "address",
351
+ internalType: "address"
352
+ },
328
353
  {
329
354
  name: "extraData",
330
355
  type: "bytes",
@@ -373,6 +398,11 @@ const iWithdrawalCompressorV313Abi = [
373
398
  type: "uint256",
374
399
  internalType: "uint256"
375
400
  },
401
+ {
402
+ name: "redeemer",
403
+ type: "address",
404
+ internalType: "address"
405
+ },
376
406
  {
377
407
  name: "extraData",
378
408
  type: "bytes",
@@ -382,36 +412,6 @@ const iWithdrawalCompressorV313Abi = [
382
412
  }],
383
413
  stateMutability: "view"
384
414
  },
385
- {
386
- type: "function",
387
- name: "getWithdrawalStatus",
388
- inputs: [{
389
- name: "redeemer",
390
- type: "address",
391
- internalType: "address"
392
- }],
393
- outputs: [{
394
- name: "",
395
- type: "uint8",
396
- internalType: "enum WithdrawalStatus"
397
- }],
398
- stateMutability: "view"
399
- },
400
- {
401
- type: "function",
402
- name: "getWithdrawalStatus",
403
- inputs: [{
404
- name: "redeemers",
405
- type: "address[]",
406
- internalType: "address[]"
407
- }],
408
- outputs: [{
409
- name: "",
410
- type: "uint8[]",
411
- internalType: "enum WithdrawalStatus[]"
412
- }],
413
- stateMutability: "view"
414
- },
415
415
  {
416
416
  type: "function",
417
417
  name: "getWithdrawableAssets",
@@ -558,11 +558,6 @@ const iWithdrawalCompressorV313Abi = [
558
558
  type: "address",
559
559
  internalType: "address"
560
560
  },
561
- {
562
- name: "withdrawalToken",
563
- type: "address",
564
- internalType: "address"
565
- },
566
561
  {
567
562
  name: "amount",
568
563
  type: "uint256",
@@ -643,6 +638,11 @@ const iWithdrawalCompressorV313Abi = [
643
638
  type: "address",
644
639
  internalType: "address"
645
640
  },
641
+ {
642
+ name: "withdrawalToken",
643
+ type: "address",
644
+ internalType: "address"
645
+ },
646
646
  {
647
647
  name: "amount",
648
648
  type: "uint256",
@@ -709,6 +709,36 @@ const iWithdrawalCompressorV313Abi = [
709
709
  }],
710
710
  stateMutability: "view"
711
711
  },
712
+ {
713
+ type: "function",
714
+ name: "getWithdrawalStatus",
715
+ inputs: [{
716
+ name: "redeemers",
717
+ type: "address[]",
718
+ internalType: "address[]"
719
+ }],
720
+ outputs: [{
721
+ name: "",
722
+ type: "uint8[]",
723
+ internalType: "enum WithdrawalStatus[]"
724
+ }],
725
+ stateMutability: "view"
726
+ },
727
+ {
728
+ type: "function",
729
+ name: "getWithdrawalStatus",
730
+ inputs: [{
731
+ name: "redeemer",
732
+ type: "address",
733
+ internalType: "address"
734
+ }],
735
+ outputs: [{
736
+ name: "",
737
+ type: "uint8",
738
+ internalType: "enum WithdrawalStatus"
739
+ }],
740
+ stateMutability: "view"
741
+ },
712
742
  {
713
743
  type: "function",
714
744
  name: "version",
@@ -89,7 +89,12 @@ const liquidationCompressorAbi = [
89
89
  internalType: "struct LiquidationData",
90
90
  components: [
91
91
  {
92
- name: "requiredUnderlyingAmount",
92
+ name: "requiredToken",
93
+ type: "address",
94
+ internalType: "address"
95
+ },
96
+ {
97
+ name: "requiredAmount",
93
98
  type: "uint256",
94
99
  internalType: "uint256"
95
100
  },
@@ -144,6 +149,11 @@ const liquidationCompressorAbi = [
144
149
  type: "bool",
145
150
  internalType: "bool"
146
151
  },
152
+ {
153
+ name: "isCreditAccountFrozen",
154
+ type: "bool",
155
+ internalType: "bool"
156
+ },
147
157
  {
148
158
  name: "kycProtocol",
149
159
  type: "string",
@@ -158,6 +168,38 @@ const liquidationCompressorAbi = [
158
168
  }],
159
169
  stateMutability: "nonpayable"
160
170
  },
171
+ {
172
+ type: "function",
173
+ name: "getRWALiquidators",
174
+ inputs: [{
175
+ name: "marketConfigurator",
176
+ type: "address",
177
+ internalType: "address"
178
+ }],
179
+ outputs: [{
180
+ name: "liquidators",
181
+ type: "tuple[]",
182
+ internalType: "struct RWALiquidatorInfo[]",
183
+ components: [
184
+ {
185
+ name: "gateway",
186
+ type: "address",
187
+ internalType: "address"
188
+ },
189
+ {
190
+ name: "liquidatorAddress",
191
+ type: "address",
192
+ internalType: "address"
193
+ },
194
+ {
195
+ name: "contractType",
196
+ type: "bytes32",
197
+ internalType: "bytes32"
198
+ }
199
+ ]
200
+ }],
201
+ stateMutability: "view"
202
+ },
161
203
  {
162
204
  type: "function",
163
205
  name: "liquidatableTypeToCompressorType",