@bananapus/core-v6 0.0.15 → 0.0.17
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 +5 -1
- package/ARCHITECTURE.md +2 -1
- package/AUDIT_INSTRUCTIONS.md +342 -0
- package/CHANGE_LOG.md +375 -0
- package/README.md +6 -6
- package/RISKS.md +171 -50
- package/SKILLS.md +11 -6
- package/STYLE_GUIDE.md +16 -2
- package/USER_JOURNEYS.md +622 -0
- package/package.json +2 -2
- package/script/Deploy.s.sol +22 -13
- package/script/DeployPeriphery.s.sol +76 -52
- package/script/helpers/CoreDeploymentLib.sol +83 -35
- package/src/JBChainlinkV3PriceFeed.sol +1 -0
- package/src/JBController.sol +23 -3
- package/src/JBDeadline.sol +3 -0
- package/src/JBDirectory.sol +2 -1
- package/src/JBERC20.sol +12 -3
- package/src/JBFundAccessLimits.sol +12 -2
- package/src/JBMultiTerminal.sol +53 -10
- package/src/JBPermissions.sol +3 -0
- package/src/JBPrices.sol +8 -2
- package/src/JBProjects.sol +1 -1
- package/src/JBRulesets.sol +14 -0
- package/src/JBSplits.sol +14 -5
- package/src/JBTerminalStore.sol +57 -47
- package/src/JBTokens.sol +43 -4
- package/src/interfaces/IJBController.sol +6 -0
- package/src/interfaces/IJBPermitTerminal.sol +1 -0
- package/src/interfaces/IJBTerminalStore.sol +3 -0
- package/src/interfaces/IJBToken.sol +5 -0
- package/src/interfaces/IJBTokens.sol +13 -0
- package/src/libraries/JBFees.sol +2 -0
- package/src/libraries/JBMetadataResolver.sol +24 -7
- 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 +5 -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 -2
- package/test/CoreExploitTests.t.sol +34 -1
- package/test/EconomicSimulation.t.sol +10 -2
- package/test/EntryPointPermutations.t.sol +17 -3
- package/test/FlashLoanAttacks.t.sol +12 -1
- package/test/PermissionEscalation.t.sol +53 -10
- package/test/RulesetTransitions.t.sol +15 -1
- package/test/SplitLoopTests.t.sol +25 -2
- package/test/TestAccessToFunds.sol +17 -2
- package/test/TestAuditResponseDesignProofs.sol +434 -0
- package/test/TestCashOut.sol +15 -1
- package/test/TestCashOutCountFor.sol +1 -1
- package/test/TestCashOutHooks.sol +47 -25
- package/test/TestCashOutTimingEdge.sol +13 -1
- package/test/TestDataHookFuzzing.sol +520 -0
- package/test/TestDurationUnderflow.sol +13 -1
- package/test/TestFeeFreeCashOutBypass.sol +617 -0
- package/test/TestFeeProcessingFailure.sol +16 -1
- package/test/TestFees.sol +14 -1
- package/test/TestInterfaceSupport.sol +20 -1
- package/test/TestJBERC20Inheritance.sol +11 -1
- package/test/TestL2SequencerPriceFeed.sol +292 -0
- package/test/TestLaunchProject.sol +13 -1
- package/test/TestMetaTx.sol +15 -1
- package/test/TestMetadataOffsetOverflow.sol +179 -0
- package/test/TestMetadataParserLib.sol +37 -4
- package/test/TestMigrationHeldFees.sol +16 -1
- package/test/TestMintTokensOf.sol +14 -1
- package/test/TestMultiTerminalSurplus.sol +348 -0
- 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/TestPermit2DataHook.t.sol +360 -0
- package/test/TestPermit2Terminal.sol +36 -3
- package/test/TestRulesetQueueing.sol +23 -1
- package/test/TestRulesetQueuingStress.sol +20 -1
- package/test/TestRulesetWeightCaching.sol +127 -125
- 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 +54 -1
- package/test/fork/TestChainlinkPriceFeedFork.sol +6 -1
- package/test/formal/BondingCurveProperties.t.sol +8 -1
- package/test/formal/FeeProperties.t.sol +7 -1
- package/test/helpers/JBTest.sol +1 -1
- package/test/helpers/TestBaseWorkflow.sol +84 -1
- package/test/invariants/Phase3DeepInvariant.t.sol +13 -2
- 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 -1
- package/test/invariants/handlers/RulesetsHandler.sol +5 -1
- package/test/invariants/handlers/TerminalStoreHandler.sol +6 -1
- package/test/invariants/handlers/TokensHandler.sol +1 -1
- package/test/mock/MockERC20.sol +0 -2
- package/test/mock/MockMaliciousBeneficiary.sol +2 -1
- package/test/mock/MockMaliciousSplitHook.sol +2 -1
- package/test/mock/MockPriceFeed.sol +1 -1
- package/test/regression/HoldFeesCashOutReserved.t.sol +415 -0
- package/test/regression/WeightCacheBoundary.t.sol +291 -0
- 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 +12 -1
- 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/TestMetadataResolverEdgeCases.sol +2 -1
- 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 +44 -9
- package/test/units/static/JBMultiTerminal/TestCashOutTokensOf.sol +48 -23
- 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 +35 -7
- package/test/units/static/JBMultiTerminal/TestProcessHeldFeesOf.sol +206 -19
- package/test/units/static/JBMultiTerminal/TestSendPayoutsOf.sol +15 -1
- package/test/units/static/JBMultiTerminal/TestUseAllowanceOf.sol +297 -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 -1
- 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 +63 -13
- 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 +3 -1
- 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 +92 -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
package/CHANGE_LOG.md
ADDED
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
# nana-core-v6 Changelog (v5 -> v6)
|
|
2
|
+
|
|
3
|
+
This document describes all changes between `nana-core` (v5, Solidity 0.8.23) and `nana-core-v6` (v6, Solidity 0.8.26).
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 0. Post-Release Changes
|
|
8
|
+
|
|
9
|
+
### 0.1 JBSplits -- Self-Auth GroupId Restriction
|
|
10
|
+
|
|
11
|
+
`setSplitGroupsOf` self-auth now requires the upper 96 bits of the `groupId` to be non-zero. The full self-auth check is: `uint160(groupId) == msg.sender && groupId >> 160 != 0`. GroupIds with zero upper 96 bits (bare addresses like `uint256(uint160(tokenAddress))`) are protocol-reserved for terminal payout groups and always require controller authorization. This prevents accepted token contracts from writing a project's payout splits without controller auth. The 721 hook is unaffected since it already uses `hookAddress | tierId << 160` (non-zero upper bits).
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 1. Breaking Changes
|
|
16
|
+
|
|
17
|
+
### 1.1 Interface Signature Changes
|
|
18
|
+
|
|
19
|
+
#### IJBRulesets
|
|
20
|
+
|
|
21
|
+
| Change | v5 | v6 |
|
|
22
|
+
|--------|----|----|
|
|
23
|
+
| `updateRulesetWeightCache` signature | `updateRulesetWeightCache(uint256 projectId)` | `updateRulesetWeightCache(uint256 projectId, uint256 rulesetId)` |
|
|
24
|
+
|
|
25
|
+
A `rulesetId` parameter was added. Callers must now specify which ruleset to cache the weight for. This should be the ruleset that `currentOf()` actually uses (which may differ from `latestRulesetIdOf` if the latest was rejected by an approval hook).
|
|
26
|
+
|
|
27
|
+
#### IJBTerminalStore
|
|
28
|
+
|
|
29
|
+
| Change | v5 | v6 |
|
|
30
|
+
|--------|----|----|
|
|
31
|
+
| `currentReclaimableSurplusOf` parameter rename | `uint256 tokenCount` (4-param overload) | `uint256 cashOutCount` |
|
|
32
|
+
|
|
33
|
+
The parameter was renamed from `tokenCount` to `cashOutCount` in the simple 4-parameter overload.
|
|
34
|
+
|
|
35
|
+
#### IJBPayoutTerminal
|
|
36
|
+
|
|
37
|
+
| Change | v5 | v6 |
|
|
38
|
+
|--------|----|----|
|
|
39
|
+
| `sendPayoutsOf` return value | `returns (uint256 netLeftoverPayoutAmount)` | `returns (uint256 amountPaidOut)` |
|
|
40
|
+
|
|
41
|
+
The return value semantics changed: v5 returned the net leftover payout amount (sent to the project owner), while v6 returns the total amount paid out.
|
|
42
|
+
|
|
43
|
+
#### IJBController
|
|
44
|
+
|
|
45
|
+
| Change | v5 | v6 |
|
|
46
|
+
|--------|----|----|
|
|
47
|
+
| `launchProjectFor` terminal configs | `JBTerminalConfig[] memory terminalConfigurations` | `JBTerminalConfig[] calldata terminalConfigurations` |
|
|
48
|
+
| `launchRulesetsFor` terminal configs | `JBTerminalConfig[] memory terminalConfigurations` | `JBTerminalConfig[] calldata terminalConfigurations` |
|
|
49
|
+
|
|
50
|
+
Parameters changed from `memory` to `calldata` for gas efficiency.
|
|
51
|
+
|
|
52
|
+
#### IJBSplits
|
|
53
|
+
|
|
54
|
+
| Change | v5 | v6 |
|
|
55
|
+
|--------|----|----|
|
|
56
|
+
| `setSplitGroupsOf` splits param | `JBSplitGroup[] memory splitGroups` | `JBSplitGroup[] calldata splitGroups` |
|
|
57
|
+
|
|
58
|
+
#### IJBFundAccessLimits
|
|
59
|
+
|
|
60
|
+
| Change | v5 | v6 |
|
|
61
|
+
|--------|----|----|
|
|
62
|
+
| `setFundAccessLimitsFor` param | `JBFundAccessLimitGroup[] memory fundAccessLimitGroups` | `JBFundAccessLimitGroup[] calldata fundAccessLimitGroups` |
|
|
63
|
+
|
|
64
|
+
### 1.2 Removed Errors
|
|
65
|
+
|
|
66
|
+
| Contract | v5 Error | v6 Replacement |
|
|
67
|
+
|----------|----------|----------------|
|
|
68
|
+
| `JBMultiTerminal` | `JBMultiTerminal_ZeroAccountingContextDecimals()` | `JBMultiTerminal_AccountingContextDecimalsMismatch()` |
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## 2. New Features
|
|
73
|
+
|
|
74
|
+
### 2.1 New Functions
|
|
75
|
+
|
|
76
|
+
#### IJBController / JBController
|
|
77
|
+
|
|
78
|
+
| Function | Description |
|
|
79
|
+
|----------|-------------|
|
|
80
|
+
| `setTokenMetadataOf(uint256 projectId, string name, string symbol)` | Sets the name and symbol of a project's ERC-20 token. Requires the `SET_TOKEN_METADATA` permission. |
|
|
81
|
+
| `afterReceiveMigrationFrom(IERC165 from, uint256 projectId)` | Called by the directory after this controller has been set as the active controller. Added to the `IJBMigratable` interface. |
|
|
82
|
+
|
|
83
|
+
#### IJBTokens / JBTokens
|
|
84
|
+
|
|
85
|
+
| Function | Description |
|
|
86
|
+
|----------|-------------|
|
|
87
|
+
| `setTokenMetadataFor(uint256 projectId, string name, string symbol)` | Sets the name and symbol of a project's token. Only callable by the project's controller. |
|
|
88
|
+
|
|
89
|
+
#### IJBToken / JBERC20
|
|
90
|
+
|
|
91
|
+
| Function | Description |
|
|
92
|
+
|----------|-------------|
|
|
93
|
+
| `setMetadata(string name, string symbol)` | Sets the token's name and symbol. Only callable by the token's owner (JBTokens). |
|
|
94
|
+
|
|
95
|
+
#### IJBMigratable
|
|
96
|
+
|
|
97
|
+
| Function | Description |
|
|
98
|
+
|----------|-------------|
|
|
99
|
+
| `afterReceiveMigrationFrom(IERC165 from, uint256 projectId)` | New lifecycle hook called after a controller migration completes. |
|
|
100
|
+
|
|
101
|
+
#### JBCashOuts (Library)
|
|
102
|
+
|
|
103
|
+
| Function | Description |
|
|
104
|
+
|----------|-------------|
|
|
105
|
+
| `minCashOutCountFor(uint256 surplus, uint256 desiredOutput, uint256 totalSupply, uint256 cashOutTaxRate)` | Inverse bonding curve: returns the minimum number of tokens to cash out to receive at least `desiredOutput`. Uses binary search for the general case. |
|
|
106
|
+
|
|
107
|
+
### 2.2 New Events
|
|
108
|
+
|
|
109
|
+
| Contract | Event |
|
|
110
|
+
|----------|-------|
|
|
111
|
+
| `IJBTokens` | `SetTokenMetadata(uint256 indexed projectId, string name, string symbol, address caller)` |
|
|
112
|
+
| `IJBPermitTerminal` | `Permit2AllowanceFailed(address indexed token, address indexed owner, bytes reason)` |
|
|
113
|
+
|
|
114
|
+
### 2.3 New Errors
|
|
115
|
+
|
|
116
|
+
| Contract | Error |
|
|
117
|
+
|----------|-------|
|
|
118
|
+
| `JBController` | `JBController_TerminalTokensNotTransferred()` |
|
|
119
|
+
| `JBMultiTerminal` | `JBMultiTerminal_AccountingContextDecimalsMismatch()` |
|
|
120
|
+
| `JBRulesets` | `JBRulesets_WeightCacheRequired(uint256 projectId)` |
|
|
121
|
+
| `JBTerminalStore` | `JBTerminalStore_Uint224Overflow(uint256 value)` |
|
|
122
|
+
| `JBCashOuts` | `JBCashOuts_DesiredOutputNotAchievable()` |
|
|
123
|
+
| `JBERC20` | `JBERC20_AlreadyInitialized()` |
|
|
124
|
+
|
|
125
|
+
### 2.4 New Permission IDs
|
|
126
|
+
|
|
127
|
+
| Permission | Description |
|
|
128
|
+
|------------|-------------|
|
|
129
|
+
| `LAUNCH_RULESETS` | Required for `launchRulesetsFor`. In v5, `QUEUE_RULESETS` was used. |
|
|
130
|
+
| `SET_TOKEN_METADATA` | Required for `setTokenMetadataOf`. |
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## 3. Event Changes
|
|
135
|
+
|
|
136
|
+
### 3.1 New Events
|
|
137
|
+
|
|
138
|
+
See section 2.2 above.
|
|
139
|
+
|
|
140
|
+
### 3.2 Modified Events
|
|
141
|
+
|
|
142
|
+
| Contract | Event | Change |
|
|
143
|
+
|----------|-------|--------|
|
|
144
|
+
| `IJBCashOutTerminal` | `CashOut` | Event order changed in the interface (moved before `HookAfterRecordCashOut`); NatSpec added. No field changes. |
|
|
145
|
+
| `IJBCashOutTerminal` | `HookAfterRecordCashOut` | Event order changed in the interface (moved after `CashOut`); NatSpec added. No field changes. |
|
|
146
|
+
|
|
147
|
+
### 3.3 All Interfaces Gained NatSpec
|
|
148
|
+
|
|
149
|
+
Every interface file in v6 has comprehensive NatSpec documentation added to all functions, events, errors, and return values. This is a documentation-only change that does not affect the ABI.
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## 4. Error Changes
|
|
154
|
+
|
|
155
|
+
### 4.1 Errors with Added Parameters (More Informative Reverts)
|
|
156
|
+
|
|
157
|
+
| Contract | v5 | v6 |
|
|
158
|
+
|----------|----|----|
|
|
159
|
+
| `JBController` | `JBController_AddingPriceFeedNotAllowed()` | `JBController_AddingPriceFeedNotAllowed(uint256 projectId)` |
|
|
160
|
+
| `JBController` | `JBController_MintNotAllowedAndNotTerminalOrHook()` | `JBController_MintNotAllowedAndNotTerminalOrHook(address caller)` |
|
|
161
|
+
| `JBController` | `JBController_RulesetsAlreadyLaunched()` | `JBController_RulesetsAlreadyLaunched(uint256 projectId)` |
|
|
162
|
+
| `JBController` | `JBController_RulesetSetTokenNotAllowed()` | `JBController_RulesetSetTokenNotAllowed(uint256 projectId)` |
|
|
163
|
+
| `JBMultiTerminal` | `JBMultiTerminal_FeeTerminalNotFound()` | `JBMultiTerminal_FeeTerminalNotFound(address token)` |
|
|
164
|
+
| `JBMultiTerminal` | `JBMultiTerminal_TerminalTokensIncompatible()` | `JBMultiTerminal_TerminalTokensIncompatible(uint256 projectId, address token, IJBTerminal terminal)` |
|
|
165
|
+
| `JBDirectory` | `JBDirectory_SetControllerNotAllowed()` | `JBDirectory_SetControllerNotAllowed(uint256 projectId)` |
|
|
166
|
+
| `JBDirectory` | `JBDirectory_SetTerminalsNotAllowed()` | `JBDirectory_SetTerminalsNotAllowed(uint256 projectId)` |
|
|
167
|
+
| `JBSplits` | `JBSplits_PreviousLockedSplitsNotIncluded()` | `JBSplits_PreviousLockedSplitsNotIncluded(uint256 projectId, uint256 rulesetId)` |
|
|
168
|
+
| `JBTokens` | `JBTokens_EmptyToken()` | `JBTokens_EmptyToken(uint256 projectId)` |
|
|
169
|
+
| `JBTerminalStore` | `JBTerminalStore_RulesetNotFound()` | `JBTerminalStore_RulesetNotFound(uint256 projectId)` |
|
|
170
|
+
| `JBPermissions` | `JBPermissions_Unauthorized()` | `JBPermissions_Unauthorized(address account, address operator, uint256 projectId, uint256 permissionId)` |
|
|
171
|
+
|
|
172
|
+
### 4.2 Renamed Errors
|
|
173
|
+
|
|
174
|
+
| Contract | v5 | v6 |
|
|
175
|
+
|----------|----|----|
|
|
176
|
+
| `JBMultiTerminal` | `JBMultiTerminal_ZeroAccountingContextDecimals()` | `JBMultiTerminal_AccountingContextDecimalsMismatch()` |
|
|
177
|
+
|
|
178
|
+
### 4.3 Removed Errors
|
|
179
|
+
|
|
180
|
+
| Contract | Error | Notes |
|
|
181
|
+
|----------|-------|-------|
|
|
182
|
+
| `JBMultiTerminal` | `JBMultiTerminal_ZeroAccountingContextDecimals()` | Replaced by `AccountingContextDecimalsMismatch` |
|
|
183
|
+
|
|
184
|
+
### 4.4 New Errors
|
|
185
|
+
|
|
186
|
+
See section 2.3 above.
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## 5. Struct Changes
|
|
191
|
+
|
|
192
|
+
All structs are **identical** between v5 and v6. The only differences are:
|
|
193
|
+
- `forge-lint: disable-next-line(pascal-case-struct)` comments added to all struct definitions.
|
|
194
|
+
- `JBSplit`: Additional NatSpec documentation on the `beneficiary` field behavior when set to `address(0)`.
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## 6. Enum Changes
|
|
199
|
+
|
|
200
|
+
`JBApprovalStatus` is **identical** between v5 and v6.
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## 7. Library Changes
|
|
205
|
+
|
|
206
|
+
### JBCashOuts
|
|
207
|
+
|
|
208
|
+
| Change | Description |
|
|
209
|
+
|--------|-------------|
|
|
210
|
+
| **New function** `minCashOutCountFor` | Inverse bonding curve calculation using binary search. Returns the minimum tokens to cash out for a desired output. |
|
|
211
|
+
| **New error** `JBCashOuts_DesiredOutputNotAchievable` | Thrown when the cash out tax rate is 100% and no output is possible. |
|
|
212
|
+
| **Bug fix**: Early return for zero `cashOutCount` | `cashOutFrom` now returns `0` immediately when `cashOutCount == 0` (v5 would compute with zero). |
|
|
213
|
+
|
|
214
|
+
### JBMetadataResolver
|
|
215
|
+
|
|
216
|
+
| Change | Description |
|
|
217
|
+
|--------|-------------|
|
|
218
|
+
| Assembly blocks marked `"memory-safe"` | All inline assembly blocks now use the `assembly ("memory-safe")` annotation. |
|
|
219
|
+
| **Bug fix**: `_sliceBytes` copy loop | The loop bound changed from `end` (absolute source offset) to `length` (relative), preventing over-copy past the allocated buffer. |
|
|
220
|
+
| **Bug fix**: Overflow protection | Offset increment now checks for `> 255` overflow before casting to `uint8`, reverting with `JBMetadataResolver_MetadataTooLong()`. |
|
|
221
|
+
| **Bug fix**: Memory alignment | Free memory pointer in `_sliceBytes` now rounds up to 32-byte boundary to prevent overlapping allocations. |
|
|
222
|
+
| Empty input handling | `createMetadata` now returns empty bytes for empty input arrays. |
|
|
223
|
+
| Named parameters in `_sliceBytes` calls | All calls now use named parameters (`data:`, `start:`, `end:`). |
|
|
224
|
+
|
|
225
|
+
### JBRulesetMetadataResolver
|
|
226
|
+
|
|
227
|
+
| Change | Description |
|
|
228
|
+
|--------|-------------|
|
|
229
|
+
| Bit 77 comment fix | Changed from "allow controller migration" to "owner must send payouts" to match actual bit semantics. |
|
|
230
|
+
| `baseCurrency` range comment fix | Changed from `0-16777215` (24-bit) to `0-4294967295` (32-bit). |
|
|
231
|
+
| `currency` range comment fix | Changed from `0-4294967296` to `0-4294967295`. |
|
|
232
|
+
| Named field syntax | `expandMetadata()` now uses named field syntax (`reservedPercent:`, etc.) instead of positional. |
|
|
233
|
+
|
|
234
|
+
### JBFees
|
|
235
|
+
|
|
236
|
+
| Change | Description |
|
|
237
|
+
|--------|-------------|
|
|
238
|
+
| NatSpec improvements | Clarified that `feeAmountFrom` forward-calculates and `feeAmountIn` back-calculates. Added documentation about rounding bounds. |
|
|
239
|
+
|
|
240
|
+
### JBSurplus
|
|
241
|
+
|
|
242
|
+
| Change | Description |
|
|
243
|
+
|--------|-------------|
|
|
244
|
+
| Typo fix | `termainls` -> `terminals`. |
|
|
245
|
+
|
|
246
|
+
### JBConstants, JBFixedPointNumber, JBSplitGroupIds, JBCurrencyIds
|
|
247
|
+
|
|
248
|
+
No changes.
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## 8. Implementation Changes (Non-Interface)
|
|
253
|
+
|
|
254
|
+
### 8.1 JBController
|
|
255
|
+
|
|
256
|
+
| Change | Description |
|
|
257
|
+
|--------|-------------|
|
|
258
|
+
| **Migration lifecycle** | `afterReceiveMigrationFrom` added — called by directory after migration completes (validates caller is directory). |
|
|
259
|
+
| **`launchRulesetsFor` permission** | Changed from `QUEUE_RULESETS` to `LAUNCH_RULESETS`. |
|
|
260
|
+
| **Split token transfer assertion** | `assert(allowance == 0)` replaced with explicit `revert JBController_TerminalTokensNotTransferred()`. |
|
|
261
|
+
| **Code organization** | External views moved after external transactions. Internal views moved to end of file. |
|
|
262
|
+
|
|
263
|
+
### 8.2 JBMultiTerminal
|
|
264
|
+
|
|
265
|
+
| Change | Description |
|
|
266
|
+
|--------|-------------|
|
|
267
|
+
| **Decimal validation** | `ZeroAccountingContextDecimals` renamed to `AccountingContextDecimalsMismatch`. Non-standard ERC-20s that revert on `decimals()` bypass validation (documented). |
|
|
268
|
+
| **Permit2 failure event** | Failed Permit2 allowance approvals now emit `Permit2AllowanceFailed` instead of silently catching. |
|
|
269
|
+
| **Migration held fees** | Migration intentionally does not transfer held fees (documented: held fees belong to fee beneficiary, not the migrating project). |
|
|
270
|
+
| **Held fee processing (reentrancy hardening)** | `processHeldFeesOf` now re-reads the storage index each iteration (instead of caching), deletes the entry before the external call, and updates the index before the external call. |
|
|
271
|
+
| **Split payout documentation** | Failed split payouts documented as consuming payout limit by design. |
|
|
272
|
+
|
|
273
|
+
### 8.3 JBRulesets
|
|
274
|
+
|
|
275
|
+
| Change | Description |
|
|
276
|
+
|--------|-------------|
|
|
277
|
+
| **Cache threshold** | `_WEIGHT_CUT_MULTIPLE_CACHE_LOOKUP_THRESHOLD` increased from `1,000` to `20,000`. |
|
|
278
|
+
| **Cache cap removed** | `_MAX_WEIGHT_CUT_MULTIPLE_CACHE_THRESHOLD` (`50,000`) removed entirely. |
|
|
279
|
+
| **Weight cache required** | `_deriveWeightFrom` now reverts with `JBRulesets_WeightCacheRequired(projectId)` when iteration count exceeds the threshold, instead of silently iterating. |
|
|
280
|
+
| **Approval hook try/catch** | `_approvalStatusOf` now wraps the external `approvalHook.approvalStatusOf()` call in a try/catch. A reverting approval hook returns `JBApprovalStatus.Failed` instead of propagating the revert. This prevents a malicious or buggy approval hook from permanently freezing a project. |
|
|
281
|
+
|
|
282
|
+
### 8.4 JBDirectory
|
|
283
|
+
|
|
284
|
+
| Change | Description |
|
|
285
|
+
|--------|-------------|
|
|
286
|
+
| **Migration ordering** | `setControllerOf` now calls `migrate()` on the old controller BEFORE updating `controllerOf` in storage (so `migrate()` runs while the directory still points to the old controller). After updating storage, it calls `afterReceiveMigrationFrom` on the new controller. |
|
|
287
|
+
|
|
288
|
+
### 8.5 JBTokens
|
|
289
|
+
|
|
290
|
+
| Change | Description |
|
|
291
|
+
|--------|-------------|
|
|
292
|
+
| **Overflow check timing** | `mintFor` now checks `totalSupplyOf(projectId) + count > type(uint208).max` BEFORE minting (v5 checked after). |
|
|
293
|
+
|
|
294
|
+
### 8.6 JBERC20
|
|
295
|
+
|
|
296
|
+
| Change | Description |
|
|
297
|
+
|--------|-------------|
|
|
298
|
+
| **Named revert** | `initialize()` now reverts with `JBERC20_AlreadyInitialized()` instead of a bare `revert()`. |
|
|
299
|
+
|
|
300
|
+
### 8.7 JBChainlinkV3PriceFeed
|
|
301
|
+
|
|
302
|
+
| Change | Description |
|
|
303
|
+
|--------|-------------|
|
|
304
|
+
| **Incomplete round check order** | The check for `updatedAt == 0` (incomplete round) now runs BEFORE the stale price check, avoiding false stale errors on incomplete rounds. |
|
|
305
|
+
|
|
306
|
+
### 8.8 JBChainlinkV3SequencerPriceFeed
|
|
307
|
+
|
|
308
|
+
| Change | Description |
|
|
309
|
+
|--------|-------------|
|
|
310
|
+
| **Typo fix** | Error parameter `gradePeriodTime` corrected to `gracePeriodTime` in `JBChainlinkV3SequencerPriceFeed_SequencerDown`. |
|
|
311
|
+
| **Threshold docs** | Constructor parameter `threshold` documentation corrected from "blocks" to "seconds". |
|
|
312
|
+
|
|
313
|
+
### 8.9 Solidity Version
|
|
314
|
+
|
|
315
|
+
All contracts upgraded from `pragma solidity 0.8.23` to `pragma solidity 0.8.26`.
|
|
316
|
+
|
|
317
|
+
### 8.10 Named Arguments
|
|
318
|
+
|
|
319
|
+
Throughout the codebase, function calls were updated to use named argument syntax (e.g., `foo({bar: 1, baz: 2})`) for improved readability.
|
|
320
|
+
|
|
321
|
+
---
|
|
322
|
+
|
|
323
|
+
## 9. Migration Table
|
|
324
|
+
|
|
325
|
+
### Interfaces
|
|
326
|
+
|
|
327
|
+
| v5 | v6 | Notes |
|
|
328
|
+
|----|----|-------|
|
|
329
|
+
| `IJBController` | `IJBController` | Gained `setTokenMetadataOf`. `calldata` for terminal configs. |
|
|
330
|
+
| `IJBRulesets` | `IJBRulesets` | `updateRulesetWeightCache` gained `rulesetId` parameter |
|
|
331
|
+
| `IJBTerminalStore` | `IJBTerminalStore` | `tokenCount` renamed to `cashOutCount` in `currentReclaimableSurplusOf`. View functions reordered. |
|
|
332
|
+
| `IJBPayoutTerminal` | `IJBPayoutTerminal` | `sendPayoutsOf` returns `amountPaidOut` (was `netLeftoverPayoutAmount`). `SendPayoutToSplit` event moved. |
|
|
333
|
+
| `IJBPermitTerminal` | `IJBPermitTerminal` | Gained `Permit2AllowanceFailed` event |
|
|
334
|
+
| `IJBMigratable` | `IJBMigratable` | Gained `afterReceiveMigrationFrom` function |
|
|
335
|
+
| `IJBTokens` | `IJBTokens` | Gained `setTokenMetadataFor`, `SetTokenMetadata` event |
|
|
336
|
+
| `IJBToken` | `IJBToken` | Gained `setMetadata` function |
|
|
337
|
+
| `IJBSplits` | `IJBSplits` | `setSplitGroupsOf` param changed to `calldata` |
|
|
338
|
+
| `IJBFundAccessLimits` | `IJBFundAccessLimits` | `setFundAccessLimitsFor` param changed to `calldata` |
|
|
339
|
+
| `IJBFeelessAddresses` | `IJBFeelessAddresses` | Param names: `account` -> `addr`. NatSpec added. |
|
|
340
|
+
| All other interfaces | Same name | NatSpec documentation added. No functional changes. |
|
|
341
|
+
|
|
342
|
+
### Contracts
|
|
343
|
+
|
|
344
|
+
| v5 | v6 | Notes |
|
|
345
|
+
|----|----|-------|
|
|
346
|
+
| `JBController` | `JBController` | Token metadata, migration lifecycle (`afterReceiveMigrationFrom`), `LAUNCH_RULESETS` permission |
|
|
347
|
+
| `JBMultiTerminal` | `JBMultiTerminal` | Reentrancy hardening, decimal validation rename, Permit2 event |
|
|
348
|
+
| `JBRulesets` | `JBRulesets` | Approval hook try/catch, weight cache changes, threshold increase |
|
|
349
|
+
| `JBDirectory` | `JBDirectory` | Migration ordering fix, afterReceiveMigration call |
|
|
350
|
+
| `JBTokens` | `JBTokens` | Token metadata support, overflow check timing |
|
|
351
|
+
| `JBERC20` | `JBERC20` | `setMetadata`, named revert |
|
|
352
|
+
| `JBDeadline` | `JBDeadline` | No functional changes |
|
|
353
|
+
| All others | Same name | Error parameter enrichment, named arguments, NatSpec |
|
|
354
|
+
|
|
355
|
+
### Libraries
|
|
356
|
+
|
|
357
|
+
| v5 | v6 | Notes |
|
|
358
|
+
|----|----|-------|
|
|
359
|
+
| `JBCashOuts` | `JBCashOuts` | Added `minCashOutCountFor` (inverse bonding curve) |
|
|
360
|
+
| `JBMetadataResolver` | `JBMetadataResolver` | Memory safety, overflow protection, copy loop fix |
|
|
361
|
+
| `JBRulesetMetadataResolver` | `JBRulesetMetadataResolver` | Comment fixes, named field syntax |
|
|
362
|
+
| `JBCurrencyIds` | `JBCurrencyIds` | No changes |
|
|
363
|
+
| All others | Same name | No changes |
|
|
364
|
+
|
|
365
|
+
### Structs
|
|
366
|
+
|
|
367
|
+
| v5 | v6 | Notes |
|
|
368
|
+
|----|----|-------|
|
|
369
|
+
| All 22 structs | Same names, same fields | Only lint comments added |
|
|
370
|
+
|
|
371
|
+
### Enums
|
|
372
|
+
|
|
373
|
+
| v5 | v6 | Notes |
|
|
374
|
+
|----|----|-------|
|
|
375
|
+
| `JBApprovalStatus` | `JBApprovalStatus` | Identical |
|
package/README.md
CHANGED
|
@@ -47,7 +47,7 @@ Each ruleset can define a `reservedPercent` (0-10,000 basis points). When tokens
|
|
|
47
47
|
|
|
48
48
|
`JBPermissions` lets addresses delegate specific capabilities to operators, scoped by project ID. Each permission ID grants access to specific functions. See [`JBPermissionIds`](https://github.com/Bananapus/nana-permission-ids-v6/blob/main/src/JBPermissionIds.sol) for the full list.
|
|
49
49
|
|
|
50
|
-
- Permission ID `
|
|
50
|
+
- Permission ID `1` is `ROOT` and grants all permissions for the scoped project.
|
|
51
51
|
- Project ID `0` is a wildcard, granting permissions across all projects (cannot be combined with `ROOT` for safety).
|
|
52
52
|
- ROOT operators can set non-ROOT permissions for other operators, but cannot grant ROOT or set wildcard-project permissions.
|
|
53
53
|
|
|
@@ -64,9 +64,9 @@ Hooks are customizable contracts that plug into protocol flows:
|
|
|
64
64
|
### Fees
|
|
65
65
|
|
|
66
66
|
`JBMultiTerminal` charges a 2.5% fee (`FEE = 25` out of `MAX_FEE = 1000`) on:
|
|
67
|
-
- Payouts to external addresses (not to other Juicebox projects).
|
|
67
|
+
- Payouts to external addresses (not to other Juicebox projects on the same terminal).
|
|
68
68
|
- Surplus allowance usage.
|
|
69
|
-
- Cash outs when the cash out tax rate is
|
|
69
|
+
- Cash outs when the cash out tax rate is above 0%. When the cash out tax rate is 0%, fees apply only up to the project's accumulated fee-free intra-terminal payout surplus (`_feeFreeSurplusOf`) — once that surplus is consumed, subsequent cashouts are fee-free.
|
|
70
70
|
|
|
71
71
|
Fees are paid to **project #1** (the fee beneficiary project, minted in the `JBProjects` constructor). Addresses on the `JBFeelessAddresses` allowlist are exempt from fees.
|
|
72
72
|
|
|
@@ -95,9 +95,9 @@ All contracts use Solidity `0.8.26`.
|
|
|
95
95
|
| Contract | Description |
|
|
96
96
|
|----------|-------------|
|
|
97
97
|
| `JBProjects` | ERC-721 registry of projects. Minting an NFT creates a project. Optionally mints project #1 to a fee beneficiary owner. |
|
|
98
|
-
| `JBPermissions` | Bitmap-based permission system. Accounts grant operators specific permissions scoped to project IDs. Supports ROOT (
|
|
98
|
+
| `JBPermissions` | Bitmap-based permission system. Accounts grant operators specific permissions scoped to project IDs. Supports ROOT (1) for all-permissions and wildcard project ID (0). |
|
|
99
99
|
| `JBDirectory` | Maps each project to its controller and terminals. Entry point for looking up where to interact with a project. Manages an allowlist of addresses permitted to set a project's first controller. |
|
|
100
|
-
| `JBController` | Coordinates rulesets, tokens, splits, and fund access limits. Entry point for launching projects, queuing rulesets, minting/burning tokens, deploying ERC-20s, sending reserved tokens, setting project URIs, adding price feeds, and transferring credits. |
|
|
100
|
+
| `JBController` | Coordinates rulesets, tokens, splits, and fund access limits. Entry point for launching projects, queuing rulesets, minting/burning tokens, deploying ERC-20s, updating token metadata, sending reserved tokens, setting project URIs, adding price feeds, and transferring credits. |
|
|
101
101
|
| `JBMultiTerminal` | Accepts payments (native ETH and ERC-20s), processes cash outs, distributes payouts, manages surplus allowances, and handles fees. Integrates with Permit2 for ERC-20 approvals. |
|
|
102
102
|
| `JBTerminalStore` | Bookkeeping engine for all terminal inflows and outflows. Tracks balances, enforces payout limits and surplus allowances, computes cash out reclaim amounts via a bonding curve, and integrates with data hooks. |
|
|
103
103
|
| `JBRulesets` | Stores and manages project rulesets. Handles queuing, cycling, weight decay, approval hook validation, and weight caching for long-running projects. |
|
|
@@ -110,7 +110,7 @@ All contracts use Solidity `0.8.26`.
|
|
|
110
110
|
|
|
111
111
|
| Contract | Description |
|
|
112
112
|
|----------|-------------|
|
|
113
|
-
| `JBERC20` | Cloneable ERC-20 with ERC20Votes and ERC20Permit. Deployed by `JBTokens` via `Clones.clone()`. Owned by `JBTokens`. |
|
|
113
|
+
| `JBERC20` | Cloneable ERC-20 with ERC20Votes and ERC20Permit. Deployed by `JBTokens` via `Clones.clone()`. Owned by `JBTokens`. Name and symbol can be updated by the project owner via `JBController.setTokenMetadataOf`. |
|
|
114
114
|
| `JBChainlinkV3PriceFeed` | `IJBPriceFeed` backed by a Chainlink `AggregatorV3Interface` with staleness threshold. Rejects negative/zero prices and incomplete rounds. |
|
|
115
115
|
| `JBChainlinkV3SequencerPriceFeed` | Extends `JBChainlinkV3PriceFeed` with L2 sequencer uptime validation and grace period for Optimism/Arbitrum. |
|
|
116
116
|
| `JBMatchingPriceFeed` | Returns 1:1 price (e.g., ETH/NATIVE_TOKEN on applicable chains). Lives in `src/periphery/`. |
|