@gearbox-protocol/sdk 14.12.0-next.47 → 14.12.0-next.49
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/ILiquidationCompressorV313.js +103 -0
- package/dist/cjs/abi/compressors/liquidationCompressor.js +215 -0
- package/dist/cjs/abi/compressors/subcompressors/liquidation/midasLiquidationSubcompressor.js +104 -0
- package/dist/cjs/abi/compressors/subcompressors/liquidation/securitizeLiquidationSubcompressor.js +104 -0
- package/dist/cjs/dev/withdrawalAbi.js +104 -66
- package/dist/cjs/plugins/adapters/abi/adapters/iMidasGatewayAdapterV311.js +2 -306
- package/dist/cjs/plugins/adapters/abi/index.js +2 -0
- package/dist/cjs/plugins/adapters/abi/midas/iMidasGatewayV311.js +194 -0
- package/dist/cjs/plugins/adapters/abi/midas/index.js +22 -0
- package/dist/cjs/plugins/adapters/abi/securitize/iSecuritizeRedemptionGatewayV311.js +184 -24
- package/dist/cjs/plugins/adapters/contracts/MidasGatewayAdapterContract.js +2 -1
- package/dist/cjs/sdk/accounts/liquidations/LiquidationsService.js +81 -58
- package/dist/cjs/sdk/accounts/liquidations/MultichainLiquidationsService.js +6 -0
- package/dist/cjs/sdk/accounts/liquidations/constants.js +29 -0
- package/dist/cjs/sdk/accounts/liquidations/helpers.js +49 -2
- package/dist/cjs/sdk/accounts/liquidations/index.js +2 -2
- package/dist/esm/abi/ILiquidationCompressorV313.js +79 -0
- package/dist/esm/abi/compressors/liquidationCompressor.js +191 -0
- package/dist/esm/abi/compressors/subcompressors/liquidation/midasLiquidationSubcompressor.js +80 -0
- package/dist/esm/abi/compressors/subcompressors/liquidation/securitizeLiquidationSubcompressor.js +80 -0
- package/dist/esm/dev/withdrawalAbi.js +104 -66
- package/dist/esm/plugins/adapters/abi/adapters/iMidasGatewayAdapterV311.js +1 -304
- package/dist/esm/plugins/adapters/abi/index.js +1 -0
- package/dist/esm/plugins/adapters/abi/midas/iMidasGatewayV311.js +170 -0
- package/dist/esm/plugins/adapters/abi/midas/index.js +1 -0
- package/dist/esm/plugins/adapters/abi/securitize/iSecuritizeRedemptionGatewayV311.js +184 -24
- package/dist/esm/plugins/adapters/contracts/MidasGatewayAdapterContract.js +2 -4
- package/dist/esm/sdk/accounts/liquidations/LiquidationsService.js +87 -61
- package/dist/esm/sdk/accounts/liquidations/MultichainLiquidationsService.js +6 -0
- package/dist/esm/sdk/accounts/liquidations/constants.js +5 -0
- package/dist/esm/sdk/accounts/liquidations/helpers.js +46 -2
- package/dist/esm/sdk/accounts/liquidations/index.js +1 -1
- package/dist/types/abi/ILiquidationCompressorV313.d.ts +107 -0
- package/dist/types/abi/compressors/liquidationCompressor.d.ts +262 -0
- package/dist/types/abi/compressors/subcompressors/liquidation/midasLiquidationSubcompressor.d.ts +111 -0
- package/dist/types/abi/compressors/subcompressors/liquidation/securitizeLiquidationSubcompressor.d.ts +111 -0
- package/dist/types/dev/withdrawalAbi.d.ts +81 -53
- package/dist/types/plugins/adapters/abi/adapters/iMidasGatewayAdapterV311.d.ts +0 -233
- package/dist/types/plugins/adapters/abi/index.d.ts +1 -0
- package/dist/types/plugins/adapters/abi/midas/iMidasGatewayV311.d.ts +261 -0
- package/dist/types/plugins/adapters/abi/midas/index.d.ts +1 -0
- package/dist/types/plugins/adapters/abi/securitize/iSecuritizeRedemptionGatewayV311.d.ts +24 -0
- package/dist/types/plugins/adapters/contracts/MidasGatewayAdapterContract.d.ts +28 -0
- package/dist/types/plugins/adapters/contracts/SecuritizeRedemptionGatewayAdapterContract.d.ts +24 -0
- package/dist/types/rewards/rewards/merkl-api.d.ts +1 -1
- package/dist/types/sdk/MultichainSDK.d.ts +1 -1
- package/dist/types/sdk/accounts/liquidations/LiquidationsService.d.ts +6 -1
- package/dist/types/sdk/accounts/liquidations/MultichainLiquidationsService.d.ts +11 -6
- package/dist/types/sdk/accounts/liquidations/constants.d.ts +6 -0
- package/dist/types/sdk/accounts/liquidations/helpers.d.ts +73 -2
- package/dist/types/sdk/accounts/liquidations/index.d.ts +1 -1
- package/dist/types/sdk/accounts/liquidations/types.d.ts +142 -30
- package/package.json +9 -9
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { slice } from "viem";
|
|
2
|
+
import { ADDRESS_0X0, PERCENTAGE_FACTOR } from "../../constants/index.js";
|
|
2
3
|
import { hexEq } from "../../utils/index.js";
|
|
3
4
|
const DUST_THRESHOLD = 10n;
|
|
4
5
|
function calcRepaymentAmount(totalValue, liquidationDiscount) {
|
|
@@ -53,10 +54,53 @@ function toLiquidatorWithdrawals(current, network) {
|
|
|
53
54
|
}
|
|
54
55
|
return rows;
|
|
55
56
|
}
|
|
57
|
+
function toReceivedAssets(outputs) {
|
|
58
|
+
return outputs.map((o) => {
|
|
59
|
+
if (!o.delayed) {
|
|
60
|
+
return { isDelayed: false, token: o.token, amount: o.amount };
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
isDelayed: true,
|
|
64
|
+
token: o.token,
|
|
65
|
+
amount: o.amount,
|
|
66
|
+
redeemerAddress: hexEq(o.redeemerAddress, ADDRESS_0X0) ? void 0 : o.redeemerAddress,
|
|
67
|
+
claimableAt: o.claimableAt === 0n ? void 0 : o.claimableAt
|
|
68
|
+
};
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function toLiquidationApproval(props) {
|
|
72
|
+
const { target, creditFacade, creditManager, token, amount } = props;
|
|
73
|
+
if (amount === 0n) {
|
|
74
|
+
return void 0;
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
spender: hexEq(target, creditFacade) ? creditManager : target,
|
|
78
|
+
token,
|
|
79
|
+
amount
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
function liquidationCallToRawTx(call, description) {
|
|
83
|
+
return {
|
|
84
|
+
to: call.target,
|
|
85
|
+
value: "0",
|
|
86
|
+
signature: "",
|
|
87
|
+
callData: call.callData,
|
|
88
|
+
contractMethod: {
|
|
89
|
+
name: slice(call.callData, 0, 4),
|
|
90
|
+
inputs: [],
|
|
91
|
+
payable: false
|
|
92
|
+
},
|
|
93
|
+
contractInputsValues: {},
|
|
94
|
+
description
|
|
95
|
+
};
|
|
96
|
+
}
|
|
56
97
|
export {
|
|
57
98
|
DUST_THRESHOLD,
|
|
58
99
|
calcEstimatedProfit,
|
|
59
100
|
calcRepaymentAmount,
|
|
101
|
+
liquidationCallToRawTx,
|
|
60
102
|
pickMainAsset,
|
|
61
|
-
|
|
103
|
+
toLiquidationApproval,
|
|
104
|
+
toLiquidatorWithdrawals,
|
|
105
|
+
toReceivedAssets
|
|
62
106
|
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
export declare const iLiquidationCompressorV313Abi: readonly [{
|
|
2
|
+
readonly type: "function";
|
|
3
|
+
readonly name: "contractType";
|
|
4
|
+
readonly inputs: readonly [];
|
|
5
|
+
readonly outputs: readonly [{
|
|
6
|
+
readonly name: "";
|
|
7
|
+
readonly type: "bytes32";
|
|
8
|
+
readonly internalType: "bytes32";
|
|
9
|
+
}];
|
|
10
|
+
readonly stateMutability: "view";
|
|
11
|
+
}, {
|
|
12
|
+
readonly type: "function";
|
|
13
|
+
readonly name: "getLiquidationData";
|
|
14
|
+
readonly inputs: readonly [{
|
|
15
|
+
readonly name: "liquidator";
|
|
16
|
+
readonly type: "address";
|
|
17
|
+
readonly internalType: "address";
|
|
18
|
+
}, {
|
|
19
|
+
readonly name: "creditAccount";
|
|
20
|
+
readonly type: "address";
|
|
21
|
+
readonly internalType: "address";
|
|
22
|
+
}, {
|
|
23
|
+
readonly name: "priceUpdates";
|
|
24
|
+
readonly type: "tuple[]";
|
|
25
|
+
readonly internalType: "struct PriceUpdate[]";
|
|
26
|
+
readonly components: readonly [{
|
|
27
|
+
readonly name: "priceFeed";
|
|
28
|
+
readonly type: "address";
|
|
29
|
+
readonly internalType: "address";
|
|
30
|
+
}, {
|
|
31
|
+
readonly name: "data";
|
|
32
|
+
readonly type: "bytes";
|
|
33
|
+
readonly internalType: "bytes";
|
|
34
|
+
}];
|
|
35
|
+
}];
|
|
36
|
+
readonly outputs: readonly [{
|
|
37
|
+
readonly name: "";
|
|
38
|
+
readonly type: "tuple";
|
|
39
|
+
readonly internalType: "struct LiquidationData";
|
|
40
|
+
readonly components: readonly [{
|
|
41
|
+
readonly name: "requiredUnderlyingAmount";
|
|
42
|
+
readonly type: "uint256";
|
|
43
|
+
readonly internalType: "uint256";
|
|
44
|
+
}, {
|
|
45
|
+
readonly name: "expectedOutputs";
|
|
46
|
+
readonly type: "tuple[]";
|
|
47
|
+
readonly internalType: "struct LiquidationOutput[]";
|
|
48
|
+
readonly components: readonly [{
|
|
49
|
+
readonly name: "token";
|
|
50
|
+
readonly type: "address";
|
|
51
|
+
readonly internalType: "address";
|
|
52
|
+
}, {
|
|
53
|
+
readonly name: "amount";
|
|
54
|
+
readonly type: "uint256";
|
|
55
|
+
readonly internalType: "uint256";
|
|
56
|
+
}, {
|
|
57
|
+
readonly name: "delayed";
|
|
58
|
+
readonly type: "bool";
|
|
59
|
+
readonly internalType: "bool";
|
|
60
|
+
}, {
|
|
61
|
+
readonly name: "redeemerAddress";
|
|
62
|
+
readonly type: "address";
|
|
63
|
+
readonly internalType: "address";
|
|
64
|
+
}, {
|
|
65
|
+
readonly name: "claimableAt";
|
|
66
|
+
readonly type: "uint256";
|
|
67
|
+
readonly internalType: "uint256";
|
|
68
|
+
}];
|
|
69
|
+
}, {
|
|
70
|
+
readonly name: "liquidationCall";
|
|
71
|
+
readonly type: "tuple";
|
|
72
|
+
readonly internalType: "struct MultiCall";
|
|
73
|
+
readonly components: readonly [{
|
|
74
|
+
readonly name: "target";
|
|
75
|
+
readonly type: "address";
|
|
76
|
+
readonly internalType: "address";
|
|
77
|
+
}, {
|
|
78
|
+
readonly name: "callData";
|
|
79
|
+
readonly type: "bytes";
|
|
80
|
+
readonly internalType: "bytes";
|
|
81
|
+
}];
|
|
82
|
+
}, {
|
|
83
|
+
readonly name: "isLiquidatorEligible";
|
|
84
|
+
readonly type: "bool";
|
|
85
|
+
readonly internalType: "bool";
|
|
86
|
+
}, {
|
|
87
|
+
readonly name: "kycProtocol";
|
|
88
|
+
readonly type: "string";
|
|
89
|
+
readonly internalType: "string";
|
|
90
|
+
}, {
|
|
91
|
+
readonly name: "kycToken";
|
|
92
|
+
readonly type: "address";
|
|
93
|
+
readonly internalType: "address";
|
|
94
|
+
}];
|
|
95
|
+
}];
|
|
96
|
+
readonly stateMutability: "nonpayable";
|
|
97
|
+
}, {
|
|
98
|
+
readonly type: "function";
|
|
99
|
+
readonly name: "version";
|
|
100
|
+
readonly inputs: readonly [];
|
|
101
|
+
readonly outputs: readonly [{
|
|
102
|
+
readonly name: "";
|
|
103
|
+
readonly type: "uint256";
|
|
104
|
+
readonly internalType: "uint256";
|
|
105
|
+
}];
|
|
106
|
+
readonly stateMutability: "view";
|
|
107
|
+
}];
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
export declare const liquidationCompressorAbi: readonly [{
|
|
2
|
+
readonly type: "constructor";
|
|
3
|
+
readonly inputs: readonly [{
|
|
4
|
+
readonly name: "_owner";
|
|
5
|
+
readonly type: "address";
|
|
6
|
+
readonly internalType: "address";
|
|
7
|
+
}, {
|
|
8
|
+
readonly name: "addressProvider_";
|
|
9
|
+
readonly type: "address";
|
|
10
|
+
readonly internalType: "address";
|
|
11
|
+
}];
|
|
12
|
+
readonly stateMutability: "nonpayable";
|
|
13
|
+
}, {
|
|
14
|
+
readonly type: "function";
|
|
15
|
+
readonly name: "addressProvider";
|
|
16
|
+
readonly inputs: readonly [];
|
|
17
|
+
readonly outputs: readonly [{
|
|
18
|
+
readonly name: "";
|
|
19
|
+
readonly type: "address";
|
|
20
|
+
readonly internalType: "address";
|
|
21
|
+
}];
|
|
22
|
+
readonly stateMutability: "view";
|
|
23
|
+
}, {
|
|
24
|
+
readonly type: "function";
|
|
25
|
+
readonly name: "compressorTypeToCompressor";
|
|
26
|
+
readonly inputs: readonly [{
|
|
27
|
+
readonly name: "";
|
|
28
|
+
readonly type: "bytes32";
|
|
29
|
+
readonly internalType: "bytes32";
|
|
30
|
+
}, {
|
|
31
|
+
readonly name: "";
|
|
32
|
+
readonly type: "uint256";
|
|
33
|
+
readonly internalType: "uint256";
|
|
34
|
+
}];
|
|
35
|
+
readonly outputs: readonly [{
|
|
36
|
+
readonly name: "";
|
|
37
|
+
readonly type: "address";
|
|
38
|
+
readonly internalType: "address";
|
|
39
|
+
}];
|
|
40
|
+
readonly stateMutability: "view";
|
|
41
|
+
}, {
|
|
42
|
+
readonly type: "function";
|
|
43
|
+
readonly name: "contractType";
|
|
44
|
+
readonly inputs: readonly [];
|
|
45
|
+
readonly outputs: readonly [{
|
|
46
|
+
readonly name: "";
|
|
47
|
+
readonly type: "bytes32";
|
|
48
|
+
readonly internalType: "bytes32";
|
|
49
|
+
}];
|
|
50
|
+
readonly stateMutability: "view";
|
|
51
|
+
}, {
|
|
52
|
+
readonly type: "function";
|
|
53
|
+
readonly name: "getLiquidationData";
|
|
54
|
+
readonly inputs: readonly [{
|
|
55
|
+
readonly name: "liquidator";
|
|
56
|
+
readonly type: "address";
|
|
57
|
+
readonly internalType: "address";
|
|
58
|
+
}, {
|
|
59
|
+
readonly name: "creditAccount";
|
|
60
|
+
readonly type: "address";
|
|
61
|
+
readonly internalType: "address";
|
|
62
|
+
}, {
|
|
63
|
+
readonly name: "priceUpdates";
|
|
64
|
+
readonly type: "tuple[]";
|
|
65
|
+
readonly internalType: "struct PriceUpdate[]";
|
|
66
|
+
readonly components: readonly [{
|
|
67
|
+
readonly name: "priceFeed";
|
|
68
|
+
readonly type: "address";
|
|
69
|
+
readonly internalType: "address";
|
|
70
|
+
}, {
|
|
71
|
+
readonly name: "data";
|
|
72
|
+
readonly type: "bytes";
|
|
73
|
+
readonly internalType: "bytes";
|
|
74
|
+
}];
|
|
75
|
+
}];
|
|
76
|
+
readonly outputs: readonly [{
|
|
77
|
+
readonly name: "";
|
|
78
|
+
readonly type: "tuple";
|
|
79
|
+
readonly internalType: "struct LiquidationData";
|
|
80
|
+
readonly components: readonly [{
|
|
81
|
+
readonly name: "requiredUnderlyingAmount";
|
|
82
|
+
readonly type: "uint256";
|
|
83
|
+
readonly internalType: "uint256";
|
|
84
|
+
}, {
|
|
85
|
+
readonly name: "expectedOutputs";
|
|
86
|
+
readonly type: "tuple[]";
|
|
87
|
+
readonly internalType: "struct LiquidationOutput[]";
|
|
88
|
+
readonly components: readonly [{
|
|
89
|
+
readonly name: "token";
|
|
90
|
+
readonly type: "address";
|
|
91
|
+
readonly internalType: "address";
|
|
92
|
+
}, {
|
|
93
|
+
readonly name: "amount";
|
|
94
|
+
readonly type: "uint256";
|
|
95
|
+
readonly internalType: "uint256";
|
|
96
|
+
}, {
|
|
97
|
+
readonly name: "delayed";
|
|
98
|
+
readonly type: "bool";
|
|
99
|
+
readonly internalType: "bool";
|
|
100
|
+
}, {
|
|
101
|
+
readonly name: "redeemerAddress";
|
|
102
|
+
readonly type: "address";
|
|
103
|
+
readonly internalType: "address";
|
|
104
|
+
}, {
|
|
105
|
+
readonly name: "claimableAt";
|
|
106
|
+
readonly type: "uint256";
|
|
107
|
+
readonly internalType: "uint256";
|
|
108
|
+
}];
|
|
109
|
+
}, {
|
|
110
|
+
readonly name: "liquidationCall";
|
|
111
|
+
readonly type: "tuple";
|
|
112
|
+
readonly internalType: "struct MultiCall";
|
|
113
|
+
readonly components: readonly [{
|
|
114
|
+
readonly name: "target";
|
|
115
|
+
readonly type: "address";
|
|
116
|
+
readonly internalType: "address";
|
|
117
|
+
}, {
|
|
118
|
+
readonly name: "callData";
|
|
119
|
+
readonly type: "bytes";
|
|
120
|
+
readonly internalType: "bytes";
|
|
121
|
+
}];
|
|
122
|
+
}, {
|
|
123
|
+
readonly name: "isLiquidatorEligible";
|
|
124
|
+
readonly type: "bool";
|
|
125
|
+
readonly internalType: "bool";
|
|
126
|
+
}, {
|
|
127
|
+
readonly name: "kycProtocol";
|
|
128
|
+
readonly type: "string";
|
|
129
|
+
readonly internalType: "string";
|
|
130
|
+
}, {
|
|
131
|
+
readonly name: "kycToken";
|
|
132
|
+
readonly type: "address";
|
|
133
|
+
readonly internalType: "address";
|
|
134
|
+
}];
|
|
135
|
+
}];
|
|
136
|
+
readonly stateMutability: "nonpayable";
|
|
137
|
+
}, {
|
|
138
|
+
readonly type: "function";
|
|
139
|
+
readonly name: "liquidatableTypeToCompressorType";
|
|
140
|
+
readonly inputs: readonly [{
|
|
141
|
+
readonly name: "";
|
|
142
|
+
readonly type: "bytes32";
|
|
143
|
+
readonly internalType: "bytes32";
|
|
144
|
+
}];
|
|
145
|
+
readonly outputs: readonly [{
|
|
146
|
+
readonly name: "";
|
|
147
|
+
readonly type: "bytes32";
|
|
148
|
+
readonly internalType: "bytes32";
|
|
149
|
+
}];
|
|
150
|
+
readonly stateMutability: "view";
|
|
151
|
+
}, {
|
|
152
|
+
readonly type: "function";
|
|
153
|
+
readonly name: "liquidatableTypeToSpecificCompressorVersion";
|
|
154
|
+
readonly inputs: readonly [{
|
|
155
|
+
readonly name: "";
|
|
156
|
+
readonly type: "bytes32";
|
|
157
|
+
readonly internalType: "bytes32";
|
|
158
|
+
}, {
|
|
159
|
+
readonly name: "";
|
|
160
|
+
readonly type: "uint256";
|
|
161
|
+
readonly internalType: "uint256";
|
|
162
|
+
}];
|
|
163
|
+
readonly outputs: readonly [{
|
|
164
|
+
readonly name: "";
|
|
165
|
+
readonly type: "uint256";
|
|
166
|
+
readonly internalType: "uint256";
|
|
167
|
+
}];
|
|
168
|
+
readonly stateMutability: "view";
|
|
169
|
+
}, {
|
|
170
|
+
readonly type: "function";
|
|
171
|
+
readonly name: "owner";
|
|
172
|
+
readonly inputs: readonly [];
|
|
173
|
+
readonly outputs: readonly [{
|
|
174
|
+
readonly name: "";
|
|
175
|
+
readonly type: "address";
|
|
176
|
+
readonly internalType: "address";
|
|
177
|
+
}];
|
|
178
|
+
readonly stateMutability: "view";
|
|
179
|
+
}, {
|
|
180
|
+
readonly type: "function";
|
|
181
|
+
readonly name: "renounceOwnership";
|
|
182
|
+
readonly inputs: readonly [];
|
|
183
|
+
readonly outputs: readonly [];
|
|
184
|
+
readonly stateMutability: "nonpayable";
|
|
185
|
+
}, {
|
|
186
|
+
readonly type: "function";
|
|
187
|
+
readonly name: "setLiquidatableTypeToCompressorType";
|
|
188
|
+
readonly inputs: readonly [{
|
|
189
|
+
readonly name: "liquidatableType";
|
|
190
|
+
readonly type: "bytes32";
|
|
191
|
+
readonly internalType: "bytes32";
|
|
192
|
+
}, {
|
|
193
|
+
readonly name: "compressorType";
|
|
194
|
+
readonly type: "bytes32";
|
|
195
|
+
readonly internalType: "bytes32";
|
|
196
|
+
}];
|
|
197
|
+
readonly outputs: readonly [];
|
|
198
|
+
readonly stateMutability: "nonpayable";
|
|
199
|
+
}, {
|
|
200
|
+
readonly type: "function";
|
|
201
|
+
readonly name: "setLiquidatableVersionToSpecificCompressorVersion";
|
|
202
|
+
readonly inputs: readonly [{
|
|
203
|
+
readonly name: "liquidatableType";
|
|
204
|
+
readonly type: "bytes32";
|
|
205
|
+
readonly internalType: "bytes32";
|
|
206
|
+
}, {
|
|
207
|
+
readonly name: "liquidatableVersion";
|
|
208
|
+
readonly type: "uint256";
|
|
209
|
+
readonly internalType: "uint256";
|
|
210
|
+
}, {
|
|
211
|
+
readonly name: "compressorVersion";
|
|
212
|
+
readonly type: "uint256";
|
|
213
|
+
readonly internalType: "uint256";
|
|
214
|
+
}];
|
|
215
|
+
readonly outputs: readonly [];
|
|
216
|
+
readonly stateMutability: "nonpayable";
|
|
217
|
+
}, {
|
|
218
|
+
readonly type: "function";
|
|
219
|
+
readonly name: "setSubcompressor";
|
|
220
|
+
readonly inputs: readonly [{
|
|
221
|
+
readonly name: "subcompressor";
|
|
222
|
+
readonly type: "address";
|
|
223
|
+
readonly internalType: "address";
|
|
224
|
+
}];
|
|
225
|
+
readonly outputs: readonly [];
|
|
226
|
+
readonly stateMutability: "nonpayable";
|
|
227
|
+
}, {
|
|
228
|
+
readonly type: "function";
|
|
229
|
+
readonly name: "transferOwnership";
|
|
230
|
+
readonly inputs: readonly [{
|
|
231
|
+
readonly name: "newOwner";
|
|
232
|
+
readonly type: "address";
|
|
233
|
+
readonly internalType: "address";
|
|
234
|
+
}];
|
|
235
|
+
readonly outputs: readonly [];
|
|
236
|
+
readonly stateMutability: "nonpayable";
|
|
237
|
+
}, {
|
|
238
|
+
readonly type: "function";
|
|
239
|
+
readonly name: "version";
|
|
240
|
+
readonly inputs: readonly [];
|
|
241
|
+
readonly outputs: readonly [{
|
|
242
|
+
readonly name: "";
|
|
243
|
+
readonly type: "uint256";
|
|
244
|
+
readonly internalType: "uint256";
|
|
245
|
+
}];
|
|
246
|
+
readonly stateMutability: "view";
|
|
247
|
+
}, {
|
|
248
|
+
readonly type: "event";
|
|
249
|
+
readonly name: "OwnershipTransferred";
|
|
250
|
+
readonly inputs: readonly [{
|
|
251
|
+
readonly name: "previousOwner";
|
|
252
|
+
readonly type: "address";
|
|
253
|
+
readonly indexed: true;
|
|
254
|
+
readonly internalType: "address";
|
|
255
|
+
}, {
|
|
256
|
+
readonly name: "newOwner";
|
|
257
|
+
readonly type: "address";
|
|
258
|
+
readonly indexed: true;
|
|
259
|
+
readonly internalType: "address";
|
|
260
|
+
}];
|
|
261
|
+
readonly anonymous: false;
|
|
262
|
+
}];
|
package/dist/types/abi/compressors/subcompressors/liquidation/midasLiquidationSubcompressor.d.ts
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
export declare const midasLiquidationSubcompressorAbi: readonly [{
|
|
2
|
+
readonly type: "function";
|
|
3
|
+
readonly name: "contractType";
|
|
4
|
+
readonly inputs: readonly [];
|
|
5
|
+
readonly outputs: readonly [{
|
|
6
|
+
readonly name: "";
|
|
7
|
+
readonly type: "bytes32";
|
|
8
|
+
readonly internalType: "bytes32";
|
|
9
|
+
}];
|
|
10
|
+
readonly stateMutability: "view";
|
|
11
|
+
}, {
|
|
12
|
+
readonly type: "function";
|
|
13
|
+
readonly name: "getLiquidationData";
|
|
14
|
+
readonly inputs: readonly [{
|
|
15
|
+
readonly name: "liquidator";
|
|
16
|
+
readonly type: "address";
|
|
17
|
+
readonly internalType: "address";
|
|
18
|
+
}, {
|
|
19
|
+
readonly name: "creditAccount";
|
|
20
|
+
readonly type: "address";
|
|
21
|
+
readonly internalType: "address";
|
|
22
|
+
}, {
|
|
23
|
+
readonly name: "phantomToken";
|
|
24
|
+
readonly type: "address";
|
|
25
|
+
readonly internalType: "address";
|
|
26
|
+
}, {
|
|
27
|
+
readonly name: "priceUpdates";
|
|
28
|
+
readonly type: "tuple[]";
|
|
29
|
+
readonly internalType: "struct PriceUpdate[]";
|
|
30
|
+
readonly components: readonly [{
|
|
31
|
+
readonly name: "priceFeed";
|
|
32
|
+
readonly type: "address";
|
|
33
|
+
readonly internalType: "address";
|
|
34
|
+
}, {
|
|
35
|
+
readonly name: "data";
|
|
36
|
+
readonly type: "bytes";
|
|
37
|
+
readonly internalType: "bytes";
|
|
38
|
+
}];
|
|
39
|
+
}];
|
|
40
|
+
readonly outputs: readonly [{
|
|
41
|
+
readonly name: "data";
|
|
42
|
+
readonly type: "tuple";
|
|
43
|
+
readonly internalType: "struct LiquidationData";
|
|
44
|
+
readonly components: readonly [{
|
|
45
|
+
readonly name: "requiredUnderlyingAmount";
|
|
46
|
+
readonly type: "uint256";
|
|
47
|
+
readonly internalType: "uint256";
|
|
48
|
+
}, {
|
|
49
|
+
readonly name: "expectedOutputs";
|
|
50
|
+
readonly type: "tuple[]";
|
|
51
|
+
readonly internalType: "struct LiquidationOutput[]";
|
|
52
|
+
readonly components: readonly [{
|
|
53
|
+
readonly name: "token";
|
|
54
|
+
readonly type: "address";
|
|
55
|
+
readonly internalType: "address";
|
|
56
|
+
}, {
|
|
57
|
+
readonly name: "amount";
|
|
58
|
+
readonly type: "uint256";
|
|
59
|
+
readonly internalType: "uint256";
|
|
60
|
+
}, {
|
|
61
|
+
readonly name: "delayed";
|
|
62
|
+
readonly type: "bool";
|
|
63
|
+
readonly internalType: "bool";
|
|
64
|
+
}, {
|
|
65
|
+
readonly name: "redeemerAddress";
|
|
66
|
+
readonly type: "address";
|
|
67
|
+
readonly internalType: "address";
|
|
68
|
+
}, {
|
|
69
|
+
readonly name: "claimableAt";
|
|
70
|
+
readonly type: "uint256";
|
|
71
|
+
readonly internalType: "uint256";
|
|
72
|
+
}];
|
|
73
|
+
}, {
|
|
74
|
+
readonly name: "liquidationCall";
|
|
75
|
+
readonly type: "tuple";
|
|
76
|
+
readonly internalType: "struct MultiCall";
|
|
77
|
+
readonly components: readonly [{
|
|
78
|
+
readonly name: "target";
|
|
79
|
+
readonly type: "address";
|
|
80
|
+
readonly internalType: "address";
|
|
81
|
+
}, {
|
|
82
|
+
readonly name: "callData";
|
|
83
|
+
readonly type: "bytes";
|
|
84
|
+
readonly internalType: "bytes";
|
|
85
|
+
}];
|
|
86
|
+
}, {
|
|
87
|
+
readonly name: "isLiquidatorEligible";
|
|
88
|
+
readonly type: "bool";
|
|
89
|
+
readonly internalType: "bool";
|
|
90
|
+
}, {
|
|
91
|
+
readonly name: "kycProtocol";
|
|
92
|
+
readonly type: "string";
|
|
93
|
+
readonly internalType: "string";
|
|
94
|
+
}, {
|
|
95
|
+
readonly name: "kycToken";
|
|
96
|
+
readonly type: "address";
|
|
97
|
+
readonly internalType: "address";
|
|
98
|
+
}];
|
|
99
|
+
}];
|
|
100
|
+
readonly stateMutability: "nonpayable";
|
|
101
|
+
}, {
|
|
102
|
+
readonly type: "function";
|
|
103
|
+
readonly name: "version";
|
|
104
|
+
readonly inputs: readonly [];
|
|
105
|
+
readonly outputs: readonly [{
|
|
106
|
+
readonly name: "";
|
|
107
|
+
readonly type: "uint256";
|
|
108
|
+
readonly internalType: "uint256";
|
|
109
|
+
}];
|
|
110
|
+
readonly stateMutability: "view";
|
|
111
|
+
}];
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
export declare const securitizeLiquidationSubcompressorAbi: readonly [{
|
|
2
|
+
readonly type: "function";
|
|
3
|
+
readonly name: "contractType";
|
|
4
|
+
readonly inputs: readonly [];
|
|
5
|
+
readonly outputs: readonly [{
|
|
6
|
+
readonly name: "";
|
|
7
|
+
readonly type: "bytes32";
|
|
8
|
+
readonly internalType: "bytes32";
|
|
9
|
+
}];
|
|
10
|
+
readonly stateMutability: "view";
|
|
11
|
+
}, {
|
|
12
|
+
readonly type: "function";
|
|
13
|
+
readonly name: "getLiquidationData";
|
|
14
|
+
readonly inputs: readonly [{
|
|
15
|
+
readonly name: "liquidator";
|
|
16
|
+
readonly type: "address";
|
|
17
|
+
readonly internalType: "address";
|
|
18
|
+
}, {
|
|
19
|
+
readonly name: "creditAccount";
|
|
20
|
+
readonly type: "address";
|
|
21
|
+
readonly internalType: "address";
|
|
22
|
+
}, {
|
|
23
|
+
readonly name: "phantomToken";
|
|
24
|
+
readonly type: "address";
|
|
25
|
+
readonly internalType: "address";
|
|
26
|
+
}, {
|
|
27
|
+
readonly name: "priceUpdates";
|
|
28
|
+
readonly type: "tuple[]";
|
|
29
|
+
readonly internalType: "struct PriceUpdate[]";
|
|
30
|
+
readonly components: readonly [{
|
|
31
|
+
readonly name: "priceFeed";
|
|
32
|
+
readonly type: "address";
|
|
33
|
+
readonly internalType: "address";
|
|
34
|
+
}, {
|
|
35
|
+
readonly name: "data";
|
|
36
|
+
readonly type: "bytes";
|
|
37
|
+
readonly internalType: "bytes";
|
|
38
|
+
}];
|
|
39
|
+
}];
|
|
40
|
+
readonly outputs: readonly [{
|
|
41
|
+
readonly name: "data";
|
|
42
|
+
readonly type: "tuple";
|
|
43
|
+
readonly internalType: "struct LiquidationData";
|
|
44
|
+
readonly components: readonly [{
|
|
45
|
+
readonly name: "requiredUnderlyingAmount";
|
|
46
|
+
readonly type: "uint256";
|
|
47
|
+
readonly internalType: "uint256";
|
|
48
|
+
}, {
|
|
49
|
+
readonly name: "expectedOutputs";
|
|
50
|
+
readonly type: "tuple[]";
|
|
51
|
+
readonly internalType: "struct LiquidationOutput[]";
|
|
52
|
+
readonly components: readonly [{
|
|
53
|
+
readonly name: "token";
|
|
54
|
+
readonly type: "address";
|
|
55
|
+
readonly internalType: "address";
|
|
56
|
+
}, {
|
|
57
|
+
readonly name: "amount";
|
|
58
|
+
readonly type: "uint256";
|
|
59
|
+
readonly internalType: "uint256";
|
|
60
|
+
}, {
|
|
61
|
+
readonly name: "delayed";
|
|
62
|
+
readonly type: "bool";
|
|
63
|
+
readonly internalType: "bool";
|
|
64
|
+
}, {
|
|
65
|
+
readonly name: "redeemerAddress";
|
|
66
|
+
readonly type: "address";
|
|
67
|
+
readonly internalType: "address";
|
|
68
|
+
}, {
|
|
69
|
+
readonly name: "claimableAt";
|
|
70
|
+
readonly type: "uint256";
|
|
71
|
+
readonly internalType: "uint256";
|
|
72
|
+
}];
|
|
73
|
+
}, {
|
|
74
|
+
readonly name: "liquidationCall";
|
|
75
|
+
readonly type: "tuple";
|
|
76
|
+
readonly internalType: "struct MultiCall";
|
|
77
|
+
readonly components: readonly [{
|
|
78
|
+
readonly name: "target";
|
|
79
|
+
readonly type: "address";
|
|
80
|
+
readonly internalType: "address";
|
|
81
|
+
}, {
|
|
82
|
+
readonly name: "callData";
|
|
83
|
+
readonly type: "bytes";
|
|
84
|
+
readonly internalType: "bytes";
|
|
85
|
+
}];
|
|
86
|
+
}, {
|
|
87
|
+
readonly name: "isLiquidatorEligible";
|
|
88
|
+
readonly type: "bool";
|
|
89
|
+
readonly internalType: "bool";
|
|
90
|
+
}, {
|
|
91
|
+
readonly name: "kycProtocol";
|
|
92
|
+
readonly type: "string";
|
|
93
|
+
readonly internalType: "string";
|
|
94
|
+
}, {
|
|
95
|
+
readonly name: "kycToken";
|
|
96
|
+
readonly type: "address";
|
|
97
|
+
readonly internalType: "address";
|
|
98
|
+
}];
|
|
99
|
+
}];
|
|
100
|
+
readonly stateMutability: "nonpayable";
|
|
101
|
+
}, {
|
|
102
|
+
readonly type: "function";
|
|
103
|
+
readonly name: "version";
|
|
104
|
+
readonly inputs: readonly [];
|
|
105
|
+
readonly outputs: readonly [{
|
|
106
|
+
readonly name: "";
|
|
107
|
+
readonly type: "uint256";
|
|
108
|
+
readonly internalType: "uint256";
|
|
109
|
+
}];
|
|
110
|
+
readonly stateMutability: "view";
|
|
111
|
+
}];
|