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