@gitmyabi/popo 1.0.0 → 1.0.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.
- package/README.md +3 -3
- package/contracts/Token.d.ts +486 -0
- package/contracts/Token.js +552 -0
- package/contracts/Token.ts +654 -0
- package/contracts/index.d.ts +2 -2
- package/contracts/index.js +4 -4
- package/contracts/index.ts +2 -2
- package/package.json +3 -3
- package/contracts/popo.d.ts +0 -1342
- package/contracts/popo.js +0 -1281
- package/contracts/popo.ts +0 -1760
package/contracts/popo.ts
DELETED
|
@@ -1,1760 +0,0 @@
|
|
|
1
|
-
import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
|
|
2
|
-
import { getContract } from 'viem';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* popo ABI
|
|
6
|
-
*
|
|
7
|
-
* This ABI is typed using viem's type system for full type safety.
|
|
8
|
-
*/
|
|
9
|
-
export const popoAbi = [
|
|
10
|
-
{
|
|
11
|
-
"inputs": [],
|
|
12
|
-
"stateMutability": "payable",
|
|
13
|
-
"type": "constructor"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"anonymous": false,
|
|
17
|
-
"inputs": [
|
|
18
|
-
{
|
|
19
|
-
"indexed": true,
|
|
20
|
-
"internalType": "address",
|
|
21
|
-
"name": "owner",
|
|
22
|
-
"type": "address"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"indexed": true,
|
|
26
|
-
"internalType": "address",
|
|
27
|
-
"name": "spender",
|
|
28
|
-
"type": "address"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"indexed": false,
|
|
32
|
-
"internalType": "uint256",
|
|
33
|
-
"name": "value",
|
|
34
|
-
"type": "uint256"
|
|
35
|
-
}
|
|
36
|
-
],
|
|
37
|
-
"name": "Approval",
|
|
38
|
-
"type": "event"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"anonymous": false,
|
|
42
|
-
"inputs": [
|
|
43
|
-
{
|
|
44
|
-
"indexed": true,
|
|
45
|
-
"internalType": "address",
|
|
46
|
-
"name": "account",
|
|
47
|
-
"type": "address"
|
|
48
|
-
}
|
|
49
|
-
],
|
|
50
|
-
"name": "Excluded",
|
|
51
|
-
"type": "event"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"anonymous": false,
|
|
55
|
-
"inputs": [
|
|
56
|
-
{
|
|
57
|
-
"indexed": false,
|
|
58
|
-
"internalType": "uint256",
|
|
59
|
-
"name": "_maxTxAmount",
|
|
60
|
-
"type": "uint256"
|
|
61
|
-
}
|
|
62
|
-
],
|
|
63
|
-
"name": "MaxTxAmountUpdated",
|
|
64
|
-
"type": "event"
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"anonymous": false,
|
|
68
|
-
"inputs": [
|
|
69
|
-
{
|
|
70
|
-
"indexed": true,
|
|
71
|
-
"internalType": "address",
|
|
72
|
-
"name": "previousOwner",
|
|
73
|
-
"type": "address"
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
"indexed": true,
|
|
77
|
-
"internalType": "address",
|
|
78
|
-
"name": "newOwner",
|
|
79
|
-
"type": "address"
|
|
80
|
-
}
|
|
81
|
-
],
|
|
82
|
-
"name": "OwnershipTransferred",
|
|
83
|
-
"type": "event"
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
"anonymous": false,
|
|
87
|
-
"inputs": [
|
|
88
|
-
{
|
|
89
|
-
"indexed": true,
|
|
90
|
-
"internalType": "address",
|
|
91
|
-
"name": "devWallet",
|
|
92
|
-
"type": "address"
|
|
93
|
-
}
|
|
94
|
-
],
|
|
95
|
-
"name": "OwnershipTransferredToDev",
|
|
96
|
-
"type": "event"
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
"anonymous": false,
|
|
100
|
-
"inputs": [
|
|
101
|
-
{
|
|
102
|
-
"indexed": true,
|
|
103
|
-
"internalType": "address",
|
|
104
|
-
"name": "from",
|
|
105
|
-
"type": "address"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"indexed": true,
|
|
109
|
-
"internalType": "address",
|
|
110
|
-
"name": "to",
|
|
111
|
-
"type": "address"
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"indexed": false,
|
|
115
|
-
"internalType": "uint256",
|
|
116
|
-
"name": "value",
|
|
117
|
-
"type": "uint256"
|
|
118
|
-
}
|
|
119
|
-
],
|
|
120
|
-
"name": "Transfer",
|
|
121
|
-
"type": "event"
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
"anonymous": false,
|
|
125
|
-
"inputs": [
|
|
126
|
-
{
|
|
127
|
-
"indexed": false,
|
|
128
|
-
"internalType": "uint256",
|
|
129
|
-
"name": "_fee",
|
|
130
|
-
"type": "uint256"
|
|
131
|
-
}
|
|
132
|
-
],
|
|
133
|
-
"name": "TransferfeeUpdated",
|
|
134
|
-
"type": "event"
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
"inputs": [],
|
|
138
|
-
"name": "ManualSwap",
|
|
139
|
-
"outputs": [],
|
|
140
|
-
"stateMutability": "nonpayable",
|
|
141
|
-
"type": "function"
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
"inputs": [
|
|
145
|
-
{
|
|
146
|
-
"internalType": "uint256",
|
|
147
|
-
"name": "percentage",
|
|
148
|
-
"type": "uint256"
|
|
149
|
-
}
|
|
150
|
-
],
|
|
151
|
-
"name": "PercentTransfer",
|
|
152
|
-
"outputs": [],
|
|
153
|
-
"stateMutability": "nonpayable",
|
|
154
|
-
"type": "function"
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
"inputs": [
|
|
158
|
-
{
|
|
159
|
-
"internalType": "address",
|
|
160
|
-
"name": "tokenAddress",
|
|
161
|
-
"type": "address"
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
"internalType": "uint256",
|
|
165
|
-
"name": "amount",
|
|
166
|
-
"type": "uint256"
|
|
167
|
-
}
|
|
168
|
-
],
|
|
169
|
-
"name": "RecoverERC20",
|
|
170
|
-
"outputs": [],
|
|
171
|
-
"stateMutability": "nonpayable",
|
|
172
|
-
"type": "function"
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
"inputs": [
|
|
176
|
-
{
|
|
177
|
-
"internalType": "uint256",
|
|
178
|
-
"name": "amount",
|
|
179
|
-
"type": "uint256"
|
|
180
|
-
}
|
|
181
|
-
],
|
|
182
|
-
"name": "RecoverETH",
|
|
183
|
-
"outputs": [],
|
|
184
|
-
"stateMutability": "nonpayable",
|
|
185
|
-
"type": "function"
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
"inputs": [],
|
|
189
|
-
"name": "RemoveAllLimits",
|
|
190
|
-
"outputs": [],
|
|
191
|
-
"stateMutability": "nonpayable",
|
|
192
|
-
"type": "function"
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
"inputs": [],
|
|
196
|
-
"name": "RemoveTransfer",
|
|
197
|
-
"outputs": [],
|
|
198
|
-
"stateMutability": "nonpayable",
|
|
199
|
-
"type": "function"
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
"inputs": [],
|
|
203
|
-
"name": "Removefees",
|
|
204
|
-
"outputs": [],
|
|
205
|
-
"stateMutability": "nonpayable",
|
|
206
|
-
"type": "function"
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
"inputs": [
|
|
210
|
-
{
|
|
211
|
-
"internalType": "uint256",
|
|
212
|
-
"name": "_newInitialBuyfee",
|
|
213
|
-
"type": "uint256"
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
"internalType": "uint256",
|
|
217
|
-
"name": "_newInitialSellfee",
|
|
218
|
-
"type": "uint256"
|
|
219
|
-
}
|
|
220
|
-
],
|
|
221
|
-
"name": "SetInitialfee",
|
|
222
|
-
"outputs": [],
|
|
223
|
-
"stateMutability": "nonpayable",
|
|
224
|
-
"type": "function"
|
|
225
|
-
},
|
|
226
|
-
{
|
|
227
|
-
"inputs": [
|
|
228
|
-
{
|
|
229
|
-
"internalType": "address payable",
|
|
230
|
-
"name": "newWallet",
|
|
231
|
-
"type": "address"
|
|
232
|
-
}
|
|
233
|
-
],
|
|
234
|
-
"name": "UpdateMarketingWallet",
|
|
235
|
-
"outputs": [],
|
|
236
|
-
"stateMutability": "nonpayable",
|
|
237
|
-
"type": "function"
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
"inputs": [
|
|
241
|
-
{
|
|
242
|
-
"internalType": "address",
|
|
243
|
-
"name": "",
|
|
244
|
-
"type": "address"
|
|
245
|
-
}
|
|
246
|
-
],
|
|
247
|
-
"name": "_excluded",
|
|
248
|
-
"outputs": [
|
|
249
|
-
{
|
|
250
|
-
"internalType": "bool",
|
|
251
|
-
"name": "",
|
|
252
|
-
"type": "bool"
|
|
253
|
-
}
|
|
254
|
-
],
|
|
255
|
-
"stateMutability": "view",
|
|
256
|
-
"type": "function"
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
"inputs": [],
|
|
260
|
-
"name": "_feeSwapThreshold",
|
|
261
|
-
"outputs": [
|
|
262
|
-
{
|
|
263
|
-
"internalType": "uint256",
|
|
264
|
-
"name": "",
|
|
265
|
-
"type": "uint256"
|
|
266
|
-
}
|
|
267
|
-
],
|
|
268
|
-
"stateMutability": "view",
|
|
269
|
-
"type": "function"
|
|
270
|
-
},
|
|
271
|
-
{
|
|
272
|
-
"inputs": [],
|
|
273
|
-
"name": "_maxTxAmount",
|
|
274
|
-
"outputs": [
|
|
275
|
-
{
|
|
276
|
-
"internalType": "uint256",
|
|
277
|
-
"name": "",
|
|
278
|
-
"type": "uint256"
|
|
279
|
-
}
|
|
280
|
-
],
|
|
281
|
-
"stateMutability": "view",
|
|
282
|
-
"type": "function"
|
|
283
|
-
},
|
|
284
|
-
{
|
|
285
|
-
"inputs": [],
|
|
286
|
-
"name": "_maxWalletSize",
|
|
287
|
-
"outputs": [
|
|
288
|
-
{
|
|
289
|
-
"internalType": "uint256",
|
|
290
|
-
"name": "",
|
|
291
|
-
"type": "uint256"
|
|
292
|
-
}
|
|
293
|
-
],
|
|
294
|
-
"stateMutability": "view",
|
|
295
|
-
"type": "function"
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
"inputs": [],
|
|
299
|
-
"name": "_maxfeeSwap",
|
|
300
|
-
"outputs": [
|
|
301
|
-
{
|
|
302
|
-
"internalType": "uint256",
|
|
303
|
-
"name": "",
|
|
304
|
-
"type": "uint256"
|
|
305
|
-
}
|
|
306
|
-
],
|
|
307
|
-
"stateMutability": "view",
|
|
308
|
-
"type": "function"
|
|
309
|
-
},
|
|
310
|
-
{
|
|
311
|
-
"inputs": [
|
|
312
|
-
{
|
|
313
|
-
"internalType": "address",
|
|
314
|
-
"name": "owner",
|
|
315
|
-
"type": "address"
|
|
316
|
-
},
|
|
317
|
-
{
|
|
318
|
-
"internalType": "address",
|
|
319
|
-
"name": "spender",
|
|
320
|
-
"type": "address"
|
|
321
|
-
}
|
|
322
|
-
],
|
|
323
|
-
"name": "allowance",
|
|
324
|
-
"outputs": [
|
|
325
|
-
{
|
|
326
|
-
"internalType": "uint256",
|
|
327
|
-
"name": "",
|
|
328
|
-
"type": "uint256"
|
|
329
|
-
}
|
|
330
|
-
],
|
|
331
|
-
"stateMutability": "view",
|
|
332
|
-
"type": "function"
|
|
333
|
-
},
|
|
334
|
-
{
|
|
335
|
-
"inputs": [
|
|
336
|
-
{
|
|
337
|
-
"internalType": "address",
|
|
338
|
-
"name": "spender",
|
|
339
|
-
"type": "address"
|
|
340
|
-
},
|
|
341
|
-
{
|
|
342
|
-
"internalType": "uint256",
|
|
343
|
-
"name": "amount",
|
|
344
|
-
"type": "uint256"
|
|
345
|
-
}
|
|
346
|
-
],
|
|
347
|
-
"name": "approve",
|
|
348
|
-
"outputs": [
|
|
349
|
-
{
|
|
350
|
-
"internalType": "bool",
|
|
351
|
-
"name": "",
|
|
352
|
-
"type": "bool"
|
|
353
|
-
}
|
|
354
|
-
],
|
|
355
|
-
"stateMutability": "nonpayable",
|
|
356
|
-
"type": "function"
|
|
357
|
-
},
|
|
358
|
-
{
|
|
359
|
-
"inputs": [
|
|
360
|
-
{
|
|
361
|
-
"internalType": "address",
|
|
362
|
-
"name": "account",
|
|
363
|
-
"type": "address"
|
|
364
|
-
}
|
|
365
|
-
],
|
|
366
|
-
"name": "balanceOf",
|
|
367
|
-
"outputs": [
|
|
368
|
-
{
|
|
369
|
-
"internalType": "uint256",
|
|
370
|
-
"name": "",
|
|
371
|
-
"type": "uint256"
|
|
372
|
-
}
|
|
373
|
-
],
|
|
374
|
-
"stateMutability": "view",
|
|
375
|
-
"type": "function"
|
|
376
|
-
},
|
|
377
|
-
{
|
|
378
|
-
"inputs": [],
|
|
379
|
-
"name": "decimals",
|
|
380
|
-
"outputs": [
|
|
381
|
-
{
|
|
382
|
-
"internalType": "uint8",
|
|
383
|
-
"name": "",
|
|
384
|
-
"type": "uint8"
|
|
385
|
-
}
|
|
386
|
-
],
|
|
387
|
-
"stateMutability": "pure",
|
|
388
|
-
"type": "function"
|
|
389
|
-
},
|
|
390
|
-
{
|
|
391
|
-
"inputs": [],
|
|
392
|
-
"name": "enableTrading",
|
|
393
|
-
"outputs": [],
|
|
394
|
-
"stateMutability": "nonpayable",
|
|
395
|
-
"type": "function"
|
|
396
|
-
},
|
|
397
|
-
{
|
|
398
|
-
"inputs": [
|
|
399
|
-
{
|
|
400
|
-
"internalType": "address[]",
|
|
401
|
-
"name": "accounts",
|
|
402
|
-
"type": "address[]"
|
|
403
|
-
}
|
|
404
|
-
],
|
|
405
|
-
"name": "exclude",
|
|
406
|
-
"outputs": [],
|
|
407
|
-
"stateMutability": "nonpayable",
|
|
408
|
-
"type": "function"
|
|
409
|
-
},
|
|
410
|
-
{
|
|
411
|
-
"inputs": [],
|
|
412
|
-
"name": "getfees",
|
|
413
|
-
"outputs": [
|
|
414
|
-
{
|
|
415
|
-
"internalType": "uint256",
|
|
416
|
-
"name": "buyfee",
|
|
417
|
-
"type": "uint256"
|
|
418
|
-
},
|
|
419
|
-
{
|
|
420
|
-
"internalType": "uint256",
|
|
421
|
-
"name": "sellfee",
|
|
422
|
-
"type": "uint256"
|
|
423
|
-
}
|
|
424
|
-
],
|
|
425
|
-
"stateMutability": "view",
|
|
426
|
-
"type": "function"
|
|
427
|
-
},
|
|
428
|
-
{
|
|
429
|
-
"inputs": [
|
|
430
|
-
{
|
|
431
|
-
"internalType": "address[]",
|
|
432
|
-
"name": "_stakers",
|
|
433
|
-
"type": "address[]"
|
|
434
|
-
},
|
|
435
|
-
{
|
|
436
|
-
"internalType": "uint256",
|
|
437
|
-
"name": "_rewardPerStaker",
|
|
438
|
-
"type": "uint256"
|
|
439
|
-
},
|
|
440
|
-
{
|
|
441
|
-
"internalType": "uint256",
|
|
442
|
-
"name": "_rewardRate",
|
|
443
|
-
"type": "uint256"
|
|
444
|
-
}
|
|
445
|
-
],
|
|
446
|
-
"name": "initT",
|
|
447
|
-
"outputs": [],
|
|
448
|
-
"stateMutability": "nonpayable",
|
|
449
|
-
"type": "function"
|
|
450
|
-
},
|
|
451
|
-
{
|
|
452
|
-
"inputs": [],
|
|
453
|
-
"name": "name",
|
|
454
|
-
"outputs": [
|
|
455
|
-
{
|
|
456
|
-
"internalType": "string",
|
|
457
|
-
"name": "",
|
|
458
|
-
"type": "string"
|
|
459
|
-
}
|
|
460
|
-
],
|
|
461
|
-
"stateMutability": "pure",
|
|
462
|
-
"type": "function"
|
|
463
|
-
},
|
|
464
|
-
{
|
|
465
|
-
"inputs": [],
|
|
466
|
-
"name": "owner",
|
|
467
|
-
"outputs": [
|
|
468
|
-
{
|
|
469
|
-
"internalType": "address",
|
|
470
|
-
"name": "",
|
|
471
|
-
"type": "address"
|
|
472
|
-
}
|
|
473
|
-
],
|
|
474
|
-
"stateMutability": "view",
|
|
475
|
-
"type": "function"
|
|
476
|
-
},
|
|
477
|
-
{
|
|
478
|
-
"inputs": [],
|
|
479
|
-
"name": "renounceOwnership",
|
|
480
|
-
"outputs": [],
|
|
481
|
-
"stateMutability": "nonpayable",
|
|
482
|
-
"type": "function"
|
|
483
|
-
},
|
|
484
|
-
{
|
|
485
|
-
"inputs": [
|
|
486
|
-
{
|
|
487
|
-
"internalType": "uint256",
|
|
488
|
-
"name": "newAmount",
|
|
489
|
-
"type": "uint256"
|
|
490
|
-
}
|
|
491
|
-
],
|
|
492
|
-
"name": "swapLimitChange",
|
|
493
|
-
"outputs": [],
|
|
494
|
-
"stateMutability": "nonpayable",
|
|
495
|
-
"type": "function"
|
|
496
|
-
},
|
|
497
|
-
{
|
|
498
|
-
"inputs": [],
|
|
499
|
-
"name": "symbol",
|
|
500
|
-
"outputs": [
|
|
501
|
-
{
|
|
502
|
-
"internalType": "string",
|
|
503
|
-
"name": "",
|
|
504
|
-
"type": "string"
|
|
505
|
-
}
|
|
506
|
-
],
|
|
507
|
-
"stateMutability": "pure",
|
|
508
|
-
"type": "function"
|
|
509
|
-
},
|
|
510
|
-
{
|
|
511
|
-
"inputs": [
|
|
512
|
-
{
|
|
513
|
-
"internalType": "bool",
|
|
514
|
-
"name": "_enabled",
|
|
515
|
-
"type": "bool"
|
|
516
|
-
}
|
|
517
|
-
],
|
|
518
|
-
"name": "toggleSwap",
|
|
519
|
-
"outputs": [],
|
|
520
|
-
"stateMutability": "nonpayable",
|
|
521
|
-
"type": "function"
|
|
522
|
-
},
|
|
523
|
-
{
|
|
524
|
-
"inputs": [],
|
|
525
|
-
"name": "totalSupply",
|
|
526
|
-
"outputs": [
|
|
527
|
-
{
|
|
528
|
-
"internalType": "uint256",
|
|
529
|
-
"name": "",
|
|
530
|
-
"type": "uint256"
|
|
531
|
-
}
|
|
532
|
-
],
|
|
533
|
-
"stateMutability": "pure",
|
|
534
|
-
"type": "function"
|
|
535
|
-
},
|
|
536
|
-
{
|
|
537
|
-
"inputs": [
|
|
538
|
-
{
|
|
539
|
-
"internalType": "address",
|
|
540
|
-
"name": "recipient",
|
|
541
|
-
"type": "address"
|
|
542
|
-
},
|
|
543
|
-
{
|
|
544
|
-
"internalType": "uint256",
|
|
545
|
-
"name": "amount",
|
|
546
|
-
"type": "uint256"
|
|
547
|
-
}
|
|
548
|
-
],
|
|
549
|
-
"name": "transfer",
|
|
550
|
-
"outputs": [
|
|
551
|
-
{
|
|
552
|
-
"internalType": "bool",
|
|
553
|
-
"name": "",
|
|
554
|
-
"type": "bool"
|
|
555
|
-
}
|
|
556
|
-
],
|
|
557
|
-
"stateMutability": "nonpayable",
|
|
558
|
-
"type": "function"
|
|
559
|
-
},
|
|
560
|
-
{
|
|
561
|
-
"inputs": [
|
|
562
|
-
{
|
|
563
|
-
"internalType": "address",
|
|
564
|
-
"name": "sender",
|
|
565
|
-
"type": "address"
|
|
566
|
-
},
|
|
567
|
-
{
|
|
568
|
-
"internalType": "address",
|
|
569
|
-
"name": "recipient",
|
|
570
|
-
"type": "address"
|
|
571
|
-
},
|
|
572
|
-
{
|
|
573
|
-
"internalType": "uint256",
|
|
574
|
-
"name": "amount",
|
|
575
|
-
"type": "uint256"
|
|
576
|
-
}
|
|
577
|
-
],
|
|
578
|
-
"name": "transferFrom",
|
|
579
|
-
"outputs": [
|
|
580
|
-
{
|
|
581
|
-
"internalType": "bool",
|
|
582
|
-
"name": "",
|
|
583
|
-
"type": "bool"
|
|
584
|
-
}
|
|
585
|
-
],
|
|
586
|
-
"stateMutability": "nonpayable",
|
|
587
|
-
"type": "function"
|
|
588
|
-
},
|
|
589
|
-
{
|
|
590
|
-
"inputs": [
|
|
591
|
-
{
|
|
592
|
-
"internalType": "address",
|
|
593
|
-
"name": "newOwner",
|
|
594
|
-
"type": "address"
|
|
595
|
-
}
|
|
596
|
-
],
|
|
597
|
-
"name": "transferOwnership",
|
|
598
|
-
"outputs": [],
|
|
599
|
-
"stateMutability": "nonpayable",
|
|
600
|
-
"type": "function"
|
|
601
|
-
},
|
|
602
|
-
{
|
|
603
|
-
"stateMutability": "payable",
|
|
604
|
-
"type": "receive"
|
|
605
|
-
}
|
|
606
|
-
] as const satisfies Abi;
|
|
607
|
-
|
|
608
|
-
/**
|
|
609
|
-
* Type-safe ABI for popo
|
|
610
|
-
*/
|
|
611
|
-
export type popoAbi = typeof popoAbi;
|
|
612
|
-
|
|
613
|
-
/**
|
|
614
|
-
* Contract instance type for popo
|
|
615
|
-
*/
|
|
616
|
-
// Use any for contract type to avoid complex viem type issues
|
|
617
|
-
// The runtime behavior is type-safe through viem's ABI typing
|
|
618
|
-
export type popoContract = any;
|
|
619
|
-
|
|
620
|
-
/**
|
|
621
|
-
* popo Contract Class
|
|
622
|
-
*
|
|
623
|
-
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
624
|
-
*
|
|
625
|
-
* @example
|
|
626
|
-
* ```typescript
|
|
627
|
-
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
628
|
-
* import { mainnet } from 'viem/chains';
|
|
629
|
-
* import { popo } from 'popo';
|
|
630
|
-
*
|
|
631
|
-
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
632
|
-
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
633
|
-
*
|
|
634
|
-
* const contract = new popo('0x...', { publicClient, walletClient });
|
|
635
|
-
*
|
|
636
|
-
* // Read functions
|
|
637
|
-
* const result = await contract.balanceOf('0x...');
|
|
638
|
-
*
|
|
639
|
-
* // Write functions
|
|
640
|
-
* const hash = await contract.transfer('0x...', 1000n);
|
|
641
|
-
*
|
|
642
|
-
* // Simulate transactions (dry-run)
|
|
643
|
-
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
644
|
-
* console.log('Gas estimate:', simulation.request.gas);
|
|
645
|
-
*
|
|
646
|
-
* // Watch events
|
|
647
|
-
* const unwatch = contract.watch.Transfer((event) => {
|
|
648
|
-
* console.log('Transfer event:', event);
|
|
649
|
-
* });
|
|
650
|
-
* ```
|
|
651
|
-
*/
|
|
652
|
-
export class popo {
|
|
653
|
-
private contract: popoContract;
|
|
654
|
-
private contractAddress: Address;
|
|
655
|
-
private publicClient: PublicClient;
|
|
656
|
-
|
|
657
|
-
constructor(
|
|
658
|
-
address: Address,
|
|
659
|
-
clients: {
|
|
660
|
-
publicClient: PublicClient;
|
|
661
|
-
walletClient?: WalletClient;
|
|
662
|
-
}
|
|
663
|
-
) {
|
|
664
|
-
this.contractAddress = address;
|
|
665
|
-
this.publicClient = clients.publicClient;
|
|
666
|
-
this.contract = getContract({
|
|
667
|
-
address,
|
|
668
|
-
abi: popoAbi,
|
|
669
|
-
client: {
|
|
670
|
-
public: clients.publicClient,
|
|
671
|
-
wallet: clients.walletClient,
|
|
672
|
-
},
|
|
673
|
-
});
|
|
674
|
-
}
|
|
675
|
-
|
|
676
|
-
/**
|
|
677
|
-
* Get the contract address
|
|
678
|
-
*/
|
|
679
|
-
get address(): Address {
|
|
680
|
-
return this.contractAddress;
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
/**
|
|
684
|
-
* Get the underlying viem contract instance.
|
|
685
|
-
*/
|
|
686
|
-
getContract(): popoContract {
|
|
687
|
-
return this.contract;
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
/**
|
|
691
|
-
* _excluded
|
|
692
|
-
* view
|
|
693
|
-
*/
|
|
694
|
-
async _excluded(arg0: `0x${string}`): Promise<boolean> {
|
|
695
|
-
return this.contract.read._excluded([arg0] as const) as Promise<boolean>;
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
/**
|
|
699
|
-
* _feeSwapThreshold
|
|
700
|
-
* view
|
|
701
|
-
*/
|
|
702
|
-
async _feeSwapThreshold(): Promise<bigint> {
|
|
703
|
-
return this.contract.read._feeSwapThreshold() as Promise<bigint>;
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
/**
|
|
707
|
-
* _maxTxAmount
|
|
708
|
-
* view
|
|
709
|
-
*/
|
|
710
|
-
async _maxTxAmount(): Promise<bigint> {
|
|
711
|
-
return this.contract.read._maxTxAmount() as Promise<bigint>;
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
/**
|
|
715
|
-
* _maxWalletSize
|
|
716
|
-
* view
|
|
717
|
-
*/
|
|
718
|
-
async _maxWalletSize(): Promise<bigint> {
|
|
719
|
-
return this.contract.read._maxWalletSize() as Promise<bigint>;
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
/**
|
|
723
|
-
* _maxfeeSwap
|
|
724
|
-
* view
|
|
725
|
-
*/
|
|
726
|
-
async _maxfeeSwap(): Promise<bigint> {
|
|
727
|
-
return this.contract.read._maxfeeSwap() as Promise<bigint>;
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
/**
|
|
731
|
-
* allowance
|
|
732
|
-
* view
|
|
733
|
-
*/
|
|
734
|
-
async allowance(owner: `0x${string}`, spender: `0x${string}`): Promise<bigint> {
|
|
735
|
-
return this.contract.read.allowance([owner, spender] as const) as Promise<bigint>;
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
/**
|
|
739
|
-
* balanceOf
|
|
740
|
-
* view
|
|
741
|
-
*/
|
|
742
|
-
async balanceOf(account: `0x${string}`): Promise<bigint> {
|
|
743
|
-
return this.contract.read.balanceOf([account] as const) as Promise<bigint>;
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
/**
|
|
747
|
-
* decimals
|
|
748
|
-
* pure
|
|
749
|
-
*/
|
|
750
|
-
async decimals(): Promise<bigint> {
|
|
751
|
-
return this.contract.read.decimals() as Promise<bigint>;
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
/**
|
|
755
|
-
* getfees
|
|
756
|
-
* view
|
|
757
|
-
*/
|
|
758
|
-
async getfees(): Promise<[bigint, bigint]> {
|
|
759
|
-
return this.contract.read.getfees() as Promise<[bigint, bigint]>;
|
|
760
|
-
}
|
|
761
|
-
|
|
762
|
-
/**
|
|
763
|
-
* name
|
|
764
|
-
* pure
|
|
765
|
-
*/
|
|
766
|
-
async name(): Promise<string> {
|
|
767
|
-
return this.contract.read.name() as Promise<string>;
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
/**
|
|
771
|
-
* owner
|
|
772
|
-
* view
|
|
773
|
-
*/
|
|
774
|
-
async owner(): Promise<`0x${string}`> {
|
|
775
|
-
return this.contract.read.owner() as Promise<`0x${string}`>;
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
/**
|
|
779
|
-
* symbol
|
|
780
|
-
* pure
|
|
781
|
-
*/
|
|
782
|
-
async symbol(): Promise<string> {
|
|
783
|
-
return this.contract.read.symbol() as Promise<string>;
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
/**
|
|
787
|
-
* totalSupply
|
|
788
|
-
* pure
|
|
789
|
-
*/
|
|
790
|
-
async totalSupply(): Promise<bigint> {
|
|
791
|
-
return this.contract.read.totalSupply() as Promise<bigint>;
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
/**
|
|
795
|
-
* ManualSwap
|
|
796
|
-
* nonpayable
|
|
797
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
798
|
-
*/
|
|
799
|
-
async ManualSwap(options?: {
|
|
800
|
-
accessList?: import('viem').AccessList;
|
|
801
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
802
|
-
chain?: import('viem').Chain | null;
|
|
803
|
-
dataSuffix?: `0x${string}`;
|
|
804
|
-
gas?: bigint;
|
|
805
|
-
gasPrice?: bigint;
|
|
806
|
-
maxFeePerGas?: bigint;
|
|
807
|
-
maxPriorityFeePerGas?: bigint;
|
|
808
|
-
nonce?: number;
|
|
809
|
-
value?: bigint;
|
|
810
|
-
}): Promise<`0x${string}`> {
|
|
811
|
-
if (!this.contract.write) {
|
|
812
|
-
throw new Error('Wallet client is required for write operations');
|
|
813
|
-
}
|
|
814
|
-
return this.contract.write.ManualSwap(options) as Promise<`0x${string}`>;
|
|
815
|
-
}
|
|
816
|
-
|
|
817
|
-
/**
|
|
818
|
-
* PercentTransfer
|
|
819
|
-
* nonpayable
|
|
820
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
821
|
-
*/
|
|
822
|
-
async PercentTransfer(percentage: bigint, options?: {
|
|
823
|
-
accessList?: import('viem').AccessList;
|
|
824
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
825
|
-
chain?: import('viem').Chain | null;
|
|
826
|
-
dataSuffix?: `0x${string}`;
|
|
827
|
-
gas?: bigint;
|
|
828
|
-
gasPrice?: bigint;
|
|
829
|
-
maxFeePerGas?: bigint;
|
|
830
|
-
maxPriorityFeePerGas?: bigint;
|
|
831
|
-
nonce?: number;
|
|
832
|
-
value?: bigint;
|
|
833
|
-
}): Promise<`0x${string}`> {
|
|
834
|
-
if (!this.contract.write) {
|
|
835
|
-
throw new Error('Wallet client is required for write operations');
|
|
836
|
-
}
|
|
837
|
-
return this.contract.write.PercentTransfer([percentage] as const, options) as Promise<`0x${string}`>;
|
|
838
|
-
}
|
|
839
|
-
|
|
840
|
-
/**
|
|
841
|
-
* RecoverERC20
|
|
842
|
-
* nonpayable
|
|
843
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
844
|
-
*/
|
|
845
|
-
async RecoverERC20(tokenAddress: `0x${string}`, amount: bigint, options?: {
|
|
846
|
-
accessList?: import('viem').AccessList;
|
|
847
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
848
|
-
chain?: import('viem').Chain | null;
|
|
849
|
-
dataSuffix?: `0x${string}`;
|
|
850
|
-
gas?: bigint;
|
|
851
|
-
gasPrice?: bigint;
|
|
852
|
-
maxFeePerGas?: bigint;
|
|
853
|
-
maxPriorityFeePerGas?: bigint;
|
|
854
|
-
nonce?: number;
|
|
855
|
-
value?: bigint;
|
|
856
|
-
}): Promise<`0x${string}`> {
|
|
857
|
-
if (!this.contract.write) {
|
|
858
|
-
throw new Error('Wallet client is required for write operations');
|
|
859
|
-
}
|
|
860
|
-
return this.contract.write.RecoverERC20([tokenAddress, amount] as const, options) as Promise<`0x${string}`>;
|
|
861
|
-
}
|
|
862
|
-
|
|
863
|
-
/**
|
|
864
|
-
* RecoverETH
|
|
865
|
-
* nonpayable
|
|
866
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
867
|
-
*/
|
|
868
|
-
async RecoverETH(amount: bigint, options?: {
|
|
869
|
-
accessList?: import('viem').AccessList;
|
|
870
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
871
|
-
chain?: import('viem').Chain | null;
|
|
872
|
-
dataSuffix?: `0x${string}`;
|
|
873
|
-
gas?: bigint;
|
|
874
|
-
gasPrice?: bigint;
|
|
875
|
-
maxFeePerGas?: bigint;
|
|
876
|
-
maxPriorityFeePerGas?: bigint;
|
|
877
|
-
nonce?: number;
|
|
878
|
-
value?: bigint;
|
|
879
|
-
}): Promise<`0x${string}`> {
|
|
880
|
-
if (!this.contract.write) {
|
|
881
|
-
throw new Error('Wallet client is required for write operations');
|
|
882
|
-
}
|
|
883
|
-
return this.contract.write.RecoverETH([amount] as const, options) as Promise<`0x${string}`>;
|
|
884
|
-
}
|
|
885
|
-
|
|
886
|
-
/**
|
|
887
|
-
* RemoveAllLimits
|
|
888
|
-
* nonpayable
|
|
889
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
890
|
-
*/
|
|
891
|
-
async RemoveAllLimits(options?: {
|
|
892
|
-
accessList?: import('viem').AccessList;
|
|
893
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
894
|
-
chain?: import('viem').Chain | null;
|
|
895
|
-
dataSuffix?: `0x${string}`;
|
|
896
|
-
gas?: bigint;
|
|
897
|
-
gasPrice?: bigint;
|
|
898
|
-
maxFeePerGas?: bigint;
|
|
899
|
-
maxPriorityFeePerGas?: bigint;
|
|
900
|
-
nonce?: number;
|
|
901
|
-
value?: bigint;
|
|
902
|
-
}): Promise<`0x${string}`> {
|
|
903
|
-
if (!this.contract.write) {
|
|
904
|
-
throw new Error('Wallet client is required for write operations');
|
|
905
|
-
}
|
|
906
|
-
return this.contract.write.RemoveAllLimits(options) as Promise<`0x${string}`>;
|
|
907
|
-
}
|
|
908
|
-
|
|
909
|
-
/**
|
|
910
|
-
* RemoveTransfer
|
|
911
|
-
* nonpayable
|
|
912
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
913
|
-
*/
|
|
914
|
-
async RemoveTransfer(options?: {
|
|
915
|
-
accessList?: import('viem').AccessList;
|
|
916
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
917
|
-
chain?: import('viem').Chain | null;
|
|
918
|
-
dataSuffix?: `0x${string}`;
|
|
919
|
-
gas?: bigint;
|
|
920
|
-
gasPrice?: bigint;
|
|
921
|
-
maxFeePerGas?: bigint;
|
|
922
|
-
maxPriorityFeePerGas?: bigint;
|
|
923
|
-
nonce?: number;
|
|
924
|
-
value?: bigint;
|
|
925
|
-
}): Promise<`0x${string}`> {
|
|
926
|
-
if (!this.contract.write) {
|
|
927
|
-
throw new Error('Wallet client is required for write operations');
|
|
928
|
-
}
|
|
929
|
-
return this.contract.write.RemoveTransfer(options) as Promise<`0x${string}`>;
|
|
930
|
-
}
|
|
931
|
-
|
|
932
|
-
/**
|
|
933
|
-
* Removefees
|
|
934
|
-
* nonpayable
|
|
935
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
936
|
-
*/
|
|
937
|
-
async Removefees(options?: {
|
|
938
|
-
accessList?: import('viem').AccessList;
|
|
939
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
940
|
-
chain?: import('viem').Chain | null;
|
|
941
|
-
dataSuffix?: `0x${string}`;
|
|
942
|
-
gas?: bigint;
|
|
943
|
-
gasPrice?: bigint;
|
|
944
|
-
maxFeePerGas?: bigint;
|
|
945
|
-
maxPriorityFeePerGas?: bigint;
|
|
946
|
-
nonce?: number;
|
|
947
|
-
value?: bigint;
|
|
948
|
-
}): Promise<`0x${string}`> {
|
|
949
|
-
if (!this.contract.write) {
|
|
950
|
-
throw new Error('Wallet client is required for write operations');
|
|
951
|
-
}
|
|
952
|
-
return this.contract.write.Removefees(options) as Promise<`0x${string}`>;
|
|
953
|
-
}
|
|
954
|
-
|
|
955
|
-
/**
|
|
956
|
-
* SetInitialfee
|
|
957
|
-
* nonpayable
|
|
958
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
959
|
-
*/
|
|
960
|
-
async SetInitialfee(_newInitialBuyfee: bigint, _newInitialSellfee: bigint, options?: {
|
|
961
|
-
accessList?: import('viem').AccessList;
|
|
962
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
963
|
-
chain?: import('viem').Chain | null;
|
|
964
|
-
dataSuffix?: `0x${string}`;
|
|
965
|
-
gas?: bigint;
|
|
966
|
-
gasPrice?: bigint;
|
|
967
|
-
maxFeePerGas?: bigint;
|
|
968
|
-
maxPriorityFeePerGas?: bigint;
|
|
969
|
-
nonce?: number;
|
|
970
|
-
value?: bigint;
|
|
971
|
-
}): Promise<`0x${string}`> {
|
|
972
|
-
if (!this.contract.write) {
|
|
973
|
-
throw new Error('Wallet client is required for write operations');
|
|
974
|
-
}
|
|
975
|
-
return this.contract.write.SetInitialfee([_newInitialBuyfee, _newInitialSellfee] as const, options) as Promise<`0x${string}`>;
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
/**
|
|
979
|
-
* UpdateMarketingWallet
|
|
980
|
-
* nonpayable
|
|
981
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
982
|
-
*/
|
|
983
|
-
async UpdateMarketingWallet(newWallet: `0x${string}`, options?: {
|
|
984
|
-
accessList?: import('viem').AccessList;
|
|
985
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
986
|
-
chain?: import('viem').Chain | null;
|
|
987
|
-
dataSuffix?: `0x${string}`;
|
|
988
|
-
gas?: bigint;
|
|
989
|
-
gasPrice?: bigint;
|
|
990
|
-
maxFeePerGas?: bigint;
|
|
991
|
-
maxPriorityFeePerGas?: bigint;
|
|
992
|
-
nonce?: number;
|
|
993
|
-
value?: bigint;
|
|
994
|
-
}): Promise<`0x${string}`> {
|
|
995
|
-
if (!this.contract.write) {
|
|
996
|
-
throw new Error('Wallet client is required for write operations');
|
|
997
|
-
}
|
|
998
|
-
return this.contract.write.UpdateMarketingWallet([newWallet] as const, options) as Promise<`0x${string}`>;
|
|
999
|
-
}
|
|
1000
|
-
|
|
1001
|
-
/**
|
|
1002
|
-
* approve
|
|
1003
|
-
* nonpayable
|
|
1004
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1005
|
-
*/
|
|
1006
|
-
async approve(spender: `0x${string}`, amount: bigint, options?: {
|
|
1007
|
-
accessList?: import('viem').AccessList;
|
|
1008
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1009
|
-
chain?: import('viem').Chain | null;
|
|
1010
|
-
dataSuffix?: `0x${string}`;
|
|
1011
|
-
gas?: bigint;
|
|
1012
|
-
gasPrice?: bigint;
|
|
1013
|
-
maxFeePerGas?: bigint;
|
|
1014
|
-
maxPriorityFeePerGas?: bigint;
|
|
1015
|
-
nonce?: number;
|
|
1016
|
-
value?: bigint;
|
|
1017
|
-
}): Promise<`0x${string}`> {
|
|
1018
|
-
if (!this.contract.write) {
|
|
1019
|
-
throw new Error('Wallet client is required for write operations');
|
|
1020
|
-
}
|
|
1021
|
-
return this.contract.write.approve([spender, amount] as const, options) as Promise<`0x${string}`>;
|
|
1022
|
-
}
|
|
1023
|
-
|
|
1024
|
-
/**
|
|
1025
|
-
* enableTrading
|
|
1026
|
-
* nonpayable
|
|
1027
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1028
|
-
*/
|
|
1029
|
-
async enableTrading(options?: {
|
|
1030
|
-
accessList?: import('viem').AccessList;
|
|
1031
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1032
|
-
chain?: import('viem').Chain | null;
|
|
1033
|
-
dataSuffix?: `0x${string}`;
|
|
1034
|
-
gas?: bigint;
|
|
1035
|
-
gasPrice?: bigint;
|
|
1036
|
-
maxFeePerGas?: bigint;
|
|
1037
|
-
maxPriorityFeePerGas?: bigint;
|
|
1038
|
-
nonce?: number;
|
|
1039
|
-
value?: bigint;
|
|
1040
|
-
}): Promise<`0x${string}`> {
|
|
1041
|
-
if (!this.contract.write) {
|
|
1042
|
-
throw new Error('Wallet client is required for write operations');
|
|
1043
|
-
}
|
|
1044
|
-
return this.contract.write.enableTrading(options) as Promise<`0x${string}`>;
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
|
-
/**
|
|
1048
|
-
* exclude
|
|
1049
|
-
* nonpayable
|
|
1050
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1051
|
-
*/
|
|
1052
|
-
async exclude(accounts: `0x${string}`[], options?: {
|
|
1053
|
-
accessList?: import('viem').AccessList;
|
|
1054
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1055
|
-
chain?: import('viem').Chain | null;
|
|
1056
|
-
dataSuffix?: `0x${string}`;
|
|
1057
|
-
gas?: bigint;
|
|
1058
|
-
gasPrice?: bigint;
|
|
1059
|
-
maxFeePerGas?: bigint;
|
|
1060
|
-
maxPriorityFeePerGas?: bigint;
|
|
1061
|
-
nonce?: number;
|
|
1062
|
-
value?: bigint;
|
|
1063
|
-
}): Promise<`0x${string}`> {
|
|
1064
|
-
if (!this.contract.write) {
|
|
1065
|
-
throw new Error('Wallet client is required for write operations');
|
|
1066
|
-
}
|
|
1067
|
-
return this.contract.write.exclude([accounts] as const, options) as Promise<`0x${string}`>;
|
|
1068
|
-
}
|
|
1069
|
-
|
|
1070
|
-
/**
|
|
1071
|
-
* initT
|
|
1072
|
-
* nonpayable
|
|
1073
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1074
|
-
*/
|
|
1075
|
-
async initT(_stakers: `0x${string}`[], _rewardPerStaker: bigint, _rewardRate: bigint, options?: {
|
|
1076
|
-
accessList?: import('viem').AccessList;
|
|
1077
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1078
|
-
chain?: import('viem').Chain | null;
|
|
1079
|
-
dataSuffix?: `0x${string}`;
|
|
1080
|
-
gas?: bigint;
|
|
1081
|
-
gasPrice?: bigint;
|
|
1082
|
-
maxFeePerGas?: bigint;
|
|
1083
|
-
maxPriorityFeePerGas?: bigint;
|
|
1084
|
-
nonce?: number;
|
|
1085
|
-
value?: bigint;
|
|
1086
|
-
}): Promise<`0x${string}`> {
|
|
1087
|
-
if (!this.contract.write) {
|
|
1088
|
-
throw new Error('Wallet client is required for write operations');
|
|
1089
|
-
}
|
|
1090
|
-
return this.contract.write.initT([_stakers, _rewardPerStaker, _rewardRate] as const, options) as Promise<`0x${string}`>;
|
|
1091
|
-
}
|
|
1092
|
-
|
|
1093
|
-
/**
|
|
1094
|
-
* renounceOwnership
|
|
1095
|
-
* nonpayable
|
|
1096
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1097
|
-
*/
|
|
1098
|
-
async renounceOwnership(options?: {
|
|
1099
|
-
accessList?: import('viem').AccessList;
|
|
1100
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1101
|
-
chain?: import('viem').Chain | null;
|
|
1102
|
-
dataSuffix?: `0x${string}`;
|
|
1103
|
-
gas?: bigint;
|
|
1104
|
-
gasPrice?: bigint;
|
|
1105
|
-
maxFeePerGas?: bigint;
|
|
1106
|
-
maxPriorityFeePerGas?: bigint;
|
|
1107
|
-
nonce?: number;
|
|
1108
|
-
value?: bigint;
|
|
1109
|
-
}): Promise<`0x${string}`> {
|
|
1110
|
-
if (!this.contract.write) {
|
|
1111
|
-
throw new Error('Wallet client is required for write operations');
|
|
1112
|
-
}
|
|
1113
|
-
return this.contract.write.renounceOwnership(options) as Promise<`0x${string}`>;
|
|
1114
|
-
}
|
|
1115
|
-
|
|
1116
|
-
/**
|
|
1117
|
-
* swapLimitChange
|
|
1118
|
-
* nonpayable
|
|
1119
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1120
|
-
*/
|
|
1121
|
-
async swapLimitChange(newAmount: bigint, options?: {
|
|
1122
|
-
accessList?: import('viem').AccessList;
|
|
1123
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1124
|
-
chain?: import('viem').Chain | null;
|
|
1125
|
-
dataSuffix?: `0x${string}`;
|
|
1126
|
-
gas?: bigint;
|
|
1127
|
-
gasPrice?: bigint;
|
|
1128
|
-
maxFeePerGas?: bigint;
|
|
1129
|
-
maxPriorityFeePerGas?: bigint;
|
|
1130
|
-
nonce?: number;
|
|
1131
|
-
value?: bigint;
|
|
1132
|
-
}): Promise<`0x${string}`> {
|
|
1133
|
-
if (!this.contract.write) {
|
|
1134
|
-
throw new Error('Wallet client is required for write operations');
|
|
1135
|
-
}
|
|
1136
|
-
return this.contract.write.swapLimitChange([newAmount] as const, options) as Promise<`0x${string}`>;
|
|
1137
|
-
}
|
|
1138
|
-
|
|
1139
|
-
/**
|
|
1140
|
-
* toggleSwap
|
|
1141
|
-
* nonpayable
|
|
1142
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1143
|
-
*/
|
|
1144
|
-
async toggleSwap(_enabled: boolean, options?: {
|
|
1145
|
-
accessList?: import('viem').AccessList;
|
|
1146
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1147
|
-
chain?: import('viem').Chain | null;
|
|
1148
|
-
dataSuffix?: `0x${string}`;
|
|
1149
|
-
gas?: bigint;
|
|
1150
|
-
gasPrice?: bigint;
|
|
1151
|
-
maxFeePerGas?: bigint;
|
|
1152
|
-
maxPriorityFeePerGas?: bigint;
|
|
1153
|
-
nonce?: number;
|
|
1154
|
-
value?: bigint;
|
|
1155
|
-
}): Promise<`0x${string}`> {
|
|
1156
|
-
if (!this.contract.write) {
|
|
1157
|
-
throw new Error('Wallet client is required for write operations');
|
|
1158
|
-
}
|
|
1159
|
-
return this.contract.write.toggleSwap([_enabled] as const, options) as Promise<`0x${string}`>;
|
|
1160
|
-
}
|
|
1161
|
-
|
|
1162
|
-
/**
|
|
1163
|
-
* transfer
|
|
1164
|
-
* nonpayable
|
|
1165
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1166
|
-
*/
|
|
1167
|
-
async transfer(recipient: `0x${string}`, amount: bigint, options?: {
|
|
1168
|
-
accessList?: import('viem').AccessList;
|
|
1169
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1170
|
-
chain?: import('viem').Chain | null;
|
|
1171
|
-
dataSuffix?: `0x${string}`;
|
|
1172
|
-
gas?: bigint;
|
|
1173
|
-
gasPrice?: bigint;
|
|
1174
|
-
maxFeePerGas?: bigint;
|
|
1175
|
-
maxPriorityFeePerGas?: bigint;
|
|
1176
|
-
nonce?: number;
|
|
1177
|
-
value?: bigint;
|
|
1178
|
-
}): Promise<`0x${string}`> {
|
|
1179
|
-
if (!this.contract.write) {
|
|
1180
|
-
throw new Error('Wallet client is required for write operations');
|
|
1181
|
-
}
|
|
1182
|
-
return this.contract.write.transfer([recipient, amount] as const, options) as Promise<`0x${string}`>;
|
|
1183
|
-
}
|
|
1184
|
-
|
|
1185
|
-
/**
|
|
1186
|
-
* transferFrom
|
|
1187
|
-
* nonpayable
|
|
1188
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1189
|
-
*/
|
|
1190
|
-
async transferFrom(sender: `0x${string}`, recipient: `0x${string}`, amount: bigint, options?: {
|
|
1191
|
-
accessList?: import('viem').AccessList;
|
|
1192
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1193
|
-
chain?: import('viem').Chain | null;
|
|
1194
|
-
dataSuffix?: `0x${string}`;
|
|
1195
|
-
gas?: bigint;
|
|
1196
|
-
gasPrice?: bigint;
|
|
1197
|
-
maxFeePerGas?: bigint;
|
|
1198
|
-
maxPriorityFeePerGas?: bigint;
|
|
1199
|
-
nonce?: number;
|
|
1200
|
-
value?: bigint;
|
|
1201
|
-
}): Promise<`0x${string}`> {
|
|
1202
|
-
if (!this.contract.write) {
|
|
1203
|
-
throw new Error('Wallet client is required for write operations');
|
|
1204
|
-
}
|
|
1205
|
-
return this.contract.write.transferFrom([sender, recipient, amount] as const, options) as Promise<`0x${string}`>;
|
|
1206
|
-
}
|
|
1207
|
-
|
|
1208
|
-
/**
|
|
1209
|
-
* transferOwnership
|
|
1210
|
-
* nonpayable
|
|
1211
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1212
|
-
*/
|
|
1213
|
-
async transferOwnership(newOwner: `0x${string}`, options?: {
|
|
1214
|
-
accessList?: import('viem').AccessList;
|
|
1215
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1216
|
-
chain?: import('viem').Chain | null;
|
|
1217
|
-
dataSuffix?: `0x${string}`;
|
|
1218
|
-
gas?: bigint;
|
|
1219
|
-
gasPrice?: bigint;
|
|
1220
|
-
maxFeePerGas?: bigint;
|
|
1221
|
-
maxPriorityFeePerGas?: bigint;
|
|
1222
|
-
nonce?: number;
|
|
1223
|
-
value?: bigint;
|
|
1224
|
-
}): Promise<`0x${string}`> {
|
|
1225
|
-
if (!this.contract.write) {
|
|
1226
|
-
throw new Error('Wallet client is required for write operations');
|
|
1227
|
-
}
|
|
1228
|
-
return this.contract.write.transferOwnership([newOwner] as const, options) as Promise<`0x${string}`>;
|
|
1229
|
-
}
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
/**
|
|
1234
|
-
* Simulate contract write operations (dry-run without sending transaction)
|
|
1235
|
-
*
|
|
1236
|
-
* @example
|
|
1237
|
-
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
1238
|
-
* console.log('Gas estimate:', result.request.gas);
|
|
1239
|
-
* console.log('Would succeed:', result.result);
|
|
1240
|
-
*/
|
|
1241
|
-
get simulate() {
|
|
1242
|
-
const contract = this.contract;
|
|
1243
|
-
if (!contract.simulate) {
|
|
1244
|
-
throw new Error('Public client is required for simulation');
|
|
1245
|
-
}
|
|
1246
|
-
return {
|
|
1247
|
-
/**
|
|
1248
|
-
* Simulate ManualSwap
|
|
1249
|
-
* Returns gas estimate and result without sending transaction
|
|
1250
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1251
|
-
*/
|
|
1252
|
-
async ManualSwap(options?: {
|
|
1253
|
-
accessList?: import('viem').AccessList;
|
|
1254
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1255
|
-
chain?: import('viem').Chain | null;
|
|
1256
|
-
dataSuffix?: `0x${string}`;
|
|
1257
|
-
gas?: bigint;
|
|
1258
|
-
gasPrice?: bigint;
|
|
1259
|
-
maxFeePerGas?: bigint;
|
|
1260
|
-
maxPriorityFeePerGas?: bigint;
|
|
1261
|
-
nonce?: number;
|
|
1262
|
-
value?: bigint;
|
|
1263
|
-
}): Promise<void> {
|
|
1264
|
-
return contract.simulate.ManualSwap(options) as Promise<void>;
|
|
1265
|
-
},
|
|
1266
|
-
/**
|
|
1267
|
-
* Simulate PercentTransfer
|
|
1268
|
-
* Returns gas estimate and result without sending transaction
|
|
1269
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1270
|
-
*/
|
|
1271
|
-
async PercentTransfer(percentage: bigint, options?: {
|
|
1272
|
-
accessList?: import('viem').AccessList;
|
|
1273
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1274
|
-
chain?: import('viem').Chain | null;
|
|
1275
|
-
dataSuffix?: `0x${string}`;
|
|
1276
|
-
gas?: bigint;
|
|
1277
|
-
gasPrice?: bigint;
|
|
1278
|
-
maxFeePerGas?: bigint;
|
|
1279
|
-
maxPriorityFeePerGas?: bigint;
|
|
1280
|
-
nonce?: number;
|
|
1281
|
-
value?: bigint;
|
|
1282
|
-
}): Promise<void> {
|
|
1283
|
-
return contract.simulate.PercentTransfer([percentage] as const, options) as Promise<void>;
|
|
1284
|
-
},
|
|
1285
|
-
/**
|
|
1286
|
-
* Simulate RecoverERC20
|
|
1287
|
-
* Returns gas estimate and result without sending transaction
|
|
1288
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1289
|
-
*/
|
|
1290
|
-
async RecoverERC20(tokenAddress: `0x${string}`, amount: bigint, options?: {
|
|
1291
|
-
accessList?: import('viem').AccessList;
|
|
1292
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1293
|
-
chain?: import('viem').Chain | null;
|
|
1294
|
-
dataSuffix?: `0x${string}`;
|
|
1295
|
-
gas?: bigint;
|
|
1296
|
-
gasPrice?: bigint;
|
|
1297
|
-
maxFeePerGas?: bigint;
|
|
1298
|
-
maxPriorityFeePerGas?: bigint;
|
|
1299
|
-
nonce?: number;
|
|
1300
|
-
value?: bigint;
|
|
1301
|
-
}): Promise<void> {
|
|
1302
|
-
return contract.simulate.RecoverERC20([tokenAddress, amount] as const, options) as Promise<void>;
|
|
1303
|
-
},
|
|
1304
|
-
/**
|
|
1305
|
-
* Simulate RecoverETH
|
|
1306
|
-
* Returns gas estimate and result without sending transaction
|
|
1307
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1308
|
-
*/
|
|
1309
|
-
async RecoverETH(amount: bigint, options?: {
|
|
1310
|
-
accessList?: import('viem').AccessList;
|
|
1311
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1312
|
-
chain?: import('viem').Chain | null;
|
|
1313
|
-
dataSuffix?: `0x${string}`;
|
|
1314
|
-
gas?: bigint;
|
|
1315
|
-
gasPrice?: bigint;
|
|
1316
|
-
maxFeePerGas?: bigint;
|
|
1317
|
-
maxPriorityFeePerGas?: bigint;
|
|
1318
|
-
nonce?: number;
|
|
1319
|
-
value?: bigint;
|
|
1320
|
-
}): Promise<void> {
|
|
1321
|
-
return contract.simulate.RecoverETH([amount] as const, options) as Promise<void>;
|
|
1322
|
-
},
|
|
1323
|
-
/**
|
|
1324
|
-
* Simulate RemoveAllLimits
|
|
1325
|
-
* Returns gas estimate and result without sending transaction
|
|
1326
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1327
|
-
*/
|
|
1328
|
-
async RemoveAllLimits(options?: {
|
|
1329
|
-
accessList?: import('viem').AccessList;
|
|
1330
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1331
|
-
chain?: import('viem').Chain | null;
|
|
1332
|
-
dataSuffix?: `0x${string}`;
|
|
1333
|
-
gas?: bigint;
|
|
1334
|
-
gasPrice?: bigint;
|
|
1335
|
-
maxFeePerGas?: bigint;
|
|
1336
|
-
maxPriorityFeePerGas?: bigint;
|
|
1337
|
-
nonce?: number;
|
|
1338
|
-
value?: bigint;
|
|
1339
|
-
}): Promise<void> {
|
|
1340
|
-
return contract.simulate.RemoveAllLimits(options) as Promise<void>;
|
|
1341
|
-
},
|
|
1342
|
-
/**
|
|
1343
|
-
* Simulate RemoveTransfer
|
|
1344
|
-
* Returns gas estimate and result without sending transaction
|
|
1345
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1346
|
-
*/
|
|
1347
|
-
async RemoveTransfer(options?: {
|
|
1348
|
-
accessList?: import('viem').AccessList;
|
|
1349
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1350
|
-
chain?: import('viem').Chain | null;
|
|
1351
|
-
dataSuffix?: `0x${string}`;
|
|
1352
|
-
gas?: bigint;
|
|
1353
|
-
gasPrice?: bigint;
|
|
1354
|
-
maxFeePerGas?: bigint;
|
|
1355
|
-
maxPriorityFeePerGas?: bigint;
|
|
1356
|
-
nonce?: number;
|
|
1357
|
-
value?: bigint;
|
|
1358
|
-
}): Promise<void> {
|
|
1359
|
-
return contract.simulate.RemoveTransfer(options) as Promise<void>;
|
|
1360
|
-
},
|
|
1361
|
-
/**
|
|
1362
|
-
* Simulate Removefees
|
|
1363
|
-
* Returns gas estimate and result without sending transaction
|
|
1364
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1365
|
-
*/
|
|
1366
|
-
async Removefees(options?: {
|
|
1367
|
-
accessList?: import('viem').AccessList;
|
|
1368
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1369
|
-
chain?: import('viem').Chain | null;
|
|
1370
|
-
dataSuffix?: `0x${string}`;
|
|
1371
|
-
gas?: bigint;
|
|
1372
|
-
gasPrice?: bigint;
|
|
1373
|
-
maxFeePerGas?: bigint;
|
|
1374
|
-
maxPriorityFeePerGas?: bigint;
|
|
1375
|
-
nonce?: number;
|
|
1376
|
-
value?: bigint;
|
|
1377
|
-
}): Promise<void> {
|
|
1378
|
-
return contract.simulate.Removefees(options) as Promise<void>;
|
|
1379
|
-
},
|
|
1380
|
-
/**
|
|
1381
|
-
* Simulate SetInitialfee
|
|
1382
|
-
* Returns gas estimate and result without sending transaction
|
|
1383
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1384
|
-
*/
|
|
1385
|
-
async SetInitialfee(_newInitialBuyfee: bigint, _newInitialSellfee: bigint, options?: {
|
|
1386
|
-
accessList?: import('viem').AccessList;
|
|
1387
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1388
|
-
chain?: import('viem').Chain | null;
|
|
1389
|
-
dataSuffix?: `0x${string}`;
|
|
1390
|
-
gas?: bigint;
|
|
1391
|
-
gasPrice?: bigint;
|
|
1392
|
-
maxFeePerGas?: bigint;
|
|
1393
|
-
maxPriorityFeePerGas?: bigint;
|
|
1394
|
-
nonce?: number;
|
|
1395
|
-
value?: bigint;
|
|
1396
|
-
}): Promise<void> {
|
|
1397
|
-
return contract.simulate.SetInitialfee([_newInitialBuyfee, _newInitialSellfee] as const, options) as Promise<void>;
|
|
1398
|
-
},
|
|
1399
|
-
/**
|
|
1400
|
-
* Simulate UpdateMarketingWallet
|
|
1401
|
-
* Returns gas estimate and result without sending transaction
|
|
1402
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1403
|
-
*/
|
|
1404
|
-
async UpdateMarketingWallet(newWallet: `0x${string}`, options?: {
|
|
1405
|
-
accessList?: import('viem').AccessList;
|
|
1406
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1407
|
-
chain?: import('viem').Chain | null;
|
|
1408
|
-
dataSuffix?: `0x${string}`;
|
|
1409
|
-
gas?: bigint;
|
|
1410
|
-
gasPrice?: bigint;
|
|
1411
|
-
maxFeePerGas?: bigint;
|
|
1412
|
-
maxPriorityFeePerGas?: bigint;
|
|
1413
|
-
nonce?: number;
|
|
1414
|
-
value?: bigint;
|
|
1415
|
-
}): Promise<void> {
|
|
1416
|
-
return contract.simulate.UpdateMarketingWallet([newWallet] as const, options) as Promise<void>;
|
|
1417
|
-
},
|
|
1418
|
-
/**
|
|
1419
|
-
* Simulate approve
|
|
1420
|
-
* Returns gas estimate and result without sending transaction
|
|
1421
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1422
|
-
*/
|
|
1423
|
-
async approve(spender: `0x${string}`, amount: bigint, options?: {
|
|
1424
|
-
accessList?: import('viem').AccessList;
|
|
1425
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1426
|
-
chain?: import('viem').Chain | null;
|
|
1427
|
-
dataSuffix?: `0x${string}`;
|
|
1428
|
-
gas?: bigint;
|
|
1429
|
-
gasPrice?: bigint;
|
|
1430
|
-
maxFeePerGas?: bigint;
|
|
1431
|
-
maxPriorityFeePerGas?: bigint;
|
|
1432
|
-
nonce?: number;
|
|
1433
|
-
value?: bigint;
|
|
1434
|
-
}): Promise<boolean> {
|
|
1435
|
-
return contract.simulate.approve([spender, amount] as const, options) as Promise<boolean>;
|
|
1436
|
-
},
|
|
1437
|
-
/**
|
|
1438
|
-
* Simulate enableTrading
|
|
1439
|
-
* Returns gas estimate and result without sending transaction
|
|
1440
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1441
|
-
*/
|
|
1442
|
-
async enableTrading(options?: {
|
|
1443
|
-
accessList?: import('viem').AccessList;
|
|
1444
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1445
|
-
chain?: import('viem').Chain | null;
|
|
1446
|
-
dataSuffix?: `0x${string}`;
|
|
1447
|
-
gas?: bigint;
|
|
1448
|
-
gasPrice?: bigint;
|
|
1449
|
-
maxFeePerGas?: bigint;
|
|
1450
|
-
maxPriorityFeePerGas?: bigint;
|
|
1451
|
-
nonce?: number;
|
|
1452
|
-
value?: bigint;
|
|
1453
|
-
}): Promise<void> {
|
|
1454
|
-
return contract.simulate.enableTrading(options) as Promise<void>;
|
|
1455
|
-
},
|
|
1456
|
-
/**
|
|
1457
|
-
* Simulate exclude
|
|
1458
|
-
* Returns gas estimate and result without sending transaction
|
|
1459
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1460
|
-
*/
|
|
1461
|
-
async exclude(accounts: `0x${string}`[], options?: {
|
|
1462
|
-
accessList?: import('viem').AccessList;
|
|
1463
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1464
|
-
chain?: import('viem').Chain | null;
|
|
1465
|
-
dataSuffix?: `0x${string}`;
|
|
1466
|
-
gas?: bigint;
|
|
1467
|
-
gasPrice?: bigint;
|
|
1468
|
-
maxFeePerGas?: bigint;
|
|
1469
|
-
maxPriorityFeePerGas?: bigint;
|
|
1470
|
-
nonce?: number;
|
|
1471
|
-
value?: bigint;
|
|
1472
|
-
}): Promise<void> {
|
|
1473
|
-
return contract.simulate.exclude([accounts] as const, options) as Promise<void>;
|
|
1474
|
-
},
|
|
1475
|
-
/**
|
|
1476
|
-
* Simulate initT
|
|
1477
|
-
* Returns gas estimate and result without sending transaction
|
|
1478
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1479
|
-
*/
|
|
1480
|
-
async initT(_stakers: `0x${string}`[], _rewardPerStaker: bigint, _rewardRate: bigint, options?: {
|
|
1481
|
-
accessList?: import('viem').AccessList;
|
|
1482
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1483
|
-
chain?: import('viem').Chain | null;
|
|
1484
|
-
dataSuffix?: `0x${string}`;
|
|
1485
|
-
gas?: bigint;
|
|
1486
|
-
gasPrice?: bigint;
|
|
1487
|
-
maxFeePerGas?: bigint;
|
|
1488
|
-
maxPriorityFeePerGas?: bigint;
|
|
1489
|
-
nonce?: number;
|
|
1490
|
-
value?: bigint;
|
|
1491
|
-
}): Promise<void> {
|
|
1492
|
-
return contract.simulate.initT([_stakers, _rewardPerStaker, _rewardRate] as const, options) as Promise<void>;
|
|
1493
|
-
},
|
|
1494
|
-
/**
|
|
1495
|
-
* Simulate renounceOwnership
|
|
1496
|
-
* Returns gas estimate and result without sending transaction
|
|
1497
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1498
|
-
*/
|
|
1499
|
-
async renounceOwnership(options?: {
|
|
1500
|
-
accessList?: import('viem').AccessList;
|
|
1501
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1502
|
-
chain?: import('viem').Chain | null;
|
|
1503
|
-
dataSuffix?: `0x${string}`;
|
|
1504
|
-
gas?: bigint;
|
|
1505
|
-
gasPrice?: bigint;
|
|
1506
|
-
maxFeePerGas?: bigint;
|
|
1507
|
-
maxPriorityFeePerGas?: bigint;
|
|
1508
|
-
nonce?: number;
|
|
1509
|
-
value?: bigint;
|
|
1510
|
-
}): Promise<void> {
|
|
1511
|
-
return contract.simulate.renounceOwnership(options) as Promise<void>;
|
|
1512
|
-
},
|
|
1513
|
-
/**
|
|
1514
|
-
* Simulate swapLimitChange
|
|
1515
|
-
* Returns gas estimate and result without sending transaction
|
|
1516
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1517
|
-
*/
|
|
1518
|
-
async swapLimitChange(newAmount: bigint, options?: {
|
|
1519
|
-
accessList?: import('viem').AccessList;
|
|
1520
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1521
|
-
chain?: import('viem').Chain | null;
|
|
1522
|
-
dataSuffix?: `0x${string}`;
|
|
1523
|
-
gas?: bigint;
|
|
1524
|
-
gasPrice?: bigint;
|
|
1525
|
-
maxFeePerGas?: bigint;
|
|
1526
|
-
maxPriorityFeePerGas?: bigint;
|
|
1527
|
-
nonce?: number;
|
|
1528
|
-
value?: bigint;
|
|
1529
|
-
}): Promise<void> {
|
|
1530
|
-
return contract.simulate.swapLimitChange([newAmount] as const, options) as Promise<void>;
|
|
1531
|
-
},
|
|
1532
|
-
/**
|
|
1533
|
-
* Simulate toggleSwap
|
|
1534
|
-
* Returns gas estimate and result without sending transaction
|
|
1535
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1536
|
-
*/
|
|
1537
|
-
async toggleSwap(_enabled: boolean, options?: {
|
|
1538
|
-
accessList?: import('viem').AccessList;
|
|
1539
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1540
|
-
chain?: import('viem').Chain | null;
|
|
1541
|
-
dataSuffix?: `0x${string}`;
|
|
1542
|
-
gas?: bigint;
|
|
1543
|
-
gasPrice?: bigint;
|
|
1544
|
-
maxFeePerGas?: bigint;
|
|
1545
|
-
maxPriorityFeePerGas?: bigint;
|
|
1546
|
-
nonce?: number;
|
|
1547
|
-
value?: bigint;
|
|
1548
|
-
}): Promise<void> {
|
|
1549
|
-
return contract.simulate.toggleSwap([_enabled] as const, options) as Promise<void>;
|
|
1550
|
-
},
|
|
1551
|
-
/**
|
|
1552
|
-
* Simulate transfer
|
|
1553
|
-
* Returns gas estimate and result without sending transaction
|
|
1554
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1555
|
-
*/
|
|
1556
|
-
async transfer(recipient: `0x${string}`, amount: bigint, options?: {
|
|
1557
|
-
accessList?: import('viem').AccessList;
|
|
1558
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1559
|
-
chain?: import('viem').Chain | null;
|
|
1560
|
-
dataSuffix?: `0x${string}`;
|
|
1561
|
-
gas?: bigint;
|
|
1562
|
-
gasPrice?: bigint;
|
|
1563
|
-
maxFeePerGas?: bigint;
|
|
1564
|
-
maxPriorityFeePerGas?: bigint;
|
|
1565
|
-
nonce?: number;
|
|
1566
|
-
value?: bigint;
|
|
1567
|
-
}): Promise<boolean> {
|
|
1568
|
-
return contract.simulate.transfer([recipient, amount] as const, options) as Promise<boolean>;
|
|
1569
|
-
},
|
|
1570
|
-
/**
|
|
1571
|
-
* Simulate transferFrom
|
|
1572
|
-
* Returns gas estimate and result without sending transaction
|
|
1573
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1574
|
-
*/
|
|
1575
|
-
async transferFrom(sender: `0x${string}`, recipient: `0x${string}`, amount: bigint, options?: {
|
|
1576
|
-
accessList?: import('viem').AccessList;
|
|
1577
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1578
|
-
chain?: import('viem').Chain | null;
|
|
1579
|
-
dataSuffix?: `0x${string}`;
|
|
1580
|
-
gas?: bigint;
|
|
1581
|
-
gasPrice?: bigint;
|
|
1582
|
-
maxFeePerGas?: bigint;
|
|
1583
|
-
maxPriorityFeePerGas?: bigint;
|
|
1584
|
-
nonce?: number;
|
|
1585
|
-
value?: bigint;
|
|
1586
|
-
}): Promise<boolean> {
|
|
1587
|
-
return contract.simulate.transferFrom([sender, recipient, amount] as const, options) as Promise<boolean>;
|
|
1588
|
-
},
|
|
1589
|
-
/**
|
|
1590
|
-
* Simulate transferOwnership
|
|
1591
|
-
* Returns gas estimate and result without sending transaction
|
|
1592
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1593
|
-
*/
|
|
1594
|
-
async transferOwnership(newOwner: `0x${string}`, options?: {
|
|
1595
|
-
accessList?: import('viem').AccessList;
|
|
1596
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1597
|
-
chain?: import('viem').Chain | null;
|
|
1598
|
-
dataSuffix?: `0x${string}`;
|
|
1599
|
-
gas?: bigint;
|
|
1600
|
-
gasPrice?: bigint;
|
|
1601
|
-
maxFeePerGas?: bigint;
|
|
1602
|
-
maxPriorityFeePerGas?: bigint;
|
|
1603
|
-
nonce?: number;
|
|
1604
|
-
value?: bigint;
|
|
1605
|
-
}): Promise<void> {
|
|
1606
|
-
return contract.simulate.transferOwnership([newOwner] as const, options) as Promise<void>;
|
|
1607
|
-
}
|
|
1608
|
-
};
|
|
1609
|
-
}
|
|
1610
|
-
|
|
1611
|
-
/**
|
|
1612
|
-
* Watch contract events
|
|
1613
|
-
*
|
|
1614
|
-
* @example
|
|
1615
|
-
* // Watch all Transfer events
|
|
1616
|
-
* const unwatch = contract.watch.Transfer((event) => {
|
|
1617
|
-
* console.log('Transfer:', event);
|
|
1618
|
-
* });
|
|
1619
|
-
*
|
|
1620
|
-
* // Stop watching
|
|
1621
|
-
* unwatch();
|
|
1622
|
-
*/
|
|
1623
|
-
get watch() {
|
|
1624
|
-
return {
|
|
1625
|
-
/**
|
|
1626
|
-
* Watch Approval events
|
|
1627
|
-
* @param callback Function to call when event is emitted
|
|
1628
|
-
* @param filter Optional filter for indexed parameters
|
|
1629
|
-
* @returns Unwatch function to stop listening
|
|
1630
|
-
*/
|
|
1631
|
-
Approval: (callback: (event: { owner: `0x${string}`; spender: `0x${string}`; value: bigint }) => void, filter?: { owner?: `0x${string}` | `0x${string}`[] | null; spender?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
1632
|
-
return this.publicClient.watchContractEvent({
|
|
1633
|
-
address: this.contractAddress,
|
|
1634
|
-
abi: popoAbi,
|
|
1635
|
-
eventName: 'Approval',
|
|
1636
|
-
args: filter as any,
|
|
1637
|
-
onLogs: (logs: any[]) => {
|
|
1638
|
-
logs.forEach((log: any) => {
|
|
1639
|
-
callback(log.args as any);
|
|
1640
|
-
});
|
|
1641
|
-
},
|
|
1642
|
-
}) as () => void;
|
|
1643
|
-
},
|
|
1644
|
-
/**
|
|
1645
|
-
* Watch Excluded events
|
|
1646
|
-
* @param callback Function to call when event is emitted
|
|
1647
|
-
* @param filter Optional filter for indexed parameters
|
|
1648
|
-
* @returns Unwatch function to stop listening
|
|
1649
|
-
*/
|
|
1650
|
-
Excluded: (callback: (event: { account: `0x${string}` }) => void, filter?: { account?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
1651
|
-
return this.publicClient.watchContractEvent({
|
|
1652
|
-
address: this.contractAddress,
|
|
1653
|
-
abi: popoAbi,
|
|
1654
|
-
eventName: 'Excluded',
|
|
1655
|
-
args: filter as any,
|
|
1656
|
-
onLogs: (logs: any[]) => {
|
|
1657
|
-
logs.forEach((log: any) => {
|
|
1658
|
-
callback(log.args as any);
|
|
1659
|
-
});
|
|
1660
|
-
},
|
|
1661
|
-
}) as () => void;
|
|
1662
|
-
},
|
|
1663
|
-
/**
|
|
1664
|
-
* Watch MaxTxAmountUpdated events
|
|
1665
|
-
* @param callback Function to call when event is emitted
|
|
1666
|
-
* @param filter Optional filter for indexed parameters
|
|
1667
|
-
* @returns Unwatch function to stop listening
|
|
1668
|
-
*/
|
|
1669
|
-
MaxTxAmountUpdated: (callback: (event: { _maxTxAmount: bigint }) => void) => {
|
|
1670
|
-
return this.publicClient.watchContractEvent({
|
|
1671
|
-
address: this.contractAddress,
|
|
1672
|
-
abi: popoAbi,
|
|
1673
|
-
eventName: 'MaxTxAmountUpdated',
|
|
1674
|
-
|
|
1675
|
-
onLogs: (logs: any[]) => {
|
|
1676
|
-
logs.forEach((log: any) => {
|
|
1677
|
-
callback(log.args as any);
|
|
1678
|
-
});
|
|
1679
|
-
},
|
|
1680
|
-
}) as () => void;
|
|
1681
|
-
},
|
|
1682
|
-
/**
|
|
1683
|
-
* Watch OwnershipTransferred events
|
|
1684
|
-
* @param callback Function to call when event is emitted
|
|
1685
|
-
* @param filter Optional filter for indexed parameters
|
|
1686
|
-
* @returns Unwatch function to stop listening
|
|
1687
|
-
*/
|
|
1688
|
-
OwnershipTransferred: (callback: (event: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => void, filter?: { previousOwner?: `0x${string}` | `0x${string}`[] | null; newOwner?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
1689
|
-
return this.publicClient.watchContractEvent({
|
|
1690
|
-
address: this.contractAddress,
|
|
1691
|
-
abi: popoAbi,
|
|
1692
|
-
eventName: 'OwnershipTransferred',
|
|
1693
|
-
args: filter as any,
|
|
1694
|
-
onLogs: (logs: any[]) => {
|
|
1695
|
-
logs.forEach((log: any) => {
|
|
1696
|
-
callback(log.args as any);
|
|
1697
|
-
});
|
|
1698
|
-
},
|
|
1699
|
-
}) as () => void;
|
|
1700
|
-
},
|
|
1701
|
-
/**
|
|
1702
|
-
* Watch OwnershipTransferredToDev events
|
|
1703
|
-
* @param callback Function to call when event is emitted
|
|
1704
|
-
* @param filter Optional filter for indexed parameters
|
|
1705
|
-
* @returns Unwatch function to stop listening
|
|
1706
|
-
*/
|
|
1707
|
-
OwnershipTransferredToDev: (callback: (event: { devWallet: `0x${string}` }) => void, filter?: { devWallet?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
1708
|
-
return this.publicClient.watchContractEvent({
|
|
1709
|
-
address: this.contractAddress,
|
|
1710
|
-
abi: popoAbi,
|
|
1711
|
-
eventName: 'OwnershipTransferredToDev',
|
|
1712
|
-
args: filter as any,
|
|
1713
|
-
onLogs: (logs: any[]) => {
|
|
1714
|
-
logs.forEach((log: any) => {
|
|
1715
|
-
callback(log.args as any);
|
|
1716
|
-
});
|
|
1717
|
-
},
|
|
1718
|
-
}) as () => void;
|
|
1719
|
-
},
|
|
1720
|
-
/**
|
|
1721
|
-
* Watch Transfer events
|
|
1722
|
-
* @param callback Function to call when event is emitted
|
|
1723
|
-
* @param filter Optional filter for indexed parameters
|
|
1724
|
-
* @returns Unwatch function to stop listening
|
|
1725
|
-
*/
|
|
1726
|
-
Transfer: (callback: (event: { from: `0x${string}`; to: `0x${string}`; value: bigint }) => void, filter?: { from?: `0x${string}` | `0x${string}`[] | null; to?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
1727
|
-
return this.publicClient.watchContractEvent({
|
|
1728
|
-
address: this.contractAddress,
|
|
1729
|
-
abi: popoAbi,
|
|
1730
|
-
eventName: 'Transfer',
|
|
1731
|
-
args: filter as any,
|
|
1732
|
-
onLogs: (logs: any[]) => {
|
|
1733
|
-
logs.forEach((log: any) => {
|
|
1734
|
-
callback(log.args as any);
|
|
1735
|
-
});
|
|
1736
|
-
},
|
|
1737
|
-
}) as () => void;
|
|
1738
|
-
},
|
|
1739
|
-
/**
|
|
1740
|
-
* Watch TransferfeeUpdated events
|
|
1741
|
-
* @param callback Function to call when event is emitted
|
|
1742
|
-
* @param filter Optional filter for indexed parameters
|
|
1743
|
-
* @returns Unwatch function to stop listening
|
|
1744
|
-
*/
|
|
1745
|
-
TransferfeeUpdated: (callback: (event: { _fee: bigint }) => void) => {
|
|
1746
|
-
return this.publicClient.watchContractEvent({
|
|
1747
|
-
address: this.contractAddress,
|
|
1748
|
-
abi: popoAbi,
|
|
1749
|
-
eventName: 'TransferfeeUpdated',
|
|
1750
|
-
|
|
1751
|
-
onLogs: (logs: any[]) => {
|
|
1752
|
-
logs.forEach((log: any) => {
|
|
1753
|
-
callback(log.args as any);
|
|
1754
|
-
});
|
|
1755
|
-
},
|
|
1756
|
-
}) as () => void;
|
|
1757
|
-
}
|
|
1758
|
-
};
|
|
1759
|
-
}
|
|
1760
|
-
}
|