@theliem/xmarket-sdk 3.2.0 → 3.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2535 +0,0 @@
1
- {
2
- "address": "FCvCbWoLpzNYKzQnXYXCo1yz9DTpgUs11QqHVqnqtWhA",
3
- "metadata": {
4
- "name": "question_market",
5
- "version": "0.1.0",
6
- "spec": "0.1.0",
7
- "description": "Question Market program for XMarket prediction platform"
8
- },
9
- "instructions": [
10
- {
11
- "name": "add_admin",
12
- "discriminator": [
13
- 177,
14
- 236,
15
- 33,
16
- 205,
17
- 124,
18
- 152,
19
- 55,
20
- 186
21
- ],
22
- "accounts": [
23
- {
24
- "name": "owner",
25
- "signer": true
26
- },
27
- {
28
- "name": "config",
29
- "writable": true,
30
- "pda": {
31
- "seeds": [
32
- {
33
- "kind": "const",
34
- "value": [
35
- 99,
36
- 111,
37
- 110,
38
- 102,
39
- 105,
40
- 103
41
- ]
42
- },
43
- {
44
- "kind": "account",
45
- "path": "config.owner",
46
- "account": "QuestionMarketConfig"
47
- }
48
- ]
49
- }
50
- }
51
- ],
52
- "args": [
53
- {
54
- "name": "new_admin",
55
- "type": "pubkey"
56
- }
57
- ]
58
- },
59
- {
60
- "name": "add_to_whitelist",
61
- "discriminator": [
62
- 157,
63
- 211,
64
- 52,
65
- 54,
66
- 144,
67
- 81,
68
- 5,
69
- 55
70
- ],
71
- "accounts": [
72
- {
73
- "name": "authority",
74
- "signer": true
75
- },
76
- {
77
- "name": "payer",
78
- "writable": true,
79
- "signer": true
80
- },
81
- {
82
- "name": "config",
83
- "writable": true,
84
- "pda": {
85
- "seeds": [
86
- {
87
- "kind": "const",
88
- "value": [
89
- 99,
90
- 111,
91
- 110,
92
- 102,
93
- 105,
94
- 103
95
- ]
96
- },
97
- {
98
- "kind": "account",
99
- "path": "config.owner",
100
- "account": "QuestionMarketConfig"
101
- }
102
- ]
103
- }
104
- }
105
- ],
106
- "args": [
107
- {
108
- "name": "address",
109
- "type": "pubkey"
110
- }
111
- ]
112
- },
113
- {
114
- "name": "approve_presale",
115
- "discriminator": [
116
- 145,
117
- 218,
118
- 42,
119
- 231,
120
- 144,
121
- 81,
122
- 103,
123
- 34
124
- ],
125
- "accounts": [
126
- {
127
- "name": "caller",
128
- "docs": [
129
- "Whitelisted caller"
130
- ],
131
- "signer": true
132
- },
133
- {
134
- "name": "payer",
135
- "writable": true,
136
- "signer": true
137
- },
138
- {
139
- "name": "config",
140
- "writable": true,
141
- "pda": {
142
- "seeds": [
143
- {
144
- "kind": "const",
145
- "value": [
146
- 99,
147
- 111,
148
- 110,
149
- 102,
150
- 105,
151
- 103
152
- ]
153
- },
154
- {
155
- "kind": "account",
156
- "path": "config.owner",
157
- "account": "QuestionMarketConfig"
158
- }
159
- ]
160
- }
161
- },
162
- {
163
- "name": "presale",
164
- "docs": [
165
- "Presale PDA (mut — will be approved)"
166
- ],
167
- "writable": true
168
- },
169
- {
170
- "name": "question",
171
- "docs": [
172
- "Question PDA — seeds use presale.key() as question_id"
173
- ],
174
- "writable": true,
175
- "pda": {
176
- "seeds": [
177
- {
178
- "kind": "const",
179
- "value": [
180
- 113,
181
- 117,
182
- 101,
183
- 115,
184
- 116,
185
- 105,
186
- 111,
187
- 110
188
- ]
189
- },
190
- {
191
- "kind": "account",
192
- "path": "config"
193
- },
194
- {
195
- "kind": "account",
196
- "path": "presale"
197
- }
198
- ]
199
- }
200
- },
201
- {
202
- "name": "currency_mint"
203
- },
204
- {
205
- "name": "oracle"
206
- },
207
- {
208
- "name": "condition",
209
- "writable": true
210
- },
211
- {
212
- "name": "yes_mint",
213
- "writable": true
214
- },
215
- {
216
- "name": "no_mint",
217
- "writable": true
218
- },
219
- {
220
- "name": "mint_authority",
221
- "writable": true
222
- },
223
- {
224
- "name": "collateral_vault",
225
- "writable": true
226
- },
227
- {
228
- "name": "market_oracle",
229
- "docs": [
230
- "Market oracle PDA (init'd by market-oracle CPI)"
231
- ],
232
- "writable": true,
233
- "pda": {
234
- "seeds": [
235
- {
236
- "kind": "const",
237
- "value": [
238
- 109,
239
- 97,
240
- 114,
241
- 107,
242
- 101,
243
- 116,
244
- 95,
245
- 111,
246
- 114,
247
- 97,
248
- 99,
249
- 108,
250
- 101
251
- ]
252
- },
253
- {
254
- "kind": "account",
255
- "path": "question"
256
- }
257
- ],
258
- "program": {
259
- "kind": "account",
260
- "path": "market_oracle_program"
261
- }
262
- }
263
- },
264
- {
265
- "name": "market_oracle_vault",
266
- "docs": [
267
- "Market oracle USDC vault (ATA of market_oracle PDA)"
268
- ],
269
- "writable": true
270
- },
271
- {
272
- "name": "conditional_tokens_program"
273
- },
274
- {
275
- "name": "presale_program",
276
- "address": "2Rnw1VoEtsUMQ7wkvYZjDehqSqRob6uNkeymDfvKrquB"
277
- },
278
- {
279
- "name": "market_oracle_program",
280
- "address": "ADWF4J3nCJ2kWnCtycuem2jhu7amUqJWQG3oa5xF67QJ"
281
- },
282
- {
283
- "name": "token_program",
284
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
285
- },
286
- {
287
- "name": "token_2022_program",
288
- "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
289
- },
290
- {
291
- "name": "associated_token_program",
292
- "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
293
- },
294
- {
295
- "name": "system_program",
296
- "address": "11111111111111111111111111111111"
297
- },
298
- {
299
- "name": "rent",
300
- "address": "SysvarRent111111111111111111111111111111111"
301
- }
302
- ],
303
- "args": [
304
- {
305
- "name": "params",
306
- "type": {
307
- "defined": {
308
- "name": "ApprovePresaleParams"
309
- }
310
- }
311
- }
312
- ]
313
- },
314
- {
315
- "name": "approve_question",
316
- "discriminator": [
317
- 54,
318
- 149,
319
- 87,
320
- 172,
321
- 67,
322
- 162,
323
- 36,
324
- 108
325
- ],
326
- "accounts": [
327
- {
328
- "name": "admin",
329
- "docs": [
330
- "Admin approving the market"
331
- ],
332
- "signer": true
333
- },
334
- {
335
- "name": "config",
336
- "docs": [
337
- "Question Market config"
338
- ],
339
- "writable": true,
340
- "pda": {
341
- "seeds": [
342
- {
343
- "kind": "const",
344
- "value": [
345
- 99,
346
- 111,
347
- 110,
348
- 102,
349
- 105,
350
- 103
351
- ]
352
- },
353
- {
354
- "kind": "account",
355
- "path": "config.owner",
356
- "account": "QuestionMarketConfig"
357
- }
358
- ]
359
- }
360
- },
361
- {
362
- "name": "question",
363
- "docs": [
364
- "Question to approve (must have condition already set)"
365
- ],
366
- "writable": true
367
- }
368
- ],
369
- "args": []
370
- },
371
- {
372
- "name": "collect_presale_revenue",
373
- "discriminator": [
374
- 44,
375
- 142,
376
- 67,
377
- 185,
378
- 225,
379
- 110,
380
- 206,
381
- 57
382
- ],
383
- "accounts": [
384
- {
385
- "name": "caller",
386
- "signer": true
387
- },
388
- {
389
- "name": "config",
390
- "pda": {
391
- "seeds": [
392
- {
393
- "kind": "const",
394
- "value": [
395
- 99,
396
- 111,
397
- 110,
398
- 102,
399
- 105,
400
- 103
401
- ]
402
- },
403
- {
404
- "kind": "account",
405
- "path": "config.owner",
406
- "account": "QuestionMarketConfig"
407
- }
408
- ]
409
- }
410
- },
411
- {
412
- "name": "presale",
413
- "writable": true
414
- },
415
- {
416
- "name": "presale_vault",
417
- "docs": [
418
- "Presale USDC vault — closed inside presale program"
419
- ],
420
- "writable": true
421
- },
422
- {
423
- "name": "currency_mint"
424
- },
425
- {
426
- "name": "referral_token_account",
427
- "docs": [
428
- "Referral address USDC token account"
429
- ],
430
- "writable": true
431
- },
432
- {
433
- "name": "company_token_account",
434
- "docs": [
435
- "Company address USDC token account"
436
- ],
437
- "writable": true
438
- },
439
- {
440
- "name": "botmm_token_account",
441
- "docs": [
442
- "BOTMM token account (receives ~80%)"
443
- ],
444
- "writable": true
445
- },
446
- {
447
- "name": "payer",
448
- "docs": [
449
- "Receives lamports from closed presale_vault + presale PDA"
450
- ],
451
- "writable": true
452
- },
453
- {
454
- "name": "presale_program",
455
- "address": "2Rnw1VoEtsUMQ7wkvYZjDehqSqRob6uNkeymDfvKrquB"
456
- },
457
- {
458
- "name": "token_program",
459
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
460
- },
461
- {
462
- "name": "associated_token_program",
463
- "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
464
- },
465
- {
466
- "name": "system_program",
467
- "address": "11111111111111111111111111111111"
468
- }
469
- ],
470
- "args": []
471
- },
472
- {
473
- "name": "collect_trading_fee",
474
- "discriminator": [
475
- 97,
476
- 106,
477
- 99,
478
- 150,
479
- 151,
480
- 221,
481
- 180,
482
- 217
483
- ],
484
- "accounts": [
485
- {
486
- "name": "caller",
487
- "signer": true
488
- },
489
- {
490
- "name": "config",
491
- "pda": {
492
- "seeds": [
493
- {
494
- "kind": "const",
495
- "value": [
496
- 99,
497
- 111,
498
- 110,
499
- 102,
500
- 105,
501
- 103
502
- ]
503
- },
504
- {
505
- "kind": "account",
506
- "path": "config.owner",
507
- "account": "QuestionMarketConfig"
508
- }
509
- ]
510
- }
511
- },
512
- {
513
- "name": "market_oracle",
514
- "docs": [
515
- "Market oracle PDA"
516
- ],
517
- "writable": true
518
- },
519
- {
520
- "name": "qt_mint",
521
- "docs": [
522
- "QT (MST) mint — supply snapshot taken by market-oracle"
523
- ]
524
- },
525
- {
526
- "name": "market_oracle_program",
527
- "address": "ADWF4J3nCJ2kWnCtycuem2jhu7amUqJWQG3oa5xF67QJ"
528
- }
529
- ],
530
- "args": []
531
- },
532
- {
533
- "name": "create_presale",
534
- "discriminator": [
535
- 176,
536
- 144,
537
- 197,
538
- 158,
539
- 61,
540
- 119,
541
- 75,
542
- 135
543
- ],
544
- "accounts": [
545
- {
546
- "name": "creator",
547
- "docs": [
548
- "Creator of the presale"
549
- ],
550
- "signer": true
551
- },
552
- {
553
- "name": "payer",
554
- "writable": true,
555
- "signer": true
556
- },
557
- {
558
- "name": "config",
559
- "writable": true,
560
- "pda": {
561
- "seeds": [
562
- {
563
- "kind": "const",
564
- "value": [
565
- 99,
566
- 111,
567
- 110,
568
- 102,
569
- 105,
570
- 103
571
- ]
572
- },
573
- {
574
- "kind": "account",
575
- "path": "config.owner",
576
- "account": "QuestionMarketConfig"
577
- }
578
- ]
579
- }
580
- },
581
- {
582
- "name": "fee_config",
583
- "docs": [
584
- "Fee config from fee-management program — reads presale rev percentages"
585
- ]
586
- },
587
- {
588
- "name": "presale",
589
- "docs": [
590
- "Presale PDA (created via CPI to presale program)"
591
- ],
592
- "writable": true,
593
- "pda": {
594
- "seeds": [
595
- {
596
- "kind": "const",
597
- "value": [
598
- 112,
599
- 114,
600
- 101,
601
- 115,
602
- 97,
603
- 108,
604
- 101
605
- ]
606
- },
607
- {
608
- "kind": "account",
609
- "path": "config"
610
- },
611
- {
612
- "kind": "account",
613
- "path": "config.presale_count",
614
- "account": "QuestionMarketConfig"
615
- }
616
- ],
617
- "program": {
618
- "kind": "account",
619
- "path": "presale_program"
620
- }
621
- }
622
- },
623
- {
624
- "name": "qt_mint",
625
- "docs": [
626
- "MST (QT) mint PDA"
627
- ],
628
- "writable": true,
629
- "pda": {
630
- "seeds": [
631
- {
632
- "kind": "const",
633
- "value": [
634
- 113,
635
- 116,
636
- 95,
637
- 109,
638
- 105,
639
- 110,
640
- 116
641
- ]
642
- },
643
- {
644
- "kind": "account",
645
- "path": "presale"
646
- }
647
- ],
648
- "program": {
649
- "kind": "account",
650
- "path": "presale_program"
651
- }
652
- }
653
- },
654
- {
655
- "name": "qt_authority",
656
- "pda": {
657
- "seeds": [
658
- {
659
- "kind": "const",
660
- "value": [
661
- 113,
662
- 116,
663
- 95,
664
- 97,
665
- 117,
666
- 116,
667
- 104,
668
- 111,
669
- 114,
670
- 105,
671
- 116,
672
- 121
673
- ]
674
- },
675
- {
676
- "kind": "account",
677
- "path": "presale"
678
- }
679
- ],
680
- "program": {
681
- "kind": "account",
682
- "path": "presale_program"
683
- }
684
- }
685
- },
686
- {
687
- "name": "currency_mint"
688
- },
689
- {
690
- "name": "presale_vault",
691
- "docs": [
692
- "Presale USDC vault (ATA of presale PDA, created via CPI)"
693
- ],
694
- "writable": true
695
- },
696
- {
697
- "name": "creator_currency_ata",
698
- "docs": [
699
- "Creator's USDC token account — USDC pulled from here"
700
- ],
701
- "writable": true
702
- },
703
- {
704
- "name": "creator_qt_ata",
705
- "docs": [
706
- "Creator's MST token account (created via CPI)"
707
- ],
708
- "writable": true
709
- },
710
- {
711
- "name": "user_buy_record",
712
- "docs": [
713
- "User buy record for creator (created via CPI)"
714
- ],
715
- "writable": true,
716
- "pda": {
717
- "seeds": [
718
- {
719
- "kind": "const",
720
- "value": [
721
- 117,
722
- 115,
723
- 101,
724
- 114,
725
- 95,
726
- 98,
727
- 117,
728
- 121
729
- ]
730
- },
731
- {
732
- "kind": "account",
733
- "path": "presale"
734
- },
735
- {
736
- "kind": "account",
737
- "path": "creator"
738
- }
739
- ],
740
- "program": {
741
- "kind": "account",
742
- "path": "presale_program"
743
- }
744
- }
745
- },
746
- {
747
- "name": "qt_metadata",
748
- "writable": true
749
- },
750
- {
751
- "name": "token_metadata_program"
752
- },
753
- {
754
- "name": "presale_program",
755
- "address": "2Rnw1VoEtsUMQ7wkvYZjDehqSqRob6uNkeymDfvKrquB"
756
- },
757
- {
758
- "name": "token_program",
759
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
760
- },
761
- {
762
- "name": "associated_token_program",
763
- "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
764
- },
765
- {
766
- "name": "system_program",
767
- "address": "11111111111111111111111111111111"
768
- },
769
- {
770
- "name": "rent",
771
- "address": "SysvarRent111111111111111111111111111111111"
772
- }
773
- ],
774
- "args": [
775
- {
776
- "name": "params",
777
- "type": {
778
- "defined": {
779
- "name": "CreatePresaleParams"
780
- }
781
- }
782
- }
783
- ]
784
- },
785
- {
786
- "name": "create_question_admin",
787
- "discriminator": [
788
- 166,
789
- 168,
790
- 104,
791
- 144,
792
- 72,
793
- 150,
794
- 213,
795
- 4
796
- ],
797
- "accounts": [
798
- {
799
- "name": "creator",
800
- "docs": [
801
- "Whitelisted creator — also pays rent"
802
- ],
803
- "writable": true,
804
- "signer": true
805
- },
806
- {
807
- "name": "payer",
808
- "writable": true,
809
- "signer": true
810
- },
811
- {
812
- "name": "config",
813
- "writable": true,
814
- "pda": {
815
- "seeds": [
816
- {
817
- "kind": "const",
818
- "value": [
819
- 99,
820
- 111,
821
- 110,
822
- 102,
823
- 105,
824
- 103
825
- ]
826
- },
827
- {
828
- "kind": "account",
829
- "path": "config.owner",
830
- "account": "QuestionMarketConfig"
831
- }
832
- ]
833
- }
834
- },
835
- {
836
- "name": "question",
837
- "writable": true
838
- },
839
- {
840
- "name": "currency_mint"
841
- },
842
- {
843
- "name": "oracle"
844
- },
845
- {
846
- "name": "condition",
847
- "writable": true
848
- },
849
- {
850
- "name": "yes_mint",
851
- "writable": true
852
- },
853
- {
854
- "name": "no_mint",
855
- "writable": true
856
- },
857
- {
858
- "name": "mint_authority",
859
- "writable": true
860
- },
861
- {
862
- "name": "collateral_vault",
863
- "writable": true
864
- },
865
- {
866
- "name": "conditional_tokens_program"
867
- },
868
- {
869
- "name": "token_program",
870
- "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
871
- },
872
- {
873
- "name": "system_program",
874
- "address": "11111111111111111111111111111111"
875
- },
876
- {
877
- "name": "rent",
878
- "address": "SysvarRent111111111111111111111111111111111"
879
- }
880
- ],
881
- "args": [
882
- {
883
- "name": "params",
884
- "type": {
885
- "defined": {
886
- "name": "CreateQuestionAdminParams"
887
- }
888
- }
889
- }
890
- ]
891
- },
892
- {
893
- "name": "initialize",
894
- "discriminator": [
895
- 175,
896
- 175,
897
- 109,
898
- 31,
899
- 13,
900
- 152,
901
- 155,
902
- 237
903
- ],
904
- "accounts": [
905
- {
906
- "name": "owner",
907
- "docs": [
908
- "Owner initializing the config"
909
- ],
910
- "writable": true,
911
- "signer": true
912
- },
913
- {
914
- "name": "config",
915
- "docs": [
916
- "The config account (PDA)"
917
- ],
918
- "writable": true,
919
- "pda": {
920
- "seeds": [
921
- {
922
- "kind": "const",
923
- "value": [
924
- 99,
925
- 111,
926
- 110,
927
- 102,
928
- 105,
929
- 103
930
- ]
931
- },
932
- {
933
- "kind": "account",
934
- "path": "owner"
935
- }
936
- ]
937
- }
938
- },
939
- {
940
- "name": "system_program",
941
- "address": "11111111111111111111111111111111"
942
- }
943
- ],
944
- "args": [
945
- {
946
- "name": "params",
947
- "type": {
948
- "defined": {
949
- "name": "InitializeParams"
950
- }
951
- }
952
- }
953
- ]
954
- },
955
- {
956
- "name": "reject_presale",
957
- "discriminator": [
958
- 151,
959
- 57,
960
- 254,
961
- 126,
962
- 97,
963
- 26,
964
- 242,
965
- 106
966
- ],
967
- "accounts": [
968
- {
969
- "name": "caller",
970
- "docs": [
971
- "Whitelisted caller"
972
- ],
973
- "signer": true
974
- },
975
- {
976
- "name": "config",
977
- "pda": {
978
- "seeds": [
979
- {
980
- "kind": "const",
981
- "value": [
982
- 99,
983
- 111,
984
- 110,
985
- 102,
986
- 105,
987
- 103
988
- ]
989
- },
990
- {
991
- "kind": "account",
992
- "path": "config.owner",
993
- "account": "QuestionMarketConfig"
994
- }
995
- ]
996
- }
997
- },
998
- {
999
- "name": "presale",
1000
- "docs": [
1001
- "Presale PDA (rejected via CPI)"
1002
- ],
1003
- "writable": true
1004
- },
1005
- {
1006
- "name": "presale_program",
1007
- "address": "2Rnw1VoEtsUMQ7wkvYZjDehqSqRob6uNkeymDfvKrquB"
1008
- }
1009
- ],
1010
- "args": []
1011
- },
1012
- {
1013
- "name": "remove_admin",
1014
- "discriminator": [
1015
- 74,
1016
- 202,
1017
- 71,
1018
- 106,
1019
- 252,
1020
- 31,
1021
- 72,
1022
- 183
1023
- ],
1024
- "accounts": [
1025
- {
1026
- "name": "owner",
1027
- "signer": true
1028
- },
1029
- {
1030
- "name": "config",
1031
- "writable": true,
1032
- "pda": {
1033
- "seeds": [
1034
- {
1035
- "kind": "const",
1036
- "value": [
1037
- 99,
1038
- 111,
1039
- 110,
1040
- 102,
1041
- 105,
1042
- 103
1043
- ]
1044
- },
1045
- {
1046
- "kind": "account",
1047
- "path": "config.owner",
1048
- "account": "QuestionMarketConfig"
1049
- }
1050
- ]
1051
- }
1052
- }
1053
- ],
1054
- "args": []
1055
- },
1056
- {
1057
- "name": "remove_from_whitelist",
1058
- "discriminator": [
1059
- 7,
1060
- 144,
1061
- 216,
1062
- 239,
1063
- 243,
1064
- 236,
1065
- 193,
1066
- 235
1067
- ],
1068
- "accounts": [
1069
- {
1070
- "name": "authority",
1071
- "signer": true
1072
- },
1073
- {
1074
- "name": "payer",
1075
- "writable": true,
1076
- "signer": true
1077
- },
1078
- {
1079
- "name": "config",
1080
- "writable": true,
1081
- "pda": {
1082
- "seeds": [
1083
- {
1084
- "kind": "const",
1085
- "value": [
1086
- 99,
1087
- 111,
1088
- 110,
1089
- 102,
1090
- 105,
1091
- 103
1092
- ]
1093
- },
1094
- {
1095
- "kind": "account",
1096
- "path": "config.owner",
1097
- "account": "QuestionMarketConfig"
1098
- }
1099
- ]
1100
- }
1101
- }
1102
- ],
1103
- "args": [
1104
- {
1105
- "name": "address",
1106
- "type": "pubkey"
1107
- }
1108
- ]
1109
- },
1110
- {
1111
- "name": "resolve_question",
1112
- "discriminator": [
1113
- 52,
1114
- 32,
1115
- 224,
1116
- 179,
1117
- 180,
1118
- 8,
1119
- 0,
1120
- 246
1121
- ],
1122
- "accounts": [
1123
- {
1124
- "name": "payer",
1125
- "docs": [
1126
- "Payer for any required fees"
1127
- ],
1128
- "writable": true,
1129
- "signer": true
1130
- },
1131
- {
1132
- "name": "config",
1133
- "docs": [
1134
- "QuestionMarket config"
1135
- ],
1136
- "pda": {
1137
- "seeds": [
1138
- {
1139
- "kind": "const",
1140
- "value": [
1141
- 99,
1142
- 111,
1143
- 110,
1144
- 102,
1145
- 105,
1146
- 103
1147
- ]
1148
- },
1149
- {
1150
- "kind": "account",
1151
- "path": "config.owner",
1152
- "account": "QuestionMarketConfig"
1153
- }
1154
- ]
1155
- }
1156
- },
1157
- {
1158
- "name": "question",
1159
- "docs": [
1160
- "The question to resolve"
1161
- ],
1162
- "writable": true,
1163
- "pda": {
1164
- "seeds": [
1165
- {
1166
- "kind": "const",
1167
- "value": [
1168
- 113,
1169
- 117,
1170
- 101,
1171
- 115,
1172
- 116,
1173
- 105,
1174
- 111,
1175
- 110
1176
- ]
1177
- },
1178
- {
1179
- "kind": "account",
1180
- "path": "config"
1181
- },
1182
- {
1183
- "kind": "arg",
1184
- "path": "question_id"
1185
- }
1186
- ]
1187
- }
1188
- },
1189
- {
1190
- "name": "question_result",
1191
- "docs": [
1192
- "Oracle QuestionResult PDA — proves the oracle has resolved",
1193
- "seeds: [b\"result\", oracle_config, question_id]"
1194
- ],
1195
- "pda": {
1196
- "seeds": [
1197
- {
1198
- "kind": "const",
1199
- "value": [
1200
- 114,
1201
- 101,
1202
- 115,
1203
- 117,
1204
- 108,
1205
- 116
1206
- ]
1207
- },
1208
- {
1209
- "kind": "account",
1210
- "path": "config.oracle",
1211
- "account": "QuestionMarketConfig"
1212
- },
1213
- {
1214
- "kind": "arg",
1215
- "path": "question_id"
1216
- }
1217
- ],
1218
- "program": {
1219
- "kind": "account",
1220
- "path": "oracle_program"
1221
- }
1222
- }
1223
- },
1224
- {
1225
- "name": "condition",
1226
- "docs": [
1227
- "The Condition account in CTF (will be updated via CPI)"
1228
- ],
1229
- "writable": true
1230
- },
1231
- {
1232
- "name": "ctf_program",
1233
- "docs": [
1234
- "CTF program (for set_payout CPI)"
1235
- ]
1236
- },
1237
- {
1238
- "name": "oracle_program",
1239
- "docs": [
1240
- "Oracle program (for reading QuestionResult)"
1241
- ]
1242
- },
1243
- {
1244
- "name": "system_program",
1245
- "address": "11111111111111111111111111111111"
1246
- }
1247
- ],
1248
- "args": [
1249
- {
1250
- "name": "question_id",
1251
- "type": {
1252
- "array": [
1253
- "u8",
1254
- 32
1255
- ]
1256
- }
1257
- }
1258
- ]
1259
- },
1260
- {
1261
- "name": "update_config",
1262
- "discriminator": [
1263
- 29,
1264
- 158,
1265
- 252,
1266
- 191,
1267
- 10,
1268
- 83,
1269
- 219,
1270
- 99
1271
- ],
1272
- "accounts": [
1273
- {
1274
- "name": "authority",
1275
- "docs": [
1276
- "Authority making the update (owner for ownership transfer, admin/owner for other updates)"
1277
- ],
1278
- "signer": true
1279
- },
1280
- {
1281
- "name": "payer",
1282
- "writable": true,
1283
- "signer": true
1284
- },
1285
- {
1286
- "name": "config",
1287
- "docs": [
1288
- "Question Market config"
1289
- ],
1290
- "writable": true,
1291
- "pda": {
1292
- "seeds": [
1293
- {
1294
- "kind": "const",
1295
- "value": [
1296
- 99,
1297
- 111,
1298
- 110,
1299
- 102,
1300
- 105,
1301
- 103
1302
- ]
1303
- },
1304
- {
1305
- "kind": "account",
1306
- "path": "config.owner",
1307
- "account": "QuestionMarketConfig"
1308
- }
1309
- ]
1310
- }
1311
- }
1312
- ],
1313
- "args": [
1314
- {
1315
- "name": "params",
1316
- "type": {
1317
- "defined": {
1318
- "name": "UpdateConfigParams"
1319
- }
1320
- }
1321
- }
1322
- ]
1323
- },
1324
- {
1325
- "name": "update_question_status",
1326
- "discriminator": [
1327
- 237,
1328
- 171,
1329
- 179,
1330
- 4,
1331
- 161,
1332
- 20,
1333
- 61,
1334
- 18
1335
- ],
1336
- "accounts": [
1337
- {
1338
- "name": "authority",
1339
- "docs": [
1340
- "Authority making the status update (admin for reject, oracle for resolve)"
1341
- ],
1342
- "signer": true
1343
- },
1344
- {
1345
- "name": "config",
1346
- "docs": [
1347
- "Question Market config"
1348
- ],
1349
- "writable": true,
1350
- "pda": {
1351
- "seeds": [
1352
- {
1353
- "kind": "const",
1354
- "value": [
1355
- 99,
1356
- 111,
1357
- 110,
1358
- 102,
1359
- 105,
1360
- 103
1361
- ]
1362
- },
1363
- {
1364
- "kind": "account",
1365
- "path": "config.owner",
1366
- "account": "QuestionMarketConfig"
1367
- }
1368
- ]
1369
- }
1370
- },
1371
- {
1372
- "name": "question",
1373
- "docs": [
1374
- "Question to update"
1375
- ],
1376
- "writable": true
1377
- }
1378
- ],
1379
- "args": [
1380
- {
1381
- "name": "update_type",
1382
- "type": {
1383
- "defined": {
1384
- "name": "StatusUpdateType"
1385
- }
1386
- }
1387
- }
1388
- ]
1389
- }
1390
- ],
1391
- "accounts": [
1392
- {
1393
- "name": "Question",
1394
- "discriminator": [
1395
- 111,
1396
- 22,
1397
- 150,
1398
- 220,
1399
- 181,
1400
- 122,
1401
- 118,
1402
- 127
1403
- ]
1404
- },
1405
- {
1406
- "name": "QuestionMarketConfig",
1407
- "discriminator": [
1408
- 45,
1409
- 242,
1410
- 195,
1411
- 220,
1412
- 120,
1413
- 252,
1414
- 74,
1415
- 213
1416
- ]
1417
- }
1418
- ],
1419
- "events": [
1420
- {
1421
- "name": "ConfigUpdated",
1422
- "discriminator": [
1423
- 40,
1424
- 241,
1425
- 230,
1426
- 122,
1427
- 11,
1428
- 19,
1429
- 198,
1430
- 194
1431
- ]
1432
- },
1433
- {
1434
- "name": "MarketApproved",
1435
- "discriminator": [
1436
- 213,
1437
- 222,
1438
- 68,
1439
- 97,
1440
- 16,
1441
- 1,
1442
- 31,
1443
- 38
1444
- ]
1445
- },
1446
- {
1447
- "name": "PresaleApprovedAndMarketCreated",
1448
- "discriminator": [
1449
- 207,
1450
- 179,
1451
- 63,
1452
- 110,
1453
- 178,
1454
- 224,
1455
- 134,
1456
- 237
1457
- ]
1458
- },
1459
- {
1460
- "name": "PresaleCreated",
1461
- "discriminator": [
1462
- 22,
1463
- 188,
1464
- 215,
1465
- 56,
1466
- 113,
1467
- 251,
1468
- 168,
1469
- 248
1470
- ]
1471
- },
1472
- {
1473
- "name": "PresaleRejected",
1474
- "discriminator": [
1475
- 141,
1476
- 151,
1477
- 157,
1478
- 127,
1479
- 100,
1480
- 182,
1481
- 63,
1482
- 52
1483
- ]
1484
- },
1485
- {
1486
- "name": "QuestionAdminCreated",
1487
- "discriminator": [
1488
- 55,
1489
- 250,
1490
- 212,
1491
- 57,
1492
- 174,
1493
- 201,
1494
- 226,
1495
- 158
1496
- ]
1497
- },
1498
- {
1499
- "name": "QuestionApproved",
1500
- "discriminator": [
1501
- 252,
1502
- 132,
1503
- 245,
1504
- 66,
1505
- 7,
1506
- 1,
1507
- 41,
1508
- 211
1509
- ]
1510
- },
1511
- {
1512
- "name": "QuestionCreated",
1513
- "discriminator": [
1514
- 34,
1515
- 127,
1516
- 167,
1517
- 217,
1518
- 216,
1519
- 141,
1520
- 151,
1521
- 205
1522
- ]
1523
- },
1524
- {
1525
- "name": "QuestionMarketInitialized",
1526
- "discriminator": [
1527
- 149,
1528
- 192,
1529
- 87,
1530
- 33,
1531
- 81,
1532
- 246,
1533
- 25,
1534
- 59
1535
- ]
1536
- },
1537
- {
1538
- "name": "QuestionResolvedMarket",
1539
- "discriminator": [
1540
- 103,
1541
- 113,
1542
- 100,
1543
- 154,
1544
- 213,
1545
- 211,
1546
- 64,
1547
- 126
1548
- ]
1549
- },
1550
- {
1551
- "name": "QuestionStatusUpdated",
1552
- "discriminator": [
1553
- 38,
1554
- 83,
1555
- 232,
1556
- 103,
1557
- 133,
1558
- 238,
1559
- 55,
1560
- 194
1561
- ]
1562
- }
1563
- ],
1564
- "types": [
1565
- {
1566
- "name": "ApprovePresaleParams",
1567
- "type": {
1568
- "kind": "struct",
1569
- "fields": [
1570
- {
1571
- "name": "content_hash",
1572
- "type": {
1573
- "array": [
1574
- "u8",
1575
- 32
1576
- ]
1577
- }
1578
- },
1579
- {
1580
- "name": "hook_program",
1581
- "type": "pubkey"
1582
- },
1583
- {
1584
- "name": "authorized_clob",
1585
- "type": "pubkey"
1586
- },
1587
- {
1588
- "name": "expiration_time",
1589
- "type": "i64"
1590
- },
1591
- {
1592
- "name": "creator",
1593
- "type": "pubkey"
1594
- }
1595
- ]
1596
- }
1597
- },
1598
- {
1599
- "name": "ConfigUpdated",
1600
- "type": {
1601
- "kind": "struct",
1602
- "fields": [
1603
- {
1604
- "name": "config",
1605
- "type": "pubkey"
1606
- },
1607
- {
1608
- "name": "updated_by",
1609
- "type": "pubkey"
1610
- },
1611
- {
1612
- "name": "new_admin",
1613
- "type": {
1614
- "option": "pubkey"
1615
- }
1616
- },
1617
- {
1618
- "name": "new_oracle",
1619
- "type": {
1620
- "option": "pubkey"
1621
- }
1622
- },
1623
- {
1624
- "name": "is_paused",
1625
- "type": {
1626
- "option": "bool"
1627
- }
1628
- }
1629
- ]
1630
- }
1631
- },
1632
- {
1633
- "name": "CreatePresaleParams",
1634
- "type": {
1635
- "kind": "struct",
1636
- "fields": [
1637
- {
1638
- "name": "price",
1639
- "type": "u64"
1640
- },
1641
- {
1642
- "name": "start_time",
1643
- "type": "i64"
1644
- },
1645
- {
1646
- "name": "end_time",
1647
- "type": "i64"
1648
- },
1649
- {
1650
- "name": "initial_buy_amount",
1651
- "type": "u64"
1652
- }
1653
- ]
1654
- }
1655
- },
1656
- {
1657
- "name": "CreateQuestionAdminParams",
1658
- "type": {
1659
- "kind": "struct",
1660
- "fields": [
1661
- {
1662
- "name": "question_id",
1663
- "type": {
1664
- "array": [
1665
- "u8",
1666
- 32
1667
- ]
1668
- }
1669
- },
1670
- {
1671
- "name": "content_hash",
1672
- "type": {
1673
- "array": [
1674
- "u8",
1675
- 32
1676
- ]
1677
- }
1678
- },
1679
- {
1680
- "name": "hook_program",
1681
- "type": "pubkey"
1682
- },
1683
- {
1684
- "name": "authorized_clob",
1685
- "type": "pubkey"
1686
- },
1687
- {
1688
- "name": "expiration_time",
1689
- "type": "i64"
1690
- }
1691
- ]
1692
- }
1693
- },
1694
- {
1695
- "name": "FeeConfig",
1696
- "type": {
1697
- "kind": "struct",
1698
- "fields": [
1699
- {
1700
- "name": "version",
1701
- "type": "u8"
1702
- },
1703
- {
1704
- "name": "owner",
1705
- "type": "pubkey"
1706
- },
1707
- {
1708
- "name": "admin",
1709
- "type": "pubkey"
1710
- },
1711
- {
1712
- "name": "company_address",
1713
- "type": "pubkey"
1714
- },
1715
- {
1716
- "name": "referral_address",
1717
- "type": "pubkey"
1718
- },
1719
- {
1720
- "name": "presale_revenue_address",
1721
- "type": "pubkey"
1722
- },
1723
- {
1724
- "name": "investors_market_rev",
1725
- "docs": [
1726
- "Market revenue split: investors + company (out of FEE_DENOMINATOR = 1_000_000)"
1727
- ],
1728
- "type": "u32"
1729
- },
1730
- {
1731
- "name": "company_market_rev",
1732
- "type": "u32"
1733
- },
1734
- {
1735
- "name": "agents_presale_rev",
1736
- "docs": [
1737
- "Presale revenue split: agents + company (out of FEE_DENOMINATOR = 1_000_000)"
1738
- ],
1739
- "type": "u32"
1740
- },
1741
- {
1742
- "name": "company_presale_rev",
1743
- "type": "u32"
1744
- },
1745
- {
1746
- "name": "whitelist",
1747
- "type": {
1748
- "array": [
1749
- "pubkey",
1750
- 10
1751
- ]
1752
- }
1753
- },
1754
- {
1755
- "name": "whitelist_len",
1756
- "type": "u8"
1757
- },
1758
- {
1759
- "name": "bump",
1760
- "type": "u8"
1761
- },
1762
- {
1763
- "name": "_reserved",
1764
- "type": {
1765
- "array": [
1766
- "u8",
1767
- 64
1768
- ]
1769
- }
1770
- }
1771
- ]
1772
- }
1773
- },
1774
- {
1775
- "name": "InitializeParams",
1776
- "docs": [
1777
- "Parameters for initializing the Question Market config"
1778
- ],
1779
- "type": {
1780
- "kind": "struct",
1781
- "fields": [
1782
- {
1783
- "name": "admin",
1784
- "docs": [
1785
- "Admin who can approve/reject questions"
1786
- ],
1787
- "type": "pubkey"
1788
- },
1789
- {
1790
- "name": "conditional_tokens_program",
1791
- "docs": [
1792
- "ConditionalTokens program ID for CPI"
1793
- ],
1794
- "type": "pubkey"
1795
- },
1796
- {
1797
- "name": "oracle",
1798
- "docs": [
1799
- "Oracle pubkey that will resolve conditions"
1800
- ],
1801
- "type": "pubkey"
1802
- }
1803
- ]
1804
- }
1805
- },
1806
- {
1807
- "name": "MarketApproved",
1808
- "type": {
1809
- "kind": "struct",
1810
- "fields": [
1811
- {
1812
- "name": "config",
1813
- "type": "pubkey"
1814
- },
1815
- {
1816
- "name": "question",
1817
- "type": "pubkey"
1818
- },
1819
- {
1820
- "name": "question_id",
1821
- "type": {
1822
- "array": [
1823
- "u8",
1824
- 32
1825
- ]
1826
- }
1827
- },
1828
- {
1829
- "name": "condition",
1830
- "type": "pubkey"
1831
- },
1832
- {
1833
- "name": "approved_by",
1834
- "type": "pubkey"
1835
- },
1836
- {
1837
- "name": "approved_at",
1838
- "type": "i64"
1839
- }
1840
- ]
1841
- }
1842
- },
1843
- {
1844
- "name": "PresaleApprovedAndMarketCreated",
1845
- "type": {
1846
- "kind": "struct",
1847
- "fields": [
1848
- {
1849
- "name": "config",
1850
- "type": "pubkey"
1851
- },
1852
- {
1853
- "name": "presale",
1854
- "type": "pubkey"
1855
- },
1856
- {
1857
- "name": "question",
1858
- "type": "pubkey"
1859
- },
1860
- {
1861
- "name": "condition",
1862
- "type": "pubkey"
1863
- },
1864
- {
1865
- "name": "market_oracle",
1866
- "type": "pubkey"
1867
- },
1868
- {
1869
- "name": "market_oracle_vault",
1870
- "type": "pubkey"
1871
- },
1872
- {
1873
- "name": "creator",
1874
- "type": "pubkey"
1875
- }
1876
- ]
1877
- }
1878
- },
1879
- {
1880
- "name": "PresaleCreated",
1881
- "type": {
1882
- "kind": "struct",
1883
- "fields": [
1884
- {
1885
- "name": "config",
1886
- "type": "pubkey"
1887
- },
1888
- {
1889
- "name": "presale",
1890
- "type": "pubkey"
1891
- },
1892
- {
1893
- "name": "creator",
1894
- "type": "pubkey"
1895
- },
1896
- {
1897
- "name": "presale_index",
1898
- "type": "u64"
1899
- },
1900
- {
1901
- "name": "qt_mint",
1902
- "type": "pubkey"
1903
- },
1904
- {
1905
- "name": "currency_mint",
1906
- "type": "pubkey"
1907
- }
1908
- ]
1909
- }
1910
- },
1911
- {
1912
- "name": "PresaleRejected",
1913
- "type": {
1914
- "kind": "struct",
1915
- "fields": [
1916
- {
1917
- "name": "config",
1918
- "type": "pubkey"
1919
- },
1920
- {
1921
- "name": "presale",
1922
- "type": "pubkey"
1923
- }
1924
- ]
1925
- }
1926
- },
1927
- {
1928
- "name": "Question",
1929
- "docs": [
1930
- "Individual question account"
1931
- ],
1932
- "type": {
1933
- "kind": "struct",
1934
- "fields": [
1935
- {
1936
- "name": "version",
1937
- "docs": [
1938
- "Schema version"
1939
- ],
1940
- "type": "u8"
1941
- },
1942
- {
1943
- "name": "config",
1944
- "docs": [
1945
- "Reference to the QuestionMarketConfig"
1946
- ],
1947
- "type": "pubkey"
1948
- },
1949
- {
1950
- "name": "question_id",
1951
- "docs": [
1952
- "Unique question identifier (32-byte hash)"
1953
- ],
1954
- "type": {
1955
- "array": [
1956
- "u8",
1957
- 32
1958
- ]
1959
- }
1960
- },
1961
- {
1962
- "name": "content_hash",
1963
- "docs": [
1964
- "Hash of question content (title, description, etc.)"
1965
- ],
1966
- "type": {
1967
- "array": [
1968
- "u8",
1969
- 32
1970
- ]
1971
- }
1972
- },
1973
- {
1974
- "name": "outcome_slot_count",
1975
- "docs": [
1976
- "Number of possible outcomes (2 for binary, up to 255)"
1977
- ],
1978
- "type": "u8"
1979
- },
1980
- {
1981
- "name": "condition_id",
1982
- "docs": [
1983
- "Derived condition ID for ConditionalTokens (hash of oracle + question_id)"
1984
- ],
1985
- "type": {
1986
- "array": [
1987
- "u8",
1988
- 32
1989
- ]
1990
- }
1991
- },
1992
- {
1993
- "name": "expiration_time",
1994
- "docs": [
1995
- "Question expiration timestamp (when market closes)"
1996
- ],
1997
- "type": "i64"
1998
- },
1999
- {
2000
- "name": "currency_mint",
2001
- "docs": [
2002
- "Currency mint for this question's market (e.g., USDC)"
2003
- ],
2004
- "type": "pubkey"
2005
- },
2006
- {
2007
- "name": "creator",
2008
- "docs": [
2009
- "Creator of the question"
2010
- ],
2011
- "type": "pubkey"
2012
- },
2013
- {
2014
- "name": "condition",
2015
- "docs": [
2016
- "Linked ConditionalTokens condition (None until approved)"
2017
- ],
2018
- "type": {
2019
- "option": "pubkey"
2020
- }
2021
- },
2022
- {
2023
- "name": "status",
2024
- "docs": [
2025
- "Current status"
2026
- ],
2027
- "type": {
2028
- "defined": {
2029
- "name": "QuestionStatus"
2030
- }
2031
- }
2032
- },
2033
- {
2034
- "name": "created_at",
2035
- "docs": [
2036
- "Timestamp when question was created"
2037
- ],
2038
- "type": "i64"
2039
- },
2040
- {
2041
- "name": "approved_at",
2042
- "docs": [
2043
- "Timestamp when question was approved (0 if not approved)"
2044
- ],
2045
- "type": "i64"
2046
- },
2047
- {
2048
- "name": "resolved_at",
2049
- "docs": [
2050
- "Timestamp when question was resolved (0 if not resolved)"
2051
- ],
2052
- "type": "i64"
2053
- },
2054
- {
2055
- "name": "bump",
2056
- "docs": [
2057
- "Bump seed for PDA derivation"
2058
- ],
2059
- "type": "u8"
2060
- },
2061
- {
2062
- "name": "_reserved",
2063
- "docs": [
2064
- "Reserved space for future upgrades"
2065
- ],
2066
- "type": {
2067
- "array": [
2068
- "u8",
2069
- 64
2070
- ]
2071
- }
2072
- }
2073
- ]
2074
- }
2075
- },
2076
- {
2077
- "name": "QuestionAdminCreated",
2078
- "type": {
2079
- "kind": "struct",
2080
- "fields": [
2081
- {
2082
- "name": "config",
2083
- "type": "pubkey"
2084
- },
2085
- {
2086
- "name": "question",
2087
- "type": "pubkey"
2088
- },
2089
- {
2090
- "name": "question_id",
2091
- "type": {
2092
- "array": [
2093
- "u8",
2094
- 32
2095
- ]
2096
- }
2097
- },
2098
- {
2099
- "name": "condition_id",
2100
- "type": {
2101
- "array": [
2102
- "u8",
2103
- 32
2104
- ]
2105
- }
2106
- },
2107
- {
2108
- "name": "condition",
2109
- "type": "pubkey"
2110
- },
2111
- {
2112
- "name": "yes_mint",
2113
- "type": "pubkey"
2114
- },
2115
- {
2116
- "name": "no_mint",
2117
- "type": "pubkey"
2118
- },
2119
- {
2120
- "name": "creator",
2121
- "type": "pubkey"
2122
- },
2123
- {
2124
- "name": "expiration_time",
2125
- "type": "i64"
2126
- },
2127
- {
2128
- "name": "currency_mint",
2129
- "type": "pubkey"
2130
- },
2131
- {
2132
- "name": "created_at",
2133
- "type": "i64"
2134
- }
2135
- ]
2136
- }
2137
- },
2138
- {
2139
- "name": "QuestionApproved",
2140
- "type": {
2141
- "kind": "struct",
2142
- "fields": [
2143
- {
2144
- "name": "config",
2145
- "type": "pubkey"
2146
- },
2147
- {
2148
- "name": "question",
2149
- "type": "pubkey"
2150
- },
2151
- {
2152
- "name": "question_id",
2153
- "type": {
2154
- "array": [
2155
- "u8",
2156
- 32
2157
- ]
2158
- }
2159
- },
2160
- {
2161
- "name": "condition",
2162
- "type": "pubkey"
2163
- },
2164
- {
2165
- "name": "approved_by",
2166
- "type": "pubkey"
2167
- },
2168
- {
2169
- "name": "approved_at",
2170
- "type": "i64"
2171
- }
2172
- ]
2173
- }
2174
- },
2175
- {
2176
- "name": "QuestionCreated",
2177
- "type": {
2178
- "kind": "struct",
2179
- "fields": [
2180
- {
2181
- "name": "config",
2182
- "type": "pubkey"
2183
- },
2184
- {
2185
- "name": "question",
2186
- "type": "pubkey"
2187
- },
2188
- {
2189
- "name": "question_id",
2190
- "type": {
2191
- "array": [
2192
- "u8",
2193
- 32
2194
- ]
2195
- }
2196
- },
2197
- {
2198
- "name": "creator",
2199
- "type": "pubkey"
2200
- },
2201
- {
2202
- "name": "outcome_slot_count",
2203
- "type": "u8"
2204
- },
2205
- {
2206
- "name": "expiration_time",
2207
- "type": "i64"
2208
- },
2209
- {
2210
- "name": "currency_mint",
2211
- "type": "pubkey"
2212
- },
2213
- {
2214
- "name": "created_at",
2215
- "type": "i64"
2216
- }
2217
- ]
2218
- }
2219
- },
2220
- {
2221
- "name": "QuestionMarketConfig",
2222
- "docs": [
2223
- "Global configuration for the Question Market program"
2224
- ],
2225
- "type": {
2226
- "kind": "struct",
2227
- "fields": [
2228
- {
2229
- "name": "version",
2230
- "docs": [
2231
- "Schema version"
2232
- ],
2233
- "type": "u8"
2234
- },
2235
- {
2236
- "name": "owner",
2237
- "docs": [
2238
- "Owner with full control (can transfer ownership)"
2239
- ],
2240
- "type": "pubkey"
2241
- },
2242
- {
2243
- "name": "admin",
2244
- "docs": [
2245
- "Admin for day-to-day operations (approve/reject questions)"
2246
- ],
2247
- "type": "pubkey"
2248
- },
2249
- {
2250
- "name": "conditional_tokens_program",
2251
- "docs": [
2252
- "ConditionalTokens program ID for CPI"
2253
- ],
2254
- "type": "pubkey"
2255
- },
2256
- {
2257
- "name": "oracle",
2258
- "docs": [
2259
- "Oracle pubkey that will resolve conditions"
2260
- ],
2261
- "type": "pubkey"
2262
- },
2263
- {
2264
- "name": "question_count",
2265
- "docs": [
2266
- "Total questions created"
2267
- ],
2268
- "type": "u64"
2269
- },
2270
- {
2271
- "name": "approved_count",
2272
- "docs": [
2273
- "Total questions approved (became markets)"
2274
- ],
2275
- "type": "u64"
2276
- },
2277
- {
2278
- "name": "rejected_count",
2279
- "docs": [
2280
- "Total questions rejected"
2281
- ],
2282
- "type": "u64"
2283
- },
2284
- {
2285
- "name": "whitelist",
2286
- "docs": [
2287
- "Whitelist of addresses that can create questions and manage presales"
2288
- ],
2289
- "type": {
2290
- "array": [
2291
- "pubkey",
2292
- 10
2293
- ]
2294
- }
2295
- },
2296
- {
2297
- "name": "whitelist_len",
2298
- "docs": [
2299
- "Number of entries in whitelist"
2300
- ],
2301
- "type": "u8"
2302
- },
2303
- {
2304
- "name": "is_paused",
2305
- "docs": [
2306
- "Whether the program is paused"
2307
- ],
2308
- "type": "bool"
2309
- },
2310
- {
2311
- "name": "bump",
2312
- "docs": [
2313
- "Bump seed for PDA derivation"
2314
- ],
2315
- "type": "u8"
2316
- },
2317
- {
2318
- "name": "presale_count",
2319
- "docs": [
2320
- "Total presales created"
2321
- ],
2322
- "type": "u64"
2323
- },
2324
- {
2325
- "name": "_reserved",
2326
- "docs": [
2327
- "Reserved space for future upgrades"
2328
- ],
2329
- "type": {
2330
- "array": [
2331
- "u8",
2332
- 120
2333
- ]
2334
- }
2335
- }
2336
- ]
2337
- }
2338
- },
2339
- {
2340
- "name": "QuestionMarketInitialized",
2341
- "type": {
2342
- "kind": "struct",
2343
- "fields": [
2344
- {
2345
- "name": "config",
2346
- "type": "pubkey"
2347
- },
2348
- {
2349
- "name": "owner",
2350
- "type": "pubkey"
2351
- },
2352
- {
2353
- "name": "admin",
2354
- "type": "pubkey"
2355
- },
2356
- {
2357
- "name": "conditional_tokens_program",
2358
- "type": "pubkey"
2359
- },
2360
- {
2361
- "name": "oracle",
2362
- "type": "pubkey"
2363
- }
2364
- ]
2365
- }
2366
- },
2367
- {
2368
- "name": "QuestionResolvedMarket",
2369
- "type": {
2370
- "kind": "struct",
2371
- "fields": [
2372
- {
2373
- "name": "config",
2374
- "type": "pubkey"
2375
- },
2376
- {
2377
- "name": "question",
2378
- "type": "pubkey"
2379
- },
2380
- {
2381
- "name": "question_id",
2382
- "type": {
2383
- "array": [
2384
- "u8",
2385
- 32
2386
- ]
2387
- }
2388
- },
2389
- {
2390
- "name": "condition",
2391
- "type": "pubkey"
2392
- },
2393
- {
2394
- "name": "payout_numerators",
2395
- "type": {
2396
- "vec": "u64"
2397
- }
2398
- },
2399
- {
2400
- "name": "resolved_at",
2401
- "type": "i64"
2402
- }
2403
- ]
2404
- }
2405
- },
2406
- {
2407
- "name": "QuestionStatus",
2408
- "docs": [
2409
- "Status of a question in its lifecycle"
2410
- ],
2411
- "type": {
2412
- "kind": "enum",
2413
- "variants": [
2414
- {
2415
- "name": "Pending"
2416
- },
2417
- {
2418
- "name": "Approved"
2419
- },
2420
- {
2421
- "name": "Rejected"
2422
- },
2423
- {
2424
- "name": "Resolved"
2425
- }
2426
- ]
2427
- }
2428
- },
2429
- {
2430
- "name": "QuestionStatusUpdated",
2431
- "type": {
2432
- "kind": "struct",
2433
- "fields": [
2434
- {
2435
- "name": "config",
2436
- "type": "pubkey"
2437
- },
2438
- {
2439
- "name": "question",
2440
- "type": "pubkey"
2441
- },
2442
- {
2443
- "name": "question_id",
2444
- "type": {
2445
- "array": [
2446
- "u8",
2447
- 32
2448
- ]
2449
- }
2450
- },
2451
- {
2452
- "name": "old_status",
2453
- "type": "u8"
2454
- },
2455
- {
2456
- "name": "new_status",
2457
- "type": "u8"
2458
- },
2459
- {
2460
- "name": "updated_by",
2461
- "type": "pubkey"
2462
- },
2463
- {
2464
- "name": "updated_at",
2465
- "type": "i64"
2466
- }
2467
- ]
2468
- }
2469
- },
2470
- {
2471
- "name": "StatusUpdateType",
2472
- "docs": [
2473
- "Type of status update"
2474
- ],
2475
- "type": {
2476
- "kind": "enum",
2477
- "variants": [
2478
- {
2479
- "name": "Reject"
2480
- },
2481
- {
2482
- "name": "MarkResolved"
2483
- }
2484
- ]
2485
- }
2486
- },
2487
- {
2488
- "name": "UpdateConfigParams",
2489
- "docs": [
2490
- "Parameters for updating config"
2491
- ],
2492
- "type": {
2493
- "kind": "struct",
2494
- "fields": [
2495
- {
2496
- "name": "new_admin",
2497
- "docs": [
2498
- "New admin (optional)"
2499
- ],
2500
- "type": {
2501
- "option": "pubkey"
2502
- }
2503
- },
2504
- {
2505
- "name": "new_oracle",
2506
- "docs": [
2507
- "New oracle (optional)"
2508
- ],
2509
- "type": {
2510
- "option": "pubkey"
2511
- }
2512
- },
2513
- {
2514
- "name": "is_paused",
2515
- "docs": [
2516
- "Pause/unpause (optional)"
2517
- ],
2518
- "type": {
2519
- "option": "bool"
2520
- }
2521
- },
2522
- {
2523
- "name": "new_conditional_tokens_program",
2524
- "docs": [
2525
- "New ConditionalTokens program (optional)"
2526
- ],
2527
- "type": {
2528
- "option": "pubkey"
2529
- }
2530
- }
2531
- ]
2532
- }
2533
- }
2534
- ]
2535
- }