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