proof-of-take-sdk 2.0.0 → 3.0.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.
@@ -109,6 +109,10 @@
109
109
  108,
110
110
  116
111
111
  ]
112
+ },
113
+ {
114
+ "kind": "arg",
115
+ "path": "season_number"
112
116
  }
113
117
  ]
114
118
  }
@@ -288,6 +292,10 @@
288
292
  108,
289
293
  116
290
294
  ]
295
+ },
296
+ {
297
+ "kind": "arg",
298
+ "path": "season_number"
291
299
  }
292
300
  ]
293
301
  }
@@ -328,6 +336,156 @@
328
336
  }
329
337
  ]
330
338
  },
339
+ {
340
+ "name": "close_miztake",
341
+ "discriminator": [
342
+ 249,
343
+ 50,
344
+ 28,
345
+ 114,
346
+ 51,
347
+ 45,
348
+ 169,
349
+ 84
350
+ ],
351
+ "accounts": [
352
+ {
353
+ "name": "admin",
354
+ "writable": true,
355
+ "signer": true
356
+ },
357
+ {
358
+ "name": "account_to_close",
359
+ "writable": true
360
+ }
361
+ ],
362
+ "args": []
363
+ },
364
+ {
365
+ "name": "close_referral_penalty_claim",
366
+ "discriminator": [
367
+ 196,
368
+ 32,
369
+ 15,
370
+ 113,
371
+ 133,
372
+ 159,
373
+ 218,
374
+ 152
375
+ ],
376
+ "accounts": [
377
+ {
378
+ "name": "admin",
379
+ "writable": true,
380
+ "signer": true
381
+ },
382
+ {
383
+ "name": "account_to_close",
384
+ "writable": true
385
+ }
386
+ ],
387
+ "args": []
388
+ },
389
+ {
390
+ "name": "close_reward_window",
391
+ "discriminator": [
392
+ 246,
393
+ 102,
394
+ 43,
395
+ 101,
396
+ 155,
397
+ 88,
398
+ 254,
399
+ 34
400
+ ],
401
+ "accounts": [
402
+ {
403
+ "name": "admin",
404
+ "writable": true,
405
+ "signer": true
406
+ },
407
+ {
408
+ "name": "account_to_close",
409
+ "writable": true
410
+ }
411
+ ],
412
+ "args": []
413
+ },
414
+ {
415
+ "name": "close_season_membership",
416
+ "discriminator": [
417
+ 198,
418
+ 108,
419
+ 149,
420
+ 249,
421
+ 180,
422
+ 151,
423
+ 192,
424
+ 56
425
+ ],
426
+ "accounts": [
427
+ {
428
+ "name": "admin",
429
+ "writable": true,
430
+ "signer": true
431
+ },
432
+ {
433
+ "name": "account_to_close",
434
+ "writable": true
435
+ }
436
+ ],
437
+ "args": []
438
+ },
439
+ {
440
+ "name": "close_user_stats",
441
+ "discriminator": [
442
+ 179,
443
+ 188,
444
+ 173,
445
+ 6,
446
+ 6,
447
+ 208,
448
+ 32,
449
+ 211
450
+ ],
451
+ "accounts": [
452
+ {
453
+ "name": "admin",
454
+ "writable": true,
455
+ "signer": true
456
+ },
457
+ {
458
+ "name": "account_to_close",
459
+ "writable": true
460
+ }
461
+ ],
462
+ "args": []
463
+ },
464
+ {
465
+ "name": "close_user_window_participation",
466
+ "discriminator": [
467
+ 133,
468
+ 246,
469
+ 25,
470
+ 112,
471
+ 97,
472
+ 20,
473
+ 7,
474
+ 77
475
+ ],
476
+ "accounts": [
477
+ {
478
+ "name": "admin",
479
+ "writable": true,
480
+ "signer": true
481
+ },
482
+ {
483
+ "name": "account_to_close",
484
+ "writable": true
485
+ }
486
+ ],
487
+ "args": []
488
+ },
331
489
  {
332
490
  "name": "confirmed_post_on_x",
333
491
  "discriminator": [
@@ -757,6 +915,120 @@
757
915
  }
758
916
  ]
759
917
  },
