@gearbox-protocol/sdk 1.7.12 → 1.8.1

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 (73) hide show
  1. package/lib/apy/convexAPY.d.ts +1 -0
  2. package/lib/apy/convexAPY.js +2 -1
  3. package/lib/contracts/adapters.d.ts +2 -1
  4. package/lib/contracts/adapters.js +1 -0
  5. package/lib/core/constants.d.ts +3 -0
  6. package/lib/core/constants.js +4 -1
  7. package/lib/core/rewardClaimer.d.ts +19 -0
  8. package/lib/core/rewardClaimer.js +53 -0
  9. package/lib/core/rewardConvex.d.ts +26 -0
  10. package/lib/core/rewardConvex.js +161 -0
  11. package/lib/core/rewardConvex.spec.d.ts +1 -0
  12. package/lib/core/rewardConvex.spec.js +140 -0
  13. package/lib/oracles/oracles.d.ts +5 -1
  14. package/lib/oracles/oracles.js +1 -0
  15. package/lib/oracles/priceFeeds.js +6 -0
  16. package/lib/tokens/decimals.js +1 -0
  17. package/lib/tokens/normal.d.ts +1 -1
  18. package/lib/tokens/normal.js +25 -0
  19. package/lib/tokens/token.js +2 -0
  20. package/lib/types/contracts/integrations/lido/IwstETH.sol/IwstETH.d.ts +234 -0
  21. package/lib/types/contracts/{test/suites/mainnet/ITokenTestSuite.js → integrations/lido/IwstETH.sol/IwstETH.js} +0 -0
  22. package/lib/types/contracts/integrations/lido/IwstETH.sol/IwstETHGetters.d.ts +202 -0
  23. package/lib/types/contracts/{test/suites/mainnet/SupportedContracts.sol/ISupportedContracts.js → integrations/lido/IwstETH.sol/IwstETHGetters.js} +0 -0
  24. package/lib/types/contracts/integrations/lido/IwstETH.sol/index.d.ts +2 -0
  25. package/lib/types/contracts/{test/suites/mainnet/SupportedContracts.sol → integrations/lido/IwstETH.sol}/index.js +0 -0
  26. package/lib/types/contracts/integrations/lido/index.d.ts +2 -0
  27. package/lib/types/contracts/interfaces/IACL.sol/IACL.d.ts +9 -1
  28. package/lib/types/contracts/interfaces/adapters/lido/IwstETHV1Adapter.d.ts +218 -0
  29. package/lib/types/contracts/{test/suites/mainnet/Tokens.sol/IToken.js → interfaces/adapters/lido/IwstETHV1Adapter.js} +0 -0
  30. package/lib/types/contracts/interfaces/adapters/lido/index.d.ts +1 -0
  31. package/lib/types/contracts/test/suites/index.d.ts +2 -2
  32. package/lib/types/contracts/test/suites/{mainnet → live}/ITokenTestSuite.d.ts +0 -0
  33. package/lib/types/contracts/test/suites/{mainnet/Tokens.sol/index.js → live/ITokenTestSuite.js} +0 -0
  34. package/lib/types/contracts/test/suites/{mainnet → live}/SupportedContracts.sol/ISupportedContracts.d.ts +9 -1
  35. package/lib/types/contracts/test/suites/{mainnet/index.js → live/SupportedContracts.sol/ISupportedContracts.js} +0 -0
  36. package/lib/types/contracts/test/suites/{mainnet → live}/SupportedContracts.sol/index.d.ts +0 -0
  37. package/lib/types/contracts/test/suites/live/SupportedContracts.sol/index.js +2 -0
  38. package/lib/types/contracts/test/suites/{mainnet → live}/Tokens.sol/IToken.d.ts +0 -0
  39. package/lib/types/contracts/test/suites/live/Tokens.sol/IToken.js +2 -0
  40. package/lib/types/contracts/test/suites/{mainnet → live}/Tokens.sol/index.d.ts +0 -0
  41. package/lib/types/contracts/test/suites/live/Tokens.sol/index.js +2 -0
  42. package/lib/types/contracts/test/suites/{mainnet → live}/index.d.ts +0 -0
  43. package/lib/types/contracts/test/suites/live/index.js +2 -0
  44. package/lib/types/factories/contracts/integrations/lido/IwstETH.sol/IwstETHGetters__factory.d.ts +35 -0
  45. package/lib/types/factories/contracts/integrations/lido/IwstETH.sol/IwstETHGetters__factory.js +321 -0
  46. package/lib/types/factories/contracts/integrations/lido/IwstETH.sol/IwstETH__factory.d.ts +35 -0
  47. package/lib/types/factories/contracts/integrations/lido/IwstETH.sol/IwstETH__factory.js +359 -0
  48. package/lib/types/factories/contracts/integrations/lido/IwstETH.sol/index.d.ts +2 -0
  49. package/lib/types/factories/contracts/integrations/lido/IwstETH.sol/index.js +10 -0
  50. package/lib/types/factories/contracts/integrations/lido/index.d.ts +1 -0
  51. package/lib/types/factories/contracts/integrations/lido/index.js +2 -1
  52. package/lib/types/factories/contracts/interfaces/IACL.sol/IACL__factory.js +13 -0
  53. package/lib/types/factories/contracts/interfaces/adapters/lido/IwstETHV1Adapter__factory.d.ts +32 -0
  54. package/lib/types/factories/contracts/interfaces/adapters/lido/IwstETHV1Adapter__factory.js +321 -0
  55. package/lib/types/factories/contracts/interfaces/adapters/lido/index.d.ts +1 -0
  56. package/lib/types/factories/contracts/interfaces/adapters/lido/index.js +3 -1
  57. package/lib/types/factories/contracts/test/suites/index.d.ts +1 -1
  58. package/lib/types/factories/contracts/test/suites/index.js +2 -2
  59. package/lib/types/factories/contracts/test/suites/{mainnet → live}/ITokenTestSuite__factory.d.ts +1 -1
  60. package/lib/types/factories/contracts/test/suites/{mainnet → live}/ITokenTestSuite__factory.js +0 -0
  61. package/lib/types/factories/contracts/test/suites/{mainnet → live}/SupportedContracts.sol/ISupportedContracts__factory.d.ts +1 -1
  62. package/lib/types/factories/contracts/test/suites/{mainnet → live}/SupportedContracts.sol/ISupportedContracts__factory.js +19 -0
  63. package/lib/types/factories/contracts/test/suites/{mainnet → live}/SupportedContracts.sol/index.d.ts +0 -0
  64. package/lib/types/factories/contracts/test/suites/{mainnet → live}/SupportedContracts.sol/index.js +0 -0
  65. package/lib/types/factories/contracts/test/suites/{mainnet → live}/Tokens.sol/IToken__factory.d.ts +1 -1
  66. package/lib/types/factories/contracts/test/suites/{mainnet → live}/Tokens.sol/IToken__factory.js +0 -0
  67. package/lib/types/factories/contracts/test/suites/{mainnet → live}/Tokens.sol/index.d.ts +0 -0
  68. package/lib/types/factories/contracts/test/suites/{mainnet → live}/Tokens.sol/index.js +0 -0
  69. package/lib/types/factories/contracts/test/suites/{mainnet → live}/index.d.ts +0 -0
  70. package/lib/types/factories/contracts/test/suites/{mainnet → live}/index.js +0 -0
  71. package/lib/types/index.d.ts +12 -6
  72. package/lib/types/index.js +12 -6
  73. package/package.json +1 -1
