@streamflow/distributor 8.0.0-alpha.p284.726ba98 → 8.0.0-alpha.p287.25d0c28

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.
@@ -325,6 +325,1316 @@ function setAdmin(accounts, programId = PROGRAM_ID) {
325
325
  return ix;
326
326
  }
327
327
 
328
+ // solana/descriptor/idl/merkle_distributor.json
329
+ var merkle_distributor_default = {
330
+ address: "MErKy6nZVoVAkryxAejJz2juifQ4ArgLgHmaJCQkU7N",
331
+ metadata: {
332
+ name: "merkle_distributor",
333
+ version: "1.5.0",
334
+ spec: "0.1.0",
335
+ description: "A Solana program for distributing tokens according to a Merkle root.",
336
+ repository: "https://github.com/streamflow-finance/distributor"
337
+ },
338
+ instructions: [
339
+ {
340
+ name: "_expose_claim",
341
+ discriminator: [103, 233, 83, 69, 115, 199, 128, 249],
342
+ accounts: [
343
+ {
344
+ name: "distributor",
345
+ docs: ["The [MerkleDistributor]."]
346
+ },
347
+ {
348
+ name: "claim_status",
349
+ docs: ["Claim Status PDA"],
350
+ optional: true,
351
+ pda: {
352
+ seeds: [
353
+ {
354
+ kind: "const",
355
+ value: [67, 108, 97, 105, 109, 83, 116, 97, 116, 117, 115]
356
+ },
357
+ {
358
+ kind: "account",
359
+ path: "claimant"
360
+ },
361
+ {
362
+ kind: "account",
363
+ path: "distributor"
364
+ }
365
+ ]
366
+ }
367
+ },
368
+ {
369
+ name: "compressed_claim_status",
370
+ docs: ["Compress Claim Status PDA"],
371
+ optional: true,
372
+ pda: {
373
+ seeds: [
374
+ {
375
+ kind: "const",
376
+ value: [67, 108, 97, 105, 109, 83, 116, 97, 116, 117, 115]
377
+ },
378
+ {
379
+ kind: "account",
380
+ path: "claimant"
381
+ },
382
+ {
383
+ kind: "account",
384
+ path: "distributor"
385
+ }
386
+ ]
387
+ }
388
+ },
389
+ {
390
+ name: "claimant",
391
+ docs: ["Who is claiming the tokens."],
392
+ signer: true
393
+ }
394
+ ],
395
+ args: []
396
+ },
397
+ {
398
+ name: "claim_locked",
399
+ discriminator: [34, 206, 181, 23, 11, 207, 147, 90],
400
+ accounts: [
401
+ {
402
+ name: "distributor",
403
+ docs: ["The [MerkleDistributor]."],
404
+ writable: true
405
+ },
406
+ {
407
+ name: "claim_status",
408
+ writable: true,
409
+ pda: {
410
+ seeds: [
411
+ {
412
+ kind: "const",
413
+ value: [67, 108, 97, 105, 109, 83, 116, 97, 116, 117, 115]
414
+ },
415
+ {
416
+ kind: "account",
417
+ path: "claimant"
418
+ },
419
+ {
420
+ kind: "account",
421
+ path: "distributor"
422
+ }
423
+ ]
424
+ }
425
+ },
426
+ {
427
+ name: "from",
428
+ docs: ["Distributor ATA containing the tokens to distribute."],
429
+ writable: true,
430
+ pda: {
431
+ seeds: [
432
+ {
433
+ kind: "account",
434
+ path: "distributor"
435
+ },
436
+ {
437
+ kind: "account",
438
+ path: "token_program"
439
+ },
440
+ {
441
+ kind: "account",
442
+ path: "distributor.mint",
443
+ account: "MerkleDistributor"
444
+ }
445
+ ],
446
+ program: {
447
+ kind: "const",
448
+ value: [
449
+ 140,
450
+ 151,
451
+ 37,
452
+ 143,
453
+ 78,
454
+ 36,
455
+ 137,
456
+ 241,
457
+ 187,
458
+ 61,
459
+ 16,
460
+ 41,
461
+ 20,
462
+ 142,
463
+ 13,
464
+ 131,
465
+ 11,
466
+ 90,
467
+ 19,
468
+ 153,
469
+ 218,
470
+ 255,
471
+ 16,
472
+ 132,
473
+ 4,
474
+ 142,
475
+ 123,
476
+ 216,
477
+ 219,
478
+ 233,
479
+ 248,
480
+ 89
481
+ ]
482
+ }
483
+ }
484
+ },
485
+ {
486
+ name: "to",
487
+ docs: [
488
+ "Account to send the claimed tokens to.",
489
+ "Claimant must sign the transaction and can only claim on behalf of themself"
490
+ ],
491
+ writable: true
492
+ },
493
+ {
494
+ name: "claimant",
495
+ docs: ["Who is claiming the tokens."],
496
+ writable: true,
497
+ signer: true
498
+ },
499
+ {
500
+ name: "mint",
501
+ docs: ["The mint to claim."],
502
+ relations: ["distributor"]
503
+ },
504
+ {
505
+ name: "token_program",
506
+ docs: ["SPL [Token] program."]
507
+ },
508
+ {
509
+ name: "event_authority",
510
+ pda: {
511
+ seeds: [
512
+ {
513
+ kind: "const",
514
+ value: [95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121]
515
+ }
516
+ ]
517
+ }
518
+ },
519
+ {
520
+ name: "program"
521
+ }
522
+ ],
523
+ args: []
524
+ },
525
+ {
526
+ name: "clawback",
527
+ discriminator: [111, 92, 142, 79, 33, 234, 82, 27],
528
+ accounts: [
529
+ {
530
+ name: "distributor",
531
+ docs: ["The [MerkleDistributor]."],
532
+ writable: true
533
+ },
534
+ {
535
+ name: "from",
536
+ docs: ["Distributor ATA containing the tokens to distribute."],
537
+ writable: true
538
+ },
539
+ {
540
+ name: "to",
541
+ docs: ["The Clawback token account."],
542
+ writable: true
543
+ },
544
+ {
545
+ name: "admin",
546
+ docs: ["Only Admin can trigger the clawback of funds"],
547
+ writable: true,
548
+ signer: true
549
+ },
550
+ {
551
+ name: "mint"
552
+ },
553
+ {
554
+ name: "system_program",
555
+ docs: ["The [System] program."],
556
+ address: "11111111111111111111111111111111"
557
+ },
558
+ {
559
+ name: "token_program",
560
+ docs: ["SPL [Token] program."]
561
+ }
562
+ ],
563
+ args: []
564
+ },
565
+ {
566
+ name: "close_claim",
567
+ discriminator: [42, 177, 165, 35, 213, 179, 211, 19],
568
+ accounts: [
569
+ {
570
+ name: "distributor",
571
+ docs: ["The [MerkleDistributor]."],
572
+ writable: true
573
+ },
574
+ {
575
+ name: "admin_or_claimant",
576
+ docs: ["Admin signer"],
577
+ writable: true,
578
+ signer: true
579
+ },
580
+ {
581
+ name: "claimant",
582
+ writable: true
583
+ },
584
+ {
585
+ name: "claim_status",
586
+ writable: true,
587
+ pda: {
588
+ seeds: [
589
+ {
590
+ kind: "const",
591
+ value: [67, 108, 97, 105, 109, 83, 116, 97, 116, 117, 115]
592
+ },
593
+ {
594
+ kind: "account",
595
+ path: "claimant"
596
+ },
597
+ {
598
+ kind: "account",
599
+ path: "distributor"
600
+ }
601
+ ]
602
+ }
603
+ },
604
+ {
605
+ name: "system_program",
606
+ docs: ["The [System] program."],
607
+ address: "11111111111111111111111111111111"
608
+ },
609
+ {
610
+ name: "event_authority",
611
+ pda: {
612
+ seeds: [
613
+ {
614
+ kind: "const",
615
+ value: [95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121]
616
+ }
617
+ ]
618
+ }
619
+ },
620
+ {
621
+ name: "program"
622
+ }
623
+ ],
624
+ args: [
625
+ {
626
+ name: "amount_unlocked",
627
+ type: {
628
+ option: "u64"
629
+ }
630
+ },
631
+ {
632
+ name: "amount_locked",
633
+ type: {
634
+ option: "u64"
635
+ }
636
+ },
637
+ {
638
+ name: "proof",
639
+ type: {
640
+ option: {
641
+ vec: {
642
+ array: ["u8", 32]
643
+ }
644
+ }
645
+ }
646
+ }
647
+ ]
648
+ },
649
+ {
650
+ name: "compress_claim",
651
+ discriminator: [219, 45, 247, 134, 71, 119, 125, 89],
652
+ accounts: [
653
+ {
654
+ name: "distributor",
655
+ docs: ["The [MerkleDistributor]."],
656
+ writable: true
657
+ },
658
+ {
659
+ name: "claim_status",
660
+ writable: true,
661
+ pda: {
662
+ seeds: [
663
+ {
664
+ kind: "const",
665
+ value: [67, 108, 97, 105, 109, 83, 116, 97, 116, 117, 115]
666
+ },
667
+ {
668
+ kind: "account",
669
+ path: "claimant"
670
+ },
671
+ {
672
+ kind: "account",
673
+ path: "distributor"
674
+ }
675
+ ]
676
+ }
677
+ },
678
+ {
679
+ name: "signer",
680
+ docs: ["Signer account"],
681
+ writable: true,
682
+ signer: true
683
+ },
684
+ {
685
+ name: "claimant"
686
+ },
687
+ {
688
+ name: "system_program",
689
+ docs: ["The [System] program."],
690
+ address: "11111111111111111111111111111111"
691
+ }
692
+ ],
693
+ args: []
694
+ },
695
+ {
696
+ name: "new_claim",
697
+ discriminator: [78, 177, 98, 123, 210, 21, 187, 83],
698
+ accounts: [
699
+ {
700
+ name: "distributor",
701
+ docs: ["The [MerkleDistributor]."],
702
+ writable: true
703
+ },
704
+ {
705
+ name: "claim_status",
706
+ writable: true,
707
+ pda: {
708
+ seeds: [
709
+ {
710
+ kind: "const",
711
+ value: [67, 108, 97, 105, 109, 83, 116, 97, 116, 117, 115]
712
+ },
713
+ {
714
+ kind: "account",
715
+ path: "claimant"
716
+ },
717
+ {
718
+ kind: "account",
719
+ path: "distributor"
720
+ }
721
+ ]
722
+ }
723
+ },
724
+ {
725
+ name: "from",
726
+ docs: ["Distributor ATA containing the tokens to distribute."],
727
+ writable: true,
728
+ pda: {
729
+ seeds: [
730
+ {
731
+ kind: "account",
732
+ path: "distributor"
733
+ },
734
+ {
735
+ kind: "account",
736
+ path: "token_program"
737
+ },
738
+ {
739
+ kind: "account",
740
+ path: "distributor.mint",
741
+ account: "MerkleDistributor"
742
+ }
743
+ ],
744
+ program: {
745
+ kind: "const",
746
+ value: [
747
+ 140,
748
+ 151,
749
+ 37,
750
+ 143,
751
+ 78,
752
+ 36,
753
+ 137,
754
+ 241,
755
+ 187,
756
+ 61,
757
+ 16,
758
+ 41,
759
+ 20,
760
+ 142,
761
+ 13,
762
+ 131,
763
+ 11,
764
+ 90,
765
+ 19,
766
+ 153,
767
+ 218,
768
+ 255,
769
+ 16,
770
+ 132,
771
+ 4,
772
+ 142,
773
+ 123,
774
+ 216,
775
+ 219,
776
+ 233,
777
+ 248,
778
+ 89
779
+ ]
780
+ }
781
+ }
782
+ },
783
+ {
784
+ name: "to",
785
+ docs: ["Account to send the claimed tokens to."],
786
+ writable: true
787
+ },
788
+ {
789
+ name: "claimant",
790
+ docs: ["Who is claiming the tokens."],
791
+ writable: true,
792
+ signer: true
793
+ },
794
+ {
795
+ name: "mint",
796
+ docs: ["The mint to claim."],
797
+ relations: ["distributor"]
798
+ },
799
+ {
800
+ name: "token_program",
801
+ docs: ["SPL [Token] program."]
802
+ },
803
+ {
804
+ name: "system_program",
805
+ docs: ["The [System] program."],
806
+ address: "11111111111111111111111111111111"
807
+ },
808
+ {
809
+ name: "event_authority",
810
+ pda: {
811
+ seeds: [
812
+ {
813
+ kind: "const",
814
+ value: [95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121]
815
+ }
816
+ ]
817
+ }
818
+ },
819
+ {
820
+ name: "program"
821
+ }
822
+ ],
823
+ args: [
824
+ {
825
+ name: "amount_unlocked",
826
+ type: "u64"
827
+ },
828
+ {
829
+ name: "amount_locked",
830
+ type: "u64"
831
+ },
832
+ {
833
+ name: "proof",
834
+ type: {
835
+ vec: {
836
+ array: ["u8", 32]
837
+ }
838
+ }
839
+ }
840
+ ]
841
+ },
842
+ {
843
+ name: "new_distributor",
844
+ docs: [
845
+ "READ THE FOLLOWING:",
846
+ "",
847
+ "This instruction is susceptible to frontrunning that could result in loss of funds if not handled properly.",
848
+ "",
849
+ "An attack could look like:",
850
+ "- A legitimate user opens a new distributor.",
851
+ "- Someone observes the call to this instruction.",
852
+ "- They replace the clawback_receiver, admin, or time parameters with their own.",
853
+ "",
854
+ "One situation that could happen here is the attacker replaces the admin and clawback_receiver with their own",
855
+ "and sets the clawback_start_ts with the minimal time allowed. After clawback_start_ts has elapsed,",
856
+ "the attacker can steal all funds from the distributor to their own clawback_receiver account.",
857
+ "",
858
+ "HOW TO AVOID:",
859
+ "- When you call into this instruction, ensure your transaction succeeds.",
860
+ "- To be extra safe, after your transaction succeeds, read back the state of the created MerkleDistributor account and",
861
+ "assert the parameters are what you expect, most importantly the clawback_receiver and admin.",
862
+ "- If your transaction fails, double check the value on-chain matches what you expect."
863
+ ],
864
+ discriminator: [32, 139, 112, 171, 0, 2, 225, 155],
865
+ accounts: [
866
+ {
867
+ name: "distributor",
868
+ docs: ["[MerkleDistributor]."],
869
+ writable: true,
870
+ pda: {
871
+ seeds: [
872
+ {
873
+ kind: "const",
874
+ value: [77, 101, 114, 107, 108, 101, 68, 105, 115, 116, 114, 105, 98, 117, 116, 111, 114]
875
+ },
876
+ {
877
+ kind: "account",
878
+ path: "mint"
879
+ },
880
+ {
881
+ kind: "arg",
882
+ path: "version"
883
+ }
884
+ ]
885
+ }
886
+ },
887
+ {
888
+ name: "clawback_receiver",
889
+ docs: ["Clawback receiver token account"],
890
+ writable: true
891
+ },
892
+ {
893
+ name: "mint",
894
+ docs: ["The mint to distribute."]
895
+ },
896
+ {
897
+ name: "token_vault",
898
+ docs: ["Token vault"],
899
+ writable: true,
900
+ pda: {
901
+ seeds: [
902
+ {
903
+ kind: "account",
904
+ path: "distributor"
905
+ },
906
+ {
907
+ kind: "account",
908
+ path: "token_program"
909
+ },
910
+ {
911
+ kind: "account",
912
+ path: "mint"
913
+ }
914
+ ],
915
+ program: {
916
+ kind: "const",
917
+ value: [
918
+ 140,
919
+ 151,
920
+ 37,
921
+ 143,
922
+ 78,
923
+ 36,
924
+ 137,
925
+ 241,
926
+ 187,
927
+ 61,
928
+ 16,
929
+ 41,
930
+ 20,
931
+ 142,
932
+ 13,
933
+ 131,
934
+ 11,
935
+ 90,
936
+ 19,
937
+ 153,
938
+ 218,
939
+ 255,
940
+ 16,
941
+ 132,
942
+ 4,
943
+ 142,
944
+ 123,
945
+ 216,
946
+ 219,
947
+ 233,
948
+ 248,
949
+ 89
950
+ ]
951
+ }
952
+ }
953
+ },
954
+ {
955
+ name: "admin",
956
+ docs: [
957
+ "Admin wallet, responsible for creating the distributor and paying for the transaction.",
958
+ "Also has the authority to set the clawback receiver and change itself."
959
+ ],
960
+ writable: true,
961
+ signer: true
962
+ },
963
+ {
964
+ name: "system_program",
965
+ docs: ["The [System] program."],
966
+ address: "11111111111111111111111111111111"
967
+ },
968
+ {
969
+ name: "associated_token_program",
970
+ docs: ["The [Associated Token] program."],
971
+ address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
972
+ },
973
+ {
974
+ name: "token_program",
975
+ docs: ["The [Token] program."]
976
+ }
977
+ ],
978
+ args: [
979
+ {
980
+ name: "version",
981
+ type: "u64"
982
+ },
983
+ {
984
+ name: "root",
985
+ type: {
986
+ array: ["u8", 32]
987
+ }
988
+ },
989
+ {
990
+ name: "max_total_claim",
991
+ type: "u64"
992
+ },
993
+ {
994
+ name: "max_num_nodes",
995
+ type: "u64"
996
+ },
997
+ {
998
+ name: "unlock_period",
999
+ type: "u64"
1000
+ },
1001
+ {
1002
+ name: "start_vesting_ts",
1003
+ type: "u64"
1004
+ },
1005
+ {
1006
+ name: "end_vesting_ts",
1007
+ type: "u64"
1008
+ },
1009
+ {
1010
+ name: "clawback_start_ts",
1011
+ type: "u64"
1012
+ },
1013
+ {
1014
+ name: "claims_closable_by_admin",
1015
+ type: "bool"
1016
+ },
1017
+ {
1018
+ name: "can_update_duration",
1019
+ type: {
1020
+ option: "bool"
1021
+ }
1022
+ },
1023
+ {
1024
+ name: "total_amount_unlocked",
1025
+ type: {
1026
+ option: "u64"
1027
+ }
1028
+ },
1029
+ {
1030
+ name: "total_amount_locked",
1031
+ type: {
1032
+ option: "u64"
1033
+ }
1034
+ },
1035
+ {
1036
+ name: "claims_closable_by_claimant",
1037
+ type: {
1038
+ option: "bool"
1039
+ }
1040
+ },
1041
+ {
1042
+ name: "claims_limit",
1043
+ type: {
1044
+ option: "u16"
1045
+ }
1046
+ }
1047
+ ]
1048
+ },
1049
+ {
1050
+ name: "refund_claim",
1051
+ discriminator: [157, 23, 164, 146, 176, 53, 147, 143],
1052
+ accounts: [
1053
+ {
1054
+ name: "distributor",
1055
+ docs: ["The [MerkleDistributor]."],
1056
+ writable: true
1057
+ },
1058
+ {
1059
+ name: "claim_status",
1060
+ writable: true,
1061
+ pda: {
1062
+ seeds: [
1063
+ {
1064
+ kind: "const",
1065
+ value: [67, 108, 97, 105, 109, 83, 116, 97, 116, 117, 115]
1066
+ },
1067
+ {
1068
+ kind: "account",
1069
+ path: "claimant"
1070
+ },
1071
+ {
1072
+ kind: "account",
1073
+ path: "distributor"
1074
+ }
1075
+ ]
1076
+ }
1077
+ },
1078
+ {
1079
+ name: "signer",
1080
+ docs: ["Signer account"],
1081
+ writable: true,
1082
+ signer: true
1083
+ },
1084
+ {
1085
+ name: "claimant"
1086
+ },
1087
+ {
1088
+ name: "streamflow_treasury",
1089
+ writable: true,
1090
+ address: "5SEpbdjFK5FxwTvfsGMXVQTD2v4M2c5tyRTxhdsPkgDw"
1091
+ },
1092
+ {
1093
+ name: "system_program",
1094
+ docs: ["The [System] program."],
1095
+ address: "11111111111111111111111111111111"
1096
+ }
1097
+ ],
1098
+ args: []
1099
+ },
1100
+ {
1101
+ name: "set_admin",
1102
+ discriminator: [251, 163, 0, 52, 91, 194, 187, 92],
1103
+ accounts: [
1104
+ {
1105
+ name: "distributor",
1106
+ docs: ["The [MerkleDistributor]."],
1107
+ writable: true
1108
+ },
1109
+ {
1110
+ name: "admin",
1111
+ docs: ["Admin signer"],
1112
+ writable: true,
1113
+ signer: true
1114
+ },
1115
+ {
1116
+ name: "new_admin",
1117
+ docs: ["New admin account"],
1118
+ writable: true
1119
+ }
1120
+ ],
1121
+ args: []
1122
+ },
1123
+ {
1124
+ name: "set_clawback_receiver",
1125
+ discriminator: [153, 217, 34, 20, 19, 29, 229, 75],
1126
+ accounts: [
1127
+ {
1128
+ name: "distributor",
1129
+ docs: ["The [MerkleDistributor]."],
1130
+ writable: true
1131
+ },
1132
+ {
1133
+ name: "new_clawback_account",
1134
+ docs: ["New clawback account"]
1135
+ },
1136
+ {
1137
+ name: "admin",
1138
+ docs: ["Admin signer"],
1139
+ writable: true,
1140
+ signer: true
1141
+ }
1142
+ ],
1143
+ args: []
1144
+ },
1145
+ {
1146
+ name: "update",
1147
+ discriminator: [219, 200, 88, 176, 158, 63, 253, 127],
1148
+ accounts: [
1149
+ {
1150
+ name: "distributor",
1151
+ docs: ["The [MerkleDistributor]."],
1152
+ writable: true
1153
+ },
1154
+ {
1155
+ name: "admin",
1156
+ docs: ["Only Admin can trigger the clawback of funds"],
1157
+ writable: true,
1158
+ signer: true
1159
+ },
1160
+ {
1161
+ name: "system_program",
1162
+ docs: ["The [System] program."],
1163
+ address: "11111111111111111111111111111111"
1164
+ }
1165
+ ],
1166
+ args: [
1167
+ {
1168
+ name: "end_ts",
1169
+ type: {
1170
+ option: "u64"
1171
+ }
1172
+ }
1173
+ ]
1174
+ }
1175
+ ],
1176
+ accounts: [
1177
+ {
1178
+ name: "ClaimStatus",
1179
+ discriminator: [22, 183, 249, 157, 247, 95, 150, 96]
1180
+ },
1181
+ {
1182
+ name: "CompressedClaimStatus",
1183
+ discriminator: [53, 68, 161, 131, 212, 106, 98, 48]
1184
+ },
1185
+ {
1186
+ name: "MerkleDistributor",
1187
+ discriminator: [77, 119, 139, 70, 84, 247, 12, 26]
1188
+ }
1189
+ ],
1190
+ events: [
1191
+ {
1192
+ name: "ClaimClosedEvent",
1193
+ discriminator: [139, 166, 215, 195, 184, 233, 26, 217]
1194
+ },
1195
+ {
1196
+ name: "ClaimedEvent",
1197
+ discriminator: [144, 172, 209, 86, 144, 87, 84, 115]
1198
+ },
1199
+ {
1200
+ name: "NewClaimEvent",
1201
+ discriminator: [244, 3, 231, 151, 60, 101, 55, 55]
1202
+ }
1203
+ ],
1204
+ errors: [
1205
+ {
1206
+ code: 6e3,
1207
+ name: "InsufficientUnlockedTokens",
1208
+ msg: "Insufficient unlocked tokens"
1209
+ },
1210
+ {
1211
+ code: 6001,
1212
+ name: "InvalidProof",
1213
+ msg: "Invalid Merkle proof"
1214
+ },
1215
+ {
1216
+ code: 6002,
1217
+ name: "ExceededMaxClaim",
1218
+ msg: "Exceeded maximum claim amount"
1219
+ },
1220
+ {
1221
+ code: 6003,
1222
+ name: "MaxNodesExceeded",
1223
+ msg: "Exceeded maximum node count"
1224
+ },
1225
+ {
1226
+ code: 6004,
1227
+ name: "Unauthorized",
1228
+ msg: "Account is not authorized to execute this instruction"
1229
+ },
1230
+ {
1231
+ code: 6005,
1232
+ name: "OwnerMismatch",
1233
+ msg: "Token account owner did not match intended owner"
1234
+ },
1235
+ {
1236
+ code: 6006,
1237
+ name: "ClawbackBeforeStart",
1238
+ msg: "Attempted clawback before start"
1239
+ },
1240
+ {
1241
+ code: 6007,
1242
+ name: "ClawbackAlreadyClaimed",
1243
+ msg: "Clawback already claimed"
1244
+ },
1245
+ {
1246
+ code: 6008,
1247
+ name: "SameClawbackReceiver",
1248
+ msg: "New and old Clawback receivers are identical"
1249
+ },
1250
+ {
1251
+ code: 6009,
1252
+ name: "ClawbackReceiverIsTokenVault",
1253
+ msg: "Clawback receiver can not be the Token Vault"
1254
+ },
1255
+ {
1256
+ code: 6010,
1257
+ name: "SameAdmin",
1258
+ msg: "New and old admin are identical"
1259
+ },
1260
+ {
1261
+ code: 6011,
1262
+ name: "ClaimExpired",
1263
+ msg: "Claim window expired"
1264
+ },
1265
+ {
1266
+ code: 6012,
1267
+ name: "ArithmeticError",
1268
+ msg: "Arithmetic Error (overflow/underflow)"
1269
+ },
1270
+ {
1271
+ code: 6013,
1272
+ name: "StartTimestampAfterEnd",
1273
+ msg: "Start Timestamp cannot be after end Timestamp"
1274
+ },
1275
+ {
1276
+ code: 6014,
1277
+ name: "TimestampsNotInFuture",
1278
+ msg: "Timestamps cannot be in the past"
1279
+ },
1280
+ {
1281
+ code: 6015,
1282
+ name: "InvalidMint",
1283
+ msg: "Invalid Mint"
1284
+ },
1285
+ {
1286
+ code: 6016,
1287
+ name: "ClaimIsClosed",
1288
+ msg: "Claim is closed"
1289
+ },
1290
+ {
1291
+ code: 6017,
1292
+ name: "ClaimsAreNotClosable",
1293
+ msg: "Claims are not closable"
1294
+ },
1295
+ {
1296
+ code: 6018,
1297
+ name: "InvalidUnlockPeriod",
1298
+ msg: "Invalid unlock period"
1299
+ },
1300
+ {
1301
+ code: 6019,
1302
+ name: "DurationUpdateNotAllowed",
1303
+ msg: "Duration update is not allowed"
1304
+ },
1305
+ {
1306
+ code: 6020,
1307
+ name: "NoVestingAmount",
1308
+ msg: "Vesting amounts are not set"
1309
+ },
1310
+ {
1311
+ code: 6021,
1312
+ name: "VestingAlreadyFinished",
1313
+ msg: "Vesting already finished"
1314
+ },
1315
+ {
1316
+ code: 6022,
1317
+ name: "InvalidAmounts",
1318
+ msg: "Provided amounts are invalid"
1319
+ },
1320
+ {
1321
+ code: 6023,
1322
+ name: "ClaimsLimitReached",
1323
+ msg: "Claims limit has been reached"
1324
+ }
1325
+ ],
1326
+ types: [
1327
+ {
1328
+ name: "ClaimClosedEvent",
1329
+ docs: ["Emitted when a new claim is created."],
1330
+ type: {
1331
+ kind: "struct",
1332
+ fields: [
1333
+ {
1334
+ name: "claimant",
1335
+ docs: ["User that claimed."],
1336
+ type: "pubkey"
1337
+ },
1338
+ {
1339
+ name: "timestamp",
1340
+ docs: ["Timestamp."],
1341
+ type: "u64"
1342
+ }
1343
+ ]
1344
+ }
1345
+ },
1346
+ {
1347
+ name: "ClaimStatus",
1348
+ docs: ["Holds whether or not a claimant has claimed tokens."],
1349
+ type: {
1350
+ kind: "struct",
1351
+ fields: [
1352
+ {
1353
+ name: "claimant",
1354
+ docs: ["Authority that claimed the tokens."],
1355
+ type: "pubkey"
1356
+ },
1357
+ {
1358
+ name: "locked_amount",
1359
+ docs: ["Locked amount"],
1360
+ type: "u64"
1361
+ },
1362
+ {
1363
+ name: "locked_amount_withdrawn",
1364
+ docs: ["Locked amount withdrawn"],
1365
+ type: "u64"
1366
+ },
1367
+ {
1368
+ name: "unlocked_amount",
1369
+ docs: ["Unlocked amount"],
1370
+ type: "u64"
1371
+ },
1372
+ {
1373
+ name: "last_claim_ts",
1374
+ docs: ["Last claim time"],
1375
+ type: "u64"
1376
+ },
1377
+ {
1378
+ name: "last_amount_per_unlock",
1379
+ docs: ["Track amount per unlock, can be useful for non-linear vesting"],
1380
+ type: "u64"
1381
+ },
1382
+ {
1383
+ name: "closed",
1384
+ docs: ["Whether claim is closed"],
1385
+ type: "bool"
1386
+ },
1387
+ {
1388
+ name: "distributor",
1389
+ docs: [
1390
+ "Distributor account for which ClaimStatus was created, useful to filter by in get_program_accounts"
1391
+ ],
1392
+ type: "pubkey"
1393
+ },
1394
+ {
1395
+ name: "claims_count",
1396
+ docs: ["Number of time amount has been claimed"],
1397
+ type: "u16"
1398
+ },
1399
+ {
1400
+ name: "closed_ts",
1401
+ docs: ["Time when claim has been closed"],
1402
+ type: "u64"
1403
+ },
1404
+ {
1405
+ name: "buffer_2",
1406
+ docs: ["Buffer for additional fields"],
1407
+ type: {
1408
+ array: ["u8", 22]
1409
+ }
1410
+ }
1411
+ ]
1412
+ }
1413
+ },
1414
+ {
1415
+ name: "ClaimedEvent",
1416
+ docs: ["Emitted when tokens are claimed."],
1417
+ type: {
1418
+ kind: "struct",
1419
+ fields: [
1420
+ {
1421
+ name: "claimant",
1422
+ docs: ["User that claimed."],
1423
+ type: "pubkey"
1424
+ },
1425
+ {
1426
+ name: "amount",
1427
+ docs: ["Amount of tokens to distribute."],
1428
+ type: "u64"
1429
+ }
1430
+ ]
1431
+ }
1432
+ },
1433
+ {
1434
+ name: "CompressedClaimStatus",
1435
+ docs: ["Holds whether or not a claimant has claimed tokens."],
1436
+ type: {
1437
+ kind: "struct",
1438
+ fields: [
1439
+ {
1440
+ name: "state",
1441
+ type: {
1442
+ defined: {
1443
+ name: "State"
1444
+ }
1445
+ }
1446
+ }
1447
+ ]
1448
+ }
1449
+ },
1450
+ {
1451
+ name: "MerkleDistributor",
1452
+ docs: ["State for the account which distributes tokens."],
1453
+ type: {
1454
+ kind: "struct",
1455
+ fields: [
1456
+ {
1457
+ name: "bump",
1458
+ docs: ["Bump seed."],
1459
+ type: "u8"
1460
+ },
1461
+ {
1462
+ name: "version",
1463
+ docs: ["Version of the airdrop"],
1464
+ type: "u64"
1465
+ },
1466
+ {
1467
+ name: "root",
1468
+ docs: ["The 256-bit merkle root."],
1469
+ type: {
1470
+ array: ["u8", 32]
1471
+ }
1472
+ },
1473
+ {
1474
+ name: "mint",
1475
+ docs: ["[Mint] of the token to be distributed."],
1476
+ type: "pubkey"
1477
+ },
1478
+ {
1479
+ name: "token_vault",
1480
+ docs: ["Token Address of the vault"],
1481
+ type: "pubkey"
1482
+ },
1483
+ {
1484
+ name: "max_total_claim",
1485
+ docs: ["Maximum number of tokens that can ever be claimed from this [MerkleDistributor]."],
1486
+ type: "u64"
1487
+ },
1488
+ {
1489
+ name: "max_num_nodes",
1490
+ docs: ["Maximum number of nodes in [MerkleDistributor]."],
1491
+ type: "u64"
1492
+ },
1493
+ {
1494
+ name: "unlock_period",
1495
+ docs: ["Time step (period) in seconds per which the unlock occurs"],
1496
+ type: "u64"
1497
+ },
1498
+ {
1499
+ name: "total_amount_claimed",
1500
+ docs: ["Total amount of tokens that have been claimed."],
1501
+ type: "u64"
1502
+ },
1503
+ {
1504
+ name: "num_nodes_claimed",
1505
+ docs: ["Number of nodes that have been claimed."],
1506
+ type: "u64"
1507
+ },
1508
+ {
1509
+ name: "start_ts",
1510
+ docs: ["Lockup time start (Unix Timestamp)"],
1511
+ type: "u64"
1512
+ },
1513
+ {
1514
+ name: "end_ts",
1515
+ docs: ["Lockup time end (Unix Timestamp)"],
1516
+ type: "u64"
1517
+ },
1518
+ {
1519
+ name: "clawback_start_ts",
1520
+ docs: ["Clawback start (Unix Timestamp)"],
1521
+ type: "u64"
1522
+ },
1523
+ {
1524
+ name: "clawback_receiver",
1525
+ docs: ["Clawback receiver"],
1526
+ type: "pubkey"
1527
+ },
1528
+ {
1529
+ name: "admin",
1530
+ docs: ["Admin wallet"],
1531
+ type: "pubkey"
1532
+ },
1533
+ {
1534
+ name: "clawed_back",
1535
+ docs: ["Whether or not the distributor has been clawed back"],
1536
+ type: "bool"
1537
+ },
1538
+ {
1539
+ name: "claims_closable_by_admin",
1540
+ docs: ["Whether claims are closable by the admin or not"],
1541
+ type: "bool"
1542
+ },
1543
+ {
1544
+ name: "can_update_duration",
1545
+ docs: ["Whether admin can update vesting duration"],
1546
+ type: "bool"
1547
+ },
1548
+ {
1549
+ name: "total_amount_unlocked",
1550
+ docs: ["Total amount of funds unlocked (cliff/instant)"],
1551
+ type: "u64"
1552
+ },
1553
+ {
1554
+ name: "total_amount_locked",
1555
+ docs: ["Total amount of funds locked (vested)"],
1556
+ type: "u64"
1557
+ },
1558
+ {
1559
+ name: "last_duration_update_ts",
1560
+ docs: ["Timestamp when update was last called"],
1561
+ type: "u64"
1562
+ },
1563
+ {
1564
+ name: "total_claimable_pre_update",
1565
+ docs: [
1566
+ "Total amount of locked amount claimable as of last duration update, ever increasing total, accumulates with each update"
1567
+ ],
1568
+ type: "u64"
1569
+ },
1570
+ {
1571
+ name: "clawed_back_ts",
1572
+ docs: ["Timestamp when funds were clawed back"],
1573
+ type: "u64"
1574
+ },
1575
+ {
1576
+ name: "claims_closable_by_claimant",
1577
+ docs: ["Whether claims are closable by claimant or not"],
1578
+ type: "bool"
1579
+ },
1580
+ {
1581
+ name: "claims_limit",
1582
+ docs: ["Limit number of claims"],
1583
+ type: "u16"
1584
+ },
1585
+ {
1586
+ name: "buffer_2",
1587
+ docs: ["Buffer for additional fields"],
1588
+ type: {
1589
+ array: ["u8", 20]
1590
+ }
1591
+ },
1592
+ {
1593
+ name: "buffer_3",
1594
+ docs: ["Buffer for additional fields"],
1595
+ type: {
1596
+ array: ["u8", 32]
1597
+ }
1598
+ }
1599
+ ]
1600
+ }
1601
+ },
1602
+ {
1603
+ name: "NewClaimEvent",
1604
+ docs: ["Emitted when a new claim is created."],
1605
+ type: {
1606
+ kind: "struct",
1607
+ fields: [
1608
+ {
1609
+ name: "claimant",
1610
+ docs: ["User that claimed."],
1611
+ type: "pubkey"
1612
+ },
1613
+ {
1614
+ name: "timestamp",
1615
+ docs: ["Timestamp."],
1616
+ type: "u64"
1617
+ }
1618
+ ]
1619
+ }
1620
+ },
1621
+ {
1622
+ name: "State",
1623
+ type: {
1624
+ kind: "enum",
1625
+ variants: [
1626
+ {
1627
+ name: "Claimed"
1628
+ },
1629
+ {
1630
+ name: "Closed"
1631
+ }
1632
+ ]
1633
+ }
1634
+ }
1635
+ ]
1636
+ };
1637
+
328
1638
  // solana/constants.ts
