@ichidao/ichi-vaults-sdk 0.1.39 → 0.1.41

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 (66) hide show
  1. package/README.md +205 -0
  2. package/dist/abis/types/DepositGuardWithHtsWrapping.d.ts +339 -0
  3. package/dist/abis/types/DepositGuardWithHtsWrapping.js +3 -0
  4. package/dist/abis/types/DepositGuardWithHtsWrapping.js.map +1 -0
  5. package/dist/abis/types/ERC20Wrapper.d.ts +171 -0
  6. package/dist/abis/types/ERC20Wrapper.js +3 -0
  7. package/dist/abis/types/ERC20Wrapper.js.map +1 -0
  8. package/dist/abis/types/factories/DepositGuardWithHtsWrapping__factory.d.ts +410 -0
  9. package/dist/abis/types/factories/DepositGuardWithHtsWrapping__factory.js +540 -0
  10. package/dist/abis/types/factories/DepositGuardWithHtsWrapping__factory.js.map +1 -0
  11. package/dist/abis/types/factories/ERC20Wrapper__factory.d.ts +168 -0
  12. package/dist/abis/types/factories/ERC20Wrapper__factory.js +235 -0
  13. package/dist/abis/types/factories/ERC20Wrapper__factory.js.map +1 -0
  14. package/dist/abis/types/factories/index.d.ts +2 -0
  15. package/dist/abis/types/factories/index.js +5 -1
  16. package/dist/abis/types/factories/index.js.map +1 -1
  17. package/dist/abis/types/index.d.ts +4 -0
  18. package/dist/abis/types/index.js +5 -1
  19. package/dist/abis/types/index.js.map +1 -1
  20. package/dist/src/__tests__/index.test.js +112 -15
  21. package/dist/src/__tests__/index.test.js.map +1 -1
  22. package/dist/src/abis/types/DepositGuardWithHtsWrapping.d.ts +339 -0
  23. package/dist/src/abis/types/ERC20Wrapper.d.ts +171 -0
  24. package/dist/src/abis/types/factories/DepositGuardWithHtsWrapping__factory.d.ts +410 -0
  25. package/dist/src/abis/types/factories/ERC20Wrapper__factory.d.ts +168 -0
  26. package/dist/src/abis/types/factories/index.d.ts +2 -0
  27. package/dist/src/abis/types/index.d.ts +4 -0
  28. package/dist/src/contracts/index.d.ts +3 -1
  29. package/dist/src/contracts/index.js +11 -1
  30. package/dist/src/contracts/index.js.map +1 -1
  31. package/dist/src/functions/_withdrawHelpers.d.ts +4 -0
  32. package/dist/src/functions/_withdrawHelpers.js +72 -0
  33. package/dist/src/functions/_withdrawHelpers.js.map +1 -0
  34. package/dist/src/functions/depositWithHtsWrapping.d.ts +8 -0
  35. package/dist/src/functions/depositWithHtsWrapping.js +243 -0
  36. package/dist/src/functions/depositWithHtsWrapping.js.map +1 -0
  37. package/dist/src/functions/withdraw.js +4 -26
  38. package/dist/src/functions/withdraw.js.map +1 -1
  39. package/dist/src/functions/withdrawWithErc20Wrapping.d.ts +5 -0
  40. package/dist/src/functions/withdrawWithErc20Wrapping.js +137 -0
  41. package/dist/src/functions/withdrawWithErc20Wrapping.js.map +1 -0
  42. package/dist/src/graphql/constants.js +6 -0
  43. package/dist/src/graphql/constants.js.map +1 -1
  44. package/dist/src/index.cjs.js +3 -1
  45. package/dist/src/index.d.ts +2 -0
  46. package/dist/src/index.esm.js +3 -1
  47. package/dist/src/index.js +2 -0
  48. package/dist/src/index.js.map +1 -1
  49. package/dist/src/src/contracts/index.d.ts +3 -1
  50. package/dist/src/src/functions/_withdrawHelpers.d.ts +4 -0
  51. package/dist/src/src/functions/depositWithHtsWrapping.d.ts +8 -0
  52. package/dist/src/src/functions/withdrawWithErc20Wrapping.d.ts +5 -0
  53. package/dist/src/src/index.d.ts +2 -0
  54. package/dist/src/src/types/index.d.ts +1 -0
  55. package/dist/src/src/utils/config/addresses.d.ts +1 -0
  56. package/dist/src/src/utils/multicallUtils.d.ts +1 -1
  57. package/dist/src/types/index.d.ts +1 -0
  58. package/dist/src/types/index.js +1 -0
  59. package/dist/src/types/index.js.map +1 -1
  60. package/dist/src/utils/config/addresses.d.ts +1 -0
  61. package/dist/src/utils/config/addresses.js +13 -2
  62. package/dist/src/utils/config/addresses.js.map +1 -1
  63. package/dist/src/utils/multicallUtils.d.ts +1 -1
  64. package/dist/src/utils/multicallUtils.js +26 -2
  65. package/dist/src/utils/multicallUtils.js.map +1 -1
  66. package/package.json +1 -1
