@gearbox-protocol/sdk 14.12.0-next.47 → 14.12.0-next.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/cjs/abi/compressors/liquidationCompressor.js +215 -0
  2. package/dist/cjs/abi/compressors/subcompressors/liquidation/midasLiquidationSubcompressor.js +104 -0
  3. package/dist/cjs/abi/compressors/subcompressors/liquidation/securitizeLiquidationSubcompressor.js +104 -0
  4. package/dist/cjs/dev/withdrawalAbi.js +104 -66
  5. package/dist/cjs/plugins/adapters/abi/adapters/iMidasGatewayAdapterV311.js +2 -306
  6. package/dist/cjs/plugins/adapters/abi/index.js +2 -0
  7. package/dist/cjs/plugins/adapters/abi/midas/iMidasGatewayV311.js +194 -0
  8. package/dist/cjs/plugins/adapters/abi/midas/index.js +22 -0
  9. package/dist/cjs/plugins/adapters/abi/securitize/iSecuritizeRedemptionGatewayV311.js +184 -24
  10. package/dist/cjs/plugins/adapters/contracts/MidasGatewayAdapterContract.js +2 -1
  11. package/dist/esm/abi/compressors/liquidationCompressor.js +191 -0
  12. package/dist/esm/abi/compressors/subcompressors/liquidation/midasLiquidationSubcompressor.js +80 -0
  13. package/dist/esm/abi/compressors/subcompressors/liquidation/securitizeLiquidationSubcompressor.js +80 -0
  14. package/dist/esm/dev/withdrawalAbi.js +104 -66
  15. package/dist/esm/plugins/adapters/abi/adapters/iMidasGatewayAdapterV311.js +1 -304
  16. package/dist/esm/plugins/adapters/abi/index.js +1 -0
  17. package/dist/esm/plugins/adapters/abi/midas/iMidasGatewayV311.js +170 -0
  18. package/dist/esm/plugins/adapters/abi/midas/index.js +1 -0
  19. package/dist/esm/plugins/adapters/abi/securitize/iSecuritizeRedemptionGatewayV311.js +184 -24
  20. package/dist/esm/plugins/adapters/contracts/MidasGatewayAdapterContract.js +2 -4
  21. package/dist/types/abi/compressors/liquidationCompressor.d.ts +262 -0
  22. package/dist/types/abi/compressors/subcompressors/liquidation/midasLiquidationSubcompressor.d.ts +111 -0
  23. package/dist/types/abi/compressors/subcompressors/liquidation/securitizeLiquidationSubcompressor.d.ts +111 -0
  24. package/dist/types/dev/withdrawalAbi.d.ts +81 -53
  25. package/dist/types/plugins/adapters/abi/adapters/iMidasGatewayAdapterV311.d.ts +0 -233
  26. package/dist/types/plugins/adapters/abi/index.d.ts +1 -0
  27. package/dist/types/plugins/adapters/abi/midas/iMidasGatewayV311.d.ts +261 -0
  28. package/dist/types/plugins/adapters/abi/midas/index.d.ts +1 -0
  29. package/dist/types/plugins/adapters/abi/securitize/iSecuritizeRedemptionGatewayV311.d.ts +24 -0
  30. package/dist/types/plugins/adapters/contracts/MidasGatewayAdapterContract.d.ts +28 -0
  31. package/dist/types/plugins/adapters/contracts/SecuritizeRedemptionGatewayAdapterContract.d.ts +24 -0
  32. package/package.json +1 -1
