@gearbox-protocol/sdk 1.1.0 → 1.2.2

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 (99) hide show
  1. package/lib/core/creditManager.d.ts +5 -0
  2. package/lib/core/creditManager.js +5 -0
  3. package/lib/pathfinder/path.js +5 -5
  4. package/lib/payload/creditManager.d.ts +5 -0
  5. package/lib/strategies/creditFacade.js +1 -1
  6. package/lib/tokens/token.js +18 -18
  7. package/lib/types/contracts/interfaces/ICreditConfigurator.sol/ICreditConfigurator.d.ts +271 -20
  8. package/lib/types/contracts/interfaces/ICreditConfigurator.sol/ICreditConfiguratorEvents.d.ts +8 -19
  9. package/lib/types/contracts/interfaces/ICreditFacade.sol/ICreditFacadeExtended.d.ts +9 -9
  10. package/lib/types/contracts/interfaces/ICreditManagerV2.sol/ICreditManagerV2.d.ts +52 -116
  11. package/lib/types/contracts/interfaces/IDataCompressor.sol/IDataCompressor.d.ts +26 -1
  12. package/lib/types/contracts/interfaces/IDegenNFT.sol/IDegenNFT.d.ts +10 -10
  13. package/lib/types/contracts/interfaces/V1/ICreditFilter.d.ts +3 -3
  14. package/lib/types/contracts/interfaces/adapters/convex/IConvexV1BoosterAdapter.d.ts +1 -9
  15. package/lib/types/contracts/pathfinder/index.d.ts +0 -1
  16. package/lib/types/contracts/pathfinder/interfaces/IClosePathResolver.d.ts +125 -0
  17. package/lib/types/contracts/pathfinder/{ISwapper.js → interfaces/IClosePathResolver.js} +0 -0
  18. package/lib/types/contracts/pathfinder/interfaces/IDepositor.sol/IDepositor.d.ts +159 -0
  19. package/lib/types/contracts/pathfinder/interfaces/{ISwapPathFinder.js → IDepositor.sol/IDepositor.js} +0 -0
  20. package/lib/types/contracts/pathfinder/interfaces/IDepositor.sol/IDepositorOptions.d.ts +165 -0
  21. package/lib/types/contracts/pathfinder/interfaces/IDepositor.sol/IDepositorOptions.js +2 -0
  22. package/lib/types/contracts/pathfinder/interfaces/IDepositor.sol/index.d.ts +2 -0
  23. package/lib/types/contracts/pathfinder/interfaces/IDepositor.sol/index.js +2 -0
  24. package/lib/types/contracts/pathfinder/interfaces/IGasPricer.d.ts +44 -0
  25. package/lib/types/contracts/pathfinder/interfaces/IGasPricer.js +2 -0
  26. package/lib/types/contracts/pathfinder/interfaces/ILPWorker.sol/ILPWorker.d.ts +113 -0
  27. package/lib/types/contracts/pathfinder/interfaces/ILPWorker.sol/ILPWorker.js +2 -0
  28. package/lib/types/contracts/pathfinder/interfaces/ILPWorker.sol/ILPWorkerOptions.d.ts +119 -0
  29. package/lib/types/contracts/pathfinder/interfaces/ILPWorker.sol/ILPWorkerOptions.js +2 -0
  30. package/lib/types/contracts/pathfinder/interfaces/ILPWorker.sol/index.d.ts +2 -0
  31. package/lib/types/contracts/pathfinder/interfaces/ILPWorker.sol/index.js +2 -0
  32. package/lib/types/contracts/pathfinder/interfaces/IPathFinder.d.ts +210 -0
  33. package/lib/types/contracts/pathfinder/interfaces/IPathFinder.js +2 -0
  34. package/lib/types/contracts/pathfinder/interfaces/IPathResolver.d.ts +131 -0
  35. package/lib/types/contracts/pathfinder/interfaces/IPathResolver.js +2 -0
  36. package/lib/types/contracts/pathfinder/interfaces/{ISwapPathFinder.d.ts → ISwapAggregator.d.ts} +98 -14
  37. package/lib/types/contracts/pathfinder/interfaces/ISwapAggregator.js +2 -0
  38. package/lib/types/contracts/pathfinder/{ISwapper.d.ts → interfaces/ISwapper.d.ts} +1 -1
  39. package/lib/types/contracts/pathfinder/interfaces/ISwapper.js +2 -0
  40. package/lib/types/contracts/pathfinder/interfaces/IWithdrawer.sol/IWithdrawer.d.ts +144 -0
  41. package/lib/types/contracts/pathfinder/interfaces/IWithdrawer.sol/IWithdrawer.js +2 -0
  42. package/lib/types/contracts/pathfinder/interfaces/IWithdrawer.sol/IWithdrawerOptions.d.ts +160 -0
  43. package/lib/types/contracts/pathfinder/interfaces/IWithdrawer.sol/IWithdrawerOptions.js +2 -0
  44. package/lib/types/contracts/pathfinder/interfaces/IWithdrawer.sol/index.d.ts +2 -0
  45. package/lib/types/contracts/pathfinder/interfaces/IWithdrawer.sol/index.js +2 -0
  46. package/lib/types/contracts/pathfinder/interfaces/index.d.ts +12 -1
  47. package/lib/types/factories/contracts/interfaces/ICreditConfigurator.sol/ICreditConfiguratorEvents__factory.js +1 -14
  48. package/lib/types/factories/contracts/interfaces/ICreditConfigurator.sol/ICreditConfiguratorExceptions__factory.js +2 -17
  49. package/lib/types/factories/contracts/interfaces/ICreditConfigurator.sol/ICreditConfigurator__factory.js +240 -31
  50. package/lib/types/factories/contracts/interfaces/ICreditFacade.sol/ICreditFacadeExceptions__factory.js +7 -2
  51. package/lib/types/factories/contracts/interfaces/ICreditFacade.sol/ICreditFacadeExtended__factory.js +1 -1
  52. package/lib/types/factories/contracts/interfaces/ICreditFacade.sol/ICreditFacade__factory.js +7 -2
  53. package/lib/types/factories/contracts/interfaces/ICreditManagerV2.sol/ICreditManagerV2Exceptions__factory.js +2 -2
  54. package/lib/types/factories/contracts/interfaces/ICreditManagerV2.sol/ICreditManagerV2__factory.js +41 -84
  55. package/lib/types/factories/contracts/interfaces/IDataCompressor.sol/IDataCompressor__factory.d.ts +14 -14
  56. package/lib/types/factories/contracts/interfaces/IDataCompressor.sol/IDataCompressor__factory.js +74 -0
  57. package/lib/types/factories/contracts/interfaces/IDegenNFT.sol/IDegenNFT__factory.js +4 -4
  58. package/lib/types/factories/contracts/interfaces/V1/ICreditFilter__factory.js +1 -1
  59. package/lib/types/factories/contracts/interfaces/adapters/convex/IConvexV1BoosterAdapter__factory.js +0 -13
  60. package/lib/types/factories/contracts/pathfinder/index.d.ts +0 -1
  61. package/lib/types/factories/contracts/pathfinder/index.js +1 -3
  62. package/lib/types/factories/contracts/pathfinder/interfaces/IClosePathResolver__factory.d.ts +57 -0
  63. package/lib/types/factories/contracts/pathfinder/interfaces/IClosePathResolver__factory.js +264 -0
  64. package/lib/types/factories/contracts/pathfinder/interfaces/IDepositor.sol/IDepositorOptions__factory.d.ts +62 -0
  65. package/lib/types/factories/contracts/pathfinder/interfaces/IDepositor.sol/IDepositorOptions__factory.js +717 -0
  66. package/lib/types/factories/contracts/pathfinder/interfaces/IDepositor.sol/IDepositor__factory.d.ts +62 -0
  67. package/lib/types/factories/contracts/pathfinder/interfaces/IDepositor.sol/IDepositor__factory.js +702 -0
  68. package/lib/types/factories/contracts/pathfinder/interfaces/IDepositor.sol/index.d.ts +2 -0
  69. package/lib/types/factories/contracts/pathfinder/interfaces/IDepositor.sol/index.js +10 -0
  70. package/lib/types/factories/contracts/pathfinder/interfaces/IGasPricer__factory.d.ts +22 -0
  71. package/lib/types/factories/contracts/pathfinder/interfaces/IGasPricer__factory.js +41 -0
  72. package/lib/types/factories/contracts/pathfinder/interfaces/ILPWorker.sol/ILPWorkerOptions__factory.d.ts +62 -0
  73. package/lib/types/factories/contracts/pathfinder/interfaces/ILPWorker.sol/ILPWorkerOptions__factory.js +252 -0
  74. package/lib/types/factories/contracts/pathfinder/interfaces/ILPWorker.sol/ILPWorker__factory.d.ts +62 -0
  75. package/lib/types/factories/contracts/pathfinder/interfaces/ILPWorker.sol/ILPWorker__factory.js +247 -0
  76. package/lib/types/factories/contracts/pathfinder/interfaces/ILPWorker.sol/index.d.ts +2 -0
  77. package/lib/types/factories/contracts/pathfinder/interfaces/ILPWorker.sol/index.js +10 -0
  78. package/lib/types/factories/contracts/pathfinder/interfaces/{ISwapPathFinder__factory.d.ts → IPathFinder__factory.d.ts} +42 -28
  79. package/lib/types/factories/contracts/pathfinder/interfaces/IPathFinder__factory.js +483 -0
  80. package/lib/types/factories/contracts/pathfinder/interfaces/IPathResolver__factory.d.ts +57 -0
  81. package/lib/types/factories/contracts/pathfinder/interfaces/IPathResolver__factory.js +467 -0
  82. package/lib/types/factories/contracts/pathfinder/interfaces/ISwapAggregator__factory.d.ts +62 -0
  83. package/lib/types/factories/contracts/pathfinder/interfaces/ISwapAggregator__factory.js +782 -0
  84. package/lib/types/factories/contracts/pathfinder/{ISwapper__factory.d.ts → interfaces/ISwapper__factory.d.ts} +1 -1
  85. package/lib/types/factories/contracts/pathfinder/{ISwapper__factory.js → interfaces/ISwapper__factory.js} +0 -0
  86. package/lib/types/factories/contracts/pathfinder/interfaces/IWithdrawer.sol/IWithdrawerOptions__factory.d.ts +62 -0
  87. package/lib/types/factories/contracts/pathfinder/interfaces/IWithdrawer.sol/IWithdrawerOptions__factory.js +729 -0
  88. package/lib/types/factories/contracts/pathfinder/interfaces/IWithdrawer.sol/IWithdrawer__factory.d.ts +62 -0
  89. package/lib/types/factories/contracts/pathfinder/interfaces/IWithdrawer.sol/IWithdrawer__factory.js +692 -0
  90. package/lib/types/factories/contracts/pathfinder/interfaces/IWithdrawer.sol/index.d.ts +2 -0
  91. package/lib/types/factories/contracts/pathfinder/interfaces/IWithdrawer.sol/index.js +10 -0
  92. package/lib/types/factories/contracts/pathfinder/interfaces/index.d.ts +9 -1
  93. package/lib/types/factories/contracts/pathfinder/interfaces/index.js +39 -3
  94. package/lib/types/factories/contracts/support/MultiCall.sol/Multicall2__factory.d.ts +1 -1
  95. package/lib/types/factories/contracts/support/MultiCall.sol/Multicall2__factory.js +1 -1
  96. package/lib/types/index.d.ts +24 -4
  97. package/lib/types/index.js +24 -4
  98. package/package.json +2 -2
  99. package/lib/types/factories/contracts/pathfinder/interfaces/ISwapPathFinder__factory.js +0 -346