@@ -0,0 +1,410 @@
1
+ import { Signer } from "ethers";
2
+ import type { Provider } from "@ethersproject/providers";
3
+ import type { DepositGuardWithHtsWrapping, DepositGuardWithHtsWrappingInterface } from "../DepositGuardWithHtsWrapping";
4
+ export declare class DepositGuardWithHtsWrapping__factory {
5
+ static readonly abi: readonly [{
6
+ readonly inputs: readonly [{
7
+ readonly internalType: "address";
8
+ readonly name: "_ICHIVaultFactory";
9
+ readonly type: "address";
10
+ }, {
11
+ readonly internalType: "address";
12
+ readonly name: "_WRAPPED_NATIVE";
13
+ readonly type: "address";
14
+ }];
15
+ readonly stateMutability: "nonpayable";
16
+ readonly type: "constructor";
17
+ }, {
18
+ readonly anonymous: false;
19
+ readonly inputs: readonly [{
20
+ readonly indexed: false;
21
+ readonly internalType: "address";
22
+ readonly name: "_ICHIVaultFactory";
23
+ readonly type: "address";
24
+ }, {
25
+ readonly indexed: false;
26
+ readonly internalType: "address";
27
+ readonly name: "_WETH";
28
+ readonly type: "address";
29
+ }];
30
+ readonly name: "Deployed";
31
+ readonly type: "event";
32
+ }, {
33
+ readonly anonymous: false;
34
+ readonly inputs: readonly [{
35
+ readonly indexed: true;
36
+ readonly internalType: "address";
37
+ readonly name: "sender";
38
+ readonly type: "address";
39
+ }, {
40
+ readonly indexed: true;
41
+ readonly internalType: "address";
42
+ readonly name: "vault";
43
+ readonly type: "address";
44
+ }, {
45
+ readonly indexed: true;
46
+ readonly internalType: "address";
47
+ readonly name: "token";
48
+ readonly type: "address";
49
+ }, {
50
+ readonly indexed: false;
51
+ readonly internalType: "uint256";
52
+ readonly name: "amount";
53
+ readonly type: "uint256";
54
+ }, {
55
+ readonly indexed: false;
56
+ readonly internalType: "uint256";
57
+ readonly name: "shares";
58
+ readonly type: "uint256";
59
+ }, {
60
+ readonly indexed: false;
61
+ readonly internalType: "address";
62
+ readonly name: "to";
63
+ readonly type: "address";
64
+ }];
65
+ readonly name: "DepositForwarded";
66
+ readonly type: "event";
67
+ }, {
68
+ readonly anonymous: false;
69
+ readonly inputs: readonly [{
70
+ readonly indexed: true;
71
+ readonly internalType: "address";
72
+ readonly name: "previousOwner";
73
+ readonly type: "address";
74
+ }, {
75
+ readonly indexed: true;
76
+ readonly internalType: "address";
77
+ readonly name: "newOwner";
78
+ readonly type: "address";
79
+ }];
80
+ readonly name: "OwnershipTransferred";
81
+ readonly type: "event";
82
+ }, {
83
+ readonly inputs: readonly [];
84
+ readonly name: "HTS_ADDRESS";
85
+ readonly outputs: readonly [{
86
+ readonly internalType: "address";
87
+ readonly name: "";
88
+ readonly type: "address";
89
+ }];
90
+ readonly stateMutability: "view";
91
+ readonly type: "function";
92
+ }, {
93
+ readonly inputs: readonly [];
94
+ readonly name: "HTS_WRAPPER";
95
+ readonly outputs: readonly [{
96
+ readonly internalType: "address payable";
97
+ readonly name: "";
98
+ readonly type: "address";
99
+ }];
100
+ readonly stateMutability: "view";
101
+ readonly type: "function";
102
+ }, {
103
+ readonly inputs: readonly [];
104
+ readonly name: "ICHIVaultFactory";
105
+ readonly outputs: readonly [{
106
+ readonly internalType: "address";
107
+ readonly name: "";
108
+ readonly type: "address";
109
+ }];
110
+ readonly stateMutability: "view";
111
+ readonly type: "function";
112
+ }, {
113
+ readonly inputs: readonly [];
114
+ readonly name: "WRAPPED_NATIVE";
115
+ readonly outputs: readonly [{
116
+ readonly internalType: "address";
117
+ readonly name: "";
118
+ readonly type: "address";
119
+ }];
120
+ readonly stateMutability: "view";
121
+ readonly type: "function";
122
+ }, {
123
+ readonly inputs: readonly [{
124
+ readonly internalType: "address";
125
+ readonly name: "token";
126
+ readonly type: "address";
127
+ }, {
128
+ readonly internalType: "address";
129
+ readonly name: "pool";
130
+ readonly type: "address";
131
+ }];
132
+ readonly name: "associate";
133
+ readonly outputs: readonly [];
134
+ readonly stateMutability: "nonpayable";
135
+ readonly type: "function";
136
+ }, {
137
+ readonly inputs: readonly [{
138
+ readonly internalType: "address";
139
+ readonly name: "vault";
140
+ readonly type: "address";
141
+ }, {
142
+ readonly internalType: "address";
143
+ readonly name: "vaultDeployer";
144
+ readonly type: "address";
145
+ }, {
146
+ readonly internalType: "address";
147
+ readonly name: "token";
148
+ readonly type: "address";
149
+ }, {
150
+ readonly internalType: "uint256";
151
+ readonly name: "erc20Amount";
152
+ readonly type: "uint256";
153
+ }, {
154
+ readonly internalType: "uint256";
155
+ readonly name: "minimumProceeds";
156
+ readonly type: "uint256";
157
+ }, {
158
+ readonly internalType: "address";
159
+ readonly name: "to";
160
+ readonly type: "address";
161
+ }];
162
+ readonly name: "depositToICHIVaultAndTryWrapToHTS";
163
+ readonly outputs: readonly [{
164
+ readonly internalType: "uint256";
165
+ readonly name: "vaultTokens";
166
+ readonly type: "uint256";
167
+ }];
168
+ readonly stateMutability: "nonpayable";
169
+ readonly type: "function";
170
+ }, {
171
+ readonly inputs: readonly [{
172
+ readonly internalType: "address";
173
+ readonly name: "vault";
174
+ readonly type: "address";
175
+ }, {
176
+ readonly internalType: "address";
177
+ readonly name: "vaultDeployer";
178
+ readonly type: "address";
179
+ }, {
180
+ readonly internalType: "address";
181
+ readonly name: "token";
182
+ readonly type: "address";
183
+ }, {
184
+ readonly internalType: "uint256";
185
+ readonly name: "amount";
186
+ readonly type: "uint256";
187
+ }, {
188
+ readonly internalType: "uint256";
189
+ readonly name: "minimumProceeds";
190
+ readonly type: "uint256";
191
+ }, {
192
+ readonly internalType: "address";
193
+ readonly name: "to";
194
+ readonly type: "address";
195
+ }];
196
+ readonly name: "forwardDepositToICHIVault";
197
+ readonly outputs: readonly [{
198
+ readonly internalType: "uint256";
199
+ readonly name: "vaultTokens";
200
+ readonly type: "uint256";
201
+ }];
202
+ readonly stateMutability: "nonpayable";
203
+ readonly type: "function";
204
+ }, {
205
+ readonly inputs: readonly [{
206
+ readonly internalType: "address";
207
+ readonly name: "vault";
208
+ readonly type: "address";
209
+ }, {
210
+ readonly internalType: "address";
211
+ readonly name: "vaultDeployer";
212
+ readonly type: "address";
213
+ }, {
214
+ readonly internalType: "uint256";
215
+ readonly name: "minimumProceeds";
216
+ readonly type: "uint256";
217
+ }, {
218
+ readonly internalType: "address";
219
+ readonly name: "to";
220
+ readonly type: "address";
221
+ }];
222
+ readonly name: "forwardNativeDepositToICHIVault";
223
+ readonly outputs: readonly [{
224
+ readonly internalType: "uint256";
225
+ readonly name: "vaultTokens";
226
+ readonly type: "uint256";
227
+ }];
228
+ readonly stateMutability: "payable";
229
+ readonly type: "function";
230
+ }, {
231
+ readonly inputs: readonly [{
232
+ readonly internalType: "address";
233
+ readonly name: "vault";
234
+ readonly type: "address";
235
+ }, {
236
+ readonly internalType: "address";
237
+ readonly name: "vaultDeployer";
238
+ readonly type: "address";
239
+ }, {
240
+ readonly internalType: "uint256";
241
+ readonly name: "shares";
242
+ readonly type: "uint256";
243
+ }, {
244
+ readonly internalType: "address";
245
+ readonly name: "to";
246
+ readonly type: "address";
247
+ }, {
248
+ readonly internalType: "uint256";
249
+ readonly name: "minAmount0";
250
+ readonly type: "uint256";
251
+ }, {
252
+ readonly internalType: "uint256";
253
+ readonly name: "minAmount1";
254
+ readonly type: "uint256";
255
+ }];
256
+ readonly name: "forwardNativeWithdrawFromICHIVault";
257
+ readonly outputs: readonly [{
258
+ readonly internalType: "uint256";
259
+ readonly name: "amount0";
260
+ readonly type: "uint256";
261
+ }, {
262
+ readonly internalType: "uint256";
263
+ readonly name: "amount1";
264
+ readonly type: "uint256";
265
+ }];
266
+ readonly stateMutability: "nonpayable";
267
+ readonly type: "function";
268
+ }, {
269
+ readonly inputs: readonly [{
270
+ readonly internalType: "address";
271
+ readonly name: "vault";
272
+ readonly type: "address";
273
+ }, {
274
+ readonly internalType: "address";
275
+ readonly name: "vaultDeployer";
276
+ readonly type: "address";
277
+ }, {
278
+ readonly internalType: "uint256";
279
+ readonly name: "shares";
280
+ readonly type: "uint256";
281
+ }, {
282
+ readonly internalType: "address";
283
+ readonly name: "to";
284
+ readonly type: "address";
285
+ }, {
286
+ readonly internalType: "uint256";
287
+ readonly name: "minAmount0";
288
+ readonly type: "uint256";
289
+ }, {
290
+ readonly internalType: "uint256";
291
+ readonly name: "minAmount1";
292
+ readonly type: "uint256";
293
+ }];
294
+ readonly name: "forwardWithdrawFromICHIVault";
295
+ readonly outputs: readonly [{
296
+ readonly internalType: "uint256";
297
+ readonly name: "amount0";
298
+ readonly type: "uint256";
299
+ }, {
300
+ readonly internalType: "uint256";
301
+ readonly name: "amount1";
302
+ readonly type: "uint256";
303
+ }];
304
+ readonly stateMutability: "nonpayable";
305
+ readonly type: "function";
306
+ }, {
307
+ readonly inputs: readonly [];
308
+ readonly name: "owner";
309
+ readonly outputs: readonly [{
310
+ readonly internalType: "address";
311
+ readonly name: "";
312
+ readonly type: "address";
313
+ }];
314
+ readonly stateMutability: "view";
315
+ readonly type: "function";
316
+ }, {
317
+ readonly inputs: readonly [];
318
+ readonly name: "renounceOwnership";
319
+ readonly outputs: readonly [];
320
+ readonly stateMutability: "nonpayable";
321
+ readonly type: "function";
322
+ }, {
323
+ readonly inputs: readonly [{
324
+ readonly internalType: "address";
325
+ readonly name: "newOwner";
326
+ readonly type: "address";
327
+ }];
328
+ readonly name: "transferOwnership";
329
+ readonly outputs: readonly [];
330
+ readonly stateMutability: "nonpayable";
331
+ readonly type: "function";
332
+ }, {
333
+ readonly inputs: readonly [{
334
+ readonly internalType: "address";
335
+ readonly name: "vaultDeployer";
336
+ readonly type: "address";
337
+ }, {
338
+ readonly internalType: "address";
339
+ readonly name: "token0";
340
+ readonly type: "address";
341
+ }, {
342
+ readonly internalType: "address";
343
+ readonly name: "token1";
344
+ readonly type: "address";
345
+ }, {
346
+ readonly internalType: "uint24";
347
+ readonly name: "fee";
348
+ readonly type: "uint24";
349
+ }, {
350
+ readonly internalType: "bool";
351
+ readonly name: "allowToken0";
352
+ readonly type: "bool";
353
+ }, {
354
+ readonly internalType: "bool";
355
+ readonly name: "allowToken1";
356
+ readonly type: "bool";
357
+ }];
358
+ readonly name: "vaultKey";
359
+ readonly outputs: readonly [{
360
+ readonly internalType: "bytes32";
361
+ readonly name: "key";
362
+ readonly type: "bytes32";
363
+ }];
364
+ readonly stateMutability: "view";
365
+ readonly type: "function";
366
+ }, {
367
+ readonly inputs: readonly [{
368
+ readonly internalType: "address";
369
+ readonly name: "vault";
370
+ readonly type: "address";
371
+ }, {
372
+ readonly internalType: "address";
373
+ readonly name: "vaultDeployer";
374
+ readonly type: "address";
375
+ }, {
376
+ readonly internalType: "uint256";
377
+ readonly name: "shares";
378
+ readonly type: "uint256";
379
+ }, {
380
+ readonly internalType: "address";
381
+ readonly name: "to";
382
+ readonly type: "address";
383
+ }, {
384
+ readonly internalType: "uint256";
385
+ readonly name: "minAmount0";
386
+ readonly type: "uint256";
387
+ }, {
388
+ readonly internalType: "uint256";
389
+ readonly name: "minAmount1";
390
+ readonly type: "uint256";
391
+ }];
392
+ readonly name: "withdrawFromICHIVaultAndTryUnwrapToERC20";
393
+ readonly outputs: readonly [{
394
+ readonly internalType: "uint256";
395
+ readonly name: "amount0";
396
+ readonly type: "uint256";
397
+ }, {
398
+ readonly internalType: "uint256";
399
+ readonly name: "amount1";
400
+ readonly type: "uint256";
401
+ }];
402
+ readonly stateMutability: "nonpayable";
403
+ readonly type: "function";
404
+ }, {
405
+ readonly stateMutability: "payable";
406
+ readonly type: "receive";
407
+ }];
408
+ static createInterface(): DepositGuardWithHtsWrappingInterface;
409
+ static connect(address: string, signerOrProvider: Signer | Provider): DepositGuardWithHtsWrapping;
410
+ }
@@ -0,0 +1,168 @@
1
+ import { Signer } from "ethers";
2
+ import type { Provider } from "@ethersproject/providers";
3
+ import type { ERC20Wrapper, ERC20WrapperInterface } from "../ERC20Wrapper";
4
+ export declare class ERC20Wrapper__factory {
5
+ static readonly abi: readonly [{
6
+ readonly type: "error";
7
+ readonly name: "SafeERC20FailedOperation";
8
+ readonly inputs: readonly [{
9
+ readonly type: "address";
10
+ readonly name: "token";
11
+ }];
12
+ }, {
13
+ readonly type: "event";
14
+ readonly anonymous: false;
15
+ readonly name: "Create";
16
+ readonly inputs: readonly [{
17
+ readonly type: "address";
18
+ readonly name: "erc20Token";
19
+ readonly indexed: true;
20
+ }, {
21
+ readonly type: "address";
22
+ readonly name: "htsToken";
23
+ readonly indexed: true;
24
+ }, {
25
+ readonly type: "uint256";
26
+ readonly name: "htsDecimals";
27
+ readonly indexed: false;
28
+ }];
29
+ }, {
30
+ readonly type: "event";
31
+ readonly anonymous: false;
32
+ readonly name: "Unwrap";
33
+ readonly inputs: readonly [{
34
+ readonly type: "address";
35
+ readonly name: "token";
36
+ readonly indexed: true;
37
+ }, {
38
+ readonly type: "address";
39
+ readonly name: "from";
40
+ readonly indexed: true;
41
+ }, {
42
+ readonly type: "address";
43
+ readonly name: "to";
44
+ readonly indexed: true;
45
+ }, {
46
+ readonly type: "uint256";
47
+ readonly name: "amount";
48
+ readonly indexed: false;
49
+ }];
50
+ }, {
51
+ readonly type: "event";
52
+ readonly anonymous: false;
53
+ readonly name: "Wrap";
54
+ readonly inputs: readonly [{
55
+ readonly type: "address";
56
+ readonly name: "token";
57
+ readonly indexed: true;
58
+ }, {
59
+ readonly type: "address";
60
+ readonly name: "from";
61
+ readonly indexed: true;
62
+ }, {
63
+ readonly type: "address";
64
+ readonly name: "to";
65
+ readonly indexed: true;
66
+ }, {
67
+ readonly type: "uint256";
68
+ readonly name: "amount";
69
+ readonly indexed: false;
70
+ }];
71
+ }, {
72
+ readonly type: "function";
73
+ readonly name: "create";
74
+ readonly constant: false;
75
+ readonly stateMutability: "payable";
76
+ readonly payable: true;
77
+ readonly inputs: readonly [{
78
+ readonly type: "address";
79
+ readonly name: "erc20Token";
80
+ }];
81
+ readonly outputs: readonly [{
82
+ readonly type: "address";
83
+ readonly name: "htsToken";
84
+ }, {
85
+ readonly type: "uint256";
86
+ readonly name: "htsDecimals";
87
+ }];
88
+ }, {
89
+ readonly type: "function";
90
+ readonly name: "erc20Counterpart";
91
+ readonly constant: true;
92
+ readonly stateMutability: "view";
93
+ readonly payable: false;
94
+ readonly inputs: readonly [{
95
+ readonly type: "address";
96
+ readonly name: "";
97
+ }];
98
+ readonly outputs: readonly [{
99
+ readonly type: "address";
100
+ readonly name: "";
101
+ }];
102
+ }, {
103
+ readonly type: "function";
104
+ readonly name: "htsCounterpart";
105
+ readonly constant: true;
106
+ readonly stateMutability: "view";
107
+ readonly payable: false;
108
+ readonly inputs: readonly [{
109
+ readonly type: "address";
110
+ readonly name: "";
111
+ }];
112
+ readonly outputs: readonly [{
113
+ readonly type: "address";
114
+ readonly name: "";
115
+ }];
116
+ }, {
117
+ readonly type: "function";
118
+ readonly name: "rates";
119
+ readonly constant: true;
120
+ readonly stateMutability: "view";
121
+ readonly payable: false;
122
+ readonly inputs: readonly [{
123
+ readonly type: "address";
124
+ readonly name: "";
125
+ }];
126
+ readonly outputs: readonly [{
127
+ readonly type: "uint256";
128
+ readonly name: "";
129
+ }];
130
+ }, {
131
+ readonly type: "function";
132
+ readonly name: "unwrap";
133
+ readonly constant: false;
134
+ readonly payable: false;
135
+ readonly inputs: readonly [{
136
+ readonly type: "address";
137
+ readonly name: "erc20Token";
138
+ }, {
139
+ readonly type: "address";
140
+ readonly name: "to";
141
+ }, {
142
+ readonly type: "uint256";
143
+ readonly name: "erc20Amount";
144
+ }];
145
+ readonly outputs: readonly [];
146
+ }, {
147
+ readonly type: "function";
148
+ readonly name: "wrap";
149
+ readonly constant: false;
150
+ readonly payable: false;
151
+ readonly inputs: readonly [{
152
+ readonly type: "address";
153
+ readonly name: "erc20Token";
154
+ }, {
155
+ readonly type: "address";
156
+ readonly name: "to";
157
+ }, {
158
+ readonly type: "uint256";
159
+ readonly name: "erc20Amount";
160
+ }];
161
+ readonly outputs: readonly [];
162
+ }, {
163
+ readonly type: "receive";
164
+ readonly stateMutability: "payable";
165
+ }];
166
+ static createInterface(): ERC20WrapperInterface;
167
+ static connect(address: string, signerOrProvider: Signer | Provider): ERC20Wrapper;
168
+ }
@@ -1,5 +1,7 @@
1
1
  export { DepositGuard__factory } from "./DepositGuard__factory";
