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