@@ -0,0 +1,247 @@
1
+ "use strict";
2
+ /* Autogenerated file. Do not edit manually. */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ILPWorker__factory = void 0;
7
+ var ethers_1 = require("ethers");
8
+ var _abi = [
9
+ {
10
+ inputs: [
11
+ {
12
+ internalType: "address",
13
+ name: "tokenOut",
14
+ type: "address",
15
+ },
16
+ {
17
+ components: [
18
+ {
19
+ internalType: "address",
20
+ name: "creditAccount",
21
+ type: "address",
22
+ },
23
+ {
24
+ components: [
25
+ {
26
+ internalType: "address",
27
+ name: "token",
28
+ type: "address",
29
+ },
30
+ {
31
+ internalType: "uint256",
32
+ name: "balance",
33
+ type: "uint256",
34
+ },
35
+ ],
36
+ internalType: "struct Balance[]",
37
+ name: "balances",
38
+ type: "tuple[]",
39
+ },
40
+ {
41
+ internalType: "address",
42
+ name: "target",
43
+ type: "address",
44
+ },
45
+ {
46
+ internalType: "address[]",
47
+ name: "connectors",
48
+ type: "address[]",
49
+ },
50
+ {
51
+ internalType: "address[]",
52
+ name: "adapters",
53
+ type: "address[]",
54
+ },
55
+ {
56
+ internalType: "uint256",
57
+ name: "slippage",
58
+ type: "uint256",
59
+ },
60
+ {
61
+ internalType: "enum TokenType",
62
+ name: "targetType",
63
+ type: "uint8",
64
+ },
65
+ {
66
+ components: [
67
+ {
68
+ internalType: "address",
69
+ name: "token",
70
+ type: "address",
71
+ },
72
+ {
73
+ internalType: "address[]",
74
+ name: "adapters",
75
+ type: "address[]",
76
+ },
77
+ ],
78
+ internalType: "struct TokenAdapters[]",
79
+ name: "foundAdapters",
80
+ type: "tuple[]",
81
+ },
82
+ {
83
+ internalType: "uint256",
84
+ name: "gasPriceTargetRAY",
85
+ type: "uint256",
86
+ },
87
+ {
88
+ internalType: "uint256",
89
+ name: "gasUsage",
90
+ type: "uint256",
91
+ },
92
+ {
93
+ internalType: "uint256",
94
+ name: "initTargetBalance",
95
+ type: "uint256",
96
+ },
97
+ {
98
+ components: [
99
+ {
100
+ internalType: "address",
101
+ name: "target",
102
+ type: "address",
103
+ },
104
+ {
105
+ internalType: "bytes",
106
+ name: "callData",
107
+ type: "bytes",
108
+ },
109
+ ],
110
+ internalType: "struct MultiCall[]",
111
+ name: "calls",
112
+ type: "tuple[]",
113
+ },
114
+ ],
115
+ internalType: "struct StrategyPathTask",
116
+ name: "task",
117
+ type: "tuple",
118
+ },
119
+ ],
120
+ name: "getUnderlying",
121
+ outputs: [
122
+ {
123
+ internalType: "address",
124
+ name: "tokenIn",
125
+ type: "address",
126
+ },
127
+ {
128
+ components: [
129
+ {
130
+ internalType: "address",
131
+ name: "creditAccount",
132
+ type: "address",
133
+ },
134
+ {
135
+ components: [
136
+ {
137
+ internalType: "address",
138
+ name: "token",
139
+ type: "address",
140
+ },
141
+ {
142
+ internalType: "uint256",
143
+ name: "balance",
144
+ type: "uint256",
145
+ },
146
+ ],
147
+ internalType: "struct Balance[]",
148
+ name: "balances",
149
+ type: "tuple[]",
150
+ },
151
+ {
152
+ internalType: "address",
153
+ name: "target",
154
+ type: "address",
155
+ },
156
+ {
157
+ internalType: "address[]",
158
+ name: "connectors",
159
+ type: "address[]",
160
+ },
161
+ {
162
+ internalType: "address[]",
163
+ name: "adapters",
164
+ type: "address[]",
165
+ },
166
+ {
167
+ internalType: "uint256",
168
+ name: "slippage",
169
+ type: "uint256",
170
+ },
171
+ {
172
+ internalType: "enum TokenType",
173
+ name: "targetType",
174
+ type: "uint8",
175
+ },
176
+ {
177
+ components: [
178
+ {
179
+ internalType: "address",
180
+ name: "token",
181
+ type: "address",
182
+ },
183
+ {
184
+ internalType: "address[]",
185
+ name: "adapters",
186
+ type: "address[]",
187
+ },
188
+ ],
189
+ internalType: "struct TokenAdapters[]",
190
+ name: "foundAdapters",
191
+ type: "tuple[]",
192
+ },
193
+ {
194
+ internalType: "uint256",
195
+ name: "gasPriceTargetRAY",
196
+ type: "uint256",
197
+ },
198
+ {
199
+ internalType: "uint256",
200
+ name: "gasUsage",
201
+ type: "uint256",
202
+ },
203
+ {
204
+ internalType: "uint256",
205
+ name: "initTargetBalance",
206
+ type: "uint256",
207
+ },
208
+ {
209
+ components: [
210
+ {
211
+ internalType: "address",
212
+ name: "target",
213
+ type: "address",
214
+ },
215
+ {
216
+ internalType: "bytes",
217
+ name: "callData",
218
+ type: "bytes",
219
+ },
220
+ ],
221
+ internalType: "struct MultiCall[]",
222
+ name: "calls",
223
+ type: "tuple[]",
224
+ },
225
+ ],
226
+ internalType: "struct StrategyPathTask",
227
+ name: "",
228
+ type: "tuple",
229
+ },
230
+ ],
231
+ stateMutability: "view",
232
+ type: "function",
233
+ },
234
+ ];
235
+ var ILPWorker__factory = /** @class */ (function () {
236
+ function ILPWorker__factory() {
237
+ }
238
+ ILPWorker__factory.createInterface = function () {
239
+ return new ethers_1.utils.Interface(_abi);
240
+ };
241
+ ILPWorker__factory.connect = function (address, signerOrProvider) {
242
+ return new ethers_1.Contract(address, _abi, signerOrProvider);
243
+ };
244
+ ILPWorker__factory.abi = _abi;
245
+ return ILPWorker__factory;
246
+ }());
247
+ exports.ILPWorker__factory = ILPWorker__factory;
@@ -0,0 +1,2 @@
1
+ export { ILPWorker__factory } from "./ILPWorker__factory";
2
+ export { ILPWorkerOptions__factory } from "./ILPWorkerOptions__factory";
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ILPWorkerOptions__factory = exports.ILPWorker__factory = void 0;
4
+ /* Autogenerated file. Do not edit manually. */
5
+ /* tslint:disable */
6
+ /* eslint-disable */
7
+ var ILPWorker__factory_1 = require("./ILPWorker__factory");
8
+ Object.defineProperty(exports, "ILPWorker__factory", { enumerable: true, get: function () { return ILPWorker__factory_1.ILPWorker__factory; } });
9
+ var ILPWorkerOptions__factory_1 = require("./ILPWorkerOptions__factory");
10
+ Object.defineProperty(exports, "ILPWorkerOptions__factory", { enumerable: true, get: function () { return ILPWorkerOptions__factory_1.ILPWorkerOptions__factory; } });
@@ -1,9 +1,41 @@
1
1
  import { Signer } from "ethers";