2
+ export { DepositGuardWithHtsWrapping__factory } from "./DepositGuardWithHtsWrapping__factory";
2
3
  export { ERC20__factory } from "./ERC20__factory";
4
+ export { ERC20Wrapper__factory } from "./ERC20Wrapper__factory";
3
5
  export { IchiVault__factory } from "./IchiVault__factory";
4
6
  export { AlgebraIntegralPool__factory } from "./AlgebraIntegralPool__factory";
5
7
  export { AlgebraPool__factory } from "./AlgebraPool__factory";
@@ -1,5 +1,7 @@
1
1
  export type { DepositGuard } from "./DepositGuard";
2
+ export type { DepositGuardWithHtsWrapping } from "./DepositGuardWithHtsWrapping";
2
3
  export type { ERC20 } from "./ERC20";
4
+ export type { ERC20Wrapper } from "./ERC20Wrapper";
3
5
  export type { IchiVault } from "./IchiVault";
4
6
  export type { AlgebraIntegralPool } from "./AlgebraIntegralPool";
5
7
  export type { AlgebraPool } from "./AlgebraPool";
@@ -12,7 +14,9 @@ export { AlgebraIntegralPool__factory } from "./factories/AlgebraIntegralPool__f
12
14
  export { AlgebraPool__factory } from "./factories/AlgebraPool__factory";