329
1639
  var constants_exports = {};
330
1640
  __export(constants_exports, {
@@ -1656,9 +2966,9 @@ function getEventAuthorityPda(programId) {
1656
2966
  const seeds = [buffer.Buffer.from("__event_authority")];
1657
2967
  return web3_js.PublicKey.findProgramAddressSync(seeds, programId)[0];
1658
2968
  }
1659
- async function wrappedSignAndExecuteTransaction(connection, invoker, tx, confirmationParams, throttleParams) {
2969
+ async function wrappedSignAndExecuteTransaction(...args) {
1660
2970
  try {
1661
- return await solana.signAndExecuteTransaction(connection, invoker, tx, confirmationParams, throttleParams);
2971
+ return await solana.signAndExecuteTransaction(...args);
1662
2972
  } catch (err) {
1663
2973
  if (err instanceof Error) {
1664
2974
  const parsed = fromTxError(err);
@@ -1699,6 +3009,10 @@ var BaseDistributorClient = class {
1699
3009
  this.connection = new web3_js.Connection(clusterUrl, this.commitment);
1700
3010
  this.programId = programId !== "" ? new web3_js.PublicKey(programId) : new web3_js.PublicKey(DISTRIBUTOR_PROGRAM_ID[cluster]);
1701
3011
  this.sendThrottler = sendThrottler ?? solana.buildSendThrottler(sendRate);
3012
+ const merkleDistributorProgram = {
3013
+ ...merkle_distributor_default
3014
+ };
3015
+ this.merkleDistributorProgram = new anchor.Program(merkleDistributorProgram, { connection: this.connection });
1702
3016
  }
1703
3017
  getConnection() {
1704
3018
  return this.connection;
@@ -1774,7 +3088,14 @@ var BaseDistributorClient = class {
1774
3088
  return { distributorPublicKey, ixs };
1775
3089
  }
1776
3090
  async create(data, extParams) {
1777
- const { ixs, distributorPublicKey } = await this.prepareCreateInstructions(data, extParams);
3091
+ const invoker = extParams.invoker.publicKey;
3092
+ common.invariant(invoker, "Invoker's PublicKey is not available, check passed wallet adapter!");
3093
+ const executionParams = this.unwrapExecutionParams(extParams);
3094
+ const { ixs, distributorPublicKey } = await solana.createAndEstimateTransaction(
3095
+ (params) => this.prepareCreateInstructions(data, params),
3096
+ executionParams,
3097
+ (q) => q.ixs
3098
+ );
1778
3099
  const { tx, hash, context } = await solana.prepareTransaction(this.connection, ixs, extParams.invoker.publicKey);
1779
3100
  const signature = await wrappedSignAndExecuteTransaction(
1780
3101
  this.connection,
@@ -1785,7 +3106,7 @@ var BaseDistributorClient = class {
1785
3106
  context,
1786
3107
  commitment: this.getCommitment()
1787
3108
  },
1788
- { sendThrottler: this.sendThrottler }
3109
+ { sendThrottler: this.sendThrottler, skipSimulation: executionParams.skipSimulation }
1789
3110
  );
1790
3111
  return {
1791
3112
  ixs,
@@ -1793,23 +3114,29 @@ var BaseDistributorClient = class {
1793
3114
  metadataId: distributorPublicKey.toBase58()
1794
3115
  };
1795
3116
  }
1796
- async claim(data, extParams) {
1797
- const ixs = await this.prepareClaimInstructions(data, extParams);
1798
- const { tx, hash, context } = await solana.prepareTransaction(this.connection, ixs, extParams.invoker.publicKey);
3117
+ async claim(data, extParams, _serviceTransfer) {
3118
+ const executionParams = this.unwrapExecutionParams(extParams);
3119
+ const invoker = executionParams.invoker.publicKey;
3120
+ common.invariant(invoker, "Invoker's PublicKey is not available, check passed wallet adapter!");
3121
+ const ixs = await solana.createAndEstimateTransaction(
3122
+ (params) => this.prepareClaimInstructions(data, params, _serviceTransfer),
3123
+ executionParams
3124
+ );
3125
+ const { tx, hash, context } = await solana.prepareTransaction(this.connection, ixs, invoker);
1799
3126
  const signature = await wrappedSignAndExecuteTransaction(
1800
3127
  this.connection,
1801
- extParams.invoker,
3128
+ executionParams.invoker,
1802
3129
  tx,
1803
3130
  {
1804
3131
  hash,
1805
3132
  context,
1806
3133
  commitment: this.getCommitment()
1807
3134
  },
1808
- { sendThrottler: this.sendThrottler }
3135
+ { sendThrottler: this.sendThrottler, skipSimulation: executionParams.skipSimulation }
1809
3136
  );
1810
3137
  return { ixs, txId: signature };
1811
3138
  }
1812
- async prepareClaimInstructions(data, extParams) {
3139
+ async prepareClaimInstructions(data, extParams, _serviceTransfer) {
1813
3140
  if (!extParams.invoker.publicKey) {
1814
3141
  throw new Error("Invoker's PublicKey is not available, check passed wallet adapter!");
1815
3142
  }
@@ -1861,22 +3188,33 @@ var BaseDistributorClient = class {
1861
3188
  if (claimStatus || new BN6__default.default(data.amountLocked).gtn(0) && nowTs.sub(distributor.startTs).gte(distributor.unlockPeriod)) {
1862
3189
  ixs.push(claimLocked(accounts, this.programId));
1863
3190
  }
1864
- ixs.push(this.prepareClaimFeeInstruction(extParams.invoker.publicKey));
3191
+ ixs.push(
3192
+ this.prepareClaimFeeInstruction(
3193
+ extParams.invoker.publicKey,
3194
+ typeof _serviceTransfer === "bigint" ? _serviceTransfer : void 0
3195
+ )
3196
+ );
1865
3197
  return ixs;
1866
3198
  }
1867
3199
  async closeClaim(data, extParams) {
1868
- const ixs = await this.prepareCloseClaimInstructions(data, extParams);
1869
- const { tx, hash, context } = await solana.prepareTransaction(this.connection, ixs, extParams.invoker.publicKey);
3200
+ const executionParams = this.unwrapExecutionParams(extParams);
3201
+ const invoker = executionParams.invoker.publicKey;
3202
+ common.invariant(invoker, "Invoker's PublicKey is not available, check passed wallet adapter!");
3203
+ const ixs = await solana.createAndEstimateTransaction(
3204
+ (params) => this.prepareCloseClaimInstructions(data, params),
3205
+ executionParams
3206
+ );
3207
+ const { tx, hash, context } = await solana.prepareTransaction(this.connection, ixs, invoker);
1870
3208
  const signature = await wrappedSignAndExecuteTransaction(
1871
3209
  this.connection,
1872
- extParams.invoker,
3210
+ executionParams.invoker,
1873
3211
  tx,
1874
3212
  {
1875
3213
  hash,
1876
3214
  context,
1877
3215
  commitment: this.getCommitment()
1878
3216
  },
1879
- { sendThrottler: this.sendThrottler }
3217
+ { sendThrottler: this.sendThrottler, skipSimulation: executionParams.skipSimulation }
1880
3218
  );
1881
3219
  return { ixs, txId: signature };
1882
3220
  }
@@ -1944,18 +3282,24 @@ var BaseDistributorClient = class {
1944
3282
  return ixs;
1945
3283
  }
1946
3284
  async clawback(data, extParams) {
1947
- const ixs = await this.prepareClawbackInstructions(data, extParams);
1948
- const { tx, hash, context } = await solana.prepareTransaction(this.connection, ixs, extParams.invoker.publicKey);
3285
+ const executionParams = this.unwrapExecutionParams(extParams);
3286
+ const invoker = executionParams.invoker.publicKey;
3287
+ common.invariant(invoker, "Invoker's PublicKey is not available, check passed wallet adapter!");
3288
+ const ixs = await solana.createAndEstimateTransaction(
3289
+ (params) => this.prepareClawbackInstructions(data, params),
3290
+ executionParams
3291
+ );
3292
+ const { tx, hash, context } = await solana.prepareTransaction(this.connection, ixs, invoker);
1949
3293
  const signature = await wrappedSignAndExecuteTransaction(
1950
3294
  this.connection,
1951
- extParams.invoker,
3295
+ executionParams.invoker,
1952
3296
  tx,
1953
3297
  {
1954
3298
  hash,
1955
3299
  context,
1956
3300
  commitment: this.getCommitment()
1957
3301
  },
1958
- { sendThrottler: this.sendThrottler }
3302
+ { sendThrottler: this.sendThrottler, skipSimulation: executionParams.skipSimulation }
1959
3303
  );
1960
3304
  return { ixs, txId: signature };
1961
3305
  }
@@ -1963,7 +3307,22 @@ var BaseDistributorClient = class {
1963
3307
  const claimStatusPublicKeys = data.map(({ id, recipient }) => {
1964
3308
  return getClaimantStatusPda(this.programId, new web3_js.PublicKey(id), new web3_js.PublicKey(recipient));
1965
3309
  });
1966
- return ClaimStatus.fetchMultiple(this.connection, claimStatusPublicKeys, this.programId);
3310
+ return this.connection.getMultipleAccountsInfo(claimStatusPublicKeys).then((accounts) => {
3311
+ return accounts.map((account) => {
3312
+ if (!account) {
3313
+ return account;
3314
+ }
3315
+ try {
3316
+ return decode(this.merkleDistributorProgram, "claimStatus", account.data);
3317
+ } catch (baseClaimStatusError) {
3318
+ try {
3319
+ return decode(this.merkleDistributorProgram, "compressedClaimStatus", account.data);
3320
+ } catch (compressedClaimStatusError) {
3321
+ throw new Error("Couldn't decode claim status");
3322
+ }
3323
+ }
3324
+ });
3325
+ });
1967
3326
  }
1968
3327
  async getDistributors(data) {
1969
3328
  const distributorPublicKeys = data.ids.map((distributorId) => new web3_js.PublicKey(distributorId));
@@ -1993,11 +3352,11 @@ var BaseDistributorClient = class {
1993
3352
  account: MerkleDistributor.decode(account.data)
1994
3353
  }));
1995
3354
  }
1996
- prepareClaimFeeInstruction(payer) {
3355
+ prepareClaimFeeInstruction(payer, fee = AIRDROP_CLAIM_FEE) {
1997
3356
  return web3_js.SystemProgram.transfer({
1998
3357
  fromPubkey: payer,
1999
3358
  toPubkey: STREAMFLOW_TREASURY_PUBLIC_KEY,
2000
- lamports: AIRDROP_CLAIM_FEE
3359
+ lamports: fee
2001
3360
  });
2002
3361
  }
2003
3362
  getNewDistributorArgs(data) {
@@ -2022,7 +3381,22 @@ var BaseDistributorClient = class {
2022
3381
  }
2023
3382
  return args;
2024
3383
  }
3384
+ unwrapExecutionParams(extParams) {
3385
+ return solana.unwrapExecutionParams(extParams, this.connection);
3386
+ }
2025
3387
  };
3388
+ function decode(program, accountName, accInfo, programKey) {
3389
+ common.invariant(
3390
+ program,
3391
+ `Decoding program with key ${program.programId?.toBase58() ?? "N/A"} is not available`
3392
+ );
3393
+ const accountEntity = program.idl.accounts?.find((acc) => acc.name === accountName);
3394
+ common.invariant(
3395
+ !!accountEntity,
3396
+ `Decoding program with key ${programKey} doesn't specify account with name ${String(accountName)}`
3397
+ );
3398
+ return program.coder.accounts.decode(accountName, accInfo);
3399
+ }
2026
3400
 
2027
3401
  // solana/clients/SolanaDistributorClient.ts
2028
3402
  var SolanaDistributorClient = class extends BaseDistributorClient {
@@ -2040,7 +3414,7 @@ var aligned_distributor_default = {
2040
3414
  address: "aMERKpFAWoChCi5oZwPvgsSCoGpZKBiU7fi76bdZjt2",
2041
3415
  metadata: {
2042
3416
  name: "aligned_distributor",
2043
- version: "1.3.2",
3417
+ version: "1.5.0",
2044
3418
  spec: "0.1.0",
2045
3419
  description: "Proxy for merkle distributor that updates Vesting duration according to token market performance."
2046
3420
  },
@@ -2184,6 +3558,48 @@ var aligned_distributor_default = {
2184
3558
  }
2185
3559
  ]
2186
3560
  },
3561
+ {
3562
+ name: "migrate_test_oracle",
3563
+ discriminator: [203, 254, 19, 3, 172, 185, 85, 190],
3564
+ accounts: [
3565
+ {
3566
+ name: "payer",
3567
+ writable: true,
3568
+ signer: true
3569
+ },
3570
+ {
3571
+ name: "mint"
3572
+ },
3573
+ {
3574
+ name: "creator"
3575
+ },
3576
+ {
3577
+ name: "test_oracle",
3578
+ writable: true,
3579
+ pda: {
3580
+ seeds: [
3581
+ {
3582
+ kind: "const",
3583
+ value: [116, 101, 115, 116, 45, 111, 114, 97, 99, 108, 101]
3584
+ },
3585
+ {
3586
+ kind: "account",
3587
+ path: "mint"
3588
+ },
3589
+ {
3590
+ kind: "account",
3591
+ path: "creator"
3592
+ }
3593
+ ]
3594
+ }
3595
+ },
3596
+ {
3597
+ name: "system_program",
3598
+ address: "11111111111111111111111111111111"
3599
+ }
3600
+ ],
3601
+ args: []
3602
+ },
2187
3603
  {
2188
3604
  name: "new_distributor",
2189
3605
  discriminator: [32, 139, 112, 171, 0, 2, 225, 155],
@@ -2269,6 +3685,48 @@ var aligned_distributor_default = {
2269
3685
  }
2270
3686
  ]
2271
3687
  },
3688
+ {
3689
+ name: "realloc_test_oracle",
3690
+ discriminator: [234, 221, 116, 4, 198, 251, 244, 206],
3691
+ accounts: [
3692
+ {
3693
+ name: "payer",
3694
+ writable: true,
3695
+ signer: true
3696
+ },
3697
+ {
3698
+ name: "mint"
3699
+ },
3700
+ {
3701
+ name: "creator"
3702
+ },
3703
+ {
3704
+ name: "test_oracle",
3705
+ writable: true,
3706
+ pda: {
3707
+ seeds: [
3708
+ {
3709
+ kind: "const",
3710
+ value: [116, 101, 115, 116, 45, 111, 114, 97, 99, 108, 101]
3711
+ },
3712
+ {
3713
+ kind: "account",
3714
+ path: "mint"
3715
+ },
3716
+ {
3717
+ kind: "account",
3718
+ path: "creator"
3719
+ }
3720
+ ]
3721
+ }
3722
+ },
3723
+ {
3724
+ name: "system_program",
3725
+ address: "11111111111111111111111111111111"
3726
+ }
3727
+ ],
3728
+ args: []
3729
+ },
2272
3730
  {
2273
3731
  name: "set_admin",
2274
3732
  discriminator: [251, 163, 0, 52, 91, 194, 187, 92],