@triadxyz/triad-protocol 1.2.0-beta → 1.2.2-beta

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.
@@ -13,6 +13,161 @@ export type TriadProtocol = {
13
13
  description: 'Triad protocol, trade solana projects';
14
14
  };
15
15
  instructions: [
16
+ {
17
+ name: 'addLiquidity';
18
+ discriminator: [181, 157, 89, 67, 143, 182, 52, 72];
19
+ accounts: [
20
+ {
21
+ name: 'signer';
22
+ writable: true;
23
+ signer: true;
24
+ },
25
+ {
26
+ name: 'market';
27
+ writable: true;
28
+ },
29
+ {
30
+ name: 'mint';
31
+ writable: true;
32
+ },
33
+ {
34
+ name: 'userFromAta';
35
+ writable: true;
36
+ pda: {
37
+ seeds: [
38
+ {
39
+ kind: 'account';
40
+ path: 'signer';
41
+ },
42
+ {
43
+ kind: 'account';
44
+ path: 'tokenProgram';
45
+ },
46
+ {
47
+ kind: 'account';
48
+ path: 'mint';
49
+ }
50
+ ];
51
+ program: {
52
+ kind: 'const';
53
+ value: [
54
+ 140,
55
+ 151,
56
+ 37,
57
+ 143,
58
+ 78,
59
+ 36,
60
+ 137,
61
+ 241,
62
+ 187,
63
+ 61,
64
+ 16,
65
+ 41,
66
+ 20,
67
+ 142,
68
+ 13,
69
+ 131,
70
+ 11,
71
+ 90,
72
+ 19,
73
+ 153,
74
+ 218,
75
+ 255,
76
+ 16,
77
+ 132,
78
+ 4,
79
+ 142,
80
+ 123,
81
+ 216,
82
+ 219,
83
+ 233,
84
+ 248,
85
+ 89
86
+ ];
87
+ };
88
+ };
89
+ },
90
+ {
91
+ name: 'marketToAta';
92
+ writable: true;
93
+ pda: {
94
+ seeds: [
95
+ {
96
+ kind: 'account';
97
+ path: 'market';
98
+ },
99
+ {
100
+ kind: 'account';
101
+ path: 'tokenProgram';
102
+ },
103
+ {
104
+ kind: 'account';
105
+ path: 'mint';
106
+ }
107
+ ];
108
+ program: {
109
+ kind: 'const';
110
+ value: [
111
+ 140,
112
+ 151,
113
+ 37,
114
+ 143,
115
+ 78,
116
+ 36,
117
+ 137,
118
+ 241,
119
+ 187,
120
+ 61,
121
+ 16,
122
+ 41,
123
+ 20,
124
+ 142,
125
+ 13,
126
+ 131,
127
+ 11,
128
+ 90,
129
+ 19,
130
+ 153,
131
+ 218,
132
+ 255,
133
+ 16,
134
+ 132,
135
+ 4,
136
+ 142,
137
+ 123,
138
+ 216,
139
+ 219,
140
+ 233,
141
+ 248,
142
+ 89
143
+ ];
144
+ };
145
+ };
146
+ },
147
+ {
148
+ name: 'tokenProgram';
149
+ address: 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb';
150
+ },
151
+ {
152
+ name: 'associatedTokenProgram';
153
+ address: 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL';
154
+ },
155
+ {
156
+ name: 'systemProgram';
157
+ address: '11111111111111111111111111111111';
158
+ }
159
+ ];
160
+ args: [
161
+ {
162
+ name: 'args';
163
+ type: {
164
+ defined: {
165
+ name: 'addLiquidityArgs';
166
+ };
167
+ };
168
+ }
169
+ ];
170
+ },
16
171
  {
17
172
  name: 'claimStakeRewards';
18
173
  discriminator: [107, 91, 233, 196, 211, 47, 218, 21];
@@ -334,8 +489,8 @@ export type TriadProtocol = {
334
489
  ];
335
490
  },
336
491
  {
337
- name: 'createUser';
338
- discriminator: [108, 227, 130, 130, 252, 109, 75, 218];
492
+ name: 'collectFee';
493
+ discriminator: [60, 173, 247, 103, 4, 93, 130, 48];
339
494
  accounts: [
340
495
  {
341
496
  name: 'signer';
@@ -343,33 +498,163 @@ export type TriadProtocol = {
343
498
  signer: true;
344
499
  },
345
500
  {
346
- name: 'referral';
501
+ name: 'market';
347
502
  writable: true;
348
503
  },
349
504
  {
350
- name: 'user';
505
+ name: 'mint';
506
+ writable: true;
507
+ },
508
+ {
509
+ name: 'marketAta';
351
510
  writable: true;
352
511
  pda: {
353
512
  seeds: [
354
513
  {
355
- kind: 'const';
356
- value: [117, 115, 101, 114];
514
+ kind: 'account';
515
+ path: 'market';
357
516
  },
517
+ {
518
+ kind: 'account';
519
+ path: 'tokenProgram';
520
+ },
521
+ {
522
+ kind: 'account';
523
+ path: 'mint';
524
+ }
525
+ ];
526
+ program: {
527
+ kind: 'const';
528
+ value: [
529
+ 140,
530
+ 151,
531
+ 37,
532
+ 143,
533
+ 78,
534
+ 36,
535
+ 137,
536
+ 241,
537
+ 187,
538
+ 61,
539
+ 16,
540
+ 41,
541
+ 20,
542
+ 142,
543
+ 13,
544
+ 131,
545
+ 11,
546
+ 90,
547
+ 19,
548
+ 153,
549
+ 218,
550
+ 255,
551
+ 16,
552
+ 132,
553
+ 4,
554
+ 142,
555
+ 123,
556
+ 216,
557
+ 219,
558
+ 233,
559
+ 248,
560
+ 89
561
+ ];
562
+ };
563
+ };
564
+ },
565
+ {
566
+ name: 'signerAta';
567
+ writable: true;
568
+ pda: {
569
+ seeds: [
358
570
  {
359
571
  kind: 'account';
360
572
  path: 'signer';
573
+ },
574
+ {
575
+ kind: 'account';
576
+ path: 'tokenProgram';
577
+ },
578
+ {
579
+ kind: 'account';
580
+ path: 'mint';
361
581
  }
362
582
  ];
583
+ program: {
584
+ kind: 'const';
585
+ value: [
586
+ 140,
587
+ 151,
588
+ 37,
589
+ 143,
590
+ 78,
591
+ 36,
592
+ 137,
593
+ 241,
594
+ 187,
595
+ 61,
596
+ 16,
597
+ 41,
598
+ 20,
599
+ 142,
600
+ 13,
601
+ 131,
602
+ 11,
603
+ 90,
604
+ 19,
605
+ 153,
606
+ 218,
607
+ 255,
608
+ 16,
609
+ 132,
610
+ 4,
611
+ 142,
612
+ 123,
613
+ 216,
614
+ 219,
615
+ 233,
616
+ 248,
617
+ 89
618
+ ];
619
+ };
363
620
  };
364
621
  },
365
622
  {
366
- name: 'userTrade';
623
+ name: 'tokenProgram';
624
+ address: 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb';
625
+ },
626
+ {
627
+ name: 'associatedTokenProgram';
628
+ address: 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL';
629
+ },
630
+ {
631
+ name: 'systemProgram';
632
+ address: '11111111111111111111111111111111';
633
+ }
634
+ ];
635
+ args: [];
636
+ },
637
+ {
638
+ name: 'createUser';
639
+ discriminator: [108, 227, 130, 130, 252, 109, 75, 218];
640
+ accounts: [
641
+ {
642
+ name: 'signer';
643
+ writable: true;
644
+ signer: true;
645
+ },
646
+ {
647
+ name: 'referral';
648
+ writable: true;
649
+ },
650
+ {
651
+ name: 'user';
367
652
  writable: true;
368
653
  pda: {
369
654
  seeds: [
370
655
  {
371
656
  kind: 'const';
372
- value: [117, 115, 101, 114, 95, 116, 114, 97, 100, 101];
657
+ value: [117, 115, 101, 114];
373
658
  },
374
659
  {
375
660
  kind: 'account';
@@ -460,29 +745,13 @@ export type TriadProtocol = {
460
745
  writable: true;
461
746
  },
462
747
  {
463
- name: 'feeVault';
464
- writable: true;
465
- pda: {
466
- seeds: [
467
- {
468
- kind: 'const';
469
- value: [102, 101, 101, 95, 118, 97, 117, 108, 116];
470
- },
471
- {
472
- kind: 'arg';
473
- path: 'args.market_id';
474
- }
475
- ];
476
- };
477
- },
478
- {
479
- name: 'feeAta';
748
+ name: 'marketAta';
480
749
  writable: true;
481
750
  pda: {
482
751
  seeds: [
483
752
  {
484
753
  kind: 'account';
485
- path: 'feeVault';
754
+ path: 'market';
486
755
  },
487
756
  {
488
757
  kind: 'account';
@@ -556,35 +825,6 @@ export type TriadProtocol = {
556
825
  }
557
826
  ];
558
827
  },
559
- {
560
- name: 'initializeQuestion';
561
- discriminator: [245, 151, 106, 188, 88, 44, 65, 212];
562
- accounts: [
563
- {
564
- name: 'signer';
565
- writable: true;
566
- signer: true;
567
- },
568
- {
569
- name: 'market';
570
- writable: true;
571
- },
572
- {
573
- name: 'systemProgram';
574
- address: '11111111111111111111111111111111';
575
- }
576
- ];
577
- args: [
578
- {
579
- name: 'args';
580
- type: {
581
- defined: {
582
- name: 'initializeQuestionArgs';
583
- };
584
- };
585
- }
586
- ];
587
- },
588
828
  {
589
829
  name: 'openOrder';
590
830
  discriminator: [206, 88, 88, 143, 38, 136, 50, 224];
@@ -602,10 +842,6 @@ export type TriadProtocol = {
602
842
  name: 'market';
603
843
  writable: true;
604
844
  },
605
- {
606
- name: 'feeVault';
607
- writable: true;
608
- },
609
845
  {
610
846
  name: 'mint';
611
847
  writable: true;
@@ -724,63 +960,6 @@ export type TriadProtocol = {
724
960
  };
725
961
  };
726
962
  },
727
- {
728
- name: 'feeAta';
729
- writable: true;
730
- pda: {
731
- seeds: [
732
- {
733
- kind: 'account';
734
- path: 'feeVault';
735
- },
736
- {
737
- kind: 'account';
738
- path: 'tokenProgram';
739
- },
740
- {
741
- kind: 'account';
742
- path: 'mint';
743
- }
744
- ];
745
- program: {
746
- kind: 'const';
747
- value: [
748
- 140,
749
- 151,
750
- 37,
751
- 143,
752
- 78,
753
- 36,
754
- 137,
755
- 241,
756
- 187,
757
- 61,
758
- 16,
759
- 41,
760
- 20,
761
- 142,
762
- 13,
763
- 131,
764
- 11,
765
- 90,
766
- 19,
767
- 153,
768
- 218,
769
- 255,
770
- 16,
771
- 132,
772
- 4,
773
- 142,
774
- 123,
775
- 216,
776
- 219,
777
- 233,
778
- 248,
779
- 89
780
- ];
781
- };
782
- };
783
- },
784
963
  {
785
964
  name: 'tokenProgram';
786
965
  address: 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb';
@@ -842,8 +1021,8 @@ export type TriadProtocol = {
842
1021
  args: [];
843
1022
  },
844
1023
  {
845
- name: 'resolveQuestion';
846
- discriminator: [52, 32, 224, 179, 180, 8, 0, 246];
1024
+ name: 'resolveMarket';
1025
+ discriminator: [155, 23, 80, 173, 46, 74, 23, 239];
847
1026
  accounts: [
848
1027
  {
849
1028
  name: 'signer';
@@ -859,7 +1038,16 @@ export type TriadProtocol = {
859
1038
  address: '11111111111111111111111111111111';
860
1039
  }
861
1040
  ];
862
- args: [];
1041
+ args: [
1042
+ {
1043
+ name: 'winningDirection';
1044
+ type: {
1045
+ defined: {
1046
+ name: 'winningDirection';
1047
+ };
1048
+ };
1049
+ }
1050
+ ];
863
1051
  },
864
1052
  {
865
1053
  name: 'settleOrder';
@@ -1790,14 +1978,14 @@ export type TriadProtocol = {
1790
1978
  }
1791
1979
  ];
1792
1980
  accounts: [
1793
- {
1794
- name: 'feeVault';
1795
- discriminator: [192, 178, 69, 232, 58, 149, 157, 132];
1796
- },
1797
1981
  {
1798
1982
  name: 'market';
1799
1983
  discriminator: [219, 190, 213, 55, 0, 227, 198, 154];
1800
1984
  },
1985
+ {
1986
+ name: 'marketV2';
1987
+ discriminator: [27, 60, 50, 75, 191, 193, 86, 227];
1988
+ },
1801
1989
  {
1802
1990
  name: 'stakeV2';
1803
1991
  discriminator: [207, 98, 130, 13, 118, 181, 238, 47];
@@ -1828,6 +2016,10 @@ export type TriadProtocol = {
1828
2016
  }
1829
2017
  ];
1830
2018
  events: [
2019
+ {
2020
+ name: 'marketUpdate';
2021
+ discriminator: [170, 101, 124, 32, 249, 253, 251, 96];
2022
+ },
1831
2023
  {
1832
2024
  name: 'orderUpdate';
1833
2025
  discriminator: [97, 239, 148, 96, 83, 234, 245, 14];
@@ -1836,10 +2028,6 @@ export type TriadProtocol = {
1836
2028
  name: 'priceUpdate';
1837
2029
  discriminator: [222, 51, 180, 226, 165, 188, 203, 54];
1838
2030
  },
1839
- {
1840
- name: 'questionUpdate';
1841
- discriminator: [110, 108, 240, 86, 176, 226, 54, 113];
1842
- },
1843
2031
  {
1844
2032
  name: 'stakeRewards';
1845
2033
  discriminator: [236, 217, 227, 239, 6, 129, 188, 218];
@@ -2055,9 +2243,54 @@ export type TriadProtocol = {
2055
2243
  code: 6041;
2056
2244
  name: 'orderNotOpen';
2057
2245
  msg: 'Order not open';
2246
+ },
2247
+ {
2248
+ code: 6042;
2249
+ name: 'hasOpenedOrders';
2250
+ msg: 'Has opened orders';
2251
+ },
2252
+ {
2253
+ code: 6043;
2254
+ name: 'insufficientLiquidity';
2255
+ msg: 'Insufficient liquidity';
2256
+ },
2257
+ {
2258
+ code: 6044;
2259
+ name: 'marketNotResolved';
2260
+ msg: 'Market not resolved';
2261
+ },
2262
+ {
2263
+ code: 6045;
2264
+ name: 'marketAlreadyResolved';
2265
+ msg: 'Market already resolved';
2266
+ },
2267
+ {
2268
+ code: 6046;
2269
+ name: 'concurrentTransaction';
2270
+ msg: 'Concurrent transaction';
2058
2271
  }
2059
2272
  ];
2060
2273
  types: [
2274
+ {
2275
+ name: 'addLiquidityArgs';
2276
+ type: {
2277
+ kind: 'struct';
2278
+ fields: [
2279
+ {
2280
+ name: 'amount';
2281
+ type: 'u64';
2282
+ },
2283
+ {
2284
+ name: 'direction';
2285
+ type: {
2286
+ defined: {
2287
+ name: 'orderDirection';
2288
+ };
2289
+ };
2290
+ }
2291
+ ];
2292
+ };
2293
+ },
2061
2294
  {
2062
2295
  name: 'claimStakeRewardsArgs';
2063
2296
  type: {
@@ -2087,7 +2320,37 @@ export type TriadProtocol = {
2087
2320
  };
2088
2321
  },
2089
2322
  {
2090
- name: 'feeVault';
2323
+ name: 'initializeMarketArgs';
2324
+ type: {
2325
+ kind: 'struct';
2326
+ fields: [
2327
+ {
2328
+ name: 'name';
2329
+ type: 'string';
2330
+ },
2331
+ {
2332
+ name: 'marketId';
2333
+ type: 'u64';
2334
+ },
2335
+ {
2336
+ name: 'question';
2337
+ type: {
2338
+ array: ['u8', 80];
2339
+ };
2340
+ },
2341
+ {
2342
+ name: 'startTime';
2343
+ type: 'i64';
2344
+ },
2345
+ {
2346
+ name: 'endTime';
2347
+ type: 'i64';
2348
+ }
2349
+ ];
2350
+ };
2351
+ },
2352
+ {
2353
+ name: 'market';
2091
2354
  type: {
2092
2355
  kind: 'struct';
2093
2356
  fields: [
@@ -2100,80 +2363,153 @@ export type TriadProtocol = {
2100
2363
  type: 'pubkey';
2101
2364
  },
2102
2365
  {
2103
- name: 'market';
2104
- type: 'pubkey';
2366
+ name: 'marketId';
2367
+ docs: ['Unique identifier for the market'];
2368
+ type: 'u64';
2369
+ },
2370
+ {
2371
+ name: 'name';
2372
+ docs: ['The event being predicted (e.g., "tJUP/TRD")'];
2373
+ type: 'string';
2374
+ },
2375
+ {
2376
+ name: 'hypePrice';
2377
+ docs: [
2378
+ 'Current price for Hype outcome (0-1000000, representing 0 to 1 TRD)',
2379
+ '1000000 = 1 TRD, 500000 = 0.5 TRD, etc.'
2380
+ ];
2381
+ type: 'u64';
2382
+ },
2383
+ {
2384
+ name: 'flopPrice';
2385
+ docs: [
2386
+ 'Current price for Flop outcome (0-1000000, representing 0 to 1 TRD)'
2387
+ ];
2388
+ type: 'u64';
2389
+ },
2390
+ {
2391
+ name: 'hypeLiquidity';
2392
+ docs: ['Total liquidity for Hype (in TRD)'];
2393
+ type: 'u64';
2394
+ },
2395
+ {
2396
+ name: 'flopLiquidity';
2397
+ docs: ['Total liquidity for Flop (in TRD)'];
2398
+ type: 'u64';
2399
+ },
2400
+ {
2401
+ name: 'totalHypeShares';
2402
+ docs: ['Total number of Hype shares issued'];
2403
+ type: 'u64';
2404
+ },
2405
+ {
2406
+ name: 'totalFlopShares';
2407
+ docs: ['Total number of Flop shares issued'];
2408
+ type: 'u64';
2409
+ },
2410
+ {
2411
+ name: 'totalVolume';
2412
+ docs: ['Total trading volume (in TRD) for all resolutions'];
2413
+ type: 'u64';
2414
+ },
2415
+ {
2416
+ name: 'mint';
2417
+ docs: ['Mint $TRD token'];
2418
+ type: 'pubkey';
2419
+ },
2420
+ {
2421
+ name: 'ts';
2422
+ docs: ['Timestamp of the init'];
2423
+ type: 'i64';
2424
+ },
2425
+ {
2426
+ name: 'updateTs';
2427
+ type: 'i64';
2428
+ },
2429
+ {
2430
+ name: 'openOrdersCount';
2431
+ docs: ['Total number of open orders in this market'];
2432
+ type: 'u64';
2433
+ },
2434
+ {
2435
+ name: 'nextOrderId';
2436
+ docs: ['Next available order ID'];
2437
+ type: 'u64';
2438
+ },
2439
+ {
2440
+ name: 'feeBps';
2441
+ docs: ['Fees applied to trades (in basis points, e.g., 2.131% fee)'];
2442
+ type: 'u16';
2105
2443
  },
2106
2444
  {
2107
- name: 'deposited';
2108
- type: 'u64';
2445
+ name: 'feeVault';
2446
+ docs: ['Vault to Receive fees'];
2447
+ type: 'pubkey';
2109
2448
  },
2110
2449
  {
2111
- name: 'withdrawn';
2112
- type: 'u64';
2450
+ name: 'isActive';
2451
+ docs: ['Whether the market is currently active for trading'];
2452
+ type: 'bool';
2113
2453
  },
2114
2454
  {
2115
- name: 'netBalance';
2455
+ name: 'marketPrice';
2116
2456
  type: 'u64';
2117
2457
  },
2118
2458
  {
2119
- name: 'projectAvailable';
2120
- type: 'u64';
2459
+ name: 'previousResolvedQuestion';
2460
+ type: {
2461
+ defined: {
2462
+ name: 'resolvedQuestion';
2463
+ };
2464
+ };
2121
2465
  },
2122
2466
  {
2123
- name: 'projectClaimed';
2467
+ name: 'currentQuestionId';
2468
+ docs: [
2469
+ 'Index of the current week in the weekly_results array initialized with default values'
2470
+ ];
2124
2471
  type: 'u64';
2125
2472
  },
2126
2473
  {
2127
- name: 'nftHoldersAvailable';
2128
- type: 'u64';
2474
+ name: 'currentQuestionStart';
2475
+ type: 'i64';
2129
2476
  },
2130
2477
  {
2131
- name: 'nftHoldersClaimed';
2132
- type: 'u64';
2478
+ name: 'currentQuestionEnd';
2479
+ type: 'i64';
2133
2480
  },
2134
2481
  {
2135
- name: 'marketAvailable';
2136
- type: 'u64';
2482
+ name: 'currentQuestion';
2483
+ docs: ['The question or prediction topic for the current week'];
2484
+ type: {
2485
+ array: ['u8', 80];
2486
+ };
2137
2487
  },
2138
2488
  {
2139
- name: 'marketClaimed';
2489
+ name: 'liquidity';
2140
2490
  type: 'u64';
2141
2491
  },
2142
2492
  {
2143
2493
  name: 'padding';
2144
2494
  type: {
2145
- array: ['u8', 60];
2495
+ array: ['u8', 200];
2146
2496
  };
2147
2497
  }
2148
2498
  ];
2149
2499
  };
2150
2500
  },
2151
2501
  {
2152
- name: 'initializeMarketArgs';
2502
+ name: 'marketUpdate';
2153
2503
  type: {
2154
2504
  kind: 'struct';
2155
2505
  fields: [
2156
- {
2157
- name: 'name';
2158
- type: 'string';
2159
- },
2160
2506
  {
2161
2507
  name: 'marketId';
2162
2508
  type: 'u64';
2163
- }
2164
- ];
2165
- };
2166
- },
2167
- {
2168
- name: 'initializeQuestionArgs';
2169
- type: {
2170
- kind: 'struct';
2171
- fields: [
2509
+ },
2172
2510
  {
2173
2511
  name: 'question';
2174
- type: {
2175
- array: ['u8', 80];
2176
- };
2512
+ type: 'string';
2177
2513
  },
2178
2514
  {
2179
2515
  name: 'startTime';
@@ -2182,12 +2518,48 @@ export type TriadProtocol = {
2182
2518
  {
2183
2519
  name: 'endTime';
2184
2520
  type: 'i64';
2521
+ },
2522
+ {
2523
+ name: 'hypeLiquidity';
2524
+ type: 'u64';
2525
+ },
2526
+ {
2527
+ name: 'flopLiquidity';
2528
+ type: 'u64';
2529
+ },
2530
+ {
2531
+ name: 'winningDirection';
2532
+ type: {
2533
+ defined: {
2534
+ name: 'winningDirection';
2535
+ };
2536
+ };
2537
+ },
2538
+ {
2539
+ name: 'finalHypePrice';
2540
+ type: 'u64';
2541
+ },
2542
+ {
2543
+ name: 'finalFlopPrice';
2544
+ type: 'u64';
2545
+ },
2546
+ {
2547
+ name: 'timestamp';
2548
+ type: 'i64';
2549
+ },
2550
+ {
2551
+ name: 'totalHypeShares';
2552
+ type: 'u64';
2553
+ },
2554
+ {
2555
+ name: 'totalFlopShares';
2556
+ type: 'u64';
2185
2557
  }
2186
2558
  ];
2187
2559
  };
2188
2560
  },
2189
2561
  {
2190
- name: 'market';
2562
+ name: 'marketV2';
2191
2563
  type: {
2192
2564
  kind: 'struct';
2193
2565
  fields: [
@@ -2204,24 +2576,12 @@ export type TriadProtocol = {
2204
2576
  docs: ['Unique identifier for the market'];
2205
2577
  type: 'u64';
2206
2578
  },
2207
- {
2208
- name: 'name';
2209
- docs: ['The event being predicted (e.g., "tJUP/TRD")'];
2210
- type: 'string';
2211
- },
2212
2579
  {
2213
2580
  name: 'hypePrice';
2214
- docs: [
2215
- 'Current price for Hype outcome (0-1000000, representing 0 to 1 TRD)',
2216
- '1000000 = 1 TRD, 500000 = 0.5 TRD, etc.'
2217
- ];
2218
2581
  type: 'u64';
2219
2582
  },
2220
2583
  {
2221
2584
  name: 'flopPrice';
2222
- docs: [
2223
- 'Current price for Flop outcome (0-1000000, representing 0 to 1 TRD)'
2224
- ];
2225
2585
  type: 'u64';
2226
2586
  },
2227
2587
  {
@@ -2235,18 +2595,18 @@ export type TriadProtocol = {
2235
2595
  type: 'u64';
2236
2596
  },
2237
2597
  {
2238
- name: 'totalHypeShares';
2598
+ name: 'hypeShares';
2239
2599
  docs: ['Total number of Hype shares issued'];
2240
2600
  type: 'u64';
2241
2601
  },
2242
2602
  {
2243
- name: 'totalFlopShares';
2603
+ name: 'flopShares';
2244
2604
  docs: ['Total number of Flop shares issued'];
2245
2605
  type: 'u64';
2246
2606
  },
2247
2607
  {
2248
- name: 'totalVolume';
2249
- docs: ['Total trading volume (in TRD) for all resolutions'];
2608
+ name: 'volume';
2609
+ docs: ['Total trading volume (in TRD)'];
2250
2610
  type: 'u64';
2251
2611
  },
2252
2612
  {
@@ -2254,17 +2614,12 @@ export type TriadProtocol = {
2254
2614
  docs: ['Mint $TRD token'];
2255
2615
  type: 'pubkey';
2256
2616
  },
2257
- {
2258
- name: 'ts';
2259
- docs: ['Timestamp of the init'];
2260
- type: 'i64';
2261
- },
2262
2617
  {
2263
2618
  name: 'updateTs';
2264
2619
  type: 'i64';
2265
2620
  },
2266
2621
  {
2267
- name: 'openOrdersCount';
2622
+ name: 'openedOrders';
2268
2623
  docs: ['Total number of open orders in this market'];
2269
2624
  type: 'u64';
2270
2625
  },
@@ -2279,57 +2634,56 @@ export type TriadProtocol = {
2279
2634
  type: 'u16';
2280
2635
  },
2281
2636
  {
2282
- name: 'feeVault';
2283
- docs: ['Vault to Receive fees'];
2284
- type: 'pubkey';
2637
+ name: 'nftHoldersFeeAvailable';
2638
+ type: 'u64';
2285
2639
  },
2286
2640
  {
2287
- name: 'isActive';
2288
- docs: ['Whether the market is currently active for trading'];
2289
- type: 'bool';
2641
+ name: 'nftHoldersFeeClaimed';
2642
+ type: 'u64';
2290
2643
  },
2291
2644
  {
2292
- name: 'marketPrice';
2645
+ name: 'marketFeeAvailable';
2293
2646
  type: 'u64';
2294
2647
  },
2295
2648
  {
2296
- name: 'previousResolvedQuestion';
2297
- type: {
2298
- defined: {
2299
- name: 'resolvedQuestion';
2300
- };
2301
- };
2649
+ name: 'marketFeeClaimed';
2650
+ type: 'u64';
2302
2651
  },
2303
2652
  {
2304
- name: 'currentQuestionId';
2653
+ name: 'isActive';
2654
+ docs: ['Whether the market is currently active for trading'];
2655
+ type: 'bool';
2656
+ },
2657
+ {
2658
+ name: 'marketStart';
2305
2659
  docs: [
2306
2660
  'Index of the current week in the weekly_results array initialized with default values'
2307
2661
  ];
2308
- type: 'u64';
2309
- },
2310
- {
2311
- name: 'currentQuestionStart';
2312
2662
  type: 'i64';
2313
2663
  },
2314
2664
  {
2315
- name: 'currentQuestionEnd';
2665
+ name: 'marketEnd';
2316
2666
  type: 'i64';
2317
2667
  },
2318
2668
  {
2319
- name: 'currentQuestion';
2669
+ name: 'question';
2320
2670
  docs: ['The question or prediction topic for the current week'];
2321
2671
  type: {
2322
2672
  array: ['u8', 80];
2323
2673
  };
2324
2674
  },
2325
2675
  {
2326
- name: 'liquidity';
2327
- type: 'u64';
2676
+ name: 'winningDirection';
2677
+ type: {
2678
+ defined: {
2679
+ name: 'winningDirection';
2680
+ };
2681
+ };
2328
2682
  },
2329
2683
  {
2330
2684
  name: 'padding';
2331
2685
  type: {
2332
- array: ['u8', 200];
2686
+ array: ['u8', 100];
2333
2687
  };
2334
2688
  }
2335
2689
  ];
@@ -2620,10 +2974,6 @@ export type TriadProtocol = {
2620
2974
  name: 'flopPrice';
2621
2975
  type: 'u64';
2622
2976
  },
2623
- {
2624
- name: 'marketPrice';
2625
- type: 'u64';
2626
- },
2627
2977
  {
2628
2978
  name: 'direction';
2629
2979
  type: {
@@ -2635,104 +2985,6 @@ export type TriadProtocol = {
2635
2985
  {
2636
2986
  name: 'timestamp';
2637
2987
  type: 'i64';
2638
- },
2639
- {
2640
- name: 'comment';
2641
- type: {
2642
- option: {
2643
- array: ['u8', 64];
2644
- };
2645
- };
2646
- }
2647
- ];
2648
- };
2649
- },
2650
- {
2651
- name: 'questionStatus';
2652
- type: {
2653
- kind: 'enum';
2654
- variants: [
2655
- {
2656
- name: 'resolved';
2657
- },
2658
- {
2659
- name: 'unresolved';
2660
- }
2661
- ];
2662
- };
2663
- },
2664
- {
2665
- name: 'questionUpdate';
2666
- type: {
2667
- kind: 'struct';
2668
- fields: [
2669
- {
2670
- name: 'marketId';
2671
- type: 'u64';
2672
- },
2673
- {
2674
- name: 'questionId';
2675
- type: 'u64';
2676
- },
2677
- {
2678
- name: 'question';
2679
- type: 'string';
2680
- },
2681
- {
2682
- name: 'startTime';
2683
- type: 'i64';
2684
- },
2685
- {
2686
- name: 'endTime';
2687
- type: 'i64';
2688
- },
2689
- {
2690
- name: 'hypeLiquidity';
2691
- type: 'u64';
2692
- },
2693
- {
2694
- name: 'flopLiquidity';
2695
- type: 'u64';
2696
- },
2697
- {
2698
- name: 'winningDirection';
2699
- type: {
2700
- defined: {
2701
- name: 'winningDirection';
2702
- };
2703
- };
2704
- },
2705
- {
2706
- name: 'marketPrice';
2707
- type: 'u64';
2708
- },
2709
- {
2710
- name: 'finalHypePrice';
2711
- type: 'u64';
2712
- },
2713
- {
2714
- name: 'finalFlopPrice';
2715
- type: 'u64';
2716
- },
2717
- {
2718
- name: 'timestamp';
2719
- type: 'i64';
2720
- },
2721
- {
2722
- name: 'totalHypeShares';
2723
- type: 'u64';
2724
- },
2725
- {
2726
- name: 'totalFlopShares';
2727
- type: 'u64';
2728
- },
2729
- {
2730
- name: 'status';
2731
- type: {
2732
- defined: {
2733
- name: 'questionStatus';
2734
- };
2735
- };
2736
2988
  }
2737
2989
  ];
2738
2990
  };
@@ -3065,7 +3317,7 @@ export type TriadProtocol = {
3065
3317
  };
3066
3318
  },
3067
3319
  {
3068
- name: 'status';
3320
+ name: 'isLocked';
3069
3321
  type: {
3070
3322
  option: 'bool';
3071
3323
  };
@@ -3315,9 +3567,6 @@ export type TriadProtocol = {
3315
3567
  },
3316
3568
  {
3317
3569
  name: 'flop';
3318
- },
3319
- {
3320
- name: 'draw';
3321
3570
  }
3322
3571
  ];
3323
3572
  };