@aromedia/contracts-sdk 0.2.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.
Files changed (51) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +121 -0
  3. package/dist/chains.cjs +67 -0
  4. package/dist/chains.cjs.map +1 -0
  5. package/dist/chains.d.cts +826 -0
  6. package/dist/chains.d.ts +826 -0
  7. package/dist/chains.js +23 -0
  8. package/dist/chains.js.map +1 -0
  9. package/dist/chunk-7I5N3BGV.js +271 -0
  10. package/dist/chunk-7I5N3BGV.js.map +1 -0
  11. package/dist/chunk-BYPGUFYV.js +50 -0
  12. package/dist/chunk-BYPGUFYV.js.map +1 -0
  13. package/dist/chunk-FWZ7XKFC.js +91 -0
  14. package/dist/chunk-FWZ7XKFC.js.map +1 -0
  15. package/dist/chunk-J6YVU3VA.js +35 -0
  16. package/dist/chunk-J6YVU3VA.js.map +1 -0
  17. package/dist/chunk-TZQHQLNY.js +7213 -0
  18. package/dist/chunk-TZQHQLNY.js.map +1 -0
  19. package/dist/generated/abis.cjs +7244 -0
  20. package/dist/generated/abis.cjs.map +1 -0
  21. package/dist/generated/abis.d.cts +11005 -0
  22. package/dist/generated/abis.d.ts +11005 -0
  23. package/dist/generated/abis.js +21 -0
  24. package/dist/generated/abis.js.map +1 -0
  25. package/dist/generated/addresses.cjs +119 -0
  26. package/dist/generated/addresses.cjs.map +1 -0
  27. package/dist/generated/addresses.d.cts +18 -0
  28. package/dist/generated/addresses.d.ts +18 -0
  29. package/dist/generated/addresses.js +15 -0
  30. package/dist/generated/addresses.js.map +1 -0
  31. package/dist/hooks/index.cjs +2005 -0
  32. package/dist/hooks/index.cjs.map +1 -0
  33. package/dist/hooks/index.d.cts +63 -0
  34. package/dist/hooks/index.d.ts +63 -0
  35. package/dist/hooks/index.js +218 -0
  36. package/dist/hooks/index.js.map +1 -0
  37. package/dist/index.cjs +7884 -0
  38. package/dist/index.cjs.map +1 -0
  39. package/dist/index.d.cts +42 -0
  40. package/dist/index.d.ts +42 -0
  41. package/dist/index.js +258 -0
  42. package/dist/index.js.map +1 -0
  43. package/dist/onboarding-BHpAJaNW.d.cts +302 -0
  44. package/dist/onboarding-DxL_LpM3.d.ts +302 -0
  45. package/dist/workflows/index.cjs +1988 -0
  46. package/dist/workflows/index.cjs.map +1 -0
  47. package/dist/workflows/index.d.cts +72 -0
  48. package/dist/workflows/index.d.ts +72 -0
  49. package/dist/workflows/index.js +25 -0
  50. package/dist/workflows/index.js.map +1 -0
  51. package/package.json +120 -0
