@pufferfinance/puffer-sdk 1.6.1 → 1.7.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 (87) hide show
  1. package/dist/api/puffer-client.cjs +1 -1
  2. package/dist/api/puffer-client.cjs.map +1 -1
  3. package/dist/api/puffer-client.d.ts +9 -3
  4. package/dist/api/puffer-client.js +65 -51
  5. package/dist/api/puffer-client.js.map +1 -1
  6. package/dist/contracts/abis/mainnet/Accountant.cjs +2 -0
  7. package/dist/contracts/abis/mainnet/Accountant.cjs.map +1 -0
  8. package/dist/contracts/abis/mainnet/Accountant.d.ts +521 -0
  9. package/dist/contracts/abis/mainnet/Accountant.js +494 -0
  10. package/dist/contracts/abis/mainnet/Accountant.js.map +1 -0
  11. package/dist/contracts/abis/mainnet/BoringVault.cjs +2 -0
  12. package/dist/contracts/abis/mainnet/BoringVault.cjs.map +1 -0
  13. package/dist/contracts/abis/mainnet/{PufToken.d.ts → BoringVault.d.ts} +395 -449
  14. package/dist/contracts/abis/mainnet/BoringVault.js +407 -0
  15. package/dist/contracts/abis/mainnet/BoringVault.js.map +1 -0
  16. package/dist/contracts/abis/mainnet/Teller.cjs +2 -0
  17. package/dist/contracts/abis/mainnet/Teller.cjs.map +1 -0
  18. package/dist/contracts/abis/mainnet/Teller.d.ts +541 -0
  19. package/dist/contracts/abis/mainnet/Teller.js +450 -0
  20. package/dist/contracts/abis/mainnet/Teller.js.map +1 -0
  21. package/dist/contracts/abis/nucleus-accountant-abis.cjs +2 -0
  22. package/dist/contracts/abis/nucleus-accountant-abis.cjs.map +1 -0
  23. package/dist/contracts/abis/nucleus-accountant-abis.d.ts +525 -0
  24. package/dist/contracts/abis/nucleus-accountant-abis.js +9 -0
  25. package/dist/contracts/abis/nucleus-accountant-abis.js.map +1 -0
  26. package/dist/contracts/abis/nucleus-boring-vault-abis.cjs +2 -0
  27. package/dist/contracts/abis/nucleus-boring-vault-abis.cjs.map +1 -0
  28. package/dist/contracts/abis/{puf-token-abis.d.ts → nucleus-boring-vault-abis.d.ts} +396 -450
  29. package/dist/contracts/abis/nucleus-boring-vault-abis.js +9 -0
  30. package/dist/contracts/abis/nucleus-boring-vault-abis.js.map +1 -0
  31. package/dist/contracts/abis/nucleus-teller-abis.cjs +2 -0
  32. package/dist/contracts/abis/nucleus-teller-abis.cjs.map +1 -0
  33. package/dist/contracts/abis/nucleus-teller-abis.d.ts +545 -0
  34. package/dist/contracts/abis/nucleus-teller-abis.js +9 -0
  35. package/dist/contracts/abis/nucleus-teller-abis.js.map +1 -0
  36. package/dist/contracts/addresses.cjs +1 -1
  37. package/dist/contracts/addresses.cjs.map +1 -1
  38. package/dist/contracts/addresses.d.ts +6 -0
  39. package/dist/contracts/addresses.js +15 -8
  40. package/dist/contracts/addresses.js.map +1 -1
  41. package/dist/contracts/handlers/erc20-permit-handler.cjs +1 -1
  42. package/dist/contracts/handlers/erc20-permit-handler.cjs.map +1 -1
  43. package/dist/contracts/handlers/erc20-permit-handler.d.ts +2 -2
  44. package/dist/contracts/handlers/erc20-permit-handler.js +4 -4
  45. package/dist/contracts/handlers/erc20-permit-handler.js.map +1 -1
  46. package/dist/contracts/handlers/nucleus-accountant-handler.cjs +2 -0
  47. package/dist/contracts/handlers/nucleus-accountant-handler.cjs.map +1 -0
  48. package/dist/contracts/handlers/nucleus-accountant-handler.d.ts +6702 -0
  49. package/dist/contracts/handlers/nucleus-accountant-handler.js +81 -0
  50. package/dist/contracts/handlers/nucleus-accountant-handler.js.map +1 -0
  51. package/dist/contracts/handlers/nucleus-boring-vault-handler.cjs +2 -0
  52. package/dist/contracts/handlers/nucleus-boring-vault-handler.cjs.map +1 -0
  53. package/dist/contracts/handlers/{puf-token-handler.d.ts → nucleus-boring-vault-handler.d.ts} +463 -517
  54. package/dist/contracts/handlers/nucleus-boring-vault-handler.js +155 -0
  55. package/dist/contracts/handlers/nucleus-boring-vault-handler.js.map +1 -0
  56. package/dist/contracts/handlers/nucleus-teller-handler.cjs +2 -0
  57. package/dist/contracts/handlers/nucleus-teller-handler.cjs.map +1 -0
  58. package/dist/contracts/handlers/nucleus-teller-handler.d.ts +6764 -0
  59. package/dist/contracts/handlers/nucleus-teller-handler.js +145 -0
  60. package/dist/contracts/handlers/nucleus-teller-handler.js.map +1 -0
  61. package/dist/contracts/handlers/puf-locker-handler.cjs.map +1 -1
  62. package/dist/contracts/handlers/puf-locker-handler.d.ts +5 -5
  63. package/dist/contracts/handlers/puf-locker-handler.js.map +1 -1
  64. package/dist/contracts/tokens.cjs +1 -1
  65. package/dist/contracts/tokens.cjs.map +1 -1
  66. package/dist/contracts/tokens.d.ts +3 -24
  67. package/dist/contracts/tokens.js +38 -96
  68. package/dist/contracts/tokens.js.map +1 -1
  69. package/dist/main.cjs +1 -1
  70. package/dist/main.d.ts +0 -1
  71. package/dist/main.js +23 -26
  72. package/dist/main.js.map +1 -1
  73. package/dist/utils/version.cjs +1 -1
  74. package/dist/utils/version.js +1 -1
  75. package/package.json +1 -1
  76. package/dist/contracts/abis/mainnet/PufToken.cjs +0 -2
  77. package/dist/contracts/abis/mainnet/PufToken.cjs.map +0 -1
  78. package/dist/contracts/abis/mainnet/PufToken.js +0 -883
  79. package/dist/contracts/abis/mainnet/PufToken.js.map +0 -1
  80. package/dist/contracts/abis/puf-token-abis.cjs +0 -2
  81. package/dist/contracts/abis/puf-token-abis.cjs.map +0 -1
  82. package/dist/contracts/abis/puf-token-abis.js +0 -10
  83. package/dist/contracts/abis/puf-token-abis.js.map +0 -1
  84. package/dist/contracts/handlers/puf-token-handler.cjs +0 -2
  85. package/dist/contracts/handlers/puf-token-handler.cjs.map +0 -1
  86. package/dist/contracts/handlers/puf-token-handler.js +0 -174
  87. package/dist/contracts/handlers/puf-token-handler.js.map +0 -1
