@gearbox-protocol/sdk 14.12.0-next.56 → 14.12.0-next.57
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.
- package/dist/cjs/abi/compressors/liquidationCompressor.js +43 -1
- package/dist/cjs/abi/compressors/rwaCompressor.js +4 -4
- package/dist/cjs/abi/compressors/subcompressors/liquidation/midasLiquidationSubcompressor.js +43 -1
- package/dist/cjs/abi/compressors/subcompressors/liquidation/securitizeLiquidationSubcompressor.js +43 -1
- package/dist/cjs/abi/compressors/subcompressors/withdrawal/midasWithdrawalSubcompressor.js +20 -0
- package/dist/cjs/abi/compressors/subcompressors/withdrawal/securitizeRedemptionSubcompressor.js +20 -0
- package/dist/cjs/abi/compressors/withdrawalCompressor.js +30 -0
- package/dist/cjs/plugins/adapters/abi/actionAbi.js +8 -2
- package/dist/cjs/plugins/adapters/abi/conctructorAbi.js +8 -2
- package/dist/cjs/plugins/adapters/contracts/MidasRedemptionVaultAdapterContract.js +67 -36
- package/dist/esm/abi/compressors/liquidationCompressor.js +43 -1
- package/dist/esm/abi/compressors/rwaCompressor.js +4 -4
- package/dist/esm/abi/compressors/subcompressors/liquidation/midasLiquidationSubcompressor.js +43 -1
- package/dist/esm/abi/compressors/subcompressors/liquidation/securitizeLiquidationSubcompressor.js +43 -1
- package/dist/esm/abi/compressors/subcompressors/withdrawal/midasWithdrawalSubcompressor.js +20 -0
- package/dist/esm/abi/compressors/subcompressors/withdrawal/securitizeRedemptionSubcompressor.js +20 -0
- package/dist/esm/abi/compressors/withdrawalCompressor.js +30 -0
- package/dist/esm/plugins/adapters/abi/actionAbi.js +8 -2
- package/dist/esm/plugins/adapters/abi/conctructorAbi.js +8 -2
- package/dist/esm/plugins/adapters/contracts/MidasRedemptionVaultAdapterContract.js +67 -36
- package/dist/types/abi/compressors/liquidationCompressor.d.ts +36 -1
- package/dist/types/abi/compressors/rwaCompressor.d.ts +4 -4
- package/dist/types/abi/compressors/subcompressors/liquidation/midasLiquidationSubcompressor.d.ts +36 -1
- package/dist/types/abi/compressors/subcompressors/liquidation/securitizeLiquidationSubcompressor.d.ts +36 -1
- package/dist/types/abi/compressors/subcompressors/withdrawal/midasWithdrawalSubcompressor.d.ts +16 -0
- package/dist/types/abi/compressors/subcompressors/withdrawal/securitizeRedemptionSubcompressor.d.ts +16 -0
- package/dist/types/abi/compressors/withdrawalCompressor.d.ts +24 -0
- package/dist/types/permissionless/bindings/compressors/withdrawal-compressor.d.ts +24 -0
- package/dist/types/plugins/adapters/contracts/MidasRedemptionVaultAdapterContract.d.ts +8 -5
- package/package.json +1 -1
|
@@ -90,7 +90,12 @@ const liquidationCompressorAbi = [
|
|
|
90
90
|
internalType: "struct LiquidationData",
|
|
91
91
|
components: [
|
|
92
92
|
{
|
|
93
|
-
name: "
|
|
93
|
+
name: "requiredToken",
|
|
94
|
+
type: "address",
|
|
95
|
+
internalType: "address"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
name: "requiredAmount",
|
|
94
99
|
type: "uint256",
|
|
95
100
|
internalType: "uint256"
|
|
96
101
|
},
|
|
@@ -145,6 +150,11 @@ const liquidationCompressorAbi = [
|
|
|
145
150
|
type: "bool",
|
|
146
151
|
internalType: "bool"
|
|
147
152
|
},
|
|
153
|
+
{
|
|
154
|
+
name: "isCreditAccountFrozen",
|
|
155
|
+
type: "bool",
|
|
156
|
+
internalType: "bool"
|
|
157
|
+
},
|
|
148
158
|
{
|
|
149
159
|
name: "kycProtocol",
|
|
150
160
|
type: "string",
|
|
@@ -159,6 +169,38 @@ const liquidationCompressorAbi = [
|
|
|
159
169
|
}],
|
|
160
170
|
stateMutability: "nonpayable"
|
|
161
171
|
},
|
|
172
|
+
{
|
|
173
|
+
type: "function",
|
|
174
|
+
name: "getRWALiquidators",
|
|
175
|
+
inputs: [{
|
|
176
|
+
name: "marketConfigurator",
|
|
177
|
+
type: "address",
|
|
178
|
+
internalType: "address"
|
|
179
|
+
}],
|
|
180
|
+
outputs: [{
|
|
181
|
+
name: "liquidators",
|
|
182
|
+
type: "tuple[]",
|
|
183
|
+
internalType: "struct RWALiquidatorInfo[]",
|
|
184
|
+
components: [
|
|
185
|
+
{
|
|
186
|
+
name: "gateway",
|
|
187
|
+
type: "address",
|
|
188
|
+
internalType: "address"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
name: "liquidatorAddress",
|
|
192
|
+
type: "address",
|
|
193
|
+
internalType: "address"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
name: "contractType",
|
|
197
|
+
type: "bytes32",
|
|
198
|
+
internalType: "bytes32"
|
|
199
|
+
}
|
|
200
|
+
]
|
|
201
|
+
}],
|
|
202
|
+
stateMutability: "view"
|
|
203
|
+
},
|
|
162
204
|
{
|
|
163
205
|
type: "function",
|
|
164
206
|
name: "liquidatableTypeToCompressorType",
|
|
@@ -260,18 +260,18 @@ const rwaCompressorAbi = [
|
|
|
260
260
|
},
|
|
261
261
|
{
|
|
262
262
|
type: "error",
|
|
263
|
-
name: "
|
|
263
|
+
name: "InvalidMarketConfiguratorException",
|
|
264
264
|
inputs: [{
|
|
265
|
-
name: "
|
|
265
|
+
name: "marketConfigurator",
|
|
266
266
|
type: "address",
|
|
267
267
|
internalType: "address"
|
|
268
268
|
}]
|
|
269
269
|
},
|
|
270
270
|
{
|
|
271
271
|
type: "error",
|
|
272
|
-
name: "
|
|
272
|
+
name: "InvalidRWAFactoryException",
|
|
273
273
|
inputs: [{
|
|
274
|
-
name: "
|
|
274
|
+
name: "factory",
|
|
275
275
|
type: "address",
|
|
276
276
|
internalType: "address"
|
|
277
277
|
}]
|
package/dist/cjs/abi/compressors/subcompressors/liquidation/midasLiquidationSubcompressor.js
CHANGED
|
@@ -52,7 +52,12 @@ const midasLiquidationSubcompressorAbi = [
|
|
|
52
52
|
internalType: "struct LiquidationData",
|
|
53
53
|
components: [
|
|
54
54
|
{
|
|
55
|
-
name: "
|
|
55
|
+
name: "requiredToken",
|
|
56
|
+
type: "address",
|
|
57
|
+
internalType: "address"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: "requiredAmount",
|
|
56
61
|
type: "uint256",
|
|
57
62
|
internalType: "uint256"
|
|
58
63
|
},
|
|
@@ -107,6 +112,11 @@ const midasLiquidationSubcompressorAbi = [
|
|
|
107
112
|
type: "bool",
|
|
108
113
|
internalType: "bool"
|
|
109
114
|
},
|
|
115
|
+
{
|
|
116
|
+
name: "isCreditAccountFrozen",
|
|
117
|
+
type: "bool",
|
|
118
|
+
internalType: "bool"
|
|
119
|
+
},
|
|
110
120
|
{
|
|
111
121
|
name: "kycProtocol",
|
|
112
122
|
type: "string",
|
|
@@ -121,6 +131,38 @@ const midasLiquidationSubcompressorAbi = [
|
|
|
121
131
|
}],
|
|
122
132
|
stateMutability: "nonpayable"
|
|
123
133
|
},
|
|
134
|
+
{
|
|
135
|
+
type: "function",
|
|
136
|
+
name: "getRWALiquidatorInfo",
|
|
137
|
+
inputs: [{
|
|
138
|
+
name: "token",
|
|
139
|
+
type: "address",
|
|
140
|
+
internalType: "address"
|
|
141
|
+
}],
|
|
142
|
+
outputs: [{
|
|
143
|
+
name: "info",
|
|
144
|
+
type: "tuple",
|
|
145
|
+
internalType: "struct RWALiquidatorInfo",
|
|
146
|
+
components: [
|
|
147
|
+
{
|
|
148
|
+
name: "gateway",
|
|
149
|
+
type: "address",
|
|
150
|
+
internalType: "address"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
name: "liquidatorAddress",
|
|
154
|
+
type: "address",
|
|
155
|
+
internalType: "address"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
name: "contractType",
|
|
159
|
+
type: "bytes32",
|
|
160
|
+
internalType: "bytes32"
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
}],
|
|
164
|
+
stateMutability: "view"
|
|
165
|
+
},
|
|
124
166
|
{
|
|
125
167
|
type: "function",
|
|
126
168
|
name: "version",
|
package/dist/cjs/abi/compressors/subcompressors/liquidation/securitizeLiquidationSubcompressor.js
CHANGED
|
@@ -52,7 +52,12 @@ const securitizeLiquidationSubcompressorAbi = [
|
|
|
52
52
|
internalType: "struct LiquidationData",
|
|
53
53
|
components: [
|
|
54
54
|
{
|
|
55
|
-
name: "
|
|
55
|
+
name: "requiredToken",
|
|
56
|
+
type: "address",
|
|
57
|
+
internalType: "address"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: "requiredAmount",
|
|
56
61
|
type: "uint256",
|
|
57
62
|
internalType: "uint256"
|
|
58
63
|
},
|
|
@@ -107,6 +112,11 @@ const securitizeLiquidationSubcompressorAbi = [
|
|
|
107
112
|
type: "bool",
|
|
108
113
|
internalType: "bool"
|
|
109
114
|
},
|
|
115
|
+
{
|
|
116
|
+
name: "isCreditAccountFrozen",
|
|
117
|
+
type: "bool",
|
|
118
|
+
internalType: "bool"
|
|
119
|
+
},
|
|
110
120
|
{
|
|
111
121
|
name: "kycProtocol",
|
|
112
122
|
type: "string",
|
|
@@ -121,6 +131,38 @@ const securitizeLiquidationSubcompressorAbi = [
|
|
|
121
131
|
}],
|
|
122
132
|
stateMutability: "nonpayable"
|
|
123
133
|
},
|
|
134
|
+
{
|
|
135
|
+
type: "function",
|
|
136
|
+
name: "getRWALiquidatorInfo",
|
|
137
|
+
inputs: [{
|
|
138
|
+
name: "token",
|
|
139
|
+
type: "address",
|
|
140
|
+
internalType: "address"
|
|
141
|
+
}],
|
|
142
|
+
outputs: [{
|
|
143
|
+
name: "info",
|
|
144
|
+
type: "tuple",
|
|
145
|
+
internalType: "struct RWALiquidatorInfo",
|
|
146
|
+
components: [
|
|
147
|
+
{
|
|
148
|
+
name: "gateway",
|
|
149
|
+
type: "address",
|
|
150
|
+
internalType: "address"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
name: "liquidatorAddress",
|
|
154
|
+
type: "address",
|
|
155
|
+
internalType: "address"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
name: "contractType",
|
|
159
|
+
type: "bytes32",
|
|
160
|
+
internalType: "bytes32"
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
}],
|
|
164
|
+
stateMutability: "view"
|
|
165
|
+
},
|
|
124
166
|
{
|
|
125
167
|
type: "function",
|
|
126
168
|
name: "version",
|
|
@@ -80,6 +80,11 @@ const midasWithdrawalSubcompressorAbi = [
|
|
|
80
80
|
internalType: "bytes"
|
|
81
81
|
}]
|
|
82
82
|
},
|
|
83
|
+
{
|
|
84
|
+
name: "redeemer",
|
|
85
|
+
type: "address",
|
|
86
|
+
internalType: "address"
|
|
87
|
+
},
|
|
83
88
|
{
|
|
84
89
|
name: "extraData",
|
|
85
90
|
type: "bytes",
|
|
@@ -128,6 +133,11 @@ const midasWithdrawalSubcompressorAbi = [
|
|
|
128
133
|
type: "uint256",
|
|
129
134
|
internalType: "uint256"
|
|
130
135
|
},
|
|
136
|
+
{
|
|
137
|
+
name: "redeemer",
|
|
138
|
+
type: "address",
|
|
139
|
+
internalType: "address"
|
|
140
|
+
},
|
|
131
141
|
{
|
|
132
142
|
name: "extraData",
|
|
133
143
|
type: "bytes",
|
|
@@ -205,6 +215,11 @@ const midasWithdrawalSubcompressorAbi = [
|
|
|
205
215
|
internalType: "bytes"
|
|
206
216
|
}]
|
|
207
217
|
},
|
|
218
|
+
{
|
|
219
|
+
name: "redeemer",
|
|
220
|
+
type: "address",
|
|
221
|
+
internalType: "address"
|
|
222
|
+
},
|
|
208
223
|
{
|
|
209
224
|
name: "extraData",
|
|
210
225
|
type: "bytes",
|
|
@@ -253,6 +268,11 @@ const midasWithdrawalSubcompressorAbi = [
|
|
|
253
268
|
type: "uint256",
|
|
254
269
|
internalType: "uint256"
|
|
255
270
|
},
|
|
271
|
+
{
|
|
272
|
+
name: "redeemer",
|
|
273
|
+
type: "address",
|
|
274
|
+
internalType: "address"
|
|
275
|
+
},
|
|
256
276
|
{
|
|
257
277
|
name: "extraData",
|
|
258
278
|
type: "bytes",
|
package/dist/cjs/abi/compressors/subcompressors/withdrawal/securitizeRedemptionSubcompressor.js
CHANGED
|
@@ -80,6 +80,11 @@ const securitizeRedemptionSubcompressorAbi = [
|
|
|
80
80
|
internalType: "bytes"
|
|
81
81
|
}]
|
|
82
82
|
},
|
|
83
|
+
{
|
|
84
|
+
name: "redeemer",
|
|
85
|
+
type: "address",
|
|
86
|
+
internalType: "address"
|
|
87
|
+
},
|
|
83
88
|
{
|
|
84
89
|
name: "extraData",
|
|
85
90
|
type: "bytes",
|
|
@@ -128,6 +133,11 @@ const securitizeRedemptionSubcompressorAbi = [
|
|
|
128
133
|
type: "uint256",
|
|
129
134
|
internalType: "uint256"
|
|
130
135
|
},
|
|
136
|
+
{
|
|
137
|
+
name: "redeemer",
|
|
138
|
+
type: "address",
|
|
139
|
+
internalType: "address"
|
|
140
|
+
},
|
|
131
141
|
{
|
|
132
142
|
name: "extraData",
|
|
133
143
|
type: "bytes",
|
|
@@ -205,6 +215,11 @@ const securitizeRedemptionSubcompressorAbi = [
|
|
|
205
215
|
internalType: "bytes"
|
|
206
216
|
}]
|
|
207
217
|
},
|
|
218
|
+
{
|
|
219
|
+
name: "redeemer",
|
|
220
|
+
type: "address",
|
|
221
|
+
internalType: "address"
|
|
222
|
+
},
|
|
208
223
|
{
|
|
209
224
|
name: "extraData",
|
|
210
225
|
type: "bytes",
|
|
@@ -253,6 +268,11 @@ const securitizeRedemptionSubcompressorAbi = [
|
|
|
253
268
|
type: "uint256",
|
|
254
269
|
internalType: "uint256"
|
|
255
270
|
},
|
|
271
|
+
{
|
|
272
|
+
name: "redeemer",
|
|
273
|
+
type: "address",
|
|
274
|
+
internalType: "address"
|
|
275
|
+
},
|
|
256
276
|
{
|
|
257
277
|
name: "extraData",
|
|
258
278
|
type: "bytes",
|
|
@@ -119,6 +119,11 @@ const withdrawalCompressorAbi = [
|
|
|
119
119
|
internalType: "bytes"
|
|
120
120
|
}]
|
|
121
121
|
},
|
|
122
|
+
{
|
|
123
|
+
name: "redeemer",
|
|
124
|
+
type: "address",
|
|
125
|
+
internalType: "address"
|
|
126
|
+
},
|
|
122
127
|
{
|
|
123
128
|
name: "extraData",
|
|
124
129
|
type: "bytes",
|
|
@@ -167,6 +172,11 @@ const withdrawalCompressorAbi = [
|
|
|
167
172
|
type: "uint256",
|
|
168
173
|
internalType: "uint256"
|
|
169
174
|
},
|
|
175
|
+
{
|
|
176
|
+
name: "redeemer",
|
|
177
|
+
type: "address",
|
|
178
|
+
internalType: "address"
|
|
179
|
+
},
|
|
170
180
|
{
|
|
171
181
|
name: "extraData",
|
|
172
182
|
type: "bytes",
|
|
@@ -244,6 +254,11 @@ const withdrawalCompressorAbi = [
|
|
|
244
254
|
internalType: "bytes"
|
|
245
255
|
}]
|
|
246
256
|
},
|
|
257
|
+
{
|
|
258
|
+
name: "redeemer",
|
|
259
|
+
type: "address",
|
|
260
|
+
internalType: "address"
|
|
261
|
+
},
|
|
247
262
|
{
|
|
248
263
|
name: "extraData",
|
|
249
264
|
type: "bytes",
|
|
@@ -292,6 +307,11 @@ const withdrawalCompressorAbi = [
|
|
|
292
307
|
type: "uint256",
|
|
293
308
|
internalType: "uint256"
|
|
294
309
|
},
|
|
310
|
+
{
|
|
311
|
+
name: "redeemer",
|
|
312
|
+
type: "address",
|
|
313
|
+
internalType: "address"
|
|
314
|
+
},
|
|
295
315
|
{
|
|
296
316
|
name: "extraData",
|
|
297
317
|
type: "bytes",
|
|
@@ -369,6 +389,11 @@ const withdrawalCompressorAbi = [
|
|
|
369
389
|
internalType: "bytes"
|
|
370
390
|
}]
|
|
371
391
|
},
|
|
392
|
+
{
|
|
393
|
+
name: "redeemer",
|
|
394
|
+
type: "address",
|
|
395
|
+
internalType: "address"
|
|
396
|
+
},
|
|
372
397
|
{
|
|
373
398
|
name: "extraData",
|
|
374
399
|
type: "bytes",
|
|
@@ -417,6 +442,11 @@ const withdrawalCompressorAbi = [
|
|
|
417
442
|
type: "uint256",
|
|
418
443
|
internalType: "uint256"
|
|
419
444
|
},
|
|
445
|
+
{
|
|
446
|
+
name: "redeemer",
|
|
447
|
+
type: "address",
|
|
448
|
+
internalType: "address"
|
|
449
|
+
},
|
|
420
450
|
{
|
|
421
451
|
name: "extraData",
|
|
422
452
|
type: "bytes",
|
|
@@ -20,8 +20,14 @@ const adapterActionSignatures = {
|
|
|
20
20
|
["KELP_WITHDRAWAL"]: { 310: "function setTokensOutBatchStatus((address,address,bool)[])" },
|
|
21
21
|
["MELLOW_CLAIMER"]: { 310: "function setMultiVaultStatusBatch((address,address,bool)[])" },
|
|
22
22
|
["MELLOW_WRAPPER"]: { 310: "function setVaultStatusBatch((address,bool)[])" },
|
|
23
|
-
["MIDAS_ISSUANCE_VAULT"]: {
|
|
24
|
-
|
|
23
|
+
["MIDAS_ISSUANCE_VAULT"]: {
|
|
24
|
+
310: "function setTokenAllowedStatusBatch(address[],bool[])",
|
|
25
|
+
311: "function setInputTokenStatusBatch(address[],bool[])"
|
|
26
|
+
},
|
|
27
|
+
["MIDAS_REDEMPTION_VAULT"]: {
|
|
28
|
+
310: "function setTokenAllowedStatusBatch((address,address,bool)[])",
|
|
29
|
+
311: "function setOutputTokenStatusBatch(address[],bool[])"
|
|
30
|
+
},
|
|
25
31
|
["PENDLE_ROUTER"]: {
|
|
26
32
|
310: "function setPairStatusBatch((address,address,address,uint8)[])",
|
|
27
33
|
311: "function setPairStatusBatch((address,address,address,uint8,uint8)[])"
|
|
@@ -20,7 +20,10 @@ const adapterConstructorAbi = {
|
|
|
20
20
|
["INFINIFI_GATEWAY"]: { 310: require_plugins_adapters_abi_conctructorAbiPatterns.BASIC_ADAPTER_ABI },
|
|
21
21
|
["LIDO_V1"]: { 310: require_plugins_adapters_abi_conctructorAbiPatterns.BASIC_ADAPTER_ABI },
|
|
22
22
|
["LIDO_WSTETH_V1"]: { 310: require_plugins_adapters_abi_conctructorAbiPatterns.BASIC_ADAPTER_ABI },
|
|
23
|
-
["MIDAS_REDEMPTION_VAULT"]: {
|
|
23
|
+
["MIDAS_REDEMPTION_VAULT"]: {
|
|
24
|
+
310: require_plugins_adapters_abi_conctructorAbiPatterns.BASIC_ADAPTER_ABI,
|
|
25
|
+
311: require_plugins_adapters_abi_conctructorAbiPatterns.BASIC_ADAPTER_ABI
|
|
26
|
+
},
|
|
24
27
|
["PENDLE_ROUTER"]: {
|
|
25
28
|
310: require_plugins_adapters_abi_conctructorAbiPatterns.BASIC_ADAPTER_ABI,
|
|
26
29
|
311: require_plugins_adapters_abi_conctructorAbiPatterns.BASIC_ADAPTER_ABI
|
|
@@ -65,7 +68,10 @@ const adapterConstructorAbi = {
|
|
|
65
68
|
311: require_plugins_adapters_abi_conctructorAbiPatterns.PHANTOM_TOKEN_ADAPTER_ABI
|
|
66
69
|
},
|
|
67
70
|
["STAKING_REWARDS"]: { 312: require_plugins_adapters_abi_conctructorAbiPatterns.STAKING_REWARDS_ADAPTER_ABI },
|
|
68
|
-
["MIDAS_ISSUANCE_VAULT"]: {
|
|
71
|
+
["MIDAS_ISSUANCE_VAULT"]: {
|
|
72
|
+
310: require_plugins_adapters_abi_conctructorAbiPatterns.REFERER_ID_ADAPTER_ABI,
|
|
73
|
+
311: require_plugins_adapters_abi_conctructorAbiPatterns.REFERER_ID_ADAPTER_ABI
|
|
74
|
+
},
|
|
69
75
|
["MIDAS_GATEWAY"]: { 311: require_plugins_adapters_abi_conctructorAbiPatterns.REFERER_ID_ADAPTER_ABI }
|
|
70
76
|
};
|
|
71
77
|
//#endregion
|
|
@@ -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
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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
|
-
|
|
75
|
-
|
|
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) {
|
|
@@ -89,7 +89,12 @@ const liquidationCompressorAbi = [
|
|
|
89
89
|
internalType: "struct LiquidationData",
|
|
90
90
|
components: [
|
|
91
91
|
{
|
|
92
|
-
name: "
|
|
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",
|
|
@@ -259,18 +259,18 @@ const rwaCompressorAbi = [
|
|
|
259
259
|
},
|
|
260
260
|
{
|
|
261
261
|
type: "error",
|
|
262
|
-
name: "
|
|
262
|
+
name: "InvalidMarketConfiguratorException",
|
|
263
263
|
inputs: [{
|
|
264
|
-
name: "
|
|
264
|
+
name: "marketConfigurator",
|
|
265
265
|
type: "address",
|
|
266
266
|
internalType: "address"
|
|
267
267
|
}]
|
|
268
268
|
},
|
|
269
269
|
{
|
|
270
270
|
type: "error",
|
|
271
|
-
name: "
|
|
271
|
+
name: "InvalidRWAFactoryException",
|
|
272
272
|
inputs: [{
|
|
273
|
-
name: "
|
|
273
|
+
name: "factory",
|
|
274
274
|
type: "address",
|
|
275
275
|
internalType: "address"
|
|
276
276
|
}]
|