@theliem/xmarket-sdk 3.0.1 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fee_management-VGF77YXG.json +1337 -0
- package/dist/index.d.mts +255 -4
- package/dist/index.d.ts +255 -4
- package/dist/index.js +831 -35
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +827 -38
- package/dist/index.mjs.map +1 -1
- package/dist/market_oracle-E6UUARGR.json +699 -0
- package/dist/{oracle-FZJJIJGI.json → oracle-A5VOIMGM.json} +5 -0
- package/dist/presale-ZZJXXQS3.json +1792 -0
- package/dist/{question_market-CB6ZUZ5E.json → question_market-77YI4LRP.json} +965 -32
- package/package.json +1 -1
- package/src/idls/fee_management.json +1337 -0
- package/src/idls/market_oracle.json +699 -0
- package/src/idls/oracle.json +5 -0
- package/src/idls/presale.json +1792 -0
- package/src/idls/question_market.json +965 -32
|
@@ -119,6 +119,210 @@
|
|
|
119
119
|
}
|
|
120
120
|
]
|
|
121
121
|
},
|
|
122
|
+
{
|
|
123
|
+
"name": "approve_presale",
|
|
124
|
+
"docs": [
|
|
125
|
+
"Whitelist-only: approve presale, create question+condition+market oracle."
|
|
126
|
+
],
|
|
127
|
+
"discriminator": [
|
|
128
|
+
145,
|
|
129
|
+
218,
|
|
130
|
+
42,
|
|
131
|
+
231,
|
|
132
|
+
144,
|
|
133
|
+
81,
|
|
134
|
+
103,
|
|
135
|
+
34
|
|
136
|
+
],
|
|
137
|
+
"accounts": [
|
|
138
|
+
{
|
|
139
|
+
"name": "caller",
|
|
140
|
+
"docs": [
|
|
141
|
+
"Whitelisted caller"
|
|
142
|
+
],
|
|
143
|
+
"signer": true
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"name": "payer",
|
|
147
|
+
"writable": true,
|
|
148
|
+
"signer": true
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"name": "config",
|
|
152
|
+
"writable": true,
|
|
153
|
+
"pda": {
|
|
154
|
+
"seeds": [
|
|
155
|
+
{
|
|
156
|
+
"kind": "const",
|
|
157
|
+
"value": [
|
|
158
|
+
99,
|
|
159
|
+
111,
|
|
160
|
+
110,
|
|
161
|
+
102,
|
|
162
|
+
105,
|
|
163
|
+
103
|
|
164
|
+
]
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"kind": "account",
|
|
168
|
+
"path": "config.owner",
|
|
169
|
+
"account": "QuestionMarketConfig"
|
|
170
|
+
}
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"name": "presale",
|
|
176
|
+
"docs": [
|
|
177
|
+
"Presale PDA (mut — will be approved)"
|
|
178
|
+
],
|
|
179
|
+
"writable": true
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"name": "question",
|
|
183
|
+
"docs": [
|
|
184
|
+
"Question PDA — seeds use presale.key() as question_id"
|
|
185
|
+
],
|
|
186
|
+
"writable": true,
|
|
187
|
+
"pda": {
|
|
188
|
+
"seeds": [
|
|
189
|
+
{
|
|
190
|
+
"kind": "const",
|
|
191
|
+
"value": [
|
|
192
|
+
113,
|
|
193
|
+
117,
|
|
194
|
+
101,
|
|
195
|
+
115,
|
|
196
|
+
116,
|
|
197
|
+
105,
|
|
198
|
+
111,
|
|
199
|
+
110
|
|
200
|
+
]
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"kind": "account",
|
|
204
|
+
"path": "config"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"kind": "account",
|
|
208
|
+
"path": "presale"
|
|
209
|
+
}
|
|
210
|
+
]
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"name": "currency_mint"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"name": "oracle"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"name": "condition",
|
|
221
|
+
"writable": true
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"name": "yes_mint",
|
|
225
|
+
"writable": true
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"name": "no_mint",
|
|
229
|
+
"writable": true
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"name": "mint_authority",
|
|
233
|
+
"writable": true
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"name": "collateral_vault",
|
|
237
|
+
"writable": true
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"name": "market_oracle",
|
|
241
|
+
"docs": [
|
|
242
|
+
"Market oracle PDA (init'd by market-oracle CPI)"
|
|
243
|
+
],
|
|
244
|
+
"writable": true,
|
|
245
|
+
"pda": {
|
|
246
|
+
"seeds": [
|
|
247
|
+
{
|
|
248
|
+
"kind": "const",
|
|
249
|
+
"value": [
|
|
250
|
+
109,
|
|
251
|
+
97,
|
|
252
|
+
114,
|
|
253
|
+
107,
|
|
254
|
+
101,
|
|
255
|
+
116,
|
|
256
|
+
95,
|
|
257
|
+
111,
|
|
258
|
+
114,
|
|
259
|
+
97,
|
|
260
|
+
99,
|
|
261
|
+
108,
|
|
262
|
+
101
|
|
263
|
+
]
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"kind": "account",
|
|
267
|
+
"path": "question"
|
|
268
|
+
}
|
|
269
|
+
],
|
|
270
|
+
"program": {
|
|
271
|
+
"kind": "account",
|
|
272
|
+
"path": "market_oracle_program"
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"name": "market_oracle_vault",
|
|
278
|
+
"docs": [
|
|
279
|
+
"Market oracle USDC vault (ATA of market_oracle PDA)"
|
|
280
|
+
],
|
|
281
|
+
"writable": true
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"name": "conditional_tokens_program"
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"name": "presale_program",
|
|
288
|
+
"address": "2Rnw1VoEtsUMQ7wkvYZjDehqSqRob6uNkeymDfvKrquB"
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"name": "market_oracle_program",
|
|
292
|
+
"address": "ADWF4J3nCJ2kWnCtycuem2jhu7amUqJWQG3oa5xF67QJ"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"name": "token_program",
|
|
296
|
+
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"name": "token_2022_program",
|
|
300
|
+
"address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"name": "associated_token_program",
|
|
304
|
+
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"name": "system_program",
|
|
308
|
+
"address": "11111111111111111111111111111111"
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"name": "rent",
|
|
312
|
+
"address": "SysvarRent111111111111111111111111111111111"
|
|
313
|
+
}
|
|
314
|
+
],
|
|
315
|
+
"args": [
|
|
316
|
+
{
|
|
317
|
+
"name": "params",
|
|
318
|
+
"type": {
|
|
319
|
+
"defined": {
|
|
320
|
+
"name": "ApprovePresaleParams"
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
]
|
|
325
|
+
},
|
|
122
326
|
{
|
|
123
327
|
"name": "approve_question",
|
|
124
328
|
"docs": [
|
|
@@ -184,6 +388,408 @@
|
|
|
184
388
|
],
|
|
185
389
|
"args": []
|
|
186
390
|
},
|
|
391
|
+
{
|
|
392
|
+
"name": "collect_presale_revenue",
|
|
393
|
+
"docs": [
|
|
394
|
+
"Whitelist-only: distribute presale vault revenue to referral/company/creator."
|
|
395
|
+
],
|
|
396
|
+
"discriminator": [
|
|
397
|
+
44,
|
|
398
|
+
142,
|
|
399
|
+
67,
|
|
400
|
+
185,
|
|
401
|
+
225,
|
|
402
|
+
110,
|
|
403
|
+
206,
|
|
404
|
+
57
|
|
405
|
+
],
|
|
406
|
+
"accounts": [
|
|
407
|
+
{
|
|
408
|
+
"name": "caller",
|
|
409
|
+
"signer": true
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
"name": "config",
|
|
413
|
+
"pda": {
|
|
414
|
+
"seeds": [
|
|
415
|
+
{
|
|
416
|
+
"kind": "const",
|
|
417
|
+
"value": [
|
|
418
|
+
99,
|
|
419
|
+
111,
|
|
420
|
+
110,
|
|
421
|
+
102,
|
|
422
|
+
105,
|
|
423
|
+
103
|
|
424
|
+
]
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
"kind": "account",
|
|
428
|
+
"path": "config.owner",
|
|
429
|
+
"account": "QuestionMarketConfig"
|
|
430
|
+
}
|
|
431
|
+
]
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"name": "presale",
|
|
436
|
+
"writable": true
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
"name": "presale_vault",
|
|
440
|
+
"docs": [
|
|
441
|
+
"Presale USDC vault"
|
|
442
|
+
],
|
|
443
|
+
"writable": true
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
"name": "currency_mint"
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
"name": "referral_token_account",
|
|
450
|
+
"docs": [
|
|
451
|
+
"Referral address USDC token account"
|
|
452
|
+
],
|
|
453
|
+
"writable": true
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
"name": "company_token_account",
|
|
457
|
+
"docs": [
|
|
458
|
+
"Company address USDC token account"
|
|
459
|
+
],
|
|
460
|
+
"writable": true
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
"name": "presale_program",
|
|
464
|
+
"address": "2Rnw1VoEtsUMQ7wkvYZjDehqSqRob6uNkeymDfvKrquB"
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
"name": "token_program",
|
|
468
|
+
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
"name": "associated_token_program",
|
|
472
|
+
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
"name": "system_program",
|
|
476
|
+
"address": "11111111111111111111111111111111"
|
|
477
|
+
}
|
|
478
|
+
],
|
|
479
|
+
"args": []
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
"name": "collect_trading_fee",
|
|
483
|
+
"docs": [
|
|
484
|
+
"Whitelist-only: snapshot QT supply so MST holders can claim trading fees."
|
|
485
|
+
],
|
|
486
|
+
"discriminator": [
|
|
487
|
+
97,
|
|
488
|
+
106,
|
|
489
|
+
99,
|
|
490
|
+
150,
|
|
491
|
+
151,
|
|
492
|
+
221,
|
|
493
|
+
180,
|
|
494
|
+
217
|
|
495
|
+
],
|
|
496
|
+
"accounts": [
|
|
497
|
+
{
|
|
498
|
+
"name": "caller",
|
|
499
|
+
"signer": true
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
"name": "config",
|
|
503
|
+
"pda": {
|
|
504
|
+
"seeds": [
|
|
505
|
+
{
|
|
506
|
+
"kind": "const",
|
|
507
|
+
"value": [
|
|
508
|
+
99,
|
|
509
|
+
111,
|
|
510
|
+
110,
|
|
511
|
+
102,
|
|
512
|
+
105,
|
|
513
|
+
103
|
|
514
|
+
]
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
"kind": "account",
|
|
518
|
+
"path": "config.owner",
|
|
519
|
+
"account": "QuestionMarketConfig"
|
|
520
|
+
}
|
|
521
|
+
]
|
|
522
|
+
}
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
"name": "market_oracle",
|
|
526
|
+
"docs": [
|
|
527
|
+
"Market oracle PDA"
|
|
528
|
+
],
|
|
529
|
+
"writable": true
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
"name": "qt_mint",
|
|
533
|
+
"docs": [
|
|
534
|
+
"QT (MST) mint — supply snapshot taken by market-oracle"
|
|
535
|
+
]
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
"name": "market_oracle_program",
|
|
539
|
+
"address": "ADWF4J3nCJ2kWnCtycuem2jhu7amUqJWQG3oa5xF67QJ"
|
|
540
|
+
}
|
|
541
|
+
],
|
|
542
|
+
"args": []
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
"name": "create_presale",
|
|
546
|
+
"docs": [
|
|
547
|
+
"Any user creates a presale (with initial buy). Routes through presale program."
|
|
548
|
+
],
|
|
549
|
+
"discriminator": [
|
|
550
|
+
176,
|
|
551
|
+
144,
|
|
552
|
+
197,
|
|
553
|
+
158,
|
|
554
|
+
61,
|
|
555
|
+
119,
|
|
556
|
+
75,
|
|
557
|
+
135
|
|
558
|
+
],
|
|
559
|
+
"accounts": [
|
|
560
|
+
{
|
|
561
|
+
"name": "creator",
|
|
562
|
+
"docs": [
|
|
563
|
+
"Creator of the presale"
|
|
564
|
+
],
|
|
565
|
+
"signer": true
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
"name": "payer",
|
|
569
|
+
"writable": true,
|
|
570
|
+
"signer": true
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
"name": "config",
|
|
574
|
+
"writable": true,
|
|
575
|
+
"pda": {
|
|
576
|
+
"seeds": [
|
|
577
|
+
{
|
|
578
|
+
"kind": "const",
|
|
579
|
+
"value": [
|
|
580
|
+
99,
|
|
581
|
+
111,
|
|
582
|
+
110,
|
|
583
|
+
102,
|
|
584
|
+
105,
|
|
585
|
+
103
|
|
586
|
+
]
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
"kind": "account",
|
|
590
|
+
"path": "config.owner",
|
|
591
|
+
"account": "QuestionMarketConfig"
|
|
592
|
+
}
|
|
593
|
+
]
|
|
594
|
+
}
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
"name": "fee_config",
|
|
598
|
+
"docs": [
|
|
599
|
+
"Fee config from fee-management program — reads presale rev percentages"
|
|
600
|
+
]
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
"name": "presale",
|
|
604
|
+
"docs": [
|
|
605
|
+
"Presale PDA (created via CPI to presale program)"
|
|
606
|
+
],
|
|
607
|
+
"writable": true,
|
|
608
|
+
"pda": {
|
|
609
|
+
"seeds": [
|
|
610
|
+
{
|
|
611
|
+
"kind": "const",
|
|
612
|
+
"value": [
|
|
613
|
+
112,
|
|
614
|
+
114,
|
|
615
|
+
101,
|
|
616
|
+
115,
|
|
617
|
+
97,
|
|
618
|
+
108,
|
|
619
|
+
101
|
|
620
|
+
]
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
"kind": "account",
|
|
624
|
+
"path": "config"
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
"kind": "account",
|
|
628
|
+
"path": "config.presale_count",
|
|
629
|
+
"account": "QuestionMarketConfig"
|
|
630
|
+
}
|
|
631
|
+
],
|
|
632
|
+
"program": {
|
|
633
|
+
"kind": "account",
|
|
634
|
+
"path": "presale_program"
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
"name": "qt_mint",
|
|
640
|
+
"docs": [
|
|
641
|
+
"MST (QT) mint PDA"
|
|
642
|
+
],
|
|
643
|
+
"writable": true,
|
|
644
|
+
"pda": {
|
|
645
|
+
"seeds": [
|
|
646
|
+
{
|
|
647
|
+
"kind": "const",
|
|
648
|
+
"value": [
|
|
649
|
+
113,
|
|
650
|
+
116,
|
|
651
|
+
95,
|
|
652
|
+
109,
|
|
653
|
+
105,
|
|
654
|
+
110,
|
|
655
|
+
116
|
|
656
|
+
]
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
"kind": "account",
|
|
660
|
+
"path": "presale"
|
|
661
|
+
}
|
|
662
|
+
],
|
|
663
|
+
"program": {
|
|
664
|
+
"kind": "account",
|
|
665
|
+
"path": "presale_program"
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
"name": "qt_authority",
|
|
671
|
+
"pda": {
|
|
672
|
+
"seeds": [
|
|
673
|
+
{
|
|
674
|
+
"kind": "const",
|
|
675
|
+
"value": [
|
|
676
|
+
113,
|
|
677
|
+
116,
|
|
678
|
+
95,
|
|
679
|
+
97,
|
|
680
|
+
117,
|
|
681
|
+
116,
|
|
682
|
+
104,
|
|
683
|
+
111,
|
|
684
|
+
114,
|
|
685
|
+
105,
|
|
686
|
+
116,
|
|
687
|
+
121
|
|
688
|
+
]
|
|
689
|
+
},
|
|
690
|
+
{
|
|
691
|
+
"kind": "account",
|
|
692
|
+
"path": "presale"
|
|
693
|
+
}
|
|
694
|
+
],
|
|
695
|
+
"program": {
|
|
696
|
+
"kind": "account",
|
|
697
|
+
"path": "presale_program"
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
"name": "currency_mint"
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
"name": "presale_vault",
|
|
706
|
+
"docs": [
|
|
707
|
+
"Presale USDC vault (ATA of presale PDA, created via CPI)"
|
|
708
|
+
],
|
|
709
|
+
"writable": true
|
|
710
|
+
},
|
|
711
|
+
{
|
|
712
|
+
"name": "creator_currency_ata",
|
|
713
|
+
"docs": [
|
|
714
|
+
"Creator's USDC token account — USDC pulled from here"
|
|
715
|
+
],
|
|
716
|
+
"writable": true
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
"name": "creator_qt_ata",
|
|
720
|
+
"docs": [
|
|
721
|
+
"Creator's MST token account (created via CPI)"
|
|
722
|
+
],
|
|
723
|
+
"writable": true
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
"name": "user_buy_record",
|
|
727
|
+
"docs": [
|
|
728
|
+
"User buy record for creator (created via CPI)"
|
|
729
|
+
],
|
|
730
|
+
"writable": true,
|
|
731
|
+
"pda": {
|
|
732
|
+
"seeds": [
|
|
733
|
+
{
|
|
734
|
+
"kind": "const",
|
|
735
|
+
"value": [
|
|
736
|
+
117,
|
|
737
|
+
115,
|
|
738
|
+
101,
|
|
739
|
+
114,
|
|
740
|
+
95,
|
|
741
|
+
98,
|
|
742
|
+
117,
|
|
743
|
+
121
|
|
744
|
+
]
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
"kind": "account",
|
|
748
|
+
"path": "presale"
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
"kind": "account",
|
|
752
|
+
"path": "creator"
|
|
753
|
+
}
|
|
754
|
+
],
|
|
755
|
+
"program": {
|
|
756
|
+
"kind": "account",
|
|
757
|
+
"path": "presale_program"
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
},
|
|
761
|
+
{
|
|
762
|
+
"name": "presale_program",
|
|
763
|
+
"address": "2Rnw1VoEtsUMQ7wkvYZjDehqSqRob6uNkeymDfvKrquB"
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
"name": "token_program",
|
|
767
|
+
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
"name": "associated_token_program",
|
|
771
|
+
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
772
|
+
},
|
|
773
|
+
{
|
|
774
|
+
"name": "system_program",
|
|
775
|
+
"address": "11111111111111111111111111111111"
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
"name": "rent",
|
|
779
|
+
"address": "SysvarRent111111111111111111111111111111111"
|
|
780
|
+
}
|
|
781
|
+
],
|
|
782
|
+
"args": [
|
|
783
|
+
{
|
|
784
|
+
"name": "params",
|
|
785
|
+
"type": {
|
|
786
|
+
"defined": {
|
|
787
|
+
"name": "CreatePresaleParams"
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
]
|
|
792
|
+
},
|
|
187
793
|
{
|
|
188
794
|
"name": "create_question_admin",
|
|
189
795
|
"docs": [
|
|
@@ -446,42 +1052,103 @@
|
|
|
446
1052
|
"name": "params",
|
|
447
1053
|
"type": {
|
|
448
1054
|
"defined": {
|
|
449
|
-
"name": "CreateQuestionWithConditionParams"
|
|
1055
|
+
"name": "CreateQuestionWithConditionParams"
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
]
|
|
1060
|
+
},
|
|
1061
|
+
{
|
|
1062
|
+
"name": "initialize",
|
|
1063
|
+
"docs": [
|
|
1064
|
+
"Initialize the Question Market config. Caller becomes owner and is auto-whitelisted."
|
|
1065
|
+
],
|
|
1066
|
+
"discriminator": [
|
|
1067
|
+
175,
|
|
1068
|
+
175,
|
|
1069
|
+
109,
|
|
1070
|
+
31,
|
|
1071
|
+
13,
|
|
1072
|
+
152,
|
|
1073
|
+
155,
|
|
1074
|
+
237
|
|
1075
|
+
],
|
|
1076
|
+
"accounts": [
|
|
1077
|
+
{
|
|
1078
|
+
"name": "owner",
|
|
1079
|
+
"docs": [
|
|
1080
|
+
"Owner initializing the config"
|
|
1081
|
+
],
|
|
1082
|
+
"writable": true,
|
|
1083
|
+
"signer": true
|
|
1084
|
+
},
|
|
1085
|
+
{
|
|
1086
|
+
"name": "config",
|
|
1087
|
+
"docs": [
|
|
1088
|
+
"The config account (PDA)"
|
|
1089
|
+
],
|
|
1090
|
+
"writable": true,
|
|
1091
|
+
"pda": {
|
|
1092
|
+
"seeds": [
|
|
1093
|
+
{
|
|
1094
|
+
"kind": "const",
|
|
1095
|
+
"value": [
|
|
1096
|
+
99,
|
|
1097
|
+
111,
|
|
1098
|
+
110,
|
|
1099
|
+
102,
|
|
1100
|
+
105,
|
|
1101
|
+
103
|
|
1102
|
+
]
|
|
1103
|
+
},
|
|
1104
|
+
{
|
|
1105
|
+
"kind": "account",
|
|
1106
|
+
"path": "owner"
|
|
1107
|
+
}
|
|
1108
|
+
]
|
|
1109
|
+
}
|
|
1110
|
+
},
|
|
1111
|
+
{
|
|
1112
|
+
"name": "system_program",
|
|
1113
|
+
"address": "11111111111111111111111111111111"
|
|
1114
|
+
}
|
|
1115
|
+
],
|
|
1116
|
+
"args": [
|
|
1117
|
+
{
|
|
1118
|
+
"name": "params",
|
|
1119
|
+
"type": {
|
|
1120
|
+
"defined": {
|
|
1121
|
+
"name": "InitializeParams"
|
|
450
1122
|
}
|
|
451
1123
|
}
|
|
452
1124
|
}
|
|
453
1125
|
]
|
|
454
1126
|
},
|
|
455
1127
|
{
|
|
456
|
-
"name": "
|
|
1128
|
+
"name": "reject_presale",
|
|
457
1129
|
"docs": [
|
|
458
|
-
"
|
|
1130
|
+
"Whitelist-only: reject presale so users can refund."
|
|
459
1131
|
],
|
|
460
1132
|
"discriminator": [
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
1133
|
+
151,
|
|
1134
|
+
57,
|
|
1135
|
+
254,
|
|
1136
|
+
126,
|
|
1137
|
+
97,
|
|
1138
|
+
26,
|
|
1139
|
+
242,
|
|
1140
|
+
106
|
|
469
1141
|
],
|
|
470
1142
|
"accounts": [
|
|
471
1143
|
{
|
|
472
|
-
"name": "
|
|
1144
|
+
"name": "caller",
|
|
473
1145
|
"docs": [
|
|
474
|
-
"
|
|
1146
|
+
"Whitelisted caller"
|
|
475
1147
|
],
|
|
476
|
-
"writable": true,
|
|
477
1148
|
"signer": true
|
|
478
1149
|
},
|
|
479
1150
|
{
|
|
480
1151
|
"name": "config",
|
|
481
|
-
"docs": [
|
|
482
|
-
"The config account (PDA)"
|
|
483
|
-
],
|
|
484
|
-
"writable": true,
|
|
485
1152
|
"pda": {
|
|
486
1153
|
"seeds": [
|
|
487
1154
|
{
|
|
@@ -497,26 +1164,25 @@
|
|
|
497
1164
|
},
|
|
498
1165
|
{
|
|
499
1166
|
"kind": "account",
|
|
500
|
-
"path": "owner"
|
|
1167
|
+
"path": "config.owner",
|
|
1168
|
+
"account": "QuestionMarketConfig"
|
|
501
1169
|
}
|
|
502
1170
|
]
|
|
503
1171
|
}
|
|
504
1172
|
},
|
|
505
1173
|
{
|
|
506
|
-
"name": "
|
|
507
|
-
"
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
1174
|
+
"name": "presale",
|
|
1175
|
+
"docs": [
|
|
1176
|
+
"Presale PDA (rejected via CPI)"
|
|
1177
|
+
],
|
|
1178
|
+
"writable": true
|
|
1179
|
+
},
|
|
511
1180
|
{
|
|
512
|
-
"name": "
|
|
513
|
-
"
|
|
514
|
-
"defined": {
|
|
515
|
-
"name": "InitializeParams"
|
|
516
|
-
}
|
|
517
|
-
}
|
|
1181
|
+
"name": "presale_program",
|
|
1182
|
+
"address": "2Rnw1VoEtsUMQ7wkvYZjDehqSqRob6uNkeymDfvKrquB"
|
|
518
1183
|
}
|
|
519
|
-
]
|
|
1184
|
+
],
|
|
1185
|
+
"args": []
|
|
520
1186
|
},
|
|
521
1187
|
{
|
|
522
1188
|
"name": "remove_admin",
|
|
@@ -735,6 +1401,45 @@
|
|
|
735
1401
|
194
|
|
736
1402
|
]
|
|
737
1403
|
},
|
|
1404
|
+
{
|
|
1405
|
+
"name": "PresaleApprovedAndMarketCreated",
|
|
1406
|
+
"discriminator": [
|
|
1407
|
+
207,
|
|
1408
|
+
179,
|
|
1409
|
+
63,
|
|
1410
|
+
110,
|
|
1411
|
+
178,
|
|
1412
|
+
224,
|
|
1413
|
+
134,
|
|
1414
|
+
237
|
|
1415
|
+
]
|
|
1416
|
+
},
|
|
1417
|
+
{
|
|
1418
|
+
"name": "PresaleCreated",
|
|
1419
|
+
"discriminator": [
|
|
1420
|
+
22,
|
|
1421
|
+
188,
|
|
1422
|
+
215,
|
|
1423
|
+
56,
|
|
1424
|
+
113,
|
|
1425
|
+
251,
|
|
1426
|
+
168,
|
|
1427
|
+
248
|
|
1428
|
+
]
|
|
1429
|
+
},
|
|
1430
|
+
{
|
|
1431
|
+
"name": "PresaleRejected",
|
|
1432
|
+
"discriminator": [
|
|
1433
|
+
141,
|
|
1434
|
+
151,
|
|
1435
|
+
157,
|
|
1436
|
+
127,
|
|
1437
|
+
100,
|
|
1438
|
+
182,
|
|
1439
|
+
63,
|
|
1440
|
+
52
|
|
1441
|
+
]
|
|
1442
|
+
},
|
|
738
1443
|
{
|
|
739
1444
|
"name": "QuestionAdminCreated",
|
|
740
1445
|
"discriminator": [
|
|
@@ -802,6 +1507,39 @@
|
|
|
802
1507
|
}
|
|
803
1508
|
],
|
|
804
1509
|
"types": [
|
|
1510
|
+
{
|
|
1511
|
+
"name": "ApprovePresaleParams",
|
|
1512
|
+
"type": {
|
|
1513
|
+
"kind": "struct",
|
|
1514
|
+
"fields": [
|
|
1515
|
+
{
|
|
1516
|
+
"name": "content_hash",
|
|
1517
|
+
"type": {
|
|
1518
|
+
"array": [
|
|
1519
|
+
"u8",
|
|
1520
|
+
32
|
|
1521
|
+
]
|
|
1522
|
+
}
|
|
1523
|
+
},
|
|
1524
|
+
{
|
|
1525
|
+
"name": "hook_program",
|
|
1526
|
+
"type": "pubkey"
|
|
1527
|
+
},
|
|
1528
|
+
{
|
|
1529
|
+
"name": "authorized_clob",
|
|
1530
|
+
"type": "pubkey"
|
|
1531
|
+
},
|
|
1532
|
+
{
|
|
1533
|
+
"name": "expiration_time",
|
|
1534
|
+
"type": "i64"
|
|
1535
|
+
},
|
|
1536
|
+
{
|
|
1537
|
+
"name": "creator",
|
|
1538
|
+
"type": "pubkey"
|
|
1539
|
+
}
|
|
1540
|
+
]
|
|
1541
|
+
}
|
|
1542
|
+
},
|
|
805
1543
|
{
|
|
806
1544
|
"name": "ConfigUpdated",
|
|
807
1545
|
"type": {
|
|
@@ -842,6 +1580,30 @@
|
|
|
842
1580
|
]
|
|
843
1581
|
}
|
|
844
1582
|
},
|
|
1583
|
+
{
|
|
1584
|
+
"name": "CreatePresaleParams",
|
|
1585
|
+
"type": {
|
|
1586
|
+
"kind": "struct",
|
|
1587
|
+
"fields": [
|
|
1588
|
+
{
|
|
1589
|
+
"name": "price",
|
|
1590
|
+
"type": "u64"
|
|
1591
|
+
},
|
|
1592
|
+
{
|
|
1593
|
+
"name": "start_time",
|
|
1594
|
+
"type": "i64"
|
|
1595
|
+
},
|
|
1596
|
+
{
|
|
1597
|
+
"name": "end_time",
|
|
1598
|
+
"type": "i64"
|
|
1599
|
+
},
|
|
1600
|
+
{
|
|
1601
|
+
"name": "initial_buy_amount",
|
|
1602
|
+
"type": "u64"
|
|
1603
|
+
}
|
|
1604
|
+
]
|
|
1605
|
+
}
|
|
1606
|
+
},
|
|
845
1607
|
{
|
|
846
1608
|
"name": "CreateQuestionAdminParams",
|
|
847
1609
|
"type": {
|
|
@@ -936,6 +1698,86 @@
|
|
|
936
1698
|
]
|
|
937
1699
|
}
|
|
938
1700
|
},
|
|
1701
|
+
{
|
|
1702
|
+
"name": "FeeConfig",
|
|
1703
|
+
"type": {
|
|
1704
|
+
"kind": "struct",
|
|
1705
|
+
"fields": [
|
|
1706
|
+
{
|
|
1707
|
+
"name": "version",
|
|
1708
|
+
"type": "u8"
|
|
1709
|
+
},
|
|
1710
|
+
{
|
|
1711
|
+
"name": "owner",
|
|
1712
|
+
"type": "pubkey"
|
|
1713
|
+
},
|
|
1714
|
+
{
|
|
1715
|
+
"name": "admin",
|
|
1716
|
+
"type": "pubkey"
|
|
1717
|
+
},
|
|
1718
|
+
{
|
|
1719
|
+
"name": "company_address",
|
|
1720
|
+
"type": "pubkey"
|
|
1721
|
+
},
|
|
1722
|
+
{
|
|
1723
|
+
"name": "referral_address",
|
|
1724
|
+
"type": "pubkey"
|
|
1725
|
+
},
|
|
1726
|
+
{
|
|
1727
|
+
"name": "presale_revenue_address",
|
|
1728
|
+
"type": "pubkey"
|
|
1729
|
+
},
|
|
1730
|
+
{
|
|
1731
|
+
"name": "investors_market_rev",
|
|
1732
|
+
"docs": [
|
|
1733
|
+
"Market revenue split: investors + company (out of FEE_DENOMINATOR = 1_000_000)"
|
|
1734
|
+
],
|
|
1735
|
+
"type": "u32"
|
|
1736
|
+
},
|
|
1737
|
+
{
|
|
1738
|
+
"name": "company_market_rev",
|
|
1739
|
+
"type": "u32"
|
|
1740
|
+
},
|
|
1741
|
+
{
|
|
1742
|
+
"name": "agents_presale_rev",
|
|
1743
|
+
"docs": [
|
|
1744
|
+
"Presale revenue split: agents + company (out of FEE_DENOMINATOR = 1_000_000)"
|
|
1745
|
+
],
|
|
1746
|
+
"type": "u32"
|
|
1747
|
+
},
|
|
1748
|
+
{
|
|
1749
|
+
"name": "company_presale_rev",
|
|
1750
|
+
"type": "u32"
|
|
1751
|
+
},
|
|
1752
|
+
{
|
|
1753
|
+
"name": "whitelist",
|
|
1754
|
+
"type": {
|
|
1755
|
+
"array": [
|
|
1756
|
+
"pubkey",
|
|
1757
|
+
10
|
|
1758
|
+
]
|
|
1759
|
+
}
|
|
1760
|
+
},
|
|
1761
|
+
{
|
|
1762
|
+
"name": "whitelist_len",
|
|
1763
|
+
"type": "u8"
|
|
1764
|
+
},
|
|
1765
|
+
{
|
|
1766
|
+
"name": "bump",
|
|
1767
|
+
"type": "u8"
|
|
1768
|
+
},
|
|
1769
|
+
{
|
|
1770
|
+
"name": "_reserved",
|
|
1771
|
+
"type": {
|
|
1772
|
+
"array": [
|
|
1773
|
+
"u8",
|
|
1774
|
+
64
|
|
1775
|
+
]
|
|
1776
|
+
}
|
|
1777
|
+
}
|
|
1778
|
+
]
|
|
1779
|
+
}
|
|
1780
|
+
},
|
|
939
1781
|
{
|
|
940
1782
|
"name": "InitializeParams",
|
|
941
1783
|
"docs": [
|
|
@@ -968,6 +1810,90 @@
|
|
|
968
1810
|
]
|
|
969
1811
|
}
|
|
970
1812
|
},
|
|
1813
|
+
{
|
|
1814
|
+
"name": "PresaleApprovedAndMarketCreated",
|
|
1815
|
+
"type": {
|
|
1816
|
+
"kind": "struct",
|
|
1817
|
+
"fields": [
|
|
1818
|
+
{
|
|
1819
|
+
"name": "config",
|
|
1820
|
+
"type": "pubkey"
|
|
1821
|
+
},
|
|
1822
|
+
{
|
|
1823
|
+
"name": "presale",
|
|
1824
|
+
"type": "pubkey"
|
|
1825
|
+
},
|
|
1826
|
+
{
|
|
1827
|
+
"name": "question",
|
|
1828
|
+
"type": "pubkey"
|
|
1829
|
+
},
|
|
1830
|
+
{
|
|
1831
|
+
"name": "condition",
|
|
1832
|
+
"type": "pubkey"
|
|
1833
|
+
},
|
|
1834
|
+
{
|
|
1835
|
+
"name": "market_oracle",
|
|
1836
|
+
"type": "pubkey"
|
|
1837
|
+
},
|
|
1838
|
+
{
|
|
1839
|
+
"name": "market_oracle_vault",
|
|
1840
|
+
"type": "pubkey"
|
|
1841
|
+
},
|
|
1842
|
+
{
|
|
1843
|
+
"name": "creator",
|
|
1844
|
+
"type": "pubkey"
|
|
1845
|
+
}
|
|
1846
|
+
]
|
|
1847
|
+
}
|
|
1848
|
+
},
|
|
1849
|
+
{
|
|
1850
|
+
"name": "PresaleCreated",
|
|
1851
|
+
"type": {
|
|
1852
|
+
"kind": "struct",
|
|
1853
|
+
"fields": [
|
|
1854
|
+
{
|
|
1855
|
+
"name": "config",
|
|
1856
|
+
"type": "pubkey"
|
|
1857
|
+
},
|
|
1858
|
+
{
|
|
1859
|
+
"name": "presale",
|
|
1860
|
+
"type": "pubkey"
|
|
1861
|
+
},
|
|
1862
|
+
{
|
|
1863
|
+
"name": "creator",
|
|
1864
|
+
"type": "pubkey"
|
|
1865
|
+
},
|
|
1866
|
+
{
|
|
1867
|
+
"name": "presale_index",
|
|
1868
|
+
"type": "u64"
|
|
1869
|
+
},
|
|
1870
|
+
{
|
|
1871
|
+
"name": "qt_mint",
|
|
1872
|
+
"type": "pubkey"
|
|
1873
|
+
},
|
|
1874
|
+
{
|
|
1875
|
+
"name": "currency_mint",
|
|
1876
|
+
"type": "pubkey"
|
|
1877
|
+
}
|
|
1878
|
+
]
|
|
1879
|
+
}
|
|
1880
|
+
},
|
|
1881
|
+
{
|
|
1882
|
+
"name": "PresaleRejected",
|
|
1883
|
+
"type": {
|
|
1884
|
+
"kind": "struct",
|
|
1885
|
+
"fields": [
|
|
1886
|
+
{
|
|
1887
|
+
"name": "config",
|
|
1888
|
+
"type": "pubkey"
|
|
1889
|
+
},
|
|
1890
|
+
{
|
|
1891
|
+
"name": "presale",
|
|
1892
|
+
"type": "pubkey"
|
|
1893
|
+
}
|
|
1894
|
+
]
|
|
1895
|
+
}
|
|
1896
|
+
},
|
|
971
1897
|
{
|
|
972
1898
|
"name": "Question",
|
|
973
1899
|
"type": {
|
|
@@ -1327,12 +2253,19 @@
|
|
|
1327
2253
|
"name": "bump",
|
|
1328
2254
|
"type": "u8"
|
|
1329
2255
|
},
|
|
2256
|
+
{
|
|
2257
|
+
"name": "presale_count",
|
|
2258
|
+
"docs": [
|
|
2259
|
+
"Counter for presale PDAs — used as seed index"
|
|
2260
|
+
],
|
|
2261
|
+
"type": "u64"
|
|
2262
|
+
},
|
|
1330
2263
|
{
|
|
1331
2264
|
"name": "_reserved",
|
|
1332
2265
|
"type": {
|
|
1333
2266
|
"array": [
|
|
1334
2267
|
"u8",
|
|
1335
|
-
|
|
2268
|
+
120
|
|
1336
2269
|
]
|
|
1337
2270
|
}
|
|
1338
2271
|
}
|