@@ -0,0 +1,215 @@
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 liquidationCompressor_exports = {};
20
+ __export(liquidationCompressor_exports, {
21
+ liquidationCompressorAbi: () => liquidationCompressorAbi
22
+ });
23
+ module.exports = __toCommonJS(liquidationCompressor_exports);
24
+ const liquidationCompressorAbi = [
25
+ {
26
+ type: "constructor",
27
+ inputs: [
28
+ { name: "_owner", type: "address", internalType: "address" },
29
+ { name: "addressProvider_", type: "address", internalType: "address" }
30
+ ],
31
+ stateMutability: "nonpayable"
32
+ },
33
+ {
34
+ type: "function",
35
+ name: "addressProvider",
36
+ inputs: [],
37
+ outputs: [{ name: "", type: "address", internalType: "address" }],
38
+ stateMutability: "view"
39
+ },
40
+ {
41
+ type: "function",
42
+ name: "compressorTypeToCompressor",
43
+ inputs: [
44
+ { name: "", type: "bytes32", internalType: "bytes32" },
45
+ { name: "", type: "uint256", internalType: "uint256" }
46
+ ],
47
+ outputs: [{ name: "", type: "address", internalType: "address" }],
48
+ stateMutability: "view"
49
+ },
50
+ {
51
+ type: "function",
52
+ name: "contractType",
53
+ inputs: [],
54
+ outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
55
+ stateMutability: "view"
56
+ },
57
+ {
58
+ type: "function",
59
+ name: "getLiquidationData",
60
+ inputs: [
61
+ { name: "liquidator", type: "address", internalType: "address" },
62
+ { name: "creditAccount", type: "address", internalType: "address" },
63
+ {
64
+ name: "priceUpdates",
65
+ type: "tuple[]",
66
+ internalType: "struct PriceUpdate[]",
67
+ components: [
68
+ { name: "priceFeed", type: "address", internalType: "address" },
69
+ { name: "data", type: "bytes", internalType: "bytes" }
70
+ ]
71
+ }
72
+ ],
73
+ outputs: [
74
+ {
75
+ name: "",
76
+ type: "tuple",
77
+ internalType: "struct LiquidationData",
78
+ components: [
79
+ {
80
+ name: "requiredUnderlyingAmount",
81
+ type: "uint256",
82
+ internalType: "uint256"
83
+ },
84
+ {
85
+ name: "expectedOutputs",
86
+ type: "tuple[]",
87
+ internalType: "struct LiquidationOutput[]",
88
+ components: [
89
+ { name: "token", type: "address", internalType: "address" },
90
+ { name: "amount", type: "uint256", internalType: "uint256" },
91
+ { name: "delayed", type: "bool", internalType: "bool" },
92
+ {
93
+ name: "redeemerAddress",
94
+ type: "address",
95
+ internalType: "address"
96
+ },
97
+ { name: "claimableAt", type: "uint256", internalType: "uint256" }
98
+ ]
99
+ },
100
+ {
101
+ name: "liquidationCall",
102
+ type: "tuple",
103
+ internalType: "struct MultiCall",
104
+ components: [
105
+ { name: "target", type: "address", internalType: "address" },
106
+ { name: "callData", type: "bytes", internalType: "bytes" }
107
+ ]
108
+ },
109
+ { name: "isLiquidatorEligible", type: "bool", internalType: "bool" },
110
+ { name: "kycProtocol", type: "string", internalType: "string" },
111
+ { name: "kycToken", type: "address", internalType: "address" }
112
+ ]
113
+ }
114
+ ],
115
+ stateMutability: "nonpayable"
116
+ },
117
+ {
118
+ type: "function",
119
+ name: "liquidatableTypeToCompressorType",
120
+ inputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
121
+ outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
122
+ stateMutability: "view"
123
+ },
124
+ {
125
+ type: "function",
126
+ name: "liquidatableTypeToSpecificCompressorVersion",
127
+ inputs: [
128
+ { name: "", type: "bytes32", internalType: "bytes32" },
129
+ { name: "", type: "uint256", internalType: "uint256" }
130
+ ],
131
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
132
+ stateMutability: "view"
133
+ },
134
+ {
135
+ type: "function",
136
+ name: "owner",
137
+ inputs: [],
138
+ outputs: [{ name: "", type: "address", internalType: "address" }],
139
+ stateMutability: "view"
140
+ },
141
+ {
142
+ type: "function",
143
+ name: "renounceOwnership",
144
+ inputs: [],
145
+ outputs: [],
146
+ stateMutability: "nonpayable"
147
+ },
148
+ {
149
+ type: "function",
150
+ name: "setLiquidatableTypeToCompressorType",
151
+ inputs: [
152
+ { name: "liquidatableType", type: "bytes32", internalType: "bytes32" },
153
+ { name: "compressorType", type: "bytes32", internalType: "bytes32" }
154
+ ],
155
+ outputs: [],
156
+ stateMutability: "nonpayable"
157
+ },
158
+ {
159
+ type: "function",
160
+ name: "setLiquidatableVersionToSpecificCompressorVersion",
161
+ inputs: [
162
+ { name: "liquidatableType", type: "bytes32", internalType: "bytes32" },
163
+ { name: "liquidatableVersion", type: "uint256", internalType: "uint256" },
164
+ { name: "compressorVersion", type: "uint256", internalType: "uint256" }
165
+ ],
166
+ outputs: [],
167
+ stateMutability: "nonpayable"
168
+ },
169
+ {
170
+ type: "function",
171
+ name: "setSubcompressor",
172
+ inputs: [
173
+ { name: "subcompressor", type: "address", internalType: "address" }
174
+ ],
175
+ outputs: [],
176
+ stateMutability: "nonpayable"
177
+ },
178
+ {
179
+ type: "function",
180
+ name: "transferOwnership",
181
+ inputs: [{ name: "newOwner", type: "address", internalType: "address" }],
182
+ outputs: [],
183
+ stateMutability: "nonpayable"
184
+ },
185
+ {
186
+ type: "function",
187
+ name: "version",
188
+ inputs: [],
189
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
190
+ stateMutability: "view"
191
+ },
192
+ {
193
+ type: "event",
194
+ name: "OwnershipTransferred",
195
+ inputs: [
196
+ {
197
+ name: "previousOwner",
198
+ type: "address",
199
+ indexed: true,
200
+ internalType: "address"
201
+ },
202
+ {
203
+ name: "newOwner",
204
+ type: "address",
205
+ indexed: true,
206
+ internalType: "address"
207
+ }
208
+ ],
209
+ anonymous: false
210
+ }
211
+ ];
212
+ // Annotate the CommonJS export names for ESM import in node:
213
+ 0 && (module.exports = {
214
+ liquidationCompressorAbi
215
+ });
@@ -0,0 +1,104 @@
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 midasLiquidationSubcompressor_exports = {};
20
+ __export(midasLiquidationSubcompressor_exports, {
21
+ midasLiquidationSubcompressorAbi: () => midasLiquidationSubcompressorAbi
22
+ });
23
+ module.exports = __toCommonJS(midasLiquidationSubcompressor_exports);
24
+ const midasLiquidationSubcompressorAbi = [
25
+ {
26
+ type: "function",
27
+ name: "contractType",
28
+ inputs: [],
29
+ outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
30
+ stateMutability: "view"
31
+ },
32
+ {
33
+ type: "function",
34
+ name: "getLiquidationData",
35
+ inputs: [
36
+ { name: "liquidator", type: "address", internalType: "address" },
37
+ { name: "creditAccount", type: "address", internalType: "address" },
38
+ { name: "phantomToken", type: "address", internalType: "address" },
39
+ {
40
+ name: "priceUpdates",
41
+ type: "tuple[]",
42
+ internalType: "struct PriceUpdate[]",
43
+ components: [
44
+ { name: "priceFeed", type: "address", internalType: "address" },
45
+ { name: "data", type: "bytes", internalType: "bytes" }
46
+ ]
47
+ }
48
+ ],
49
+ outputs: [
50
+ {
51
+ name: "data",
52
+ type: "tuple",
53
+ internalType: "struct LiquidationData",
54
+ components: [
55
+ {
56
+ name: "requiredUnderlyingAmount",
57
+ type: "uint256",
58
+ internalType: "uint256"
59
+ },
60
+ {
61
+ name: "expectedOutputs",
62
+ type: "tuple[]",
63
+ internalType: "struct LiquidationOutput[]",
64
+ components: [
65
+ { name: "token", type: "address", internalType: "address" },
66
+ { name: "amount", type: "uint256", internalType: "uint256" },
67
+ { name: "delayed", type: "bool", internalType: "bool" },
68
+ {
69
+ name: "redeemerAddress",
70
+ type: "address",
71
+ internalType: "address"
72
+ },
73
+ { name: "claimableAt", type: "uint256", internalType: "uint256" }
74
+ ]
75
+ },
76
+ {
77
+ name: "liquidationCall",
78
+ type: "tuple",
79
+ internalType: "struct MultiCall",
80
+ components: [
81
+ { name: "target", type: "address", internalType: "address" },
82
+ { name: "callData", type: "bytes", internalType: "bytes" }
83
+ ]
84
+ },
85
+ { name: "isLiquidatorEligible", type: "bool", internalType: "bool" },
86
+ { name: "kycProtocol", type: "string", internalType: "string" },
87
+ { name: "kycToken", type: "address", internalType: "address" }
88
+ ]
89
+ }
90
+ ],
91
+ stateMutability: "nonpayable"
92
+ },
93
+ {
94
+ type: "function",
95
+ name: "version",
96
+ inputs: [],
97
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
98
+ stateMutability: "view"
99
+ }
100
+ ];
101
+ // Annotate the CommonJS export names for ESM import in node:
102
+ 0 && (module.exports = {
103
+ midasLiquidationSubcompressorAbi
104
+ });
@@ -0,0 +1,104 @@
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 securitizeLiquidationSubcompressor_exports = {};
20
+ __export(securitizeLiquidationSubcompressor_exports, {
21
+ securitizeLiquidationSubcompressorAbi: () => securitizeLiquidationSubcompressorAbi
22
+ });
23
+ module.exports = __toCommonJS(securitizeLiquidationSubcompressor_exports);
24
+ const securitizeLiquidationSubcompressorAbi = [
25
+ {
26
+ type: "function",
27
+ name: "contractType",
28
+ inputs: [],
29
+ outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
30
+ stateMutability: "view"
31
+ },
32
+ {
33
+ type: "function",
34
+ name: "getLiquidationData",
35
+ inputs: [
36
+ { name: "liquidator", type: "address", internalType: "address" },
37
+ { name: "creditAccount", type: "address", internalType: "address" },
38
+ { name: "phantomToken", type: "address", internalType: "address" },
39
+ {
40
+ name: "priceUpdates",
41
+ type: "tuple[]",
42
+ internalType: "struct PriceUpdate[]",
43
+ components: [
44
+ { name: "priceFeed", type: "address", internalType: "address" },
45
+ { name: "data", type: "bytes", internalType: "bytes" }
46
+ ]
47
+ }
48
+ ],
49
+ outputs: [
50
+ {
51
+ name: "data",
52
+ type: "tuple",
53
+ internalType: "struct LiquidationData",
54
+ components: [
55
+ {
56
+ name: "requiredUnderlyingAmount",
57
+ type: "uint256",
58
+ internalType: "uint256"
59
+ },
60
+ {
61
+ name: "expectedOutputs",
62
+ type: "tuple[]",
63
+ internalType: "struct LiquidationOutput[]",
64
+ components: [
65
+ { name: "token", type: "address", internalType: "address" },
66
+ { name: "amount", type: "uint256", internalType: "uint256" },
67
+ { name: "delayed", type: "bool", internalType: "bool" },
68
+ {
69
+ name: "redeemerAddress",
70
+ type: "address",
71
+ internalType: "address"
72
+ },
73
+ { name: "claimableAt", type: "uint256", internalType: "uint256" }
74
+ ]
75
+ },
76
+ {
77
+ name: "liquidationCall",
78
+ type: "tuple",
79
+ internalType: "struct MultiCall",
80
+ components: [
81
+ { name: "target", type: "address", internalType: "address" },
82
+ { name: "callData", type: "bytes", internalType: "bytes" }
83
+ ]
84
+ },
85
+ { name: "isLiquidatorEligible", type: "bool", internalType: "bool" },
86
+ { name: "kycProtocol", type: "string", internalType: "string" },
87
+ { name: "kycToken", type: "address", internalType: "address" }
88
+ ]
89
+ }
90
+ ],
91
+ stateMutability: "nonpayable"
92
+ },
93
+ {
94
+ type: "function",
95
+ name: "version",
96
+ inputs: [],
97
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
98
+ stateMutability: "view"
99
+ }
100
+ ];
101
+ // Annotate the CommonJS export names for ESM import in node:
102
+ 0 && (module.exports = {
103
+ securitizeLiquidationSubcompressorAbi
104
+ });