918
+ {
919
+ "name": "finalize_empty_window",
920
+ "discriminator": [
921
+ 162,
922
+ 51,
923
+ 233,
924
+ 160,
925
+ 223,
926
+ 187,
927
+ 110,
928
+ 249
929
+ ],
930
+ "accounts": [
931
+ {
932
+ "name": "season_settings",
933
+ "pda": {
934
+ "seeds": [
935
+ {
936
+ "kind": "const",
937
+ "value": [
938
+ 115,
939
+ 101,
940
+ 97,
941
+ 115,
942
+ 111,
943
+ 110,
944
+ 95,
945
+ 115,
946
+ 101,
947
+ 116,
948
+ 116,
949
+ 105,
950
+ 110,
951
+ 103,
952
+ 115
953
+ ]
954
+ }
955
+ ]
956
+ }
957
+ },
958
+ {
959
+ "name": "season",
960
+ "writable": true,
961
+ "pda": {
962
+ "seeds": [
963
+ {
964
+ "kind": "const",
965
+ "value": [
966
+ 115,
967
+ 101,
968
+ 97,
969
+ 115,
970
+ 111,
971
+ 110
972
+ ]
973
+ },
974
+ {
975
+ "kind": "arg",
976
+ "path": "season_number"
977
+ }
978
+ ]
979
+ }
980
+ },
981
+ {
982
+ "name": "reward_window",
983
+ "writable": true,
984
+ "pda": {
985
+ "seeds": [
986
+ {
987
+ "kind": "const",
988
+ "value": [
989
+ 114,
990
+ 101,
991
+ 119,
992
+ 97,
993
+ 114,
994
+ 100,
995
+ 95,
996
+ 119,
997
+ 105,
998
+ 110,
999
+ 100,
1000
+ 111,
1001
+ 119
1002
+ ]
1003
+ },
1004
+ {
1005
+ "kind": "arg",
1006
+ "path": "season_number"
1007
+ },
1008
+ {
1009
+ "kind": "arg",
1010
+ "path": "window_number"
1011
+ }
1012
+ ]
1013
+ }
1014
+ },
1015
+ {
1016
+ "name": "admin",
1017
+ "writable": true,
1018
+ "signer": true
1019
+ }
1020
+ ],
1021
+ "args": [
1022
+ {
1023
+ "name": "season_number",
1024
+ "type": "u64"
1025
+ },
1026
+ {
1027
+ "name": "window_number",
1028
+ "type": "u64"
1029
+ }
1030
+ ]
1031
+ },
760
1032
  {
761
1033
  "name": "initialize_escrow_vault",
762
1034
  "discriminator": [
@@ -798,6 +1070,10 @@
798
1070
  108,
799
1071
  116
800
1072
  ]
1073
+ },
1074
+ {
1075
+ "kind": "arg",
1076
+ "path": "season_number"
801
1077
  }
802
1078
  ]
803
1079
  }
@@ -820,7 +1096,12 @@
820
1096
  "address": "11111111111111111111111111111111"
821
1097
  }
822
1098
  ],
823
- "args": []
1099
+ "args": [
1100
+ {
1101
+ "name": "season_number",
1102
+ "type": "u64"
1103
+ }
1104
+ ]
824
1105
  },
825
1106
  {
826
1107
  "name": "initialize_season_settings",
@@ -921,6 +1202,10 @@
921
1202
  108,
922
1203
  116
923
1204
  ]
1205
+ },
1206
+ {
1207
+ "kind": "arg",
1208
+ "path": "season_number"
924
1209
  }
925
1210
  ]
926
1211
  }
@@ -946,7 +1231,12 @@
946
1231
  "address": "11111111111111111111111111111111"
947
1232
  }
948
1233
  ],
949
- "args": []
1234
+ "args": [
1235
+ {
1236
+ "name": "season_number",
1237
+ "type": "u64"
1238
+ }
1239
+ ]
950
1240
  },
951
1241
  {
952
1242
  "name": "initialize_statistics",
@@ -993,38 +1283,221 @@
993
1283
  }
994
1284
  },