@@ -0,0 +1,2005 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/hooks/index.ts
21
+ var hooks_exports = {};
22
+ __export(hooks_exports, {
23
+ useAroAddresses: () => useAroAddresses,
24
+ useAroChainId: () => useAroChainId,
25
+ useHasSBT: () => useHasSBT,
26
+ useHasVouched: () => useHasVouched,
27
+ useMemberData: () => useMemberData,
28
+ useMembership: () => useMembership,
29
+ useMintSBT: () => useMintSBT,
30
+ useNomination: () => useNomination,
31
+ useNominationStatus: () => useNominationStatus,
32
+ useNominationThreshold: () => useNominationThreshold,
33
+ useNominationWriter: () => useNominationWriter
34
+ });
35
+ module.exports = __toCommonJS(hooks_exports);
36
+
37
+ // src/hooks/useAroAddresses.ts
38
+ var import_react = require("react");
39
+ var import_wagmi = require("wagmi");
40
+
41
+ // src/generated/addresses.ts
42
+ var SUPPORTED_CHAIN_IDS = [
43
+ 1,
44
+ // ethereum
45
+ 11155111,
46
+ // sepolia
47
+ 8453,
48
+ // base
49
+ 84532,
50
+ // baseSepolia
51
+ 31337
52
+ // hardhat
53
+ ];
54
+ var addresses = {
55
+ 1: {
56
+ // ethereum
57
+ AroMediaIncMultiSig: "0x0000000000000000000000000000000000000000",
58
+ AroMediaAccessManager: "0x0000000000000000000000000000000000000000",
59
+ AroMediaRWA: "0x0000000000000000000000000000000000000000",
60
+ AroMediaAssetsRegistry: "0x0000000000000000000000000000000000000000",
61
+ ForcedTransferManager: "0x0000000000000000000000000000000000000000",
62
+ AroSBT: "0x0000000000000000000000000000000000000000",
63
+ AroNomination: "0x0000000000000000000000000000000000000000"
64
+ },
65
+ 11155111: {
66
+ // sepolia
67
+ AroMediaIncMultiSig: "0x8d2A0721f124464B8937994D5F72cFec180F314B",
68
+ AroMediaAccessManager: "0x3BA2b821354921dBD9509583d5B319105c70eD03",
69
+ AroMediaRWA: "0xa5292d74f8baCF0A3e68302F2CA8032bc9F6765b",
70
+ AroMediaAssetsRegistry: "0x17d9Dc6a0c8D043058193C836ed001235bACE5fe",
71
+ ForcedTransferManager: "0x92D447b7E585B48CA405DbAaFe0a6C1D0682678c",
72
+ AroSBT: "0xc1562aD0232271Bb3F5D0E555F43AD645C3A5dAf",
73
+ AroNomination: "0xF86305E1B89C778a8f92Eb6510138865a97842F8"
74
+ },
75
+ 8453: {
76
+ // base
77
+ AroMediaIncMultiSig: "0x0000000000000000000000000000000000000000",
78
+ AroMediaAccessManager: "0x0000000000000000000000000000000000000000",
79
+ AroMediaRWA: "0x0000000000000000000000000000000000000000",
80
+ AroMediaAssetsRegistry: "0x0000000000000000000000000000000000000000",
81
+ ForcedTransferManager: "0x0000000000000000000000000000000000000000",
82
+ AroSBT: "0x0000000000000000000000000000000000000000",
83
+ AroNomination: "0x0000000000000000000000000000000000000000"
84
+ },
85
+ 84532: {
86
+ // baseSepolia
87
+ AroMediaIncMultiSig: "0x0000000000000000000000000000000000000000",
88
+ AroMediaAccessManager: "0x0000000000000000000000000000000000000000",
89
+ AroMediaRWA: "0x0000000000000000000000000000000000000000",
90
+ AroMediaAssetsRegistry: "0x0000000000000000000000000000000000000000",
91
+ ForcedTransferManager: "0x0000000000000000000000000000000000000000",
92
+ AroSBT: "0x0000000000000000000000000000000000000000",
93
+ AroNomination: "0x0000000000000000000000000000000000000000"
94
+ },
95
+ 31337: {
96
+ // hardhat
97
+ AroMediaIncMultiSig: "0x0000000000000000000000000000000000000000",
98
+ AroMediaAccessManager: "0x0000000000000000000000000000000000000000",
99
+ AroMediaRWA: "0x0000000000000000000000000000000000000000",
100
+ AroMediaAssetsRegistry: "0x0000000000000000000000000000000000000000",
101
+ ForcedTransferManager: "0x0000000000000000000000000000000000000000",
102
+ AroSBT: "0x0000000000000000000000000000000000000000",
103
+ AroNomination: "0x0000000000000000000000000000000000000000"
104
+ }
105
+ };
106
+
107
+ // src/hooks/useAroAddresses.ts
108
+ function useAroAddresses() {
109
+ const chainId = (0, import_wagmi.useChainId)();
110
+ return (0, import_react.useMemo)(() => {
111
+ if (!isSupportedChain(chainId)) return null;
112
+ return addresses[chainId];
113
+ }, [chainId]);
114
+ }
115
+ function useAroChainId() {
116
+ const chainId = (0, import_wagmi.useChainId)();
117
+ return isSupportedChain(chainId) ? chainId : null;
118
+ }
119
+ function isSupportedChain(id) {
120
+ return SUPPORTED_CHAIN_IDS.includes(id);
121
+ }
122
+
123
+ // src/hooks/useAroSBT.ts
124
+ var import_wagmi2 = require("wagmi");
125
+
126
+ // src/generated/abis.ts
127
+ var AroSBT_ABI = [
128
+ {
129
+ "inputs": [
130
+ {
131
+ "internalType": "address",
132
+ "name": "initialAuthority",
133
+ "type": "address"
134
+ }
135
+ ],
136
+ "stateMutability": "nonpayable",
137
+ "type": "constructor"
138
+ },
139
+ {
140
+ "inputs": [
141
+ {
142
+ "internalType": "address",
143
+ "name": "authority",
144
+ "type": "address"
145
+ }
146
+ ],
147
+ "name": "AccessManagedInvalidAuthority",
148
+ "type": "error"
149
+ },
150
+ {
151
+ "inputs": [
152
+ {
153
+ "internalType": "address",
154
+ "name": "caller",
155
+ "type": "address"
156
+ },
157
+ {
158
+ "internalType": "uint32",
159
+ "name": "delay",
160
+ "type": "uint32"
161
+ }
162
+ ],
163
+ "name": "AccessManagedRequiredDelay",
164
+ "type": "error"
165
+ },
166
+ {
167
+ "inputs": [
168
+ {
169
+ "internalType": "address",
170
+ "name": "caller",
171
+ "type": "address"
172
+ }
173
+ ],
174
+ "name": "AccessManagedUnauthorized",
175
+ "type": "error"
176
+ },
177
+ {
178
+ "inputs": [
179
+ {
180
+ "internalType": "address",
181
+ "name": "account",
182
+ "type": "address"
183
+ }
184
+ ],
185
+ "name": "AlreadyHasSBT",
186
+ "type": "error"
187
+ },
188
+ {
189
+ "inputs": [],
190
+ "name": "ERC721EnumerableForbiddenBatchMint",
191
+ "type": "error"
192
+ },
193
+ {
194
+ "inputs": [
195
+ {
196
+ "internalType": "address",
197
+ "name": "sender",
198
+ "type": "address"
199
+ },
200
+ {
201
+ "internalType": "uint256",
202
+ "name": "tokenId",
203
+ "type": "uint256"
204
+ },
205
+ {
206
+ "internalType": "address",
207
+ "name": "owner",
208
+ "type": "address"
209
+ }
210
+ ],
211
+ "name": "ERC721IncorrectOwner",
212
+ "type": "error"
213
+ },
214
+ {
215
+ "inputs": [
216
+ {
217
+ "internalType": "address",
218
+ "name": "operator",
219
+ "type": "address"
220
+ },
221
+ {
222
+ "internalType": "uint256",
223
+ "name": "tokenId",
224
+ "type": "uint256"
225
+ }
226
+ ],
227
+ "name": "ERC721InsufficientApproval",
228
+ "type": "error"
229
+ },
230
+ {
231
+ "inputs": [
232
+ {
233
+ "internalType": "address",
234
+ "name": "approver",
235
+ "type": "address"
236
+ }
237
+ ],
238
+ "name": "ERC721InvalidApprover",
239
+ "type": "error"
240
+ },
241
+ {
242
+ "inputs": [
243
+ {
244
+ "internalType": "address",
245
+ "name": "operator",
246
+ "type": "address"
247
+ }
248
+ ],
249
+ "name": "ERC721InvalidOperator",
250
+ "type": "error"
251
+ },
252
+ {
253
+ "inputs": [
254
+ {
255
+ "internalType": "address",
256
+ "name": "owner",
257
+ "type": "address"
258
+ }
259
+ ],
260
+ "name": "ERC721InvalidOwner",
261
+ "type": "error"
262
+ },
263
+ {
264
+ "inputs": [
265
+ {
266
+ "internalType": "address",
267
+ "name": "receiver",
268
+ "type": "address"
269
+ }
270
+ ],
271
+ "name": "ERC721InvalidReceiver",
272
+ "type": "error"
273
+ },
274
+ {
275
+ "inputs": [
276
+ {
277
+ "internalType": "address",
278
+ "name": "sender",
279
+ "type": "address"
280
+ }
281
+ ],
282
+ "name": "ERC721InvalidSender",
283
+ "type": "error"
284
+ },
285
+ {
286
+ "inputs": [
287
+ {
288
+ "internalType": "uint256",
289
+ "name": "tokenId",
290
+ "type": "uint256"
291
+ }
292
+ ],
293
+ "name": "ERC721NonexistentToken",
294
+ "type": "error"
295
+ },
296
+ {
297
+ "inputs": [
298
+ {
299
+ "internalType": "address",
300
+ "name": "owner",
301
+ "type": "address"
302
+ },
303
+ {
304
+ "internalType": "uint256",
305
+ "name": "index",
306
+ "type": "uint256"
307
+ }
308
+ ],
309
+ "name": "ERC721OutOfBoundsIndex",
310
+ "type": "error"
311
+ },
312
+ {
313
+ "inputs": [],
314
+ "name": "EnforcedPause",
315
+ "type": "error"
316
+ },
317
+ {
318
+ "inputs": [],
319
+ "name": "ExpectedPause",
320
+ "type": "error"
321
+ },
322
+ {
323
+ "inputs": [
324
+ {
325
+ "internalType": "address",
326
+ "name": "account",
327
+ "type": "address"
328
+ }
329
+ ],
330
+ "name": "NoSBT",
331
+ "type": "error"
332
+ },
333
+ {
334
+ "inputs": [],
335
+ "name": "SoulboundTransferBlocked",
336
+ "type": "error"
337
+ },
338
+ {
339
+ "anonymous": false,
340
+ "inputs": [
341
+ {
342
+ "indexed": true,
343
+ "internalType": "address",
344
+ "name": "owner",
345
+ "type": "address"
346
+ },
347
+ {
348
+ "indexed": true,
349
+ "internalType": "address",
350
+ "name": "approved",
351
+ "type": "address"
352
+ },
353
+ {
354
+ "indexed": true,
355
+ "internalType": "uint256",
356
+ "name": "tokenId",
357
+ "type": "uint256"
358
+ }
359
+ ],
360
+ "name": "Approval",
361
+ "type": "event"
362
+ },
363
+ {
364
+ "anonymous": false,
365
+ "inputs": [
366
+ {
367
+ "indexed": true,
368
+ "internalType": "address",
369
+ "name": "owner",
370
+ "type": "address"
371
+ },
372
+ {
373
+ "indexed": true,
374
+ "internalType": "address",
375
+ "name": "operator",
376
+ "type": "address"
377
+ },
378
+ {
379
+ "indexed": false,
380
+ "internalType": "bool",
381
+ "name": "approved",
382
+ "type": "bool"
383
+ }
384
+ ],
385
+ "name": "ApprovalForAll",
386
+ "type": "event"
387
+ },
388
+ {
389
+ "anonymous": false,
390
+ "inputs": [
391
+ {
392
+ "indexed": false,
393
+ "internalType": "address",
394
+ "name": "authority",
395
+ "type": "address"
396
+ }
397
+ ],
398
+ "name": "AuthorityUpdated",
399
+ "type": "event"
400
+ },
401
+ {
402
+ "anonymous": false,
403
+ "inputs": [
404
+ {
405
+ "indexed": false,
406
+ "internalType": "uint256",
407
+ "name": "_fromTokenId",
408
+ "type": "uint256"
409
+ },
410
+ {
411
+ "indexed": false,
412
+ "internalType": "uint256",
413
+ "name": "_toTokenId",
414
+ "type": "uint256"
415
+ }
416
+ ],
417
+ "name": "BatchMetadataUpdate",
418
+ "type": "event"
419
+ },
420
+ {
421
+ "anonymous": false,
422
+ "inputs": [
423
+ {
424
+ "indexed": false,
425
+ "internalType": "uint256",
426
+ "name": "tokenId",
427
+ "type": "uint256"
428
+ }
429
+ ],
430
+ "name": "Locked",
431
+ "type": "event"
432
+ },
433
+ {
434
+ "anonymous": false,
435
+ "inputs": [
436
+ {
437
+ "indexed": true,
438
+ "internalType": "address",
439
+ "name": "member",
440
+ "type": "address"
441
+ },
442
+ {
443
+ "indexed": true,
444
+ "internalType": "uint256",
445
+ "name": "tokenId",
446
+ "type": "uint256"
447
+ },
448
+ {
449
+ "indexed": false,
450
+ "internalType": "uint256",
451
+ "name": "memberId",
452
+ "type": "uint256"
453
+ },
454
+ {
455
+ "indexed": false,
456
+ "internalType": "enum AroSBT.Tier",
457
+ "name": "tier",
458
+ "type": "uint8"
459
+ },
460
+ {
461
+ "indexed": false,
462
+ "internalType": "bytes32",
463
+ "name": "kycHash",
464
+ "type": "bytes32"
465
+ }
466
+ ],
467
+ "name": "MemberAdmitted",
468
+ "type": "event"
469
+ },
470
+ {
471
+ "anonymous": false,
472
+ "inputs": [
473
+ {
474
+ "indexed": true,
475
+ "internalType": "address",
476
+ "name": "member",
477
+ "type": "address"
478
+ },
479
+ {
480
+ "indexed": true,
481
+ "internalType": "uint256",
482
+ "name": "tokenId",
483
+ "type": "uint256"
484
+ },
485
+ {
486
+ "indexed": false,
487
+ "internalType": "uint256",
488
+ "name": "memberId",
489
+ "type": "uint256"
490
+ }
491
+ ],
492
+ "name": "MemberRevoked",
493
+ "type": "event"
494
+ },
495
+ {
496
+ "anonymous": false,
497
+ "inputs": [
498
+ {
499
+ "indexed": false,
500
+ "internalType": "uint256",
501
+ "name": "_tokenId",
502
+ "type": "uint256"
503
+ }
504
+ ],
505
+ "name": "MetadataUpdate",
506
+ "type": "event"
507
+ },
508
+ {
509
+ "anonymous": false,
510
+ "inputs": [
511
+ {
512
+ "indexed": false,
513
+ "internalType": "address",
514
+ "name": "account",
515
+ "type": "address"
516
+ }
517
+ ],
518
+ "name": "Paused",
519
+ "type": "event"
520
+ },
521
+ {
522
+ "anonymous": false,
523
+ "inputs": [
524
+ {
525
+ "indexed": true,
526
+ "internalType": "address",
527
+ "name": "member",
528
+ "type": "address"
529
+ },
530
+ {
531
+ "indexed": true,
532
+ "internalType": "uint256",
533
+ "name": "tokenId",
534
+ "type": "uint256"
535
+ },
536
+ {
537
+ "indexed": false,
538
+ "internalType": "enum AroSBT.Tier",
539
+ "name": "oldTier",
540
+ "type": "uint8"
541
+ },
542
+ {
543
+ "indexed": false,
544
+ "internalType": "enum AroSBT.Tier",
545
+ "name": "newTier",
546
+ "type": "uint8"
547
+ }
548
+ ],
549
+ "name": "TierUpdated",
550
+ "type": "event"
551
+ },
552
+ {
553
+ "anonymous": false,
554
+ "inputs": [
555
+ {
556
+ "indexed": true,
557
+ "internalType": "address",
558
+ "name": "from",
559
+ "type": "address"
560
+ },
561
+ {
562
+ "indexed": true,
563
+ "internalType": "address",
564
+ "name": "to",
565
+ "type": "address"
566
+ },
567
+ {
568
+ "indexed": true,
569
+ "internalType": "uint256",
570
+ "name": "tokenId",
571
+ "type": "uint256"
572
+ }
573
+ ],
574
+ "name": "Transfer",
575
+ "type": "event"
576
+ },
577
+ {
578
+ "anonymous": false,
579
+ "inputs": [
580
+ {
581
+ "indexed": false,
582
+ "internalType": "uint256",
583
+ "name": "tokenId",
584
+ "type": "uint256"
585
+ }
586
+ ],
587
+ "name": "Unlocked",
588
+ "type": "event"
589
+ },
590
+ {
591
+ "anonymous": false,
592
+ "inputs": [
593
+ {
594
+ "indexed": false,
595
+ "internalType": "address",
596
+ "name": "account",
597
+ "type": "address"
598
+ }
599
+ ],
600
+ "name": "Unpaused",
601
+ "type": "event"
602
+ },
603
+ {
604
+ "inputs": [
605
+ {
606
+ "internalType": "address",
607
+ "name": "to",
608
+ "type": "address"
609
+ },
610
+ {
611
+ "internalType": "uint256",
612
+ "name": "tokenId",
613
+ "type": "uint256"
614
+ }
615
+ ],
616
+ "name": "approve",
617
+ "outputs": [],
618
+ "stateMutability": "nonpayable",
619
+ "type": "function"
620
+ },
621
+ {
622
+ "inputs": [],
623
+ "name": "authority",
624
+ "outputs": [
625
+ {
626
+ "internalType": "address",
627
+ "name": "",
628
+ "type": "address"
629
+ }
630
+ ],
631
+ "stateMutability": "view",
632
+ "type": "function"
633
+ },
634
+ {
635
+ "inputs": [
636
+ {
637
+ "internalType": "address",
638
+ "name": "owner",
639
+ "type": "address"
640
+ }
641
+ ],
642
+ "name": "balanceOf",
643
+ "outputs": [
644
+ {
645
+ "internalType": "uint256",
646
+ "name": "",
647
+ "type": "uint256"
648
+ }
649
+ ],
650
+ "stateMutability": "view",
651
+ "type": "function"
652
+ },
653
+ {
654
+ "inputs": [
655
+ {
656
+ "internalType": "uint256",
657
+ "name": "tokenId",
658
+ "type": "uint256"
659
+ }
660
+ ],
661
+ "name": "getApproved",
662
+ "outputs": [
663
+ {
664
+ "internalType": "address",
665
+ "name": "",
666
+ "type": "address"
667
+ }
668
+ ],
669
+ "stateMutability": "view",
670
+ "type": "function"
671
+ },
672
+ {
673
+ "inputs": [
674
+ {
675
+ "internalType": "address",
676
+ "name": "account",
677
+ "type": "address"
678
+ }
679
+ ],
680
+ "name": "getMemberData",
681
+ "outputs": [
682
+ {
683
+ "components": [
684
+ {
685
+ "internalType": "uint256",
686
+ "name": "memberId",
687
+ "type": "uint256"
688
+ },
689
+ {
690
+ "internalType": "uint256",
691
+ "name": "issuanceDate",
692
+ "type": "uint256"
693
+ },
694
+ {
695
+ "internalType": "enum AroSBT.Tier",
696
+ "name": "tier",
697
+ "type": "uint8"
698
+ },
699
+ {
700
+ "internalType": "bytes32",
701
+ "name": "kycHash",
702
+ "type": "bytes32"
703
+ }
704
+ ],
705
+ "internalType": "struct AroSBT.MemberData",
706
+ "name": "data",
707
+ "type": "tuple"
708
+ }
709
+ ],
710
+ "stateMutability": "view",
711
+ "type": "function"
712
+ },
713
+ {
714
+ "inputs": [
715
+ {
716
+ "internalType": "uint256",
717
+ "name": "tokenId",
718
+ "type": "uint256"
719
+ }
720
+ ],
721
+ "name": "getMemberDataByToken",
722
+ "outputs": [
723
+ {
724
+ "components": [
725
+ {
726
+ "internalType": "uint256",
727
+ "name": "memberId",
728
+ "type": "uint256"
729
+ },
730
+ {
731
+ "internalType": "uint256",
732
+ "name": "issuanceDate",
733
+ "type": "uint256"
734
+ },
735
+ {
736
+ "internalType": "enum AroSBT.Tier",
737
+ "name": "tier",
738
+ "type": "uint8"
739
+ },
740
+ {
741
+ "internalType": "bytes32",
742
+ "name": "kycHash",
743
+ "type": "bytes32"
744
+ }
745
+ ],
746
+ "internalType": "struct AroSBT.MemberData",
747
+ "name": "data",
748
+ "type": "tuple"
749
+ }
750
+ ],
751
+ "stateMutability": "view",
752
+ "type": "function"
753
+ },
754
+ {
755
+ "inputs": [
756
+ {
757
+ "internalType": "address",
758
+ "name": "account",
759
+ "type": "address"
760
+ }
761
+ ],
762
+ "name": "hasSBT",
763
+ "outputs": [
764
+ {
765
+ "internalType": "bool",
766
+ "name": "",
767
+ "type": "bool"
768
+ }
769
+ ],
770
+ "stateMutability": "view",
771
+ "type": "function"
772
+ },
773
+ {
774
+ "inputs": [
775
+ {
776
+ "internalType": "address",
777
+ "name": "owner",
778
+ "type": "address"
779
+ },
780
+ {
781
+ "internalType": "address",
782
+ "name": "operator",
783
+ "type": "address"
784
+ }
785
+ ],
786
+ "name": "isApprovedForAll",
787
+ "outputs": [
788
+ {
789
+ "internalType": "bool",
790
+ "name": "",
791
+ "type": "bool"
792
+ }
793
+ ],
794
+ "stateMutability": "view",
795
+ "type": "function"
796
+ },
797
+ {
798
+ "inputs": [],
799
+ "name": "isConsumingScheduledOp",
800
+ "outputs": [
801
+ {
802
+ "internalType": "bytes4",
803
+ "name": "",
804
+ "type": "bytes4"
805
+ }
806
+ ],
807
+ "stateMutability": "view",
808
+ "type": "function"
809
+ },
810
+ {
811
+ "inputs": [
812
+ {
813
+ "internalType": "uint256",
814
+ "name": "tokenId",
815
+ "type": "uint256"
816
+ }
817
+ ],
818
+ "name": "locked",
819
+ "outputs": [
820
+ {
821
+ "internalType": "bool",
822
+ "name": "",
823
+ "type": "bool"
824
+ }
825
+ ],
826
+ "stateMutability": "view",
827
+ "type": "function"
828
+ },
829
+ {
830
+ "inputs": [
831
+ {
832
+ "internalType": "address",
833
+ "name": "to",
834
+ "type": "address"
835
+ },
836
+ {
837
+ "internalType": "bytes32",
838
+ "name": "kycHash",
839
+ "type": "bytes32"
840
+ },
841
+ {
842
+ "internalType": "string",
843
+ "name": "metadataURI",
844
+ "type": "string"
845
+ }
846
+ ],
847
+ "name": "mint",
848
+ "outputs": [
849
+ {
850
+ "internalType": "uint256",
851
+ "name": "",
852
+ "type": "uint256"
853
+ }
854
+ ],
855
+ "stateMutability": "nonpayable",
856
+ "type": "function"
857
+ },
858
+ {
859
+ "inputs": [
860
+ {
861
+ "internalType": "address",
862
+ "name": "to",
863
+ "type": "address"
864
+ },
865
+ {
866
+ "internalType": "bytes32",
867
+ "name": "kycHash",
868
+ "type": "bytes32"
869
+ },
870
+ {
871
+ "internalType": "string",
872
+ "name": "metadataURI",
873
+ "type": "string"
874
+ },
875
+ {
876
+ "internalType": "enum AroSBT.Tier",
877
+ "name": "tier",
878
+ "type": "uint8"
879
+ }
880
+ ],
881
+ "name": "mint",
882
+ "outputs": [
883
+ {
884
+ "internalType": "uint256",
885
+ "name": "",
886
+ "type": "uint256"
887
+ }
888
+ ],
889
+ "stateMutability": "nonpayable",
890
+ "type": "function"
891
+ },
892
+ {
893
+ "inputs": [],
894
+ "name": "name",
895
+ "outputs": [
896
+ {
897
+ "internalType": "string",
898
+ "name": "",
899
+ "type": "string"
900
+ }
901
+ ],
902
+ "stateMutability": "view",
903
+ "type": "function"
904
+ },
905
+ {
906
+ "inputs": [
907
+ {
908
+ "internalType": "uint256",
909
+ "name": "tokenId",
910
+ "type": "uint256"
911
+ }
912
+ ],
913
+ "name": "ownerOf",
914
+ "outputs": [
915
+ {
916
+ "internalType": "address",
917
+ "name": "",
918
+ "type": "address"
919
+ }
920
+ ],
921
+ "stateMutability": "view",
922
+ "type": "function"
923
+ },
924
+ {
925
+ "inputs": [],
926
+ "name": "pause",
927
+ "outputs": [],
928
+ "stateMutability": "nonpayable",
929
+ "type": "function"
930
+ },
931
+ {
932
+ "inputs": [],
933
+ "name": "paused",
934
+ "outputs": [
935
+ {
936
+ "internalType": "bool",
937
+ "name": "",
938
+ "type": "bool"
939
+ }
940
+ ],
941
+ "stateMutability": "view",
942
+ "type": "function"
943
+ },
944
+ {
945
+ "inputs": [
946
+ {
947
+ "internalType": "uint256",
948
+ "name": "tokenId",
949
+ "type": "uint256"
950
+ }
951
+ ],
952
+ "name": "revoke",
953
+ "outputs": [],
954
+ "stateMutability": "nonpayable",
955
+ "type": "function"
956
+ },
957
+ {
958
+ "inputs": [
959
+ {
960
+ "internalType": "address",
961
+ "name": "from",
962
+ "type": "address"
963
+ },
964
+ {
965
+ "internalType": "address",
966
+ "name": "to",
967
+ "type": "address"
968
+ },
969
+ {
970
+ "internalType": "uint256",
971
+ "name": "tokenId",
972
+ "type": "uint256"
973
+ }
974
+ ],
975
+ "name": "safeTransferFrom",
976
+ "outputs": [],
977
+ "stateMutability": "nonpayable",
978
+ "type": "function"
979
+ },
980
+ {
981
+ "inputs": [
982
+ {
983
+ "internalType": "address",
984
+ "name": "from",
985
+ "type": "address"
986
+ },
987
+ {
988
+ "internalType": "address",
989
+ "name": "to",
990
+ "type": "address"
991
+ },
992
+ {
993
+ "internalType": "uint256",
994
+ "name": "tokenId",
995
+ "type": "uint256"
996
+ },
997
+ {
998
+ "internalType": "bytes",
999
+ "name": "data",
1000
+ "type": "bytes"
1001
+ }
1002
+ ],
1003
+ "name": "safeTransferFrom",
1004
+ "outputs": [],
1005
+ "stateMutability": "nonpayable",
1006
+ "type": "function"
1007
+ },
1008
+ {
1009
+ "inputs": [
1010
+ {
1011
+ "internalType": "address",
1012
+ "name": "operator",
1013
+ "type": "address"
1014
+ },
1015
+ {
1016
+ "internalType": "bool",
1017
+ "name": "approved",
1018
+ "type": "bool"
1019
+ }
1020
+ ],
1021
+ "name": "setApprovalForAll",
1022
+ "outputs": [],
1023
+ "stateMutability": "nonpayable",
1024
+ "type": "function"
1025
+ },
1026
+ {
1027
+ "inputs": [
1028
+ {
1029
+ "internalType": "address",
1030
+ "name": "newAuthority",
1031
+ "type": "address"
1032
+ }
1033
+ ],
1034
+ "name": "setAuthority",
1035
+ "outputs": [],
1036
+ "stateMutability": "nonpayable",
1037
+ "type": "function"
1038
+ },
1039
+ {
1040
+ "inputs": [
1041
+ {
1042
+ "internalType": "uint256",
1043
+ "name": "tokenId",
1044
+ "type": "uint256"
1045
+ },
1046
+ {
1047
+ "internalType": "enum AroSBT.Tier",
1048
+ "name": "newTier",
1049
+ "type": "uint8"
1050
+ }
1051
+ ],
1052
+ "name": "setTier",
1053
+ "outputs": [],
1054
+ "stateMutability": "nonpayable",
1055
+ "type": "function"
1056
+ },
1057
+ {
1058
+ "inputs": [
1059
+ {
1060
+ "internalType": "bytes4",
1061
+ "name": "interfaceId",
1062
+ "type": "bytes4"
1063
+ }
1064
+ ],
1065
+ "name": "supportsInterface",
1066
+ "outputs": [
1067
+ {
1068
+ "internalType": "bool",
1069
+ "name": "",
1070
+ "type": "bool"
1071
+ }
1072
+ ],
1073
+ "stateMutability": "view",
1074
+ "type": "function"
1075
+ },
1076
+ {
1077
+ "inputs": [],
1078
+ "name": "symbol",
1079
+ "outputs": [
1080
+ {
1081
+ "internalType": "string",
1082
+ "name": "",
1083
+ "type": "string"
1084
+ }
1085
+ ],
1086
+ "stateMutability": "view",
1087
+ "type": "function"
1088
+ },
1089
+ {
1090
+ "inputs": [
1091
+ {
1092
+ "internalType": "uint256",
1093
+ "name": "index",
1094
+ "type": "uint256"
1095
+ }
1096
+ ],
1097
+ "name": "tokenByIndex",
1098
+ "outputs": [
1099
+ {
1100
+ "internalType": "uint256",
1101
+ "name": "",
1102
+ "type": "uint256"
1103
+ }
1104
+ ],
1105
+ "stateMutability": "view",
1106
+ "type": "function"
1107
+ },
1108
+ {
1109
+ "inputs": [
1110
+ {
1111
+ "internalType": "address",
1112
+ "name": "account",
1113
+ "type": "address"
1114
+ }
1115
+ ],
1116
+ "name": "tokenOfMember",
1117
+ "outputs": [
1118
+ {
1119
+ "internalType": "uint256",
1120
+ "name": "",
1121
+ "type": "uint256"
1122
+ }
1123
+ ],
1124
+ "stateMutability": "view",
1125
+ "type": "function"
1126
+ },
1127
+ {
1128
+ "inputs": [
1129
+ {
1130
+ "internalType": "address",
1131
+ "name": "owner",
1132
+ "type": "address"
1133
+ },
1134
+ {
1135
+ "internalType": "uint256",
1136
+ "name": "index",
1137
+ "type": "uint256"
1138
+ }
1139
+ ],
1140
+ "name": "tokenOfOwnerByIndex",
1141
+ "outputs": [
1142
+ {
1143
+ "internalType": "uint256",
1144
+ "name": "",
1145
+ "type": "uint256"
1146
+ }
1147
+ ],
1148
+ "stateMutability": "view",
1149
+ "type": "function"
1150
+ },
1151
+ {
1152
+ "inputs": [
1153
+ {
1154
+ "internalType": "uint256",
1155
+ "name": "tokenId",
1156
+ "type": "uint256"
1157
+ }
1158
+ ],
1159
+ "name": "tokenURI",
1160
+ "outputs": [
1161
+ {
1162
+ "internalType": "string",
1163
+ "name": "",
1164
+ "type": "string"
1165
+ }
1166
+ ],
1167
+ "stateMutability": "view",
1168
+ "type": "function"
1169
+ },
1170
+ {
1171
+ "inputs": [],
1172
+ "name": "totalMembersAdmitted",
1173
+ "outputs": [
1174
+ {
1175
+ "internalType": "uint256",
1176
+ "name": "",
1177
+ "type": "uint256"
1178
+ }
1179
+ ],
1180
+ "stateMutability": "view",
1181
+ "type": "function"
1182
+ },
1183
+ {
1184
+ "inputs": [],
1185
+ "name": "totalSupply",
1186
+ "outputs": [
1187
+ {
1188
+ "internalType": "uint256",
1189
+ "name": "",
1190
+ "type": "uint256"
1191
+ }
1192
+ ],
1193
+ "stateMutability": "view",
1194
+ "type": "function"
1195
+ },
1196
+ {
1197
+ "inputs": [
1198
+ {
1199
+ "internalType": "address",
1200
+ "name": "from",
1201
+ "type": "address"
1202
+ },
1203
+ {
1204
+ "internalType": "address",
1205
+ "name": "to",
1206
+ "type": "address"
1207
+ },
1208
+ {
1209
+ "internalType": "uint256",
1210
+ "name": "tokenId",
1211
+ "type": "uint256"
1212
+ }
1213
+ ],
1214
+ "name": "transferFrom",
1215
+ "outputs": [],
1216
+ "stateMutability": "nonpayable",
1217
+ "type": "function"
1218
+ },
1219
+ {
1220
+ "inputs": [],
1221
+ "name": "unpause",
1222
+ "outputs": [],
1223
+ "stateMutability": "nonpayable",
1224
+ "type": "function"
1225
+ },
1226
+ {
1227
+ "inputs": [
1228
+ {
1229
+ "internalType": "uint256",
1230
+ "name": "tokenId",
1231
+ "type": "uint256"
1232
+ },
1233
+ {
1234
+ "internalType": "bytes32",
1235
+ "name": "newKycHash",
1236
+ "type": "bytes32"
1237
+ }
1238
+ ],
1239
+ "name": "updateKycHash",
1240
+ "outputs": [],
1241
+ "stateMutability": "nonpayable",
1242
+ "type": "function"
1243
+ }
1244
+ ];
1245
+ var AroNomination_ABI = [
1246
+ {
1247
+ "inputs": [
1248
+ {
1249
+ "internalType": "address",
1250
+ "name": "initialAuthority",
1251
+ "type": "address"
1252
+ },
1253
+ {
1254
+ "internalType": "address",
1255
+ "name": "_sbtContract",
1256
+ "type": "address"
1257
+ },
1258
+ {
1259
+ "internalType": "uint256",
1260
+ "name": "_threshold",
1261
+ "type": "uint256"
1262
+ }
1263
+ ],
1264
+ "stateMutability": "nonpayable",
1265
+ "type": "constructor"
1266
+ },
1267
+ {
1268
+ "inputs": [
1269
+ {
1270
+ "internalType": "address",
1271
+ "name": "authority",
1272
+ "type": "address"
1273
+ }
1274
+ ],
1275
+ "name": "AccessManagedInvalidAuthority",
1276
+ "type": "error"
1277
+ },
1278
+ {
1279
+ "inputs": [
1280
+ {
1281
+ "internalType": "address",
1282
+ "name": "caller",
1283
+ "type": "address"
1284
+ },
1285
+ {
1286
+ "internalType": "uint32",
1287
+ "name": "delay",
1288
+ "type": "uint32"
1289
+ }
1290
+ ],
1291
+ "name": "AccessManagedRequiredDelay",
1292
+ "type": "error"
1293
+ },
1294
+ {
1295
+ "inputs": [
1296
+ {
1297
+ "internalType": "address",
1298
+ "name": "caller",
1299
+ "type": "address"
1300
+ }
1301
+ ],
1302
+ "name": "AccessManagedUnauthorized",
1303
+ "type": "error"
1304
+ },
1305
+ {
1306
+ "inputs": [
1307
+ {
1308
+ "internalType": "address",
1309
+ "name": "candidate",
1310
+ "type": "address"
1311
+ }
1312
+ ],
1313
+ "name": "AlreadyNominated",
1314
+ "type": "error"
1315
+ },
1316
+ {
1317
+ "inputs": [
1318
+ {
1319
+ "internalType": "address",
1320
+ "name": "voucher",
1321
+ "type": "address"
1322
+ },
1323
+ {
1324
+ "internalType": "address",
1325
+ "name": "candidate",
1326
+ "type": "address"
1327
+ }
1328
+ ],
1329
+ "name": "AlreadyVouched",
1330
+ "type": "error"
1331
+ },
1332
+ {
1333
+ "inputs": [],
1334
+ "name": "CallerHasNoSBT",
1335
+ "type": "error"
1336
+ },
1337
+ {
1338
+ "inputs": [
1339
+ {
1340
+ "internalType": "address",
1341
+ "name": "candidate",
1342
+ "type": "address"
1343
+ }
1344
+ ],
1345
+ "name": "CandidateAlreadyMember",
1346
+ "type": "error"
1347
+ },
1348
+ {
1349
+ "inputs": [
1350
+ {
1351
+ "internalType": "address",
1352
+ "name": "candidate",
1353
+ "type": "address"
1354
+ }
1355
+ ],
1356
+ "name": "NominationNotPending",
1357
+ "type": "error"
1358
+ },
1359
+ {
1360
+ "inputs": [],
1361
+ "name": "NominatorCannotVouch",
1362
+ "type": "error"
1363
+ },
1364
+ {
1365
+ "inputs": [
1366
+ {
1367
+ "internalType": "address",
1368
+ "name": "candidate",
1369
+ "type": "address"
1370
+ }
1371
+ ],
1372
+ "name": "NotNominated",
1373
+ "type": "error"
1374
+ },
1375
+ {
1376
+ "inputs": [],
1377
+ "name": "ThresholdCannotBeZero",
1378
+ "type": "error"
1379
+ },
1380
+ {
1381
+ "anonymous": false,
1382
+ "inputs": [
1383
+ {
1384
+ "indexed": false,
1385
+ "internalType": "address",
1386
+ "name": "authority",
1387
+ "type": "address"
1388
+ }
1389
+ ],
1390
+ "name": "AuthorityUpdated",
1391
+ "type": "event"
1392
+ },
1393
+ {
1394
+ "anonymous": false,
1395
+ "inputs": [
1396
+ {
1397
+ "indexed": true,
1398
+ "internalType": "address",
1399
+ "name": "candidate",
1400
+ "type": "address"
1401
+ },
1402
+ {
1403
+ "indexed": false,
1404
+ "internalType": "uint256",
1405
+ "name": "totalVouches",
1406
+ "type": "uint256"
1407
+ },
1408
+ {
1409
+ "indexed": false,
1410
+ "internalType": "uint256",
1411
+ "name": "timestamp",
1412
+ "type": "uint256"
1413
+ }
1414
+ ],
1415
+ "name": "CandidateApproved",
1416
+ "type": "event"
1417
+ },
1418
+ {
1419
+ "anonymous": false,
1420
+ "inputs": [
1421
+ {
1422
+ "indexed": true,
1423
+ "internalType": "address",
1424
+ "name": "candidate",
1425
+ "type": "address"
1426
+ },
1427
+ {
1428
+ "indexed": true,
1429
+ "internalType": "address",
1430
+ "name": "nominator",
1431
+ "type": "address"
1432
+ },
1433
+ {
1434
+ "indexed": false,
1435
+ "internalType": "uint256",
1436
+ "name": "timestamp",
1437
+ "type": "uint256"
1438
+ }
1439
+ ],
1440
+ "name": "CandidateNominated",
1441
+ "type": "event"
1442
+ },
1443
+ {
1444
+ "anonymous": false,
1445
+ "inputs": [
1446
+ {
1447
+ "indexed": true,
1448
+ "internalType": "address",
1449
+ "name": "candidate",
1450
+ "type": "address"
1451
+ },
1452
+ {
1453
+ "indexed": true,
1454
+ "internalType": "address",
1455
+ "name": "voucher",
1456
+ "type": "address"
1457
+ },
1458
+ {
1459
+ "indexed": false,
1460
+ "internalType": "uint256",
1461
+ "name": "currentVouches",
1462
+ "type": "uint256"
1463
+ },
1464
+ {
1465
+ "indexed": false,
1466
+ "internalType": "uint256",
1467
+ "name": "threshold",
1468
+ "type": "uint256"
1469
+ }
1470
+ ],
1471
+ "name": "CandidateVouched",
1472
+ "type": "event"
1473
+ },
1474
+ {
1475
+ "anonymous": false,
1476
+ "inputs": [
1477
+ {
1478
+ "indexed": true,
1479
+ "internalType": "address",
1480
+ "name": "candidate",
1481
+ "type": "address"
1482
+ },
1483
+ {
1484
+ "indexed": true,
1485
+ "internalType": "address",
1486
+ "name": "clearedBy",
1487
+ "type": "address"
1488
+ }
1489
+ ],
1490
+ "name": "NominationCleared",
1491
+ "type": "event"
1492
+ },
1493
+ {
1494
+ "anonymous": false,
1495
+ "inputs": [
1496
+ {
1497
+ "indexed": false,
1498
+ "internalType": "address",
1499
+ "name": "oldContract",
1500
+ "type": "address"
1501
+ },
1502
+ {
1503
+ "indexed": false,
1504
+ "internalType": "address",
1505
+ "name": "newContract",
1506
+ "type": "address"
1507
+ }
1508
+ ],
1509
+ "name": "SBTContractUpdated",
1510
+ "type": "event"
1511
+ },
1512
+ {
1513
+ "anonymous": false,
1514
+ "inputs": [
1515
+ {
1516
+ "indexed": false,
1517
+ "internalType": "uint256",
1518
+ "name": "oldThreshold",
1519
+ "type": "uint256"
1520
+ },
1521
+ {
1522
+ "indexed": false,
1523
+ "internalType": "uint256",
1524
+ "name": "newThreshold",
1525
+ "type": "uint256"
1526
+ }
1527
+ ],
1528
+ "name": "ThresholdUpdated",
1529
+ "type": "event"
1530
+ },
1531
+ {
1532
+ "inputs": [],
1533
+ "name": "authority",
1534
+ "outputs": [
1535
+ {
1536
+ "internalType": "address",
1537
+ "name": "",
1538
+ "type": "address"
1539
+ }
1540
+ ],
1541
+ "stateMutability": "view",
1542
+ "type": "function"
1543
+ },
1544
+ {
1545
+ "inputs": [
1546
+ {
1547
+ "internalType": "address",
1548
+ "name": "candidate",
1549
+ "type": "address"
1550
+ }
1551
+ ],
1552
+ "name": "clearNomination",
1553
+ "outputs": [],
1554
+ "stateMutability": "nonpayable",
1555
+ "type": "function"
1556
+ },
1557
+ {
1558
+ "inputs": [
1559
+ {
1560
+ "internalType": "address",
1561
+ "name": "candidate",
1562
+ "type": "address"
1563
+ }
1564
+ ],
1565
+ "name": "getNomination",
1566
+ "outputs": [
1567
+ {
1568
+ "internalType": "address",
1569
+ "name": "nominator",
1570
+ "type": "address"
1571
+ },
1572
+ {
1573
+ "internalType": "address[]",
1574
+ "name": "vouchers",
1575
+ "type": "address[]"
1576
+ },
1577
+ {
1578
+ "internalType": "uint256",
1579
+ "name": "nominatedAt",
1580
+ "type": "uint256"
1581
+ },
1582
+ {
1583
+ "internalType": "enum AroNomination.NominationStatus",
1584
+ "name": "status",
1585
+ "type": "uint8"
1586
+ }
1587
+ ],
1588
+ "stateMutability": "view",
1589
+ "type": "function"
1590
+ },
1591
+ {
1592
+ "inputs": [
1593
+ {
1594
+ "internalType": "address",
1595
+ "name": "candidate",
1596
+ "type": "address"
1597
+ }
1598
+ ],
1599
+ "name": "getNominationCount",
1600
+ "outputs": [
1601
+ {
1602
+ "internalType": "uint256",
1603
+ "name": "",
1604
+ "type": "uint256"
1605
+ }
1606
+ ],
1607
+ "stateMutability": "view",
1608
+ "type": "function"
1609
+ },
1610
+ {
1611
+ "inputs": [
1612
+ {
1613
+ "internalType": "address",
1614
+ "name": "candidate",
1615
+ "type": "address"
1616
+ }
1617
+ ],
1618
+ "name": "getNominationStatus",
1619
+ "outputs": [
1620
+ {
1621
+ "internalType": "enum AroNomination.NominationStatus",
1622
+ "name": "",
1623
+ "type": "uint8"
1624
+ }
1625
+ ],
1626
+ "stateMutability": "view",
1627
+ "type": "function"
1628
+ },
1629
+ {
1630
+ "inputs": [
1631
+ {
1632
+ "internalType": "address",
1633
+ "name": "candidate",
1634
+ "type": "address"
1635
+ }
1636
+ ],
1637
+ "name": "getNominator",
1638
+ "outputs": [
1639
+ {
1640
+ "internalType": "address",
1641
+ "name": "",
1642
+ "type": "address"
1643
+ }
1644
+ ],
1645
+ "stateMutability": "view",
1646
+ "type": "function"
1647
+ },
1648
+ {
1649
+ "inputs": [
1650
+ {
1651
+ "internalType": "address",
1652
+ "name": "candidate",
1653
+ "type": "address"
1654
+ }
1655
+ ],
1656
+ "name": "getVouchers",
1657
+ "outputs": [
1658
+ {
1659
+ "internalType": "address[]",
1660
+ "name": "",
1661
+ "type": "address[]"
1662
+ }
1663
+ ],
1664
+ "stateMutability": "view",
1665
+ "type": "function"
1666
+ },
1667
+ {
1668
+ "inputs": [
1669
+ {
1670
+ "internalType": "address",
1671
+ "name": "voucher",
1672
+ "type": "address"
1673
+ },
1674
+ {
1675
+ "internalType": "address",
1676
+ "name": "candidate",
1677
+ "type": "address"
1678
+ }
1679
+ ],
1680
+ "name": "hasVouched",
1681
+ "outputs": [
1682
+ {
1683
+ "internalType": "bool",
1684
+ "name": "",
1685
+ "type": "bool"
1686
+ }
1687
+ ],
1688
+ "stateMutability": "view",
1689
+ "type": "function"
1690
+ },
1691
+ {
1692
+ "inputs": [],
1693
+ "name": "isConsumingScheduledOp",
1694
+ "outputs": [
1695
+ {
1696
+ "internalType": "bytes4",
1697
+ "name": "",
1698
+ "type": "bytes4"
1699
+ }
1700
+ ],
1701
+ "stateMutability": "view",
1702
+ "type": "function"
1703
+ },
1704
+ {
1705
+ "inputs": [
1706
+ {
1707
+ "internalType": "address",
1708
+ "name": "candidate",
1709
+ "type": "address"
1710
+ }
1711
+ ],
1712
+ "name": "isNominated",
1713
+ "outputs": [
1714
+ {
1715
+ "internalType": "bool",
1716
+ "name": "",
1717
+ "type": "bool"
1718
+ }
1719
+ ],
1720
+ "stateMutability": "view",
1721
+ "type": "function"
1722
+ },
1723
+ {
1724
+ "inputs": [
1725
+ {
1726
+ "internalType": "address",
1727
+ "name": "candidate",
1728
+ "type": "address"
1729
+ }
1730
+ ],
1731
+ "name": "nominate",
1732
+ "outputs": [],
1733
+ "stateMutability": "nonpayable",
1734
+ "type": "function"
1735
+ },
1736
+ {
1737
+ "inputs": [],
1738
+ "name": "sbtContract",
1739
+ "outputs": [
1740
+ {
1741
+ "internalType": "contract AroSBT",
1742
+ "name": "",
1743
+ "type": "address"
1744
+ }
1745
+ ],
1746
+ "stateMutability": "view",
1747
+ "type": "function"
1748
+ },
1749
+ {
1750
+ "inputs": [
1751
+ {
1752
+ "internalType": "address",
1753
+ "name": "newAuthority",
1754
+ "type": "address"
1755
+ }
1756
+ ],
1757
+ "name": "setAuthority",
1758
+ "outputs": [],
1759
+ "stateMutability": "nonpayable",
1760
+ "type": "function"
1761
+ },
1762
+ {
1763
+ "inputs": [
1764
+ {
1765
+ "internalType": "address",
1766
+ "name": "newSBTContract",
1767
+ "type": "address"
1768
+ }
1769
+ ],
1770
+ "name": "setSBTContract",
1771
+ "outputs": [],
1772
+ "stateMutability": "nonpayable",
1773
+ "type": "function"
1774
+ },
1775
+ {
1776
+ "inputs": [
1777
+ {
1778
+ "internalType": "uint256",
1779
+ "name": "newThreshold",
1780
+ "type": "uint256"
1781
+ }
1782
+ ],
1783
+ "name": "setThreshold",
1784
+ "outputs": [],
1785
+ "stateMutability": "nonpayable",
1786
+ "type": "function"
1787
+ },
1788
+ {
1789
+ "inputs": [],
1790
+ "name": "threshold",
1791
+ "outputs": [
1792
+ {
1793
+ "internalType": "uint256",
1794
+ "name": "",
1795
+ "type": "uint256"
1796
+ }
1797
+ ],
1798
+ "stateMutability": "view",
1799
+ "type": "function"
1800
+ },
1801
+ {
1802
+ "inputs": [
1803
+ {
1804
+ "internalType": "address",
1805
+ "name": "candidate",
1806
+ "type": "address"
1807
+ }
1808
+ ],
1809
+ "name": "vouch",
1810
+ "outputs": [],
1811
+ "stateMutability": "nonpayable",
1812
+ "type": "function"
1813
+ }
1814
+ ];
1815
+
1816
+ // src/hooks/useAroSBT.ts
1817
+ function useHasSBT(account, opts = {}) {
1818
+ const addrs = useAroAddresses();
1819
+ return (0, import_wagmi2.useReadContract)({
1820
+ address: addrs?.AroSBT,
1821
+ abi: AroSBT_ABI,
1822
+ functionName: "hasSBT",
1823
+ args: account ? [account] : void 0,
1824
+ query: {
1825
+ enabled: Boolean(addrs?.AroSBT && account),
1826
+ ...opts.query
1827
+ },
1828
+ ...opts
1829
+ });
1830
+ }
1831
+ function useMemberData(account, opts = {}) {
1832
+ const addrs = useAroAddresses();
1833
+ return (0, import_wagmi2.useReadContract)({
1834
+ address: addrs?.AroSBT,
1835
+ abi: AroSBT_ABI,
1836
+ functionName: "getMemberData",
1837
+ args: account ? [account] : void 0,
1838
+ query: {
1839
+ enabled: Boolean(addrs?.AroSBT && account),
1840
+ ...opts.query
1841
+ },
1842
+ ...opts
1843
+ });
1844
+ }
1845
+ function useMintSBT() {
1846
+ return (0, import_wagmi2.useWriteContract)();
1847
+ }
1848
+
1849
+ // src/hooks/useAroNomination.ts
1850
+ var import_wagmi3 = require("wagmi");
1851
+ function useNomination(candidate, opts = {}) {
1852
+ const addrs = useAroAddresses();
1853
+ return (0, import_wagmi3.useReadContract)({
1854
+ address: addrs?.AroNomination,
1855
+ abi: AroNomination_ABI,
1856
+ functionName: "getNomination",
1857
+ args: candidate ? [candidate] : void 0,
1858
+ query: {
1859
+ enabled: Boolean(addrs?.AroNomination && candidate),
1860
+ ...opts.query
1861
+ },
1862
+ ...opts
1863
+ });
1864
+ }
1865
+ function useNominationStatus(candidate, opts = {}) {
1866
+ const addrs = useAroAddresses();
1867
+ return (0, import_wagmi3.useReadContract)({
1868
+ address: addrs?.AroNomination,
1869
+ abi: AroNomination_ABI,
1870
+ functionName: "getNominationStatus",
1871
+ args: candidate ? [candidate] : void 0,
1872
+ query: {
1873
+ enabled: Boolean(addrs?.AroNomination && candidate),
1874
+ ...opts.query
1875
+ },
1876
+ ...opts
1877
+ });
1878
+ }
1879
+ function useNominationThreshold(opts = {}) {
1880
+ const addrs = useAroAddresses();
1881
+ return (0, import_wagmi3.useReadContract)({
1882
+ address: addrs?.AroNomination,
1883
+ abi: AroNomination_ABI,
1884
+ functionName: "threshold",
1885
+ query: {
1886
+ enabled: Boolean(addrs?.AroNomination),
1887
+ ...opts.query
1888
+ },
1889
+ ...opts
1890
+ });
1891
+ }
1892
+ function useHasVouched(voucher, candidate, opts = {}) {
1893
+ const addrs = useAroAddresses();
1894
+ return (0, import_wagmi3.useReadContract)({
1895
+ address: addrs?.AroNomination,
1896
+ abi: AroNomination_ABI,
1897
+ functionName: "hasVouched",
1898
+ args: voucher && candidate ? [voucher, candidate] : void 0,
1899
+ query: {
1900
+ enabled: Boolean(addrs?.AroNomination && voucher && candidate),
1901
+ ...opts.query
1902
+ },
1903
+ ...opts
1904
+ });
1905
+ }
1906
+ function useNominationWriter() {
1907
+ return (0, import_wagmi3.useWriteContract)();
1908
+ }
1909
+
1910
+ // src/hooks/useMembership.ts
1911
+ var import_react2 = require("react");
1912
+ var import_wagmi4 = require("wagmi");
1913
+ function useMembership(wallet) {
1914
+ const addrs = useAroAddresses();
1915
+ const reads = (0, import_wagmi4.useReadContracts)({
1916
+ contracts: addrs && wallet ? [
1917
+ {
1918
+ address: addrs.AroSBT,
1919
+ abi: AroSBT_ABI,
1920
+ functionName: "hasSBT",
1921
+ args: [wallet]
1922
+ },
1923
+ {
1924
+ address: addrs.AroNomination,
1925
+ abi: AroNomination_ABI,
1926
+ functionName: "getNomination",
1927
+ args: [wallet]
1928
+ },
1929
+ {
1930
+ address: addrs.AroNomination,
1931
+ abi: AroNomination_ABI,
1932
+ functionName: "threshold"
1933
+ },
1934
+ {
1935
+ address: addrs.AroSBT,
1936
+ abi: AroSBT_ABI,
1937
+ functionName: "getMemberData",
1938
+ args: [wallet]
1939
+ }
1940
+ ] : [],
1941
+ query: { enabled: Boolean(addrs && wallet) }
1942
+ });
1943
+ const data = (0, import_react2.useMemo)(() => {
1944
+ if (!wallet) return { step: "needs-wallet", membership: { hasSBT: false } };
1945
+ if (!reads.data) return void 0;
1946
+ const [hasSBTResult, nomResult, thresholdResult, memberDataResult] = reads.data;
1947
+ const hasSBT = hasSBTResult?.result ?? false;
1948
+ if (hasSBT) {
1949
+ const md = memberDataResult?.result;
1950
+ return {
1951
+ step: "member",
1952
+ membership: {
1953
+ hasSBT: true,
1954
+ tier: md?.tier,
1955
+ memberId: md?.memberId,
1956
+ issuanceDate: md?.issuanceDate,
1957
+ kycHash: md?.kycHash
1958
+ }
1959
+ };
1960
+ }
1961
+ const nomTuple = nomResult?.result;
1962
+ const threshold = thresholdResult?.result;
1963
+ if (!nomTuple || threshold === void 0) {
1964
+ return { step: "needs-nomination", membership: { hasSBT: false } };
1965
+ }
1966
+ const [nominator, vouchers, nominatedAt, status] = nomTuple;
1967
+ const thresholdN = Number(threshold);
1968
+ const voucherCount = vouchers.length;
1969
+ const snapshot = {
1970
+ status,
1971
+ nominator,
1972
+ vouchers,
1973
+ nominatedAt,
1974
+ voucherCount,
1975
+ threshold: thresholdN,
1976
+ remaining: Math.max(0, thresholdN - voucherCount),
1977
+ ready: status === 2 /* APPROVED */
1978
+ };
1979
+ let step = "needs-nomination";
1980
+ if (snapshot.status === 1 /* PENDING */) step = "needs-vouches";
1981
+ else if (snapshot.status === 2 /* APPROVED */) step = "needs-kyc";
1982
+ return { step, membership: { hasSBT: false }, nomination: snapshot };
1983
+ }, [reads.data, wallet]);
1984
+ return {
1985
+ data,
1986
+ isLoading: reads.isLoading,
1987
+ isError: reads.isError,
1988
+ refetch: reads.refetch
1989
+ };
1990
+ }
1991
+ // Annotate the CommonJS export names for ESM import in node:
1992
+ 0 && (module.exports = {
1993
+ useAroAddresses,
1994
+ useAroChainId,
1995
+ useHasSBT,
1996
+ useHasVouched,
1997
+ useMemberData,
1998
+ useMembership,
1999
+ useMintSBT,
2000
+ useNomination,
2001
+ useNominationStatus,
2002
+ useNominationThreshold,
2003
+ useNominationWriter
2004
+ });
2005
+ //# sourceMappingURL=index.cjs.map