2
2
  import type { Provider } from "@ethersproject/providers";
3
- import type { ISwapPathFinder, ISwapPathFinderInterface } from "../../../../contracts/pathfinder/interfaces/ISwapPathFinder";
4
- export declare class ISwapPathFinder__factory {
3
+ import type { IPathFinder, IPathFinderInterface } from "../../../../contracts/pathfinder/interfaces/IPathFinder";
4
+ export declare class IPathFinder__factory {
5
5
  static readonly abi: ({
6
+ anonymous: boolean;
7
+ inputs: {
8
+ indexed: boolean;
9
+ internalType: string;
10
+ name: string;
11
+ type: string;
12
+ }[];
13
+ name: string;
14
+ type: string;
15
+ outputs?: undefined;
16
+ stateMutability?: undefined;
17
+ } | {
18
+ inputs: {
19
+ internalType: string;
20
+ name: string;
21
+ type: string;
22
+ }[];
23
+ name: string;
24
+ outputs: {
25
+ internalType: string;
26
+ name: string;
27
+ type: string;
28
+ }[];
29
+ stateMutability: string;
30
+ type: string;
31
+ anonymous?: undefined;
32
+ } | {
6
33
  inputs: ({
34
+ internalType: string;
35
+ name: string;
36
+ type: string;
37
+ components?: undefined;
38
+ } | {
7
39
  components: {
8
40
  internalType: string;
9
41
  name: string;
@@ -12,15 +44,15 @@ export declare class ISwapPathFinder__factory {
12
44
  internalType: string;
13
45
  name: string;
14
46
  type: string;
15
- } | {
16
- internalType: string;
17
- name: string;
18
- type: string;
19
- components?: undefined;
20
47
  })[];
21
48
  name: string;
22
49
  outputs: {
23
50
  components: ({
51
+ internalType: string;
52
+ name: string;
53
+ type: string;
54
+ components?: undefined;
55
+ } | {
24
56
  components: {
25
57
  internalType: string;
26
58
  name: string;
@@ -29,11 +61,6 @@ export declare class ISwapPathFinder__factory {
29
61
  internalType: string;
30
62
  name: string;
31
63
  type: string;
32
- } | {
33
- internalType: string;
34
- name: string;
35
- type: string;
36
- components?: undefined;
37
64
  })[];
38
65
  internalType: string;
39
66
  name: string;
@@ -41,21 +68,8 @@ export declare class ISwapPathFinder__factory {
41
68
  }[];
42
69
  stateMutability: string;
43
70
  type: string;
44
- } | {
45
- inputs: {
46
- internalType: string;
47
- name: string;
48
- type: string;
49
- }[];
50
- name: string;
51
- outputs: {
52
- internalType: string;
53
- name: string;
54
- type: string;
55
- }[];
56
- stateMutability: string;
57
- type: string;
71
+ anonymous?: undefined;
58
72
  })[];
59
- static createInterface(): ISwapPathFinderInterface;
60
- static connect(address: string, signerOrProvider: Signer | Provider): ISwapPathFinder;
73
+ static createInterface(): IPathFinderInterface;
74
+ static connect(address: string, signerOrProvider: Signer | Provider): IPathFinder;
61
75
  }