13
15
  export { ClPool__factory } from "./factories/ClPool__factory";
14
16
  export { DepositGuard__factory } from "./factories/DepositGuard__factory";
17
+ export { DepositGuardWithHtsWrapping__factory } from "./factories/DepositGuardWithHtsWrapping__factory";
15
18
  export { ERC20__factory } from "./factories/ERC20__factory";
19
+ export { ERC20Wrapper__factory } from "./factories/ERC20Wrapper__factory";
16
20
  export { IchiVault__factory } from "./factories/IchiVault__factory";
17
21
  export { Multicall__factory } from "./factories/Multicall__factory";
18
22
  export { MultiFeeDistributer__factory } from "./factories/MultiFeeDistributer__factory";
@@ -1,6 +1,6 @@
1
1
  import { JsonRpcProvider } from '@ethersproject/providers';
2
2
  import { SignerOrProvider } from '../types';
3
- import { ERC20, IchiVault, DepositGuard, UniswapV3Pool, AlgebraPool, AlgebraIntegralPool, ClPool, MultiFeeDistributer } from '../../abis/types';
3
+ import { ERC20, IchiVault, DepositGuard, DepositGuardWithHtsWrapping, ERC20Wrapper, UniswapV3Pool, AlgebraPool, AlgebraIntegralPool, ClPool, MultiFeeDistributer } from '../../abis/types';
4
4
  export declare function getERC20Contract(address: string, signerOrProvider: SignerOrProvider): ERC20;
