@gitmyabi/clockinv2 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +108 -0
- package/contracts/ClockInV2_json.d.ts +956 -0
- package/contracts/ClockInV2_json.js +1056 -0
- package/contracts/ClockInV2_json.ts +1288 -0
- package/contracts/index.d.ts +2 -0
- package/contracts/index.js +7 -0
- package/contracts/index.ts +3 -0
- package/index.d.ts +1 -0
- package/index.js +19 -0
- package/package.json +43 -0
|
@@ -0,0 +1,956 @@
|
|
|
1
|
+
import type { Address, PublicClient, WalletClient } from 'viem';
|
|
2
|
+
/**
|
|
3
|
+
* ClockInV2_json ABI
|
|
4
|
+
*
|
|
5
|
+
* This ABI is typed using viem's type system for full type safety.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ClockInV2_jsonAbi: readonly [{
|
|
8
|
+
readonly inputs: readonly [{
|
|
9
|
+
readonly internalType: "address";
|
|
10
|
+
readonly name: "nft_";
|
|
11
|
+
readonly type: "address";
|
|
12
|
+
}, {
|
|
13
|
+
readonly internalType: "address";
|
|
14
|
+
readonly name: "activations_";
|
|
15
|
+
readonly type: "address";
|
|
16
|
+
}, {
|
|
17
|
+
readonly internalType: "address";
|
|
18
|
+
readonly name: "v1_";
|
|
19
|
+
readonly type: "address";
|
|
20
|
+
}, {
|
|
21
|
+
readonly internalType: "uint256";
|
|
22
|
+
readonly name: "anchor_";
|
|
23
|
+
readonly type: "uint256";
|
|
24
|
+
}];
|
|
25
|
+
readonly stateMutability: "nonpayable";
|
|
26
|
+
readonly type: "constructor";
|
|
27
|
+
}, {
|
|
28
|
+
readonly inputs: readonly [];
|
|
29
|
+
readonly name: "AlreadyClockedInThisPeriod";
|
|
30
|
+
readonly type: "error";
|
|
31
|
+
}, {
|
|
32
|
+
readonly inputs: readonly [];
|
|
33
|
+
readonly name: "EnforcedPause";
|
|
34
|
+
readonly type: "error";
|
|
35
|
+
}, {
|
|
36
|
+
readonly inputs: readonly [];
|
|
37
|
+
readonly name: "EquipmentIsLocked";
|
|
38
|
+
readonly type: "error";
|
|
39
|
+
}, {
|
|
40
|
+
readonly inputs: readonly [];
|
|
41
|
+
readonly name: "ExpectedPause";
|
|
42
|
+
readonly type: "error";
|
|
43
|
+
}, {
|
|
44
|
+
readonly inputs: readonly [];
|
|
45
|
+
readonly name: "NotActivated";
|
|
46
|
+
readonly type: "error";
|
|
47
|
+
}, {
|
|
48
|
+
readonly inputs: readonly [];
|
|
49
|
+
readonly name: "NotStarted";
|
|
50
|
+
readonly type: "error";
|
|
51
|
+
}, {
|
|
52
|
+
readonly inputs: readonly [];
|
|
53
|
+
readonly name: "NotTokenOwner";
|
|
54
|
+
readonly type: "error";
|
|
55
|
+
}, {
|
|
56
|
+
readonly inputs: readonly [];
|
|
57
|
+
readonly name: "NothingPunched";
|
|
58
|
+
readonly type: "error";
|
|
59
|
+
}, {
|
|
60
|
+
readonly inputs: readonly [{
|
|
61
|
+
readonly internalType: "address";
|
|
62
|
+
readonly name: "owner";
|
|
63
|
+
readonly type: "address";
|
|
64
|
+
}];
|
|
65
|
+
readonly name: "OwnableInvalidOwner";
|
|
66
|
+
readonly type: "error";
|
|
67
|
+
}, {
|
|
68
|
+
readonly inputs: readonly [{
|
|
69
|
+
readonly internalType: "address";
|
|
70
|
+
readonly name: "account";
|
|
71
|
+
readonly type: "address";
|
|
72
|
+
}];
|
|
73
|
+
readonly name: "OwnableUnauthorizedAccount";
|
|
74
|
+
readonly type: "error";
|
|
75
|
+
}, {
|
|
76
|
+
readonly inputs: readonly [];
|
|
77
|
+
readonly name: "ZeroAddress";
|
|
78
|
+
readonly type: "error";
|
|
79
|
+
}, {
|
|
80
|
+
readonly anonymous: false;
|
|
81
|
+
readonly inputs: readonly [{
|
|
82
|
+
readonly indexed: true;
|
|
83
|
+
readonly internalType: "uint256";
|
|
84
|
+
readonly name: "tokenId";
|
|
85
|
+
readonly type: "uint256";
|
|
86
|
+
}, {
|
|
87
|
+
readonly indexed: true;
|
|
88
|
+
readonly internalType: "address";
|
|
89
|
+
readonly name: "by";
|
|
90
|
+
readonly type: "address";
|
|
91
|
+
}, {
|
|
92
|
+
readonly indexed: false;
|
|
93
|
+
readonly internalType: "uint32";
|
|
94
|
+
readonly name: "period";
|
|
95
|
+
readonly type: "uint32";
|
|
96
|
+
}, {
|
|
97
|
+
readonly indexed: false;
|
|
98
|
+
readonly internalType: "uint32";
|
|
99
|
+
readonly name: "streak";
|
|
100
|
+
readonly type: "uint32";
|
|
101
|
+
}];
|
|
102
|
+
readonly name: "ClockedIn";
|
|
103
|
+
readonly type: "event";
|
|
104
|
+
}, {
|
|
105
|
+
readonly anonymous: false;
|
|
106
|
+
readonly inputs: readonly [{
|
|
107
|
+
readonly indexed: true;
|
|
108
|
+
readonly internalType: "address";
|
|
109
|
+
readonly name: "newEquipment";
|
|
110
|
+
readonly type: "address";
|
|
111
|
+
}];
|
|
112
|
+
readonly name: "EquipmentUpgraded";
|
|
113
|
+
readonly type: "event";
|
|
114
|
+
}, {
|
|
115
|
+
readonly anonymous: false;
|
|
116
|
+
readonly inputs: readonly [{
|
|
117
|
+
readonly indexed: true;
|
|
118
|
+
readonly internalType: "address";
|
|
119
|
+
readonly name: "previousOwner";
|
|
120
|
+
readonly type: "address";
|
|
121
|
+
}, {
|
|
122
|
+
readonly indexed: true;
|
|
123
|
+
readonly internalType: "address";
|
|
124
|
+
readonly name: "newOwner";
|
|
125
|
+
readonly type: "address";
|
|
126
|
+
}];
|
|
127
|
+
readonly name: "OwnershipTransferStarted";
|
|
128
|
+
readonly type: "event";
|
|
129
|
+
}, {
|
|
130
|
+
readonly anonymous: false;
|
|
131
|
+
readonly inputs: readonly [{
|
|
132
|
+
readonly indexed: true;
|
|
133
|
+
readonly internalType: "address";
|
|
134
|
+
readonly name: "previousOwner";
|
|
135
|
+
readonly type: "address";
|
|
136
|
+
}, {
|
|
137
|
+
readonly indexed: true;
|
|
138
|
+
readonly internalType: "address";
|
|
139
|
+
readonly name: "newOwner";
|
|
140
|
+
readonly type: "address";
|
|
141
|
+
}];
|
|
142
|
+
readonly name: "OwnershipTransferred";
|
|
143
|
+
readonly type: "event";
|
|
144
|
+
}, {
|
|
145
|
+
readonly anonymous: false;
|
|
146
|
+
readonly inputs: readonly [{
|
|
147
|
+
readonly indexed: false;
|
|
148
|
+
readonly internalType: "address";
|
|
149
|
+
readonly name: "account";
|
|
150
|
+
readonly type: "address";
|
|
151
|
+
}];
|
|
152
|
+
readonly name: "Paused";
|
|
153
|
+
readonly type: "event";
|
|
154
|
+
}, {
|
|
155
|
+
readonly anonymous: false;
|
|
156
|
+
readonly inputs: readonly [{
|
|
157
|
+
readonly indexed: false;
|
|
158
|
+
readonly internalType: "address";
|
|
159
|
+
readonly name: "account";
|
|
160
|
+
readonly type: "address";
|
|
161
|
+
}];
|
|
162
|
+
readonly name: "Unpaused";
|
|
163
|
+
readonly type: "event";
|
|
164
|
+
}, {
|
|
165
|
+
readonly inputs: readonly [];
|
|
166
|
+
readonly name: "ONE";
|
|
167
|
+
readonly outputs: readonly [{
|
|
168
|
+
readonly internalType: "uint256";
|
|
169
|
+
readonly name: "";
|
|
170
|
+
readonly type: "uint256";
|
|
171
|
+
}];
|
|
172
|
+
readonly stateMutability: "view";
|
|
173
|
+
readonly type: "function";
|
|
174
|
+
}, {
|
|
175
|
+
readonly inputs: readonly [];
|
|
176
|
+
readonly name: "PERIOD";
|
|
177
|
+
readonly outputs: readonly [{
|
|
178
|
+
readonly internalType: "uint256";
|
|
179
|
+
readonly name: "";
|
|
180
|
+
readonly type: "uint256";
|
|
181
|
+
}];
|
|
182
|
+
readonly stateMutability: "view";
|
|
183
|
+
readonly type: "function";
|
|
184
|
+
}, {
|
|
185
|
+
readonly inputs: readonly [];
|
|
186
|
+
readonly name: "STREAK_CAP_PERIODS";
|
|
187
|
+
readonly outputs: readonly [{
|
|
188
|
+
readonly internalType: "uint256";
|
|
189
|
+
readonly name: "";
|
|
190
|
+
readonly type: "uint256";
|
|
191
|
+
}];
|
|
192
|
+
readonly stateMutability: "view";
|
|
193
|
+
readonly type: "function";
|
|
194
|
+
}, {
|
|
195
|
+
readonly inputs: readonly [];
|
|
196
|
+
readonly name: "STREAK_STEP";
|
|
197
|
+
readonly outputs: readonly [{
|
|
198
|
+
readonly internalType: "uint256";
|
|
199
|
+
readonly name: "";
|
|
200
|
+
readonly type: "uint256";
|
|
201
|
+
}];
|
|
202
|
+
readonly stateMutability: "view";
|
|
203
|
+
readonly type: "function";
|
|
204
|
+
}, {
|
|
205
|
+
readonly inputs: readonly [];
|
|
206
|
+
readonly name: "acceptOwnership";
|
|
207
|
+
readonly outputs: readonly [];
|
|
208
|
+
readonly stateMutability: "nonpayable";
|
|
209
|
+
readonly type: "function";
|
|
210
|
+
}, {
|
|
211
|
+
readonly inputs: readonly [];
|
|
212
|
+
readonly name: "activations";
|
|
213
|
+
readonly outputs: readonly [{
|
|
214
|
+
readonly internalType: "contract IActivations";
|
|
215
|
+
readonly name: "";
|
|
216
|
+
readonly type: "address";
|
|
217
|
+
}];
|
|
218
|
+
readonly stateMutability: "view";
|
|
219
|
+
readonly type: "function";
|
|
220
|
+
}, {
|
|
221
|
+
readonly inputs: readonly [];
|
|
222
|
+
readonly name: "anchor";
|
|
223
|
+
readonly outputs: readonly [{
|
|
224
|
+
readonly internalType: "uint256";
|
|
225
|
+
readonly name: "";
|
|
226
|
+
readonly type: "uint256";
|
|
227
|
+
}];
|
|
228
|
+
readonly stateMutability: "view";
|
|
229
|
+
readonly type: "function";
|
|
230
|
+
}, {
|
|
231
|
+
readonly inputs: readonly [];
|
|
232
|
+
readonly name: "anchorDay";
|
|
233
|
+
readonly outputs: readonly [{
|
|
234
|
+
readonly internalType: "uint32";
|
|
235
|
+
readonly name: "";
|
|
236
|
+
readonly type: "uint32";
|
|
237
|
+
}];
|
|
238
|
+
readonly stateMutability: "view";
|
|
239
|
+
readonly type: "function";
|
|
240
|
+
}, {
|
|
241
|
+
readonly inputs: readonly [{
|
|
242
|
+
readonly internalType: "uint256";
|
|
243
|
+
readonly name: "tokenId";
|
|
244
|
+
readonly type: "uint256";
|
|
245
|
+
}];
|
|
246
|
+
readonly name: "clockIn";
|
|
247
|
+
readonly outputs: readonly [];
|
|
248
|
+
readonly stateMutability: "nonpayable";
|
|
249
|
+
readonly type: "function";
|
|
250
|
+
}, {
|
|
251
|
+
readonly inputs: readonly [{
|
|
252
|
+
readonly internalType: "uint256[]";
|
|
253
|
+
readonly name: "tokenIds";
|
|
254
|
+
readonly type: "uint256[]";
|
|
255
|
+
}];
|
|
256
|
+
readonly name: "clockInMany";
|
|
257
|
+
readonly outputs: readonly [];
|
|
258
|
+
readonly stateMutability: "nonpayable";
|
|
259
|
+
readonly type: "function";
|
|
260
|
+
}, {
|
|
261
|
+
readonly inputs: readonly [];
|
|
262
|
+
readonly name: "currentPeriod";
|
|
263
|
+
readonly outputs: readonly [{
|
|
264
|
+
readonly internalType: "uint32";
|
|
265
|
+
readonly name: "";
|
|
266
|
+
readonly type: "uint32";
|
|
267
|
+
}];
|
|
268
|
+
readonly stateMutability: "view";
|
|
269
|
+
readonly type: "function";
|
|
270
|
+
}, {
|
|
271
|
+
readonly inputs: readonly [];
|
|
272
|
+
readonly name: "equipment";
|
|
273
|
+
readonly outputs: readonly [{
|
|
274
|
+
readonly internalType: "contract IEquipment";
|
|
275
|
+
readonly name: "";
|
|
276
|
+
readonly type: "address";
|
|
277
|
+
}];
|
|
278
|
+
readonly stateMutability: "view";
|
|
279
|
+
readonly type: "function";
|
|
280
|
+
}, {
|
|
281
|
+
readonly inputs: readonly [];
|
|
282
|
+
readonly name: "equipmentLocked";
|
|
283
|
+
readonly outputs: readonly [{
|
|
284
|
+
readonly internalType: "bool";
|
|
285
|
+
readonly name: "";
|
|
286
|
+
readonly type: "bool";
|
|
287
|
+
}];
|
|
288
|
+
readonly stateMutability: "view";
|
|
289
|
+
readonly type: "function";
|
|
290
|
+
}, {
|
|
291
|
+
readonly inputs: readonly [];
|
|
292
|
+
readonly name: "nft";
|
|
293
|
+
readonly outputs: readonly [{
|
|
294
|
+
readonly internalType: "contract IERC721";
|
|
295
|
+
readonly name: "";
|
|
296
|
+
readonly type: "address";
|
|
297
|
+
}];
|
|
298
|
+
readonly stateMutability: "view";
|
|
299
|
+
readonly type: "function";
|
|
300
|
+
}, {
|
|
301
|
+
readonly inputs: readonly [];
|
|
302
|
+
readonly name: "owner";
|
|
303
|
+
readonly outputs: readonly [{
|
|
304
|
+
readonly internalType: "address";
|
|
305
|
+
readonly name: "";
|
|
306
|
+
readonly type: "address";
|
|
307
|
+
}];
|
|
308
|
+
readonly stateMutability: "view";
|
|
309
|
+
readonly type: "function";
|
|
310
|
+
}, {
|
|
311
|
+
readonly inputs: readonly [];
|
|
312
|
+
readonly name: "pause";
|
|
313
|
+
readonly outputs: readonly [];
|
|
314
|
+
readonly stateMutability: "nonpayable";
|
|
315
|
+
readonly type: "function";
|
|
316
|
+
}, {
|
|
317
|
+
readonly inputs: readonly [];
|
|
318
|
+
readonly name: "paused";
|
|
319
|
+
readonly outputs: readonly [{
|
|
320
|
+
readonly internalType: "bool";
|
|
321
|
+
readonly name: "";
|
|
322
|
+
readonly type: "bool";
|
|
323
|
+
}];
|
|
324
|
+
readonly stateMutability: "view";
|
|
325
|
+
readonly type: "function";
|
|
326
|
+
}, {
|
|
327
|
+
readonly inputs: readonly [];
|
|
328
|
+
readonly name: "pendingOwner";
|
|
329
|
+
readonly outputs: readonly [{
|
|
330
|
+
readonly internalType: "address";
|
|
331
|
+
readonly name: "";
|
|
332
|
+
readonly type: "address";
|
|
333
|
+
}];
|
|
334
|
+
readonly stateMutability: "view";
|
|
335
|
+
readonly type: "function";
|
|
336
|
+
}, {
|
|
337
|
+
readonly inputs: readonly [{
|
|
338
|
+
readonly internalType: "uint256";
|
|
339
|
+
readonly name: "";
|
|
340
|
+
readonly type: "uint256";
|
|
341
|
+
}];
|
|
342
|
+
readonly name: "recordOf";
|
|
343
|
+
readonly outputs: readonly [{
|
|
344
|
+
readonly internalType: "uint32";
|
|
345
|
+
readonly name: "lastPeriod";
|
|
346
|
+
readonly type: "uint32";
|
|
347
|
+
}, {
|
|
348
|
+
readonly internalType: "uint32";
|
|
349
|
+
readonly name: "streak";
|
|
350
|
+
readonly type: "uint32";
|
|
351
|
+
}];
|
|
352
|
+
readonly stateMutability: "view";
|
|
353
|
+
readonly type: "function";
|
|
354
|
+
}, {
|
|
355
|
+
readonly inputs: readonly [];
|
|
356
|
+
readonly name: "renounceOwnership";
|
|
357
|
+
readonly outputs: readonly [];
|
|
358
|
+
readonly stateMutability: "nonpayable";
|
|
359
|
+
readonly type: "function";
|
|
360
|
+
}, {
|
|
361
|
+
readonly inputs: readonly [{
|
|
362
|
+
readonly internalType: "uint256";
|
|
363
|
+
readonly name: "tokenId";
|
|
364
|
+
readonly type: "uint256";
|
|
365
|
+
}];
|
|
366
|
+
readonly name: "streakMultOf";
|
|
367
|
+
readonly outputs: readonly [{
|
|
368
|
+
readonly internalType: "uint256";
|
|
369
|
+
readonly name: "";
|
|
370
|
+
readonly type: "uint256";
|
|
371
|
+
}];
|
|
372
|
+
readonly stateMutability: "view";
|
|
373
|
+
readonly type: "function";
|
|
374
|
+
}, {
|
|
375
|
+
readonly inputs: readonly [{
|
|
376
|
+
readonly internalType: "uint256";
|
|
377
|
+
readonly name: "";
|
|
378
|
+
readonly type: "uint256";
|
|
379
|
+
}];
|
|
380
|
+
readonly name: "tierWeight";
|
|
381
|
+
readonly outputs: readonly [{
|
|
382
|
+
readonly internalType: "uint256";
|
|
383
|
+
readonly name: "";
|
|
384
|
+
readonly type: "uint256";
|
|
385
|
+
}];
|
|
386
|
+
readonly stateMutability: "view";
|
|
387
|
+
readonly type: "function";
|
|
388
|
+
}, {
|
|
389
|
+
readonly inputs: readonly [{
|
|
390
|
+
readonly internalType: "address";
|
|
391
|
+
readonly name: "newOwner";
|
|
392
|
+
readonly type: "address";
|
|
393
|
+
}];
|
|
394
|
+
readonly name: "transferOwnership";
|
|
395
|
+
readonly outputs: readonly [];
|
|
396
|
+
readonly stateMutability: "nonpayable";
|
|
397
|
+
readonly type: "function";
|
|
398
|
+
}, {
|
|
399
|
+
readonly inputs: readonly [];
|
|
400
|
+
readonly name: "unpause";
|
|
401
|
+
readonly outputs: readonly [];
|
|
402
|
+
readonly stateMutability: "nonpayable";
|
|
403
|
+
readonly type: "function";
|
|
404
|
+
}, {
|
|
405
|
+
readonly inputs: readonly [{
|
|
406
|
+
readonly internalType: "address";
|
|
407
|
+
readonly name: "newEquipment";
|
|
408
|
+
readonly type: "address";
|
|
409
|
+
}];
|
|
410
|
+
readonly name: "upgradeEquipment";
|
|
411
|
+
readonly outputs: readonly [];
|
|
412
|
+
readonly stateMutability: "nonpayable";
|
|
413
|
+
readonly type: "function";
|
|
414
|
+
}, {
|
|
415
|
+
readonly inputs: readonly [];
|
|
416
|
+
readonly name: "v1";
|
|
417
|
+
readonly outputs: readonly [{
|
|
418
|
+
readonly internalType: "contract IClockInV1";
|
|
419
|
+
readonly name: "";
|
|
420
|
+
readonly type: "address";
|
|
421
|
+
}];
|
|
422
|
+
readonly stateMutability: "view";
|
|
423
|
+
readonly type: "function";
|
|
424
|
+
}, {
|
|
425
|
+
readonly inputs: readonly [{
|
|
426
|
+
readonly internalType: "uint256";
|
|
427
|
+
readonly name: "tokenId";
|
|
428
|
+
readonly type: "uint256";
|
|
429
|
+
}];
|
|
430
|
+
readonly name: "weightOf";
|
|
431
|
+
readonly outputs: readonly [{
|
|
432
|
+
readonly internalType: "uint256";
|
|
433
|
+
readonly name: "";
|
|
434
|
+
readonly type: "uint256";
|
|
435
|
+
}];
|
|
436
|
+
readonly stateMutability: "view";
|
|
437
|
+
readonly type: "function";
|
|
438
|
+
}];
|
|
439
|
+
/**
|
|
440
|
+
* Type-safe ABI for ClockInV2_json
|
|
441
|
+
*/
|
|
442
|
+
export type ClockInV2_jsonAbi = typeof ClockInV2_jsonAbi;
|
|
443
|
+
/**
|
|
444
|
+
* Contract instance type for ClockInV2_json
|
|
445
|
+
*/
|
|
446
|
+
export type ClockInV2_jsonContract = any;
|
|
447
|
+
/**
|
|
448
|
+
* ClockInV2_json Contract Class
|
|
449
|
+
*
|
|
450
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
451
|
+
*
|
|
452
|
+
* @example
|
|
453
|
+
* ```typescript
|
|
454
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
455
|
+
* import { mainnet } from 'viem/chains';
|
|
456
|
+
* import { ClockInV2_json } from 'ClockInV2_json';
|
|
457
|
+
*
|
|
458
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
459
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
460
|
+
*
|
|
461
|
+
* const contract = new ClockInV2_json('0x...', { publicClient, walletClient });
|
|
462
|
+
*
|
|
463
|
+
* // Read functions
|
|
464
|
+
* const result = await contract.balanceOf('0x...');
|
|
465
|
+
*
|
|
466
|
+
* // Write functions
|
|
467
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
468
|
+
*
|
|
469
|
+
* // Simulate transactions (dry-run)
|
|
470
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
471
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
472
|
+
*
|
|
473
|
+
* // Watch events
|
|
474
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
475
|
+
* console.log('Transfer event:', event);
|
|
476
|
+
* });
|
|
477
|
+
* ```
|
|
478
|
+
*/
|
|
479
|
+
export declare class ClockInV2_json {
|
|
480
|
+
private contract;
|
|
481
|
+
private contractAddress;
|
|
482
|
+
private publicClient;
|
|
483
|
+
constructor(address: Address, clients: {
|
|
484
|
+
publicClient: PublicClient;
|
|
485
|
+
walletClient?: WalletClient;
|
|
486
|
+
});
|
|
487
|
+
/**
|
|
488
|
+
* Get the contract address
|
|
489
|
+
*/
|
|
490
|
+
get address(): Address;
|
|
491
|
+
/**
|
|
492
|
+
* Get the underlying viem contract instance
|
|
493
|
+
*/
|
|
494
|
+
getContract(): ClockInV2_jsonContract;
|
|
495
|
+
/**
|
|
496
|
+
* ONE
|
|
497
|
+
* view
|
|
498
|
+
*/
|
|
499
|
+
ONE(): Promise<bigint>;
|
|
500
|
+
/**
|
|
501
|
+
* PERIOD
|
|
502
|
+
* view
|
|
503
|
+
*/
|
|
504
|
+
PERIOD(): Promise<bigint>;
|
|
505
|
+
/**
|
|
506
|
+
* STREAK_CAP_PERIODS
|
|
507
|
+
* view
|
|
508
|
+
*/
|
|
509
|
+
STREAK_CAP_PERIODS(): Promise<bigint>;
|
|
510
|
+
/**
|
|
511
|
+
* STREAK_STEP
|
|
512
|
+
* view
|
|
513
|
+
*/
|
|
514
|
+
STREAK_STEP(): Promise<bigint>;
|
|
515
|
+
/**
|
|
516
|
+
* activations
|
|
517
|
+
* view
|
|
518
|
+
*/
|
|
519
|
+
activations(): Promise<`0x${string}`>;
|
|
520
|
+
/**
|
|
521
|
+
* anchor
|
|
522
|
+
* view
|
|
523
|
+
*/
|
|
524
|
+
anchor(): Promise<bigint>;
|
|
525
|
+
/**
|
|
526
|
+
* anchorDay
|
|
527
|
+
* view
|
|
528
|
+
*/
|
|
529
|
+
anchorDay(): Promise<bigint>;
|
|
530
|
+
/**
|
|
531
|
+
* currentPeriod
|
|
532
|
+
* view
|
|
533
|
+
*/
|
|
534
|
+
currentPeriod(): Promise<bigint>;
|
|
535
|
+
/**
|
|
536
|
+
* equipment
|
|
537
|
+
* view
|
|
538
|
+
*/
|
|
539
|
+
equipment(): Promise<`0x${string}`>;
|
|
540
|
+
/**
|
|
541
|
+
* equipmentLocked
|
|
542
|
+
* view
|
|
543
|
+
*/
|
|
544
|
+
equipmentLocked(): Promise<boolean>;
|
|
545
|
+
/**
|
|
546
|
+
* nft
|
|
547
|
+
* view
|
|
548
|
+
*/
|
|
549
|
+
nft(): Promise<`0x${string}`>;
|
|
550
|
+
/**
|
|
551
|
+
* owner
|
|
552
|
+
* view
|
|
553
|
+
*/
|
|
554
|
+
owner(): Promise<`0x${string}`>;
|
|
555
|
+
/**
|
|
556
|
+
* paused
|
|
557
|
+
* view
|
|
558
|
+
*/
|
|
559
|
+
paused(): Promise<boolean>;
|
|
560
|
+
/**
|
|
561
|
+
* pendingOwner
|
|
562
|
+
* view
|
|
563
|
+
*/
|
|
564
|
+
pendingOwner(): Promise<`0x${string}`>;
|
|
565
|
+
/**
|
|
566
|
+
* recordOf
|
|
567
|
+
* view
|
|
568
|
+
*/
|
|
569
|
+
recordOf(arg0: bigint): Promise<[bigint, bigint]>;
|
|
570
|
+
/**
|
|
571
|
+
* streakMultOf
|
|
572
|
+
* view
|
|
573
|
+
*/
|
|
574
|
+
streakMultOf(tokenId: bigint): Promise<bigint>;
|
|
575
|
+
/**
|
|
576
|
+
* tierWeight
|
|
577
|
+
* view
|
|
578
|
+
*/
|
|
579
|
+
tierWeight(arg0: bigint): Promise<bigint>;
|
|
580
|
+
/**
|
|
581
|
+
* v1
|
|
582
|
+
* view
|
|
583
|
+
*/
|
|
584
|
+
v1(): Promise<`0x${string}`>;
|
|
585
|
+
/**
|
|
586
|
+
* weightOf
|
|
587
|
+
* view
|
|
588
|
+
*/
|
|
589
|
+
weightOf(tokenId: bigint): Promise<bigint>;
|
|
590
|
+
/**
|
|
591
|
+
* acceptOwnership
|
|
592
|
+
* nonpayable
|
|
593
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
594
|
+
*/
|
|
595
|
+
acceptOwnership(options?: {
|
|
596
|
+
accessList?: import('viem').AccessList;
|
|
597
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
598
|
+
chain?: import('viem').Chain | null;
|
|
599
|
+
dataSuffix?: `0x${string}`;
|
|
600
|
+
gas?: bigint;
|
|
601
|
+
gasPrice?: bigint;
|
|
602
|
+
maxFeePerGas?: bigint;
|
|
603
|
+
maxPriorityFeePerGas?: bigint;
|
|
604
|
+
nonce?: number;
|
|
605
|
+
value?: bigint;
|
|
606
|
+
}): Promise<`0x${string}`>;
|
|
607
|
+
/**
|
|
608
|
+
* clockIn
|
|
609
|
+
* nonpayable
|
|
610
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
611
|
+
*/
|
|
612
|
+
clockIn(tokenId: bigint, options?: {
|
|
613
|
+
accessList?: import('viem').AccessList;
|
|
614
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
615
|
+
chain?: import('viem').Chain | null;
|
|
616
|
+
dataSuffix?: `0x${string}`;
|
|
617
|
+
gas?: bigint;
|
|
618
|
+
gasPrice?: bigint;
|
|
619
|
+
maxFeePerGas?: bigint;
|
|
620
|
+
maxPriorityFeePerGas?: bigint;
|
|
621
|
+
nonce?: number;
|
|
622
|
+
value?: bigint;
|
|
623
|
+
}): Promise<`0x${string}`>;
|
|
624
|
+
/**
|
|
625
|
+
* clockInMany
|
|
626
|
+
* nonpayable
|
|
627
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
628
|
+
*/
|
|
629
|
+
clockInMany(tokenIds: bigint[], options?: {
|
|
630
|
+
accessList?: import('viem').AccessList;
|
|
631
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
632
|
+
chain?: import('viem').Chain | null;
|
|
633
|
+
dataSuffix?: `0x${string}`;
|
|
634
|
+
gas?: bigint;
|
|
635
|
+
gasPrice?: bigint;
|
|
636
|
+
maxFeePerGas?: bigint;
|
|
637
|
+
maxPriorityFeePerGas?: bigint;
|
|
638
|
+
nonce?: number;
|
|
639
|
+
value?: bigint;
|
|
640
|
+
}): Promise<`0x${string}`>;
|
|
641
|
+
/**
|
|
642
|
+
* pause
|
|
643
|
+
* nonpayable
|
|
644
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
645
|
+
*/
|
|
646
|
+
pause(options?: {
|
|
647
|
+
accessList?: import('viem').AccessList;
|
|
648
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
649
|
+
chain?: import('viem').Chain | null;
|
|
650
|
+
dataSuffix?: `0x${string}`;
|
|
651
|
+
gas?: bigint;
|
|
652
|
+
gasPrice?: bigint;
|
|
653
|
+
maxFeePerGas?: bigint;
|
|
654
|
+
maxPriorityFeePerGas?: bigint;
|
|
655
|
+
nonce?: number;
|
|
656
|
+
value?: bigint;
|
|
657
|
+
}): Promise<`0x${string}`>;
|
|
658
|
+
/**
|
|
659
|
+
* renounceOwnership
|
|
660
|
+
* nonpayable
|
|
661
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
662
|
+
*/
|
|
663
|
+
renounceOwnership(options?: {
|
|
664
|
+
accessList?: import('viem').AccessList;
|
|
665
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
666
|
+
chain?: import('viem').Chain | null;
|
|
667
|
+
dataSuffix?: `0x${string}`;
|
|
668
|
+
gas?: bigint;
|
|
669
|
+
gasPrice?: bigint;
|
|
670
|
+
maxFeePerGas?: bigint;
|
|
671
|
+
maxPriorityFeePerGas?: bigint;
|
|
672
|
+
nonce?: number;
|
|
673
|
+
value?: bigint;
|
|
674
|
+
}): Promise<`0x${string}`>;
|
|
675
|
+
/**
|
|
676
|
+
* transferOwnership
|
|
677
|
+
* nonpayable
|
|
678
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
679
|
+
*/
|
|
680
|
+
transferOwnership(newOwner: `0x${string}`, options?: {
|
|
681
|
+
accessList?: import('viem').AccessList;
|
|
682
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
683
|
+
chain?: import('viem').Chain | null;
|
|
684
|
+
dataSuffix?: `0x${string}`;
|
|
685
|
+
gas?: bigint;
|
|
686
|
+
gasPrice?: bigint;
|
|
687
|
+
maxFeePerGas?: bigint;
|
|
688
|
+
maxPriorityFeePerGas?: bigint;
|
|
689
|
+
nonce?: number;
|
|
690
|
+
value?: bigint;
|
|
691
|
+
}): Promise<`0x${string}`>;
|
|
692
|
+
/**
|
|
693
|
+
* unpause
|
|
694
|
+
* nonpayable
|
|
695
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
696
|
+
*/
|
|
697
|
+
unpause(options?: {
|
|
698
|
+
accessList?: import('viem').AccessList;
|
|
699
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
700
|
+
chain?: import('viem').Chain | null;
|
|
701
|
+
dataSuffix?: `0x${string}`;
|
|
702
|
+
gas?: bigint;
|
|
703
|
+
gasPrice?: bigint;
|
|
704
|
+
maxFeePerGas?: bigint;
|
|
705
|
+
maxPriorityFeePerGas?: bigint;
|
|
706
|
+
nonce?: number;
|
|
707
|
+
value?: bigint;
|
|
708
|
+
}): Promise<`0x${string}`>;
|
|
709
|
+
/**
|
|
710
|
+
* upgradeEquipment
|
|
711
|
+
* nonpayable
|
|
712
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
713
|
+
*/
|
|
714
|
+
upgradeEquipment(newEquipment: `0x${string}`, options?: {
|
|
715
|
+
accessList?: import('viem').AccessList;
|
|
716
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
717
|
+
chain?: import('viem').Chain | null;
|
|
718
|
+
dataSuffix?: `0x${string}`;
|
|
719
|
+
gas?: bigint;
|
|
720
|
+
gasPrice?: bigint;
|
|
721
|
+
maxFeePerGas?: bigint;
|
|
722
|
+
maxPriorityFeePerGas?: bigint;
|
|
723
|
+
nonce?: number;
|
|
724
|
+
value?: bigint;
|
|
725
|
+
}): Promise<`0x${string}`>;
|
|
726
|
+
/**
|
|
727
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
728
|
+
*
|
|
729
|
+
* @example
|
|
730
|
+
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
731
|
+
* console.log('Gas estimate:', result.request.gas);
|
|
732
|
+
* console.log('Would succeed:', result.result);
|
|
733
|
+
*/
|
|
734
|
+
get simulate(): {
|
|
735
|
+
/**
|
|
736
|
+
* Simulate acceptOwnership
|
|
737
|
+
* Returns gas estimate and result without sending transaction
|
|
738
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
739
|
+
*/
|
|
740
|
+
acceptOwnership(options?: {
|
|
741
|
+
accessList?: import("viem").AccessList;
|
|
742
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
743
|
+
chain?: import("viem").Chain | null;
|
|
744
|
+
dataSuffix?: `0x${string}`;
|
|
745
|
+
gas?: bigint;
|
|
746
|
+
gasPrice?: bigint;
|
|
747
|
+
maxFeePerGas?: bigint;
|
|
748
|
+
maxPriorityFeePerGas?: bigint;
|
|
749
|
+
nonce?: number;
|
|
750
|
+
value?: bigint;
|
|
751
|
+
}): Promise<void>;
|
|
752
|
+
/**
|
|
753
|
+
* Simulate clockIn
|
|
754
|
+
* Returns gas estimate and result without sending transaction
|
|
755
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
756
|
+
*/
|
|
757
|
+
clockIn(tokenId: bigint, options?: {
|
|
758
|
+
accessList?: import("viem").AccessList;
|
|
759
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
760
|
+
chain?: import("viem").Chain | null;
|
|
761
|
+
dataSuffix?: `0x${string}`;
|
|
762
|
+
gas?: bigint;
|
|
763
|
+
gasPrice?: bigint;
|
|
764
|
+
maxFeePerGas?: bigint;
|
|
765
|
+
maxPriorityFeePerGas?: bigint;
|
|
766
|
+
nonce?: number;
|
|
767
|
+
value?: bigint;
|
|
768
|
+
}): Promise<void>;
|
|
769
|
+
/**
|
|
770
|
+
* Simulate clockInMany
|
|
771
|
+
* Returns gas estimate and result without sending transaction
|
|
772
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
773
|
+
*/
|
|
774
|
+
clockInMany(tokenIds: bigint[], options?: {
|
|
775
|
+
accessList?: import("viem").AccessList;
|
|
776
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
777
|
+
chain?: import("viem").Chain | null;
|
|
778
|
+
dataSuffix?: `0x${string}`;
|
|
779
|
+
gas?: bigint;
|
|
780
|
+
gasPrice?: bigint;
|
|
781
|
+
maxFeePerGas?: bigint;
|
|
782
|
+
maxPriorityFeePerGas?: bigint;
|
|
783
|
+
nonce?: number;
|
|
784
|
+
value?: bigint;
|
|
785
|
+
}): Promise<void>;
|
|
786
|
+
/**
|
|
787
|
+
* Simulate pause
|
|
788
|
+
* Returns gas estimate and result without sending transaction
|
|
789
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
790
|
+
*/
|
|
791
|
+
pause(options?: {
|
|
792
|
+
accessList?: import("viem").AccessList;
|
|
793
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
794
|
+
chain?: import("viem").Chain | null;
|
|
795
|
+
dataSuffix?: `0x${string}`;
|
|
796
|
+
gas?: bigint;
|
|
797
|
+
gasPrice?: bigint;
|
|
798
|
+
maxFeePerGas?: bigint;
|
|
799
|
+
maxPriorityFeePerGas?: bigint;
|
|
800
|
+
nonce?: number;
|
|
801
|
+
value?: bigint;
|
|
802
|
+
}): Promise<void>;
|
|
803
|
+
/**
|
|
804
|
+
* Simulate renounceOwnership
|
|
805
|
+
* Returns gas estimate and result without sending transaction
|
|
806
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
807
|
+
*/
|
|
808
|
+
renounceOwnership(options?: {
|
|
809
|
+
accessList?: import("viem").AccessList;
|
|
810
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
811
|
+
chain?: import("viem").Chain | null;
|
|
812
|
+
dataSuffix?: `0x${string}`;
|
|
813
|
+
gas?: bigint;
|
|
814
|
+
gasPrice?: bigint;
|
|
815
|
+
maxFeePerGas?: bigint;
|
|
816
|
+
maxPriorityFeePerGas?: bigint;
|
|
817
|
+
nonce?: number;
|
|
818
|
+
value?: bigint;
|
|
819
|
+
}): Promise<void>;
|
|
820
|
+
/**
|
|
821
|
+
* Simulate transferOwnership
|
|
822
|
+
* Returns gas estimate and result without sending transaction
|
|
823
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
824
|
+
*/
|
|
825
|
+
transferOwnership(newOwner: `0x${string}`, options?: {
|
|
826
|
+
accessList?: import("viem").AccessList;
|
|
827
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
828
|
+
chain?: import("viem").Chain | null;
|
|
829
|
+
dataSuffix?: `0x${string}`;
|
|
830
|
+
gas?: bigint;
|
|
831
|
+
gasPrice?: bigint;
|
|
832
|
+
maxFeePerGas?: bigint;
|
|
833
|
+
maxPriorityFeePerGas?: bigint;
|
|
834
|
+
nonce?: number;
|
|
835
|
+
value?: bigint;
|
|
836
|
+
}): Promise<void>;
|
|
837
|
+
/**
|
|
838
|
+
* Simulate unpause
|
|
839
|
+
* Returns gas estimate and result without sending transaction
|
|
840
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
841
|
+
*/
|
|
842
|
+
unpause(options?: {
|
|
843
|
+
accessList?: import("viem").AccessList;
|
|
844
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
845
|
+
chain?: import("viem").Chain | null;
|
|
846
|
+
dataSuffix?: `0x${string}`;
|
|
847
|
+
gas?: bigint;
|
|
848
|
+
gasPrice?: bigint;
|
|
849
|
+
maxFeePerGas?: bigint;
|
|
850
|
+
maxPriorityFeePerGas?: bigint;
|
|
851
|
+
nonce?: number;
|
|
852
|
+
value?: bigint;
|
|
853
|
+
}): Promise<void>;
|
|
854
|
+
/**
|
|
855
|
+
* Simulate upgradeEquipment
|
|
856
|
+
* Returns gas estimate and result without sending transaction
|
|
857
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
858
|
+
*/
|
|
859
|
+
upgradeEquipment(newEquipment: `0x${string}`, options?: {
|
|
860
|
+
accessList?: import("viem").AccessList;
|
|
861
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
862
|
+
chain?: import("viem").Chain | null;
|
|
863
|
+
dataSuffix?: `0x${string}`;
|
|
864
|
+
gas?: bigint;
|
|
865
|
+
gasPrice?: bigint;
|
|
866
|
+
maxFeePerGas?: bigint;
|
|
867
|
+
maxPriorityFeePerGas?: bigint;
|
|
868
|
+
nonce?: number;
|
|
869
|
+
value?: bigint;
|
|
870
|
+
}): Promise<void>;
|
|
871
|
+
};
|
|
872
|
+
/**
|
|
873
|
+
* Watch contract events
|
|
874
|
+
*
|
|
875
|
+
* @example
|
|
876
|
+
* // Watch all Transfer events
|
|
877
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
878
|
+
* console.log('Transfer:', event);
|
|
879
|
+
* });
|
|
880
|
+
*
|
|
881
|
+
* // Stop watching
|
|
882
|
+
* unwatch();
|
|
883
|
+
*/
|
|
884
|
+
get watch(): {
|
|
885
|
+
/**
|
|
886
|
+
* Watch ClockedIn events
|
|
887
|
+
* @param callback Function to call when event is emitted
|
|
888
|
+
* @param filter Optional filter for indexed parameters
|
|
889
|
+
* @returns Unwatch function to stop listening
|
|
890
|
+
*/
|
|
891
|
+
ClockedIn: (callback: (event: {
|
|
892
|
+
tokenId: bigint;
|
|
893
|
+
by: `0x${string}`;
|
|
894
|
+
period: bigint;
|
|
895
|
+
streak: bigint;
|
|
896
|
+
}) => void, filter?: {
|
|
897
|
+
tokenId: bigint;
|
|
898
|
+
by: `0x${string}`;
|
|
899
|
+
}) => () => void;
|
|
900
|
+
/**
|
|
901
|
+
* Watch EquipmentUpgraded events
|
|
902
|
+
* @param callback Function to call when event is emitted
|
|
903
|
+
* @param filter Optional filter for indexed parameters
|
|
904
|
+
* @returns Unwatch function to stop listening
|
|
905
|
+
*/
|
|
906
|
+
EquipmentUpgraded: (callback: (event: {
|
|
907
|
+
newEquipment: `0x${string}`;
|
|
908
|
+
}) => void, filter?: {
|
|
909
|
+
newEquipment: `0x${string}`;
|
|
910
|
+
}) => () => void;
|
|
911
|
+
/**
|
|
912
|
+
* Watch OwnershipTransferStarted events
|
|
913
|
+
* @param callback Function to call when event is emitted
|
|
914
|
+
* @param filter Optional filter for indexed parameters
|
|
915
|
+
* @returns Unwatch function to stop listening
|
|
916
|
+
*/
|
|
917
|
+
OwnershipTransferStarted: (callback: (event: {
|
|
918
|
+
previousOwner: `0x${string}`;
|
|
919
|
+
newOwner: `0x${string}`;
|
|
920
|
+
}) => void, filter?: {
|
|
921
|
+
previousOwner: `0x${string}`;
|
|
922
|
+
newOwner: `0x${string}`;
|
|
923
|
+
}) => () => void;
|
|
924
|
+
/**
|
|
925
|
+
* Watch OwnershipTransferred events
|
|
926
|
+
* @param callback Function to call when event is emitted
|
|
927
|
+
* @param filter Optional filter for indexed parameters
|
|
928
|
+
* @returns Unwatch function to stop listening
|
|
929
|
+
*/
|
|
930
|
+
OwnershipTransferred: (callback: (event: {
|
|
931
|
+
previousOwner: `0x${string}`;
|
|
932
|
+
newOwner: `0x${string}`;
|
|
933
|
+
}) => void, filter?: {
|
|
934
|
+
previousOwner: `0x${string}`;
|
|
935
|
+
newOwner: `0x${string}`;
|
|
936
|
+
}) => () => void;
|
|
937
|
+
/**
|
|
938
|
+
* Watch Paused events
|
|
939
|
+
* @param callback Function to call when event is emitted
|
|
940
|
+
* @param filter Optional filter for indexed parameters
|
|
941
|
+
* @returns Unwatch function to stop listening
|
|
942
|
+
*/
|
|
943
|
+
Paused: (callback: (event: {
|
|
944
|
+
account: `0x${string}`;
|
|
945
|
+
}) => void) => () => void;
|
|
946
|
+
/**
|
|
947
|
+
* Watch Unpaused events
|
|
948
|
+
* @param callback Function to call when event is emitted
|
|
949
|
+
* @param filter Optional filter for indexed parameters
|
|
950
|
+
* @returns Unwatch function to stop listening
|
|
951
|
+
*/
|
|
952
|
+
Unpaused: (callback: (event: {
|
|
953
|
+
account: `0x${string}`;
|
|
954
|
+
}) => void) => () => void;
|
|
955
|
+
};
|
|
956
|
+
}
|