@@ -0,0 +1,35 @@
1
+ import { Signer } from "ethers";
2
+ import type { Provider } from "@ethersproject/providers";
3
+ import type { IwstETH, IwstETHInterface } from "../../../../../contracts/integrations/lido/IwstETH.sol/IwstETH";
4
+ export declare class IwstETH__factory {
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
+ })[];
33
+ static createInterface(): IwstETHInterface;
34
+ static connect(address: string, signerOrProvider: Signer | Provider): IwstETH;
35
+ }
@@ -0,0 +1,359 @@
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.IwstETH__factory = void 0;
7
+ var ethers_1 = require("ethers");
8
+ var _abi = [
9
+ {
10
+ anonymous: false,
11
+ inputs: [
12
+ {
13
+ indexed: true,
14
+ internalType: "address",
15
+ name: "owner",
16
+ type: "address",
17
+ },
18
+ {
19
+ indexed: true,
20
+ internalType: "address",
21
+ name: "spender",
22
+ type: "address",
23
+ },
24
+ {
25
+ indexed: false,
26
+ internalType: "uint256",
27
+ name: "value",
28
+ type: "uint256",
29
+ },
30
+ ],
31
+ name: "Approval",
32
+ type: "event",
33
+ },
34
+ {
35
+ anonymous: false,
36
+ inputs: [
37
+ {
38
+ indexed: true,
39
+ internalType: "address",
40
+ name: "from",
41
+ type: "address",
42
+ },
43
+ {
44
+ indexed: true,
45
+ internalType: "address",
46
+ name: "to",
47
+ type: "address",
48
+ },
49
+ {
50
+ indexed: false,
51
+ internalType: "uint256",
52
+ name: "value",
53
+ type: "uint256",
54
+ },
55
+ ],
56
+ name: "Transfer",
57
+ type: "event",
58
+ },
59
+ {
60
+ inputs: [
61
+ {
62
+ internalType: "address",
63
+ name: "owner",
64
+ type: "address",
65
+ },
66
+ {
67
+ internalType: "address",
68
+ name: "spender",
69
+ type: "address",
70
+ },
71
+ ],
72
+ name: "allowance",
73
+ outputs: [
74
+ {
75
+ internalType: "uint256",
76
+ name: "",
77
+ type: "uint256",
78
+ },
79
+ ],
80
+ stateMutability: "view",
81
+ type: "function",
82
+ },
83
+ {
84
+ inputs: [
85
+ {
86
+ internalType: "address",
87
+ name: "spender",
88
+ type: "address",
89
+ },
90
+ {
91
+ internalType: "uint256",
92
+ name: "amount",
93
+ type: "uint256",
94
+ },
95
+ ],
96
+ name: "approve",
97
+ outputs: [
98
+ {
99
+ internalType: "bool",
100
+ name: "",
101
+ type: "bool",
102
+ },
103
+ ],
104
+ stateMutability: "nonpayable",
105
+ type: "function",
106
+ },
107
+ {
108
+ inputs: [
109
+ {
110
+ internalType: "address",
111
+ name: "account",
112
+ type: "address",
113
+ },
114
+ ],
115
+ name: "balanceOf",
116
+ outputs: [
117
+ {
118
+ internalType: "uint256",
119
+ name: "",
120
+ type: "uint256",
121
+ },
122
+ ],
123
+ stateMutability: "view",
124
+ type: "function",
125
+ },
126
+ {
127
+ inputs: [],
128
+ name: "decimals",
129
+ outputs: [
130
+ {
131
+ internalType: "uint8",
132
+ name: "",
133
+ type: "uint8",
134
+ },
135
+ ],
136
+ stateMutability: "view",
137
+ type: "function",
138
+ },
139
+ {
140
+ inputs: [
141
+ {
142
+ internalType: "uint256",
143
+ name: "_wstETHAmount",
144
+ type: "uint256",
145
+ },
146
+ ],
147
+ name: "getStETHByWstETH",
148
+ outputs: [
149
+ {
150
+ internalType: "uint256",
151
+ name: "",
152
+ type: "uint256",
153
+ },
154
+ ],
155
+ stateMutability: "view",
156
+ type: "function",
157
+ },
158
+ {
159
+ inputs: [
160
+ {
161
+ internalType: "uint256",
162
+ name: "_stETHAmount",
163
+ type: "uint256",
164
+ },
165
+ ],
166
+ name: "getWstETHByStETH",
167
+ outputs: [
168
+ {
169
+ internalType: "uint256",
170
+ name: "",
171
+ type: "uint256",
172
+ },
173
+ ],
174
+ stateMutability: "view",
175
+ type: "function",
176
+ },
177
+ {
178
+ inputs: [],
179
+ name: "name",
180
+ outputs: [
181
+ {
182
+ internalType: "string",
183
+ name: "",
184
+ type: "string",
185
+ },
186
+ ],
187
+ stateMutability: "view",
188
+ type: "function",
189
+ },
190
+ {
191
+ inputs: [],
192
+ name: "stETH",
193
+ outputs: [
194
+ {
195
+ internalType: "address",
196
+ name: "",
197
+ type: "address",
198
+ },
199
+ ],
200
+ stateMutability: "view",
201
+ type: "function",
202
+ },
203
+ {
204
+ inputs: [],
205
+ name: "stEthPerToken",
206
+ outputs: [
207
+ {
208
+ internalType: "uint256",
209
+ name: "",
210
+ type: "uint256",
211
+ },
212
+ ],
213
+ stateMutability: "view",
214
+ type: "function",
215
+ },
216
+ {
217
+ inputs: [],
218
+ name: "symbol",
219
+ outputs: [
220
+ {
221
+ internalType: "string",
222
+ name: "",
223
+ type: "string",
224
+ },
225
+ ],
226
+ stateMutability: "view",
227
+ type: "function",
228
+ },
229
+ {
230
+ inputs: [],
231
+ name: "tokensPerStEth",
232
+ outputs: [
233
+ {
234
+ internalType: "uint256",
235
+ name: "",
236
+ type: "uint256",
237
+ },
238
+ ],
239
+ stateMutability: "view",
240
+ type: "function",
241
+ },
242
+ {
243
+ inputs: [],
244
+ name: "totalSupply",
245
+ outputs: [
246
+ {
247
+ internalType: "uint256",
248
+ name: "",
249
+ type: "uint256",
250
+ },
251
+ ],
252
+ stateMutability: "view",
253
+ type: "function",
254
+ },
255
+ {
256
+ inputs: [
257
+ {
258
+ internalType: "address",
259
+ name: "recipient",
260
+ type: "address",
261
+ },
262
+ {
263
+ internalType: "uint256",
264
+ name: "amount",
265
+ type: "uint256",
266
+ },
267
+ ],
268
+ name: "transfer",
269
+ outputs: [
270
+ {
271
+ internalType: "bool",
272
+ name: "",
273
+ type: "bool",
274
+ },
275
+ ],
276
+ stateMutability: "nonpayable",
277
+ type: "function",
278
+ },
279
+ {
280
+ inputs: [
281
+ {
282
+ internalType: "address",
283
+ name: "sender",
284
+ type: "address",
285
+ },
286
+ {
287
+ internalType: "address",
288
+ name: "recipient",
289
+ type: "address",
290
+ },
291
+ {
292
+ internalType: "uint256",
293
+ name: "amount",
294
+ type: "uint256",
295
+ },
296
+ ],
297
+ name: "transferFrom",
298
+ outputs: [
299
+ {
300
+ internalType: "bool",
301
+ name: "",
302
+ type: "bool",
303
+ },
304
+ ],
305
+ stateMutability: "nonpayable",
306
+ type: "function",
307
+ },
308
+ {
309
+ inputs: [
310
+ {
311
+ internalType: "uint256",
312
+ name: "_wstETHAmount",
313
+ type: "uint256",
314
+ },
315
+ ],
316
+ name: "unwrap",
317
+ outputs: [
318
+ {
319
+ internalType: "uint256",
320
+ name: "",
321
+ type: "uint256",
322
+ },
323
+ ],
324
+ stateMutability: "nonpayable",
325
+ type: "function",
326
+ },
327
+ {
328
+ inputs: [
329
+ {
330
+ internalType: "uint256",
331
+ name: "_stETHAmount",
332
+ type: "uint256",
333
+ },
334
+ ],
335
+ name: "wrap",
336
+ outputs: [
337
+ {
338
+ internalType: "uint256",
339
+ name: "",
340
+ type: "uint256",
341
+ },
342
+ ],
343
+ stateMutability: "nonpayable",
344
+ type: "function",
345
+ },
346
+ ];
347
+ var IwstETH__factory = /** @class */ (function () {
348
+ function IwstETH__factory() {
349
+ }
350
+ IwstETH__factory.createInterface = function () {
351
+ return new ethers_1.utils.Interface(_abi);
352
+ };
353
+ IwstETH__factory.connect = function (address, signerOrProvider) {
354
+ return new ethers_1.Contract(address, _abi, signerOrProvider);
355
+ };
356
+ IwstETH__factory.abi = _abi;
357
+ return IwstETH__factory;
358
+ }());
359
+ exports.IwstETH__factory = IwstETH__factory;
@@ -0,0 +1,2 @@
1
+ export { IwstETH__factory } from "./IwstETH__factory";
2
+ export { IwstETHGetters__factory } from "./IwstETHGetters__factory";
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IwstETHGetters__factory = exports.IwstETH__factory = void 0;
4
+ /* Autogenerated file. Do not edit manually. */
5
+ /* tslint:disable */
6
+ /* eslint-disable */
7
+ var IwstETH__factory_1 = require("./IwstETH__factory");
8
+ Object.defineProperty(exports, "IwstETH__factory", { enumerable: true, get: function () { return IwstETH__factory_1.IwstETH__factory; } });
9
+ var IwstETHGetters__factory_1 = require("./IwstETHGetters__factory");
10
+ Object.defineProperty(exports, "IwstETHGetters__factory", { enumerable: true, get: function () { return IwstETHGetters__factory_1.IwstETHGetters__factory; } });
@@ -1,2 +1,3 @@
1
1
  export * as istEthSol from "./IstETH.sol";
