@gearbox-protocol/sdk 10.5.0 → 10.7.0
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/310/generated.js +239 -25
- package/dist/cjs/dev/RevolverTransport.js +3 -0
- package/dist/cjs/sdk/accounts/AbstractCreditAccountsService.js +20 -3
- package/dist/cjs/sdk/market/MarketSuite.js +4 -0
- package/dist/cjs/sdk/market/credit/CreditFacadeV300Contract.js +4 -1
- package/dist/cjs/sdk/market/credit/CreditFacadeV310Contract.js +2 -2
- package/dist/cjs/sdk/market/loss-policy/AliasLossPolicyV310Contract.js +66 -0
- package/dist/cjs/sdk/market/loss-policy/LossPolicyContract.js +43 -0
- package/dist/cjs/sdk/market/loss-policy/createLossPolicy.js +48 -0
- package/dist/cjs/sdk/market/loss-policy/index.js +28 -0
- package/dist/cjs/sdk/market/loss-policy/types.js +16 -0
- package/dist/esm/abi/310/generated.js +238 -25
- package/dist/esm/dev/RevolverTransport.js +4 -0
- package/dist/esm/sdk/accounts/AbstractCreditAccountsService.js +20 -3
- package/dist/esm/sdk/market/MarketSuite.js +6 -0
- package/dist/esm/sdk/market/credit/CreditFacadeV300Contract.js +4 -1
- package/dist/esm/sdk/market/credit/CreditFacadeV310Contract.js +2 -2
- package/dist/esm/sdk/market/loss-policy/AliasLossPolicyV310Contract.js +42 -0
- package/dist/esm/sdk/market/loss-policy/LossPolicyContract.js +19 -0
- package/dist/esm/sdk/market/loss-policy/createLossPolicy.js +24 -0
- package/dist/esm/sdk/market/loss-policy/index.js +4 -0
- package/dist/esm/sdk/market/loss-policy/types.js +0 -0
- package/dist/types/abi/310/generated.d.ts +292 -22
- package/dist/types/sdk/accounts/AbstractCreditAccountsService.d.ts +2 -2
- package/dist/types/sdk/accounts/types.d.ts +8 -1
- package/dist/types/sdk/market/MarketSuite.d.ts +2 -0
- package/dist/types/sdk/market/credit/CreditFacadeV300Contract.d.ts +2 -2
- package/dist/types/sdk/market/credit/CreditFacadeV310Contract.d.ts +2 -2
- package/dist/types/sdk/market/loss-policy/AliasLossPolicyV310Contract.d.ts +280 -0
- package/dist/types/sdk/market/loss-policy/LossPolicyContract.d.ts +136 -0
- package/dist/types/sdk/market/loss-policy/createLossPolicy.d.ts +16 -0
- package/dist/types/sdk/market/loss-policy/index.d.ts +4 -0
- package/dist/types/sdk/market/loss-policy/types.d.ts +13 -0
- package/dist/types/sdk/types/state-human.d.ts +1 -0
- package/package.json +5 -5
|
@@ -3055,129 +3055,399 @@ export declare const iGaugeV310Abi: readonly [{
|
|
|
3055
3055
|
}];
|
|
3056
3056
|
export declare const iLossPolicyV310Abi: readonly [{
|
|
3057
3057
|
readonly type: "function";
|
|
3058
|
-
readonly inputs: readonly [];
|
|
3059
3058
|
readonly name: "accessMode";
|
|
3059
|
+
readonly inputs: readonly [];
|
|
3060
3060
|
readonly outputs: readonly [{
|
|
3061
3061
|
readonly name: "";
|
|
3062
|
-
readonly internalType: "enum ILossPolicy.AccessMode";
|
|
3063
3062
|
readonly type: "uint8";
|
|
3063
|
+
readonly internalType: "enum ILossPolicy.AccessMode";
|
|
3064
3064
|
}];
|
|
3065
3065
|
readonly stateMutability: "view";
|
|
3066
3066
|
}, {
|
|
3067
3067
|
readonly type: "function";
|
|
3068
|
-
readonly inputs: readonly [];
|
|
3069
3068
|
readonly name: "checksEnabled";
|
|
3069
|
+
readonly inputs: readonly [];
|
|
3070
|
+
readonly outputs: readonly [{
|
|
3071
|
+
readonly name: "";
|
|
3072
|
+
readonly type: "bool";
|
|
3073
|
+
readonly internalType: "bool";
|
|
3074
|
+
}];
|
|
3075
|
+
readonly stateMutability: "view";
|
|
3076
|
+
}, {
|
|
3077
|
+
readonly type: "function";
|
|
3078
|
+
readonly name: "contractType";
|
|
3079
|
+
readonly inputs: readonly [];
|
|
3070
3080
|
readonly outputs: readonly [{
|
|
3071
3081
|
readonly name: "";
|
|
3082
|
+
readonly type: "bytes32";
|
|
3083
|
+
readonly internalType: "bytes32";
|
|
3084
|
+
}];
|
|
3085
|
+
readonly stateMutability: "view";
|
|
3086
|
+
}, {
|
|
3087
|
+
readonly type: "function";
|
|
3088
|
+
readonly name: "isLiquidatableWithLoss";
|
|
3089
|
+
readonly inputs: readonly [{
|
|
3090
|
+
readonly name: "creditAccount";
|
|
3091
|
+
readonly type: "address";
|
|
3092
|
+
readonly internalType: "address";
|
|
3093
|
+
}, {
|
|
3094
|
+
readonly name: "caller";
|
|
3095
|
+
readonly type: "address";
|
|
3096
|
+
readonly internalType: "address";
|
|
3097
|
+
}, {
|
|
3098
|
+
readonly name: "params";
|
|
3099
|
+
readonly type: "tuple";
|
|
3100
|
+
readonly internalType: "struct ILossPolicy.Params";
|
|
3101
|
+
readonly components: readonly [{
|
|
3102
|
+
readonly name: "totalDebtUSD";
|
|
3103
|
+
readonly type: "uint256";
|
|
3104
|
+
readonly internalType: "uint256";
|
|
3105
|
+
}, {
|
|
3106
|
+
readonly name: "twvUSD";
|
|
3107
|
+
readonly type: "uint256";
|
|
3108
|
+
readonly internalType: "uint256";
|
|
3109
|
+
}, {
|
|
3110
|
+
readonly name: "extraData";
|
|
3111
|
+
readonly type: "bytes";
|
|
3112
|
+
readonly internalType: "bytes";
|
|
3113
|
+
}];
|
|
3114
|
+
}];
|
|
3115
|
+
readonly outputs: readonly [{
|
|
3116
|
+
readonly name: "";
|
|
3117
|
+
readonly type: "bool";
|
|
3118
|
+
readonly internalType: "bool";
|
|
3119
|
+
}];
|
|
3120
|
+
readonly stateMutability: "nonpayable";
|
|
3121
|
+
}, {
|
|
3122
|
+
readonly type: "function";
|
|
3123
|
+
readonly name: "serialize";
|
|
3124
|
+
readonly inputs: readonly [];
|
|
3125
|
+
readonly outputs: readonly [{
|
|
3126
|
+
readonly name: "serializedData";
|
|
3127
|
+
readonly type: "bytes";
|
|
3128
|
+
readonly internalType: "bytes";
|
|
3129
|
+
}];
|
|
3130
|
+
readonly stateMutability: "view";
|
|
3131
|
+
}, {
|
|
3132
|
+
readonly type: "function";
|
|
3133
|
+
readonly name: "setAccessMode";
|
|
3134
|
+
readonly inputs: readonly [{
|
|
3135
|
+
readonly name: "mode";
|
|
3136
|
+
readonly type: "uint8";
|
|
3137
|
+
readonly internalType: "enum ILossPolicy.AccessMode";
|
|
3138
|
+
}];
|
|
3139
|
+
readonly outputs: readonly [];
|
|
3140
|
+
readonly stateMutability: "nonpayable";
|
|
3141
|
+
}, {
|
|
3142
|
+
readonly type: "function";
|
|
3143
|
+
readonly name: "setChecksEnabled";
|
|
3144
|
+
readonly inputs: readonly [{
|
|
3145
|
+
readonly name: "enabled";
|
|
3146
|
+
readonly type: "bool";
|
|
3072
3147
|
readonly internalType: "bool";
|
|
3148
|
+
}];
|
|
3149
|
+
readonly outputs: readonly [];
|
|
3150
|
+
readonly stateMutability: "nonpayable";
|
|
3151
|
+
}, {
|
|
3152
|
+
readonly type: "function";
|
|
3153
|
+
readonly name: "version";
|
|
3154
|
+
readonly inputs: readonly [];
|
|
3155
|
+
readonly outputs: readonly [{
|
|
3156
|
+
readonly name: "";
|
|
3157
|
+
readonly type: "uint256";
|
|
3158
|
+
readonly internalType: "uint256";
|
|
3159
|
+
}];
|
|
3160
|
+
readonly stateMutability: "view";
|
|
3161
|
+
}, {
|
|
3162
|
+
readonly type: "event";
|
|
3163
|
+
readonly name: "SetAccessMode";
|
|
3164
|
+
readonly inputs: readonly [{
|
|
3165
|
+
readonly name: "mode";
|
|
3166
|
+
readonly type: "uint8";
|
|
3167
|
+
readonly indexed: false;
|
|
3168
|
+
readonly internalType: "enum ILossPolicy.AccessMode";
|
|
3169
|
+
}];
|
|
3170
|
+
readonly anonymous: false;
|
|
3171
|
+
}, {
|
|
3172
|
+
readonly type: "event";
|
|
3173
|
+
readonly name: "SetChecksEnabled";
|
|
3174
|
+
readonly inputs: readonly [{
|
|
3175
|
+
readonly name: "enabled";
|
|
3073
3176
|
readonly type: "bool";
|
|
3177
|
+
readonly indexed: false;
|
|
3178
|
+
readonly internalType: "bool";
|
|
3179
|
+
}];
|
|
3180
|
+
readonly anonymous: false;
|
|
3181
|
+
}];
|
|
3182
|
+
export declare const iAliasedLossPolicyV310Abi: readonly [{
|
|
3183
|
+
readonly type: "function";
|
|
3184
|
+
readonly name: "accessMode";
|
|
3185
|
+
readonly inputs: readonly [];
|
|
3186
|
+
readonly outputs: readonly [{
|
|
3187
|
+
readonly name: "";
|
|
3188
|
+
readonly type: "uint8";
|
|
3189
|
+
readonly internalType: "enum ILossPolicy.AccessMode";
|
|
3074
3190
|
}];
|
|
3075
3191
|
readonly stateMutability: "view";
|
|
3076
3192
|
}, {
|
|
3077
3193
|
readonly type: "function";
|
|
3194
|
+
readonly name: "acl";
|
|
3078
3195
|
readonly inputs: readonly [];
|
|
3196
|
+
readonly outputs: readonly [{
|
|
3197
|
+
readonly name: "";
|
|
3198
|
+
readonly type: "address";
|
|
3199
|
+
readonly internalType: "address";
|
|
3200
|
+
}];
|
|
3201
|
+
readonly stateMutability: "view";
|
|
3202
|
+
}, {
|
|
3203
|
+
readonly type: "function";
|
|
3204
|
+
readonly name: "checksEnabled";
|
|
3205
|
+
readonly inputs: readonly [];
|
|
3206
|
+
readonly outputs: readonly [{
|
|
3207
|
+
readonly name: "";
|
|
3208
|
+
readonly type: "bool";
|
|
3209
|
+
readonly internalType: "bool";
|
|
3210
|
+
}];
|
|
3211
|
+
readonly stateMutability: "view";
|
|
3212
|
+
}, {
|
|
3213
|
+
readonly type: "function";
|
|
3079
3214
|
readonly name: "contractType";
|
|
3215
|
+
readonly inputs: readonly [];
|
|
3080
3216
|
readonly outputs: readonly [{
|
|
3081
3217
|
readonly name: "";
|
|
3082
|
-
readonly internalType: "bytes32";
|
|
3083
3218
|
readonly type: "bytes32";
|
|
3219
|
+
readonly internalType: "bytes32";
|
|
3084
3220
|
}];
|
|
3085
3221
|
readonly stateMutability: "view";
|
|
3086
3222
|
}, {
|
|
3087
3223
|
readonly type: "function";
|
|
3224
|
+
readonly name: "getAliasPriceFeedParams";
|
|
3225
|
+
readonly inputs: readonly [{
|
|
3226
|
+
readonly name: "token";
|
|
3227
|
+
readonly type: "address";
|
|
3228
|
+
readonly internalType: "address";
|
|
3229
|
+
}];
|
|
3230
|
+
readonly outputs: readonly [{
|
|
3231
|
+
readonly name: "";
|
|
3232
|
+
readonly type: "tuple";
|
|
3233
|
+
readonly internalType: "struct PriceFeedParams";
|
|
3234
|
+
readonly components: readonly [{
|
|
3235
|
+
readonly name: "priceFeed";
|
|
3236
|
+
readonly type: "address";
|
|
3237
|
+
readonly internalType: "address";
|
|
3238
|
+
}, {
|
|
3239
|
+
readonly name: "stalenessPeriod";
|
|
3240
|
+
readonly type: "uint32";
|
|
3241
|
+
readonly internalType: "uint32";
|
|
3242
|
+
}, {
|
|
3243
|
+
readonly name: "skipCheck";
|
|
3244
|
+
readonly type: "bool";
|
|
3245
|
+
readonly internalType: "bool";
|
|
3246
|
+
}, {
|
|
3247
|
+
readonly name: "tokenDecimals";
|
|
3248
|
+
readonly type: "uint8";
|
|
3249
|
+
readonly internalType: "uint8";
|
|
3250
|
+
}];
|
|
3251
|
+
}];
|
|
3252
|
+
readonly stateMutability: "view";
|
|
3253
|
+
}, {
|
|
3254
|
+
readonly type: "function";
|
|
3255
|
+
readonly name: "getRequiredAliasPriceFeeds";
|
|
3088
3256
|
readonly inputs: readonly [{
|
|
3089
3257
|
readonly name: "creditAccount";
|
|
3258
|
+
readonly type: "address";
|
|
3090
3259
|
readonly internalType: "address";
|
|
3260
|
+
}];
|
|
3261
|
+
readonly outputs: readonly [{
|
|
3262
|
+
readonly name: "";
|
|
3263
|
+
readonly type: "address[]";
|
|
3264
|
+
readonly internalType: "address[]";
|
|
3265
|
+
}];
|
|
3266
|
+
readonly stateMutability: "view";
|
|
3267
|
+
}, {
|
|
3268
|
+
readonly type: "function";
|
|
3269
|
+
readonly name: "getTokensWithAlias";
|
|
3270
|
+
readonly inputs: readonly [];
|
|
3271
|
+
readonly outputs: readonly [{
|
|
3272
|
+
readonly name: "";
|
|
3273
|
+
readonly type: "address[]";
|
|
3274
|
+
readonly internalType: "address[]";
|
|
3275
|
+
}];
|
|
3276
|
+
readonly stateMutability: "view";
|
|
3277
|
+
}, {
|
|
3278
|
+
readonly type: "function";
|
|
3279
|
+
readonly name: "isLiquidatableWithLoss";
|
|
3280
|
+
readonly inputs: readonly [{
|
|
3281
|
+
readonly name: "creditAccount";
|
|
3091
3282
|
readonly type: "address";
|
|
3283
|
+
readonly internalType: "address";
|
|
3092
3284
|
}, {
|
|
3093
3285
|
readonly name: "caller";
|
|
3094
|
-
readonly internalType: "address";
|
|
3095
3286
|
readonly type: "address";
|
|
3287
|
+
readonly internalType: "address";
|
|
3096
3288
|
}, {
|
|
3097
3289
|
readonly name: "params";
|
|
3098
|
-
readonly internalType: "struct ILossPolicy.Params";
|
|
3099
3290
|
readonly type: "tuple";
|
|
3291
|
+
readonly internalType: "struct ILossPolicy.Params";
|
|
3100
3292
|
readonly components: readonly [{
|
|
3101
3293
|
readonly name: "totalDebtUSD";
|
|
3102
|
-
readonly internalType: "uint256";
|
|
3103
3294
|
readonly type: "uint256";
|
|
3295
|
+
readonly internalType: "uint256";
|
|
3104
3296
|
}, {
|
|
3105
3297
|
readonly name: "twvUSD";
|
|
3106
|
-
readonly internalType: "uint256";
|
|
3107
3298
|
readonly type: "uint256";
|
|
3299
|
+
readonly internalType: "uint256";
|
|
3108
3300
|
}, {
|
|
3109
3301
|
readonly name: "extraData";
|
|
3110
|
-
readonly internalType: "bytes";
|
|
3111
3302
|
readonly type: "bytes";
|
|
3303
|
+
readonly internalType: "bytes";
|
|
3112
3304
|
}];
|
|
3113
3305
|
}];
|
|
3114
|
-
readonly name: "isLiquidatableWithLoss";
|
|
3115
3306
|
readonly outputs: readonly [{
|
|
3116
3307
|
readonly name: "";
|
|
3117
|
-
readonly internalType: "bool";
|
|
3118
3308
|
readonly type: "bool";
|
|
3309
|
+
readonly internalType: "bool";
|
|
3119
3310
|
}];
|
|
3120
3311
|
readonly stateMutability: "nonpayable";
|
|
3121
3312
|
}, {
|
|
3122
3313
|
readonly type: "function";
|
|
3314
|
+
readonly name: "pool";
|
|
3315
|
+
readonly inputs: readonly [];
|
|
3316
|
+
readonly outputs: readonly [{
|
|
3317
|
+
readonly name: "";
|
|
3318
|
+
readonly type: "address";
|
|
3319
|
+
readonly internalType: "address";
|
|
3320
|
+
}];
|
|
3321
|
+
readonly stateMutability: "view";
|
|
3322
|
+
}, {
|
|
3323
|
+
readonly type: "function";
|
|
3324
|
+
readonly name: "priceFeedStore";
|
|
3123
3325
|
readonly inputs: readonly [];
|
|
3326
|
+
readonly outputs: readonly [{
|
|
3327
|
+
readonly name: "";
|
|
3328
|
+
readonly type: "address";
|
|
3329
|
+
readonly internalType: "address";
|
|
3330
|
+
}];
|
|
3331
|
+
readonly stateMutability: "view";
|
|
3332
|
+
}, {
|
|
3333
|
+
readonly type: "function";
|
|
3124
3334
|
readonly name: "serialize";
|
|
3335
|
+
readonly inputs: readonly [];
|
|
3125
3336
|
readonly outputs: readonly [{
|
|
3126
3337
|
readonly name: "serializedData";
|
|
3127
|
-
readonly internalType: "bytes";
|
|
3128
3338
|
readonly type: "bytes";
|
|
3339
|
+
readonly internalType: "bytes";
|
|
3129
3340
|
}];
|
|
3130
3341
|
readonly stateMutability: "view";
|
|
3131
3342
|
}, {
|
|
3132
3343
|
readonly type: "function";
|
|
3344
|
+
readonly name: "setAccessMode";
|
|
3133
3345
|
readonly inputs: readonly [{
|
|
3134
3346
|
readonly name: "mode";
|
|
3135
|
-
readonly internalType: "enum ILossPolicy.AccessMode";
|
|
3136
3347
|
readonly type: "uint8";
|
|
3348
|
+
readonly internalType: "enum ILossPolicy.AccessMode";
|
|
3137
3349
|
}];
|
|
3138
|
-
readonly name: "setAccessMode";
|
|
3139
3350
|
readonly outputs: readonly [];
|
|
3140
3351
|
readonly stateMutability: "nonpayable";
|
|
3141
3352
|
}, {
|
|
3142
3353
|
readonly type: "function";
|
|
3354
|
+
readonly name: "setAliasPriceFeed";
|
|
3355
|
+
readonly inputs: readonly [{
|
|
3356
|
+
readonly name: "token";
|
|
3357
|
+
readonly type: "address";
|
|
3358
|
+
readonly internalType: "address";
|
|
3359
|
+
}, {
|
|
3360
|
+
readonly name: "priceFeed";
|
|
3361
|
+
readonly type: "address";
|
|
3362
|
+
readonly internalType: "address";
|
|
3363
|
+
}];
|
|
3364
|
+
readonly outputs: readonly [];
|
|
3365
|
+
readonly stateMutability: "nonpayable";
|
|
3366
|
+
}, {
|
|
3367
|
+
readonly type: "function";
|
|
3368
|
+
readonly name: "setChecksEnabled";
|
|
3143
3369
|
readonly inputs: readonly [{
|
|
3144
3370
|
readonly name: "enabled";
|
|
3145
|
-
readonly internalType: "bool";
|
|
3146
3371
|
readonly type: "bool";
|
|
3372
|
+
readonly internalType: "bool";
|
|
3147
3373
|
}];
|
|
3148
|
-
readonly name: "setChecksEnabled";
|
|
3149
3374
|
readonly outputs: readonly [];
|
|
3150
3375
|
readonly stateMutability: "nonpayable";
|
|
3151
3376
|
}, {
|
|
3152
3377
|
readonly type: "function";
|
|
3378
|
+
readonly name: "underlying";
|
|
3153
3379
|
readonly inputs: readonly [];
|
|
3380
|
+
readonly outputs: readonly [{
|
|
3381
|
+
readonly name: "";
|
|
3382
|
+
readonly type: "address";
|
|
3383
|
+
readonly internalType: "address";
|
|
3384
|
+
}];
|
|
3385
|
+
readonly stateMutability: "view";
|
|
3386
|
+
}, {
|
|
3387
|
+
readonly type: "function";
|
|
3154
3388
|
readonly name: "version";
|
|
3389
|
+
readonly inputs: readonly [];
|
|
3155
3390
|
readonly outputs: readonly [{
|
|
3156
3391
|
readonly name: "";
|
|
3157
|
-
readonly internalType: "uint256";
|
|
3158
3392
|
readonly type: "uint256";
|
|
3393
|
+
readonly internalType: "uint256";
|
|
3159
3394
|
}];
|
|
3160
3395
|
readonly stateMutability: "view";
|
|
3161
3396
|
}, {
|
|
3162
3397
|
readonly type: "event";
|
|
3163
|
-
readonly
|
|
3398
|
+
readonly name: "SetAccessMode";
|
|
3164
3399
|
readonly inputs: readonly [{
|
|
3165
3400
|
readonly name: "mode";
|
|
3166
|
-
readonly internalType: "enum ILossPolicy.AccessMode";
|
|
3167
3401
|
readonly type: "uint8";
|
|
3168
3402
|
readonly indexed: false;
|
|
3403
|
+
readonly internalType: "enum ILossPolicy.AccessMode";
|
|
3169
3404
|
}];
|
|
3170
|
-
readonly
|
|
3405
|
+
readonly anonymous: false;
|
|
3171
3406
|
}, {
|
|
3172
3407
|
readonly type: "event";
|
|
3408
|
+
readonly name: "SetAliasPriceFeed";
|
|
3409
|
+
readonly inputs: readonly [{
|
|
3410
|
+
readonly name: "token";
|
|
3411
|
+
readonly type: "address";
|
|
3412
|
+
readonly indexed: true;
|
|
3413
|
+
readonly internalType: "address";
|
|
3414
|
+
}, {
|
|
3415
|
+
readonly name: "priceFeed";
|
|
3416
|
+
readonly type: "address";
|
|
3417
|
+
readonly indexed: true;
|
|
3418
|
+
readonly internalType: "address";
|
|
3419
|
+
}, {
|
|
3420
|
+
readonly name: "stalenessPeriod";
|
|
3421
|
+
readonly type: "uint32";
|
|
3422
|
+
readonly indexed: false;
|
|
3423
|
+
readonly internalType: "uint32";
|
|
3424
|
+
}, {
|
|
3425
|
+
readonly name: "skipCheck";
|
|
3426
|
+
readonly type: "bool";
|
|
3427
|
+
readonly indexed: false;
|
|
3428
|
+
readonly internalType: "bool";
|
|
3429
|
+
}];
|
|
3173
3430
|
readonly anonymous: false;
|
|
3431
|
+
}, {
|
|
3432
|
+
readonly type: "event";
|
|
3433
|
+
readonly name: "SetChecksEnabled";
|
|
3174
3434
|
readonly inputs: readonly [{
|
|
3175
3435
|
readonly name: "enabled";
|
|
3176
|
-
readonly internalType: "bool";
|
|
3177
3436
|
readonly type: "bool";
|
|
3178
3437
|
readonly indexed: false;
|
|
3438
|
+
readonly internalType: "bool";
|
|
3179
3439
|
}];
|
|
3180
|
-
readonly
|
|
3440
|
+
readonly anonymous: false;
|
|
3441
|
+
}, {
|
|
3442
|
+
readonly type: "event";
|
|
3443
|
+
readonly name: "UnsetAliasPriceFeed";
|
|
3444
|
+
readonly inputs: readonly [{
|
|
3445
|
+
readonly name: "token";
|
|
3446
|
+
readonly type: "address";
|
|
3447
|
+
readonly indexed: true;
|
|
3448
|
+
readonly internalType: "address";
|
|
3449
|
+
}];
|
|
3450
|
+
readonly anonymous: false;
|
|
3181
3451
|
}];
|
|
3182
3452
|
export declare const iMarketConfiguratorV310Abi: readonly [{
|
|
3183
3453
|
readonly type: "function";
|
|
@@ -5,7 +5,7 @@ import type { GearboxSDK } from "../GearboxSDK.js";
|
|
|
5
5
|
import type { OnDemandPriceUpdates, PriceUpdateV300, PriceUpdateV310, UpdatePriceFeedsResult } from "../market/index.js";
|
|
6
6
|
import { type Asset, type RouterCASlice } from "../router/index.js";
|
|
7
7
|
import type { MultiCall } from "../types/index.js";
|
|
8
|
-
import type { AddCollateralProps, ChangeDeptProps, ClaimDelayedProps, CloseCreditAccountProps, CloseCreditAccountResult, CreditAccountOperationResult, EnableTokensProps, ExecuteSwapProps, FullyLiquidateProps, GetConnectedBotsResult, GetConnectedMigrationBotsResult, GetCreditAccountsOptions, GetPendingWithdrawalsProps, GetPendingWithdrawalsResult, OpenCAProps, PermitResult, PrepareUpdateQuotasProps, PreviewDelayedWithdrawalProps, PreviewDelayedWithdrawalResult, PriceUpdatesOptions, Rewards, StartDelayedWithdrawalProps, UpdateQuotasProps } from "./types.js";
|
|
8
|
+
import type { AddCollateralProps, ChangeDeptProps, ClaimDelayedProps, CloseCreditAccountProps, CloseCreditAccountResult, CreditAccountOperationResult, EnableTokensProps, ExecuteSwapProps, FullyLiquidateProps, FullyLiquidateResult, GetConnectedBotsResult, GetConnectedMigrationBotsResult, GetCreditAccountsOptions, GetPendingWithdrawalsProps, GetPendingWithdrawalsResult, OpenCAProps, PermitResult, PrepareUpdateQuotasProps, PreviewDelayedWithdrawalProps, PreviewDelayedWithdrawalResult, PriceUpdatesOptions, Rewards, StartDelayedWithdrawalProps, UpdateQuotasProps } from "./types.js";
|
|
9
9
|
export interface CreditAccountServiceOptions {
|
|
10
10
|
batchSize?: number;
|
|
11
11
|
}
|
|
@@ -56,7 +56,7 @@ export declare abstract class AbstractCreditAccountService extends SDKConstruct
|
|
|
56
56
|
* @param props - {@link FullyLiquidateProps}
|
|
57
57
|
* @returns
|
|
58
58
|
*/
|
|
59
|
-
fullyLiquidate(props: FullyLiquidateProps): Promise<
|
|
59
|
+
fullyLiquidate(props: FullyLiquidateProps): Promise<FullyLiquidateResult>;
|
|
60
60
|
/**
|
|
61
61
|
* Closes credit account or closes credit account and keeps it open with zero debt.
|
|
62
62
|
- Ca is closed in the following order: price update -> close path to swap all tokens into underlying ->
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Address, ContractFunctionArgs, GetContractReturnType, PublicClient } from "viem";
|
|
1
|
+
import type { Address, ContractFunctionArgs, GetContractReturnType, Hex, PublicClient } from "viem";
|
|
2
2
|
import type { creditAccountCompressorAbi } from "../../abi/compressors/creditAccountCompressor.js";
|
|
3
3
|
import type { iWithdrawalCompressorV310Abi } from "../../abi/IWithdrawalCompressorV310.js";
|
|
4
4
|
import type { LiquidationBotType as LiquidationBotTypeSDK } from "../../plugins/bots/types.js";
|
|
@@ -42,6 +42,9 @@ export interface PriceUpdatesOptions {
|
|
|
42
42
|
export interface CloseCreditAccountResult extends CreditAccountOperationResult {
|
|
43
43
|
routerCloseResult: RouterCloseResult;
|
|
44
44
|
}
|
|
45
|
+
export interface FullyLiquidateResult extends CloseCreditAccountResult {
|
|
46
|
+
lossPolicyData?: Hex;
|
|
47
|
+
}
|
|
45
48
|
export interface CreditAccountOperationResult {
|
|
46
49
|
tx: RawTx;
|
|
47
50
|
calls: Array<MultiCall>;
|
|
@@ -332,6 +335,10 @@ export interface FullyLiquidateProps {
|
|
|
332
335
|
* If true, will ignore reserve prices
|
|
333
336
|
*/
|
|
334
337
|
ignoreReservePrices?: boolean;
|
|
338
|
+
/**
|
|
339
|
+
* If true, will try to apply loss policy
|
|
340
|
+
*/
|
|
341
|
+
applyLossPolicy?: boolean;
|
|
335
342
|
}
|
|
336
343
|
export interface PermitResult {
|
|
337
344
|
r: Address;
|
|
@@ -4,6 +4,7 @@ import { SDKConstruct } from "../base/index.js";
|
|
|
4
4
|
import type { GearboxSDK } from "../GearboxSDK.js";
|
|
5
5
|
import type { MarketStateHuman } from "../types/index.js";
|
|
6
6
|
import { CreditSuite } from "./credit/index.js";
|
|
7
|
+
import { type ILossPolicyContract } from "./loss-policy/index.js";
|
|
7
8
|
import { MarketConfiguratorContract } from "./MarketConfiguratorContract.js";
|
|
8
9
|
import type { IPriceOracleContract } from "./oracle/index.js";
|
|
9
10
|
import { PoolSuite } from "./pool/index.js";
|
|
@@ -13,6 +14,7 @@ export declare class MarketSuite extends SDKConstruct {
|
|
|
13
14
|
readonly configurator: MarketConfiguratorContract;
|
|
14
15
|
readonly pool: PoolSuite;
|
|
15
16
|
readonly priceOracle: IPriceOracleContract;
|
|
17
|
+
readonly lossPolicy: ILossPolicyContract;
|
|
16
18
|
readonly creditManagers: CreditSuite[];
|
|
17
19
|
/**
|
|
18
20
|
* Original data received from compressor
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Address, ContractEventName, DecodeFunctionDataReturnType, Log } from "viem";
|
|
1
|
+
import type { Address, ContractEventName, DecodeFunctionDataReturnType, Hex, Log } from "viem";
|
|
2
2
|
import type { CreditFacadeState, CreditSuiteState } from "../../base/index.js";
|
|
3
3
|
import { BaseContract } from "../../base/index.js";
|
|
4
4
|
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
@@ -780,7 +780,7 @@ export declare class CreditFacadeV300Contract extends BaseContract<abi> {
|
|
|
780
780
|
constructor(sdk: GearboxSDK, { creditFacade, creditManager }: CreditSuiteState);
|
|
781
781
|
stateHuman(raw?: boolean): CreditFacadeStateHuman;
|
|
782
782
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
783
|
-
liquidateCreditAccount(ca: Address, to: Address, calls: MultiCall[]): RawTx;
|
|
783
|
+
liquidateCreditAccount(ca: Address, to: Address, calls: MultiCall[], lossPolicyData?: Hex): RawTx;
|
|
784
784
|
closeCreditAccount(ca: Address, calls: MultiCall[]): RawTx;
|
|
785
785
|
multicall(ca: Address, calls: MultiCall[]): RawTx;
|
|
786
786
|
openCreditAccount(to: Address, calls: MultiCall[], referralCode: bigint): RawTx;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Address, ContractEventName, DecodeFunctionDataReturnType, Log } from "viem";
|
|
1
|
+
import type { Address, ContractEventName, DecodeFunctionDataReturnType, Hex, Log } from "viem";
|
|
2
2
|
import type { CreditFacadeState, CreditSuiteState } from "../../base/index.js";
|
|
3
3
|
import { BaseContract } from "../../base/index.js";
|
|
4
4
|
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
@@ -853,7 +853,7 @@ export declare class CreditFacadeV310Contract extends BaseContract<abi> {
|
|
|
853
853
|
constructor(sdk: GearboxSDK, { creditFacade, creditManager }: CreditSuiteState);
|
|
854
854
|
stateHuman(raw?: boolean): CreditFacadeStateHuman;
|
|
855
855
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
856
|
-
liquidateCreditAccount(ca: Address, to: Address, calls: MultiCall[]): RawTx;
|
|
856
|
+
liquidateCreditAccount(ca: Address, to: Address, calls: MultiCall[], lossPolicyData?: Hex): RawTx;
|
|
857
857
|
closeCreditAccount(ca: Address, calls: MultiCall[]): RawTx;
|
|
858
858
|
multicall(ca: Address, calls: MultiCall[]): RawTx;
|
|
859
859
|
openCreditAccount(to: Address, calls: MultiCall[], referralCode: bigint): RawTx;
|