@zcomb/programs-sdk 1.7.0 → 1.8.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.
Files changed (44) hide show
  1. package/dist/futarchy/client.d.ts +113 -1
  2. package/dist/futarchy/client.js +13 -3
  3. package/dist/futarchy/instructions.d.ts +109 -1
  4. package/dist/futarchy/instructions.js +17 -3
  5. package/dist/generated/idls/futarchy.json +112 -0
  6. package/dist/generated/types/futarchy.d.ts +112 -0
  7. package/dist/generated/types/futarchy.js +1 -1
  8. package/package.json +1 -2
  9. package/src/amm/client.ts +0 -485
  10. package/src/amm/constants.ts +0 -31
  11. package/src/amm/index.ts +0 -5
  12. package/src/amm/instructions.ts +0 -139
  13. package/src/amm/types.ts +0 -62
  14. package/src/amm/utils.ts +0 -263
  15. package/src/futarchy/client.ts +0 -1100
  16. package/src/futarchy/constants.ts +0 -28
  17. package/src/futarchy/index.ts +0 -5
  18. package/src/futarchy/instructions.ts +0 -235
  19. package/src/futarchy/types.ts +0 -54
  20. package/src/futarchy/utils.ts +0 -108
  21. package/src/generated/idls/amm.json +0 -1252
  22. package/src/generated/idls/futarchy.json +0 -1763
  23. package/src/generated/idls/index.ts +0 -4
  24. package/src/generated/idls/svault.json +0 -2228
  25. package/src/generated/idls/vault.json +0 -1501
  26. package/src/generated/types/amm.ts +0 -1258
  27. package/src/generated/types/futarchy.ts +0 -1769
  28. package/src/generated/types/index.ts +0 -4
  29. package/src/generated/types/svault.ts +0 -2234
  30. package/src/generated/types/vault.ts +0 -1507
  31. package/src/index.ts +0 -163
  32. package/src/svault/client.ts +0 -401
  33. package/src/svault/constants.ts +0 -23
  34. package/src/svault/index.ts +0 -5
  35. package/src/svault/instructions.ts +0 -258
  36. package/src/svault/types.ts +0 -45
  37. package/src/svault/utils.ts +0 -145
  38. package/src/utils.ts +0 -41
  39. package/src/vault/client.ts +0 -333
  40. package/src/vault/constants.ts +0 -23
  41. package/src/vault/index.ts +0 -5
  42. package/src/vault/instructions.ts +0 -170
  43. package/src/vault/types.ts +0 -54
  44. package/src/vault/utils.ts +0 -70