@@ -1,20 +1,26 @@
1
- import { WalletClient, PublicClient, GetContractReturnType, Address } from 'viem';
1
+ import { WalletClient, PublicClient, Address, GetContractReturnType } from 'viem';
2
2
  import { Chain, ViemChain } from '../../chains/constants';
3
- import { PufToken } from '../tokens';
3
+ export type PermitParams = {
4
+ account: Address;
5
+ owner: Address;
6
+ spender: Address;
7
+ value: bigint;
8
+ deadline: bigint;
9
+ v: number;
10
+ r: Address;
11
+ s: Address;
12
+ };
4
13
  /**
5
- * Handler for the `PufToken` contract exposing methods to interact with
6
- * the contract for each of the wrapped PufTokens (like pufWETH,
7
- * pufstETH, pufwstETH etc.).
14
+ * Handler for the `BoringVault` contract for a given token exposing
15
+ * methods to interact with the contract.
8
16
  */
9
- export declare class PufTokenHandler {
17
+ export declare class NucleusBoringVaultHandler {
10
18
  private chain;
11
19
  private walletClient;
12
20
  private publicClient;
13
21
  private viemChain;
14
- private pufToken;
15
22
  /**
16
- * Create the handler for the `PufToken` contract exposing methods to
17
- * interact with the contract.
23
+ * Create the handler for processing UniFi tokens.
18
24
  *
19
25
  * @param chain Chain to use for the client.
20
26
  * @param walletClient The wallet client to use for wallet
@@ -23,13 +29,6 @@ export declare class PufTokenHandler {
23
29
  * interactions.
24
30
  */
25
31
  constructor(chain: Chain, walletClient: WalletClient, publicClient: PublicClient);
26
- /**
27
- * Set the PufToken to use for executing transactions on the contract.
28
- *
29
- * @param pufToken The PufToken to use for the handler.
30
- * @returns The handler.
31
- */
32
- withPufToken(pufToken: PufToken): this;
33
32
  /**
34
33
  * Get the contract. This is a method because the typings are complex
35
34
  * and lost when trying to make it a member.
@@ -37,680 +36,626 @@ export declare class PufTokenHandler {
37
36
  * @returns The viem contract.
38
37
  */
39
38
  getContract(): GetContractReturnType<readonly [{
40
- readonly type: "constructor";
41
39
  readonly inputs: readonly [{
42
- readonly name: "token";
43
- readonly type: "address";
44
40
  readonly internalType: "address";
41
+ readonly name: "_owner";
42
+ readonly type: "address";
45
43
  }, {
46
- readonly name: "tokenName";
47
- readonly type: "string";
48
44
  readonly internalType: "string";
49
- }, {
50
- readonly name: "tokenSymbol";
45
+ readonly name: "_name";
51
46
  readonly type: "string";
47
+ }, {
52
48
  readonly internalType: "string";
49
+ readonly name: "_symbol";
50
+ readonly type: "string";
53
51
  }, {
54
- readonly name: "depositCap";
55
- readonly type: "uint256";
56
- readonly internalType: "uint256";
52
+ readonly internalType: "uint8";
53
+ readonly name: "_decimals";
54
+ readonly type: "uint8";
57
55
  }];
58
56
  readonly stateMutability: "nonpayable";
57
+ readonly type: "constructor";
59
58
  }, {
60
- readonly type: "function";
61
- readonly name: "DOMAIN_SEPARATOR";
62
- readonly inputs: readonly [];
63
- readonly outputs: readonly [{
64
- readonly name: "";
65
- readonly type: "bytes32";
66
- readonly internalType: "bytes32";
67
- }];
68
- readonly stateMutability: "view";
69
- }, {
70
- readonly type: "function";
71
- readonly name: "PUFFER_FACTORY";
72
- readonly inputs: readonly [];
73
- readonly outputs: readonly [{
74
- readonly name: "";
59
+ readonly inputs: readonly [{
60
+ readonly internalType: "address";
61
+ readonly name: "target";
75
62
  readonly type: "address";
76
- readonly internalType: "contract PufferL2Depositor";
77
63
  }];
78
- readonly stateMutability: "view";
64
+ readonly name: "AddressEmptyCode";
65
+ readonly type: "error";
79
66
  }, {
80
- readonly type: "function";
81
- readonly name: "TOKEN";
82
67
  readonly inputs: readonly [];
83
- readonly outputs: readonly [{
84
- readonly name: "";
85
- readonly type: "address";
86
- readonly internalType: "contract ERC20";
87
- }];
88
- readonly stateMutability: "view";
68
+ readonly name: "FailedCall";
69
+ readonly type: "error";
89
70
  }, {
90
- readonly type: "function";
91
- readonly name: "allowance";
92
71
  readonly inputs: readonly [{
93
- readonly name: "owner";
94
- readonly type: "address";
95
- readonly internalType: "address";
96
- }, {
97
- readonly name: "spender";
98
- readonly type: "address";
99
- readonly internalType: "address";
100
- }];
101
- readonly outputs: readonly [{
102
- readonly name: "";
72
+ readonly internalType: "uint256";
73
+ readonly name: "balance";
103
74
  readonly type: "uint256";
75
+ }, {
104
76
  readonly internalType: "uint256";
77
+ readonly name: "needed";
78
+ readonly type: "uint256";
105
79
  }];
106
- readonly stateMutability: "view";
80
+ readonly name: "InsufficientBalance";
81
+ readonly type: "error";
107
82
  }, {
108
- readonly type: "function";
109
- readonly name: "approve";
83
+ readonly anonymous: false;
110
84
  readonly inputs: readonly [{
111
- readonly name: "spender";
85
+ readonly indexed: true;
86
+ readonly internalType: "address";
87
+ readonly name: "owner";
112
88
  readonly type: "address";
89
+ }, {
90
+ readonly indexed: true;
113
91
  readonly internalType: "address";
92
+ readonly name: "spender";
93
+ readonly type: "address";
114
94
  }, {
115
- readonly name: "value";
116
- readonly type: "uint256";
95
+ readonly indexed: false;
117
96
  readonly internalType: "uint256";
97
+ readonly name: "amount";
98
+ readonly type: "uint256";
118
99
  }];
119
- readonly outputs: readonly [{
120
- readonly name: "";
121
- readonly type: "bool";
122
- readonly internalType: "bool";
123
- }];
124
- readonly stateMutability: "nonpayable";
100
+ readonly name: "Approval";
101
+ readonly type: "event";
125
102
  }, {
126
- readonly type: "function";
127
- readonly name: "balanceOf";
103
+ readonly anonymous: false;
128
104
  readonly inputs: readonly [{
129
- readonly name: "account";
130
- readonly type: "address";
105
+ readonly indexed: true;
131
106
  readonly internalType: "address";
107
+ readonly name: "user";
108
+ readonly type: "address";
109
+ }, {
110
+ readonly indexed: true;
111
+ readonly internalType: "contract Authority";
112
+ readonly name: "newAuthority";
113
+ readonly type: "address";
132
114
  }];
133
- readonly outputs: readonly [{
134
- readonly name: "";
135
- readonly type: "uint256";
136
- readonly internalType: "uint256";
137
- }];
138
- readonly stateMutability: "view";
139
- }, {
140
- readonly type: "function";
141
- readonly name: "decimals";
142
- readonly inputs: readonly [];
143
- readonly outputs: readonly [{
144
- readonly name: "";
145
- readonly type: "uint8";
146
- readonly internalType: "uint8";
147
- }];
148
- readonly stateMutability: "view";
115
+ readonly name: "AuthorityUpdated";
116
+ readonly type: "event";
149
117
  }, {
150
- readonly type: "function";
151
- readonly name: "deposit";
118
+ readonly anonymous: false;
152
119
  readonly inputs: readonly [{
120
+ readonly indexed: true;
121
+ readonly internalType: "address";
153
122
  readonly name: "from";
154
123
  readonly type: "address";
155
- readonly internalType: "address";
156
124
  }, {
157
- readonly name: "account";
158
- readonly type: "address";
125
+ readonly indexed: true;
159
126
  readonly internalType: "address";
127
+ readonly name: "asset";
128
+ readonly type: "address";
160
129
  }, {
130
+ readonly indexed: false;
131
+ readonly internalType: "uint256";
161
132
  readonly name: "amount";
162
133
  readonly type: "uint256";
134
+ }, {
135
+ readonly indexed: true;
136
+ readonly internalType: "address";
137
+ readonly name: "to";
138
+ readonly type: "address";
139
+ }, {
140
+ readonly indexed: false;
163
141
  readonly internalType: "uint256";
142
+ readonly name: "shares";
143
+ readonly type: "uint256";
164
144
  }];
165
- readonly outputs: readonly [];
166
- readonly stateMutability: "nonpayable";
145
+ readonly name: "Enter";
146
+ readonly type: "event";
167
147
  }, {
168
- readonly type: "function";
169
- readonly name: "eip712Domain";
170
- readonly inputs: readonly [];
171
- readonly outputs: readonly [{
172
- readonly name: "fields";
173
- readonly type: "bytes1";
174
- readonly internalType: "bytes1";
175
- }, {
176
- readonly name: "name";
177
- readonly type: "string";
178
- readonly internalType: "string";
148
+ readonly anonymous: false;
149
+ readonly inputs: readonly [{
150
+ readonly indexed: true;
151
+ readonly internalType: "address";
152
+ readonly name: "to";
153
+ readonly type: "address";
179
154
  }, {
180
- readonly name: "version";
181
- readonly type: "string";
182
- readonly internalType: "string";
155
+ readonly indexed: true;
156
+ readonly internalType: "address";
157
+ readonly name: "asset";
158
+ readonly type: "address";
183
159
  }, {
184
- readonly name: "chainId";
185
- readonly type: "uint256";
160
+ readonly indexed: false;
186
161
  readonly internalType: "uint256";
162
+ readonly name: "amount";
163
+ readonly type: "uint256";
187
164
  }, {
188
- readonly name: "verifyingContract";
189
- readonly type: "address";
165
+ readonly indexed: true;
190
166
  readonly internalType: "address";
167
+ readonly name: "from";
168
+ readonly type: "address";
191
169
  }, {
192
- readonly name: "salt";
193
- readonly type: "bytes32";
194
- readonly internalType: "bytes32";
195
- }, {
196
- readonly name: "extensions";
197
- readonly type: "uint256[]";
198
- readonly internalType: "uint256[]";
170
+ readonly indexed: false;
171
+ readonly internalType: "uint256";
172
+ readonly name: "shares";
173
+ readonly type: "uint256";
199
174
  }];
200
- readonly stateMutability: "view";
175
+ readonly name: "Exit";
176
+ readonly type: "event";
201
177
  }, {
202
- readonly type: "function";
203
- readonly name: "migrate";
178
+ readonly anonymous: false;
204
179
  readonly inputs: readonly [{
205
- readonly name: "amount";
206
- readonly type: "uint256";
207
- readonly internalType: "uint256";
208
- }, {
209
- readonly name: "migratorContract";
210
- readonly type: "address";
180
+ readonly indexed: true;
211
181
  readonly internalType: "address";
212
- }, {
213
- readonly name: "destination";
182
+ readonly name: "user";
214
183
  readonly type: "address";
184
+ }, {
185
+ readonly indexed: true;
215
186
  readonly internalType: "address";
187
+ readonly name: "newOwner";
188
+ readonly type: "address";
216
189
  }];
217
- readonly outputs: readonly [];
218
- readonly stateMutability: "nonpayable";
190
+ readonly name: "OwnershipTransferred";
191
+ readonly type: "event";
219
192
  }, {
220
- readonly type: "function";
221
- readonly name: "migrateWithSignature";
193
+ readonly anonymous: false;
222
194
  readonly inputs: readonly [{
223
- readonly name: "depositor";
224
- readonly type: "address";
195
+ readonly indexed: true;
225
196
  readonly internalType: "address";
226
- }, {
227
- readonly name: "migratorContract";
197
+ readonly name: "from";
228
198
  readonly type: "address";
229
- readonly internalType: "address";
230
199
  }, {
231
- readonly name: "destination";
232
- readonly type: "address";
200
+ readonly indexed: true;
233
201
  readonly internalType: "address";
202
+ readonly name: "to";
203
+ readonly type: "address";
234
204
  }, {
235
- readonly name: "amount";
236
- readonly type: "uint256";
205
+ readonly indexed: false;
237
206
  readonly internalType: "uint256";
238
- }, {
239
- readonly name: "signatureExpiry";
207
+ readonly name: "amount";
240
208
  readonly type: "uint256";
241
- readonly internalType: "uint256";
242
- }, {
243
- readonly name: "stakerSignature";
244
- readonly type: "bytes";
245
- readonly internalType: "bytes";
246
209
  }];
247
- readonly outputs: readonly [];
248
- readonly stateMutability: "nonpayable";
210
+ readonly name: "Transfer";
211
+ readonly type: "event";
249
212
  }, {
250
- readonly type: "function";
251
- readonly name: "name";
252
213
  readonly inputs: readonly [];
214
+ readonly name: "DOMAIN_SEPARATOR";
253
215
  readonly outputs: readonly [{
216
+ readonly internalType: "bytes32";
254
217
  readonly name: "";
255
- readonly type: "string";
256
- readonly internalType: "string";
218
+ readonly type: "bytes32";
257
219
  }];
258
220
  readonly stateMutability: "view";
259
- }, {
260
221
  readonly type: "function";
261
- readonly name: "nonces";
222
+ }, {
262
223
  readonly inputs: readonly [{
263
- readonly name: "owner";
224
+ readonly internalType: "address";
225
+ readonly name: "";
264
226
  readonly type: "address";
227
+ }, {
265
228
  readonly internalType: "address";
229
+ readonly name: "";
230
+ readonly type: "address";
266
231
  }];
232
+ readonly name: "allowance";
267
233
  readonly outputs: readonly [{
234
+ readonly internalType: "uint256";
268
235
  readonly name: "";
269
236
  readonly type: "uint256";
270
- readonly internalType: "uint256";
271
237
  }];
272
238
  readonly stateMutability: "view";
273
- }, {
274
239
  readonly type: "function";
275
- readonly name: "permit";
240
+ }, {
276
241
  readonly inputs: readonly [{
277
- readonly name: "owner";
278
- readonly type: "address";
279
242
  readonly internalType: "address";
280
- }, {
281
243
  readonly name: "spender";
282
244
  readonly type: "address";
283
- readonly internalType: "address";
284
245
  }, {
285
- readonly name: "value";
286
- readonly type: "uint256";
287
246
  readonly internalType: "uint256";
288
- }, {
289
- readonly name: "deadline";
247
+ readonly name: "amount";
290
248
  readonly type: "uint256";
291
- readonly internalType: "uint256";
292
- }, {
293
- readonly name: "v";
294
- readonly type: "uint8";
295
- readonly internalType: "uint8";
296
- }, {
297
- readonly name: "r";
298
- readonly type: "bytes32";
299
- readonly internalType: "bytes32";
300
- }, {
301
- readonly name: "s";
302
- readonly type: "bytes32";
303
- readonly internalType: "bytes32";
304
249
  }];
305
- readonly outputs: readonly [];
306
- readonly stateMutability: "nonpayable";
307
- }, {
308
- readonly type: "function";
309
- readonly name: "setDepositCap";
310
- readonly inputs: readonly [{
311
- readonly name: "newDepositCap";
312
- readonly type: "uint256";
313
- readonly internalType: "uint256";
250
+ readonly name: "approve";
251
+ readonly outputs: readonly [{
252
+ readonly internalType: "bool";
253
+ readonly name: "";
254
+ readonly type: "bool";
314
255
  }];
315
- readonly outputs: readonly [];
316
256
  readonly stateMutability: "nonpayable";
317
- }, {
318
257
  readonly type: "function";
319
- readonly name: "symbol";
258
+ }, {
320
259
  readonly inputs: readonly [];
260
+ readonly name: "authority";
321
261
  readonly outputs: readonly [{
262
+ readonly internalType: "contract Authority";
322
263
  readonly name: "";
323
- readonly type: "string";
324
- readonly internalType: "string";
264
+ readonly type: "address";
325
265
  }];
326
266
  readonly stateMutability: "view";
327
- }, {
328
267
  readonly type: "function";
329
- readonly name: "totalDepositCap";
330
- readonly inputs: readonly [];
268
+ }, {
269
+ readonly inputs: readonly [{
270
+ readonly internalType: "address";
271
+ readonly name: "";
272
+ readonly type: "address";
273
+ }];
274
+ readonly name: "balanceOf";
331
275
  readonly outputs: readonly [{
276
+ readonly internalType: "uint256";
332
277
  readonly name: "";
333
278
  readonly type: "uint256";
334
- readonly internalType: "uint256";
335
279
  }];
336
280
  readonly stateMutability: "view";
337
- }, {
338
281
  readonly type: "function";
339
- readonly name: "totalSupply";
282
+ }, {
340
283
  readonly inputs: readonly [];
284
+ readonly name: "decimals";
341
285
  readonly outputs: readonly [{
286
+ readonly internalType: "uint8";
342
287
  readonly name: "";
343
- readonly type: "uint256";
344
- readonly internalType: "uint256";
288
+ readonly type: "uint8";
345
289
  }];
346
290
  readonly stateMutability: "view";
347
- }, {
348
291
  readonly type: "function";
349
- readonly name: "transfer";
350
- readonly inputs: readonly [{
351
- readonly name: "to";
352
- readonly type: "address";
353
- readonly internalType: "address";
354
- }, {
355
- readonly name: "value";
356
- readonly type: "uint256";
357
- readonly internalType: "uint256";
358
- }];
359
- readonly outputs: readonly [{
360
- readonly name: "";
361
- readonly type: "bool";
362
- readonly internalType: "bool";
363
- }];
364
- readonly stateMutability: "nonpayable";
365
292
  }, {
366
- readonly type: "function";
367
- readonly name: "transferFrom";
368
293
  readonly inputs: readonly [{
294
+ readonly internalType: "address";
369
295
  readonly name: "from";
370
296
  readonly type: "address";
371
- readonly internalType: "address";
372
297
  }, {
373
- readonly name: "to";
298
+ readonly internalType: "contract ERC20";
299
+ readonly name: "asset";
374
300
  readonly type: "address";
375
- readonly internalType: "address";
376
301
  }, {
377
- readonly name: "value";
378
- readonly type: "uint256";
379
302
  readonly internalType: "uint256";
380
- }];
381
- readonly outputs: readonly [{
382
- readonly name: "";
383
- readonly type: "bool";
384
- readonly internalType: "bool";
385
- }];
386
- readonly stateMutability: "nonpayable";
387
- }, {
388
- readonly type: "function";
389
- readonly name: "withdraw";
390
- readonly inputs: readonly [{
391
- readonly name: "recipient";
392
- readonly type: "address";
303
+ readonly name: "assetAmount";
304
+ readonly type: "uint256";
305
+ }, {
393
306
  readonly internalType: "address";
307
+ readonly name: "to";
308
+ readonly type: "address";
394
309
  }, {
395
- readonly name: "amount";
396
- readonly type: "uint256";
397
310
  readonly internalType: "uint256";
311
+ readonly name: "shareAmount";
312
+ readonly type: "uint256";
398
313
  }];
314
+ readonly name: "enter";
399
315
  readonly outputs: readonly [];
400
316
  readonly stateMutability: "nonpayable";
317
+ readonly type: "function";
401
318
  }, {
402
- readonly type: "event";
403
- readonly name: "Approval";
404
319
  readonly inputs: readonly [{
405
- readonly name: "owner";
406
- readonly type: "address";
407
- readonly indexed: true;
408
320
  readonly internalType: "address";
321
+ readonly name: "to";
322
+ readonly type: "address";
409
323
  }, {
410
- readonly name: "spender";
324
+ readonly internalType: "contract ERC20";
325
+ readonly name: "asset";
411
326
  readonly type: "address";
412
- readonly indexed: true;
413
- readonly internalType: "address";
414
327
  }, {
415
- readonly name: "value";
416
- readonly type: "uint256";
417
- readonly indexed: false;
418
328
  readonly internalType: "uint256";
419
- }];
420
- readonly anonymous: false;
421
- }, {
422
- readonly type: "event";
423
- readonly name: "DepositCapChanged";
424
- readonly inputs: readonly [{
425
- readonly name: "oldDepositCap";
329
+ readonly name: "assetAmount";
426
330
  readonly type: "uint256";
427
- readonly indexed: false;
428
- readonly internalType: "uint256";
429
331
  }, {
430
- readonly name: "newDepositCap";
431
- readonly type: "uint256";
432
- readonly indexed: false;
433
- readonly internalType: "uint256";
434
- }];
435
- readonly anonymous: false;
436
- }, {
437
- readonly type: "event";
438
- readonly name: "Deposited";
439
- readonly inputs: readonly [{
440
- readonly name: "from";
441
- readonly type: "address";
442
- readonly indexed: true;
443
332
  readonly internalType: "address";
444
- }, {
445
- readonly name: "to";
333
+ readonly name: "from";
446
334
  readonly type: "address";
447
- readonly indexed: true;
448
- readonly internalType: "address";
449
335
  }, {
450
- readonly name: "amount";
451
- readonly type: "uint256";
452
- readonly indexed: false;
453
336
  readonly internalType: "uint256";
337
+ readonly name: "shareAmount";
338
+ readonly type: "uint256";
454
339
  }];
455
- readonly anonymous: false;
340
+ readonly name: "exit";
341
+ readonly outputs: readonly [];
342
+ readonly stateMutability: "nonpayable";
343
+ readonly type: "function";
456
344
  }, {
457
- readonly type: "event";
458
- readonly name: "EIP712DomainChanged";
459
345
  readonly inputs: readonly [];
460
- readonly anonymous: false;
461
- }, {
462
- readonly type: "event";
463
- readonly name: "Migrated";
464
- readonly inputs: readonly [{
465
- readonly name: "depositor";
466
- readonly type: "address";
467
- readonly indexed: true;
468
- readonly internalType: "address";
469
- }, {
470
- readonly name: "destination";
471
- readonly type: "address";
472
- readonly indexed: true;
473
- readonly internalType: "address";
474
- }, {
475
- readonly name: "migratorContract";
346
+ readonly name: "hook";
347
+ readonly outputs: readonly [{
348
+ readonly internalType: "contract BeforeTransferHook";
349
+ readonly name: "";
476
350
  readonly type: "address";
477
- readonly indexed: true;
478
- readonly internalType: "address";
479
- }, {
480
- readonly name: "amount";
481
- readonly type: "uint256";
482
- readonly indexed: false;
483
- readonly internalType: "uint256";
484
351
  }];
485
- readonly anonymous: false;
352
+ readonly stateMutability: "view";
353
+ readonly type: "function";
486
354
  }, {
487
- readonly type: "event";
488
- readonly name: "Transfer";
489
355
  readonly inputs: readonly [{
490
- readonly name: "from";
491
- readonly type: "address";
492
- readonly indexed: true;
493
- readonly internalType: "address";
356
+ readonly internalType: "address[]";
357
+ readonly name: "targets";
358
+ readonly type: "address[]";
494
359
  }, {
495
- readonly name: "to";
496
- readonly type: "address";
497
- readonly indexed: true;
498
- readonly internalType: "address";
360
+ readonly internalType: "bytes[]";
361
+ readonly name: "data";
362
+ readonly type: "bytes[]";
499
363
  }, {
500
- readonly name: "value";
501
- readonly type: "uint256";
502
- readonly indexed: false;
503
- readonly internalType: "uint256";
364
+ readonly internalType: "uint256[]";
365
+ readonly name: "values";
366
+ readonly type: "uint256[]";
504
367
  }];
505
- readonly anonymous: false;
368
+ readonly name: "manage";
369
+ readonly outputs: readonly [{
370
+ readonly internalType: "bytes[]";
371
+ readonly name: "results";
372
+ readonly type: "bytes[]";
373
+ }];
374
+ readonly stateMutability: "nonpayable";
375
+ readonly type: "function";
506
376
  }, {
507
- readonly type: "event";
508
- readonly name: "Withdrawn";
509
377
  readonly inputs: readonly [{
510
- readonly name: "from";
511
- readonly type: "address";
512
- readonly indexed: true;
513
378
  readonly internalType: "address";
514
- }, {
515
- readonly name: "to";
379
+ readonly name: "target";
516
380
  readonly type: "address";
517
- readonly indexed: true;
518
- readonly internalType: "address";
519
381
  }, {
520
- readonly name: "amount";
521
- readonly type: "uint256";
522
- readonly indexed: false;
382
+ readonly internalType: "bytes";
383
+ readonly name: "data";
384
+ readonly type: "bytes";
385
+ }, {
523
386
  readonly internalType: "uint256";
387
+ readonly name: "value";
388
+ readonly type: "uint256";
524
389
  }];
525
- readonly anonymous: false;
526
- }, {
527
- readonly type: "error";
528
- readonly name: "AddressEmptyCode";
529
- readonly inputs: readonly [{
530
- readonly name: "target";
531
- readonly type: "address";
532
- readonly internalType: "address";
533
- }];
534
- }, {
535
- readonly type: "error";
536
- readonly name: "AddressInsufficientBalance";
537
- readonly inputs: readonly [{
538
- readonly name: "account";
539
- readonly type: "address";
540
- readonly internalType: "address";
390
+ readonly name: "manage";
391
+ readonly outputs: readonly [{
392
+ readonly internalType: "bytes";
393
+ readonly name: "result";
394
+ readonly type: "bytes";
541
395
  }];
396
+ readonly stateMutability: "nonpayable";
397
+ readonly type: "function";
542
398
  }, {
543
- readonly type: "error";
544
- readonly name: "ECDSAInvalidSignature";
545
399
  readonly inputs: readonly [];
546
- }, {
547
- readonly type: "error";
548
- readonly name: "ECDSAInvalidSignatureLength";
549
- readonly inputs: readonly [{
550
- readonly name: "length";
551
- readonly type: "uint256";
552
- readonly internalType: "uint256";
400
+ readonly name: "name";
401
+ readonly outputs: readonly [{
402
+ readonly internalType: "string";
403
+ readonly name: "";
404
+ readonly type: "string";
553
405
  }];
406
+ readonly stateMutability: "view";
407
+ readonly type: "function";
554
408
  }, {
555
- readonly type: "error";
556
- readonly name: "ECDSAInvalidSignatureS";
557
409
  readonly inputs: readonly [{
558
- readonly name: "s";
559
- readonly type: "bytes32";
560
- readonly internalType: "bytes32";
410
+ readonly internalType: "address";
411
+ readonly name: "";
412
+ readonly type: "address";
561
413
  }];
414
+ readonly name: "nonces";
415
+ readonly outputs: readonly [{
416
+ readonly internalType: "uint256";
417
+ readonly name: "";
418
+ readonly type: "uint256";
419
+ }];
420
+ readonly stateMutability: "view";
421
+ readonly type: "function";
562
422
  }, {
563
- readonly type: "error";
564
- readonly name: "ERC20InsufficientAllowance";
565
423
  readonly inputs: readonly [{
566
- readonly name: "spender";
424
+ readonly internalType: "address";
425
+ readonly name: "";
567
426
  readonly type: "address";
427
+ }, {
568
428
  readonly internalType: "address";
429
+ readonly name: "";
430
+ readonly type: "address";
569
431
  }, {
570
- readonly name: "allowance";
571
- readonly type: "uint256";
572
- readonly internalType: "uint256";
432
+ readonly internalType: "uint256[]";
433
+ readonly name: "";
434
+ readonly type: "uint256[]";
573
435
  }, {
574
- readonly name: "needed";
575
- readonly type: "uint256";
576
- readonly internalType: "uint256";
436
+ readonly internalType: "uint256[]";
437
+ readonly name: "";
438
+ readonly type: "uint256[]";
439
+ }, {
440
+ readonly internalType: "bytes";
441
+ readonly name: "";
442
+ readonly type: "bytes";
443
+ }];
444
+ readonly name: "onERC1155BatchReceived";
445
+ readonly outputs: readonly [{
446
+ readonly internalType: "bytes4";
447
+ readonly name: "";
448
+ readonly type: "bytes4";
577
449
  }];
450
+ readonly stateMutability: "nonpayable";
451
+ readonly type: "function";
578
452
  }, {
579
- readonly type: "error";
580
- readonly name: "ERC20InsufficientBalance";
581
453
  readonly inputs: readonly [{
582
- readonly name: "sender";
454
+ readonly internalType: "address";
455
+ readonly name: "";
583
456
  readonly type: "address";
457
+ }, {
584
458
  readonly internalType: "address";
459
+ readonly name: "";
460
+ readonly type: "address";
585
461
  }, {
586
- readonly name: "balance";
587
- readonly type: "uint256";
588
462
  readonly internalType: "uint256";
589
- }, {
590
- readonly name: "needed";
463
+ readonly name: "";
591
464
  readonly type: "uint256";
465
+ }, {
592
466
  readonly internalType: "uint256";
467
+ readonly name: "";
468
+ readonly type: "uint256";
469
+ }, {
470
+ readonly internalType: "bytes";
471
+ readonly name: "";
472
+ readonly type: "bytes";
473
+ }];
474
+ readonly name: "onERC1155Received";
475
+ readonly outputs: readonly [{
476
+ readonly internalType: "bytes4";
477
+ readonly name: "";
478
+ readonly type: "bytes4";
593
479
  }];
480
+ readonly stateMutability: "nonpayable";
481
+ readonly type: "function";
594
482
  }, {
595
- readonly type: "error";
596
- readonly name: "ERC20InvalidApprover";
597
483
  readonly inputs: readonly [{
598
- readonly name: "approver";
484
+ readonly internalType: "address";
485
+ readonly name: "";
599
486
  readonly type: "address";
487
+ }, {
600
488
  readonly internalType: "address";
489
+ readonly name: "";
490
+ readonly type: "address";
491
+ }, {
492
+ readonly internalType: "uint256";
493
+ readonly name: "";
494
+ readonly type: "uint256";
495
+ }, {
496
+ readonly internalType: "bytes";
497
+ readonly name: "";
498
+ readonly type: "bytes";
601
499
  }];
500
+ readonly name: "onERC721Received";
501
+ readonly outputs: readonly [{
502
+ readonly internalType: "bytes4";
503
+ readonly name: "";
504
+ readonly type: "bytes4";
505
+ }];
506
+ readonly stateMutability: "nonpayable";
507
+ readonly type: "function";
602
508
  }, {
603
- readonly type: "error";
604
- readonly name: "ERC20InvalidReceiver";
605
- readonly inputs: readonly [{
606
- readonly name: "receiver";
607
- readonly type: "address";
509
+ readonly inputs: readonly [];
510
+ readonly name: "owner";
511
+ readonly outputs: readonly [{
608
512
  readonly internalType: "address";
513
+ readonly name: "";
514
+ readonly type: "address";
609
515
  }];
516
+ readonly stateMutability: "view";
517
+ readonly type: "function";
610
518
  }, {
611
- readonly type: "error";
612
- readonly name: "ERC20InvalidSender";
613
519
  readonly inputs: readonly [{
614
- readonly name: "sender";
520
+ readonly internalType: "address";
521
+ readonly name: "owner";
615
522
  readonly type: "address";
523
+ }, {
616
524
  readonly internalType: "address";
617
- }];
618
- }, {
619
- readonly type: "error";
620
- readonly name: "ERC20InvalidSpender";
621
- readonly inputs: readonly [{
622
525
  readonly name: "spender";
623
526
  readonly type: "address";
624
- readonly internalType: "address";
625
- }];
626
- }, {
627
- readonly type: "error";
628
- readonly name: "ERC2612ExpiredSignature";
629
- readonly inputs: readonly [{
630
- readonly name: "deadline";
527
+ }, {
528
+ readonly internalType: "uint256";
529
+ readonly name: "value";
631
530
  readonly type: "uint256";
531
+ }, {
632
532
  readonly internalType: "uint256";
533
+ readonly name: "deadline";
534
+ readonly type: "uint256";
535
+ }, {
536
+ readonly internalType: "uint8";
537
+ readonly name: "v";
538
+ readonly type: "uint8";
539
+ }, {
540
+ readonly internalType: "bytes32";
541
+ readonly name: "r";
542
+ readonly type: "bytes32";
543
+ }, {
544
+ readonly internalType: "bytes32";
545
+ readonly name: "s";
546
+ readonly type: "bytes32";
633
547
  }];
548
+ readonly name: "permit";
549
+ readonly outputs: readonly [];
550
+ readonly stateMutability: "nonpayable";
551
+ readonly type: "function";
634
552
  }, {
635
- readonly type: "error";
636
- readonly name: "ERC2612InvalidSigner";
637
553
  readonly inputs: readonly [{
638
- readonly name: "signer";
554
+ readonly internalType: "contract Authority";
555
+ readonly name: "newAuthority";
639
556
  readonly type: "address";
557
+ }];
558
+ readonly name: "setAuthority";
559
+ readonly outputs: readonly [];
560
+ readonly stateMutability: "nonpayable";
561
+ readonly type: "function";
562
+ }, {
563
+ readonly inputs: readonly [{
640
564
  readonly internalType: "address";
641
- }, {
642
- readonly name: "owner";
565
+ readonly name: "_hook";
643
566
  readonly type: "address";
644
- readonly internalType: "address";
645
567
  }];
568
+ readonly name: "setBeforeTransferHook";
569
+ readonly outputs: readonly [];
570
+ readonly stateMutability: "nonpayable";
571
+ readonly type: "function";
646
572
  }, {
647
- readonly type: "error";
648
- readonly name: "ExpiredSignature";
649
- readonly inputs: readonly [];
573
+ readonly inputs: readonly [{
574
+ readonly internalType: "bytes4";
575
+ readonly name: "interfaceId";
576
+ readonly type: "bytes4";
577
+ }];
578
+ readonly name: "supportsInterface";
579
+ readonly outputs: readonly [{
580
+ readonly internalType: "bool";
581
+ readonly name: "";
582
+ readonly type: "bool";
583
+ }];
584
+ readonly stateMutability: "view";
585
+ readonly type: "function";
650
586
  }, {
651
- readonly type: "error";
652
- readonly name: "FailedInnerCall";
653
587
  readonly inputs: readonly [];
588
+ readonly name: "symbol";
589
+ readonly outputs: readonly [{
590
+ readonly internalType: "string";
591
+ readonly name: "";
592
+ readonly type: "string";
593
+ }];
594
+ readonly stateMutability: "view";
595
+ readonly type: "function";
654
596
  }, {
655
- readonly type: "error";
656
- readonly name: "InvalidAccount";
657
597
  readonly inputs: readonly [];
598
+ readonly name: "totalSupply";
599
+ readonly outputs: readonly [{
600
+ readonly internalType: "uint256";
601
+ readonly name: "";
602
+ readonly type: "uint256";
603
+ }];
604
+ readonly stateMutability: "view";
605
+ readonly type: "function";
658
606
  }, {
659
- readonly type: "error";
660
- readonly name: "InvalidAccountNonce";
661
607
  readonly inputs: readonly [{
662
- readonly name: "account";
663
- readonly type: "address";
664
608
  readonly internalType: "address";
609
+ readonly name: "to";
610
+ readonly type: "address";
665
611
  }, {
666
- readonly name: "currentNonce";
667
- readonly type: "uint256";
668
612
  readonly internalType: "uint256";
613
+ readonly name: "amount";
614
+ readonly type: "uint256";
669
615
  }];
670
- }, {
671
- readonly type: "error";
672
- readonly name: "InvalidAmount";
673
- readonly inputs: readonly [];
674
- }, {
675
- readonly type: "error";
676
- readonly name: "InvalidShortString";
677
- readonly inputs: readonly [];
678
- }, {
679
- readonly type: "error";
680
- readonly name: "InvalidSignature";
681
- readonly inputs: readonly [];
682
- }, {
683
- readonly type: "error";
684
- readonly name: "MigratorContractNotAllowed";
685
- readonly inputs: readonly [{
686
- readonly name: "migrator";
687
- readonly type: "address";
688
- readonly internalType: "address";
616
+ readonly name: "transfer";
617
+ readonly outputs: readonly [{
618
+ readonly internalType: "bool";
619
+ readonly name: "";
620
+ readonly type: "bool";
689
621
  }];
622
+ readonly stateMutability: "nonpayable";
623
+ readonly type: "function";
690
624
  }, {
691
- readonly type: "error";
692
- readonly name: "SafeERC20FailedOperation";
693
625
  readonly inputs: readonly [{
694
- readonly name: "token";
626
+ readonly internalType: "address";
627
+ readonly name: "from";
695
628
  readonly type: "address";
629
+ }, {
696
630
  readonly internalType: "address";
631
+ readonly name: "to";
632
+ readonly type: "address";
633
+ }, {
634
+ readonly internalType: "uint256";
635
+ readonly name: "amount";
636
+ readonly type: "uint256";
637
+ }];
638
+ readonly name: "transferFrom";
639
+ readonly outputs: readonly [{
640
+ readonly internalType: "bool";
641
+ readonly name: "";
642
+ readonly type: "bool";
697
643
  }];
644
+ readonly stateMutability: "nonpayable";
645
+ readonly type: "function";
698
646
  }, {
699
- readonly type: "error";
700
- readonly name: "StringTooLong";
701
647
  readonly inputs: readonly [{
702
- readonly name: "str";
703
- readonly type: "string";
704
- readonly internalType: "string";
648
+ readonly internalType: "address";
649
+ readonly name: "newOwner";
650
+ readonly type: "address";
705
651
  }];
652
+ readonly name: "transferOwnership";
653
+ readonly outputs: readonly [];
654
+ readonly stateMutability: "nonpayable";
655
+ readonly type: "function";
706
656
  }, {
707
- readonly type: "error";
708
- readonly name: "TotalDepositCapReached";
709
- readonly inputs: readonly [];
710
- }, {
711
- readonly type: "error";
712
- readonly name: "Unauthorized";
713
- readonly inputs: readonly [];
657
+ readonly stateMutability: "payable";
658
+ readonly type: "receive";
714
659
  }], {
715
660
  public: {
716
661
  account: undefined;
@@ -6828,93 +6773,94 @@ export declare class PufTokenHandler {
6828
6773
  };
6829
6774
  }, Address>;
6830
6775
  /**
6831
- * Check the wrapped token (PufToken) balance of the wallet.
6776
+ * Get the allowance for the given owner and spender.
6832
6777
  *
6833
- * @param walletAddress Wallet address to check the balance of.
6834
- * @returns The wrapped token's (PufToken) balance in wei.
6778
+ * @param owner Address of the owner.
6779
+ * @param spender Address of the spender.
6780
+ * @returns Allowance for the given owner and spender.
6835
6781
  */
6836
- balanceOf(walletAddress: Address): Promise<bigint>;
6782
+ getAllowance(owner: Address, spender: Address): Promise<bigint>;
6837
6783
  /**
6838
- * Get the allowance for the spender to spend the owner's tokens.
6784
+ * Get the total supply of the token.
6839
6785
  *
6840
- * @param ownerAddress Address of the owner.
6841
- * @param spenderAddress Address of the spender.
6842
- * @returns Allowance that can be used by the spender.
6786
+ * @returns Total supply of the token.
6843
6787
  */
6844
- getAllowance(ownerAddress: Address, spenderAddress: Address): Promise<bigint>;
6788
+ getTotalSupply(): Promise<bigint>;
6845
6789
  /**
6846
- * Get the total cap of the PufToken that can be deposited.
6790
+ * Check the token balance of the wallet.
6847
6791
  *
6848
- * @returns Total cap of the PufToken that can be deposited.
6792
+ * @param walletAddress Wallet address to check the balance of.
6793
+ * @returns Token balance in wei.
6849
6794
  */
6850
- getTotalDepositCap(): Promise<bigint>;
6795
+ balanceOf(walletAddress: Address): Promise<bigint>;
6851
6796
  /**
6852
- * Get the total supply of the PufToken.
6797
+ * Get the total supply of the token.
6853
6798
  *
6854
- * @returns Total supply of the PufToken.
6799
+ * @returns Total supply of the token.
6855
6800
  */
6856
- getTotalSupply(): Promise<bigint>;
6801
+ totalSupply(): Promise<bigint>;
6802
+ /**
6803
+ * Approve transaction for the spender to spend the owner's tokens.
6804
+ *
6805
+ * @param walletAddress Address of the caller of the transaction.
6806
+ * @param spenderAddress Address of the spender.
6807
+ * @param value Value to approve for the spender.
6808
+ * @returns Hash of the transaction.
6809
+ */
6810
+ approve(walletAddress: Address, spenderAddress: Address, value: bigint): Promise<`0x${string}`>;
6857
6811
  /**
6858
- * Withdraws the PufToken and returns the underlying token to the
6859
- * given wallet. This doesn't make the transaction but returns two
6860
- * methods namely `transact` and `estimate`.
6812
+ * Transfer tokens from the owner's wallet to the given address.
6861
6813
  *
6862
- * @param walletAddress Wallet address to withdraw the PufToken from.
6863
- * @param value Value of the withdrawal.
6814
+ * @param walletAddress Address of the owner's wallet.
6815
+ * @param toAddress Address to transfer the tokens to.
6816
+ * @param value Value to transfer.
6864
6817
  * @returns `transact: () => Promise<Address>` - Used to make the
6865
- * transaction.
6818
+ * transaction with the given value.
6866
6819
  *
6867
6820
  * `estimate: () => Promise<bigint>` - Gas estimate of the
6868
6821
  * transaction.
6869
6822
  */
6870
- withdraw(walletAddress: Address, value: bigint): {
6823
+ transfer(walletAddress: Address, toAddress: Address, value: bigint): {
6871
6824
  transact: () => Promise<`0x${string}`>;
6872
6825
  estimate: () => Promise<bigint>;
6873
6826
  };
6874
6827
  /**
6875
- * Deposits the underlying token in exchange for the wrapped PufToken.
6876
- * This doesn't make the transaction but returns two methods namely
6877
- * `transact` and `estimate`.
6828
+ * Transfer tokens from the given address to another address.
6878
6829
  *
6879
- * @param depositorAddress Depositor of the underlying token.
6880
- * @param walletAddress Wallet address of the recipient of the
6881
- * deposit.
6882
- * @param value Value of the deposit.
6883
- * @returns `transact: () => Promise<Address>` - Used to make the
6884
- * transaction.
6830
+ * @param walletAddress Address of the caller of the transaction.
6831
+ * @param fromAddress Address to transfer the tokens from.
6832
+ * @param toAddress Address to transfer the tokens to.
6833
+ * @param value Value to transfer.
6834
+ * @returns `transact: () => Promise<Address>` - Used to
6835
+ * make the transaction with the given value.
6885
6836
  *
6886
6837
  * `estimate: () => Promise<bigint>` - Gas estimate of the
6887
6838
  * transaction.
6888
6839
  */
6889
- deposit(depositorAddress: Address, walletAddress: Address, value: bigint): {
6840
+ transferFrom(walletAddress: Address, fromAddress: Address, toAddress: Address, value: bigint): {
6890
6841
  transact: () => Promise<`0x${string}`>;
6891
6842
  estimate: () => Promise<bigint>;
6892
6843
  };
6893
6844
  /**
6894
- * Migrate tokens using an allowed `migratorContract` to the given
6895
- * wallet address. This doesn't make the transaction but returns two
6896
- * methods namely `transact` and `estimate`.
6845
+ * Get permit to be able to use the token.
6897
6846
  *
6898
- * @param walletAddress Address to migrate the tokens to.
6899
- * @param migratorContract Address of the migrator contract.
6900
- * @param value Value of the tokens to migrate.
6847
+ * @param params Permit parameters.
6848
+ * @param params.account Address of the caller of the transaction.
6849
+ * @param params.owner Address of the owner.
6850
+ * @param params.spender Address of the spender.
6851
+ * @param params.value Value to approve for the spender.
6852
+ * @param params.deadline Deadline for the permit.
6853
+ * @param params.v v value of the permit.
6854
+ * @param params.r r value of the permit.
6855
+ * @param params.s s value of the permit.
6901
6856
  * @returns `transact: () => Promise<Address>` - Used to make the
6902
- * transaction.
6857
+ * transaction with the given value.
6903
6858
  *
6904
6859
  * `estimate: () => Promise<bigint>` - Gas estimate of the
6905
6860
  * transaction.
6906
6861
  */
6907
- migrate(walletAddress: Address, migratorContract: Address, value: bigint): {
6862
+ permit(params: PermitParams): {
6908
6863
  transact: () => Promise<`0x${string}`>;
6909
6864
  estimate: () => Promise<bigint>;
6910
6865
  };
6911
- /**
6912
- * Approve transaction for the spender to spend the owner's tokens.
6913
- *
6914
- * @param ownerAddress Address of the caller of the transaction.
6915
- * @param spenderAddress Address of the spender.
6916
- * @param value Value to approve for the spender.
6917
- * @returns Hash of the transaction.
6918
- */
6919
- approve(ownerAddress: Address, spenderAddress: Address, value: bigint): Promise<`0x${string}`>;
6920
6866
  }