@gitmyabi/fragma 1.0.0
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 +108 -0
- package/contracts/Fragma_json.d.ts +1371 -0
- package/contracts/Fragma_json.js +1437 -0
- package/contracts/Fragma_json.ts +1836 -0
- package/contracts/index.d.ts +2 -0
- package/contracts/index.js +7 -0
- package/contracts/index.ts +3 -0
- package/index.d.ts +1 -0
- package/index.js +19 -0
- package/package.json +43 -0
|
@@ -0,0 +1,1437 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Fragma_json = exports.Fragma_jsonAbi = void 0;
|
|
4
|
+
const viem_1 = require("viem");
|
|
5
|
+
/**
|
|
6
|
+
* Fragma_json ABI
|
|
7
|
+
*
|
|
8
|
+
* This ABI is typed using viem's type system for full type safety.
|
|
9
|
+
*/
|
|
10
|
+
exports.Fragma_jsonAbi = [
|
|
11
|
+
{
|
|
12
|
+
"inputs": [
|
|
13
|
+
{
|
|
14
|
+
"internalType": "address",
|
|
15
|
+
"name": "_taxWallet1",
|
|
16
|
+
"type": "address"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"internalType": "address",
|
|
20
|
+
"name": "_taxWallet2",
|
|
21
|
+
"type": "address"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"stateMutability": "nonpayable",
|
|
25
|
+
"type": "constructor"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"anonymous": false,
|
|
29
|
+
"inputs": [
|
|
30
|
+
{
|
|
31
|
+
"indexed": true,
|
|
32
|
+
"internalType": "address",
|
|
33
|
+
"name": "owner",
|
|
34
|
+
"type": "address"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"indexed": true,
|
|
38
|
+
"internalType": "address",
|
|
39
|
+
"name": "spender",
|
|
40
|
+
"type": "address"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"indexed": false,
|
|
44
|
+
"internalType": "uint256",
|
|
45
|
+
"name": "value",
|
|
46
|
+
"type": "uint256"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"name": "Approval",
|
|
50
|
+
"type": "event"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"anonymous": false,
|
|
54
|
+
"inputs": [
|
|
55
|
+
{
|
|
56
|
+
"indexed": true,
|
|
57
|
+
"internalType": "address",
|
|
58
|
+
"name": "previousOwner",
|
|
59
|
+
"type": "address"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"indexed": true,
|
|
63
|
+
"internalType": "address",
|
|
64
|
+
"name": "newOwner",
|
|
65
|
+
"type": "address"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"name": "OwnershipTransferred",
|
|
69
|
+
"type": "event"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"anonymous": false,
|
|
73
|
+
"inputs": [],
|
|
74
|
+
"name": "RemovedLimits",
|
|
75
|
+
"type": "event"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"anonymous": false,
|
|
79
|
+
"inputs": [
|
|
80
|
+
{
|
|
81
|
+
"indexed": false,
|
|
82
|
+
"internalType": "address",
|
|
83
|
+
"name": "_address",
|
|
84
|
+
"type": "address"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"indexed": false,
|
|
88
|
+
"internalType": "bool",
|
|
89
|
+
"name": "_isExcluded",
|
|
90
|
+
"type": "bool"
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"name": "SetExcludedFromFees",
|
|
94
|
+
"type": "event"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"anonymous": false,
|
|
98
|
+
"inputs": [
|
|
99
|
+
{
|
|
100
|
+
"indexed": false,
|
|
101
|
+
"internalType": "address",
|
|
102
|
+
"name": "_address",
|
|
103
|
+
"type": "address"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"indexed": false,
|
|
107
|
+
"internalType": "bool",
|
|
108
|
+
"name": "_isExcluded",
|
|
109
|
+
"type": "bool"
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
"name": "SetExcludedFromLimits",
|
|
113
|
+
"type": "event"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"anonymous": false,
|
|
117
|
+
"inputs": [
|
|
118
|
+
{
|
|
119
|
+
"indexed": false,
|
|
120
|
+
"internalType": "uint24",
|
|
121
|
+
"name": "buyTax_",
|
|
122
|
+
"type": "uint24"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"indexed": false,
|
|
126
|
+
"internalType": "uint24",
|
|
127
|
+
"name": "sellTax_",
|
|
128
|
+
"type": "uint24"
|
|
129
|
+
}
|
|
130
|
+
],
|
|
131
|
+
"name": "TaxUpdated",
|
|
132
|
+
"type": "event"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"anonymous": false,
|
|
136
|
+
"inputs": [
|
|
137
|
+
{
|
|
138
|
+
"indexed": true,
|
|
139
|
+
"internalType": "address",
|
|
140
|
+
"name": "from",
|
|
141
|
+
"type": "address"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"indexed": true,
|
|
145
|
+
"internalType": "address",
|
|
146
|
+
"name": "to",
|
|
147
|
+
"type": "address"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"indexed": false,
|
|
151
|
+
"internalType": "uint256",
|
|
152
|
+
"name": "value",
|
|
153
|
+
"type": "uint256"
|
|
154
|
+
}
|
|
155
|
+
],
|
|
156
|
+
"name": "Transfer",
|
|
157
|
+
"type": "event"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"anonymous": false,
|
|
161
|
+
"inputs": [
|
|
162
|
+
{
|
|
163
|
+
"indexed": false,
|
|
164
|
+
"internalType": "uint256",
|
|
165
|
+
"name": "newMax",
|
|
166
|
+
"type": "uint256"
|
|
167
|
+
}
|
|
168
|
+
],
|
|
169
|
+
"name": "UpdatedWalletLimit",
|
|
170
|
+
"type": "event"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"inputs": [],
|
|
174
|
+
"name": "FEE_DIVISOR",
|
|
175
|
+
"outputs": [
|
|
176
|
+
{
|
|
177
|
+
"internalType": "uint64",
|
|
178
|
+
"name": "",
|
|
179
|
+
"type": "uint64"
|
|
180
|
+
}
|
|
181
|
+
],
|
|
182
|
+
"stateMutability": "view",
|
|
183
|
+
"type": "function"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"inputs": [],
|
|
187
|
+
"name": "WETH",
|
|
188
|
+
"outputs": [
|
|
189
|
+
{
|
|
190
|
+
"internalType": "address",
|
|
191
|
+
"name": "",
|
|
192
|
+
"type": "address"
|
|
193
|
+
}
|
|
194
|
+
],
|
|
195
|
+
"stateMutability": "view",
|
|
196
|
+
"type": "function"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"inputs": [
|
|
200
|
+
{
|
|
201
|
+
"internalType": "address[]",
|
|
202
|
+
"name": "wallets",
|
|
203
|
+
"type": "address[]"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"internalType": "uint256[]",
|
|
207
|
+
"name": "amountsInWei",
|
|
208
|
+
"type": "uint256[]"
|
|
209
|
+
}
|
|
210
|
+
],
|
|
211
|
+
"name": "airdropToWallets",
|
|
212
|
+
"outputs": [],
|
|
213
|
+
"stateMutability": "nonpayable",
|
|
214
|
+
"type": "function"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"inputs": [
|
|
218
|
+
{
|
|
219
|
+
"internalType": "address",
|
|
220
|
+
"name": "owner",
|
|
221
|
+
"type": "address"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"internalType": "address",
|
|
225
|
+
"name": "spender",
|
|
226
|
+
"type": "address"
|
|
227
|
+
}
|
|
228
|
+
],
|
|
229
|
+
"name": "allowance",
|
|
230
|
+
"outputs": [
|
|
231
|
+
{
|
|
232
|
+
"internalType": "uint256",
|
|
233
|
+
"name": "",
|
|
234
|
+
"type": "uint256"
|
|
235
|
+
}
|
|
236
|
+
],
|
|
237
|
+
"stateMutability": "view",
|
|
238
|
+
"type": "function"
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"inputs": [
|
|
242
|
+
{
|
|
243
|
+
"internalType": "address",
|
|
244
|
+
"name": "spender",
|
|
245
|
+
"type": "address"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"internalType": "uint256",
|
|
249
|
+
"name": "amount",
|
|
250
|
+
"type": "uint256"
|
|
251
|
+
}
|
|
252
|
+
],
|
|
253
|
+
"name": "approve",
|
|
254
|
+
"outputs": [
|
|
255
|
+
{
|
|
256
|
+
"internalType": "bool",
|
|
257
|
+
"name": "",
|
|
258
|
+
"type": "bool"
|
|
259
|
+
}
|
|
260
|
+
],
|
|
261
|
+
"stateMutability": "nonpayable",
|
|
262
|
+
"type": "function"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"inputs": [
|
|
266
|
+
{
|
|
267
|
+
"internalType": "address",
|
|
268
|
+
"name": "account",
|
|
269
|
+
"type": "address"
|
|
270
|
+
}
|
|
271
|
+
],
|
|
272
|
+
"name": "balanceOf",
|
|
273
|
+
"outputs": [
|
|
274
|
+
{
|
|
275
|
+
"internalType": "uint256",
|
|
276
|
+
"name": "",
|
|
277
|
+
"type": "uint256"
|
|
278
|
+
}
|
|
279
|
+
],
|
|
280
|
+
"stateMutability": "view",
|
|
281
|
+
"type": "function"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"inputs": [],
|
|
285
|
+
"name": "buyTax",
|
|
286
|
+
"outputs": [
|
|
287
|
+
{
|
|
288
|
+
"internalType": "uint24",
|
|
289
|
+
"name": "",
|
|
290
|
+
"type": "uint24"
|
|
291
|
+
}
|
|
292
|
+
],
|
|
293
|
+
"stateMutability": "view",
|
|
294
|
+
"type": "function"
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"inputs": [],
|
|
298
|
+
"name": "decimals",
|
|
299
|
+
"outputs": [
|
|
300
|
+
{
|
|
301
|
+
"internalType": "uint8",
|
|
302
|
+
"name": "",
|
|
303
|
+
"type": "uint8"
|
|
304
|
+
}
|
|
305
|
+
],
|
|
306
|
+
"stateMutability": "view",
|
|
307
|
+
"type": "function"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"inputs": [
|
|
311
|
+
{
|
|
312
|
+
"internalType": "address",
|
|
313
|
+
"name": "spender",
|
|
314
|
+
"type": "address"
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"internalType": "uint256",
|
|
318
|
+
"name": "subtractedValue",
|
|
319
|
+
"type": "uint256"
|
|
320
|
+
}
|
|
321
|
+
],
|
|
322
|
+
"name": "decreaseAllowance",
|
|
323
|
+
"outputs": [
|
|
324
|
+
{
|
|
325
|
+
"internalType": "bool",
|
|
326
|
+
"name": "",
|
|
327
|
+
"type": "bool"
|
|
328
|
+
}
|
|
329
|
+
],
|
|
330
|
+
"stateMutability": "nonpayable",
|
|
331
|
+
"type": "function"
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"inputs": [],
|
|
335
|
+
"name": "dexRouter",
|
|
336
|
+
"outputs": [
|
|
337
|
+
{
|
|
338
|
+
"internalType": "contract IDexRouter",
|
|
339
|
+
"name": "",
|
|
340
|
+
"type": "address"
|
|
341
|
+
}
|
|
342
|
+
],
|
|
343
|
+
"stateMutability": "view",
|
|
344
|
+
"type": "function"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"inputs": [],
|
|
348
|
+
"name": "enableTrading",
|
|
349
|
+
"outputs": [],
|
|
350
|
+
"stateMutability": "nonpayable",
|
|
351
|
+
"type": "function"
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"inputs": [
|
|
355
|
+
{
|
|
356
|
+
"internalType": "address",
|
|
357
|
+
"name": "",
|
|
358
|
+
"type": "address"
|
|
359
|
+
}
|
|
360
|
+
],
|
|
361
|
+
"name": "exemptFromFees",
|
|
362
|
+
"outputs": [
|
|
363
|
+
{
|
|
364
|
+
"internalType": "bool",
|
|
365
|
+
"name": "",
|
|
366
|
+
"type": "bool"
|
|
367
|
+
}
|
|
368
|
+
],
|
|
369
|
+
"stateMutability": "view",
|
|
370
|
+
"type": "function"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"inputs": [
|
|
374
|
+
{
|
|
375
|
+
"internalType": "address",
|
|
376
|
+
"name": "",
|
|
377
|
+
"type": "address"
|
|
378
|
+
}
|
|
379
|
+
],
|
|
380
|
+
"name": "exemptFromLimits",
|
|
381
|
+
"outputs": [
|
|
382
|
+
{
|
|
383
|
+
"internalType": "bool",
|
|
384
|
+
"name": "",
|
|
385
|
+
"type": "bool"
|
|
386
|
+
}
|
|
387
|
+
],
|
|
388
|
+
"stateMutability": "view",
|
|
389
|
+
"type": "function"
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"inputs": [
|
|
393
|
+
{
|
|
394
|
+
"internalType": "address",
|
|
395
|
+
"name": "spender",
|
|
396
|
+
"type": "address"
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"internalType": "uint256",
|
|
400
|
+
"name": "addedValue",
|
|
401
|
+
"type": "uint256"
|
|
402
|
+
}
|
|
403
|
+
],
|
|
404
|
+
"name": "increaseAllowance",
|
|
405
|
+
"outputs": [
|
|
406
|
+
{
|
|
407
|
+
"internalType": "bool",
|
|
408
|
+
"name": "",
|
|
409
|
+
"type": "bool"
|
|
410
|
+
}
|
|
411
|
+
],
|
|
412
|
+
"stateMutability": "nonpayable",
|
|
413
|
+
"type": "function"
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
"inputs": [
|
|
417
|
+
{
|
|
418
|
+
"internalType": "address",
|
|
419
|
+
"name": "",
|
|
420
|
+
"type": "address"
|
|
421
|
+
}
|
|
422
|
+
],
|
|
423
|
+
"name": "isAMMPair",
|
|
424
|
+
"outputs": [
|
|
425
|
+
{
|
|
426
|
+
"internalType": "bool",
|
|
427
|
+
"name": "",
|
|
428
|
+
"type": "bool"
|
|
429
|
+
}
|
|
430
|
+
],
|
|
431
|
+
"stateMutability": "view",
|
|
432
|
+
"type": "function"
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"inputs": [],
|
|
436
|
+
"name": "lastSwapBackBlock",
|
|
437
|
+
"outputs": [
|
|
438
|
+
{
|
|
439
|
+
"internalType": "uint256",
|
|
440
|
+
"name": "",
|
|
441
|
+
"type": "uint256"
|
|
442
|
+
}
|
|
443
|
+
],
|
|
444
|
+
"stateMutability": "view",
|
|
445
|
+
"type": "function"
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
"inputs": [],
|
|
449
|
+
"name": "launchTimestamp",
|
|
450
|
+
"outputs": [
|
|
451
|
+
{
|
|
452
|
+
"internalType": "uint256",
|
|
453
|
+
"name": "",
|
|
454
|
+
"type": "uint256"
|
|
455
|
+
}
|
|
456
|
+
],
|
|
457
|
+
"stateMutability": "view",
|
|
458
|
+
"type": "function"
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
"inputs": [],
|
|
462
|
+
"name": "lpPair",
|
|
463
|
+
"outputs": [
|
|
464
|
+
{
|
|
465
|
+
"internalType": "address",
|
|
466
|
+
"name": "",
|
|
467
|
+
"type": "address"
|
|
468
|
+
}
|
|
469
|
+
],
|
|
470
|
+
"stateMutability": "view",
|
|
471
|
+
"type": "function"
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
"inputs": [
|
|
475
|
+
{
|
|
476
|
+
"internalType": "uint256",
|
|
477
|
+
"name": "percentToConvert",
|
|
478
|
+
"type": "uint256"
|
|
479
|
+
}
|
|
480
|
+
],
|
|
481
|
+
"name": "manualConvert",
|
|
482
|
+
"outputs": [],
|
|
483
|
+
"stateMutability": "nonpayable",
|
|
484
|
+
"type": "function"
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
"inputs": [],
|
|
488
|
+
"name": "name",
|
|
489
|
+
"outputs": [
|
|
490
|
+
{
|
|
491
|
+
"internalType": "string",
|
|
492
|
+
"name": "",
|
|
493
|
+
"type": "string"
|
|
494
|
+
}
|
|
495
|
+
],
|
|
496
|
+
"stateMutability": "view",
|
|
497
|
+
"type": "function"
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
"inputs": [],
|
|
501
|
+
"name": "owner",
|
|
502
|
+
"outputs": [
|
|
503
|
+
{
|
|
504
|
+
"internalType": "address",
|
|
505
|
+
"name": "",
|
|
506
|
+
"type": "address"
|
|
507
|
+
}
|
|
508
|
+
],
|
|
509
|
+
"stateMutability": "view",
|
|
510
|
+
"type": "function"
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
"inputs": [],
|
|
514
|
+
"name": "renounceOwnership",
|
|
515
|
+
"outputs": [],
|
|
516
|
+
"stateMutability": "nonpayable",
|
|
517
|
+
"type": "function"
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
"inputs": [],
|
|
521
|
+
"name": "sellTax",
|
|
522
|
+
"outputs": [
|
|
523
|
+
{
|
|
524
|
+
"internalType": "uint24",
|
|
525
|
+
"name": "",
|
|
526
|
+
"type": "uint24"
|
|
527
|
+
}
|
|
528
|
+
],
|
|
529
|
+
"stateMutability": "view",
|
|
530
|
+
"type": "function"
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
"inputs": [
|
|
534
|
+
{
|
|
535
|
+
"internalType": "address",
|
|
536
|
+
"name": "_address",
|
|
537
|
+
"type": "address"
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
"internalType": "bool",
|
|
541
|
+
"name": "_isExcluded",
|
|
542
|
+
"type": "bool"
|
|
543
|
+
}
|
|
544
|
+
],
|
|
545
|
+
"name": "setExemptFromFee",
|
|
546
|
+
"outputs": [],
|
|
547
|
+
"stateMutability": "nonpayable",
|
|
548
|
+
"type": "function"
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
"inputs": [
|
|
552
|
+
{
|
|
553
|
+
"internalType": "address",
|
|
554
|
+
"name": "_address",
|
|
555
|
+
"type": "address"
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
"internalType": "bool",
|
|
559
|
+
"name": "_isExcluded",
|
|
560
|
+
"type": "bool"
|
|
561
|
+
}
|
|
562
|
+
],
|
|
563
|
+
"name": "setExemptFromLimits",
|
|
564
|
+
"outputs": [],
|
|
565
|
+
"stateMutability": "nonpayable",
|
|
566
|
+
"type": "function"
|
|
567
|
+
},
|
|
568
|
+
{
|
|
569
|
+
"inputs": [],
|
|
570
|
+
"name": "swapTokensAtAmt",
|
|
571
|
+
"outputs": [
|
|
572
|
+
{
|
|
573
|
+
"internalType": "uint256",
|
|
574
|
+
"name": "",
|
|
575
|
+
"type": "uint256"
|
|
576
|
+
}
|
|
577
|
+
],
|
|
578
|
+
"stateMutability": "view",
|
|
579
|
+
"type": "function"
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
"inputs": [],
|
|
583
|
+
"name": "symbol",
|
|
584
|
+
"outputs": [
|
|
585
|
+
{
|
|
586
|
+
"internalType": "string",
|
|
587
|
+
"name": "",
|
|
588
|
+
"type": "string"
|
|
589
|
+
}
|
|
590
|
+
],
|
|
591
|
+
"stateMutability": "view",
|
|
592
|
+
"type": "function"
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
"inputs": [],
|
|
596
|
+
"name": "taxWallet1",
|
|
597
|
+
"outputs": [
|
|
598
|
+
{
|
|
599
|
+
"internalType": "address",
|
|
600
|
+
"name": "",
|
|
601
|
+
"type": "address"
|
|
602
|
+
}
|
|
603
|
+
],
|
|
604
|
+
"stateMutability": "view",
|
|
605
|
+
"type": "function"
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
"inputs": [],
|
|
609
|
+
"name": "taxWallet2",
|
|
610
|
+
"outputs": [
|
|
611
|
+
{
|
|
612
|
+
"internalType": "address",
|
|
613
|
+
"name": "",
|
|
614
|
+
"type": "address"
|
|
615
|
+
}
|
|
616
|
+
],
|
|
617
|
+
"stateMutability": "view",
|
|
618
|
+
"type": "function"
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
"inputs": [],
|
|
622
|
+
"name": "totalSupply",
|
|
623
|
+
"outputs": [
|
|
624
|
+
{
|
|
625
|
+
"internalType": "uint256",
|
|
626
|
+
"name": "",
|
|
627
|
+
"type": "uint256"
|
|
628
|
+
}
|
|
629
|
+
],
|
|
630
|
+
"stateMutability": "view",
|
|
631
|
+
"type": "function"
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
"inputs": [],
|
|
635
|
+
"name": "tradingAllowed",
|
|
636
|
+
"outputs": [
|
|
637
|
+
{
|
|
638
|
+
"internalType": "bool",
|
|
639
|
+
"name": "",
|
|
640
|
+
"type": "bool"
|
|
641
|
+
}
|
|
642
|
+
],
|
|
643
|
+
"stateMutability": "view",
|
|
644
|
+
"type": "function"
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
"inputs": [
|
|
648
|
+
{
|
|
649
|
+
"internalType": "address",
|
|
650
|
+
"name": "to",
|
|
651
|
+
"type": "address"
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
"internalType": "uint256",
|
|
655
|
+
"name": "amount",
|
|
656
|
+
"type": "uint256"
|
|
657
|
+
}
|
|
658
|
+
],
|
|
659
|
+
"name": "transfer",
|
|
660
|
+
"outputs": [
|
|
661
|
+
{
|
|
662
|
+
"internalType": "bool",
|
|
663
|
+
"name": "",
|
|
664
|
+
"type": "bool"
|
|
665
|
+
}
|
|
666
|
+
],
|
|
667
|
+
"stateMutability": "nonpayable",
|
|
668
|
+
"type": "function"
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
"inputs": [
|
|
672
|
+
{
|
|
673
|
+
"internalType": "address",
|
|
674
|
+
"name": "from",
|
|
675
|
+
"type": "address"
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
"internalType": "address",
|
|
679
|
+
"name": "to",
|
|
680
|
+
"type": "address"
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
"internalType": "uint256",
|
|
684
|
+
"name": "amount",
|
|
685
|
+
"type": "uint256"
|
|
686
|
+
}
|
|
687
|
+
],
|
|
688
|
+
"name": "transferFrom",
|
|
689
|
+
"outputs": [
|
|
690
|
+
{
|
|
691
|
+
"internalType": "bool",
|
|
692
|
+
"name": "",
|
|
693
|
+
"type": "bool"
|
|
694
|
+
}
|
|
695
|
+
],
|
|
696
|
+
"stateMutability": "nonpayable",
|
|
697
|
+
"type": "function"
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
"inputs": [
|
|
701
|
+
{
|
|
702
|
+
"internalType": "address",
|
|
703
|
+
"name": "newOwner",
|
|
704
|
+
"type": "address"
|
|
705
|
+
}
|
|
706
|
+
],
|
|
707
|
+
"name": "transferOwnership",
|
|
708
|
+
"outputs": [],
|
|
709
|
+
"stateMutability": "nonpayable",
|
|
710
|
+
"type": "function"
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
"inputs": [
|
|
714
|
+
{
|
|
715
|
+
"internalType": "uint24",
|
|
716
|
+
"name": "_buyTax",
|
|
717
|
+
"type": "uint24"
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
"internalType": "uint24",
|
|
721
|
+
"name": "_sellTax",
|
|
722
|
+
"type": "uint24"
|
|
723
|
+
}
|
|
724
|
+
],
|
|
725
|
+
"name": "updateTax",
|
|
726
|
+
"outputs": [],
|
|
727
|
+
"stateMutability": "nonpayable",
|
|
728
|
+
"type": "function"
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
"inputs": [
|
|
732
|
+
{
|
|
733
|
+
"internalType": "address",
|
|
734
|
+
"name": "_address",
|
|
735
|
+
"type": "address"
|
|
736
|
+
}
|
|
737
|
+
],
|
|
738
|
+
"name": "updateTaxWallet1",
|
|
739
|
+
"outputs": [],
|
|
740
|
+
"stateMutability": "nonpayable",
|
|
741
|
+
"type": "function"
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
"inputs": [
|
|
745
|
+
{
|
|
746
|
+
"internalType": "address",
|
|
747
|
+
"name": "_address",
|
|
748
|
+
"type": "address"
|
|
749
|
+
}
|
|
750
|
+
],
|
|
751
|
+
"name": "updateTaxWallet2",
|
|
752
|
+
"outputs": [],
|
|
753
|
+
"stateMutability": "nonpayable",
|
|
754
|
+
"type": "function"
|
|
755
|
+
},
|
|
756
|
+
{
|
|
757
|
+
"stateMutability": "payable",
|
|
758
|
+
"type": "receive"
|
|
759
|
+
}
|
|
760
|
+
];
|
|
761
|
+
/**
|
|
762
|
+
* Fragma_json Contract Class
|
|
763
|
+
*
|
|
764
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
765
|
+
*
|
|
766
|
+
* @example
|
|
767
|
+
* ```typescript
|
|
768
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
769
|
+
* import { mainnet } from 'viem/chains';
|
|
770
|
+
* import { Fragma_json } from 'Fragma_json';
|
|
771
|
+
*
|
|
772
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
773
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
774
|
+
*
|
|
775
|
+
* const contract = new Fragma_json('0x...', { publicClient, walletClient });
|
|
776
|
+
*
|
|
777
|
+
* // Read functions
|
|
778
|
+
* const result = await contract.balanceOf('0x...');
|
|
779
|
+
*
|
|
780
|
+
* // Write functions
|
|
781
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
782
|
+
*
|
|
783
|
+
* // Simulate transactions (dry-run)
|
|
784
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
785
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
786
|
+
*
|
|
787
|
+
* // Watch events
|
|
788
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
789
|
+
* console.log('Transfer event:', event);
|
|
790
|
+
* });
|
|
791
|
+
* ```
|
|
792
|
+
*/
|
|
793
|
+
class Fragma_json {
|
|
794
|
+
constructor(address, clients) {
|
|
795
|
+
this.contractAddress = address;
|
|
796
|
+
this.publicClient = clients.publicClient;
|
|
797
|
+
this.contract = (0, viem_1.getContract)({
|
|
798
|
+
address,
|
|
799
|
+
abi: exports.Fragma_jsonAbi,
|
|
800
|
+
client: {
|
|
801
|
+
public: clients.publicClient,
|
|
802
|
+
wallet: clients.walletClient,
|
|
803
|
+
},
|
|
804
|
+
});
|
|
805
|
+
}
|
|
806
|
+
/**
|
|
807
|
+
* Get the contract address
|
|
808
|
+
*/
|
|
809
|
+
get address() {
|
|
810
|
+
return this.contractAddress;
|
|
811
|
+
}
|
|
812
|
+
/**
|
|
813
|
+
* Get the underlying viem contract instance
|
|
814
|
+
*/
|
|
815
|
+
getContract() {
|
|
816
|
+
return this.contract;
|
|
817
|
+
}
|
|
818
|
+
/**
|
|
819
|
+
* FEE_DIVISOR
|
|
820
|
+
* view
|
|
821
|
+
*/
|
|
822
|
+
async FEE_DIVISOR() {
|
|
823
|
+
return this.contract.read.FEE_DIVISOR();
|
|
824
|
+
}
|
|
825
|
+
/**
|
|
826
|
+
* WETH
|
|
827
|
+
* view
|
|
828
|
+
*/
|
|
829
|
+
async WETH() {
|
|
830
|
+
return this.contract.read.WETH();
|
|
831
|
+
}
|
|
832
|
+
/**
|
|
833
|
+
* allowance
|
|
834
|
+
* view
|
|
835
|
+
*/
|
|
836
|
+
async allowance(owner, spender) {
|
|
837
|
+
return this.contract.read.allowance([owner, spender]);
|
|
838
|
+
}
|
|
839
|
+
/**
|
|
840
|
+
* balanceOf
|
|
841
|
+
* view
|
|
842
|
+
*/
|
|
843
|
+
async balanceOf(account) {
|
|
844
|
+
return this.contract.read.balanceOf([account]);
|
|
845
|
+
}
|
|
846
|
+
/**
|
|
847
|
+
* buyTax
|
|
848
|
+
* view
|
|
849
|
+
*/
|
|
850
|
+
async buyTax() {
|
|
851
|
+
return this.contract.read.buyTax();
|
|
852
|
+
}
|
|
853
|
+
/**
|
|
854
|
+
* decimals
|
|
855
|
+
* view
|
|
856
|
+
*/
|
|
857
|
+
async decimals() {
|
|
858
|
+
return this.contract.read.decimals();
|
|
859
|
+
}
|
|
860
|
+
/**
|
|
861
|
+
* dexRouter
|
|
862
|
+
* view
|
|
863
|
+
*/
|
|
864
|
+
async dexRouter() {
|
|
865
|
+
return this.contract.read.dexRouter();
|
|
866
|
+
}
|
|
867
|
+
/**
|
|
868
|
+
* exemptFromFees
|
|
869
|
+
* view
|
|
870
|
+
*/
|
|
871
|
+
async exemptFromFees(arg0) {
|
|
872
|
+
return this.contract.read.exemptFromFees([arg0]);
|
|
873
|
+
}
|
|
874
|
+
/**
|
|
875
|
+
* exemptFromLimits
|
|
876
|
+
* view
|
|
877
|
+
*/
|
|
878
|
+
async exemptFromLimits(arg0) {
|
|
879
|
+
return this.contract.read.exemptFromLimits([arg0]);
|
|
880
|
+
}
|
|
881
|
+
/**
|
|
882
|
+
* isAMMPair
|
|
883
|
+
* view
|
|
884
|
+
*/
|
|
885
|
+
async isAMMPair(arg0) {
|
|
886
|
+
return this.contract.read.isAMMPair([arg0]);
|
|
887
|
+
}
|
|
888
|
+
/**
|
|
889
|
+
* lastSwapBackBlock
|
|
890
|
+
* view
|
|
891
|
+
*/
|
|
892
|
+
async lastSwapBackBlock() {
|
|
893
|
+
return this.contract.read.lastSwapBackBlock();
|
|
894
|
+
}
|
|
895
|
+
/**
|
|
896
|
+
* launchTimestamp
|
|
897
|
+
* view
|
|
898
|
+
*/
|
|
899
|
+
async launchTimestamp() {
|
|
900
|
+
return this.contract.read.launchTimestamp();
|
|
901
|
+
}
|
|
902
|
+
/**
|
|
903
|
+
* lpPair
|
|
904
|
+
* view
|
|
905
|
+
*/
|
|
906
|
+
async lpPair() {
|
|
907
|
+
return this.contract.read.lpPair();
|
|
908
|
+
}
|
|
909
|
+
/**
|
|
910
|
+
* name
|
|
911
|
+
* view
|
|
912
|
+
*/
|
|
913
|
+
async name() {
|
|
914
|
+
return this.contract.read.name();
|
|
915
|
+
}
|
|
916
|
+
/**
|
|
917
|
+
* owner
|
|
918
|
+
* view
|
|
919
|
+
*/
|
|
920
|
+
async owner() {
|
|
921
|
+
return this.contract.read.owner();
|
|
922
|
+
}
|
|
923
|
+
/**
|
|
924
|
+
* sellTax
|
|
925
|
+
* view
|
|
926
|
+
*/
|
|
927
|
+
async sellTax() {
|
|
928
|
+
return this.contract.read.sellTax();
|
|
929
|
+
}
|
|
930
|
+
/**
|
|
931
|
+
* swapTokensAtAmt
|
|
932
|
+
* view
|
|
933
|
+
*/
|
|
934
|
+
async swapTokensAtAmt() {
|
|
935
|
+
return this.contract.read.swapTokensAtAmt();
|
|
936
|
+
}
|
|
937
|
+
/**
|
|
938
|
+
* symbol
|
|
939
|
+
* view
|
|
940
|
+
*/
|
|
941
|
+
async symbol() {
|
|
942
|
+
return this.contract.read.symbol();
|
|
943
|
+
}
|
|
944
|
+
/**
|
|
945
|
+
* taxWallet1
|
|
946
|
+
* view
|
|
947
|
+
*/
|
|
948
|
+
async taxWallet1() {
|
|
949
|
+
return this.contract.read.taxWallet1();
|
|
950
|
+
}
|
|
951
|
+
/**
|
|
952
|
+
* taxWallet2
|
|
953
|
+
* view
|
|
954
|
+
*/
|
|
955
|
+
async taxWallet2() {
|
|
956
|
+
return this.contract.read.taxWallet2();
|
|
957
|
+
}
|
|
958
|
+
/**
|
|
959
|
+
* totalSupply
|
|
960
|
+
* view
|
|
961
|
+
*/
|
|
962
|
+
async totalSupply() {
|
|
963
|
+
return this.contract.read.totalSupply();
|
|
964
|
+
}
|
|
965
|
+
/**
|
|
966
|
+
* tradingAllowed
|
|
967
|
+
* view
|
|
968
|
+
*/
|
|
969
|
+
async tradingAllowed() {
|
|
970
|
+
return this.contract.read.tradingAllowed();
|
|
971
|
+
}
|
|
972
|
+
/**
|
|
973
|
+
* airdropToWallets
|
|
974
|
+
* nonpayable
|
|
975
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
976
|
+
*/
|
|
977
|
+
async airdropToWallets(wallets, amountsInWei, options) {
|
|
978
|
+
if (!this.contract.write) {
|
|
979
|
+
throw new Error('Wallet client is required for write operations');
|
|
980
|
+
}
|
|
981
|
+
return this.contract.write.airdropToWallets([wallets, amountsInWei], options);
|
|
982
|
+
}
|
|
983
|
+
/**
|
|
984
|
+
* approve
|
|
985
|
+
* nonpayable
|
|
986
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
987
|
+
*/
|
|
988
|
+
async approve(spender, amount, options) {
|
|
989
|
+
if (!this.contract.write) {
|
|
990
|
+
throw new Error('Wallet client is required for write operations');
|
|
991
|
+
}
|
|
992
|
+
return this.contract.write.approve([spender, amount], options);
|
|
993
|
+
}
|
|
994
|
+
/**
|
|
995
|
+
* decreaseAllowance
|
|
996
|
+
* nonpayable
|
|
997
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
998
|
+
*/
|
|
999
|
+
async decreaseAllowance(spender, subtractedValue, options) {
|
|
1000
|
+
if (!this.contract.write) {
|
|
1001
|
+
throw new Error('Wallet client is required for write operations');
|
|
1002
|
+
}
|
|
1003
|
+
return this.contract.write.decreaseAllowance([spender, subtractedValue], options);
|
|
1004
|
+
}
|
|
1005
|
+
/**
|
|
1006
|
+
* enableTrading
|
|
1007
|
+
* nonpayable
|
|
1008
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1009
|
+
*/
|
|
1010
|
+
async enableTrading(options) {
|
|
1011
|
+
if (!this.contract.write) {
|
|
1012
|
+
throw new Error('Wallet client is required for write operations');
|
|
1013
|
+
}
|
|
1014
|
+
return this.contract.write.enableTrading(options);
|
|
1015
|
+
}
|
|
1016
|
+
/**
|
|
1017
|
+
* increaseAllowance
|
|
1018
|
+
* nonpayable
|
|
1019
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1020
|
+
*/
|
|
1021
|
+
async increaseAllowance(spender, addedValue, options) {
|
|
1022
|
+
if (!this.contract.write) {
|
|
1023
|
+
throw new Error('Wallet client is required for write operations');
|
|
1024
|
+
}
|
|
1025
|
+
return this.contract.write.increaseAllowance([spender, addedValue], options);
|
|
1026
|
+
}
|
|
1027
|
+
/**
|
|
1028
|
+
* manualConvert
|
|
1029
|
+
* nonpayable
|
|
1030
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1031
|
+
*/
|
|
1032
|
+
async manualConvert(percentToConvert, options) {
|
|
1033
|
+
if (!this.contract.write) {
|
|
1034
|
+
throw new Error('Wallet client is required for write operations');
|
|
1035
|
+
}
|
|
1036
|
+
return this.contract.write.manualConvert([percentToConvert], options);
|
|
1037
|
+
}
|
|
1038
|
+
/**
|
|
1039
|
+
* renounceOwnership
|
|
1040
|
+
* nonpayable
|
|
1041
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1042
|
+
*/
|
|
1043
|
+
async renounceOwnership(options) {
|
|
1044
|
+
if (!this.contract.write) {
|
|
1045
|
+
throw new Error('Wallet client is required for write operations');
|
|
1046
|
+
}
|
|
1047
|
+
return this.contract.write.renounceOwnership(options);
|
|
1048
|
+
}
|
|
1049
|
+
/**
|
|
1050
|
+
* setExemptFromFee
|
|
1051
|
+
* nonpayable
|
|
1052
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1053
|
+
*/
|
|
1054
|
+
async setExemptFromFee(_address, _isExcluded, options) {
|
|
1055
|
+
if (!this.contract.write) {
|
|
1056
|
+
throw new Error('Wallet client is required for write operations');
|
|
1057
|
+
}
|
|
1058
|
+
return this.contract.write.setExemptFromFee([_address, _isExcluded], options);
|
|
1059
|
+
}
|
|
1060
|
+
/**
|
|
1061
|
+
* setExemptFromLimits
|
|
1062
|
+
* nonpayable
|
|
1063
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1064
|
+
*/
|
|
1065
|
+
async setExemptFromLimits(_address, _isExcluded, options) {
|
|
1066
|
+
if (!this.contract.write) {
|
|
1067
|
+
throw new Error('Wallet client is required for write operations');
|
|
1068
|
+
}
|
|
1069
|
+
return this.contract.write.setExemptFromLimits([_address, _isExcluded], options);
|
|
1070
|
+
}
|
|
1071
|
+
/**
|
|
1072
|
+
* transfer
|
|
1073
|
+
* nonpayable
|
|
1074
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1075
|
+
*/
|
|
1076
|
+
async transfer(to, amount, options) {
|
|
1077
|
+
if (!this.contract.write) {
|
|
1078
|
+
throw new Error('Wallet client is required for write operations');
|
|
1079
|
+
}
|
|
1080
|
+
return this.contract.write.transfer([to, amount], options);
|
|
1081
|
+
}
|
|
1082
|
+
/**
|
|
1083
|
+
* transferFrom
|
|
1084
|
+
* nonpayable
|
|
1085
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1086
|
+
*/
|
|
1087
|
+
async transferFrom(from, to, amount, options) {
|
|
1088
|
+
if (!this.contract.write) {
|
|
1089
|
+
throw new Error('Wallet client is required for write operations');
|
|
1090
|
+
}
|
|
1091
|
+
return this.contract.write.transferFrom([from, to, amount], options);
|
|
1092
|
+
}
|
|
1093
|
+
/**
|
|
1094
|
+
* transferOwnership
|
|
1095
|
+
* nonpayable
|
|
1096
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1097
|
+
*/
|
|
1098
|
+
async transferOwnership(newOwner, options) {
|
|
1099
|
+
if (!this.contract.write) {
|
|
1100
|
+
throw new Error('Wallet client is required for write operations');
|
|
1101
|
+
}
|
|
1102
|
+
return this.contract.write.transferOwnership([newOwner], options);
|
|
1103
|
+
}
|
|
1104
|
+
/**
|
|
1105
|
+
* updateTax
|
|
1106
|
+
* nonpayable
|
|
1107
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1108
|
+
*/
|
|
1109
|
+
async updateTax(_buyTax, _sellTax, options) {
|
|
1110
|
+
if (!this.contract.write) {
|
|
1111
|
+
throw new Error('Wallet client is required for write operations');
|
|
1112
|
+
}
|
|
1113
|
+
return this.contract.write.updateTax([_buyTax, _sellTax], options);
|
|
1114
|
+
}
|
|
1115
|
+
/**
|
|
1116
|
+
* updateTaxWallet1
|
|
1117
|
+
* nonpayable
|
|
1118
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1119
|
+
*/
|
|
1120
|
+
async updateTaxWallet1(_address, options) {
|
|
1121
|
+
if (!this.contract.write) {
|
|
1122
|
+
throw new Error('Wallet client is required for write operations');
|
|
1123
|
+
}
|
|
1124
|
+
return this.contract.write.updateTaxWallet1([_address], options);
|
|
1125
|
+
}
|
|
1126
|
+
/**
|
|
1127
|
+
* updateTaxWallet2
|
|
1128
|
+
* nonpayable
|
|
1129
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1130
|
+
*/
|
|
1131
|
+
async updateTaxWallet2(_address, options) {
|
|
1132
|
+
if (!this.contract.write) {
|
|
1133
|
+
throw new Error('Wallet client is required for write operations');
|
|
1134
|
+
}
|
|
1135
|
+
return this.contract.write.updateTaxWallet2([_address], options);
|
|
1136
|
+
}
|
|
1137
|
+
/**
|
|
1138
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
1139
|
+
*
|
|
1140
|
+
* @example
|
|
1141
|
+
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
1142
|
+
* console.log('Gas estimate:', result.request.gas);
|
|
1143
|
+
* console.log('Would succeed:', result.result);
|
|
1144
|
+
*/
|
|
1145
|
+
get simulate() {
|
|
1146
|
+
const contract = this.contract;
|
|
1147
|
+
if (!contract.simulate) {
|
|
1148
|
+
throw new Error('Public client is required for simulation');
|
|
1149
|
+
}
|
|
1150
|
+
return {
|
|
1151
|
+
/**
|
|
1152
|
+
* Simulate airdropToWallets
|
|
1153
|
+
* Returns gas estimate and result without sending transaction
|
|
1154
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1155
|
+
*/
|
|
1156
|
+
async airdropToWallets(wallets, amountsInWei, options) {
|
|
1157
|
+
return contract.simulate.airdropToWallets([wallets, amountsInWei], options);
|
|
1158
|
+
},
|
|
1159
|
+
/**
|
|
1160
|
+
* Simulate approve
|
|
1161
|
+
* Returns gas estimate and result without sending transaction
|
|
1162
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1163
|
+
*/
|
|
1164
|
+
async approve(spender, amount, options) {
|
|
1165
|
+
return contract.simulate.approve([spender, amount], options);
|
|
1166
|
+
},
|
|
1167
|
+
/**
|
|
1168
|
+
* Simulate decreaseAllowance
|
|
1169
|
+
* Returns gas estimate and result without sending transaction
|
|
1170
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1171
|
+
*/
|
|
1172
|
+
async decreaseAllowance(spender, subtractedValue, options) {
|
|
1173
|
+
return contract.simulate.decreaseAllowance([spender, subtractedValue], options);
|
|
1174
|
+
},
|
|
1175
|
+
/**
|
|
1176
|
+
* Simulate enableTrading
|
|
1177
|
+
* Returns gas estimate and result without sending transaction
|
|
1178
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1179
|
+
*/
|
|
1180
|
+
async enableTrading(options) {
|
|
1181
|
+
return contract.simulate.enableTrading(options);
|
|
1182
|
+
},
|
|
1183
|
+
/**
|
|
1184
|
+
* Simulate increaseAllowance
|
|
1185
|
+
* Returns gas estimate and result without sending transaction
|
|
1186
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1187
|
+
*/
|
|
1188
|
+
async increaseAllowance(spender, addedValue, options) {
|
|
1189
|
+
return contract.simulate.increaseAllowance([spender, addedValue], options);
|
|
1190
|
+
},
|
|
1191
|
+
/**
|
|
1192
|
+
* Simulate manualConvert
|
|
1193
|
+
* Returns gas estimate and result without sending transaction
|
|
1194
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1195
|
+
*/
|
|
1196
|
+
async manualConvert(percentToConvert, options) {
|
|
1197
|
+
return contract.simulate.manualConvert([percentToConvert], options);
|
|
1198
|
+
},
|
|
1199
|
+
/**
|
|
1200
|
+
* Simulate renounceOwnership
|
|
1201
|
+
* Returns gas estimate and result without sending transaction
|
|
1202
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1203
|
+
*/
|
|
1204
|
+
async renounceOwnership(options) {
|
|
1205
|
+
return contract.simulate.renounceOwnership(options);
|
|
1206
|
+
},
|
|
1207
|
+
/**
|
|
1208
|
+
* Simulate setExemptFromFee
|
|
1209
|
+
* Returns gas estimate and result without sending transaction
|
|
1210
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1211
|
+
*/
|
|
1212
|
+
async setExemptFromFee(_address, _isExcluded, options) {
|
|
1213
|
+
return contract.simulate.setExemptFromFee([_address, _isExcluded], options);
|
|
1214
|
+
},
|
|
1215
|
+
/**
|
|
1216
|
+
* Simulate setExemptFromLimits
|
|
1217
|
+
* Returns gas estimate and result without sending transaction
|
|
1218
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1219
|
+
*/
|
|
1220
|
+
async setExemptFromLimits(_address, _isExcluded, options) {
|
|
1221
|
+
return contract.simulate.setExemptFromLimits([_address, _isExcluded], options);
|
|
1222
|
+
},
|
|
1223
|
+
/**
|
|
1224
|
+
* Simulate transfer
|
|
1225
|
+
* Returns gas estimate and result without sending transaction
|
|
1226
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1227
|
+
*/
|
|
1228
|
+
async transfer(to, amount, options) {
|
|
1229
|
+
return contract.simulate.transfer([to, amount], options);
|
|
1230
|
+
},
|
|
1231
|
+
/**
|
|
1232
|
+
* Simulate transferFrom
|
|
1233
|
+
* Returns gas estimate and result without sending transaction
|
|
1234
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1235
|
+
*/
|
|
1236
|
+
async transferFrom(from, to, amount, options) {
|
|
1237
|
+
return contract.simulate.transferFrom([from, to, amount], options);
|
|
1238
|
+
},
|
|
1239
|
+
/**
|
|
1240
|
+
* Simulate transferOwnership
|
|
1241
|
+
* Returns gas estimate and result without sending transaction
|
|
1242
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1243
|
+
*/
|
|
1244
|
+
async transferOwnership(newOwner, options) {
|
|
1245
|
+
return contract.simulate.transferOwnership([newOwner], options);
|
|
1246
|
+
},
|
|
1247
|
+
/**
|
|
1248
|
+
* Simulate updateTax
|
|
1249
|
+
* Returns gas estimate and result without sending transaction
|
|
1250
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1251
|
+
*/
|
|
1252
|
+
async updateTax(_buyTax, _sellTax, options) {
|
|
1253
|
+
return contract.simulate.updateTax([_buyTax, _sellTax], options);
|
|
1254
|
+
},
|
|
1255
|
+
/**
|
|
1256
|
+
* Simulate updateTaxWallet1
|
|
1257
|
+
* Returns gas estimate and result without sending transaction
|
|
1258
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1259
|
+
*/
|
|
1260
|
+
async updateTaxWallet1(_address, options) {
|
|
1261
|
+
return contract.simulate.updateTaxWallet1([_address], options);
|
|
1262
|
+
},
|
|
1263
|
+
/**
|
|
1264
|
+
* Simulate updateTaxWallet2
|
|
1265
|
+
* Returns gas estimate and result without sending transaction
|
|
1266
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1267
|
+
*/
|
|
1268
|
+
async updateTaxWallet2(_address, options) {
|
|
1269
|
+
return contract.simulate.updateTaxWallet2([_address], options);
|
|
1270
|
+
}
|
|
1271
|
+
};
|
|
1272
|
+
}
|
|
1273
|
+
/**
|
|
1274
|
+
* Watch contract events
|
|
1275
|
+
*
|
|
1276
|
+
* @example
|
|
1277
|
+
* // Watch all Transfer events
|
|
1278
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
1279
|
+
* console.log('Transfer:', event);
|
|
1280
|
+
* });
|
|
1281
|
+
*
|
|
1282
|
+
* // Stop watching
|
|
1283
|
+
* unwatch();
|
|
1284
|
+
*/
|
|
1285
|
+
get watch() {
|
|
1286
|
+
return {
|
|
1287
|
+
/**
|
|
1288
|
+
* Watch Approval events
|
|
1289
|
+
* @param callback Function to call when event is emitted
|
|
1290
|
+
* @param filter Optional filter for indexed parameters
|
|
1291
|
+
* @returns Unwatch function to stop listening
|
|
1292
|
+
*/
|
|
1293
|
+
Approval: (callback, filter) => {
|
|
1294
|
+
return this.publicClient.watchContractEvent({
|
|
1295
|
+
address: this.contractAddress,
|
|
1296
|
+
abi: exports.Fragma_jsonAbi,
|
|
1297
|
+
eventName: 'Approval',
|
|
1298
|
+
args: filter,
|
|
1299
|
+
onLogs: (logs) => {
|
|
1300
|
+
logs.forEach((log) => {
|
|
1301
|
+
callback(log.args);
|
|
1302
|
+
});
|
|
1303
|
+
},
|
|
1304
|
+
});
|
|
1305
|
+
},
|
|
1306
|
+
/**
|
|
1307
|
+
* Watch OwnershipTransferred events
|
|
1308
|
+
* @param callback Function to call when event is emitted
|
|
1309
|
+
* @param filter Optional filter for indexed parameters
|
|
1310
|
+
* @returns Unwatch function to stop listening
|
|
1311
|
+
*/
|
|
1312
|
+
OwnershipTransferred: (callback, filter) => {
|
|
1313
|
+
return this.publicClient.watchContractEvent({
|
|
1314
|
+
address: this.contractAddress,
|
|
1315
|
+
abi: exports.Fragma_jsonAbi,
|
|
1316
|
+
eventName: 'OwnershipTransferred',
|
|
1317
|
+
args: filter,
|
|
1318
|
+
onLogs: (logs) => {
|
|
1319
|
+
logs.forEach((log) => {
|
|
1320
|
+
callback(log.args);
|
|
1321
|
+
});
|
|
1322
|
+
},
|
|
1323
|
+
});
|
|
1324
|
+
},
|
|
1325
|
+
/**
|
|
1326
|
+
* Watch RemovedLimits events
|
|
1327
|
+
* @param callback Function to call when event is emitted
|
|
1328
|
+
* @param filter Optional filter for indexed parameters
|
|
1329
|
+
* @returns Unwatch function to stop listening
|
|
1330
|
+
*/
|
|
1331
|
+
RemovedLimits: (callback) => {
|
|
1332
|
+
return this.publicClient.watchContractEvent({
|
|
1333
|
+
address: this.contractAddress,
|
|
1334
|
+
abi: exports.Fragma_jsonAbi,
|
|
1335
|
+
eventName: 'RemovedLimits',
|
|
1336
|
+
onLogs: (logs) => {
|
|
1337
|
+
logs.forEach((log) => {
|
|
1338
|
+
callback(log.args);
|
|
1339
|
+
});
|
|
1340
|
+
},
|
|
1341
|
+
});
|
|
1342
|
+
},
|
|
1343
|
+
/**
|
|
1344
|
+
* Watch SetExcludedFromFees events
|
|
1345
|
+
* @param callback Function to call when event is emitted
|
|
1346
|
+
* @param filter Optional filter for indexed parameters
|
|
1347
|
+
* @returns Unwatch function to stop listening
|
|
1348
|
+
*/
|
|
1349
|
+
SetExcludedFromFees: (callback) => {
|
|
1350
|
+
return this.publicClient.watchContractEvent({
|
|
1351
|
+
address: this.contractAddress,
|
|
1352
|
+
abi: exports.Fragma_jsonAbi,
|
|
1353
|
+
eventName: 'SetExcludedFromFees',
|
|
1354
|
+
onLogs: (logs) => {
|
|
1355
|
+
logs.forEach((log) => {
|
|
1356
|
+
callback(log.args);
|
|
1357
|
+
});
|
|
1358
|
+
},
|
|
1359
|
+
});
|
|
1360
|
+
},
|
|
1361
|
+
/**
|
|
1362
|
+
* Watch SetExcludedFromLimits events
|
|
1363
|
+
* @param callback Function to call when event is emitted
|
|
1364
|
+
* @param filter Optional filter for indexed parameters
|
|
1365
|
+
* @returns Unwatch function to stop listening
|
|
1366
|
+
*/
|
|
1367
|
+
SetExcludedFromLimits: (callback) => {
|
|
1368
|
+
return this.publicClient.watchContractEvent({
|
|
1369
|
+
address: this.contractAddress,
|
|
1370
|
+
abi: exports.Fragma_jsonAbi,
|
|
1371
|
+
eventName: 'SetExcludedFromLimits',
|
|
1372
|
+
onLogs: (logs) => {
|
|
1373
|
+
logs.forEach((log) => {
|
|
1374
|
+
callback(log.args);
|
|
1375
|
+
});
|
|
1376
|
+
},
|
|
1377
|
+
});
|
|
1378
|
+
},
|
|
1379
|
+
/**
|
|
1380
|
+
* Watch TaxUpdated events
|
|
1381
|
+
* @param callback Function to call when event is emitted
|
|
1382
|
+
* @param filter Optional filter for indexed parameters
|
|
1383
|
+
* @returns Unwatch function to stop listening
|
|
1384
|
+
*/
|
|
1385
|
+
TaxUpdated: (callback) => {
|
|
1386
|
+
return this.publicClient.watchContractEvent({
|
|
1387
|
+
address: this.contractAddress,
|
|
1388
|
+
abi: exports.Fragma_jsonAbi,
|
|
1389
|
+
eventName: 'TaxUpdated',
|
|
1390
|
+
onLogs: (logs) => {
|
|
1391
|
+
logs.forEach((log) => {
|
|
1392
|
+
callback(log.args);
|
|
1393
|
+
});
|
|
1394
|
+
},
|
|
1395
|
+
});
|
|
1396
|
+
},
|
|
1397
|
+
/**
|
|
1398
|
+
* Watch Transfer events
|
|
1399
|
+
* @param callback Function to call when event is emitted
|
|
1400
|
+
* @param filter Optional filter for indexed parameters
|
|
1401
|
+
* @returns Unwatch function to stop listening
|
|
1402
|
+
*/
|
|
1403
|
+
Transfer: (callback, filter) => {
|
|
1404
|
+
return this.publicClient.watchContractEvent({
|
|
1405
|
+
address: this.contractAddress,
|
|
1406
|
+
abi: exports.Fragma_jsonAbi,
|
|
1407
|
+
eventName: 'Transfer',
|
|
1408
|
+
args: filter,
|
|
1409
|
+
onLogs: (logs) => {
|
|
1410
|
+
logs.forEach((log) => {
|
|
1411
|
+
callback(log.args);
|
|
1412
|
+
});
|
|
1413
|
+
},
|
|
1414
|
+
});
|
|
1415
|
+
},
|
|
1416
|
+
/**
|
|
1417
|
+
* Watch UpdatedWalletLimit events
|
|
1418
|
+
* @param callback Function to call when event is emitted
|
|
1419
|
+
* @param filter Optional filter for indexed parameters
|
|
1420
|
+
* @returns Unwatch function to stop listening
|
|
1421
|
+
*/
|
|
1422
|
+
UpdatedWalletLimit: (callback) => {
|
|
1423
|
+
return this.publicClient.watchContractEvent({
|
|
1424
|
+
address: this.contractAddress,
|
|
1425
|
+
abi: exports.Fragma_jsonAbi,
|
|
1426
|
+
eventName: 'UpdatedWalletLimit',
|
|
1427
|
+
onLogs: (logs) => {
|
|
1428
|
+
logs.forEach((log) => {
|
|
1429
|
+
callback(log.args);
|
|
1430
|
+
});
|
|
1431
|
+
},
|
|
1432
|
+
});
|
|
1433
|
+
}
|
|
1434
|
+
};
|
|
1435
|
+
}
|
|
1436
|
+
}
|
|
1437
|
+
exports.Fragma_json = Fragma_json;
|