@bananapus/721-hook-v6 0.0.28 → 0.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ADMINISTRATION.md +38 -11
- package/ARCHITECTURE.md +53 -99
- package/AUDIT_INSTRUCTIONS.md +84 -383
- package/CHANGELOG.md +71 -0
- package/README.md +79 -225
- package/RISKS.md +28 -11
- package/SKILLS.md +29 -296
- package/STYLE_GUIDE.md +57 -18
- package/USER_JOURNEYS.md +57 -501
- package/package.json +1 -1
- package/references/operations.md +28 -0
- package/references/runtime.md +32 -0
- package/script/Deploy.s.sol +5 -4
- package/src/JB721TiersHook.sol +1 -1
- package/src/JB721TiersHookDeployer.sol +1 -1
- package/src/JB721TiersHookProjectDeployer.sol +1 -1
- package/src/JB721TiersHookStore.sol +23 -17
- package/src/libraries/JB721Constants.sol +1 -1
- package/src/libraries/JB721TiersRulesetMetadataResolver.sol +1 -1
- package/src/libraries/JBBitmap.sol +1 -1
- package/src/libraries/JBIpfsDecoder.sol +1 -1
- package/src/structs/JB721Tier.sol +5 -11
- package/src/structs/JB721TierConfig.sol +5 -20
- package/src/structs/JB721TierConfigFlags.sol +26 -0
- package/src/structs/JB721TierFlags.sol +17 -0
- package/test/721HookAttacks.t.sol +22 -17
- package/test/E2E/Pay_Mint_Redeem_E2E.t.sol +19 -14
- package/test/Fork.t.sol +69 -54
- package/test/TestAuditGaps.sol +73 -56
- package/test/TestSafeTransferReentrancy.t.sol +4 -4
- package/test/TestVotingUnitsLifecycle.t.sol +11 -11
- package/test/audit/CodexPayCreditsBypassTierSplits.t.sol +10 -7
- package/test/audit/CodexSplitCreditsMismatch.t.sol +10 -7
- package/test/fork/ERC20CashOutFork.t.sol +37 -28
- package/test/fork/ERC20TierSplitFork.t.sol +28 -21
- package/test/fork/IssueTokensForSplitsFork.t.sol +10 -7
- package/test/invariants/handlers/TierLifecycleHandler.sol +10 -7
- package/test/invariants/handlers/TierStoreHandler.sol +10 -7
- package/test/regression/ProjectDeployerRulesets.t.sol +10 -7
- package/test/regression/ReserveBeneficiaryOverwrite.t.sol +6 -6
- package/test/unit/AuditFixes_Unit.t.sol +37 -28
- package/test/unit/adjustTier_Unit.t.sol +268 -202
- package/test/unit/getters_constructor_Unit.t.sol +20 -14
- package/test/unit/mintFor_mintReservesFor_Unit.t.sol +2 -2
- package/test/unit/pay_Unit.t.sol +1 -1
- package/CHANGE_LOG.md +0 -359
|
@@ -3,6 +3,8 @@ pragma solidity 0.8.28;
|
|
|
3
3
|
|
|
4
4
|
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
5
5
|
import "../utils/UnitTestSetup.sol";
|
|
6
|
+
import {JB721TierConfigFlags} from "../../src/structs/JB721TierConfigFlags.sol";
|
|
7
|
+
import {JB721TierFlags} from "../../src/structs/JB721TierFlags.sol";
|
|
6
8
|
|
|
7
9
|
contract Test_adjustTier_Unit is UnitTestSetup {
|
|
8
10
|
using stdStorage for StdStorage;
|
|
@@ -545,13 +547,15 @@ contract Test_adjustTier_Unit is UnitTestSetup {
|
|
|
545
547
|
encodedIPFSUri: tokenUris[0],
|
|
546
548
|
category: uint24(100),
|
|
547
549
|
discountPercent: uint8(0),
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
550
|
+
flags: JB721TierConfigFlags({
|
|
551
|
+
allowOwnerMint: false,
|
|
552
|
+
useReserveBeneficiaryAsDefault: false,
|
|
553
|
+
transfersPausable: false,
|
|
554
|
+
useVotingUnits: true,
|
|
555
|
+
cantBeRemoved: false,
|
|
556
|
+
cantIncreaseDiscountPercent: false,
|
|
557
|
+
cantBuyWithCredits: false
|
|
558
|
+
}),
|
|
555
559
|
splitPercent: 0,
|
|
556
560
|
splits: new JBSplit[](0)
|
|
557
561
|
});
|
|
@@ -567,11 +571,13 @@ contract Test_adjustTier_Unit is UnitTestSetup {
|
|
|
567
571
|
encodedIPFSUri: tierConfigs[i].encodedIPFSUri,
|
|
568
572
|
category: tierConfigs[i].category,
|
|
569
573
|
discountPercent: tierConfigs[i].discountPercent,
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
574
|
+
flags: JB721TierFlags({
|
|
575
|
+
allowOwnerMint: tierConfigs[i].flags.allowOwnerMint,
|
|
576
|
+
transfersPausable: tierConfigs[i].flags.transfersPausable,
|
|
577
|
+
cantBeRemoved: tierConfigs[i].flags.cantBeRemoved,
|
|
578
|
+
cantIncreaseDiscountPercent: tierConfigs[i].flags.cantIncreaseDiscountPercent,
|
|
579
|
+
cantBuyWithCredits: tierConfigs[i].flags.cantBuyWithCredits
|
|
580
|
+
}),
|
|
575
581
|
splitPercent: 0,
|
|
576
582
|
resolvedUri: ""
|
|
577
583
|
});
|
|
@@ -680,13 +686,15 @@ contract Test_adjustTier_Unit is UnitTestSetup {
|
|
|
680
686
|
encodedIPFSUri: tokenUris[0],
|
|
681
687
|
category: uint24(100),
|
|
682
688
|
discountPercent: uint8(0),
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
689
|
+
flags: JB721TierConfigFlags({
|
|
690
|
+
allowOwnerMint: false,
|
|
691
|
+
useReserveBeneficiaryAsDefault: false,
|
|
692
|
+
transfersPausable: false,
|
|
693
|
+
useVotingUnits: true,
|
|
694
|
+
cantBeRemoved: false,
|
|
695
|
+
cantIncreaseDiscountPercent: false,
|
|
696
|
+
cantBuyWithCredits: false
|
|
697
|
+
}),
|
|
690
698
|
splitPercent: 0,
|
|
691
699
|
splits: new JBSplit[](0)
|
|
692
700
|
});
|
|
@@ -702,11 +710,13 @@ contract Test_adjustTier_Unit is UnitTestSetup {
|
|
|
702
710
|
encodedIPFSUri: tierConfigs[i].encodedIPFSUri,
|
|
703
711
|
category: tierConfigs[i].category,
|
|
704
712
|
discountPercent: tierConfigs[i].discountPercent,
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
713
|
+
flags: JB721TierFlags({
|
|
714
|
+
allowOwnerMint: tierConfigs[i].flags.allowOwnerMint,
|
|
715
|
+
transfersPausable: tierConfigs[i].flags.transfersPausable,
|
|
716
|
+
cantBeRemoved: tierConfigs[i].flags.cantBeRemoved,
|
|
717
|
+
cantIncreaseDiscountPercent: tierConfigs[i].flags.cantIncreaseDiscountPercent,
|
|
718
|
+
cantBuyWithCredits: tierConfigs[i].flags.cantBuyWithCredits
|
|
719
|
+
}),
|
|
710
720
|
splitPercent: 0,
|
|
711
721
|
resolvedUri: ""
|
|
712
722
|
});
|
|
@@ -751,13 +761,15 @@ contract Test_adjustTier_Unit is UnitTestSetup {
|
|
|
751
761
|
encodedIPFSUri: tokenUris[0],
|
|
752
762
|
category: uint24(100),
|
|
753
763
|
discountPercent: uint8(0),
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
764
|
+
flags: JB721TierConfigFlags({
|
|
765
|
+
allowOwnerMint: false,
|
|
766
|
+
useReserveBeneficiaryAsDefault: false,
|
|
767
|
+
transfersPausable: false,
|
|
768
|
+
useVotingUnits: true,
|
|
769
|
+
cantBeRemoved: false,
|
|
770
|
+
cantIncreaseDiscountPercent: false,
|
|
771
|
+
cantBuyWithCredits: false
|
|
772
|
+
}),
|
|
761
773
|
splitPercent: 0,
|
|
762
774
|
splits: new JBSplit[](0)
|
|
763
775
|
});
|
|
@@ -773,11 +785,13 @@ contract Test_adjustTier_Unit is UnitTestSetup {
|
|
|
773
785
|
encodedIPFSUri: tierConfigsRemaining[arrayIndex].encodedIPFSUri,
|
|
774
786
|
category: tierConfigsRemaining[arrayIndex].category,
|
|
775
787
|
discountPercent: tierConfigsRemaining[arrayIndex].discountPercent,
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
788
|
+
flags: JB721TierFlags({
|
|
789
|
+
allowOwnerMint: tierConfigsRemaining[arrayIndex].flags.allowOwnerMint,
|
|
790
|
+
transfersPausable: tierConfigsRemaining[arrayIndex].flags.transfersPausable,
|
|
791
|
+
cantBeRemoved: tierConfigsRemaining[arrayIndex].flags.cantBeRemoved,
|
|
792
|
+
cantIncreaseDiscountPercent: tierConfigsRemaining[arrayIndex].flags.cantIncreaseDiscountPercent,
|
|
793
|
+
cantBuyWithCredits: tierConfigsRemaining[arrayIndex].flags.cantBuyWithCredits
|
|
794
|
+
}),
|
|
781
795
|
splitPercent: 0,
|
|
782
796
|
resolvedUri: ""
|
|
783
797
|
});
|
|
@@ -804,13 +818,15 @@ contract Test_adjustTier_Unit is UnitTestSetup {
|
|
|
804
818
|
// forge-lint: disable-next-line(unsafe-typecast)
|
|
805
819
|
category: uint24(100 + i),
|
|
806
820
|
discountPercent: uint8(0),
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
821
|
+
flags: JB721TierConfigFlags({
|
|
822
|
+
allowOwnerMint: false,
|
|
823
|
+
useReserveBeneficiaryAsDefault: false,
|
|
824
|
+
transfersPausable: false,
|
|
825
|
+
useVotingUnits: true,
|
|
826
|
+
cantBeRemoved: false,
|
|
827
|
+
cantIncreaseDiscountPercent: false,
|
|
828
|
+
cantBuyWithCredits: false
|
|
829
|
+
}),
|
|
814
830
|
splitPercent: 0,
|
|
815
831
|
splits: new JBSplit[](0)
|
|
816
832
|
});
|
|
@@ -825,11 +841,13 @@ contract Test_adjustTier_Unit is UnitTestSetup {
|
|
|
825
841
|
encodedIPFSUri: tierConfigsToAdd[i].encodedIPFSUri,
|
|
826
842
|
category: tierConfigsToAdd[i].category,
|
|
827
843
|
discountPercent: tierConfigsToAdd[i].discountPercent,
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
844
|
+
flags: JB721TierFlags({
|
|
845
|
+
allowOwnerMint: tierConfigsToAdd[i].flags.allowOwnerMint,
|
|
846
|
+
transfersPausable: tierConfigsToAdd[i].flags.transfersPausable,
|
|
847
|
+
cantBeRemoved: tierConfigsToAdd[i].flags.cantBeRemoved,
|
|
848
|
+
cantIncreaseDiscountPercent: tierConfigsToAdd[i].flags.cantIncreaseDiscountPercent,
|
|
849
|
+
cantBuyWithCredits: tierConfigsToAdd[i].flags.cantBuyWithCredits
|
|
850
|
+
}),
|
|
833
851
|
splitPercent: 0,
|
|
834
852
|
resolvedUri: ""
|
|
835
853
|
});
|
|
@@ -882,13 +900,15 @@ contract Test_adjustTier_Unit is UnitTestSetup {
|
|
|
882
900
|
encodedIPFSUri: tokenUris[0],
|
|
883
901
|
category: uint24(100),
|
|
884
902
|
discountPercent: uint8(0),
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
903
|
+
flags: JB721TierConfigFlags({
|
|
904
|
+
allowOwnerMint: false,
|
|
905
|
+
useReserveBeneficiaryAsDefault: false,
|
|
906
|
+
transfersPausable: false,
|
|
907
|
+
useVotingUnits: true,
|
|
908
|
+
cantBeRemoved: false,
|
|
909
|
+
cantIncreaseDiscountPercent: false,
|
|
910
|
+
cantBuyWithCredits: false
|
|
911
|
+
}),
|
|
892
912
|
splitPercent: 0,
|
|
893
913
|
splits: new JBSplit[](0)
|
|
894
914
|
});
|
|
@@ -904,11 +924,13 @@ contract Test_adjustTier_Unit is UnitTestSetup {
|
|
|
904
924
|
encodedIPFSUri: tierConfigs[i].encodedIPFSUri,
|
|
905
925
|
category: tierConfigs[i].category,
|
|
906
926
|
discountPercent: tierConfigs[i].discountPercent,
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
927
|
+
flags: JB721TierFlags({
|
|
928
|
+
allowOwnerMint: tierConfigs[i].flags.allowOwnerMint,
|
|
929
|
+
transfersPausable: tierConfigs[i].flags.transfersPausable,
|
|
930
|
+
cantBeRemoved: tierConfigs[i].flags.cantBeRemoved,
|
|
931
|
+
cantIncreaseDiscountPercent: tierConfigs[i].flags.cantIncreaseDiscountPercent,
|
|
932
|
+
cantBuyWithCredits: tierConfigs[i].flags.cantBuyWithCredits
|
|
933
|
+
}),
|
|
912
934
|
splitPercent: 0,
|
|
913
935
|
resolvedUri: ""
|
|
914
936
|
});
|
|
@@ -952,13 +974,15 @@ contract Test_adjustTier_Unit is UnitTestSetup {
|
|
|
952
974
|
encodedIPFSUri: tokenUris[0],
|
|
953
975
|
category: uint24(100),
|
|
954
976
|
discountPercent: uint8(0),
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
977
|
+
flags: JB721TierConfigFlags({
|
|
978
|
+
allowOwnerMint: false,
|
|
979
|
+
useReserveBeneficiaryAsDefault: false,
|
|
980
|
+
transfersPausable: false,
|
|
981
|
+
useVotingUnits: true,
|
|
982
|
+
cantBeRemoved: false,
|
|
983
|
+
cantIncreaseDiscountPercent: false,
|
|
984
|
+
cantBuyWithCredits: false
|
|
985
|
+
}),
|
|
962
986
|
splitPercent: 0,
|
|
963
987
|
splits: new JBSplit[](0)
|
|
964
988
|
});
|
|
@@ -973,11 +997,13 @@ contract Test_adjustTier_Unit is UnitTestSetup {
|
|
|
973
997
|
encodedIPFSUri: tierConfigsToAdd[i].encodedIPFSUri,
|
|
974
998
|
category: tierConfigsToAdd[i].category,
|
|
975
999
|
discountPercent: tierConfigsToAdd[i].discountPercent,
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
1000
|
+
flags: JB721TierFlags({
|
|
1001
|
+
allowOwnerMint: tierConfigsToAdd[i].flags.allowOwnerMint,
|
|
1002
|
+
transfersPausable: tierConfigsToAdd[i].flags.transfersPausable,
|
|
1003
|
+
cantBeRemoved: tierConfigsToAdd[i].flags.cantBeRemoved,
|
|
1004
|
+
cantIncreaseDiscountPercent: tierConfigsToAdd[i].flags.cantIncreaseDiscountPercent,
|
|
1005
|
+
cantBuyWithCredits: tierConfigsToAdd[i].flags.cantBuyWithCredits
|
|
1006
|
+
}),
|
|
981
1007
|
splitPercent: 0,
|
|
982
1008
|
resolvedUri: ""
|
|
983
1009
|
});
|
|
@@ -1014,13 +1040,15 @@ contract Test_adjustTier_Unit is UnitTestSetup {
|
|
|
1014
1040
|
encodedIPFSUri: tokenUris[0],
|
|
1015
1041
|
category: uint24(100),
|
|
1016
1042
|
discountPercent: uint8(0),
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1043
|
+
flags: JB721TierConfigFlags({
|
|
1044
|
+
allowOwnerMint: false,
|
|
1045
|
+
useReserveBeneficiaryAsDefault: false,
|
|
1046
|
+
transfersPausable: false,
|
|
1047
|
+
useVotingUnits: true,
|
|
1048
|
+
cantBeRemoved: false,
|
|
1049
|
+
cantIncreaseDiscountPercent: false,
|
|
1050
|
+
cantBuyWithCredits: false
|
|
1051
|
+
}),
|
|
1024
1052
|
splitPercent: 0,
|
|
1025
1053
|
splits: new JBSplit[](0)
|
|
1026
1054
|
});
|
|
@@ -1036,11 +1064,13 @@ contract Test_adjustTier_Unit is UnitTestSetup {
|
|
|
1036
1064
|
encodedIPFSUri: tierConfigs[i].encodedIPFSUri,
|
|
1037
1065
|
category: tierConfigs[i].category,
|
|
1038
1066
|
discountPercent: tierConfigs[i].discountPercent,
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1067
|
+
flags: JB721TierFlags({
|
|
1068
|
+
allowOwnerMint: tierConfigs[i].flags.allowOwnerMint,
|
|
1069
|
+
transfersPausable: tierConfigs[i].flags.transfersPausable,
|
|
1070
|
+
cantBeRemoved: tierConfigs[i].flags.cantBeRemoved,
|
|
1071
|
+
cantIncreaseDiscountPercent: tierConfigs[i].flags.cantIncreaseDiscountPercent,
|
|
1072
|
+
cantBuyWithCredits: tierConfigs[i].flags.cantBuyWithCredits
|
|
1073
|
+
}),
|
|
1044
1074
|
splitPercent: 0,
|
|
1045
1075
|
resolvedUri: ""
|
|
1046
1076
|
});
|
|
@@ -1083,13 +1113,15 @@ contract Test_adjustTier_Unit is UnitTestSetup {
|
|
|
1083
1113
|
encodedIPFSUri: tokenUris[0],
|
|
1084
1114
|
category: uint24(100),
|
|
1085
1115
|
discountPercent: uint8(0),
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1116
|
+
flags: JB721TierConfigFlags({
|
|
1117
|
+
allowOwnerMint: false,
|
|
1118
|
+
useReserveBeneficiaryAsDefault: false,
|
|
1119
|
+
transfersPausable: false,
|
|
1120
|
+
useVotingUnits: true,
|
|
1121
|
+
cantBeRemoved: false,
|
|
1122
|
+
cantIncreaseDiscountPercent: false,
|
|
1123
|
+
cantBuyWithCredits: false
|
|
1124
|
+
}),
|
|
1093
1125
|
splitPercent: 0,
|
|
1094
1126
|
splits: new JBSplit[](0)
|
|
1095
1127
|
});
|
|
@@ -1104,11 +1136,13 @@ contract Test_adjustTier_Unit is UnitTestSetup {
|
|
|
1104
1136
|
encodedIPFSUri: tierConfigsToAdd[i].encodedIPFSUri,
|
|
1105
1137
|
category: tierConfigsToAdd[i].category,
|
|
1106
1138
|
discountPercent: tierConfigsToAdd[i].discountPercent,
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1139
|
+
flags: JB721TierFlags({
|
|
1140
|
+
allowOwnerMint: tierConfigsToAdd[i].flags.allowOwnerMint,
|
|
1141
|
+
transfersPausable: tierConfigsToAdd[i].flags.transfersPausable,
|
|
1142
|
+
cantBeRemoved: tierConfigsToAdd[i].flags.cantBeRemoved,
|
|
1143
|
+
cantIncreaseDiscountPercent: tierConfigsToAdd[i].flags.cantIncreaseDiscountPercent,
|
|
1144
|
+
cantBuyWithCredits: tierConfigsToAdd[i].flags.cantBuyWithCredits
|
|
1145
|
+
}),
|
|
1112
1146
|
splitPercent: 0,
|
|
1113
1147
|
resolvedUri: ""
|
|
1114
1148
|
});
|
|
@@ -1140,13 +1174,15 @@ contract Test_adjustTier_Unit is UnitTestSetup {
|
|
|
1140
1174
|
encodedIPFSUri: tokenUris[0],
|
|
1141
1175
|
category: uint24(100),
|
|
1142
1176
|
discountPercent: uint8(0),
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1177
|
+
flags: JB721TierConfigFlags({
|
|
1178
|
+
allowOwnerMint: false,
|
|
1179
|
+
useReserveBeneficiaryAsDefault: false,
|
|
1180
|
+
transfersPausable: false,
|
|
1181
|
+
useVotingUnits: true,
|
|
1182
|
+
cantBeRemoved: true,
|
|
1183
|
+
cantIncreaseDiscountPercent: false,
|
|
1184
|
+
cantBuyWithCredits: false
|
|
1185
|
+
}),
|
|
1150
1186
|
splitPercent: 0,
|
|
1151
1187
|
splits: new JBSplit[](0)
|
|
1152
1188
|
});
|
|
@@ -1159,13 +1195,15 @@ contract Test_adjustTier_Unit is UnitTestSetup {
|
|
|
1159
1195
|
encodedIPFSUri: tokenUris[0],
|
|
1160
1196
|
category: uint24(100),
|
|
1161
1197
|
discountPercent: uint8(0),
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1198
|
+
flags: JB721TierConfigFlags({
|
|
1199
|
+
allowOwnerMint: false,
|
|
1200
|
+
useReserveBeneficiaryAsDefault: false,
|
|
1201
|
+
transfersPausable: false,
|
|
1202
|
+
useVotingUnits: true,
|
|
1203
|
+
cantBeRemoved: false,
|
|
1204
|
+
cantIncreaseDiscountPercent: false,
|
|
1205
|
+
cantBuyWithCredits: false
|
|
1206
|
+
}),
|
|
1169
1207
|
splitPercent: 0,
|
|
1170
1208
|
splits: new JBSplit[](0)
|
|
1171
1209
|
});
|
|
@@ -1216,13 +1254,15 @@ contract Test_adjustTier_Unit is UnitTestSetup {
|
|
|
1216
1254
|
encodedIPFSUri: tokenUris[0],
|
|
1217
1255
|
category: uint24(100),
|
|
1218
1256
|
discountPercent: uint8(0),
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1257
|
+
flags: JB721TierConfigFlags({
|
|
1258
|
+
allowOwnerMint: false,
|
|
1259
|
+
useReserveBeneficiaryAsDefault: false,
|
|
1260
|
+
transfersPausable: false,
|
|
1261
|
+
useVotingUnits: true,
|
|
1262
|
+
cantBeRemoved: false,
|
|
1263
|
+
cantIncreaseDiscountPercent: false,
|
|
1264
|
+
cantBuyWithCredits: false
|
|
1265
|
+
}),
|
|
1226
1266
|
splitPercent: 0,
|
|
1227
1267
|
splits: new JBSplit[](0)
|
|
1228
1268
|
});
|
|
@@ -1238,11 +1278,13 @@ contract Test_adjustTier_Unit is UnitTestSetup {
|
|
|
1238
1278
|
encodedIPFSUri: tierConfigs[i].encodedIPFSUri,
|
|
1239
1279
|
category: tierConfigs[i].category,
|
|
1240
1280
|
discountPercent: tierConfigs[i].discountPercent,
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1281
|
+
flags: JB721TierFlags({
|
|
1282
|
+
allowOwnerMint: tierConfigs[i].flags.allowOwnerMint,
|
|
1283
|
+
transfersPausable: tierConfigs[i].flags.transfersPausable,
|
|
1284
|
+
cantBeRemoved: tierConfigs[i].flags.cantBeRemoved,
|
|
1285
|
+
cantIncreaseDiscountPercent: tierConfigs[i].flags.cantIncreaseDiscountPercent,
|
|
1286
|
+
cantBuyWithCredits: tierConfigs[i].flags.cantBuyWithCredits
|
|
1287
|
+
}),
|
|
1246
1288
|
splitPercent: 0,
|
|
1247
1289
|
resolvedUri: ""
|
|
1248
1290
|
});
|
|
@@ -1284,13 +1326,15 @@ contract Test_adjustTier_Unit is UnitTestSetup {
|
|
|
1284
1326
|
encodedIPFSUri: tokenUris[0],
|
|
1285
1327
|
category: uint24(100),
|
|
1286
1328
|
discountPercent: uint8(0),
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1329
|
+
flags: JB721TierConfigFlags({
|
|
1330
|
+
allowOwnerMint: false,
|
|
1331
|
+
useReserveBeneficiaryAsDefault: false,
|
|
1332
|
+
transfersPausable: false,
|
|
1333
|
+
useVotingUnits: false,
|
|
1334
|
+
cantBeRemoved: false,
|
|
1335
|
+
cantIncreaseDiscountPercent: false,
|
|
1336
|
+
cantBuyWithCredits: false
|
|
1337
|
+
}),
|
|
1294
1338
|
splitPercent: 0,
|
|
1295
1339
|
splits: new JBSplit[](0)
|
|
1296
1340
|
});
|
|
@@ -1305,11 +1349,13 @@ contract Test_adjustTier_Unit is UnitTestSetup {
|
|
|
1305
1349
|
encodedIPFSUri: tierConfigsToAdd[i].encodedIPFSUri,
|
|
1306
1350
|
category: tierConfigsToAdd[i].category,
|
|
1307
1351
|
discountPercent: tierConfigsToAdd[i].discountPercent,
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1352
|
+
flags: JB721TierFlags({
|
|
1353
|
+
allowOwnerMint: tierConfigsToAdd[i].flags.allowOwnerMint,
|
|
1354
|
+
transfersPausable: tierConfigsToAdd[i].flags.transfersPausable,
|
|
1355
|
+
cantBeRemoved: tierConfigsToAdd[i].flags.cantBeRemoved,
|
|
1356
|
+
cantIncreaseDiscountPercent: tierConfigsToAdd[i].flags.cantIncreaseDiscountPercent,
|
|
1357
|
+
cantBuyWithCredits: tierConfigsToAdd[i].flags.cantBuyWithCredits
|
|
1358
|
+
}),
|
|
1313
1359
|
splitPercent: 0,
|
|
1314
1360
|
resolvedUri: ""
|
|
1315
1361
|
});
|
|
@@ -1348,13 +1394,15 @@ contract Test_adjustTier_Unit is UnitTestSetup {
|
|
|
1348
1394
|
encodedIPFSUri: tokenUris[0],
|
|
1349
1395
|
category: uint24(100),
|
|
1350
1396
|
discountPercent: uint8(0),
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1397
|
+
flags: JB721TierConfigFlags({
|
|
1398
|
+
allowOwnerMint: false,
|
|
1399
|
+
useReserveBeneficiaryAsDefault: false,
|
|
1400
|
+
transfersPausable: false,
|
|
1401
|
+
useVotingUnits: true,
|
|
1402
|
+
cantBeRemoved: false,
|
|
1403
|
+
cantIncreaseDiscountPercent: false,
|
|
1404
|
+
cantBuyWithCredits: false
|
|
1405
|
+
}),
|
|
1358
1406
|
splitPercent: 0,
|
|
1359
1407
|
splits: new JBSplit[](0)
|
|
1360
1408
|
});
|
|
@@ -1392,13 +1440,15 @@ contract Test_adjustTier_Unit is UnitTestSetup {
|
|
|
1392
1440
|
encodedIPFSUri: tokenUris[0],
|
|
1393
1441
|
category: uint24(100),
|
|
1394
1442
|
discountPercent: uint8(0),
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1443
|
+
flags: JB721TierConfigFlags({
|
|
1444
|
+
allowOwnerMint: false,
|
|
1445
|
+
useReserveBeneficiaryAsDefault: false,
|
|
1446
|
+
transfersPausable: false,
|
|
1447
|
+
useVotingUnits: false,
|
|
1448
|
+
cantBeRemoved: false,
|
|
1449
|
+
cantIncreaseDiscountPercent: false,
|
|
1450
|
+
cantBuyWithCredits: false
|
|
1451
|
+
}),
|
|
1402
1452
|
splitPercent: 0,
|
|
1403
1453
|
splits: new JBSplit[](0)
|
|
1404
1454
|
});
|
|
@@ -1442,13 +1492,15 @@ contract Test_adjustTier_Unit is UnitTestSetup {
|
|
|
1442
1492
|
encodedIPFSUri: tokenUris[0],
|
|
1443
1493
|
category: uint24(100),
|
|
1444
1494
|
discountPercent: uint8(0),
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1495
|
+
flags: JB721TierConfigFlags({
|
|
1496
|
+
allowOwnerMint: false,
|
|
1497
|
+
useReserveBeneficiaryAsDefault: false,
|
|
1498
|
+
transfersPausable: false,
|
|
1499
|
+
useVotingUnits: false, // <-- If false, voting power is based on tier price
|
|
1500
|
+
cantBeRemoved: false,
|
|
1501
|
+
cantIncreaseDiscountPercent: false,
|
|
1502
|
+
cantBuyWithCredits: false
|
|
1503
|
+
}),
|
|
1452
1504
|
splitPercent: 0,
|
|
1453
1505
|
splits: new JBSplit[](0)
|
|
1454
1506
|
});
|
|
@@ -1486,13 +1538,15 @@ contract Test_adjustTier_Unit is UnitTestSetup {
|
|
|
1486
1538
|
encodedIPFSUri: tokenUris[0],
|
|
1487
1539
|
category: uint24(100),
|
|
1488
1540
|
discountPercent: uint8(0),
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1541
|
+
flags: JB721TierConfigFlags({
|
|
1542
|
+
allowOwnerMint: false,
|
|
1543
|
+
useReserveBeneficiaryAsDefault: false,
|
|
1544
|
+
transfersPausable: false,
|
|
1545
|
+
useVotingUnits: true,
|
|
1546
|
+
cantBeRemoved: false,
|
|
1547
|
+
cantIncreaseDiscountPercent: false,
|
|
1548
|
+
cantBuyWithCredits: false
|
|
1549
|
+
}),
|
|
1496
1550
|
splitPercent: 0,
|
|
1497
1551
|
splits: new JBSplit[](0)
|
|
1498
1552
|
});
|
|
@@ -1536,13 +1590,15 @@ contract Test_adjustTier_Unit is UnitTestSetup {
|
|
|
1536
1590
|
encodedIPFSUri: tokenUris[0],
|
|
1537
1591
|
category: uint24(100),
|
|
1538
1592
|
discountPercent: uint8(0),
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1593
|
+
flags: JB721TierConfigFlags({
|
|
1594
|
+
allowOwnerMint: false,
|
|
1595
|
+
useReserveBeneficiaryAsDefault: false,
|
|
1596
|
+
transfersPausable: false,
|
|
1597
|
+
useVotingUnits: true, // <-- If false, voting power is based on tier price
|
|
1598
|
+
cantBeRemoved: false,
|
|
1599
|
+
cantIncreaseDiscountPercent: false,
|
|
1600
|
+
cantBuyWithCredits: false
|
|
1601
|
+
}),
|
|
1546
1602
|
splitPercent: 0,
|
|
1547
1603
|
splits: new JBSplit[](0)
|
|
1548
1604
|
});
|
|
@@ -1612,13 +1668,15 @@ contract Test_adjustTier_Unit is UnitTestSetup {
|
|
|
1612
1668
|
encodedIPFSUri: tokenUris[0],
|
|
1613
1669
|
category: uint24(100),
|
|
1614
1670
|
discountPercent: uint8(0),
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1671
|
+
flags: JB721TierConfigFlags({
|
|
1672
|
+
allowOwnerMint: false,
|
|
1673
|
+
useReserveBeneficiaryAsDefault: false,
|
|
1674
|
+
transfersPausable: false,
|
|
1675
|
+
useVotingUnits: false,
|
|
1676
|
+
cantBeRemoved: false,
|
|
1677
|
+
cantIncreaseDiscountPercent: false,
|
|
1678
|
+
cantBuyWithCredits: false
|
|
1679
|
+
}),
|
|
1622
1680
|
splitPercent: 0,
|
|
1623
1681
|
splits: new JBSplit[](0)
|
|
1624
1682
|
});
|
|
@@ -1634,11 +1692,13 @@ contract Test_adjustTier_Unit is UnitTestSetup {
|
|
|
1634
1692
|
encodedIPFSUri: tierConfigs[i].encodedIPFSUri,
|
|
1635
1693
|
category: tierConfigs[i].category,
|
|
1636
1694
|
discountPercent: tierConfigs[i].discountPercent,
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1695
|
+
flags: JB721TierFlags({
|
|
1696
|
+
allowOwnerMint: tierConfigs[i].flags.allowOwnerMint,
|
|
1697
|
+
transfersPausable: tierConfigs[i].flags.transfersPausable,
|
|
1698
|
+
cantBeRemoved: tierConfigs[i].flags.cantBeRemoved,
|
|
1699
|
+
cantIncreaseDiscountPercent: tierConfigs[i].flags.cantIncreaseDiscountPercent,
|
|
1700
|
+
cantBuyWithCredits: tierConfigs[i].flags.cantBuyWithCredits
|
|
1701
|
+
}),
|
|
1642
1702
|
splitPercent: 0,
|
|
1643
1703
|
resolvedUri: ""
|
|
1644
1704
|
});
|
|
@@ -1743,13 +1803,15 @@ contract Test_adjustTier_Unit is UnitTestSetup {
|
|
|
1743
1803
|
encodedIPFSUri: tokenUris[0],
|
|
1744
1804
|
category: uint24(100),
|
|
1745
1805
|
discountPercent: uint8(0),
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1806
|
+
flags: JB721TierConfigFlags({
|
|
1807
|
+
allowOwnerMint: false,
|
|
1808
|
+
useReserveBeneficiaryAsDefault: false,
|
|
1809
|
+
transfersPausable: false,
|
|
1810
|
+
useVotingUnits: true,
|
|
1811
|
+
cantBeRemoved: true,
|
|
1812
|
+
cantIncreaseDiscountPercent: true,
|
|
1813
|
+
cantBuyWithCredits: false
|
|
1814
|
+
}),
|
|
1753
1815
|
splitPercent: 0,
|
|
1754
1816
|
splits: new JBSplit[](0)
|
|
1755
1817
|
});
|
|
@@ -1799,13 +1861,15 @@ contract Test_adjustTier_Unit is UnitTestSetup {
|
|
|
1799
1861
|
encodedIPFSUri: tokenUris[0],
|
|
1800
1862
|
category: uint24(100),
|
|
1801
1863
|
discountPercent: uint8(0),
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1864
|
+
flags: JB721TierConfigFlags({
|
|
1865
|
+
allowOwnerMint: false,
|
|
1866
|
+
useReserveBeneficiaryAsDefault: false,
|
|
1867
|
+
transfersPausable: false,
|
|
1868
|
+
useVotingUnits: true,
|
|
1869
|
+
cantBeRemoved: true,
|
|
1870
|
+
cantIncreaseDiscountPercent: true,
|
|
1871
|
+
cantBuyWithCredits: false
|
|
1872
|
+
}),
|
|
1809
1873
|
splitPercent: 0,
|
|
1810
1874
|
splits: new JBSplit[](0)
|
|
1811
1875
|
});
|
|
@@ -1818,13 +1882,15 @@ contract Test_adjustTier_Unit is UnitTestSetup {
|
|
|
1818
1882
|
encodedIPFSUri: tokenUris[0],
|
|
1819
1883
|
category: uint24(100),
|
|
1820
1884
|
discountPercent: uint8(0),
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1885
|
+
flags: JB721TierConfigFlags({
|
|
1886
|
+
allowOwnerMint: false,
|
|
1887
|
+
useReserveBeneficiaryAsDefault: false,
|
|
1888
|
+
transfersPausable: false,
|
|
1889
|
+
useVotingUnits: true,
|
|
1890
|
+
cantBeRemoved: true,
|
|
1891
|
+
cantIncreaseDiscountPercent: false,
|
|
1892
|
+
cantBuyWithCredits: false
|
|
1893
|
+
}),
|
|
1828
1894
|
splitPercent: 0,
|
|
1829
1895
|
splits: new JBSplit[](0)
|
|
1830
1896
|
});
|