2
+ export * as iwstEthSol from "./IwstETH.sol";
2
3
  export { ILidoOracle__factory } from "./ILidoOracle__factory";
@@ -23,10 +23,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.ILidoOracle__factory = exports.istEthSol = void 0;
26
+ exports.ILidoOracle__factory = exports.iwstEthSol = exports.istEthSol = void 0;
27
27
  /* Autogenerated file. Do not edit manually. */
28
28
  /* tslint:disable */
29
29
  /* eslint-disable */
30
30
  exports.istEthSol = __importStar(require("./IstETH.sol"));
31
+ exports.iwstEthSol = __importStar(require("./IwstETH.sol"));
31
32
  var ILidoOracle__factory_1 = require("./ILidoOracle__factory");
32
33
  Object.defineProperty(exports, "ILidoOracle__factory", { enumerable: true, get: function () { return ILidoOracle__factory_1.ILidoOracle__factory; } });
@@ -137,6 +137,19 @@ var _abi = [
137
137
  stateMutability: "view",
138
138
  type: "function",
139
139
  },
140
+ {
141
+ inputs: [],
142
+ name: "owner",
143
+ outputs: [
144
+ {
145
+ internalType: "address",
146
+ name: "",
147
+ type: "address",
148
+ },
149
+ ],
150
+ stateMutability: "view",
151
+ type: "function",
152
+ },
140
153
  {
141
154
  inputs: [],
142
155
  name: "version",
@@ -0,0 +1,32 @@
1
+ import { Signer } from "ethers";
2
+ import type { Provider } from "@ethersproject/providers";
3
+ import type { IwstETHV1Adapter, IwstETHV1AdapterInterface } from "../../../../../contracts/interfaces/adapters/lido/IwstETHV1Adapter";
4
+ export declare class IwstETHV1Adapter__factory {
5
+ static readonly abi: ({
6
+ inputs: {
7
+ internalType: string;
8
+ name: string;
9
+ type: string;
10
+ }[];
11
+ name: string;
12
+ type: string;
13
+ outputs?: undefined;
14
+ stateMutability?: undefined;
15
+ } | {
16
+ inputs: {
17
+ internalType: string;
18
+ name: string;
19
+ type: string;
20
+ }[];
21
+ name: string;
22
+ outputs: {
23
+ internalType: string;
24
+ name: string;
25
+ type: string;
26
+ }[];
27
+ stateMutability: string;
28
+ type: string;
29
+ })[];
30
+ static createInterface(): IwstETHV1AdapterInterface;
31
+ static connect(address: string, signerOrProvider: Signer | Provider): IwstETHV1Adapter;
32
+ }