5
5
  export declare function getDepositGuardContract(address: string, signerOrProvider: SignerOrProvider): DepositGuard;
6
6
  export declare function getIchiVaultContract(address: string, signerOrProvider: SignerOrProvider): IchiVault;
@@ -9,3 +9,5 @@ export declare function getAlgebraPoolContract(address: string, provider: JsonRp
9
9
  export declare function getAlgebraIntegralPoolContract(address: string, provider: JsonRpcProvider): AlgebraIntegralPool;
10
10
  export declare function getClPoolContract(address: string, provider: JsonRpcProvider): ClPool;
11
11
  export declare function getMultiFeeDistributorContract(address: string, signerOrProvider: SignerOrProvider): MultiFeeDistributer;
12
+ export declare function getDepositGuardWithHtsWrappingContract(address: string, signerOrProvider: SignerOrProvider): DepositGuardWithHtsWrapping;
13
+ export declare function getERC20WrapperContract(address: string, signerOrProvider: SignerOrProvider): ERC20Wrapper;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getMultiFeeDistributorContract = exports.getClPoolContract = exports.getAlgebraIntegralPoolContract = exports.getAlgebraPoolContract = exports.getUniswapV3PoolContract = exports.getIchiVaultContract = exports.getDepositGuardContract = exports.getERC20Contract = void 0;
3
+ exports.getERC20WrapperContract = exports.getDepositGuardWithHtsWrappingContract = exports.getMultiFeeDistributorContract = exports.getClPoolContract = exports.getAlgebraIntegralPoolContract = exports.getAlgebraPoolContract = exports.getUniswapV3PoolContract = exports.getIchiVaultContract = exports.getDepositGuardContract = exports.getERC20Contract = void 0;
4
4
  /* eslint-disable camelcase */
5
5
  var address_1 = require("@ethersproject/address");
6
6
  var types_1 = require("../../abis/types");
@@ -69,4 +69,14 @@ function getMultiFeeDistributorContract(address, signerOrProvider) {
69
69
  }
70
70
  }