@@ -1,1763 +0,0 @@
1
- {
2
- "address": "FUTKPrt66uGGCTpk6f9tmRX2325cWgXzGCwvWhyyzjea",
3
- "metadata": {
4
- "name": "futarchy",
5
- "version": "0.1.0",
6
- "spec": "0.1.0",
7
- "description": "Created with Anchor"
8
- },
9
- "instructions": [
10
- {
11
- "name": "add_historical_proposal",
12
- "discriminator": [
13
- 125,
14
- 119,
15
- 66,
16
- 65,
17
- 159,
18
- 52,
19
- 65,
20
- 160
21
- ],
22
- "accounts": [
23
- {
24
- "name": "admin",
25
- "writable": true,
26
- "signer": true
27
- },
28
- {
29
- "name": "moderator",
30
- "writable": true,
31
- "pda": {
32
- "seeds": [
33
- {
34
- "kind": "const",
35
- "value": [
36
- 109,
37
- 111,
38
- 100,
39
- 101,
40
- 114,
41
- 97,
42
- 116,
43
- 111,
44
- 114
45
- ]
46
- },
47
- {
48
- "kind": "account",
49
- "path": "moderator.name",
50
- "account": "ModeratorAccount"
51
- }
52
- ]
53
- }
54
- },
55
- {
56
- "name": "proposal",
57
- "writable": true,
58
- "pda": {
59
- "seeds": [
60
- {
61
- "kind": "const",
62
- "value": [
63
- 112,
64
- 114,
65
- 111,
66
- 112,
67
- 111,
68
- 115,
69
- 97,
70
- 108
71
- ]
72
- },
73
- {
74
- "kind": "account",
75
- "path": "moderator"
76
- },
77
- {
78
- "kind": "account",
79
- "path": "moderator.proposal_id_counter",
80
- "account": "ModeratorAccount"
81
- }
82
- ]
83
- }
84
- },
85
- {
86
- "name": "system_program",
87
- "address": "11111111111111111111111111111111"
88
- }
89
- ],
90
- "args": [
91
- {
92
- "name": "num_options",
93
- "type": "u8"
94
- },
95
- {
96
- "name": "winning_idx",
97
- "type": "u8"
98
- },
99
- {
100
- "name": "length",
101
- "type": "u16"
102
- },
103
- {
104
- "name": "created_at",
105
- "type": "i64"
106
- }
107
- ],
108
- "returns": "u16"
109
- },
110
- {
111
- "name": "add_option",
112
- "discriminator": [
113
- 229,
114
- 150,
115
- 102,
116
- 127,
117
- 99,
118
- 5,
119
- 34,
120
- 196
121
- ],
122
- "accounts": [
123
- {
124
- "name": "creator",
125
- "writable": true,
126
- "signer": true
127
- },
128
- {
129
- "name": "proposal",
130
- "writable": true,
131
- "pda": {
132
- "seeds": [
133
- {
134
- "kind": "const",
135
- "value": [
136
- 112,
137
- 114,
138
- 111,
139
- 112,
140
- 111,
141
- 115,
142
- 97,
143
- 108
144
- ]
145
- },
146
- {
147
- "kind": "account",
148
- "path": "proposal.moderator",
149
- "account": "ProposalAccount"
150
- },
151
- {
152
- "kind": "account",
153
- "path": "proposal.id",
154
- "account": "ProposalAccount"
155
- }
156
- ]
157
- }
158
- },
159
- {
160
- "name": "system_program",
161
- "address": "11111111111111111111111111111111"
162
- },
163
- {
164
- "name": "vault_program",
165
- "address": "VLTEetGyPKtffi1u3Jr8btWATv33NeDyUuRsPENFPTU"
166
- },
167
- {
168
- "name": "amm_program",
169
- "address": "AMMSgtnttAKx5Ad2Y1socKJ3CcQYCB2ctg8U2SAHcVEx"
170
- },
171
- {
172
- "name": "token_program",
173
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
174
- },
175
- {
176
- "name": "associated_token_program",
177
- "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
178
- }
179
- ],
180
- "args": []
181
- },
182
- {
183
- "name": "finalize_proposal",
184
- "discriminator": [
185
- 23,
186
- 68,
187
- 51,
188
- 167,
189
- 109,
190
- 173,
191
- 187,
192
- 164
193
- ],
194
- "accounts": [
195
- {
196
- "name": "signer",
197
- "signer": true
198
- },
199
- {
200
- "name": "proposal",
201
- "writable": true,
202
- "pda": {
203
- "seeds": [
204
- {
205
- "kind": "const",
206
- "value": [
207
- 112,
208
- 114,
209
- 111,
210
- 112,
211
- 111,
212
- 115,
213
- 97,
214
- 108
215
- ]
216
- },
217
- {
218
- "kind": "account",
219
- "path": "proposal.moderator",
220
- "account": "ProposalAccount"
221
- },
222
- {
223
- "kind": "account",
224
- "path": "proposal.id",
225
- "account": "ProposalAccount"
226
- }
227
- ]
228
- }
229
- },
230
- {
231
- "name": "vault",
232
- "writable": true,
233
- "relations": [
234
- "proposal"
235
- ]
236
- },
237
- {
238
- "name": "vault_program",
239
- "address": "VLTEetGyPKtffi1u3Jr8btWATv33NeDyUuRsPENFPTU"
240
- },
241
- {
242
- "name": "amm_program",
243
- "address": "AMMSgtnttAKx5Ad2Y1socKJ3CcQYCB2ctg8U2SAHcVEx"
244
- }
245
- ],
246
- "args": []
247
- },
248
- {
249
- "name": "initialize_child_dao",
250
- "discriminator": [
251
- 241,
252
- 144,
253
- 136,
254
- 34,
255
- 152,
256
- 26,
257
- 21,
258
- 190
259
- ],
260
- "accounts": [
261
- {
262
- "name": "admin",
263
- "writable": true,
264
- "signer": true
265
- },
266
- {
267
- "name": "parent_admin",
268
- "signer": true
269
- },
270
- {
271
- "name": "dao",
272
- "writable": true,
273
- "pda": {
274
- "seeds": [
275
- {
276
- "kind": "const",
277
- "value": [
278
- 100,
279
- 97,
280
- 111
281
- ]
282
- },
283
- {
284
- "kind": "arg",
285
- "path": "name"
286
- }
287
- ]
288
- }
289
- },
290
- {
291
- "name": "parent_dao",
292
- "pda": {
293
- "seeds": [
294
- {
295
- "kind": "const",
296
- "value": [
297
- 100,
298
- 97,
299
- 111
300
- ]
301
- },
302
- {
303
- "kind": "account",
304
- "path": "parent_dao.name",
305
- "account": "DAOAccount"
306
- }
307
- ]
308
- }
309
- },
310
- {
311
- "name": "token_mint"
312
- },
313
- {
314
- "name": "program_config"
315
- },
316
- {
317
- "name": "program_config_treasury",
318
- "writable": true
319
- },
320
- {
321
- "name": "treasury_multisig",
322
- "writable": true
323
- },
324
- {
325
- "name": "mint_multisig",
326
- "writable": true
327
- },
328
- {
329
- "name": "mint_create_key",
330
- "pda": {
331
- "seeds": [
332
- {
333
- "kind": "account",
334
- "path": "dao"
335
- },
336
- {
337
- "kind": "const",
338
- "value": [
339
- 109,
340
- 105,
341
- 110,
342
- 116,
343
- 95,
344
- 107,
345
- 101,
346
- 121
347
- ]
348
- },
349
- {
350
- "kind": "arg",
351
- "path": "name"
352
- }
353
- ]
354
- }
355
- },
356
- {
357
- "name": "squads_program"
358
- },
359
- {
360
- "name": "system_program",
361
- "address": "11111111111111111111111111111111"
362
- }
363
- ],
364
- "args": [
365
- {
366
- "name": "name",
367
- "type": "string"
368
- },
369
- {
370
- "name": "treasury_cosigner",
371
- "type": "pubkey"
372
- }
373
- ]
374
- },
375
- {
376
- "name": "initialize_moderator",
377
- "discriminator": [
378
- 142,
379
- 175,
380
- 48,
381
- 111,
382
- 170,
383
- 41,
384
- 76,
385
- 51
386
- ],
387
- "accounts": [
388
- {
389
- "name": "admin",
390
- "writable": true,
391
- "signer": true
392
- },
393
- {
394
- "name": "base_mint"
395
- },
396
- {
397
- "name": "quote_mint"
398
- },
399
- {
400
- "name": "moderator",
401
- "writable": true,
402
- "pda": {
403
- "seeds": [
404
- {
405
- "kind": "const",
406
- "value": [
407
- 109,
408
- 111,
409
- 100,
410
- 101,
411
- 114,
412
- 97,
413
- 116,
414
- 111,
415
- 114
416
- ]
417
- },
418
- {
419
- "kind": "arg",
420
- "path": "name"
421
- }
422
- ]
423
- }
424
- },
425
- {
426
- "name": "system_program",
427
- "address": "11111111111111111111111111111111"
428
- }
429
- ],
430
- "args": [
431
- {
432
- "name": "name",
433
- "type": "string"
434
- }
435
- ]
436
- },
437
- {
438
- "name": "initialize_parent_dao",
439
- "discriminator": [
440
- 188,
441
- 86,
442
- 227,
443
- 249,
444
- 221,
445
- 148,
446
- 66,
447
- 241
448
- ],
449
- "accounts": [
450
- {
451
- "name": "admin",
452
- "writable": true,
453
- "signer": true
454
- },
455
- {
456
- "name": "parent_admin",
457
- "signer": true
458
- },
459
- {
460
- "name": "dao",
461
- "writable": true,
462
- "pda": {
463
- "seeds": [
464
- {
465
- "kind": "const",
466
- "value": [
467
- 100,
468
- 97,
469
- 111
470
- ]
471
- },
472
- {
473
- "kind": "arg",
474
- "path": "name"
475
- }
476
- ]
477
- }
478
- },
479
- {
480
- "name": "moderator",
481
- "writable": true,
482
- "pda": {
483
- "seeds": [
484
- {
485
- "kind": "const",
486
- "value": [
487
- 109,
488
- 111,
489
- 100,
490
- 101,
491
- 114,
492
- 97,
493
- 116,
494
- 111,
495
- 114
496
- ]
497
- },
498
- {
499
- "kind": "arg",
500
- "path": "name"
501
- }
502
- ]
503
- }
504
- },
505
- {
506
- "name": "base_mint"
507
- },
508
- {
509
- "name": "quote_mint"
510
- },
511
- {
512
- "name": "program_config"
513
- },
514
- {
515
- "name": "program_config_treasury",
516
- "writable": true
517
- },
518
- {
519
- "name": "treasury_multisig",
520
- "writable": true
521
- },
522
- {
523
- "name": "mint_multisig",
524
- "writable": true
525
- },
526
- {
527
- "name": "mint_create_key",
528
- "pda": {
529
- "seeds": [
530
- {
531
- "kind": "account",
532
- "path": "dao"
533
- },
534
- {
535
- "kind": "const",
536
- "value": [
537
- 109,
538
- 105,
539
- 110,
540
- 116,
541
- 95,
542
- 107,
543
- 101,
544
- 121
545
- ]
546
- },
547
- {
548
- "kind": "arg",
549
- "path": "name"
550
- }
551
- ]
552
- }
553
- },
554
- {
555
- "name": "squads_program"
556
- },
557
- {
558
- "name": "system_program",
559
- "address": "11111111111111111111111111111111"
560
- }
561
- ],
562
- "args": [
563
- {
564
- "name": "name",
565
- "type": "string"
566
- },
567
- {
568
- "name": "treasury_cosigner",
569
- "type": "pubkey"
570
- },
571
- {
572
- "name": "pool",
573
- "type": "pubkey"
574
- },
575
- {
576
- "name": "pool_type",
577
- "type": {
578
- "defined": {
579
- "name": "PoolType"
580
- }
581
- }
582
- }
583
- ]
584
- },
585
- {
586
- "name": "initialize_proposal",
587
- "discriminator": [
588
- 50,
589
- 73,
590
- 156,
591
- 98,
592
- 129,
593
- 149,
594
- 21,
595
- 158
596
- ],
597
- "accounts": [
598
- {
599
- "name": "creator",
600
- "writable": true,
601
- "signer": true
602
- },
603
- {
604
- "name": "moderator",
605
- "writable": true,
606
- "pda": {
607
- "seeds": [
608
- {
609
- "kind": "const",
610
- "value": [
611
- 109,
612
- 111,
613
- 100,
614
- 101,
615
- 114,
616
- 97,
617
- 116,
618
- 111,
619
- 114
620
- ]
621
- },
622
- {
623
- "kind": "account",
624
- "path": "moderator.name",
625
- "account": "ModeratorAccount"
626
- }
627
- ]
628
- }
629
- },
630
- {
631
- "name": "proposal",
632
- "writable": true,
633
- "pda": {
634
- "seeds": [
635
- {
636
- "kind": "const",
637
- "value": [
638
- 112,
639
- 114,
640
- 111,
641
- 112,
642
- 111,
643
- 115,
644
- 97,
645
- 108
646
- ]
647
- },
648
- {
649
- "kind": "account",
650
- "path": "moderator"
651
- },
652
- {
653
- "kind": "account",
654
- "path": "moderator.proposal_id_counter",
655
- "account": "ModeratorAccount"
656
- }
657
- ]
658
- }
659
- },
660
- {
661
- "name": "system_program",
662
- "address": "11111111111111111111111111111111"
663
- },
664
- {
665
- "name": "vault_program",
666
- "address": "VLTEetGyPKtffi1u3Jr8btWATv33NeDyUuRsPENFPTU"
667
- },
668
- {
669
- "name": "amm_program",
670
- "address": "AMMSgtnttAKx5Ad2Y1socKJ3CcQYCB2ctg8U2SAHcVEx"
671
- },
672
- {
673
- "name": "token_program",
674
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
675
- },
676
- {
677
- "name": "associated_token_program",
678
- "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
679
- }
680
- ],
681
- "args": [
682
- {
683
- "name": "proposal_params",
684
- "type": {
685
- "defined": {
686
- "name": "ProposalParams"
687
- }
688
- }
689
- },
690
- {
691
- "name": "metadata",
692
- "type": {
693
- "option": "string"
694
- }
695
- }
696
- ],
697
- "returns": "u16"
698
- },
699
- {
700
- "name": "launch_proposal",
701
- "discriminator": [
702
- 16,
703
- 211,
704
- 189,
705
- 119,
706
- 245,
707
- 72,
708
- 0,
709
- 229
710
- ],
711
- "accounts": [
712
- {
713
- "name": "creator",
714
- "writable": true,
715
- "signer": true
716
- },
717
- {
718
- "name": "proposal",
719
- "writable": true,
720
- "pda": {
721
- "seeds": [
722
- {
723
- "kind": "const",
724
- "value": [
725
- 112,
726
- 114,
727
- 111,
728
- 112,
729
- 111,
730
- 115,
731
- 97,
732
- 108
733
- ]
734
- },
735
- {
736
- "kind": "account",
737
- "path": "proposal.moderator",
738
- "account": "ProposalAccount"
739
- },
740
- {
741
- "kind": "account",
742
- "path": "proposal.id",
743
- "account": "ProposalAccount"
744
- }
745
- ]
746
- }
747
- },
748
- {
749
- "name": "vault",
750
- "writable": true,
751
- "relations": [
752
- "proposal"
753
- ]
754
- },
755
- {
756
- "name": "system_program",
757
- "address": "11111111111111111111111111111111"
758
- },
759
- {
760
- "name": "vault_program",
761
- "address": "VLTEetGyPKtffi1u3Jr8btWATv33NeDyUuRsPENFPTU"
762
- },
763
- {
764
- "name": "amm_program",
765
- "address": "AMMSgtnttAKx5Ad2Y1socKJ3CcQYCB2ctg8U2SAHcVEx"
766
- },
767
- {
768
- "name": "token_program",
769
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
770
- },
771
- {
772
- "name": "associated_token_program",
773
- "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
774
- }
775
- ],
776
- "args": [
777
- {
778
- "name": "base_amount",
779
- "type": "u64"
780
- },
781
- {
782
- "name": "quote_amount",
783
- "type": "u64"
784
- }
785
- ]
786
- },
787
- {
788
- "name": "redeem_liquidity",
789
- "discriminator": [
790
- 180,
791
- 117,
792
- 142,
793
- 137,
794
- 227,
795
- 225,
796
- 97,
797
- 211
798
- ],
799
- "accounts": [
800
- {
801
- "name": "creator",
802
- "writable": true,
803
- "signer": true
804
- },
805
- {
806
- "name": "proposal",
807
- "pda": {
808
- "seeds": [
809
- {
810
- "kind": "const",
811
- "value": [
812
- 112,
813
- 114,
814
- 111,
815
- 112,
816
- 111,
817
- 115,
818
- 97,
819
- 108
820
- ]
821
- },
822
- {
823
- "kind": "account",
824
- "path": "proposal.moderator",
825
- "account": "ProposalAccount"
826
- },
827
- {
828
- "kind": "account",
829
- "path": "proposal.id",
830
- "account": "ProposalAccount"
831
- }
832
- ]
833
- }
834
- },
835
- {
836
- "name": "vault",
837
- "writable": true,
838
- "relations": [
839
- "proposal"
840
- ]
841
- },
842
- {
843
- "name": "pool",
844
- "writable": true
845
- },
846
- {
847
- "name": "vault_program",
848
- "address": "VLTEetGyPKtffi1u3Jr8btWATv33NeDyUuRsPENFPTU"
849
- },
850
- {
851
- "name": "amm_program",
852
- "address": "AMMSgtnttAKx5Ad2Y1socKJ3CcQYCB2ctg8U2SAHcVEx"
853
- },
854
- {
855
- "name": "token_program",
856
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
857
- },
858
- {
859
- "name": "associated_token_program",
860
- "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
861
- },
862
- {
863
- "name": "system_program",
864
- "address": "11111111111111111111111111111111"
865
- }
866
- ],
867
- "args": []
868
- },
869
- {
870
- "name": "upgrade_dao",
871
- "discriminator": [
872
- 81,
873
- 178,
874
- 57,
875
- 196,
876
- 156,
877
- 38,
878
- 145,
879
- 93
880
- ],
881
- "accounts": [
882
- {
883
- "name": "admin",
884
- "writable": true,
885
- "signer": true
886
- },
887
- {
888
- "name": "parent_admin",
889
- "signer": true
890
- },
891
- {
892
- "name": "dao",
893
- "pda": {
894
- "seeds": [
895
- {
896
- "kind": "const",
897
- "value": [
898
- 100,
899
- 97,
900
- 111
901
- ]
902
- },
903
- {
904
- "kind": "account",
905
- "path": "dao.name",
906
- "account": "DAOAccount"
907
- }
908
- ]
909
- }
910
- },
911
- {
912
- "name": "parent_dao",
913
- "pda": {
914
- "seeds": [
915
- {
916
- "kind": "const",
917
- "value": [
918
- 100,
919
- 97,
920
- 111
921
- ]
922
- },
923
- {
924
- "kind": "account",
925
- "path": "parent_dao.name",
926
- "account": "DAOAccount"
927
- }
928
- ]
929
- }
930
- },
931
- {
932
- "name": "moderator",
933
- "writable": true,
934
- "pda": {
935
- "seeds": [
936
- {
937
- "kind": "const",
938
- "value": [
939
- 109,
940
- 111,
941
- 100,
942
- 101,
943
- 114,
944
- 97,
945
- 116,
946
- 111,
947
- 114
948
- ]
949
- },
950
- {
951
- "kind": "account",
952
- "path": "dao.name",
953
- "account": "DAOAccount"
954
- }
955
- ]
956
- }
957
- },
958
- {
959
- "name": "base_mint"
960
- },
961
- {
962
- "name": "quote_mint"
963
- },
964
- {
965
- "name": "system_program",
966
- "address": "11111111111111111111111111111111"
967
- }
968
- ],
969
- "args": [
970
- {
971
- "name": "pool",
972
- "type": "pubkey"
973
- },
974
- {
975
- "name": "pool_type",
976
- "type": {
977
- "defined": {
978
- "name": "PoolType"
979
- }
980
- }
981
- }
982
- ]
983
- }
984
- ],
985
- "accounts": [
986
- {
987
- "name": "DAOAccount",
988
- "discriminator": [
989
- 204,
990
- 10,
991
- 113,
992
- 79,
993
- 232,
994
- 184,
995
- 83,
996
- 201
997
- ]
998
- },
999
- {
1000
- "name": "ModeratorAccount",
1001
- "discriminator": [
1002
- 129,
1003
- 208,
1004
- 190,
1005
- 35,
1006
- 9,
1007
- 28,
1008
- 249,
1009
- 53
1010
- ]
1011
- },
1012
- {
1013
- "name": "ProposalAccount",
1014
- "discriminator": [
1015
- 164,
1016
- 190,
1017
- 4,
1018
- 248,
1019
- 203,
1020
- 124,
1021
- 243,
1022
- 64
1023
- ]
1024
- }
1025
- ],
1026
- "events": [
1027
- {
1028
- "name": "DAOInitialized",
1029
- "discriminator": [
1030
- 17,
1031
- 212,
1032
- 203,
1033
- 144,
1034
- 165,
1035
- 153,
1036
- 118,
1037
- 92
1038
- ]
1039
- },
1040
- {
1041
- "name": "DAOUpgraded",
1042
- "discriminator": [
1043
- 8,
1044
- 62,
1045
- 51,
1046
- 188,
1047
- 195,
1048
- 69,
1049
- 78,
1050
- 7
1051
- ]
1052
- },
1053
- {
1054
- "name": "LiquidityRedeemed",
1055
- "discriminator": [
1056
- 78,
1057
- 81,
1058
- 213,
1059
- 176,
1060
- 1,
1061
- 84,
1062
- 138,
1063
- 65
1064
- ]
1065
- },
1066
- {
1067
- "name": "ModeratorInitialized",
1068
- "discriminator": [
1069
- 28,
1070
- 29,
1071
- 85,
1072
- 133,
1073
- 161,
1074
- 89,
1075
- 54,
1076
- 108
1077
- ]
1078
- },
1079
- {
1080
- "name": "OptionAdded",
1081
- "discriminator": [
1082
- 136,
1083
- 202,
1084
- 18,
1085
- 117,
1086
- 144,
1087
- 187,
1088
- 122,
1089
- 249
1090
- ]
1091
- },
1092
- {
1093
- "name": "ProposalFinalized",
1094
- "discriminator": [
1095
- 159,
1096
- 104,
1097
- 210,
1098
- 220,
1099
- 86,
1100
- 209,
1101
- 61,
1102
- 51
1103
- ]
1104
- },
1105
- {
1106
- "name": "ProposalInitialized",
1107
- "discriminator": [
1108
- 148,
1109
- 198,
1110
- 58,
1111
- 182,
1112
- 198,
1113
- 50,
1114
- 13,
1115
- 60
1116
- ]
1117
- },
1118
- {
1119
- "name": "ProposalLaunched",
1120
- "discriminator": [
1121
- 39,
1122
- 113,
1123
- 126,
1124
- 109,
1125
- 167,
1126
- 203,
1127
- 187,
1128
- 47
1129
- ]
1130
- }
1131
- ],
1132
- "errors": [
1133
- {
1134
- "code": 6000,
1135
- "name": "InvalidVault",
1136
- "msg": "Vault account mismatch"
1137
- },
1138
- {
1139
- "code": 6001,
1140
- "name": "InvalidPools",
1141
- "msg": "Pool account mismatch"
1142
- },
1143
- {
1144
- "code": 6002,
1145
- "name": "InvalidMint",
1146
- "msg": "Mint mismatch"
1147
- },
1148
- {
1149
- "code": 6003,
1150
- "name": "InvalidPoolProgram",
1151
- "msg": "Invalid Pool Program"
1152
- },
1153
- {
1154
- "code": 6004,
1155
- "name": "NotEnoughOptions",
1156
- "msg": "Minimum 2 options required"
1157
- },
1158
- {
1159
- "code": 6005,
1160
- "name": "TooManyOptions",
1161
- "msg": "Too many options"
1162
- },
1163
- {
1164
- "code": 6006,
1165
- "name": "InvalidRemainingAccounts",
1166
- "msg": "Invalid remaining accounts"
1167
- },
1168
- {
1169
- "code": 6007,
1170
- "name": "InvalidState",
1171
- "msg": "Invalid proposal state"
1172
- },
1173
- {
1174
- "code": 6008,
1175
- "name": "Unauthorized",
1176
- "msg": "Unauthorized"
1177
- },
1178
- {
1179
- "code": 6009,
1180
- "name": "ProposalNotExpired",
1181
- "msg": "Proposal has not expired yet"
1182
- },
1183
- {
1184
- "code": 6010,
1185
- "name": "TwapNotReady",
1186
- "msg": "TWAP not ready"
1187
- },
1188
- {
1189
- "code": 6011,
1190
- "name": "CounterOverflow",
1191
- "msg": "Counter overflow"
1192
- },
1193
- {
1194
- "code": 6012,
1195
- "name": "InvalidWinningIndex",
1196
- "msg": "Winning index exceeds number of options"
1197
- },
1198
- {
1199
- "code": 6013,
1200
- "name": "InvalidVersion",
1201
- "msg": "Invalid account version"
1202
- },
1203
- {
1204
- "code": 6014,
1205
- "name": "NameTooLong",
1206
- "msg": "Name exceeds 32 bytes"
1207
- },
1208
- {
1209
- "code": 6015,
1210
- "name": "MetadataTooLong",
1211
- "msg": "Metadata CID exceeds 64 bytes"
1212
- },
1213
- {
1214
- "code": 6016,
1215
- "name": "InvalidDAO",
1216
- "msg": "Invalid DAO account"
1217
- },
1218
- {
1219
- "code": 6017,
1220
- "name": "MathOverflow",
1221
- "msg": "Math overflow"
1222
- },
1223
- {
1224
- "code": 6018,
1225
- "name": "InvalidProposalParams",
1226
- "msg": "Invalid proposal parameters"
1227
- }
1228
- ],
1229
- "types": [
1230
- {
1231
- "name": "DAOAccount",
1232
- "docs": [
1233
- "Seeds: [DAO_SEED, &dao_id.to_le_bytes()]"
1234
- ],
1235
- "type": {
1236
- "kind": "struct",
1237
- "fields": [
1238
- {
1239
- "name": "version",
1240
- "type": "u8"
1241
- },
1242
- {
1243
- "name": "bump",
1244
- "type": "u8"
1245
- },
1246
- {
1247
- "name": "name",
1248
- "type": "string"
1249
- },
1250
- {
1251
- "name": "admin",
1252
- "type": "pubkey"
1253
- },
1254
- {
1255
- "name": "token_mint",
1256
- "type": "pubkey"
1257
- },
1258
- {
1259
- "name": "cosigner",
1260
- "type": "pubkey"
1261
- },
1262
- {
1263
- "name": "treasury_multisig",
1264
- "type": "pubkey"
1265
- },
1266
- {
1267
- "name": "mint_auth_multisig",
1268
- "type": "pubkey"
1269
- },
1270
- {
1271
- "name": "dao_type",
1272
- "type": {
1273
- "defined": {
1274
- "name": "DAOType"
1275
- }
1276
- }
1277
- }
1278
- ]
1279
- }
1280
- },
1281
- {
1282
- "name": "DAOInitialized",
1283
- "type": {
1284
- "kind": "struct",
1285
- "fields": [
1286
- {
1287
- "name": "version",
1288
- "type": "u8"
1289
- },
1290
- {
1291
- "name": "name",
1292
- "type": "string"
1293
- },
1294
- {
1295
- "name": "admin",
1296
- "type": "pubkey"
1297
- },
1298
- {
1299
- "name": "treasury_multisig",
1300
- "type": "pubkey"
1301
- },
1302
- {
1303
- "name": "mint_multisig",
1304
- "type": "pubkey"
1305
- },
1306
- {
1307
- "name": "dao_type",
1308
- "type": {
1309
- "defined": {
1310
- "name": "DAOType"
1311
- }
1312
- }
1313
- }
1314
- ]
1315
- }
1316
- },
1317
- {
1318
- "name": "DAOType",
1319
- "type": {
1320
- "kind": "enum",
1321
- "variants": [
1322
- {
1323
- "name": "Parent",
1324
- "fields": [
1325
- {
1326
- "name": "moderator",
1327
- "type": "pubkey"
1328
- },
1329
- {
1330
- "name": "pool",
1331
- "type": "pubkey"
1332
- },
1333
- {
1334
- "name": "pool_type",
1335
- "type": {
1336
- "defined": {
1337
- "name": "PoolType"
1338
- }
1339
- }
1340
- }
1341
- ]
1342
- },
1343
- {
1344
- "name": "Child",
1345
- "fields": [
1346
- {
1347
- "name": "parent_dao",
1348
- "type": "pubkey"
1349
- }
1350
- ]
1351
- }
1352
- ]
1353
- }
1354
- },
1355
- {
1356
- "name": "DAOUpgraded",
1357
- "type": {
1358
- "kind": "struct",
1359
- "fields": [
1360
- {
1361
- "name": "dao",
1362
- "type": "pubkey"
1363
- },
1364
- {
1365
- "name": "parent_dao",
1366
- "type": "pubkey"
1367
- },
1368
- {
1369
- "name": "dao_type",
1370
- "type": {
1371
- "defined": {
1372
- "name": "DAOType"
1373
- }
1374
- }
1375
- },
1376
- {
1377
- "name": "token_mint",
1378
- "type": "pubkey"
1379
- }
1380
- ]
1381
- }
1382
- },
1383
- {
1384
- "name": "LiquidityRedeemed",
1385
- "type": {
1386
- "kind": "struct",
1387
- "fields": [
1388
- {
1389
- "name": "proposal_id",
1390
- "type": "u16"
1391
- },
1392
- {
1393
- "name": "proposal",
1394
- "type": "pubkey"
1395
- },
1396
- {
1397
- "name": "redeemer",
1398
- "type": "pubkey"
1399
- },
1400
- {
1401
- "name": "winning_idx",
1402
- "type": "u8"
1403
- }
1404
- ]
1405
- }
1406
- },
1407
- {
1408
- "name": "ModeratorAccount",
1409
- "docs": [
1410
- "Seeds: [MODERATOR_SEED, &id.to_le_bytes()]"
1411
- ],
1412
- "type": {
1413
- "kind": "struct",
1414
- "fields": [
1415
- {
1416
- "name": "version",
1417
- "type": "u8"
1418
- },
1419
- {
1420
- "name": "bump",
1421
- "type": "u8"
1422
- },
1423
- {
1424
- "name": "name",
1425
- "type": "string"
1426
- },
1427
- {
1428
- "name": "quote_mint",
1429
- "type": "pubkey"
1430
- },
1431
- {
1432
- "name": "base_mint",
1433
- "type": "pubkey"
1434
- },
1435
- {
1436
- "name": "proposal_id_counter",
1437
- "type": "u16"
1438
- },
1439
- {
1440
- "name": "admin",
1441
- "type": "pubkey"
1442
- }
1443
- ]
1444
- }
1445
- },
1446
- {
1447
- "name": "ModeratorInitialized",
1448
- "type": {
1449
- "kind": "struct",
1450
- "fields": [
1451
- {
1452
- "name": "version",
1453
- "type": "u8"
1454
- },
1455
- {
1456
- "name": "moderator",
1457
- "type": "pubkey"
1458
- },
1459
- {
1460
- "name": "name",
1461
- "type": "string"
1462
- },
1463
- {
1464
- "name": "base_mint",
1465
- "type": "pubkey"
1466
- },
1467
- {
1468
- "name": "quote_mint",
1469
- "type": "pubkey"
1470
- },
1471
- {
1472
- "name": "admin",
1473
- "type": "pubkey"
1474
- }
1475
- ]
1476
- }
1477
- },
1478
- {
1479
- "name": "OptionAdded",
1480
- "type": {
1481
- "kind": "struct",
1482
- "fields": [
1483
- {
1484
- "name": "proposal_id",
1485
- "type": "u16"
1486
- },
1487
- {
1488
- "name": "proposal",
1489
- "type": "pubkey"
1490
- },
1491
- {
1492
- "name": "option_index",
1493
- "type": "u8"
1494
- }
1495
- ]
1496
- }
1497
- },
1498
- {
1499
- "name": "PoolType",
1500
- "type": {
1501
- "kind": "enum",
1502
- "variants": [
1503
- {
1504
- "name": "DAMM"
1505
- },
1506
- {
1507
- "name": "DLMM"
1508
- }
1509
- ]
1510
- }
1511
- },
1512
- {
1513
- "name": "ProposalAccount",
1514
- "docs": [
1515
- "Seeds: [PROPOSAL_SEED, moderator.key(), &id.to_le_bytes()]"
1516
- ],
1517
- "type": {
1518
- "kind": "struct",
1519
- "fields": [
1520
- {
1521
- "name": "version",
1522
- "type": "u8"
1523
- },
1524
- {
1525
- "name": "bump",
1526
- "type": "u8"
1527
- },
1528
- {
1529
- "name": "moderator",
1530
- "type": "pubkey"
1531
- },
1532
- {
1533
- "name": "id",
1534
- "type": "u16"
1535
- },
1536
- {
1537
- "name": "num_options",
1538
- "type": "u8"
1539
- },
1540
- {
1541
- "name": "state",
1542
- "type": {
1543
- "defined": {
1544
- "name": "ProposalState"
1545
- }
1546
- }
1547
- },
1548
- {
1549
- "name": "created_at",
1550
- "type": "i64"
1551
- },
1552
- {
1553
- "name": "creator",
1554
- "type": "pubkey"
1555
- },
1556
- {
1557
- "name": "base_mint",
1558
- "type": "pubkey"
1559
- },
1560
- {
1561
- "name": "quote_mint",
1562
- "type": "pubkey"
1563
- },
1564
- {
1565
- "name": "vault",
1566
- "type": "pubkey"
1567
- },
1568
- {
1569
- "name": "pools",
1570
- "type": {
1571
- "array": [
1572
- "pubkey",
1573
- 6
1574
- ]
1575
- }
1576
- },
1577
- {
1578
- "name": "config",
1579
- "type": {
1580
- "defined": {
1581
- "name": "ProposalParams"
1582
- }
1583
- }
1584
- },
1585
- {
1586
- "name": "metadata",
1587
- "type": {
1588
- "option": "string"
1589
- }
1590
- }
1591
- ]
1592
- }
1593
- },
1594
- {
1595
- "name": "ProposalFinalized",
1596
- "type": {
1597
- "kind": "struct",
1598
- "fields": [
1599
- {
1600
- "name": "proposal_id",
1601
- "type": "u16"
1602
- },
1603
- {
1604
- "name": "proposal",
1605
- "type": "pubkey"
1606
- },
1607
- {
1608
- "name": "winning_idx",
1609
- "type": "u8"
1610
- }
1611
- ]
1612
- }
1613
- },
1614
- {
1615
- "name": "ProposalInitialized",
1616
- "type": {
1617
- "kind": "struct",
1618
- "fields": [
1619
- {
1620
- "name": "version",
1621
- "type": "u8"
1622
- },
1623
- {
1624
- "name": "proposal_id",
1625
- "type": "u16"
1626
- },
1627
- {
1628
- "name": "proposal",
1629
- "type": "pubkey"
1630
- },
1631
- {
1632
- "name": "moderator",
1633
- "type": "pubkey"
1634
- },
1635
- {
1636
- "name": "length",
1637
- "type": "u16"
1638
- },
1639
- {
1640
- "name": "creator",
1641
- "type": "pubkey"
1642
- }
1643
- ]
1644
- }
1645
- },
1646
- {
1647
- "name": "ProposalLaunched",
1648
- "type": {
1649
- "kind": "struct",
1650
- "fields": [
1651
- {
1652
- "name": "proposal_id",
1653
- "type": "u16"
1654
- },
1655
- {
1656
- "name": "proposal",
1657
- "type": "pubkey"
1658
- },
1659
- {
1660
- "name": "num_options",
1661
- "type": "u8"
1662
- },
1663
- {
1664
- "name": "base_amount",
1665
- "type": "u64"
1666
- },
1667
- {
1668
- "name": "quote_amount",
1669
- "type": "u64"
1670
- },
1671
- {
1672
- "name": "created_at",
1673
- "type": "i64"
1674
- }
1675
- ]
1676
- }
1677
- },
1678
- {
1679
- "name": "ProposalParams",
1680
- "type": {
1681
- "kind": "struct",
1682
- "fields": [
1683
- {
1684
- "name": "length",
1685
- "type": "u16"
1686
- },
1687
- {
1688
- "name": "starting_observation",
1689
- "type": "u128"
1690
- },
1691
- {
1692
- "name": "max_observation_delta",
1693
- "type": "u128"
1694
- },
1695
- {
1696
- "name": "warmup_duration",
1697
- "type": "u32"
1698
- },
1699
- {
1700
- "name": "market_bias",
1701
- "type": "u16"
1702
- },
1703
- {
1704
- "name": "fee",
1705
- "type": "u16"
1706
- }
1707
- ]
1708
- }
1709
- },
1710
- {
1711
- "name": "ProposalState",
1712
- "type": {
1713
- "kind": "enum",
1714
- "variants": [
1715
- {
1716
- "name": "Setup"
1717
- },
1718
- {
1719
- "name": "Pending"
1720
- },
1721
- {
1722
- "name": "Resolved",
1723
- "fields": [
1724
- "u8"
1725
- ]
1726
- }
1727
- ]
1728
- }
1729
- }
1730
- ],
1731
- "constants": [
1732
- {
1733
- "name": "DAO_SEED",
1734
- "type": "bytes",
1735
- "value": "[100, 97, 111]"
1736
- },
1737
- {
1738
- "name": "MAX_OPTIONS",
1739
- "type": "u8",
1740
- "value": "6"
1741
- },
1742
- {
1743
- "name": "MINT_CREATE_KEY_SEED",
1744
- "type": "bytes",
1745
- "value": "[109, 105, 110, 116, 95, 107, 101, 121]"
1746
- },
1747
- {
1748
- "name": "MIN_OPTIONS",
1749
- "type": "u8",
1750
- "value": "2"
1751
- },
1752
- {
1753
- "name": "MODERATOR_SEED",
1754
- "type": "bytes",
1755
- "value": "[109, 111, 100, 101, 114, 97, 116, 111, 114]"
1756
- },
1757
- {
1758
- "name": "PROPOSAL_SEED",
1759
- "type": "bytes",
1760
- "value": "[112, 114, 111, 112, 111, 115, 97, 108]"
1761
- }
1762
- ]
1763
- }