@gearbox-protocol/sdk 11.12.2 → 11.12.4
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/IWithdrawalCompressorV310.js +1 -132
- package/dist/cjs/permissionless/bindings/factory/loss-policy-factory.js +55 -0
- package/dist/cjs/permissionless/bindings/market-configurator.js +48 -1
- package/dist/cjs/sdk/accounts/AbstractCreditAccountsService.js +3 -2
- package/dist/esm/abi/IWithdrawalCompressorV310.js +1 -132
- package/dist/esm/permissionless/bindings/factory/loss-policy-factory.js +30 -0
- package/dist/esm/permissionless/bindings/market-configurator.js +48 -1
- package/dist/esm/sdk/accounts/AbstractCreditAccountsService.js +3 -2
- package/dist/types/abi/IWithdrawalCompressorV310.d.ts +1 -116
- package/dist/types/permissionless/bindings/factory/loss-policy-factory.d.ts +143 -0
- package/dist/types/permissionless/bindings/market-configurator.d.ts +4 -0
- package/dist/types/sdk/accounts/AbstractCreditAccountsService.d.ts +1 -1
- package/package.json +1 -1
|
@@ -22,28 +22,6 @@ __export(IWithdrawalCompressorV310_exports, {
|
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(IWithdrawalCompressorV310_exports);
|
|
24
24
|
const iWithdrawalCompressorV310Abi = [
|
|
25
|
-
{
|
|
26
|
-
type: "constructor",
|
|
27
|
-
inputs: [
|
|
28
|
-
{ name: "_owner", internalType: "address", type: "address" },
|
|
29
|
-
{ name: "addressProvider_", internalType: "address", type: "address" }
|
|
30
|
-
],
|
|
31
|
-
stateMutability: "nonpayable"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
type: "function",
|
|
35
|
-
inputs: [],
|
|
36
|
-
name: "addressProvider",
|
|
37
|
-
outputs: [{ name: "", internalType: "address", type: "address" }],
|
|
38
|
-
stateMutability: "view"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
type: "function",
|
|
42
|
-
inputs: [{ name: "", internalType: "bytes32", type: "bytes32" }],
|
|
43
|
-
name: "compressorTypeToCompressor",
|
|
44
|
-
outputs: [{ name: "", internalType: "address", type: "address" }],
|
|
45
|
-
stateMutability: "view"
|
|
46
|
-
},
|
|
47
25
|
{
|
|
48
26
|
type: "function",
|
|
49
27
|
inputs: [],
|
|
@@ -161,7 +139,7 @@ const iWithdrawalCompressorV310Abi = [
|
|
|
161
139
|
name: "getWithdrawalRequestResult",
|
|
162
140
|
outputs: [
|
|
163
141
|
{
|
|
164
|
-
name: "
|
|
142
|
+
name: "",
|
|
165
143
|
internalType: "struct RequestableWithdrawal",
|
|
166
144
|
type: "tuple",
|
|
167
145
|
components: [
|
|
@@ -192,121 +170,12 @@ const iWithdrawalCompressorV310Abi = [
|
|
|
192
170
|
],
|
|
193
171
|
stateMutability: "view"
|
|
194
172
|
},
|
|
195
|
-
// TODO: REMOVE COMMENTS AFTER MIGRATION TO MULTIPLE
|
|
196
|
-
// {
|
|
197
|
-
// type: "function",
|
|
198
|
-
// inputs: [
|
|
199
|
-
// { name: "creditAccount", internalType: "address", type: "address" },
|
|
200
|
-
// { name: "token", internalType: "address", type: "address" },
|
|
201
|
-
// { name: "withdrawalToken", internalType: "address", type: "address" },
|
|
202
|
-
// { name: "amount", internalType: "uint256", type: "uint256" },
|
|
203
|
-
// ],
|
|
204
|
-
// name: "getWithdrawalRequestResult",
|
|
205
|
-
// outputs: [
|
|
206
|
-
// {
|
|
207
|
-
// name: "withdrawal",
|
|
208
|
-
// internalType: "struct RequestableWithdrawal",
|
|
209
|
-
// type: "tuple",
|
|
210
|
-
// components: [
|
|
211
|
-
// { name: "token", internalType: "address", type: "address" },
|
|
212
|
-
// { name: "amountIn", internalType: "uint256", type: "uint256" },
|
|
213
|
-
// {
|
|
214
|
-
// name: "outputs",
|
|
215
|
-
// internalType: "struct WithdrawalOutput[]",
|
|
216
|
-
// type: "tuple[]",
|
|
217
|
-
// components: [
|
|
218
|
-
// { name: "token", internalType: "address", type: "address" },
|
|
219
|
-
// { name: "isDelayed", internalType: "bool", type: "bool" },
|
|
220
|
-
// { name: "amount", internalType: "uint256", type: "uint256" },
|
|
221
|
-
// ],
|
|
222
|
-
// },
|
|
223
|
-
// {
|
|
224
|
-
// name: "requestCalls",
|
|
225
|
-
// internalType: "struct MultiCall[]",
|
|
226
|
-
// type: "tuple[]",
|
|
227
|
-
// components: [
|
|
228
|
-
// { name: "target", internalType: "address", type: "address" },
|
|
229
|
-
// { name: "callData", internalType: "bytes", type: "bytes" },
|
|
230
|
-
// ],
|
|
231
|
-
// },
|
|
232
|
-
// { name: "claimableAt", internalType: "uint256", type: "uint256" },
|
|
233
|
-
// ],
|
|
234
|
-
// },
|
|
235
|
-
// ],
|
|
236
|
-
// stateMutability: "view",
|
|
237
|
-
// },
|
|
238
|
-
{
|
|
239
|
-
type: "function",
|
|
240
|
-
inputs: [],
|
|
241
|
-
name: "owner",
|
|
242
|
-
outputs: [{ name: "", internalType: "address", type: "address" }],
|
|
243
|
-
stateMutability: "view"
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
type: "function",
|
|
247
|
-
inputs: [],
|
|
248
|
-
name: "renounceOwnership",
|
|
249
|
-
outputs: [],
|
|
250
|
-
stateMutability: "nonpayable"
|
|
251
|
-
},
|
|
252
|
-
{
|
|
253
|
-
type: "function",
|
|
254
|
-
inputs: [
|
|
255
|
-
{ name: "subcompressor", internalType: "address", type: "address" }
|
|
256
|
-
],
|
|
257
|
-
name: "setSubcompressor",
|
|
258
|
-
outputs: [],
|
|
259
|
-
stateMutability: "nonpayable"
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
type: "function",
|
|
263
|
-
inputs: [
|
|
264
|
-
{ name: "withdrawableType", internalType: "bytes32", type: "bytes32" },
|
|
265
|
-
{ name: "compressorType", internalType: "bytes32", type: "bytes32" }
|
|
266
|
-
],
|
|
267
|
-
name: "setWithdrawableTypeToCompressorType",
|
|
268
|
-
outputs: [],
|
|
269
|
-
stateMutability: "nonpayable"
|
|
270
|
-
},
|
|
271
|
-
{
|
|
272
|
-
type: "function",
|
|
273
|
-
inputs: [{ name: "newOwner", internalType: "address", type: "address" }],
|
|
274
|
-
name: "transferOwnership",
|
|
275
|
-
outputs: [],
|
|
276
|
-
stateMutability: "nonpayable"
|
|
277
|
-
},
|
|
278
173
|
{
|
|
279
174
|
type: "function",
|
|
280
175
|
inputs: [],
|
|
281
176
|
name: "version",
|
|
282
177
|
outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
|
|
283
178
|
stateMutability: "view"
|
|
284
|
-
},
|
|
285
|
-
{
|
|
286
|
-
type: "function",
|
|
287
|
-
inputs: [{ name: "", internalType: "bytes32", type: "bytes32" }],
|
|
288
|
-
name: "withdrawableTypeToCompressorType",
|
|
289
|
-
outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }],
|
|
290
|
-
stateMutability: "view"
|
|
291
|
-
},
|
|
292
|
-
{
|
|
293
|
-
type: "event",
|
|
294
|
-
anonymous: false,
|
|
295
|
-
inputs: [
|
|
296
|
-
{
|
|
297
|
-
name: "previousOwner",
|
|
298
|
-
internalType: "address",
|
|
299
|
-
type: "address",
|
|
300
|
-
indexed: true
|
|
301
|
-
},
|
|
302
|
-
{
|
|
303
|
-
name: "newOwner",
|
|
304
|
-
internalType: "address",
|
|
305
|
-
type: "address",
|
|
306
|
-
indexed: true
|
|
307
|
-
}
|
|
308
|
-
],
|
|
309
|
-
name: "OwnershipTransferred"
|
|
310
179
|
}
|
|
311
180
|
];
|
|
312
181
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var loss_policy_factory_exports = {};
|
|
20
|
+
__export(loss_policy_factory_exports, {
|
|
21
|
+
AccessMode: () => AccessMode,
|
|
22
|
+
LossPolicyFactory: () => LossPolicyFactory
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(loss_policy_factory_exports);
|
|
25
|
+
var import_generated = require("../../../abi/310/generated.js");
|
|
26
|
+
var import_abstract_factory = require("./abstract-factory.js");
|
|
27
|
+
const abi = import_generated.iLossPolicyV310Abi;
|
|
28
|
+
var AccessMode = /* @__PURE__ */ ((AccessMode2) => {
|
|
29
|
+
AccessMode2[AccessMode2["Permissionless"] = 0] = "Permissionless";
|
|
30
|
+
AccessMode2[AccessMode2["Permissioned"] = 1] = "Permissioned";
|
|
31
|
+
AccessMode2[AccessMode2["Forbidden"] = 2] = "Forbidden";
|
|
32
|
+
return AccessMode2;
|
|
33
|
+
})(AccessMode || {});
|
|
34
|
+
class LossPolicyFactory extends import_abstract_factory.AbstractFactory {
|
|
35
|
+
constructor() {
|
|
36
|
+
super(abi);
|
|
37
|
+
}
|
|
38
|
+
setAccessMode(args) {
|
|
39
|
+
return this.createCallData({
|
|
40
|
+
functionName: "setAccessMode",
|
|
41
|
+
args: [args.accessMode]
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
setChecksEnabled(args) {
|
|
45
|
+
return this.createCallData({
|
|
46
|
+
functionName: "setChecksEnabled",
|
|
47
|
+
args: [args.enabled]
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
52
|
+
0 && (module.exports = {
|
|
53
|
+
AccessMode,
|
|
54
|
+
LossPolicyFactory
|
|
55
|
+
});
|
|
@@ -29,6 +29,7 @@ var import_plugins = require("../plugins/index.js");
|
|
|
29
29
|
var import_create2 = require("../utils/create2.js");
|
|
30
30
|
var import_utils2 = require("../utils/index.js");
|
|
31
31
|
var import_credit_factory = require("./factory/credit-factory.js");
|
|
32
|
+
var import_loss_policy_factory = require("./factory/loss-policy-factory.js");
|
|
32
33
|
var import_pool_factory = require("./factory/pool-factory.js");
|
|
33
34
|
var import_price_oracle_factory = require("./factory/price-oracle-factory.js");
|
|
34
35
|
var import_index = require("./index.js");
|
|
@@ -37,11 +38,13 @@ class MarketConfiguratorContract extends import_index.BaseContract {
|
|
|
37
38
|
creditFactory;
|
|
38
39
|
poolFactory;
|
|
39
40
|
priceOracleFactory;
|
|
41
|
+
lossPolicyFactory;
|
|
40
42
|
constructor(address, client) {
|
|
41
43
|
super(abi, address, client, "MarketConfigurator");
|
|
42
44
|
this.creditFactory = new import_credit_factory.CreditFactory();
|
|
43
45
|
this.poolFactory = new import_pool_factory.PoolFactory();
|
|
44
46
|
this.priceOracleFactory = new import_price_oracle_factory.PriceOracleFactory();
|
|
47
|
+
this.lossPolicyFactory = new import_loss_policy_factory.LossPolicyFactory();
|
|
45
48
|
}
|
|
46
49
|
async getAddressProvider() {
|
|
47
50
|
const addressProvider = await this.contract.read.addressProvider();
|
|
@@ -398,6 +401,22 @@ class MarketConfiguratorContract extends import_index.BaseContract {
|
|
|
398
401
|
]),
|
|
399
402
|
functionName: "getRoleHolders",
|
|
400
403
|
args: [(0, import_viem.stringToHex)("UNPAUSABLE_ADMIN", { size: 32 })]
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
address: acl,
|
|
407
|
+
abi: (0, import_viem.parseAbi)([
|
|
408
|
+
"function getRoleHolders(bytes32) view returns (address[])"
|
|
409
|
+
]),
|
|
410
|
+
functionName: "getRoleHolders",
|
|
411
|
+
args: [(0, import_viem.stringToHex)("LOSS_LIQUIDATOR", { size: 32 })]
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
address: acl,
|
|
415
|
+
abi: (0, import_viem.parseAbi)([
|
|
416
|
+
"function getRoleHolders(bytes32) view returns (address[])"
|
|
417
|
+
]),
|
|
418
|
+
functionName: "getRoleHolders",
|
|
419
|
+
args: [(0, import_viem.stringToHex)("EMERGENCY_LIQUIDATOR", { size: 32 })]
|
|
401
420
|
}
|
|
402
421
|
]
|
|
403
422
|
});
|
|
@@ -406,7 +425,9 @@ class MarketConfiguratorContract extends import_index.BaseContract {
|
|
|
406
425
|
emergencyAdmin,
|
|
407
426
|
treasury,
|
|
408
427
|
pausableAdmins: [...results[0]],
|
|
409
|
-
unpausableAdmins: [...results[1]]
|
|
428
|
+
unpausableAdmins: [...results[1]],
|
|
429
|
+
lossLiquidators: [...results[2]],
|
|
430
|
+
emergencyLiquidators: [...results[3]]
|
|
410
431
|
};
|
|
411
432
|
}
|
|
412
433
|
async multipause() {
|
|
@@ -693,6 +714,32 @@ class MarketConfiguratorContract extends import_index.BaseContract {
|
|
|
693
714
|
}
|
|
694
715
|
};
|
|
695
716
|
}
|
|
717
|
+
case "configureLossPolicy": {
|
|
718
|
+
const [pool, calldata] = args;
|
|
719
|
+
const decoded = this.lossPolicyFactory.decodeConfig(calldata);
|
|
720
|
+
if (decoded) {
|
|
721
|
+
return {
|
|
722
|
+
chainId: 0,
|
|
723
|
+
target: this.address,
|
|
724
|
+
label: this.name,
|
|
725
|
+
functionName,
|
|
726
|
+
args: {
|
|
727
|
+
pool,
|
|
728
|
+
data: (0, import_utils.json_stringify)(decoded)
|
|
729
|
+
}
|
|
730
|
+
};
|
|
731
|
+
}
|
|
732
|
+
return {
|
|
733
|
+
chainId: 0,
|
|
734
|
+
target: this.address,
|
|
735
|
+
label: this.name,
|
|
736
|
+
functionName,
|
|
737
|
+
args: {
|
|
738
|
+
pool,
|
|
739
|
+
calldata
|
|
740
|
+
}
|
|
741
|
+
};
|
|
742
|
+
}
|
|
696
743
|
case "updateInterestRateModel": {
|
|
697
744
|
const [pool, deployParams] = args;
|
|
698
745
|
return {
|
|
@@ -36,8 +36,9 @@ var import_router = require("../router/index.js");
|
|
|
36
36
|
var import_sdk_legacy = require("../sdk-legacy/index.js");
|
|
37
37
|
var import_utils = require("../utils/index.js");
|
|
38
38
|
var import_viem2 = require("../utils/viem/index.js");
|
|
39
|
-
function getWithdrawalCompressorAddress(
|
|
40
|
-
|
|
39
|
+
function getWithdrawalCompressorAddress(chainId) {
|
|
40
|
+
const compressor = chainId === 1 ? "0xfB79b6713fe214B8748ED7b0db1f93E4f1aC9d29" : void 0;
|
|
41
|
+
return compressor;
|
|
41
42
|
}
|
|
42
43
|
class AbstractCreditAccountService extends import_base.SDKConstruct {
|
|
43
44
|
#compressor;
|
|
@@ -1,26 +1,4 @@
|
|
|
1
1
|
const iWithdrawalCompressorV310Abi = [
|
|
2
|
-
{
|
|
3
|
-
type: "constructor",
|
|
4
|
-
inputs: [
|
|
5
|
-
{ name: "_owner", internalType: "address", type: "address" },
|
|
6
|
-
{ name: "addressProvider_", internalType: "address", type: "address" }
|
|
7
|
-
],
|
|
8
|
-
stateMutability: "nonpayable"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
type: "function",
|
|
12
|
-
inputs: [],
|
|
13
|
-
name: "addressProvider",
|
|
14
|
-
outputs: [{ name: "", internalType: "address", type: "address" }],
|
|
15
|
-
stateMutability: "view"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
type: "function",
|
|
19
|
-
inputs: [{ name: "", internalType: "bytes32", type: "bytes32" }],
|
|
20
|
-
name: "compressorTypeToCompressor",
|
|
21
|
-
outputs: [{ name: "", internalType: "address", type: "address" }],
|
|
22
|
-
stateMutability: "view"
|
|
23
|
-
},
|
|
24
2
|
{
|
|
25
3
|
type: "function",
|
|
26
4
|
inputs: [],
|
|
@@ -138,7 +116,7 @@ const iWithdrawalCompressorV310Abi = [
|
|
|
138
116
|
name: "getWithdrawalRequestResult",
|
|
139
117
|
outputs: [
|
|
140
118
|
{
|
|
141
|
-
name: "
|
|
119
|
+
name: "",
|
|
142
120
|
internalType: "struct RequestableWithdrawal",
|
|
143
121
|
type: "tuple",
|
|
144
122
|
components: [
|
|
@@ -169,121 +147,12 @@ const iWithdrawalCompressorV310Abi = [
|
|
|
169
147
|
],
|
|
170
148
|
stateMutability: "view"
|
|
171
149
|
},
|
|
172
|
-
// TODO: REMOVE COMMENTS AFTER MIGRATION TO MULTIPLE
|
|
173
|
-
// {
|
|
174
|
-
// type: "function",
|
|
175
|
-
// inputs: [
|
|
176
|
-
// { name: "creditAccount", internalType: "address", type: "address" },
|
|
177
|
-
// { name: "token", internalType: "address", type: "address" },
|
|
178
|
-
// { name: "withdrawalToken", internalType: "address", type: "address" },
|
|
179
|
-
// { name: "amount", internalType: "uint256", type: "uint256" },
|
|
180
|
-
// ],
|
|
181
|
-
// name: "getWithdrawalRequestResult",
|
|
182
|
-
// outputs: [
|
|
183
|
-
// {
|
|
184
|
-
// name: "withdrawal",
|
|
185
|
-
// internalType: "struct RequestableWithdrawal",
|
|
186
|
-
// type: "tuple",
|
|
187
|
-
// components: [
|
|
188
|
-
// { name: "token", internalType: "address", type: "address" },
|
|
189
|
-
// { name: "amountIn", internalType: "uint256", type: "uint256" },
|
|
190
|
-
// {
|
|
191
|
-
// name: "outputs",
|
|
192
|
-
// internalType: "struct WithdrawalOutput[]",
|
|
193
|
-
// type: "tuple[]",
|
|
194
|
-
// components: [
|
|
195
|
-
// { name: "token", internalType: "address", type: "address" },
|
|
196
|
-
// { name: "isDelayed", internalType: "bool", type: "bool" },
|
|
197
|
-
// { name: "amount", internalType: "uint256", type: "uint256" },
|
|
198
|
-
// ],
|
|
199
|
-
// },
|
|
200
|
-
// {
|
|
201
|
-
// name: "requestCalls",
|
|
202
|
-
// internalType: "struct MultiCall[]",
|
|
203
|
-
// type: "tuple[]",
|
|
204
|
-
// components: [
|
|
205
|
-
// { name: "target", internalType: "address", type: "address" },
|
|
206
|
-
// { name: "callData", internalType: "bytes", type: "bytes" },
|
|
207
|
-
// ],
|
|
208
|
-
// },
|
|
209
|
-
// { name: "claimableAt", internalType: "uint256", type: "uint256" },
|
|
210
|
-
// ],
|
|
211
|
-
// },
|
|
212
|
-
// ],
|
|
213
|
-
// stateMutability: "view",
|
|
214
|
-
// },
|
|
215
|
-
{
|
|
216
|
-
type: "function",
|
|
217
|
-
inputs: [],
|
|
218
|
-
name: "owner",
|
|
219
|
-
outputs: [{ name: "", internalType: "address", type: "address" }],
|
|
220
|
-
stateMutability: "view"
|
|
221
|
-
},
|
|
222
|
-
{
|
|
223
|
-
type: "function",
|
|
224
|
-
inputs: [],
|
|
225
|
-
name: "renounceOwnership",
|
|
226
|
-
outputs: [],
|
|
227
|
-
stateMutability: "nonpayable"
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
type: "function",
|
|
231
|
-
inputs: [
|
|
232
|
-
{ name: "subcompressor", internalType: "address", type: "address" }
|
|
233
|
-
],
|
|
234
|
-
name: "setSubcompressor",
|
|
235
|
-
outputs: [],
|
|
236
|
-
stateMutability: "nonpayable"
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
type: "function",
|
|
240
|
-
inputs: [
|
|
241
|
-
{ name: "withdrawableType", internalType: "bytes32", type: "bytes32" },
|
|
242
|
-
{ name: "compressorType", internalType: "bytes32", type: "bytes32" }
|
|
243
|
-
],
|
|
244
|
-
name: "setWithdrawableTypeToCompressorType",
|
|
245
|
-
outputs: [],
|
|
246
|
-
stateMutability: "nonpayable"
|
|
247
|
-
},
|
|
248
|
-
{
|
|
249
|
-
type: "function",
|
|
250
|
-
inputs: [{ name: "newOwner", internalType: "address", type: "address" }],
|
|
251
|
-
name: "transferOwnership",
|
|
252
|
-
outputs: [],
|
|
253
|
-
stateMutability: "nonpayable"
|
|
254
|
-
},
|
|
255
150
|
{
|
|
256
151
|
type: "function",
|
|
257
152
|
inputs: [],
|
|
258
153
|
name: "version",
|
|
259
154
|
outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
|
|
260
155
|
stateMutability: "view"
|
|
261
|
-
},
|
|
262
|
-
{
|
|
263
|
-
type: "function",
|
|
264
|
-
inputs: [{ name: "", internalType: "bytes32", type: "bytes32" }],
|
|
265
|
-
name: "withdrawableTypeToCompressorType",
|
|
266
|
-
outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }],
|
|
267
|
-
stateMutability: "view"
|
|
268
|
-
},
|
|
269
|
-
{
|
|
270
|
-
type: "event",
|
|
271
|
-
anonymous: false,
|
|
272
|
-
inputs: [
|
|
273
|
-
{
|
|
274
|
-
name: "previousOwner",
|
|
275
|
-
internalType: "address",
|
|
276
|
-
type: "address",
|
|
277
|
-
indexed: true
|
|
278
|
-
},
|
|
279
|
-
{
|
|
280
|
-
name: "newOwner",
|
|
281
|
-
internalType: "address",
|
|
282
|
-
type: "address",
|
|
283
|
-
indexed: true
|
|
284
|
-
}
|
|
285
|
-
],
|
|
286
|
-
name: "OwnershipTransferred"
|
|
287
156
|
}
|
|
288
157
|
];
|
|
289
158
|
export {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { iLossPolicyV310Abi } from "../../../abi/310/generated.js";
|
|
2
|
+
import { AbstractFactory } from "./abstract-factory.js";
|
|
3
|
+
const abi = iLossPolicyV310Abi;
|
|
4
|
+
var AccessMode = /* @__PURE__ */ ((AccessMode2) => {
|
|
5
|
+
AccessMode2[AccessMode2["Permissionless"] = 0] = "Permissionless";
|
|
6
|
+
AccessMode2[AccessMode2["Permissioned"] = 1] = "Permissioned";
|
|
7
|
+
AccessMode2[AccessMode2["Forbidden"] = 2] = "Forbidden";
|
|
8
|
+
return AccessMode2;
|
|
9
|
+
})(AccessMode || {});
|
|
10
|
+
class LossPolicyFactory extends AbstractFactory {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(abi);
|
|
13
|
+
}
|
|
14
|
+
setAccessMode(args) {
|
|
15
|
+
return this.createCallData({
|
|
16
|
+
functionName: "setAccessMode",
|
|
17
|
+
args: [args.accessMode]
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
setChecksEnabled(args) {
|
|
21
|
+
return this.createCallData({
|
|
22
|
+
functionName: "setChecksEnabled",
|
|
23
|
+
args: [args.enabled]
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
AccessMode,
|
|
29
|
+
LossPolicyFactory
|
|
30
|
+
};
|
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
import { handleSalt } from "../utils/create2.js";
|
|
25
25
|
import { convertPercent } from "../utils/index.js";
|
|
26
26
|
import { CreditFactory } from "./factory/credit-factory.js";
|
|
27
|
+
import { LossPolicyFactory } from "./factory/loss-policy-factory.js";
|
|
27
28
|
import { PoolFactory } from "./factory/pool-factory.js";
|
|
28
29
|
import { PriceOracleFactory } from "./factory/price-oracle-factory.js";
|
|
29
30
|
import { AddressProviderContract, BaseContract } from "./index.js";
|
|
@@ -32,11 +33,13 @@ class MarketConfiguratorContract extends BaseContract {
|
|
|
32
33
|
creditFactory;
|
|
33
34
|
poolFactory;
|
|
34
35
|
priceOracleFactory;
|
|
36
|
+
lossPolicyFactory;
|
|
35
37
|
constructor(address, client) {
|
|
36
38
|
super(abi, address, client, "MarketConfigurator");
|
|
37
39
|
this.creditFactory = new CreditFactory();
|
|
38
40
|
this.poolFactory = new PoolFactory();
|
|
39
41
|
this.priceOracleFactory = new PriceOracleFactory();
|
|
42
|
+
this.lossPolicyFactory = new LossPolicyFactory();
|
|
40
43
|
}
|
|
41
44
|
async getAddressProvider() {
|
|
42
45
|
const addressProvider = await this.contract.read.addressProvider();
|
|
@@ -393,6 +396,22 @@ class MarketConfiguratorContract extends BaseContract {
|
|
|
393
396
|
]),
|
|
394
397
|
functionName: "getRoleHolders",
|
|
395
398
|
args: [stringToHex("UNPAUSABLE_ADMIN", { size: 32 })]
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
address: acl,
|
|
402
|
+
abi: parseAbi([
|
|
403
|
+
"function getRoleHolders(bytes32) view returns (address[])"
|
|
404
|
+
]),
|
|
405
|
+
functionName: "getRoleHolders",
|
|
406
|
+
args: [stringToHex("LOSS_LIQUIDATOR", { size: 32 })]
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
address: acl,
|
|
410
|
+
abi: parseAbi([
|
|
411
|
+
"function getRoleHolders(bytes32) view returns (address[])"
|
|
412
|
+
]),
|
|
413
|
+
functionName: "getRoleHolders",
|
|
414
|
+
args: [stringToHex("EMERGENCY_LIQUIDATOR", { size: 32 })]
|
|
396
415
|
}
|
|
397
416
|
]
|
|
398
417
|
});
|
|
@@ -401,7 +420,9 @@ class MarketConfiguratorContract extends BaseContract {
|
|
|
401
420
|
emergencyAdmin,
|
|
402
421
|
treasury,
|
|
403
422
|
pausableAdmins: [...results[0]],
|
|
404
|
-
unpausableAdmins: [...results[1]]
|
|
423
|
+
unpausableAdmins: [...results[1]],
|
|
424
|
+
lossLiquidators: [...results[2]],
|
|
425
|
+
emergencyLiquidators: [...results[3]]
|
|
405
426
|
};
|
|
406
427
|
}
|
|
407
428
|
async multipause() {
|
|
@@ -688,6 +709,32 @@ class MarketConfiguratorContract extends BaseContract {
|
|
|
688
709
|
}
|
|
689
710
|
};
|
|
690
711
|
}
|
|
712
|
+
case "configureLossPolicy": {
|
|
713
|
+
const [pool, calldata] = args;
|
|
714
|
+
const decoded = this.lossPolicyFactory.decodeConfig(calldata);
|
|
715
|
+
if (decoded) {
|
|
716
|
+
return {
|
|
717
|
+
chainId: 0,
|
|
718
|
+
target: this.address,
|
|
719
|
+
label: this.name,
|
|
720
|
+
functionName,
|
|
721
|
+
args: {
|
|
722
|
+
pool,
|
|
723
|
+
data: json_stringify(decoded)
|
|
724
|
+
}
|
|
725
|
+
};
|
|
726
|
+
}
|
|
727
|
+
return {
|
|
728
|
+
chainId: 0,
|
|
729
|
+
target: this.address,
|
|
730
|
+
label: this.name,
|
|
731
|
+
functionName,
|
|
732
|
+
args: {
|
|
733
|
+
pool,
|
|
734
|
+
calldata
|
|
735
|
+
}
|
|
736
|
+
};
|
|
737
|
+
}
|
|
691
738
|
case "updateInterestRateModel": {
|
|
692
739
|
const [pool, deployParams] = args;
|
|
693
740
|
return {
|
|
@@ -26,8 +26,9 @@ import { assetsMap } from "../router/index.js";
|
|
|
26
26
|
import { BigIntMath } from "../sdk-legacy/index.js";
|
|
27
27
|
import { AddressMap, childLogger } from "../utils/index.js";
|
|
28
28
|
import { simulateWithPriceUpdates } from "../utils/viem/index.js";
|
|
29
|
-
function getWithdrawalCompressorAddress(
|
|
30
|
-
|
|
29
|
+
function getWithdrawalCompressorAddress(chainId) {
|
|
30
|
+
const compressor = chainId === 1 ? "0xfB79b6713fe214B8748ED7b0db1f93E4f1aC9d29" : void 0;
|
|
31
|
+
return compressor;
|
|
31
32
|
}
|
|
32
33
|
class AbstractCreditAccountService extends SDKConstruct {
|
|
33
34
|
#compressor;
|
|
@@ -1,40 +1,4 @@
|
|
|
1
1
|
export declare const iWithdrawalCompressorV310Abi: readonly [{
|
|
2
|
-
readonly type: "constructor";
|
|
3
|
-
readonly inputs: readonly [{
|
|
4
|
-
readonly name: "_owner";
|
|
5
|
-
readonly internalType: "address";
|
|
6
|
-
readonly type: "address";
|
|
7
|
-
}, {
|
|
8
|
-
readonly name: "addressProvider_";
|
|
9
|
-
readonly internalType: "address";
|
|
10
|
-
readonly type: "address";
|
|
11
|
-
}];
|
|
12
|
-
readonly stateMutability: "nonpayable";
|
|
13
|
-
}, {
|
|
14
|
-
readonly type: "function";
|
|
15
|
-
readonly inputs: readonly [];
|
|
16
|
-
readonly name: "addressProvider";
|
|
17
|
-
readonly outputs: readonly [{
|
|
18
|
-
readonly name: "";
|
|
19
|
-
readonly internalType: "address";
|
|
20
|
-
readonly type: "address";
|
|
21
|
-
}];
|
|
22
|
-
readonly stateMutability: "view";
|
|
23
|
-
}, {
|
|
24
|
-
readonly type: "function";
|
|
25
|
-
readonly inputs: readonly [{
|
|
26
|
-
readonly name: "";
|
|
27
|
-
readonly internalType: "bytes32";
|
|
28
|
-
readonly type: "bytes32";
|
|
29
|
-
}];
|
|
30
|
-
readonly name: "compressorTypeToCompressor";
|
|
31
|
-
readonly outputs: readonly [{
|
|
32
|
-
readonly name: "";
|
|
33
|
-
readonly internalType: "address";
|
|
34
|
-
readonly type: "address";
|
|
35
|
-
}];
|
|
36
|
-
readonly stateMutability: "view";
|
|
37
|
-
}, {
|
|
38
2
|
readonly type: "function";
|
|
39
3
|
readonly inputs: readonly [];
|
|
40
4
|
readonly name: "contractType";
|
|
@@ -183,7 +147,7 @@ export declare const iWithdrawalCompressorV310Abi: readonly [{
|
|
|
183
147
|
}];
|
|
184
148
|
readonly name: "getWithdrawalRequestResult";
|
|
185
149
|
readonly outputs: readonly [{
|
|
186
|
-
readonly name: "
|
|
150
|
+
readonly name: "";
|
|
187
151
|
readonly internalType: "struct RequestableWithdrawal";
|
|
188
152
|
readonly type: "tuple";
|
|
189
153
|
readonly components: readonly [{
|
|
@@ -231,56 +195,6 @@ export declare const iWithdrawalCompressorV310Abi: readonly [{
|
|
|
231
195
|
}];
|
|
232
196
|
}];
|
|
233
197
|
readonly stateMutability: "view";
|
|
234
|
-
}, {
|
|
235
|
-
readonly type: "function";
|
|
236
|
-
readonly inputs: readonly [];
|
|
237
|
-
readonly name: "owner";
|
|
238
|
-
readonly outputs: readonly [{
|
|
239
|
-
readonly name: "";
|
|
240
|
-
readonly internalType: "address";
|
|
241
|
-
readonly type: "address";
|
|
242
|
-
}];
|
|
243
|
-
readonly stateMutability: "view";
|
|
244
|
-
}, {
|
|
245
|
-
readonly type: "function";
|
|
246
|
-
readonly inputs: readonly [];
|
|
247
|
-
readonly name: "renounceOwnership";
|
|
248
|
-
readonly outputs: readonly [];
|
|
249
|
-
readonly stateMutability: "nonpayable";
|
|
250
|
-
}, {
|
|
251
|
-
readonly type: "function";
|
|
252
|
-
readonly inputs: readonly [{
|
|
253
|
-
readonly name: "subcompressor";
|
|
254
|
-
readonly internalType: "address";
|
|
255
|
-
readonly type: "address";
|
|
256
|
-
}];
|
|
257
|
-
readonly name: "setSubcompressor";
|
|
258
|
-
readonly outputs: readonly [];
|
|
259
|
-
readonly stateMutability: "nonpayable";
|
|
260
|
-
}, {
|
|
261
|
-
readonly type: "function";
|
|
262
|
-
readonly inputs: readonly [{
|
|
263
|
-
readonly name: "withdrawableType";
|
|
264
|
-
readonly internalType: "bytes32";
|
|
265
|
-
readonly type: "bytes32";
|
|
266
|
-
}, {
|
|
267
|
-
readonly name: "compressorType";
|
|
268
|
-
readonly internalType: "bytes32";
|
|
269
|
-
readonly type: "bytes32";
|
|
270
|
-
}];
|
|
271
|
-
readonly name: "setWithdrawableTypeToCompressorType";
|
|
272
|
-
readonly outputs: readonly [];
|
|
273
|
-
readonly stateMutability: "nonpayable";
|
|
274
|
-
}, {
|
|
275
|
-
readonly type: "function";
|
|
276
|
-
readonly inputs: readonly [{
|
|
277
|
-
readonly name: "newOwner";
|
|
278
|
-
readonly internalType: "address";
|
|
279
|
-
readonly type: "address";
|
|
280
|
-
}];
|
|
281
|
-
readonly name: "transferOwnership";
|
|
282
|
-
readonly outputs: readonly [];
|
|
283
|
-
readonly stateMutability: "nonpayable";
|
|
284
198
|
}, {
|
|
285
199
|
readonly type: "function";
|
|
286
200
|
readonly inputs: readonly [];
|
|
@@ -291,33 +205,4 @@ export declare const iWithdrawalCompressorV310Abi: readonly [{
|
|
|
291
205
|
readonly type: "uint256";
|
|
292
206
|
}];
|
|
293
207
|
readonly stateMutability: "view";
|
|
294
|
-
}, {
|
|
295
|
-
readonly type: "function";
|
|
296
|
-
readonly inputs: readonly [{
|
|
297
|
-
readonly name: "";
|
|
298
|
-
readonly internalType: "bytes32";
|
|
299
|
-
readonly type: "bytes32";
|
|
300
|
-
}];
|
|
301
|
-
readonly name: "withdrawableTypeToCompressorType";
|
|
302
|
-
readonly outputs: readonly [{
|
|
303
|
-
readonly name: "";
|
|
304
|
-
readonly internalType: "bytes32";
|
|
305
|
-
readonly type: "bytes32";
|
|
306
|
-
}];
|
|
307
|
-
readonly stateMutability: "view";
|
|
308
|
-
}, {
|
|
309
|
-
readonly type: "event";
|
|
310
|
-
readonly anonymous: false;
|
|
311
|
-
readonly inputs: readonly [{
|
|
312
|
-
readonly name: "previousOwner";
|
|
313
|
-
readonly internalType: "address";
|
|
314
|
-
readonly type: "address";
|
|
315
|
-
readonly indexed: true;
|
|
316
|
-
}, {
|
|
317
|
-
readonly name: "newOwner";
|
|
318
|
-
readonly internalType: "address";
|
|
319
|
-
readonly type: "address";
|
|
320
|
-
readonly indexed: true;
|
|
321
|
-
}];
|
|
322
|
-
readonly name: "OwnershipTransferred";
|
|
323
208
|
}];
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import type { Hex } from "viem";
|
|
2
|
+
import { AbstractFactory } from "./abstract-factory.js";
|
|
3
|
+
declare const abi: readonly [{
|
|
4
|
+
readonly type: "function";
|
|
5
|
+
readonly name: "accessMode";
|
|
6
|
+
readonly inputs: readonly [];
|
|
7
|
+
readonly outputs: readonly [{
|
|
8
|
+
readonly name: "";
|
|
9
|
+
readonly type: "uint8";
|
|
10
|
+
readonly internalType: "enum ILossPolicy.AccessMode";
|
|
11
|
+
}];
|
|
12
|
+
readonly stateMutability: "view";
|
|
13
|
+
}, {
|
|
14
|
+
readonly type: "function";
|
|
15
|
+
readonly name: "checksEnabled";
|
|
16
|
+
readonly inputs: readonly [];
|
|
17
|
+
readonly outputs: readonly [{
|
|
18
|
+
readonly name: "";
|
|
19
|
+
readonly type: "bool";
|
|
20
|
+
readonly internalType: "bool";
|
|
21
|
+
}];
|
|
22
|
+
readonly stateMutability: "view";
|
|
23
|
+
}, {
|
|
24
|
+
readonly type: "function";
|
|
25
|
+
readonly name: "contractType";
|
|
26
|
+
readonly inputs: readonly [];
|
|
27
|
+
readonly outputs: readonly [{
|
|
28
|
+
readonly name: "";
|
|
29
|
+
readonly type: "bytes32";
|
|
30
|
+
readonly internalType: "bytes32";
|
|
31
|
+
}];
|
|
32
|
+
readonly stateMutability: "view";
|
|
33
|
+
}, {
|
|
34
|
+
readonly type: "function";
|
|
35
|
+
readonly name: "isLiquidatableWithLoss";
|
|
36
|
+
readonly inputs: readonly [{
|
|
37
|
+
readonly name: "creditAccount";
|
|
38
|
+
readonly type: "address";
|
|
39
|
+
readonly internalType: "address";
|
|
40
|
+
}, {
|
|
41
|
+
readonly name: "caller";
|
|
42
|
+
readonly type: "address";
|
|
43
|
+
readonly internalType: "address";
|
|
44
|
+
}, {
|
|
45
|
+
readonly name: "params";
|
|
46
|
+
readonly type: "tuple";
|
|
47
|
+
readonly internalType: "struct ILossPolicy.Params";
|
|
48
|
+
readonly components: readonly [{
|
|
49
|
+
readonly name: "totalDebtUSD";
|
|
50
|
+
readonly type: "uint256";
|
|
51
|
+
readonly internalType: "uint256";
|
|
52
|
+
}, {
|
|
53
|
+
readonly name: "twvUSD";
|
|
54
|
+
readonly type: "uint256";
|
|
55
|
+
readonly internalType: "uint256";
|
|
56
|
+
}, {
|
|
57
|
+
readonly name: "extraData";
|
|
58
|
+
readonly type: "bytes";
|
|
59
|
+
readonly internalType: "bytes";
|
|
60
|
+
}];
|
|
61
|
+
}];
|
|
62
|
+
readonly outputs: readonly [{
|
|
63
|
+
readonly name: "";
|
|
64
|
+
readonly type: "bool";
|
|
65
|
+
readonly internalType: "bool";
|
|
66
|
+
}];
|
|
67
|
+
readonly stateMutability: "nonpayable";
|
|
68
|
+
}, {
|
|
69
|
+
readonly type: "function";
|
|
70
|
+
readonly name: "serialize";
|
|
71
|
+
readonly inputs: readonly [];
|
|
72
|
+
readonly outputs: readonly [{
|
|
73
|
+
readonly name: "serializedData";
|
|
74
|
+
readonly type: "bytes";
|
|
75
|
+
readonly internalType: "bytes";
|
|
76
|
+
}];
|
|
77
|
+
readonly stateMutability: "view";
|
|
78
|
+
}, {
|
|
79
|
+
readonly type: "function";
|
|
80
|
+
readonly name: "setAccessMode";
|
|
81
|
+
readonly inputs: readonly [{
|
|
82
|
+
readonly name: "mode";
|
|
83
|
+
readonly type: "uint8";
|
|
84
|
+
readonly internalType: "enum ILossPolicy.AccessMode";
|
|
85
|
+
}];
|
|
86
|
+
readonly outputs: readonly [];
|
|
87
|
+
readonly stateMutability: "nonpayable";
|
|
88
|
+
}, {
|
|
89
|
+
readonly type: "function";
|
|
90
|
+
readonly name: "setChecksEnabled";
|
|
91
|
+
readonly inputs: readonly [{
|
|
92
|
+
readonly name: "enabled";
|
|
93
|
+
readonly type: "bool";
|
|
94
|
+
readonly internalType: "bool";
|
|
95
|
+
}];
|
|
96
|
+
readonly outputs: readonly [];
|
|
97
|
+
readonly stateMutability: "nonpayable";
|
|
98
|
+
}, {
|
|
99
|
+
readonly type: "function";
|
|
100
|
+
readonly name: "version";
|
|
101
|
+
readonly inputs: readonly [];
|
|
102
|
+
readonly outputs: readonly [{
|
|
103
|
+
readonly name: "";
|
|
104
|
+
readonly type: "uint256";
|
|
105
|
+
readonly internalType: "uint256";
|
|
106
|
+
}];
|
|
107
|
+
readonly stateMutability: "view";
|
|
108
|
+
}, {
|
|
109
|
+
readonly type: "event";
|
|
110
|
+
readonly name: "SetAccessMode";
|
|
111
|
+
readonly inputs: readonly [{
|
|
112
|
+
readonly name: "mode";
|
|
113
|
+
readonly type: "uint8";
|
|
114
|
+
readonly indexed: false;
|
|
115
|
+
readonly internalType: "enum ILossPolicy.AccessMode";
|
|
116
|
+
}];
|
|
117
|
+
readonly anonymous: false;
|
|
118
|
+
}, {
|
|
119
|
+
readonly type: "event";
|
|
120
|
+
readonly name: "SetChecksEnabled";
|
|
121
|
+
readonly inputs: readonly [{
|
|
122
|
+
readonly name: "enabled";
|
|
123
|
+
readonly type: "bool";
|
|
124
|
+
readonly indexed: false;
|
|
125
|
+
readonly internalType: "bool";
|
|
126
|
+
}];
|
|
127
|
+
readonly anonymous: false;
|
|
128
|
+
}];
|
|
129
|
+
export declare enum AccessMode {
|
|
130
|
+
Permissionless = 0,
|
|
131
|
+
Permissioned = 1,
|
|
132
|
+
Forbidden = 2
|
|
133
|
+
}
|
|
134
|
+
export declare class LossPolicyFactory extends AbstractFactory<typeof abi> {
|
|
135
|
+
constructor();
|
|
136
|
+
setAccessMode(args: {
|
|
137
|
+
accessMode: AccessMode;
|
|
138
|
+
}): Hex;
|
|
139
|
+
setChecksEnabled(args: {
|
|
140
|
+
enabled: boolean;
|
|
141
|
+
}): Hex;
|
|
142
|
+
}
|
|
143
|
+
export {};
|
|
@@ -2,6 +2,7 @@ import { type Address, type DecodeFunctionDataReturnType, type Hex, type PublicC
|
|
|
2
2
|
import type { RawTx } from "../../sdk/types/index.js";
|
|
3
3
|
import type { ParsedCall } from "../core/proposal.js";
|
|
4
4
|
import { CreditFactory } from "./factory/credit-factory.js";
|
|
5
|
+
import { LossPolicyFactory } from "./factory/loss-policy-factory.js";
|
|
5
6
|
import { PoolFactory } from "./factory/pool-factory.js";
|
|
6
7
|
import { PriceOracleFactory } from "./factory/price-oracle-factory.js";
|
|
7
8
|
import { AddressProviderContract, BaseContract } from "./index.js";
|
|
@@ -1534,6 +1535,7 @@ export declare class MarketConfiguratorContract extends BaseContract<typeof abi>
|
|
|
1534
1535
|
readonly creditFactory: CreditFactory;
|
|
1535
1536
|
readonly poolFactory: PoolFactory;
|
|
1536
1537
|
readonly priceOracleFactory: PriceOracleFactory;
|
|
1538
|
+
readonly lossPolicyFactory: LossPolicyFactory;
|
|
1537
1539
|
constructor(address: Address, client: PublicClient);
|
|
1538
1540
|
getAddressProvider(): Promise<AddressProviderContract>;
|
|
1539
1541
|
previewCreateMarket(params: {
|
|
@@ -1636,6 +1638,8 @@ export declare class MarketConfiguratorContract extends BaseContract<typeof abi>
|
|
|
1636
1638
|
treasury: Address;
|
|
1637
1639
|
pausableAdmins: Address[];
|
|
1638
1640
|
unpausableAdmins: Address[];
|
|
1641
|
+
lossLiquidators: Address[];
|
|
1642
|
+
emergencyLiquidators: Address[];
|
|
1639
1643
|
}>;
|
|
1640
1644
|
multipause(): Promise<Address | undefined>;
|
|
1641
1645
|
grantRole(role: string, address: Address): RawTx;
|
|
@@ -9,7 +9,7 @@ import type { AccountToCheck, AddCollateralProps, ChangeDeptProps, ClaimDelayedP
|
|
|
9
9
|
export interface CreditAccountServiceOptions {
|
|
10
10
|
batchSize?: number;
|
|
11
11
|
}
|
|
12
|
-
export declare function getWithdrawalCompressorAddress(
|
|
12
|
+
export declare function getWithdrawalCompressorAddress(chainId: number): "0xfB79b6713fe214B8748ED7b0db1f93E4f1aC9d29" | undefined;
|
|
13
13
|
export declare abstract class AbstractCreditAccountService extends SDKConstruct {
|
|
14
14
|
#private;
|
|
15
15
|
constructor(sdk: GearboxSDK, options?: CreditAccountServiceOptions);
|