@bananapus/core-v6 0.0.14 → 0.0.16
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 +4 -0
- package/README.md +2 -2
- package/SKILLS.md +2 -0
- package/STYLE_GUIDE.md +150 -43
- package/foundry.toml +3 -3
- package/package.json +4 -4
- package/remappings.txt +1 -1
- package/script/Deploy.s.sol +23 -16
- package/script/DeployPeriphery.s.sol +71 -66
- package/script/helpers/CoreDeploymentLib.sol +84 -37
- package/src/JBChainlinkV3PriceFeed.sol +1 -0
- package/src/JBController.sol +19 -4
- package/src/JBERC20.sol +12 -3
- package/src/JBFundAccessLimits.sol +12 -2
- package/src/JBMultiTerminal.sol +3 -1
- package/src/JBPermissions.sol +1 -0
- package/src/JBProjects.sol +1 -1
- package/src/JBRulesets.sol +11 -0
- package/src/JBSplits.sol +5 -0
- package/src/JBTerminalStore.sol +3 -0
- package/src/JBTokens.sol +40 -4
- package/src/interfaces/IJBController.sol +6 -1
- package/src/interfaces/IJBPayoutTerminal.sol +0 -1
- package/src/interfaces/IJBPermitTerminal.sol +1 -0
- package/src/interfaces/IJBToken.sol +5 -0
- package/src/interfaces/IJBTokens.sol +13 -0
- package/src/libraries/JBMetadataResolver.sol +7 -3
- package/src/libraries/JBRulesetMetadataResolver.sol +21 -21
- package/src/structs/JBAccountingContext.sol +1 -0
- package/src/structs/JBAfterCashOutRecordedContext.sol +1 -0
- package/src/structs/JBAfterPayRecordedContext.sol +1 -0
- package/src/structs/JBBeforeCashOutRecordedContext.sol +1 -0
- package/src/structs/JBBeforePayRecordedContext.sol +1 -0
- package/src/structs/JBCashOutHookSpecification.sol +1 -0
- package/src/structs/JBCurrencyAmount.sol +1 -0
- package/src/structs/JBFee.sol +1 -0
- package/src/structs/JBFundAccessLimitGroup.sol +1 -0
- package/src/structs/JBPayHookSpecification.sol +1 -0
- package/src/structs/JBPermissionsData.sol +1 -0
- package/src/structs/JBRuleset.sol +1 -0
- package/src/structs/JBRulesetConfig.sol +1 -0
- package/src/structs/JBRulesetMetadata.sol +1 -0
- package/src/structs/JBRulesetWeightCache.sol +1 -0
- package/src/structs/JBRulesetWithMetadata.sol +1 -0
- package/src/structs/JBSingleAllowance.sol +1 -0
- package/src/structs/JBSplit.sol +1 -0
- package/src/structs/JBSplitGroup.sol +1 -0
- package/src/structs/JBSplitHookContext.sol +1 -0
- package/src/structs/JBTerminalConfig.sol +1 -0
- package/src/structs/JBTokenAmount.sol +1 -0
- package/test/ComprehensiveInvariant.t.sol +15 -5
- package/test/{AuditExploits.t.sol → CoreExploitTests.t.sol} +35 -4
- package/test/EconomicSimulation.t.sol +10 -2
- package/test/EntryPointPermutations.t.sol +18 -5
- package/test/FlashLoanAttacks.t.sol +12 -2
- package/test/PermissionEscalation.t.sol +54 -22
- package/test/RulesetTransitions.t.sol +15 -1
- package/test/SplitLoopTests.t.sol +26 -5
- package/test/TestAccessToFunds.sol +17 -2
- package/test/TestCashOut.sol +15 -2
- package/test/TestCashOutCountFor.sol +1 -2
- package/test/TestCashOutHooks.sol +47 -25
- package/test/TestCashOutTimingEdge.sol +13 -1
- package/test/TestDurationUnderflow.sol +13 -1
- package/test/TestFeeProcessingFailure.sol +17 -7
- package/test/TestFees.sol +14 -1
- package/test/TestInterfaceSupport.sol +20 -1
- package/test/TestJBERC20Inheritance.sol +11 -1
- package/test/TestLaunchProject.sol +13 -1
- package/test/TestMetaTx.sol +15 -1
- package/test/TestMetadataParserLib.sol +37 -4
- package/test/TestMigrationHeldFees.sol +17 -11
- package/test/TestMintTokensOf.sol +14 -1
- package/test/TestMultiTokenSurplus.sol +14 -1
- package/test/TestMultipleAccessLimits.sol +23 -1
- package/test/TestPayBurnRedeemFlow.sol +16 -1
- package/test/TestPayHooks.sol +33 -14
- package/test/TestPermissions.sol +20 -1
- package/test/TestPermissionsEdge.sol +5 -1
- package/test/TestPermit2Terminal.sol +36 -3
- package/test/TestRulesetQueueing.sol +24 -1
- package/test/TestRulesetQueuingStress.sol +28 -2
- package/test/TestRulesetWeightCaching.sol +5 -2
- package/test/TestSplits.sol +23 -1
- package/test/TestTerminalMigration.sol +11 -1
- package/test/TestTokenFlow.sol +18 -1
- package/test/TestWeightCacheStaleAfterRejection.sol +15 -1
- package/test/WeirdTokenTests.t.sol +18 -2
- package/test/fork/TestChainlinkPriceFeedFork.sol +254 -0
- package/test/formal/BondingCurveProperties.t.sol +8 -2
- package/test/formal/FeeProperties.t.sol +7 -1
- package/test/helpers/JBTest.sol +7 -7
- package/test/helpers/TestBaseWorkflow.sol +84 -1
- package/test/invariants/Phase3DeepInvariant.t.sol +13 -5
- package/test/invariants/RulesetsInvariant.t.sol +12 -2
- package/test/invariants/TerminalStoreInvariant.t.sol +11 -2
- package/test/invariants/TokensInvariant.t.sol +13 -2
- package/test/invariants/handlers/ComprehensiveHandler.sol +19 -1
- package/test/invariants/handlers/EconomicHandler.sol +31 -1
- package/test/invariants/handlers/Phase3Handler.sol +31 -2
- package/test/invariants/handlers/RulesetsHandler.sol +5 -1
- package/test/invariants/handlers/TerminalStoreHandler.sol +6 -1
- package/test/invariants/handlers/TokensHandler.sol +1 -2
- package/test/mock/ERC2771ForwarderMock.sol +1 -1
- package/test/mock/MockERC20.sol +1 -3
- package/test/mock/MockMaliciousBeneficiary.sol +2 -2
- package/test/mock/MockMaliciousSplitHook.sol +2 -1
- package/test/mock/MockPriceFeed.sol +1 -1
- package/test/units/static/JBChainlinkV3PriceFeed/TestPriceFeed.sol +0 -1
- package/test/units/static/JBController/JBControllerSetup.sol +10 -1
- package/test/units/static/JBController/TestBurnTokensOf.sol +8 -1
- package/test/units/static/JBController/TestClaimTokensFor.sol +4 -1
- package/test/units/static/JBController/TestDeployErc20For.sol +7 -1
- package/test/units/static/JBController/TestLaunchProjectFor.sol +21 -1
- package/test/units/static/JBController/TestLaunchRulesetsFor.sol +21 -1
- package/test/units/static/JBController/TestMigrateController.sol +10 -1
- package/test/units/static/JBController/TestMintTokensOfUnits.sol +10 -1
- package/test/units/static/JBController/TestPayReservedTokenToTerminal.sol +4 -1
- package/test/units/static/JBController/TestReceiveMigrationFrom.sol +5 -1
- package/test/units/static/JBController/TestRulesetViews.sol +7 -1
- package/test/units/static/JBController/TestSendReservedTokensToSplitsOf.sol +21 -1
- package/test/units/static/JBController/TestSetSplitGroupsOf.sol +6 -1
- package/test/units/static/JBController/TestSetTokenFor.sol +13 -1
- package/test/units/static/JBController/TestSetUriOf.sol +5 -1
- package/test/units/static/JBController/TestTransferCreditsFrom.sol +11 -1
- package/test/units/static/JBDeadline/TestDeadlineFuzz.sol +15 -4
- package/test/units/static/JBDirectory/JBDirectorySetup.sol +4 -1
- package/test/units/static/JBDirectory/TestPrimaryTerminalOf.sol +5 -1
- package/test/units/static/JBDirectory/TestSetControllerOf.sol +11 -1
- package/test/units/static/JBDirectory/TestSetControllerOfMigrationOrder.sol +7 -1
- package/test/units/static/JBDirectory/TestSetPrimaryTerminalOf.sol +11 -1
- package/test/units/static/JBDirectory/TestSetTerminalsOf.sol +10 -1
- package/test/units/static/JBERC20/JBERC20Setup.sol +2 -1
- package/test/units/static/JBERC20/SigUtils.sol +2 -0
- package/test/units/static/JBERC20/TestInitialize.sol +1 -1
- package/test/units/static/JBERC20/TestName.sol +1 -1
- package/test/units/static/JBERC20/TestNonces.sol +3 -1
- package/test/units/static/JBERC20/TestSymbol.sol +1 -1
- package/test/units/static/JBFeelessAdresses/JBFeelessSetup.sol +2 -1
- package/test/units/static/JBFeelessAdresses/TestInterfaces.sol +2 -1
- package/test/units/static/JBFeelessAdresses/TestSetFeelessAddress.sol +1 -1
- package/test/units/static/JBFees/TestFeesFuzz.sol +1 -1
- package/test/units/static/JBFixedPointNumber/TestAdjustDecimals.sol +0 -1
- package/test/units/static/JBFixedPointNumber/TestAdjustDecimalsFuzz.sol +0 -1
- package/test/units/static/JBFundAccessLimits/JBFundAccessSetup.sol +3 -1
- package/test/units/static/JBFundAccessLimits/TestFundAccessLimitsEdge.sol +4 -1
- package/test/units/static/JBFundAccessLimits/TestPayoutLimitOf.sol +4 -1
- package/test/units/static/JBFundAccessLimits/TestPayoutLimitsOf.sol +8 -1
- package/test/units/static/JBFundAccessLimits/TestSetFundAccessLimitsFor.sol +8 -1
- package/test/units/static/JBFundAccessLimits/TestSurplusAllowanceOf.sol +4 -1
- package/test/units/static/JBFundAccessLimits/TestSurplusAllowancesOf.sol +7 -1
- package/test/units/static/JBMetadataResolver/TestGetDataFor.sol +1 -1
- package/test/units/static/JBMetadataResolver/{TestMetadataResolverM20M21.sol → TestMetadataResolverEdgeCases.sol} +6 -5
- package/test/units/static/JBMetadataResolver/TestMetadataResolverFuzz.sol +2 -1
- package/test/units/static/JBMultiTerminal/JBMultiTerminalSetup.sol +12 -1
- package/test/units/static/JBMultiTerminal/TestAccountingContextsOf.sol +9 -1
- package/test/units/static/JBMultiTerminal/TestAddAccountingContextsFor.sol +18 -2
- package/test/units/static/JBMultiTerminal/TestAddToBalanceOf.sol +42 -7
- package/test/units/static/JBMultiTerminal/TestCashOutTokensOf.sol +30 -6
- package/test/units/static/JBMultiTerminal/TestExecutePayout.sol +18 -2
- package/test/units/static/JBMultiTerminal/TestExecuteProcessFee.sol +13 -3
- package/test/units/static/JBMultiTerminal/TestMigrateBalanceOf.sol +21 -4
- package/test/units/static/JBMultiTerminal/TestPay.sol +32 -6
- package/test/units/static/JBMultiTerminal/TestProcessHeldFeesOf.sol +0 -1
- package/test/units/static/JBMultiTerminal/TestSendPayoutsOf.sol +15 -1
- package/test/units/static/JBMultiTerminal/TestUseAllowanceOf.sol +17 -1
- package/test/units/static/JBPermissions/JBPermissionsSetup.sol +2 -1
- package/test/units/static/JBPermissions/TestHasPermission.sol +1 -1
- package/test/units/static/JBPermissions/TestHasPermissions.sol +1 -1
- package/test/units/static/JBPermissions/TestSetPermissionsFor.sol +3 -1
- package/test/units/static/JBPrices/JBPricesSetup.sol +6 -1
- package/test/units/static/JBPrices/TestAddPriceFeedFor.sol +6 -1
- package/test/units/static/JBPrices/TestPricePerUnitOf.sol +4 -1
- package/test/units/static/JBPrices/TestPrices.sol +4 -1
- package/test/units/static/JBProjects/JBProjectsSetup.sol +2 -1
- package/test/units/static/JBProjects/TestCreateFor.sol +3 -1
- package/test/units/static/JBProjects/TestInitialProject.sol +2 -1
- package/test/units/static/JBProjects/TestInterfaces.sol +0 -1
- package/test/units/static/JBProjects/TestSetResolver.sol +2 -1
- package/test/units/static/JBProjects/TestTokenUri.sol +3 -1
- package/test/units/static/JBRulesetMetadataResolver/TestSetCashOutTaxRateTo.sol +9 -1
- package/test/units/static/JBRulesets/JBRulesetsSetup.sol +3 -1
- package/test/units/static/JBRulesets/TestCurrentApprovalStatusForLatestRulesetOf.sol +9 -1
- package/test/units/static/JBRulesets/TestCurrentOf.sol +10 -1
- package/test/units/static/JBRulesets/TestGetRulesetOf.sol +7 -1
- package/test/units/static/JBRulesets/TestLatestQueuedRulesetOf.sol +9 -1
- package/test/units/static/JBRulesets/TestRulesets.sol +12 -2
- package/test/units/static/JBRulesets/TestRulesetsOf.sol +1 -1
- package/test/units/static/JBRulesets/TestUpcomingRulesetOf.sol +10 -1
- package/test/units/static/JBRulesets/TestUpdateRulesetWeightCache.sol +6 -1
- package/test/units/static/JBSplits/JBSplitsSetup.sol +3 -1
- package/test/units/static/JBSplits/TestSelfManagedSplitGroups.sol +8 -1
- package/test/units/static/JBSplits/TestSetSplitGroupsOf.sol +8 -1
- package/test/units/static/JBSplits/TestSplitsLockedEdge.sol +6 -1
- package/test/units/static/JBSplits/TestSplitsOf.sol +1 -1
- package/test/units/static/JBSplits/TestSplitsPacking.sol +5 -2
- package/test/units/static/JBSurplus/TestSurplusFuzz.sol +4 -2
- package/test/units/static/JBTerminalStore/JBTerminalStoreSetup.sol +5 -1
- package/test/units/static/JBTerminalStore/TestCurrentReclaimableSurplusOf.sol +14 -1
- package/test/units/static/JBTerminalStore/TestCurrentSurplusOf.sol +14 -1
- package/test/units/static/JBTerminalStore/TestCurrentTotalSurplusOf.sol +3 -1
- package/test/units/static/JBTerminalStore/TestRecordCashOutsFor.sol +20 -1
- package/test/units/static/JBTerminalStore/TestRecordPaymentFrom.sol +15 -1
- package/test/units/static/JBTerminalStore/TestRecordPayoutFor.sol +13 -1
- package/test/units/static/JBTerminalStore/TestRecordTerminalMigration.sol +8 -1
- package/test/units/static/JBTerminalStore/TestRecordUsedAllowanceOf.sol +16 -1
- package/test/units/static/JBTerminalStore/TestUint224Overflow.sol +15 -1
- package/test/units/static/JBTokens/JBTokensSetup.sol +5 -1
- package/test/units/static/JBTokens/TestBurnFrom.sol +4 -1
- package/test/units/static/JBTokens/TestClaimTokensFor.sol +4 -1
- package/test/units/static/JBTokens/TestDeployERC20ForUnits.sol +4 -1
- package/test/units/static/JBTokens/TestMintFor.sol +4 -1
- package/test/units/static/JBTokens/TestSetTokenFor.sol +4 -1
- package/test/units/static/JBTokens/TestTotalBalanceOf.sol +1 -1
- package/test/units/static/JBTokens/TestTotalSupplyOf.sol +1 -1
- package/test/units/static/JBTokens/TestTransferCreditsFrom.sol +3 -1
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.6;
|
|
3
3
|
|
|
4
|
-
import "forge-std/StdInvariant.sol";
|
|
5
|
-
import
|
|
4
|
+
import {StdInvariant} from "forge-std/StdInvariant.sol";
|
|
5
|
+
import {TestBaseWorkflow} from "../helpers/TestBaseWorkflow.sol";
|
|
6
|
+
import {IJBRulesetApprovalHook} from "../../src/interfaces/IJBRulesetApprovalHook.sol";
|
|
7
|
+
import {JBConstants} from "../../src/libraries/JBConstants.sol";
|
|
8
|
+
import {JBRulesetMetadataResolver} from "../../src/libraries/JBRulesetMetadataResolver.sol";
|
|
9
|
+
import {JBAccountingContext} from "../../src/structs/JBAccountingContext.sol";
|
|
10
|
+
import {JBFundAccessLimitGroup} from "../../src/structs/JBFundAccessLimitGroup.sol";
|
|
11
|
+
import {JBRuleset} from "../../src/structs/JBRuleset.sol";
|
|
12
|
+
import {JBRulesetConfig} from "../../src/structs/JBRulesetConfig.sol";
|
|
13
|
+
import {JBRulesetMetadata} from "../../src/structs/JBRulesetMetadata.sol";
|
|
14
|
+
import {JBSplitGroup} from "../../src/structs/JBSplitGroup.sol";
|
|
15
|
+
import {JBTerminalConfig} from "../../src/structs/JBTerminalConfig.sol";
|
|
6
16
|
import {RulesetsHandler} from "./handlers/RulesetsHandler.sol";
|
|
7
17
|
|
|
8
18
|
/// @notice Invariant tests for JBRulesets cycling, weight decay, and monotonicity.
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.6;
|
|
3
3
|
|
|
4
|
-
import "forge-std/StdInvariant.sol";
|
|
5
|
-
import
|
|
4
|
+
import {StdInvariant} from "forge-std/StdInvariant.sol";
|
|
5
|
+
import {TestBaseWorkflow} from "../helpers/TestBaseWorkflow.sol";
|
|
6
|
+
import {IJBRulesetApprovalHook} from "../../src/interfaces/IJBRulesetApprovalHook.sol";
|
|
7
|
+
import {JBConstants} from "../../src/libraries/JBConstants.sol";
|
|
8
|
+
import {JBRulesetMetadataResolver} from "../../src/libraries/JBRulesetMetadataResolver.sol";
|
|
9
|
+
import {JBFundAccessLimitGroup} from "../../src/structs/JBFundAccessLimitGroup.sol";
|
|
10
|
+
import {JBRuleset} from "../../src/structs/JBRuleset.sol";
|
|
11
|
+
import {JBRulesetConfig} from "../../src/structs/JBRulesetConfig.sol";
|
|
12
|
+
import {JBRulesetMetadata} from "../../src/structs/JBRulesetMetadata.sol";
|
|
13
|
+
import {JBSplitGroup} from "../../src/structs/JBSplitGroup.sol";
|
|
14
|
+
import {JBTerminalConfig} from "../../src/structs/JBTerminalConfig.sol";
|
|
6
15
|
import {TerminalStoreHandler} from "./handlers/TerminalStoreHandler.sol";
|
|
7
16
|
import {JBAccountingContext} from "../../src/structs/JBAccountingContext.sol";
|
|
8
17
|
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.6;
|
|
3
3
|
|
|
4
|
-
import "forge-std/StdInvariant.sol";
|
|
5
|
-
import
|
|
4
|
+
import {StdInvariant} from "forge-std/StdInvariant.sol";
|
|
5
|
+
import {TestBaseWorkflow} from "../helpers/TestBaseWorkflow.sol";
|
|
6
|
+
import {IJBRulesetApprovalHook} from "../../src/interfaces/IJBRulesetApprovalHook.sol";
|
|
7
|
+
import {IJBToken} from "../../src/interfaces/IJBToken.sol";
|
|
8
|
+
import {JBConstants} from "../../src/libraries/JBConstants.sol";
|
|
9
|
+
import {JBRulesetMetadataResolver} from "../../src/libraries/JBRulesetMetadataResolver.sol";
|
|
10
|
+
import {JBAccountingContext} from "../../src/structs/JBAccountingContext.sol";
|
|
11
|
+
import {JBFundAccessLimitGroup} from "../../src/structs/JBFundAccessLimitGroup.sol";
|
|
12
|
+
import {JBRuleset} from "../../src/structs/JBRuleset.sol";
|
|
13
|
+
import {JBRulesetConfig} from "../../src/structs/JBRulesetConfig.sol";
|
|
14
|
+
import {JBRulesetMetadata} from "../../src/structs/JBRulesetMetadata.sol";
|
|
15
|
+
import {JBSplitGroup} from "../../src/structs/JBSplitGroup.sol";
|
|
16
|
+
import {JBTerminalConfig} from "../../src/structs/JBTerminalConfig.sol";
|
|
6
17
|
import {TokensHandler} from "./handlers/TokensHandler.sol";
|
|
7
18
|
|
|
8
19
|
/// @notice Invariant tests for JBTokens supply and balance consistency.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.6;
|
|
3
3
|
|
|
4
|
-
import "forge-std/Test.sol";
|
|
4
|
+
import {Test} from "forge-std/Test.sol";
|
|
5
5
|
import {JBConstants} from "../../../src/libraries/JBConstants.sol";
|
|
6
6
|
import {IJBMultiTerminal} from "../../../src/interfaces/IJBMultiTerminal.sol";
|
|
7
7
|
import {IJBTerminalStore} from "../../../src/interfaces/IJBTerminalStore.sol";
|
|
@@ -20,12 +20,19 @@ contract ComprehensiveHandler is Test {
|
|
|
20
20
|
address public projectOwner;
|
|
21
21
|
|
|
22
22
|
// Ghost variables for fund tracking
|
|
23
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
23
24
|
uint256 public ghost_totalPaidIn;
|
|
25
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
24
26
|
uint256 public ghost_totalCashedOut;
|
|
27
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
25
28
|
uint256 public ghost_totalPaidOut;
|
|
29
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
26
30
|
uint256 public ghost_totalAddedToBalance;
|
|
31
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
27
32
|
uint256 public ghost_totalAllowanceUsed;
|
|
33
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
28
34
|
uint256 public ghost_feeProjectBalanceLast;
|
|
35
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
29
36
|
uint256 public ghost_feeProjectBalanceDecreased; // should always be 0
|
|
30
37
|
|
|
31
38
|
// Track actors
|
|
@@ -34,15 +41,25 @@ contract ComprehensiveHandler is Test {
|
|
|
34
41
|
uint256 public constant NUM_ACTORS = 5;
|
|
35
42
|
|
|
36
43
|
// Operation counters for debugging
|
|
44
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
37
45
|
uint256 public callCount_pay;
|
|
46
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
38
47
|
uint256 public callCount_cashOut;
|
|
48
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
39
49
|
uint256 public callCount_sendPayouts;
|
|
50
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
40
51
|
uint256 public callCount_addToBalance;
|
|
52
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
41
53
|
uint256 public callCount_sendReservedTokens;
|
|
54
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
42
55
|
uint256 public callCount_useAllowance;
|
|
56
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
43
57
|
uint256 public callCount_burnTokens;
|
|
58
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
44
59
|
uint256 public callCount_claimCredits;
|
|
60
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
45
61
|
uint256 public callCount_advanceTime;
|
|
62
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
46
63
|
uint256 public callCount_processHeldFees;
|
|
47
64
|
|
|
48
65
|
constructor(
|
|
@@ -62,6 +79,7 @@ contract ComprehensiveHandler is Test {
|
|
|
62
79
|
|
|
63
80
|
// Create actor addresses
|
|
64
81
|
for (uint256 i = 0; i < NUM_ACTORS; i++) {
|
|
82
|
+
// forge-lint: disable-next-line(unsafe-typecast)
|
|
65
83
|
address actor = address(uint160(0x2000 + i));
|
|
66
84
|
actors.push(actor);
|
|
67
85
|
isActor[actor] = true;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.6;
|
|
3
3
|
|
|
4
|
-
import "forge-std/Test.sol";
|
|
4
|
+
import {Test} from "forge-std/Test.sol";
|
|
5
5
|
import {JBConstants} from "../../../src/libraries/JBConstants.sol";
|
|
6
6
|
import {IJBMultiTerminal} from "../../../src/interfaces/IJBMultiTerminal.sol";
|
|
7
7
|
import {IJBTerminalStore} from "../../../src/interfaces/IJBTerminalStore.sol";
|
|
@@ -25,25 +25,41 @@ contract EconomicHandler is Test {
|
|
|
25
25
|
address public projectOwner;
|
|
26
26
|
|
|
27
27
|
// Ghost variables for conservation tracking
|
|
28
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
28
29
|
uint256 public ghost_totalPaidInA;
|
|
30
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
29
31
|
uint256 public ghost_totalPaidInB;
|
|
32
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
30
33
|
uint256 public ghost_totalPaidInC;
|
|
34
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
31
35
|
uint256 public ghost_totalCashedOutA;
|
|
36
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
32
37
|
uint256 public ghost_totalCashedOutB;
|
|
38
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
33
39
|
uint256 public ghost_totalCashedOutC;
|
|
40
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
34
41
|
uint256 public ghost_totalPaidOutA;
|
|
42
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
35
43
|
uint256 public ghost_totalPaidOutB;
|
|
44
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
36
45
|
uint256 public ghost_totalPaidOutC;
|
|
46
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
37
47
|
uint256 public ghost_totalAddedToBalanceA;
|
|
38
48
|
|
|
39
49
|
// Fee project tracking
|
|
50
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
40
51
|
uint256 public ghost_feeProjectBalance;
|
|
52
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
41
53
|
uint256 public ghost_feeProjectBalancePrev;
|
|
54
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
42
55
|
bool public ghost_feeProjectBalanceDecreased;
|
|
43
56
|
|
|
44
57
|
// Cross-project split tracking
|
|
58
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
45
59
|
bool public ghost_splitCascadeOccurred;
|
|
60
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
46
61
|
uint256 public ghost_projectBBalanceBeforeSplit;
|
|
62
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
47
63
|
uint256 public ghost_projectBBalanceAfterSplit;
|
|
48
64
|
|
|
49
65
|
// Track actors
|
|
@@ -52,18 +68,31 @@ contract EconomicHandler is Test {
|
|
|
52
68
|
uint256 public constant NUM_ACTORS = 10;
|
|
53
69
|
|
|
54
70
|
// Operation counters
|
|
71
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
55
72
|
uint256 public callCount_payA;
|
|
73
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
56
74
|
uint256 public callCount_payB;
|
|
75
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
57
76
|
uint256 public callCount_payC;
|
|
77
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
58
78
|
uint256 public callCount_cashOutA;
|
|
79
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
59
80
|
uint256 public callCount_cashOutB;
|
|
81
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
60
82
|
uint256 public callCount_cashOutC;
|
|
83
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
61
84
|
uint256 public callCount_sendPayoutsA;
|
|
85
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
62
86
|
uint256 public callCount_sendPayoutsB;
|
|
87
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
63
88
|
uint256 public callCount_sendPayoutsC;
|
|
89
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
64
90
|
uint256 public callCount_addToBalanceA;
|
|
91
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
65
92
|
uint256 public callCount_sendReservedA;
|
|
93
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
66
94
|
uint256 public callCount_sendReservedC;
|
|
95
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
67
96
|
uint256 public callCount_advanceTime;
|
|
68
97
|
|
|
69
98
|
// Per-actor tracking
|
|
@@ -90,6 +119,7 @@ contract EconomicHandler is Test {
|
|
|
90
119
|
projectOwner = _projectOwner;
|
|
91
120
|
|
|
92
121
|
for (uint256 i = 0; i < NUM_ACTORS; i++) {
|
|
122
|
+
// forge-lint: disable-next-line(unsafe-typecast)
|
|
93
123
|
address actor = address(uint160(0x3000 + i));
|
|
94
124
|
actors.push(actor);
|
|
95
125
|
isActor[actor] = true;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.6;
|
|
3
3
|
|
|
4
|
-
import "forge-std/Test.sol";
|
|
4
|
+
import {Test} from "forge-std/Test.sol";
|
|
5
5
|
import {JBConstants} from "../../../src/libraries/JBConstants.sol";
|
|
6
6
|
import {JBFees} from "../../../src/libraries/JBFees.sol";
|
|
7
7
|
import {JBFee} from "../../../src/structs/JBFee.sol";
|
|
@@ -9,7 +9,6 @@ import {IJBMultiTerminal} from "../../../src/interfaces/IJBMultiTerminal.sol";
|
|
|
9
9
|
import {IJBTerminalStore} from "../../../src/interfaces/IJBTerminalStore.sol";
|
|
10
10
|
import {IJBController} from "../../../src/interfaces/IJBController.sol";
|
|
11
11
|
import {IJBTokens} from "../../../src/interfaces/IJBTokens.sol";
|
|
12
|
-
import {JBMultiTerminal} from "../../../src/JBMultiTerminal.sol";
|
|
13
12
|
|
|
14
13
|
/// @title Phase3Handler
|
|
15
14
|
/// @notice Stateful fuzzing handler with ghost variable tracking for strict invariant verification.
|
|
@@ -40,44 +39,73 @@ contract Phase3Handler is Test {
|
|
|
40
39
|
// =========================================================================
|
|
41
40
|
|
|
42
41
|
// Per-project total inflows/outflows
|
|
42
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
43
43
|
mapping(uint256 => uint256) public ghost_totalPaidIn;
|
|
44
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
44
45
|
mapping(uint256 => uint256) public ghost_totalCashedOut;
|
|
46
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
45
47
|
mapping(uint256 => uint256) public ghost_totalPaidOut;
|
|
48
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
46
49
|
mapping(uint256 => uint256) public ghost_totalAllowanceUsed;
|
|
50
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
47
51
|
mapping(uint256 => uint256) public ghost_totalAddedToBalance;
|
|
48
52
|
|
|
49
53
|
// Fee tracking (key innovation for strict invariants)
|
|
54
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
50
55
|
mapping(uint256 => uint256) public ghost_totalFeesDeducted;
|
|
56
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
51
57
|
mapping(uint256 => uint256) public ghost_totalFeesSentToProject1;
|
|
58
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
52
59
|
mapping(uint256 => uint256) public ghost_totalHeldFeeAmounts;
|
|
60
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
53
61
|
mapping(uint256 => uint256) public ghost_totalReturnedFees;
|
|
62
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
54
63
|
mapping(uint256 => uint256) public ghost_totalProcessedFees;
|
|
55
64
|
|
|
56
65
|
// Per-actor tracking
|
|
66
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
57
67
|
mapping(address => mapping(uint256 => uint256)) public ghost_actorContributed;
|
|
68
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
58
69
|
mapping(address => mapping(uint256 => uint256)) public ghost_actorExtracted;
|
|
59
70
|
|
|
60
71
|
// Token tracking
|
|
72
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
61
73
|
mapping(uint256 => uint256) public ghost_totalReservesSent;
|
|
62
74
|
|
|
63
75
|
// Global conservation
|
|
76
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
64
77
|
uint256 public ghost_globalInflows;
|
|
78
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
65
79
|
uint256 public ghost_globalOutflows;
|
|
66
80
|
|
|
67
81
|
// Operation counters
|
|
82
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
68
83
|
uint256 public callCount_pay2;
|
|
84
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
69
85
|
uint256 public callCount_pay3;
|
|
86
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
70
87
|
uint256 public callCount_cashOut2;
|
|
88
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
71
89
|
uint256 public callCount_cashOut3;
|
|
90
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
72
91
|
uint256 public callCount_sendPayouts2;
|
|
92
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
73
93
|
uint256 public callCount_useAllowance2;
|
|
94
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
74
95
|
uint256 public callCount_sendReserved2;
|
|
96
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
75
97
|
uint256 public callCount_processHeldFees2;
|
|
98
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
76
99
|
uint256 public callCount_addToBalanceReturn2;
|
|
100
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
77
101
|
uint256 public callCount_addToBalanceNoReturn2;
|
|
102
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
78
103
|
uint256 public callCount_burnTokens2;
|
|
104
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
79
105
|
uint256 public callCount_burnTokens3;
|
|
106
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
80
107
|
uint256 public callCount_claimCredits2;
|
|
108
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
81
109
|
uint256 public callCount_advanceTime;
|
|
82
110
|
|
|
83
111
|
constructor(
|
|
@@ -100,6 +128,7 @@ contract Phase3Handler is Test {
|
|
|
100
128
|
projectOwner = _projectOwner;
|
|
101
129
|
|
|
102
130
|
for (uint256 i = 0; i < NUM_ACTORS; i++) {
|
|
131
|
+
// forge-lint: disable-next-line(unsafe-typecast)
|
|
103
132
|
address actor = address(uint160(0x4000 + i));
|
|
104
133
|
actors.push(actor);
|
|
105
134
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.6;
|
|
3
3
|
|
|
4
|
-
import "forge-std/Test.sol";
|
|
4
|
+
import {Test} from "forge-std/Test.sol";
|
|
5
5
|
import {JBConstants} from "../../../src/libraries/JBConstants.sol";
|
|
6
6
|
import {IJBRulesets} from "../../../src/interfaces/IJBRulesets.sol";
|
|
7
7
|
import {IJBController} from "../../../src/interfaces/IJBController.sol";
|
|
@@ -25,9 +25,13 @@ contract RulesetsHandler is Test {
|
|
|
25
25
|
address public projectOwner;
|
|
26
26
|
|
|
27
27
|
// Ghost: track the last observed cycle number and weight for monotonicity checks
|
|
28
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
28
29
|
uint48 public ghost_lastCycleNumber;
|
|
30
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
29
31
|
uint112 public ghost_lastWeight;
|
|
32
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
30
33
|
bool public ghost_hasLaunched;
|
|
34
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
31
35
|
uint256 public ghost_queueCount;
|
|
32
36
|
|
|
33
37
|
constructor(IJBRulesets _rulesets, IJBController _controller, uint256 _projectId, address _projectOwner) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.6;
|
|
3
3
|
|
|
4
|
-
import "forge-std/Test.sol";
|
|
4
|
+
import {Test} from "forge-std/Test.sol";
|
|
5
5
|
import {JBConstants} from "../../../src/libraries/JBConstants.sol";
|
|
6
6
|
import {IJBMultiTerminal} from "../../../src/interfaces/IJBMultiTerminal.sol";
|
|
7
7
|
import {IJBTerminalStore} from "../../../src/interfaces/IJBTerminalStore.sol";
|
|
@@ -20,9 +20,13 @@ contract TerminalStoreHandler is Test {
|
|
|
20
20
|
address public projectOwner;
|
|
21
21
|
|
|
22
22
|
// Ghost variables for fund tracking
|
|
23
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
23
24
|
uint256 public ghost_totalPaidIn;
|
|
25
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
24
26
|
uint256 public ghost_totalCashedOut;
|
|
27
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
25
28
|
uint256 public ghost_totalPaidOut;
|
|
29
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
26
30
|
uint256 public ghost_totalAddedToBalance;
|
|
27
31
|
|
|
28
32
|
// Track actors
|
|
@@ -47,6 +51,7 @@ contract TerminalStoreHandler is Test {
|
|
|
47
51
|
|
|
48
52
|
// Create actor addresses
|
|
49
53
|
for (uint256 i = 0; i < NUM_ACTORS; i++) {
|
|
54
|
+
// forge-lint: disable-next-line(unsafe-typecast)
|
|
50
55
|
address actor = address(uint160(0x1000 + i));
|
|
51
56
|
actors.push(actor);
|
|
52
57
|
isActor[actor] = true;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.6;
|
|
3
3
|
|
|
4
|
-
import "forge-std/Test.sol";
|
|
4
|
+
import {Test} from "forge-std/Test.sol";
|
|
5
5
|
import {JBConstants} from "../../../src/libraries/JBConstants.sol";
|
|
6
6
|
import {IJBMultiTerminal} from "../../../src/interfaces/IJBMultiTerminal.sol";
|
|
7
7
|
import {IJBController} from "../../../src/interfaces/IJBController.sol";
|
|
8
8
|
import {IJBTokens} from "../../../src/interfaces/IJBTokens.sol";
|
|
9
|
-
import {IJBToken} from "../../../src/interfaces/IJBToken.sol";
|
|
10
9
|
|
|
11
10
|
/// @notice Handler contract for JBTokens invariant testing.
|
|
12
11
|
/// @dev Drives mint, burn, claim, and transfer operations; tracks holders for sum-of-balances checks.
|
package/test/mock/MockERC20.sol
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
import {ERC20, IERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
|
|
4
|
+
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
|
|
7
5
|
|
|
8
6
|
contract MockERC20 is ERC20 {
|
|
9
7
|
function decimals() public view virtual override returns (uint8) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import {Test} from "forge-std/Test.sol";
|
|
5
|
+
import {JBTerminalStore} from "../../src/JBTerminalStore.sol";
|
|
5
6
|
import {IJBMultiTerminal} from "../../src/interfaces/IJBMultiTerminal.sol";
|
|
6
|
-
import {JBMultiTerminal} from "../../src/JBMultiTerminal.sol";
|
|
7
7
|
import {JBConstants} from "../../src/libraries/JBConstants.sol";
|
|
8
8
|
import {IERC721Receiver} from "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
|
|
9
9
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import {IJBSplitHook} from "../../src/interfaces/IJBSplitHook.sol";
|
|
5
|
+
import {JBSplitHookContext} from "../../src/structs/JBSplitHookContext.sol";
|
|
5
6
|
|
|
6
7
|
import {ERC165, IERC165} from "@openzeppelin/contracts/utils/introspection/ERC165.sol";
|
|
7
8
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
|
-
import /* {*} from */ "../../../helpers/TestBaseWorkflow.sol";
|
|
5
4
|
import {JBTest} from "../../../helpers/JBTest.sol";
|
|
6
5
|
import {JBChainlinkV3PriceFeed} from "../../../../src/JBChainlinkV3PriceFeed.sol";
|
|
7
6
|
import {AggregatorV3Interface} from "@chainlink/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol";
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import {JBController} from "../../../../src/JBController.sol";
|
|
5
|
+
import {IJBController} from "../../../../src/interfaces/IJBController.sol";
|
|
6
|
+
import {IJBDirectory} from "../../../../src/interfaces/IJBDirectory.sol";
|
|
7
|
+
import {IJBFundAccessLimits} from "../../../../src/interfaces/IJBFundAccessLimits.sol";
|
|
8
|
+
import {IJBPermissions} from "../../../../src/interfaces/IJBPermissions.sol";
|
|
9
|
+
import {IJBPrices} from "../../../../src/interfaces/IJBPrices.sol";
|
|
10
|
+
import {IJBProjects} from "../../../../src/interfaces/IJBProjects.sol";
|
|
11
|
+
import {IJBRulesets} from "../../../../src/interfaces/IJBRulesets.sol";
|
|
12
|
+
import {IJBSplits} from "../../../../src/interfaces/IJBSplits.sol";
|
|
13
|
+
import {IJBTokens} from "../../../../src/interfaces/IJBTokens.sol";
|
|
5
14
|
import {JBTest} from "../../../helpers/JBTest.sol";
|
|
6
15
|
|
|
7
16
|
/*
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import {JBController} from "../../../../src/JBController.sol";
|
|
5
|
+
import {JBPermissioned} from "../../../../src/abstract/JBPermissioned.sol";
|
|
6
|
+
import {IJBController} from "../../../../src/interfaces/IJBController.sol";
|
|
7
|
+
import {IJBDirectory} from "../../../../src/interfaces/IJBDirectory.sol";
|
|
8
|
+
import {IJBPermissions} from "../../../../src/interfaces/IJBPermissions.sol";
|
|
9
|
+
import {IJBTerminal} from "../../../../src/interfaces/IJBTerminal.sol";
|
|
10
|
+
import {IJBTokens} from "../../../../src/interfaces/IJBTokens.sol";
|
|
11
|
+
import {JBPermissionIds} from "@bananapus/permission-ids-v6/src/JBPermissionIds.sol";
|
|
5
12
|
import {JBControllerSetup} from "./JBControllerSetup.sol";
|
|
6
13
|
|
|
7
14
|
contract TestBurnTokensOf_Local is JBControllerSetup {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import {JBPermissioned} from "../../../../src/abstract/JBPermissioned.sol";
|
|
5
|
+
import {IJBPermissions} from "../../../../src/interfaces/IJBPermissions.sol";
|
|
6
|
+
import {IJBTokens} from "../../../../src/interfaces/IJBTokens.sol";
|
|
7
|
+
import {JBPermissionIds} from "@bananapus/permission-ids-v6/src/JBPermissionIds.sol";
|
|
5
8
|
import {JBControllerSetup} from "./JBControllerSetup.sol";
|
|
6
9
|
|
|
7
10
|
contract TestClaimTokensFor_Local is JBControllerSetup {
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import {JBPermissioned} from "../../../../src/abstract/JBPermissioned.sol";
|
|
5
|
+
import {IJBPermissions} from "../../../../src/interfaces/IJBPermissions.sol";
|
|
6
|
+
import {IJBToken} from "../../../../src/interfaces/IJBToken.sol";
|
|
7
|
+
import {IJBTokens} from "../../../../src/interfaces/IJBTokens.sol";
|
|
8
|
+
import {JBPermissionIds} from "@bananapus/permission-ids-v6/src/JBPermissionIds.sol";
|
|
9
|
+
import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
|
|
5
10
|
import {JBControllerSetup} from "./JBControllerSetup.sol";
|
|
6
11
|
|
|
7
12
|
contract TestDeployERC20For_Local is JBControllerSetup {
|
|
@@ -34,6 +39,7 @@ contract TestDeployERC20For_Local is JBControllerSetup {
|
|
|
34
39
|
function test_WhenCallerIsPermissionedAndSaltIsNonZero() external {
|
|
35
40
|
// it will deploy ERC20 and return IJBToken
|
|
36
41
|
|
|
42
|
+
// forge-lint: disable-next-line(unsafe-typecast)
|
|
37
43
|
bytes32 _nonZeroSalt = bytes32("somesalt");
|
|
38
44
|
bytes32 _encodedSalt = keccak256(abi.encodePacked(address(this), _nonZeroSalt));
|
|
39
45
|
|
|
@@ -1,7 +1,27 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import {JBController} from "../../../../src/JBController.sol";
|
|
5
|
+
import {IJBController} from "../../../../src/interfaces/IJBController.sol";
|
|
6
|
+
import {IJBDirectory} from "../../../../src/interfaces/IJBDirectory.sol";
|
|
7
|
+
import {IJBFundAccessLimits} from "../../../../src/interfaces/IJBFundAccessLimits.sol";
|
|
8
|
+
import {IJBProjects} from "../../../../src/interfaces/IJBProjects.sol";
|
|
9
|
+
import {IJBRulesetApprovalHook} from "../../../../src/interfaces/IJBRulesetApprovalHook.sol";
|
|
10
|
+
import {IJBRulesets} from "../../../../src/interfaces/IJBRulesets.sol";
|
|
11
|
+
import {IJBSplitHook} from "../../../../src/interfaces/IJBSplitHook.sol";
|
|
12
|
+
import {IJBSplits} from "../../../../src/interfaces/IJBSplits.sol";
|
|
13
|
+
import {IJBTerminal} from "../../../../src/interfaces/IJBTerminal.sol";
|
|
14
|
+
import {JBConstants} from "../../../../src/libraries/JBConstants.sol";
|
|
15
|
+
import {JBRulesetMetadataResolver} from "../../../../src/libraries/JBRulesetMetadataResolver.sol";
|
|
16
|
+
import {JBAccountingContext} from "../../../../src/structs/JBAccountingContext.sol";
|
|
17
|
+
import {JBFundAccessLimitGroup} from "../../../../src/structs/JBFundAccessLimitGroup.sol";
|
|
18
|
+
import {JBRuleset} from "../../../../src/structs/JBRuleset.sol";
|
|
19
|
+
import {JBRulesetConfig} from "../../../../src/structs/JBRulesetConfig.sol";
|
|
20
|
+
import {JBRulesetMetadata} from "../../../../src/structs/JBRulesetMetadata.sol";
|
|
21
|
+
import {JBSplit} from "../../../../src/structs/JBSplit.sol";
|
|
22
|
+
import {JBSplitGroup} from "../../../../src/structs/JBSplitGroup.sol";
|
|
23
|
+
import {JBTerminalConfig} from "../../../../src/structs/JBTerminalConfig.sol";
|
|
24
|
+
import {IERC165} from "@openzeppelin/contracts/utils/introspection/ERC165.sol";
|
|
5
25
|
import {JBControllerSetup} from "./JBControllerSetup.sol";
|
|
6
26
|
|
|
7
27
|
contract TestLaunchProjectFor_Local is JBControllerSetup {
|
|
@@ -1,7 +1,27 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import {JBController} from "../../../../src/JBController.sol";
|
|
5
|
+
import {JBPermissioned} from "../../../../src/abstract/JBPermissioned.sol";
|
|
6
|
+
import {IJBController} from "../../../../src/interfaces/IJBController.sol";
|
|
7
|
+
import {IJBDirectory} from "../../../../src/interfaces/IJBDirectory.sol";
|
|
8
|
+
import {IJBFundAccessLimits} from "../../../../src/interfaces/IJBFundAccessLimits.sol";
|
|
9
|
+
import {IJBPermissions} from "../../../../src/interfaces/IJBPermissions.sol";
|
|
10
|
+
import {IJBRulesetApprovalHook} from "../../../../src/interfaces/IJBRulesetApprovalHook.sol";
|
|
11
|
+
import {IJBRulesets} from "../../../../src/interfaces/IJBRulesets.sol";
|
|
12
|
+
import {IJBSplits} from "../../../../src/interfaces/IJBSplits.sol";
|
|
13
|
+
import {JBConstants} from "../../../../src/libraries/JBConstants.sol";
|
|
14
|
+
import {JBRulesetMetadataResolver} from "../../../../src/libraries/JBRulesetMetadataResolver.sol";
|
|
15
|
+
import {JBCurrencyAmount} from "../../../../src/structs/JBCurrencyAmount.sol";
|
|
16
|
+
import {JBFundAccessLimitGroup} from "../../../../src/structs/JBFundAccessLimitGroup.sol";
|
|
17
|
+
import {JBRuleset} from "../../../../src/structs/JBRuleset.sol";
|
|
18
|
+
import {JBRulesetConfig} from "../../../../src/structs/JBRulesetConfig.sol";
|
|
19
|
+
import {JBRulesetMetadata} from "../../../../src/structs/JBRulesetMetadata.sol";
|
|
20
|
+
import {JBSplitGroup} from "../../../../src/structs/JBSplitGroup.sol";
|
|
21
|
+
import {JBTerminalConfig} from "../../../../src/structs/JBTerminalConfig.sol";
|
|
22
|
+
import {JBPermissionIds} from "@bananapus/permission-ids-v6/src/JBPermissionIds.sol";
|
|
23
|
+
import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
|
|
24
|
+
import {IERC165} from "@openzeppelin/contracts/utils/introspection/ERC165.sol";
|
|
5
25
|
import {JBControllerSetup} from "./JBControllerSetup.sol";
|
|
6
26
|
|
|
7
27
|
contract TestLaunchRulesetsFor_Local is JBControllerSetup {
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import {StdStorage, stdStorage} from "forge-std/StdStorage.sol";
|
|
5
|
+
import {JBController} from "../../../../src/JBController.sol";
|
|
6
|
+
import {IJBMigratable} from "../../../../src/interfaces/IJBMigratable.sol";
|
|
7
|
+
import {IJBRulesetApprovalHook} from "../../../../src/interfaces/IJBRulesetApprovalHook.sol";
|
|
8
|
+
import {IJBRulesets} from "../../../../src/interfaces/IJBRulesets.sol";
|
|
9
|
+
import {JBConstants} from "../../../../src/libraries/JBConstants.sol";
|
|
10
|
+
import {JBRulesetMetadataResolver} from "../../../../src/libraries/JBRulesetMetadataResolver.sol";
|
|
11
|
+
import {JBRuleset} from "../../../../src/structs/JBRuleset.sol";
|
|
12
|
+
import {JBRulesetMetadata} from "../../../../src/structs/JBRulesetMetadata.sol";
|
|
13
|
+
import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
|
|
5
14
|
import {JBControllerSetup} from "./JBControllerSetup.sol";
|
|
6
15
|
|
|
7
16
|
contract TestMigrateController_Local is JBControllerSetup {
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import {JBController} from "../../../../src/JBController.sol";
|
|
5
|
+
import {IJBDirectory} from "../../../../src/interfaces/IJBDirectory.sol";
|
|
6
|
+
import {IJBRulesetApprovalHook} from "../../../../src/interfaces/IJBRulesetApprovalHook.sol";
|
|
7
|
+
import {IJBRulesets} from "../../../../src/interfaces/IJBRulesets.sol";
|
|
8
|
+
import {IJBTerminal} from "../../../../src/interfaces/IJBTerminal.sol";
|
|
9
|
+
import {JBConstants} from "../../../../src/libraries/JBConstants.sol";
|
|
10
|
+
import {JBRulesetMetadataResolver} from "../../../../src/libraries/JBRulesetMetadataResolver.sol";
|
|
11
|
+
import {JBRuleset} from "../../../../src/structs/JBRuleset.sol";
|
|
12
|
+
import {JBRulesetMetadata} from "../../../../src/structs/JBRulesetMetadata.sol";
|
|
13
|
+
import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
|
|
5
14
|
import {JBControllerSetup} from "./JBControllerSetup.sol";
|
|
6
15
|
|
|
7
16
|
contract TestMintTokensOfUnits_Local is JBControllerSetup {
|