995
1285
  {
996
- "name": "admin",
997
- "docs": [
998
- "ROOT ADMIN account (ADMIN_PUBLIC_KEY - immutable)",
999
- "Required for one-time statistics initialization"
1000
- ],
1001
- "signer": true
1286
+ "name": "admin",
1287
+ "docs": [
1288
+ "ROOT ADMIN account (ADMIN_PUBLIC_KEY - immutable)",
1289
+ "Required for one-time statistics initialization"
1290
+ ],
1291
+ "signer": true
1292
+ },
1293
+ {
1294
+ "name": "payer",
1295
+ "writable": true,
1296
+ "signer": true
1297
+ },
1298
+ {
1299
+ "name": "system_program",
1300
+ "address": "11111111111111111111111111111111"
1301
+ }
1302
+ ],
1303
+ "args": []
1304
+ },
1305
+ {
1306
+ "name": "join_season",
1307
+ "discriminator": [
1308
+ 36,
1309
+ 202,
1310
+ 202,
1311
+ 158,
1312
+ 82,
1313
+ 34,
1314
+ 248,
1315
+ 231
1316
+ ],
1317
+ "accounts": [
1318
+ {
1319
+ "name": "season_settings",
1320
+ "writable": true,
1321
+ "pda": {
1322
+ "seeds": [
1323
+ {
1324
+ "kind": "const",
1325
+ "value": [
1326
+ 115,
1327
+ 101,
1328
+ 97,
1329
+ 115,
1330
+ 111,
1331
+ 110,
1332
+ 95,
1333
+ 115,
1334
+ 101,
1335
+ 116,
1336
+ 116,
1337
+ 105,
1338
+ 110,
1339
+ 103,
1340
+ 115
1341
+ ]
1342
+ }
1343
+ ]
1344
+ }
1345
+ },
1346
+ {
1347
+ "name": "season",
1348
+ "writable": true,
1349
+ "pda": {
1350
+ "seeds": [
1351
+ {
1352
+ "kind": "const",
1353
+ "value": [
1354
+ 115,
1355
+ 101,
1356
+ 97,
1357
+ 115,
1358
+ 111,
1359
+ 110
1360
+ ]
1361
+ },
1362
+ {
1363
+ "kind": "arg",
1364
+ "path": "season_number"
1365
+ }
1366
+ ]
1367
+ }
1368
+ },
1369
+ {
1370
+ "name": "season_membership",
1371
+ "writable": true
1372
+ },
1373
+ {
1374
+ "name": "season_deposit_vault",
1375
+ "writable": true,
1376
+ "pda": {
1377
+ "seeds": [
1378
+ {
1379
+ "kind": "const",
1380
+ "value": [
1381
+ 115,
1382
+ 101,
1383
+ 97,
1384
+ 115,
1385
+ 111,
1386
+ 110,
1387
+ 95,
1388
+ 100,
1389
+ 101,
1390
+ 112,
1391
+ 111,
1392
+ 115,
1393
+ 105,
1394
+ 116,
1395
+ 95,
1396
+ 118,
1397
+ 97,
1398
+ 117,
1399
+ 108,
1400
+ 116
1401
+ ]
1402
+ },
1403
+ {
1404
+ "kind": "arg",
1405
+ "path": "season_number"
1406
+ }
1407
+ ]
1408
+ }
1409
+ },
1410
+ {
1411
+ "name": "season_escrow_vault",
1412
+ "writable": true,
1413
+ "pda": {
1414
+ "seeds": [
1415
+ {
1416
+ "kind": "const",
1417
+ "value": [
1418
+ 115,
1419
+ 101,
1420
+ 97,
1421
+ 115,
1422
+ 111,
1423
+ 110,
1424
+ 95,
1425
+ 101,
1426
+ 115,
1427
+ 99,
1428
+ 114,
1429
+ 111,
1430
+ 119,
1431
+ 95,
1432
+ 118,
1433
+ 97,
1434
+ 117,
1435
+ 108,
1436
+ 116
1437
+ ]
1438
+ },
1439
+ {
1440
+ "kind": "arg",
1441
+ "path": "season_number"
1442
+ }
1443
+ ]
1444
+ }
1445
+ },
1446
+ {
1447
+ "name": "mizd_mint",
1448
+ "address": "mizdS9fDNUKWZcXBeRhJoJQHJJmsTeF4fFRyPdXWv99"
1002
1449
  },
1003
1450
  {
1004
- "name": "payer",
1451
+ "name": "user_token_account",
1452
+ "writable": true
1453
+ },
1454
+ {
1455
+ "name": "user",
1005
1456
  "writable": true,
1006
1457
  "signer": true
1007
1458
  },
1459
+ {
1460
+ "name": "token_program",
1461
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
1462
+ },
1008
1463
  {
1009
1464
  "name": "system_program",
1010
1465
  "address": "11111111111111111111111111111111"
1011
1466
  }
1012
1467
  ],
1013
- "args": []
1468
+ "args": [
1469
+ {
1470
+ "name": "season_number",
1471
+ "type": "u64"
1472
+ },
1473
+ {
1474
+ "name": "tier",
1475
+ "type": "u8"
1476
+ },
1477
+ {
1478
+ "name": "referrer",
1479
+ "type": "pubkey"
1480
+ }
1481
+ ]
1014
1482
  },