71
71
  exports.getMultiFeeDistributorContract = getMultiFeeDistributorContract;
72
+ function getDepositGuardWithHtsWrappingContract(address, signerOrProvider) {
73
+ (0, address_1.getAddress)(address);
74
+ return types_1.DepositGuardWithHtsWrapping__factory.connect(address, signerOrProvider);
75
+ }
76
+ exports.getDepositGuardWithHtsWrappingContract = getDepositGuardWithHtsWrappingContract;
77
+ function getERC20WrapperContract(address, signerOrProvider) {
78
+ (0, address_1.getAddress)(address);
79
+ return types_1.ERC20Wrapper__factory.connect(address, signerOrProvider);
80
+ }
81
+ exports.getERC20WrapperContract = getERC20WrapperContract;
72
82
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/contracts/index.ts"],"names":[],"mappings":";;;AAAA,8BAA8B;AAC9B,kDAAoD;AAGpD,0CAiB0B;AAE1B,SAAgB,gBAAgB,CAAC,OAAe,EAAE,gBAAkC;IAClF,IAAA,oBAAU,EAAC,OAAO,CAAC,CAAC;IACpB,OAAO,sBAAY,CAAC,OAAO,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;AACzD,CAAC;AAHD,4CAGC;AAED,SAAgB,uBAAuB,CAAC,OAAe,EAAE,gBAAkC;IACzF,IAAA,oBAAU,EAAC,OAAO,CAAC,CAAC;IACpB,OAAO,6BAAqB,CAAC,OAAO,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;AAClE,CAAC;AAHD,0DAGC;AAED,SAAgB,oBAAoB,CAAC,OAAe,EAAE,gBAAkC;IACtF,IAAA,oBAAU,EAAC,OAAO,CAAC,CAAC;IACpB,OAAO,0BAAkB,CAAC,OAAO,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;AAC/D,CAAC;AAHD,oDAGC;AAED,SAAgB,wBAAwB,CAAC,OAAe,EAAE,QAAyB;IACjF,IAAI;QACF,OAAO,8BAAsB,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;KAC1D;IAAC,OAAO,CAAC,EAAE;QACV,OAAO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chiVault, SupportedChainId, SupportedDex } from '../types';
4
+ export declare function _isVaultTokenApproved(accountAddress: string, shares: string | number | BigNumber, vault: IchiVault, chainId: SupportedChainId, jsonProvider: JsonRpcProvider, dex: SupportedDex): Promise<boolean>;