@gitmyabi/universalprofileinit 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/UniversalProfileInit_json.d.ts +1112 -0
- package/contracts/UniversalProfileInit_json.js +1208 -0
- package/contracts/UniversalProfileInit_json.ts +1477 -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,1208 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UniversalProfileInit_json = exports.UniversalProfileInit_jsonAbi = void 0;
|
|
4
|
+
const viem_1 = require("viem");
|
|
5
|
+
/**
|
|
6
|
+
* UniversalProfileInit_json ABI
|
|
7
|
+
*
|
|
8
|
+
* This ABI is typed using viem's type system for full type safety.
|
|
9
|
+
*/
|
|
10
|
+
exports.UniversalProfileInit_jsonAbi = [
|
|
11
|
+
{
|
|
12
|
+
"inputs": [],
|
|
13
|
+
"stateMutability": "nonpayable",
|
|
14
|
+
"type": "constructor"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"inputs": [],
|
|
18
|
+
"name": "ERC725X_ContractDeploymentFailed",
|
|
19
|
+
"type": "error"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"inputs": [],
|
|
23
|
+
"name": "ERC725X_CreateOperationsRequireEmptyRecipientAddress",
|
|
24
|
+
"type": "error"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"inputs": [],
|
|
28
|
+
"name": "ERC725X_ExecuteParametersEmptyArray",
|
|
29
|
+
"type": "error"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"inputs": [],
|
|
33
|
+
"name": "ERC725X_ExecuteParametersLengthMismatch",
|
|
34
|
+
"type": "error"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"inputs": [
|
|
38
|
+
{
|
|
39
|
+
"internalType": "uint256",
|
|
40
|
+
"name": "balance",
|
|
41
|
+
"type": "uint256"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"internalType": "uint256",
|
|
45
|
+
"name": "value",
|
|
46
|
+
"type": "uint256"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"name": "ERC725X_InsufficientBalance",
|
|
50
|
+
"type": "error"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"inputs": [],
|
|
54
|
+
"name": "ERC725X_MsgValueDisallowedInDelegateCall",
|
|
55
|
+
"type": "error"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"inputs": [],
|
|
59
|
+
"name": "ERC725X_MsgValueDisallowedInStaticCall",
|
|
60
|
+
"type": "error"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"inputs": [],
|
|
64
|
+
"name": "ERC725X_NoContractBytecodeProvided",
|
|
65
|
+
"type": "error"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"inputs": [
|
|
69
|
+
{
|
|
70
|
+
"internalType": "uint256",
|
|
71
|
+
"name": "operationTypeProvided",
|
|
72
|
+
"type": "uint256"
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
"name": "ERC725X_UnknownOperationType",
|
|
76
|
+
"type": "error"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"inputs": [],
|
|
80
|
+
"name": "ERC725Y_DataKeysValuesEmptyArray",
|
|
81
|
+
"type": "error"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"inputs": [],
|
|
85
|
+
"name": "ERC725Y_DataKeysValuesLengthMismatch",
|
|
86
|
+
"type": "error"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"inputs": [
|
|
90
|
+
{
|
|
91
|
+
"internalType": "address",
|
|
92
|
+
"name": "caller",
|
|
93
|
+
"type": "address"
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
"name": "LSP14CallerNotPendingOwner",
|
|
97
|
+
"type": "error"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"inputs": [],
|
|
101
|
+
"name": "LSP14CannotTransferOwnershipToSelf",
|
|
102
|
+
"type": "error"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"inputs": [],
|
|
106
|
+
"name": "LSP14MustAcceptOwnershipInSeparateTransaction",
|
|
107
|
+
"type": "error"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"inputs": [
|
|
111
|
+
{
|
|
112
|
+
"internalType": "uint256",
|
|
113
|
+
"name": "renounceOwnershipStart",
|
|
114
|
+
"type": "uint256"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"internalType": "uint256",
|
|
118
|
+
"name": "renounceOwnershipEnd",
|
|
119
|
+
"type": "uint256"
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"name": "LSP14NotInRenounceOwnershipInterval",
|
|
123
|
+
"type": "error"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"inputs": [
|
|
127
|
+
{
|
|
128
|
+
"internalType": "bool",
|
|
129
|
+
"name": "postCall",
|
|
130
|
+
"type": "bool"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"internalType": "bytes4",
|
|
134
|
+
"name": "returnedStatus",
|
|
135
|
+
"type": "bytes4"
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
"name": "LSP20CallVerificationFailed",
|
|
139
|
+
"type": "error"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"inputs": [
|
|
143
|
+
{
|
|
144
|
+
"internalType": "bool",
|
|
145
|
+
"name": "postCall",
|
|
146
|
+
"type": "bool"
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
"name": "LSP20CallingVerifierFailed",
|
|
150
|
+
"type": "error"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"inputs": [
|
|
154
|
+
{
|
|
155
|
+
"internalType": "address",
|
|
156
|
+
"name": "logicVerifier",
|
|
157
|
+
"type": "address"
|
|
158
|
+
}
|
|
159
|
+
],
|
|
160
|
+
"name": "LSP20EOACannotVerifyCall",
|
|
161
|
+
"type": "error"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"inputs": [
|
|
165
|
+
{
|
|
166
|
+
"internalType": "bytes4",
|
|
167
|
+
"name": "functionSelector",
|
|
168
|
+
"type": "bytes4"
|
|
169
|
+
}
|
|
170
|
+
],
|
|
171
|
+
"name": "NoExtensionFoundForFunctionSelector",
|
|
172
|
+
"type": "error"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"anonymous": false,
|
|
176
|
+
"inputs": [
|
|
177
|
+
{
|
|
178
|
+
"indexed": true,
|
|
179
|
+
"internalType": "uint256",
|
|
180
|
+
"name": "operationType",
|
|
181
|
+
"type": "uint256"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"indexed": true,
|
|
185
|
+
"internalType": "address",
|
|
186
|
+
"name": "contractAddress",
|
|
187
|
+
"type": "address"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"indexed": false,
|
|
191
|
+
"internalType": "uint256",
|
|
192
|
+
"name": "value",
|
|
193
|
+
"type": "uint256"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"indexed": true,
|
|
197
|
+
"internalType": "bytes32",
|
|
198
|
+
"name": "salt",
|
|
199
|
+
"type": "bytes32"
|
|
200
|
+
}
|
|
201
|
+
],
|
|
202
|
+
"name": "ContractCreated",
|
|
203
|
+
"type": "event"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"anonymous": false,
|
|
207
|
+
"inputs": [
|
|
208
|
+
{
|
|
209
|
+
"indexed": true,
|
|
210
|
+
"internalType": "bytes32",
|
|
211
|
+
"name": "dataKey",
|
|
212
|
+
"type": "bytes32"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"indexed": false,
|
|
216
|
+
"internalType": "bytes",
|
|
217
|
+
"name": "dataValue",
|
|
218
|
+
"type": "bytes"
|
|
219
|
+
}
|
|
220
|
+
],
|
|
221
|
+
"name": "DataChanged",
|
|
222
|
+
"type": "event"
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"anonymous": false,
|
|
226
|
+
"inputs": [
|
|
227
|
+
{
|
|
228
|
+
"indexed": true,
|
|
229
|
+
"internalType": "uint256",
|
|
230
|
+
"name": "operationType",
|
|
231
|
+
"type": "uint256"
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"indexed": true,
|
|
235
|
+
"internalType": "address",
|
|
236
|
+
"name": "target",
|
|
237
|
+
"type": "address"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"indexed": false,
|
|
241
|
+
"internalType": "uint256",
|
|
242
|
+
"name": "value",
|
|
243
|
+
"type": "uint256"
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"indexed": true,
|
|
247
|
+
"internalType": "bytes4",
|
|
248
|
+
"name": "selector",
|
|
249
|
+
"type": "bytes4"
|
|
250
|
+
}
|
|
251
|
+
],
|
|
252
|
+
"name": "Executed",
|
|
253
|
+
"type": "event"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"anonymous": false,
|
|
257
|
+
"inputs": [
|
|
258
|
+
{
|
|
259
|
+
"indexed": false,
|
|
260
|
+
"internalType": "uint8",
|
|
261
|
+
"name": "version",
|
|
262
|
+
"type": "uint8"
|
|
263
|
+
}
|
|
264
|
+
],
|
|
265
|
+
"name": "Initialized",
|
|
266
|
+
"type": "event"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"anonymous": false,
|
|
270
|
+
"inputs": [],
|
|
271
|
+
"name": "OwnershipRenounced",
|
|
272
|
+
"type": "event"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"anonymous": false,
|
|
276
|
+
"inputs": [
|
|
277
|
+
{
|
|
278
|
+
"indexed": true,
|
|
279
|
+
"internalType": "address",
|
|
280
|
+
"name": "previousOwner",
|
|
281
|
+
"type": "address"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"indexed": true,
|
|
285
|
+
"internalType": "address",
|
|
286
|
+
"name": "newOwner",
|
|
287
|
+
"type": "address"
|
|
288
|
+
}
|
|
289
|
+
],
|
|
290
|
+
"name": "OwnershipTransferStarted",
|
|
291
|
+
"type": "event"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"anonymous": false,
|
|
295
|
+
"inputs": [
|
|
296
|
+
{
|
|
297
|
+
"indexed": true,
|
|
298
|
+
"internalType": "address",
|
|
299
|
+
"name": "previousOwner",
|
|
300
|
+
"type": "address"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"indexed": true,
|
|
304
|
+
"internalType": "address",
|
|
305
|
+
"name": "newOwner",
|
|
306
|
+
"type": "address"
|
|
307
|
+
}
|
|
308
|
+
],
|
|
309
|
+
"name": "OwnershipTransferred",
|
|
310
|
+
"type": "event"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"anonymous": false,
|
|
314
|
+
"inputs": [],
|
|
315
|
+
"name": "RenounceOwnershipStarted",
|
|
316
|
+
"type": "event"
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"anonymous": false,
|
|
320
|
+
"inputs": [
|
|
321
|
+
{
|
|
322
|
+
"indexed": true,
|
|
323
|
+
"internalType": "address",
|
|
324
|
+
"name": "from",
|
|
325
|
+
"type": "address"
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"indexed": true,
|
|
329
|
+
"internalType": "uint256",
|
|
330
|
+
"name": "value",
|
|
331
|
+
"type": "uint256"
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"indexed": true,
|
|
335
|
+
"internalType": "bytes32",
|
|
336
|
+
"name": "typeId",
|
|
337
|
+
"type": "bytes32"
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"indexed": false,
|
|
341
|
+
"internalType": "bytes",
|
|
342
|
+
"name": "receivedData",
|
|
343
|
+
"type": "bytes"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"indexed": false,
|
|
347
|
+
"internalType": "bytes",
|
|
348
|
+
"name": "returnedValue",
|
|
349
|
+
"type": "bytes"
|
|
350
|
+
}
|
|
351
|
+
],
|
|
352
|
+
"name": "UniversalReceiver",
|
|
353
|
+
"type": "event"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"stateMutability": "payable",
|
|
357
|
+
"type": "fallback"
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"inputs": [],
|
|
361
|
+
"name": "RENOUNCE_OWNERSHIP_CONFIRMATION_DELAY",
|
|
362
|
+
"outputs": [
|
|
363
|
+
{
|
|
364
|
+
"internalType": "uint256",
|
|
365
|
+
"name": "",
|
|
366
|
+
"type": "uint256"
|
|
367
|
+
}
|
|
368
|
+
],
|
|
369
|
+
"stateMutability": "view",
|
|
370
|
+
"type": "function"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"inputs": [],
|
|
374
|
+
"name": "RENOUNCE_OWNERSHIP_CONFIRMATION_PERIOD",
|
|
375
|
+
"outputs": [
|
|
376
|
+
{
|
|
377
|
+
"internalType": "uint256",
|
|
378
|
+
"name": "",
|
|
379
|
+
"type": "uint256"
|
|
380
|
+
}
|
|
381
|
+
],
|
|
382
|
+
"stateMutability": "view",
|
|
383
|
+
"type": "function"
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"inputs": [],
|
|
387
|
+
"name": "VERSION",
|
|
388
|
+
"outputs": [
|
|
389
|
+
{
|
|
390
|
+
"internalType": "string",
|
|
391
|
+
"name": "",
|
|
392
|
+
"type": "string"
|
|
393
|
+
}
|
|
394
|
+
],
|
|
395
|
+
"stateMutability": "view",
|
|
396
|
+
"type": "function"
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"inputs": [],
|
|
400
|
+
"name": "acceptOwnership",
|
|
401
|
+
"outputs": [],
|
|
402
|
+
"stateMutability": "nonpayable",
|
|
403
|
+
"type": "function"
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
"inputs": [
|
|
407
|
+
{
|
|
408
|
+
"internalType": "bytes[]",
|
|
409
|
+
"name": "data",
|
|
410
|
+
"type": "bytes[]"
|
|
411
|
+
}
|
|
412
|
+
],
|
|
413
|
+
"name": "batchCalls",
|
|
414
|
+
"outputs": [
|
|
415
|
+
{
|
|
416
|
+
"internalType": "bytes[]",
|
|
417
|
+
"name": "results",
|
|
418
|
+
"type": "bytes[]"
|
|
419
|
+
}
|
|
420
|
+
],
|
|
421
|
+
"stateMutability": "nonpayable",
|
|
422
|
+
"type": "function"
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
"inputs": [
|
|
426
|
+
{
|
|
427
|
+
"internalType": "uint256",
|
|
428
|
+
"name": "operationType",
|
|
429
|
+
"type": "uint256"
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
"internalType": "address",
|
|
433
|
+
"name": "target",
|
|
434
|
+
"type": "address"
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
"internalType": "uint256",
|
|
438
|
+
"name": "value",
|
|
439
|
+
"type": "uint256"
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
"internalType": "bytes",
|
|
443
|
+
"name": "data",
|
|
444
|
+
"type": "bytes"
|
|
445
|
+
}
|
|
446
|
+
],
|
|
447
|
+
"name": "execute",
|
|
448
|
+
"outputs": [
|
|
449
|
+
{
|
|
450
|
+
"internalType": "bytes",
|
|
451
|
+
"name": "",
|
|
452
|
+
"type": "bytes"
|
|
453
|
+
}
|
|
454
|
+
],
|
|
455
|
+
"stateMutability": "payable",
|
|
456
|
+
"type": "function"
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
"inputs": [
|
|
460
|
+
{
|
|
461
|
+
"internalType": "uint256[]",
|
|
462
|
+
"name": "operationsType",
|
|
463
|
+
"type": "uint256[]"
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
"internalType": "address[]",
|
|
467
|
+
"name": "targets",
|
|
468
|
+
"type": "address[]"
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
"internalType": "uint256[]",
|
|
472
|
+
"name": "values",
|
|
473
|
+
"type": "uint256[]"
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
"internalType": "bytes[]",
|
|
477
|
+
"name": "datas",
|
|
478
|
+
"type": "bytes[]"
|
|
479
|
+
}
|
|
480
|
+
],
|
|
481
|
+
"name": "executeBatch",
|
|
482
|
+
"outputs": [
|
|
483
|
+
{
|
|
484
|
+
"internalType": "bytes[]",
|
|
485
|
+
"name": "",
|
|
486
|
+
"type": "bytes[]"
|
|
487
|
+
}
|
|
488
|
+
],
|
|
489
|
+
"stateMutability": "payable",
|
|
490
|
+
"type": "function"
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
"inputs": [
|
|
494
|
+
{
|
|
495
|
+
"internalType": "bytes32",
|
|
496
|
+
"name": "dataKey",
|
|
497
|
+
"type": "bytes32"
|
|
498
|
+
}
|
|
499
|
+
],
|
|
500
|
+
"name": "getData",
|
|
501
|
+
"outputs": [
|
|
502
|
+
{
|
|
503
|
+
"internalType": "bytes",
|
|
504
|
+
"name": "dataValue",
|
|
505
|
+
"type": "bytes"
|
|
506
|
+
}
|
|
507
|
+
],
|
|
508
|
+
"stateMutability": "view",
|
|
509
|
+
"type": "function"
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
"inputs": [
|
|
513
|
+
{
|
|
514
|
+
"internalType": "bytes32[]",
|
|
515
|
+
"name": "dataKeys",
|
|
516
|
+
"type": "bytes32[]"
|
|
517
|
+
}
|
|
518
|
+
],
|
|
519
|
+
"name": "getDataBatch",
|
|
520
|
+
"outputs": [
|
|
521
|
+
{
|
|
522
|
+
"internalType": "bytes[]",
|
|
523
|
+
"name": "dataValues",
|
|
524
|
+
"type": "bytes[]"
|
|
525
|
+
}
|
|
526
|
+
],
|
|
527
|
+
"stateMutability": "view",
|
|
528
|
+
"type": "function"
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
"inputs": [
|
|
532
|
+
{
|
|
533
|
+
"internalType": "address",
|
|
534
|
+
"name": "initialOwner",
|
|
535
|
+
"type": "address"
|
|
536
|
+
}
|
|
537
|
+
],
|
|
538
|
+
"name": "initialize",
|
|
539
|
+
"outputs": [],
|
|
540
|
+
"stateMutability": "payable",
|
|
541
|
+
"type": "function"
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
"inputs": [
|
|
545
|
+
{
|
|
546
|
+
"internalType": "bytes32",
|
|
547
|
+
"name": "dataHash",
|
|
548
|
+
"type": "bytes32"
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
"internalType": "bytes",
|
|
552
|
+
"name": "signature",
|
|
553
|
+
"type": "bytes"
|
|
554
|
+
}
|
|
555
|
+
],
|
|
556
|
+
"name": "isValidSignature",
|
|
557
|
+
"outputs": [
|
|
558
|
+
{
|
|
559
|
+
"internalType": "bytes4",
|
|
560
|
+
"name": "returnedStatus",
|
|
561
|
+
"type": "bytes4"
|
|
562
|
+
}
|
|
563
|
+
],
|
|
564
|
+
"stateMutability": "view",
|
|
565
|
+
"type": "function"
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
"inputs": [],
|
|
569
|
+
"name": "owner",
|
|
570
|
+
"outputs": [
|
|
571
|
+
{
|
|
572
|
+
"internalType": "address",
|
|
573
|
+
"name": "",
|
|
574
|
+
"type": "address"
|
|
575
|
+
}
|
|
576
|
+
],
|
|
577
|
+
"stateMutability": "view",
|
|
578
|
+
"type": "function"
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
"inputs": [],
|
|
582
|
+
"name": "pendingOwner",
|
|
583
|
+
"outputs": [
|
|
584
|
+
{
|
|
585
|
+
"internalType": "address",
|
|
586
|
+
"name": "",
|
|
587
|
+
"type": "address"
|
|
588
|
+
}
|
|
589
|
+
],
|
|
590
|
+
"stateMutability": "view",
|
|
591
|
+
"type": "function"
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
"inputs": [],
|
|
595
|
+
"name": "renounceOwnership",
|
|
596
|
+
"outputs": [],
|
|
597
|
+
"stateMutability": "nonpayable",
|
|
598
|
+
"type": "function"
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
"inputs": [
|
|
602
|
+
{
|
|
603
|
+
"internalType": "bytes32",
|
|
604
|
+
"name": "dataKey",
|
|
605
|
+
"type": "bytes32"
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
"internalType": "bytes",
|
|
609
|
+
"name": "dataValue",
|
|
610
|
+
"type": "bytes"
|
|
611
|
+
}
|
|
612
|
+
],
|
|
613
|
+
"name": "setData",
|
|
614
|
+
"outputs": [],
|
|
615
|
+
"stateMutability": "payable",
|
|
616
|
+
"type": "function"
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
"inputs": [
|
|
620
|
+
{
|
|
621
|
+
"internalType": "bytes32[]",
|
|
622
|
+
"name": "dataKeys",
|
|
623
|
+
"type": "bytes32[]"
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
"internalType": "bytes[]",
|
|
627
|
+
"name": "dataValues",
|
|
628
|
+
"type": "bytes[]"
|
|
629
|
+
}
|
|
630
|
+
],
|
|
631
|
+
"name": "setDataBatch",
|
|
632
|
+
"outputs": [],
|
|
633
|
+
"stateMutability": "payable",
|
|
634
|
+
"type": "function"
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
"inputs": [
|
|
638
|
+
{
|
|
639
|
+
"internalType": "bytes4",
|
|
640
|
+
"name": "interfaceId",
|
|
641
|
+
"type": "bytes4"
|
|
642
|
+
}
|
|
643
|
+
],
|
|
644
|
+
"name": "supportsInterface",
|
|
645
|
+
"outputs": [
|
|
646
|
+
{
|
|
647
|
+
"internalType": "bool",
|
|
648
|
+
"name": "",
|
|
649
|
+
"type": "bool"
|
|
650
|
+
}
|
|
651
|
+
],
|
|
652
|
+
"stateMutability": "view",
|
|
653
|
+
"type": "function"
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
"inputs": [
|
|
657
|
+
{
|
|
658
|
+
"internalType": "address",
|
|
659
|
+
"name": "pendingNewOwner",
|
|
660
|
+
"type": "address"
|
|
661
|
+
}
|
|
662
|
+
],
|
|
663
|
+
"name": "transferOwnership",
|
|
664
|
+
"outputs": [],
|
|
665
|
+
"stateMutability": "nonpayable",
|
|
666
|
+
"type": "function"
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
"inputs": [
|
|
670
|
+
{
|
|
671
|
+
"internalType": "bytes32",
|
|
672
|
+
"name": "typeId",
|
|
673
|
+
"type": "bytes32"
|
|
674
|
+
},
|
|
675
|
+
{
|
|
676
|
+
"internalType": "bytes",
|
|
677
|
+
"name": "receivedData",
|
|
678
|
+
"type": "bytes"
|
|
679
|
+
}
|
|
680
|
+
],
|
|
681
|
+
"name": "universalReceiver",
|
|
682
|
+
"outputs": [
|
|
683
|
+
{
|
|
684
|
+
"internalType": "bytes",
|
|
685
|
+
"name": "returnedValues",
|
|
686
|
+
"type": "bytes"
|
|
687
|
+
}
|
|
688
|
+
],
|
|
689
|
+
"stateMutability": "payable",
|
|
690
|
+
"type": "function"
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
"stateMutability": "payable",
|
|
694
|
+
"type": "receive"
|
|
695
|
+
}
|
|
696
|
+
];
|
|
697
|
+
/**
|
|
698
|
+
* UniversalProfileInit_json Contract Class
|
|
699
|
+
*
|
|
700
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
701
|
+
*
|
|
702
|
+
* @example
|
|
703
|
+
* ```typescript
|
|
704
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
705
|
+
* import { mainnet } from 'viem/chains';
|
|
706
|
+
* import { UniversalProfileInit_json } from 'UniversalProfileInit_json';
|
|
707
|
+
*
|
|
708
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
709
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
710
|
+
*
|
|
711
|
+
* const contract = new UniversalProfileInit_json('0x...', { publicClient, walletClient });
|
|
712
|
+
*
|
|
713
|
+
* // Read functions
|
|
714
|
+
* const result = await contract.balanceOf('0x...');
|
|
715
|
+
*
|
|
716
|
+
* // Write functions
|
|
717
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
718
|
+
*
|
|
719
|
+
* // Simulate transactions (dry-run)
|
|
720
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
721
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
722
|
+
*
|
|
723
|
+
* // Watch events
|
|
724
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
725
|
+
* console.log('Transfer event:', event);
|
|
726
|
+
* });
|
|
727
|
+
* ```
|
|
728
|
+
*/
|
|
729
|
+
class UniversalProfileInit_json {
|
|
730
|
+
constructor(address, clients) {
|
|
731
|
+
this.contractAddress = address;
|
|
732
|
+
this.publicClient = clients.publicClient;
|
|
733
|
+
this.contract = (0, viem_1.getContract)({
|
|
734
|
+
address,
|
|
735
|
+
abi: exports.UniversalProfileInit_jsonAbi,
|
|
736
|
+
client: {
|
|
737
|
+
public: clients.publicClient,
|
|
738
|
+
wallet: clients.walletClient,
|
|
739
|
+
},
|
|
740
|
+
});
|
|
741
|
+
}
|
|
742
|
+
/**
|
|
743
|
+
* Get the contract address
|
|
744
|
+
*/
|
|
745
|
+
get address() {
|
|
746
|
+
return this.contractAddress;
|
|
747
|
+
}
|
|
748
|
+
/**
|
|
749
|
+
* Get the underlying viem contract instance
|
|
750
|
+
*/
|
|
751
|
+
getContract() {
|
|
752
|
+
return this.contract;
|
|
753
|
+
}
|
|
754
|
+
/**
|
|
755
|
+
* RENOUNCE_OWNERSHIP_CONFIRMATION_DELAY
|
|
756
|
+
* view
|
|
757
|
+
*/
|
|
758
|
+
async RENOUNCE_OWNERSHIP_CONFIRMATION_DELAY() {
|
|
759
|
+
return this.contract.read.RENOUNCE_OWNERSHIP_CONFIRMATION_DELAY();
|
|
760
|
+
}
|
|
761
|
+
/**
|
|
762
|
+
* RENOUNCE_OWNERSHIP_CONFIRMATION_PERIOD
|
|
763
|
+
* view
|
|
764
|
+
*/
|
|
765
|
+
async RENOUNCE_OWNERSHIP_CONFIRMATION_PERIOD() {
|
|
766
|
+
return this.contract.read.RENOUNCE_OWNERSHIP_CONFIRMATION_PERIOD();
|
|
767
|
+
}
|
|
768
|
+
/**
|
|
769
|
+
* VERSION
|
|
770
|
+
* view
|
|
771
|
+
*/
|
|
772
|
+
async VERSION() {
|
|
773
|
+
return this.contract.read.VERSION();
|
|
774
|
+
}
|
|
775
|
+
/**
|
|
776
|
+
* getData
|
|
777
|
+
* view
|
|
778
|
+
*/
|
|
779
|
+
async getData(dataKey) {
|
|
780
|
+
return this.contract.read.getData([dataKey]);
|
|
781
|
+
}
|
|
782
|
+
/**
|
|
783
|
+
* getDataBatch
|
|
784
|
+
* view
|
|
785
|
+
*/
|
|
786
|
+
async getDataBatch(dataKeys) {
|
|
787
|
+
return this.contract.read.getDataBatch([dataKeys]);
|
|
788
|
+
}
|
|
789
|
+
/**
|
|
790
|
+
* isValidSignature
|
|
791
|
+
* view
|
|
792
|
+
*/
|
|
793
|
+
async isValidSignature(dataHash, signature) {
|
|
794
|
+
return this.contract.read.isValidSignature([dataHash, signature]);
|
|
795
|
+
}
|
|
796
|
+
/**
|
|
797
|
+
* owner
|
|
798
|
+
* view
|
|
799
|
+
*/
|
|
800
|
+
async owner() {
|
|
801
|
+
return this.contract.read.owner();
|
|
802
|
+
}
|
|
803
|
+
/**
|
|
804
|
+
* pendingOwner
|
|
805
|
+
* view
|
|
806
|
+
*/
|
|
807
|
+
async pendingOwner() {
|
|
808
|
+
return this.contract.read.pendingOwner();
|
|
809
|
+
}
|
|
810
|
+
/**
|
|
811
|
+
* supportsInterface
|
|
812
|
+
* view
|
|
813
|
+
*/
|
|
814
|
+
async supportsInterface(interfaceId) {
|
|
815
|
+
return this.contract.read.supportsInterface([interfaceId]);
|
|
816
|
+
}
|
|
817
|
+
/**
|
|
818
|
+
* acceptOwnership
|
|
819
|
+
* nonpayable
|
|
820
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
821
|
+
*/
|
|
822
|
+
async acceptOwnership(options) {
|
|
823
|
+
if (!this.contract.write) {
|
|
824
|
+
throw new Error('Wallet client is required for write operations');
|
|
825
|
+
}
|
|
826
|
+
return this.contract.write.acceptOwnership(options);
|
|
827
|
+
}
|
|
828
|
+
/**
|
|
829
|
+
* batchCalls
|
|
830
|
+
* nonpayable
|
|
831
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
832
|
+
*/
|
|
833
|
+
async batchCalls(data, options) {
|
|
834
|
+
if (!this.contract.write) {
|
|
835
|
+
throw new Error('Wallet client is required for write operations');
|
|
836
|
+
}
|
|
837
|
+
return this.contract.write.batchCalls([data], options);
|
|
838
|
+
}
|
|
839
|
+
/**
|
|
840
|
+
* execute
|
|
841
|
+
* payable
|
|
842
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
843
|
+
*/
|
|
844
|
+
async execute(operationType, target, value, data, options) {
|
|
845
|
+
if (!this.contract.write) {
|
|
846
|
+
throw new Error('Wallet client is required for write operations');
|
|
847
|
+
}
|
|
848
|
+
return this.contract.write.execute([operationType, target, value, data], options);
|
|
849
|
+
}
|
|
850
|
+
/**
|
|
851
|
+
* executeBatch
|
|
852
|
+
* payable
|
|
853
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
854
|
+
*/
|
|
855
|
+
async executeBatch(operationsType, targets, values, datas, options) {
|
|
856
|
+
if (!this.contract.write) {
|
|
857
|
+
throw new Error('Wallet client is required for write operations');
|
|
858
|
+
}
|
|
859
|
+
return this.contract.write.executeBatch([operationsType, targets, values, datas], options);
|
|
860
|
+
}
|
|
861
|
+
/**
|
|
862
|
+
* initialize
|
|
863
|
+
* payable
|
|
864
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
865
|
+
*/
|
|
866
|
+
async initialize(initialOwner, options) {
|
|
867
|
+
if (!this.contract.write) {
|
|
868
|
+
throw new Error('Wallet client is required for write operations');
|
|
869
|
+
}
|
|
870
|
+
return this.contract.write.initialize([initialOwner], options);
|
|
871
|
+
}
|
|
872
|
+
/**
|
|
873
|
+
* renounceOwnership
|
|
874
|
+
* nonpayable
|
|
875
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
876
|
+
*/
|
|
877
|
+
async renounceOwnership(options) {
|
|
878
|
+
if (!this.contract.write) {
|
|
879
|
+
throw new Error('Wallet client is required for write operations');
|
|
880
|
+
}
|
|
881
|
+
return this.contract.write.renounceOwnership(options);
|
|
882
|
+
}
|
|
883
|
+
/**
|
|
884
|
+
* setData
|
|
885
|
+
* payable
|
|
886
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
887
|
+
*/
|
|
888
|
+
async setData(dataKey, dataValue, options) {
|
|
889
|
+
if (!this.contract.write) {
|
|
890
|
+
throw new Error('Wallet client is required for write operations');
|
|
891
|
+
}
|
|
892
|
+
return this.contract.write.setData([dataKey, dataValue], options);
|
|
893
|
+
}
|
|
894
|
+
/**
|
|
895
|
+
* setDataBatch
|
|
896
|
+
* payable
|
|
897
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
898
|
+
*/
|
|
899
|
+
async setDataBatch(dataKeys, dataValues, options) {
|
|
900
|
+
if (!this.contract.write) {
|
|
901
|
+
throw new Error('Wallet client is required for write operations');
|
|
902
|
+
}
|
|
903
|
+
return this.contract.write.setDataBatch([dataKeys, dataValues], options);
|
|
904
|
+
}
|
|
905
|
+
/**
|
|
906
|
+
* transferOwnership
|
|
907
|
+
* nonpayable
|
|
908
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
909
|
+
*/
|
|
910
|
+
async transferOwnership(pendingNewOwner, options) {
|
|
911
|
+
if (!this.contract.write) {
|
|
912
|
+
throw new Error('Wallet client is required for write operations');
|
|
913
|
+
}
|
|
914
|
+
return this.contract.write.transferOwnership([pendingNewOwner], options);
|
|
915
|
+
}
|
|
916
|
+
/**
|
|
917
|
+
* universalReceiver
|
|
918
|
+
* payable
|
|
919
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
920
|
+
*/
|
|
921
|
+
async universalReceiver(typeId, receivedData, options) {
|
|
922
|
+
if (!this.contract.write) {
|
|
923
|
+
throw new Error('Wallet client is required for write operations');
|
|
924
|
+
}
|
|
925
|
+
return this.contract.write.universalReceiver([typeId, receivedData], options);
|
|
926
|
+
}
|
|
927
|
+
/**
|
|
928
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
929
|
+
*
|
|
930
|
+
* @example
|
|
931
|
+
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
932
|
+
* console.log('Gas estimate:', result.request.gas);
|
|
933
|
+
* console.log('Would succeed:', result.result);
|
|
934
|
+
*/
|
|
935
|
+
get simulate() {
|
|
936
|
+
const contract = this.contract;
|
|
937
|
+
if (!contract.simulate) {
|
|
938
|
+
throw new Error('Public client is required for simulation');
|
|
939
|
+
}
|
|
940
|
+
return {
|
|
941
|
+
/**
|
|
942
|
+
* Simulate acceptOwnership
|
|
943
|
+
* Returns gas estimate and result without sending transaction
|
|
944
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
945
|
+
*/
|
|
946
|
+
async acceptOwnership(options) {
|
|
947
|
+
return contract.simulate.acceptOwnership(options);
|
|
948
|
+
},
|
|
949
|
+
/**
|
|
950
|
+
* Simulate batchCalls
|
|
951
|
+
* Returns gas estimate and result without sending transaction
|
|
952
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
953
|
+
*/
|
|
954
|
+
async batchCalls(data, options) {
|
|
955
|
+
return contract.simulate.batchCalls([data], options);
|
|
956
|
+
},
|
|
957
|
+
/**
|
|
958
|
+
* Simulate execute
|
|
959
|
+
* Returns gas estimate and result without sending transaction
|
|
960
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
961
|
+
*/
|
|
962
|
+
async execute(operationType, target, value, data, options) {
|
|
963
|
+
return contract.simulate.execute([operationType, target, value, data], options);
|
|
964
|
+
},
|
|
965
|
+
/**
|
|
966
|
+
* Simulate executeBatch
|
|
967
|
+
* Returns gas estimate and result without sending transaction
|
|
968
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
969
|
+
*/
|
|
970
|
+
async executeBatch(operationsType, targets, values, datas, options) {
|
|
971
|
+
return contract.simulate.executeBatch([operationsType, targets, values, datas], options);
|
|
972
|
+
},
|
|
973
|
+
/**
|
|
974
|
+
* Simulate initialize
|
|
975
|
+
* Returns gas estimate and result without sending transaction
|
|
976
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
977
|
+
*/
|
|
978
|
+
async initialize(initialOwner, options) {
|
|
979
|
+
return contract.simulate.initialize([initialOwner], options);
|
|
980
|
+
},
|
|
981
|
+
/**
|
|
982
|
+
* Simulate renounceOwnership
|
|
983
|
+
* Returns gas estimate and result without sending transaction
|
|
984
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
985
|
+
*/
|
|
986
|
+
async renounceOwnership(options) {
|
|
987
|
+
return contract.simulate.renounceOwnership(options);
|
|
988
|
+
},
|
|
989
|
+
/**
|
|
990
|
+
* Simulate setData
|
|
991
|
+
* Returns gas estimate and result without sending transaction
|
|
992
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
993
|
+
*/
|
|
994
|
+
async setData(dataKey, dataValue, options) {
|
|
995
|
+
return contract.simulate.setData([dataKey, dataValue], options);
|
|
996
|
+
},
|
|
997
|
+
/**
|
|
998
|
+
* Simulate setDataBatch
|
|
999
|
+
* Returns gas estimate and result without sending transaction
|
|
1000
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1001
|
+
*/
|
|
1002
|
+
async setDataBatch(dataKeys, dataValues, options) {
|
|
1003
|
+
return contract.simulate.setDataBatch([dataKeys, dataValues], options);
|
|
1004
|
+
},
|
|
1005
|
+
/**
|
|
1006
|
+
* Simulate transferOwnership
|
|
1007
|
+
* Returns gas estimate and result without sending transaction
|
|
1008
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1009
|
+
*/
|
|
1010
|
+
async transferOwnership(pendingNewOwner, options) {
|
|
1011
|
+
return contract.simulate.transferOwnership([pendingNewOwner], options);
|
|
1012
|
+
},
|
|
1013
|
+
/**
|
|
1014
|
+
* Simulate universalReceiver
|
|
1015
|
+
* Returns gas estimate and result without sending transaction
|
|
1016
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1017
|
+
*/
|
|
1018
|
+
async universalReceiver(typeId, receivedData, options) {
|
|
1019
|
+
return contract.simulate.universalReceiver([typeId, receivedData], options);
|
|
1020
|
+
}
|
|
1021
|
+
};
|
|
1022
|
+
}
|
|
1023
|
+
/**
|
|
1024
|
+
* Watch contract events
|
|
1025
|
+
*
|
|
1026
|
+
* @example
|
|
1027
|
+
* // Watch all Transfer events
|
|
1028
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
1029
|
+
* console.log('Transfer:', event);
|
|
1030
|
+
* });
|
|
1031
|
+
*
|
|
1032
|
+
* // Stop watching
|
|
1033
|
+
* unwatch();
|
|
1034
|
+
*/
|
|
1035
|
+
get watch() {
|
|
1036
|
+
return {
|
|
1037
|
+
/**
|
|
1038
|
+
* Watch ContractCreated events
|
|
1039
|
+
* @param callback Function to call when event is emitted
|
|
1040
|
+
* @param filter Optional filter for indexed parameters
|
|
1041
|
+
* @returns Unwatch function to stop listening
|
|
1042
|
+
*/
|
|
1043
|
+
ContractCreated: (callback, filter) => {
|
|
1044
|
+
return this.publicClient.watchContractEvent({
|
|
1045
|
+
address: this.contractAddress,
|
|
1046
|
+
abi: exports.UniversalProfileInit_jsonAbi,
|
|
1047
|
+
eventName: 'ContractCreated',
|
|
1048
|
+
args: filter,
|
|
1049
|
+
onLogs: (logs) => {
|
|
1050
|
+
logs.forEach((log) => {
|
|
1051
|
+
callback(log.args);
|
|
1052
|
+
});
|
|
1053
|
+
},
|
|
1054
|
+
});
|
|
1055
|
+
},
|
|
1056
|
+
/**
|
|
1057
|
+
* Watch DataChanged events
|
|
1058
|
+
* @param callback Function to call when event is emitted
|
|
1059
|
+
* @param filter Optional filter for indexed parameters
|
|
1060
|
+
* @returns Unwatch function to stop listening
|
|
1061
|
+
*/
|
|
1062
|
+
DataChanged: (callback, filter) => {
|
|
1063
|
+
return this.publicClient.watchContractEvent({
|
|
1064
|
+
address: this.contractAddress,
|
|
1065
|
+
abi: exports.UniversalProfileInit_jsonAbi,
|
|
1066
|
+
eventName: 'DataChanged',
|
|
1067
|
+
args: filter,
|
|
1068
|
+
onLogs: (logs) => {
|
|
1069
|
+
logs.forEach((log) => {
|
|
1070
|
+
callback(log.args);
|
|
1071
|
+
});
|
|
1072
|
+
},
|
|
1073
|
+
});
|
|
1074
|
+
},
|
|
1075
|
+
/**
|
|
1076
|
+
* Watch Executed events
|
|
1077
|
+
* @param callback Function to call when event is emitted
|
|
1078
|
+
* @param filter Optional filter for indexed parameters
|
|
1079
|
+
* @returns Unwatch function to stop listening
|
|
1080
|
+
*/
|
|
1081
|
+
Executed: (callback, filter) => {
|
|
1082
|
+
return this.publicClient.watchContractEvent({
|
|
1083
|
+
address: this.contractAddress,
|
|
1084
|
+
abi: exports.UniversalProfileInit_jsonAbi,
|
|
1085
|
+
eventName: 'Executed',
|
|
1086
|
+
args: filter,
|
|
1087
|
+
onLogs: (logs) => {
|
|
1088
|
+
logs.forEach((log) => {
|
|
1089
|
+
callback(log.args);
|
|
1090
|
+
});
|
|
1091
|
+
},
|
|
1092
|
+
});
|
|
1093
|
+
},
|
|
1094
|
+
/**
|
|
1095
|
+
* Watch Initialized events
|
|
1096
|
+
* @param callback Function to call when event is emitted
|
|
1097
|
+
* @param filter Optional filter for indexed parameters
|
|
1098
|
+
* @returns Unwatch function to stop listening
|
|
1099
|
+
*/
|
|
1100
|
+
Initialized: (callback) => {
|
|
1101
|
+
return this.publicClient.watchContractEvent({
|
|
1102
|
+
address: this.contractAddress,
|
|
1103
|
+
abi: exports.UniversalProfileInit_jsonAbi,
|
|
1104
|
+
eventName: 'Initialized',
|
|
1105
|
+
onLogs: (logs) => {
|
|
1106
|
+
logs.forEach((log) => {
|
|
1107
|
+
callback(log.args);
|
|
1108
|
+
});
|
|
1109
|
+
},
|
|
1110
|
+
});
|
|
1111
|
+
},
|
|
1112
|
+
/**
|
|
1113
|
+
* Watch OwnershipRenounced events
|
|
1114
|
+
* @param callback Function to call when event is emitted
|
|
1115
|
+
* @param filter Optional filter for indexed parameters
|
|
1116
|
+
* @returns Unwatch function to stop listening
|
|
1117
|
+
*/
|
|
1118
|
+
OwnershipRenounced: (callback) => {
|
|
1119
|
+
return this.publicClient.watchContractEvent({
|
|
1120
|
+
address: this.contractAddress,
|
|
1121
|
+
abi: exports.UniversalProfileInit_jsonAbi,
|
|
1122
|
+
eventName: 'OwnershipRenounced',
|
|
1123
|
+
onLogs: (logs) => {
|
|
1124
|
+
logs.forEach((log) => {
|
|
1125
|
+
callback(log.args);
|
|
1126
|
+
});
|
|
1127
|
+
},
|
|
1128
|
+
});
|
|
1129
|
+
},
|
|
1130
|
+
/**
|
|
1131
|
+
* Watch OwnershipTransferStarted events
|
|
1132
|
+
* @param callback Function to call when event is emitted
|
|
1133
|
+
* @param filter Optional filter for indexed parameters
|
|
1134
|
+
* @returns Unwatch function to stop listening
|
|
1135
|
+
*/
|
|
1136
|
+
OwnershipTransferStarted: (callback, filter) => {
|
|
1137
|
+
return this.publicClient.watchContractEvent({
|
|
1138
|
+
address: this.contractAddress,
|
|
1139
|
+
abi: exports.UniversalProfileInit_jsonAbi,
|
|
1140
|
+
eventName: 'OwnershipTransferStarted',
|
|
1141
|
+
args: filter,
|
|
1142
|
+
onLogs: (logs) => {
|
|
1143
|
+
logs.forEach((log) => {
|
|
1144
|
+
callback(log.args);
|
|
1145
|
+
});
|
|
1146
|
+
},
|
|
1147
|
+
});
|
|
1148
|
+
},
|
|
1149
|
+
/**
|
|
1150
|
+
* Watch OwnershipTransferred events
|
|
1151
|
+
* @param callback Function to call when event is emitted
|
|
1152
|
+
* @param filter Optional filter for indexed parameters
|
|
1153
|
+
* @returns Unwatch function to stop listening
|
|
1154
|
+
*/
|
|
1155
|
+
OwnershipTransferred: (callback, filter) => {
|
|
1156
|
+
return this.publicClient.watchContractEvent({
|
|
1157
|
+
address: this.contractAddress,
|
|
1158
|
+
abi: exports.UniversalProfileInit_jsonAbi,
|
|
1159
|
+
eventName: 'OwnershipTransferred',
|
|
1160
|
+
args: filter,
|
|
1161
|
+
onLogs: (logs) => {
|
|
1162
|
+
logs.forEach((log) => {
|
|
1163
|
+
callback(log.args);
|
|
1164
|
+
});
|
|
1165
|
+
},
|
|
1166
|
+
});
|
|
1167
|
+
},
|
|
1168
|
+
/**
|
|
1169
|
+
* Watch RenounceOwnershipStarted events
|
|
1170
|
+
* @param callback Function to call when event is emitted
|
|
1171
|
+
* @param filter Optional filter for indexed parameters
|
|
1172
|
+
* @returns Unwatch function to stop listening
|
|
1173
|
+
*/
|
|
1174
|
+
RenounceOwnershipStarted: (callback) => {
|
|
1175
|
+
return this.publicClient.watchContractEvent({
|
|
1176
|
+
address: this.contractAddress,
|
|
1177
|
+
abi: exports.UniversalProfileInit_jsonAbi,
|
|
1178
|
+
eventName: 'RenounceOwnershipStarted',
|
|
1179
|
+
onLogs: (logs) => {
|
|
1180
|
+
logs.forEach((log) => {
|
|
1181
|
+
callback(log.args);
|
|
1182
|
+
});
|
|
1183
|
+
},
|
|
1184
|
+
});
|
|
1185
|
+
},
|
|
1186
|
+
/**
|
|
1187
|
+
* Watch UniversalReceiver events
|
|
1188
|
+
* @param callback Function to call when event is emitted
|
|
1189
|
+
* @param filter Optional filter for indexed parameters
|
|
1190
|
+
* @returns Unwatch function to stop listening
|
|
1191
|
+
*/
|
|
1192
|
+
UniversalReceiver: (callback, filter) => {
|
|
1193
|
+
return this.publicClient.watchContractEvent({
|
|
1194
|
+
address: this.contractAddress,
|
|
1195
|
+
abi: exports.UniversalProfileInit_jsonAbi,
|
|
1196
|
+
eventName: 'UniversalReceiver',
|
|
1197
|
+
args: filter,
|
|
1198
|
+
onLogs: (logs) => {
|
|
1199
|
+
logs.forEach((log) => {
|
|
1200
|
+
callback(log.args);
|
|
1201
|
+
});
|
|
1202
|
+
},
|
|
1203
|
+
});
|
|
1204
|
+
}
|
|
1205
|
+
};
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
exports.UniversalProfileInit_json = UniversalProfileInit_json;
|