1015
1483
  {
1016
- "name": "join_season",
1484
+ "name": "reset_program_state",
1017
1485
  "discriminator": [
1018
- 36,
1019
- 202,
1020
- 202,
1021
- 158,
1022
- 82,
1023
- 34,
1024
- 248,
1025
- 231
1486
+ 70,
1487
+ 58,
1488
+ 252,
1489
+ 47,
1490
+ 175,
1491
+ 124,
1492
+ 255,
1493
+ 43
1026
1494
  ],
1027
1495
  "accounts": [
1496
+ {
1497
+ "name": "admin",
1498
+ "writable": true,
1499
+ "signer": true
1500
+ },
1028
1501
  {
1029
1502
  "name": "season_settings",
1030
1503
  "writable": true,
@@ -1077,8 +1550,35 @@
1077
1550
  }
1078
1551
  },
1079
1552
  {
1080
- "name": "season_membership",
1081
- "writable": true
1553
+ "name": "miztake_statistics",
1554
+ "writable": true,
1555
+ "pda": {
1556
+ "seeds": [
1557
+ {
1558
+ "kind": "const",
1559
+ "value": [
1560
+ 109,
1561
+ 105,
1562
+ 122,
1563
+ 116,
1564
+ 97,
1565
+ 107,
1566
+ 101,
1567
+ 95,
1568
+ 115,
1569
+ 116,
1570
+ 97,
1571
+ 116,
1572
+ 105,
1573
+ 115,
1574
+ 116,
1575
+ 105,
1576
+ 99,
1577
+ 115
1578
+ ]
1579
+ }
1580
+ ]
1581
+ }
1082
1582
  },
1083
1583
  {
1084
1584
  "name": "season_deposit_vault",
@@ -1109,6 +1609,10 @@
1109
1609
  108,
1110
1610
  116
1111
1611
  ]
1612
+ },
1613
+ {
1614
+ "kind": "arg",
1615
+ "path": "season_number"
1112
1616
  }
1113
1617
  ]
1114
1618
  }
@@ -1141,6 +1645,10 @@
1141
1645
  108,
1142
1646
  116
1143
1647
  ]
1648
+ },
1649
+ {
1650
+ "kind": "arg",
1651
+ "path": "season_number"
1144
1652
  }
1145
1653
  ]
1146
1654
  }
@@ -1150,35 +1658,18 @@
1150
1658
  "address": "mizdS9fDNUKWZcXBeRhJoJQHJJmsTeF4fFRyPdXWv99"
1151
1659
  },
1152
1660
  {
1153
- "name": "user_token_account",
1661
+ "name": "destination_token_account",
1154
1662
  "writable": true
1155
1663
  },
1156
- {
1157
- "name": "user",
1158
- "writable": true,
1159
- "signer": true
1160
- },
1161
1664
  {
1162
1665
  "name": "token_program",
1163
1666
  "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
1164
- },
1165
- {
1166
- "name": "system_program",
1167
- "address": "11111111111111111111111111111111"
1168
1667
  }
1169
1668
  ],
1170
1669
  "args": [
1171
1670
  {
1172
1671
  "name": "season_number",
1173
1672
  "type": "u64"
1174
- },
1175
- {
1176
- "name": "tier",
1177
- "type": "u8"
1178
- },
1179
- {
1180
- "name": "referrer",
1181
- "type": "pubkey"
1182
1673
  }
1183
1674
  ]
1184
1675
  },
@@ -1536,6 +2027,11 @@
1536
2027
  108,
1537
2028
  116
1538
2029
  ]
2030
+ },
2031
+ {
2032
+ "kind": "account",
2033
+ "path": "season_membership.season_number",
2034
+ "account": "SeasonMembership"
1539
2035
  }
1540
2036
  ]
1541
2037
  }
@@ -1568,6 +2064,11 @@
1568
2064
  108,
1569
2065
  116
1570
2066
  ]
2067
+ },
2068
+ {
2069
+ "kind": "account",
2070
+ "path": "season_membership.season_number",
2071
+ "account": "SeasonMembership"
1571
2072
  }
1572
2073
  ]
1573
2074
  }
@@ -1595,6 +2096,135 @@
1595
2096
  "type": "u8"
1596
2097
  }
1597
2098
  ]
