@bananapus/core-v6 0.0.8 → 0.0.10

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.
Files changed (40) hide show
  1. package/foundry.toml +0 -1
  2. package/package.json +2 -2
  3. package/script/DeployPeriphery.s.sol +11 -0
  4. package/src/JBChainlinkV3PriceFeed.sol +1 -5
  5. package/src/JBChainlinkV3SequencerPriceFeed.sol +1 -1
  6. package/src/JBController.sol +277 -277
  7. package/src/JBDeadline.sol +1 -1
  8. package/src/JBDirectory.sol +93 -93
  9. package/src/JBERC20.sol +43 -39
  10. package/src/JBFeelessAddresses.sol +12 -12
  11. package/src/JBFundAccessLimits.sol +82 -82
  12. package/src/JBMultiTerminal.sol +313 -313
  13. package/src/JBPermissions.sol +104 -100
  14. package/src/JBPrices.sol +68 -68
  15. package/src/JBProjects.sol +31 -31
  16. package/src/JBRulesets.sol +422 -422
  17. package/src/JBSplits.sol +116 -116
  18. package/src/JBTerminalStore.sol +651 -651
  19. package/src/JBTokens.sol +41 -41
  20. package/src/interfaces/IJBCashOutTerminal.sol +25 -7
  21. package/src/interfaces/IJBController.sol +78 -3
  22. package/src/interfaces/IJBDirectory.sol +25 -0
  23. package/src/interfaces/IJBFeeTerminal.sol +31 -0
  24. package/src/interfaces/IJBFeelessAddresses.sol +4 -0
  25. package/src/interfaces/IJBFundAccessLimits.sol +5 -0
  26. package/src/interfaces/IJBMigratable.sol +12 -8
  27. package/src/interfaces/IJBPayoutTerminal.sol +56 -9
  28. package/src/interfaces/IJBPermissions.sol +14 -7
  29. package/src/interfaces/IJBPermitTerminal.sol +4 -0
  30. package/src/interfaces/IJBPrices.sol +6 -0
  31. package/src/interfaces/IJBProjects.sol +8 -0
  32. package/src/interfaces/IJBRulesetApprovalHook.sol +1 -1
  33. package/src/interfaces/IJBRulesetDataHook.sol +23 -23
  34. package/src/interfaces/IJBRulesets.sol +54 -33
  35. package/src/interfaces/IJBSplits.sol +6 -0
  36. package/src/interfaces/IJBTerminal.sol +36 -0
  37. package/src/interfaces/IJBTerminalStore.sol +63 -63
  38. package/src/interfaces/IJBToken.sol +5 -5
  39. package/src/interfaces/IJBTokens.sol +50 -8
  40. package/test/TestDurationUnderflow.sol +3 -2
package/foundry.toml CHANGED
@@ -4,7 +4,6 @@ evm_version = 'paris'
4
4
  optimizer_runs = 200
5
5
  libs = ["node_modules", "lib"]
6
6
  fs_permissions = [{ access = "read-write", path = "./"}]
7
- match_contract = "_Local"
8
7
 
9
8
  [profile.ci_sizes]
10
9
  optimizer_runs = 200
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bananapus/core-v6",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,7 +26,7 @@
26
26
  "artifacts": "source ./.env && npx sphinx artifacts --org-id 'ea165b21-7cdc-4d7b-be59-ecdd4c26bee4' --project-name 'nana-core-v6'"
27
27
  },
28
28
  "dependencies": {
29
- "@bananapus/permission-ids-v6": "^0.0.2",
29
+ "@bananapus/permission-ids-v6": "^0.0.5",
30
30
  "@chainlink/contracts": "^1.3.0",
31
31
  "@openzeppelin/contracts": "^5.2.0",
32
32
  "@prb/math": "^4.1.0",
@@ -44,6 +44,14 @@ contract DeployPeriphery is Script, Sphinx {
44
44
  /// @notice The nonce that gets used across all chains to sync deployment addresses and allow for new deployments of
45
45
  /// the same bytecode.
46
46
  uint256 private CORE_DEPLOYMENT_NONCE = 6;
47
+
48
+ /// @notice The address of the omnichain ruleset operator contract (e.g. JBOmnichainDeployer).
49
+ /// @dev TRUST ASSUMPTION: This address is granted implicit permission to launch rulesets, set terminals, and queue
50
+ /// rulesets on any project via the JBController (bypassing normal JBPermissions checks). A compromised or
51
+ /// incorrect operator address could manipulate any project's rulesets across chains.
52
+ /// @dev This address should correspond to the deterministic CREATE2 deployment of the omnichain deployer contract
53
+ /// from the nana-omnichain-deployers-v6 repository. Verify it matches the deployed address on all target chains
54
+ /// before running this script.
47
55
  address private OMNICHAIN_RULESET_OPERATOR = address(0x8f5DED85c40b50d223269C1F922A056E72101590);
48
56
 
49
57
  function configureSphinx() public override {
@@ -66,6 +74,9 @@ contract DeployPeriphery is Script, Sphinx {
66
74
  }
67
75
 
68
76
  function deploy() public sphinx {
77
+ // Validate the omnichain ruleset operator is set. See TRUST ASSUMPTION above.
78
+ require(OMNICHAIN_RULESET_OPERATOR != address(0), "Omnichain ruleset operator not set");
79
+
69
80
  // Deploy the ETH/USD price feed.
70
81
  IJBPriceFeed feed;
71
82
 
@@ -20,16 +20,12 @@ contract JBChainlinkV3PriceFeed is IJBPriceFeed {
20
20
  error JBChainlinkV3PriceFeed_StalePrice(uint256 timestamp, uint256 threshold, uint256 updatedAt);
21
21
 
22
22
  //*********************************************************************//
23
- // ---------------- public stored immutable properties --------------- //
23
+ // --------------- public immutable stored properties ---------------- //
24
24
  //*********************************************************************//
25
25
 
26
26
  /// @notice The Chainlink feed that prices are reported from.
27
27
  AggregatorV3Interface public immutable FEED;
28
28
 
29
- //*********************************************************************//
30
- // ---------------- public immutable stored properties --------------- //
31
- //*********************************************************************//
32
-
33
29
  /// @notice How many seconds old a Chainlink price update is allowed to be before considered "stale".
34
30
  uint256 public immutable THRESHOLD;
35
31
 
@@ -19,7 +19,7 @@ contract JBChainlinkV3SequencerPriceFeed is JBChainlinkV3PriceFeed {
19
19
  );
20
20
 
21
21
  //*********************************************************************//
22
- // ---------------- public stored immutable properties --------------- //
22
+ // --------------- public immutable stored properties ---------------- //
23
23
  //*********************************************************************//
24
24
 
25
25
  /// @notice How long the sequencer must be re-active in order to return a price.