@bananapus/ownable-v6 0.0.26 → 0.0.28

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/package.json CHANGED
@@ -1,14 +1,12 @@
1
1
  {
2
2
  "name": "@bananapus/ownable-v6",
3
- "version": "0.0.26",
3
+ "version": "0.0.28",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/Bananapus/nana-ownable-v6"
8
8
  },
9
9
  "files": [
10
- "CHANGELOG.md",
11
- "foundry.lock",
12
10
  "foundry.toml",
13
11
  "references/",
14
12
  "remappings.txt",
@@ -19,8 +17,8 @@
19
17
  "node": ">=20.0.0"
20
18
  },
21
19
  "dependencies": {
22
- "@bananapus/core-v6": "^0.0.54",
23
- "@bananapus/permission-ids-v6": "^0.0.25",
20
+ "@bananapus/core-v6": "^0.0.57",
21
+ "@bananapus/permission-ids-v6": "^0.0.26",
24
22
  "@openzeppelin/contracts": "5.6.1"
25
23
  },
26
24
  "scripts": {
@@ -31,10 +31,6 @@ abstract contract JBOwnableOverrides is Context, JBPermissioned, IJBOwnable {
31
31
  /// @param projectCount The current number of minted projects.
32
32
  error JBOwnableOverrides_ProjectDoesNotExist(uint256 projectId, uint256 projectCount);
33
33
 
34
- /// @notice Thrown when project-based ownership is requested without a `JBProjects` contract.
35
- /// @param projectId The project owner ID that requires a non-zero `JBProjects` contract.
36
- error JBOwnableOverrides_ZeroAddressProjectsWithProjectOwner(uint256 projectId);
37
-
38
34
  //*********************************************************************//
39
35
  // ---------------- public immutable stored properties --------------- //
40
36
  //*********************************************************************//
@@ -70,8 +66,9 @@ abstract contract JBOwnableOverrides is Context, JBPermissioned, IJBOwnable {
70
66
  /// revert until that project is created, leaving the contract unusable. Deployers must ensure that the referenced
71
67
  /// project is minted before or atomically with this contract's deployment — this is a deployment trust
72
68
  /// assumption.
73
- /// @param permissions A contract storing permissions.
74
- /// @param projects Mints ERC-721s that represent project ownership and transfers.
69
+ /// @param permissions A contract storing permissions. Assumed to be a valid deployment-time dependency.
70
+ /// @param projects Mints ERC-721s that represent project ownership and transfers. Assumed to be a valid
71
+ /// deployment-time dependency.
75
72
  /// @param initialOwner The owner if the `initialProjectIdOwner` is 0 (until ownership is transferred).
76
73
  /// @param initialProjectIdOwner The ID of the Juicebox project whose owner is this contract's owner (until
77
74
  /// ownership is transferred).
@@ -85,13 +82,6 @@ abstract contract JBOwnableOverrides is Context, JBPermissioned, IJBOwnable {
85
82
  {
86
83
  PROJECTS = projects;
87
84
 
88
- // If using project-based ownership, the PROJECTS contract must be provided.
89
- // Deploying with projects=address(0) and a non-zero projectId would permanently disable
90
- // ownership resolution, as all ownerOf() calls would revert on the zero address.
91
- if (initialProjectIdOwner != 0 && address(projects) == address(0)) {
92
- revert JBOwnableOverrides_ZeroAddressProjectsWithProjectOwner({projectId: initialProjectIdOwner});
93
- }
94
-
95
85
  // We force the inheriting contract to set an owner, as there is a low chance someone will use `JBOwnable` to
96
86
  // create an unowned contract.
97
87
  // It's more likely both were accidentally set to `0`. If you really want an unowned contract, set the owner to
package/CHANGELOG.md DELETED
@@ -1,39 +0,0 @@
1
- # Changelog
2
-
3
- ## Scope
4
-
5
- This file describes the verified change from `nana-ownable-v5` to the current `nana-ownable-v6` repo.
6
-
7
- ## Current v6 surface
8
-
9
- - `JBOwnable`
10
- - `JBOwnableOverrides`
11
- - `IJBOwnable`
12
- - `JBOwner`
13
-
14
- ## Summary
15
-
16
- - Project-backed ownership is more defensive than in v5. The current implementation tolerates invalid or burned project NFTs by handling `ownerOf` failures instead of surfacing them as unchecked behavior.
17
- - The project-ownership path validates its inputs more strictly before transferring control to a project.
18
- - The implementation files now compile on the v6 `0.8.28` baseline instead of the old floating `^0.8.23` setup.
19
-
20
- ## Verified deltas
21
-
22
- - `JBOwnable` now emits ownership-transfer events through `_msgSender()` instead of raw `msg.sender`.
23
- - The transfer-event path is explicitly documented to revert when the new project does not exist, instead of silently tolerating a bad target.
24
- - The current imports point at `core-v6`, not `core-v5`.
25
-
26
- ## Breaking ABI changes
27
-
28
- - There is no meaningful public function migration in `IJBOwnable`; the interface mostly preserved its shape.
29
- - The important migration is behavioral: project-backed ownership resolution and transfer validation are stricter.
30
-
31
- ## Indexer impact
32
-
33
- - Event names are stable, but the `caller` field is now emitted through `_msgSender()` semantics in the implementation.
34
- - Meta-transaction-aware consumers should prefer the v6 behavior over raw-`msg.sender` assumptions.
35
-
36
- ## Migration notes
37
-
38
- - If you depended on `owner()` reverting for invalid project-backed ownership states, revisit that expectation.
39
- - Rebuild imports against the v6 core package and the current ownable contracts. This repo is small, but the behavior is intentionally stricter than v5.
package/foundry.lock DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "lib/forge-std": {
3
- "rev": "77876f8a5b44b770a935621bb331660c90ac928e"
4
- }
5
- }