2099
+ },
2100
+ {
2101
+ "name": "withdraw_unallocated_funds",
2102
+ "discriminator": [
2103
+ 51,
2104
+ 240,
2105
+ 200,
2106
+ 162,
2107
+ 132,
2108
+ 181,
2109
+ 121,
2110
+ 255
2111
+ ],
2112
+ "accounts": [
2113
+ {
2114
+ "name": "season_settings",
2115
+ "pda": {
2116
+ "seeds": [
2117
+ {
2118
+ "kind": "const",
2119
+ "value": [
2120
+ 115,
2121
+ 101,
2122
+ 97,
2123
+ 115,
2124
+ 111,
2125
+ 110,
2126
+ 95,
2127
+ 115,
2128
+ 101,
2129
+ 116,
2130
+ 116,
2131
+ 105,
2132
+ 110,
2133
+ 103,
2134
+ 115
2135
+ ]
2136
+ }
2137
+ ]
2138
+ }
2139
+ },
2140
+ {
2141
+ "name": "season",
2142
+ "writable": true,
2143
+ "pda": {
2144
+ "seeds": [
2145
+ {
2146
+ "kind": "const",
2147
+ "value": [
2148
+ 115,
2149
+ 101,
2150
+ 97,
2151
+ 115,
2152
+ 111,
2153
+ 110
2154
+ ]
2155
+ },
2156
+ {
2157
+ "kind": "arg",
2158
+ "path": "season_number"
2159
+ }
2160
+ ]
2161
+ }
2162
+ },
2163
+ {
2164
+ "name": "season_deposit_vault",
2165
+ "writable": true,
2166
+ "pda": {
2167
+ "seeds": [
2168
+ {
2169
+ "kind": "const",
2170
+ "value": [
2171
+ 115,
2172
+ 101,
2173
+ 97,
2174
+ 115,
2175
+ 111,
2176
+ 110,
2177
+ 95,
2178
+ 100,
2179
+ 101,
2180
+ 112,
2181
+ 111,
2182
+ 115,
2183
+ 105,
2184
+ 116,
2185
+ 95,
2186
+ 118,
2187
+ 97,
2188
+ 117,
2189
+ 108,
2190
+ 116
2191
+ ]
2192
+ },
2193
+ {
2194
+ "kind": "arg",
2195
+ "path": "season_number"
2196
+ }
2197
+ ]
2198
+ }
2199
+ },
2200
+ {
2201
+ "name": "mizd_mint",
2202
+ "address": "mizdS9fDNUKWZcXBeRhJoJQHJJmsTeF4fFRyPdXWv99"
2203
+ },
2204
+ {
2205
+ "name": "destination_token_account",
2206
+ "writable": true
2207
+ },
2208
+ {
2209
+ "name": "admin",
2210
+ "writable": true,
2211
+ "signer": true
2212
+ },
2213
+ {
2214
+ "name": "token_program",
2215
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
2216
+ }
2217
+ ],
2218
+ "args": [
2219
+ {
2220
+ "name": "season_number",
2221
+ "type": "u64"
2222
+ },
2223
+ {
2224
+ "name": "amount",
2225
+ "type": "u64"
2226
+ }
2227
+ ]
1598
2228
  }
1599
2229
  ],
1600
2230
  "accounts": [
@@ -2069,6 +2699,26 @@
2069
2699
  "code": 6038,
2070
2700
  "name": "ReferralPenaltyNoMissedPenalty",
2071
2701
  "msg": "Referred user posted successfully (no penalty to claim)"
2702
+ },
2703
+ {
2704
+ "code": 6039,
2705
+ "name": "WindowAlreadyFinalized",
2706
+ "msg": "Window is already finalized"
2707
+ },
2708
+ {
2709
+ "code": 6040,
2710
+ "name": "WindowNotEmpty",
2711
+ "msg": "Window is not empty (has successful posters)"
2712
+ },
2713
+ {
2714
+ "code": 6041,
2715
+ "name": "CalculationError",
2716
+ "msg": "Calculation error"
2717
+ },
2718
+ {
2719
+ "code": 6042,
2720
+ "name": "InsufficientFunds",
2721
+ "msg": "Insufficient funds"
2072
2722
  }
2073
2723
  ],
2074
2724
  "types": [
@@ -2668,6 +3318,21 @@
2668
3318
  ],
2669
3319
  "type": "u64"
2670
3320
  },
3321
+ {
3322
+ "name": "total_unallocated_funds",
3323
+ "docs": [
3324
+ "Total treasury-unallocated funds accumulated this season.",
3325
+ "",
3326
+ "IMPORTANT: this tracks ONLY amounts that are NOT claimable by users/referrers/admin via other",
3327
+ "claim flows. Concretely, it represents:",
3328
+ "- the remainder from the 80% winners pool due to integer division, and",
3329
+ "- for empty windows (0 successful posters), the full 80% winners pool",
3330
+ "",
3331
+ "The reserved 20% pool is still claimable via `claim_referral_penalty_for_window` and is NOT",
3332
+ "included here (so it cannot be swept by `withdraw_unallocated_funds`)."
3333
+ ],
3334
+ "type": "u64"
3335
+ },
2671
3336
  {
2672
3337
  "name": "bump",
2673
3338
  "docs": [