@bananapus/omnichain-deployers-v6 0.0.51 → 0.0.53

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/README.md CHANGED
@@ -2,13 +2,18 @@
2
2
 
3
3
  `@bananapus/omnichain-deployers-v6` launches Juicebox projects with cross-chain suckers and a 721 hook already wired in. It is the package you use when the default project shape should be omnichain from day one.
4
4
 
5
- Docs: <https://docs.juicebox.money>
6
- Architecture: [ARCHITECTURE.md](./ARCHITECTURE.md)
7
- User journeys: [USER_JOURNEYS.md](./USER_JOURNEYS.md)
8
- Skills: [SKILLS.md](./SKILLS.md)
9
- Risks: [RISKS.md](./RISKS.md)
10
- Administration: [ADMINISTRATION.md](./ADMINISTRATION.md)
11
- Audit instructions: [AUDIT_INSTRUCTIONS.md](./AUDIT_INSTRUCTIONS.md)
5
+
6
+ ## Documentation
7
+
8
+ - [INVARIANTS.md](./INVARIANTS.md) — runtime guarantees enforced by `JBOmnichainDeployer`, per-function caller / effect / invariant inventory, and cross-cutting invariants.
9
+ - [ARCHITECTURE.md](./ARCHITECTURE.md) — system overview, trust boundaries, and source map.
10
+ - [ADMINISTRATION.md](./ADMINISTRATION.md) — control posture, recovery posture, and admin boundaries.
11
+ - [RISKS.md](./RISKS.md) — risk register with priority levels, trust assumptions, and accepted behaviors.
12
+ - [USER_JOURNEYS.md](./USER_JOURNEYS.md) — primary actor flows for launching omnichain projects and adding suckers later.
13
+ - [AUDIT_INSTRUCTIONS.md](./AUDIT_INSTRUCTIONS.md) — audit objective, scope, and verification commands.
14
+ - [SKILLS.md](./SKILLS.md) — orientation for AI agents and contributors working on this repo.
15
+ - [STYLE_GUIDE.md](./STYLE_GUIDE.md) — Solidity and repo conventions across the Juicebox V6 ecosystem.
16
+ - [CHANGELOG.md](./CHANGELOG.md) — version-to-version changes and migration notes.
12
17
 
13
18
  ## Overview
14
19
 
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@bananapus/omnichain-deployers-v6",
3
- "version": "0.0.51",
3
+ "version": "0.0.53",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
7
- "url": "git+https://github.com/Bananapus/nana-omnichain-deployers-v6"
7
+ "url": "git+https://github.com/Bananapus/nana-omnichain-deployers-v6.git"
8
8
  },
9
9
  "files": [
10
10
  "foundry.toml",
@@ -14,7 +14,7 @@
14
14
  "src/"
15
15
  ],
16
16
  "engines": {
17
- "node": "25.9.0"
17
+ "node": ">=20.0.0"
18
18
  },
19
19
  "scripts": {
20
20
  "test": "forge test",
@@ -24,16 +24,16 @@
24
24
  "artifacts": "source ./.env && npx sphinx artifacts --org-id 'ea165b21-7cdc-4d7b-be59-ecdd4c26bee4' --project-name 'nana-omnichain-deployers-v6'"
25
25
  },
26
26
  "dependencies": {
27
- "@bananapus/721-hook-v6": "^0.0.57",
28
- "@bananapus/core-v6": "^0.0.68",
29
- "@bananapus/ownable-v6": "^0.0.31",
27
+ "@bananapus/721-hook-v6": "^0.0.59",
28
+ "@bananapus/core-v6": "^0.0.72",
29
+ "@bananapus/ownable-v6": "^0.0.32",
30
30
  "@bananapus/permission-ids-v6": "^0.0.27",
31
- "@bananapus/suckers-v6": "^0.0.58",
31
+ "@bananapus/suckers-v6": "^0.0.60",
32
32
  "@openzeppelin/contracts": "5.6.1"
33
33
  },
34
34
  "devDependencies": {
35
- "@bananapus/address-registry-v6": "^0.0.28",
36
- "@bananapus/buyback-hook-v6": "^0.0.55",
35
+ "@bananapus/address-registry-v6": "^0.0.29",
36
+ "@bananapus/buyback-hook-v6": "^0.0.58",
37
37
  "@sphinx-labs/plugins": "0.33.3",
38
38
  "@uniswap/v4-core": "1.0.2"
39
39
  }
@@ -10,7 +10,7 @@
10
10
 
11
11
  - If you edit launch or queue behavior, verify ruleset IDs, carry-forward behavior, and stored hook config keys together.
12
12
  - If you edit salt handling, confirm deterministic-address assumptions for both suckers and 721 hooks.
13
- - If you edit wrapper behavior, check both pay and cash-out paths, not just one.
13
+ - If you edit wrapper behavior, check both pay and cash-out paths, not only one.
14
14
  - If you touch mint-permission logic, confirm whether the permission should come from suckers, the extra hook, or neither.
15
15
 
16
16
  ## Common Failure Modes
@@ -13,13 +13,13 @@ import {JBOmnichainDeployer} from "src/JBOmnichainDeployer.sol";
13
13
  contract Deploy is Script, Sphinx {
14
14
  bytes32 constant NANA_OMNICHAIN_DEPLOYER_SALT = "JBOmnichainDeployerV6_";
15
15
 
16
- /// @notice tracks the deployment of the core contracts for the chain we are deploying to.
16
+ /// @notice Tracks the core deployment for the current chain.
17
17
  CoreDeployment core;
18
18
 
19
- /// @notice tracks the deployment of the 721 hook contracts for the chain we are deploying to.
19
+ /// @notice Tracks the 721 hook deployment for the current chain.
20
20
  Hook721Deployment hook;
21
21
 
22
- /// @notice tracks the deployment of the sucker contracts for the chain we are deploying to.
22
+ /// @notice Tracks the sucker deployment for the current chain.
23
23
  SuckerDeployment suckers;
24
24
 
25
25
  function configureSphinx() public override {
@@ -29,7 +29,7 @@ contract Deploy is Script, Sphinx {
29
29
  }
30
30
 
31
31
  function run() public {
32
- // Get the deployment addresses for the nana CORE for this chain.
32
+ // Get the core deployment addresses for this chain.
33
33
  // We want to do this outside of the `sphinx` modifier.
34
34
  core = CoreDeploymentLib.getDeployment(
35
35
  vm.envOr({
@@ -42,7 +42,7 @@ library DeployersDeploymentLib {
42
42
  view
43
43
  returns (DeployersDeployment memory deployment)
44
44
  {
45
- // Is deployed on all (supported) chains.
45
+ // Read the omnichain deployer address for this supported chain.
46
46
  deployment.deployer = JBOmnichainDeployer(
47
47
  _getDeploymentAddress({
48
48
  path: path,
@@ -37,13 +37,11 @@ import {mulDiv} from "@prb/math/src/Common.sol";
37
37
  /// 721 hook and cross-chain suckers in a single transaction, then inserts itself as every ruleset's data hook so it can
38
38
  /// coordinate between the 721 hook, an optional extra hook (e.g. buyback), and the sucker registry at pay/cash-out
39
39
  /// time. At pay time it merges weight and hook specifications from both the 721 hook and the extra hook. At cash-out
40
- /// time it
41
- /// computes cross-chain total supply and surplus (so the bonding curve reflects all chains), grants suckers 0% cash-out
42
- /// tax, and delegates tax-rate adjustments to the underlying hooks.
40
+ /// time it computes cross-chain total supply and surplus (so the bonding curve reflects all chains), grants suckers 0%
41
+ /// cash-out tax, and delegates tax-rate adjustments to the underlying hooks.
43
42
  /// @dev Project NFTs sent to this contract are not recoverable. The deployer does not implement any NFT rescue
44
43
  /// mechanism beyond `onERC721Received` for `JBProjects`. This is acceptable because the deployer should never own
45
- /// project NFTs —
46
- /// it creates projects and transfers ownership in the same transaction.
44
+ /// project NFTs — it creates projects and transfers ownership in the same transaction.
47
45
  contract JBOmnichainDeployer is
48
46
  ERC2771Context,
49
47
  JBPermissioned,
@@ -136,16 +134,14 @@ contract JBOmnichainDeployer is
136
134
  HOOK_DEPLOYER = hookDeployer;
137
135
  DIRECTORY = controller.DIRECTORY();
138
136
 
139
- // Give the sucker registry permission to map tokens for all revnets.
137
+ // Let the sucker registry map tokens for projects this deployer administers.
140
138
  uint8[] memory permissionIds = new uint8[](1);
141
139
  permissionIds[0] = JBPermissionIds.MAP_SUCKER_TOKEN;
142
140
 
143
- // Give the operator the permission.
144
- // Set up the permission data.
141
+ // Grant the registry a deployer-scoped wildcard permission.
145
142
  JBPermissionsData memory permissionData =
146
143
  JBPermissionsData({operator: address(SUCKER_REGISTRY), projectId: 0, permissionIds: permissionIds});
147
144
 
148
- // Set the permissions.
149
145
  PERMISSIONS.setPermissionsFor({account: address(this), permissionsData: permissionData});
150
146
  }
151
147
 
@@ -732,8 +728,9 @@ contract JBOmnichainDeployer is
732
728
 
733
729
  /// @notice Indicates if this contract adheres to the specified interface.
734
730
  /// @dev See `IERC165.supportsInterface`.
735
- /// @return A flag indicating if the provided interface ID is supported.
736
- function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
731
+ /// @param interfaceId The interface ID to check.
732
+ /// @return flag A flag indicating if the provided interface ID is supported.
733
+ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool flag) {
737
734
  return interfaceId == type(IJBOmnichainDeployer).interfaceId
738
735
  || interfaceId == type(IJBRulesetDataHook).interfaceId
739
736
  || interfaceId == type(IJBPeerChainAdjustedAccounts).interfaceId
@@ -807,7 +804,7 @@ contract JBOmnichainDeployer is
807
804
  // A fresh launch must leave the directory pointing at this deployer's canonical controller.
808
805
  _requireController({projectId: projectId, allowUnset: false});
809
806
 
810
- // Transfer the hook's ownership to the project (now that the project NFT has been minted).
807
+ // Transfer the hook's ownership to the project after the project NFT has been minted.
811
808
  JBOwnable(address(hook)).transferOwnershipToProject(projectId);
812
809
 
813
810
  // Deploy the suckers (if applicable).
@@ -1001,7 +998,7 @@ contract JBOmnichainDeployer is
1001
998
  _tiered721HookOf[projectId][rulesetId] =
1002
999
  JBTiered721HookConfig({hook: hook721, useDataHookForCashOut: use721ForCashOut});
1003
1000
 
1004
- // Store custom hook from metadata (same as _setup).
1001
+ // Store any extra hook provided in ruleset metadata.
1005
1002
  if (rulesetConfigurations[i].metadata.dataHook != address(0)) {
1006
1003
  _extraDataHookOf[projectId][rulesetId] = JBDeployerHookConfig({
1007
1004
  dataHook: IJBRulesetDataHook(rulesetConfigurations[i].metadata.dataHook),
@@ -1010,7 +1007,7 @@ contract JBOmnichainDeployer is
1010
1007
  });
1011
1008
  }
1012
1009
 
1013
- // Set this contract as the data hook, force both pay and cashout through this wrapper.
1010
+ // Set this contract as the data hook, forcing both pay and cash-out through this wrapper.
1014
1011
  rulesetConfigurations[i].metadata.dataHook = address(this);
1015
1012
  rulesetConfigurations[i].metadata.useDataHookForPay = true;
1016
1013
  rulesetConfigurations[i].metadata.useDataHookForCashOut = true;
@@ -9,10 +9,8 @@ import {JBDeployerHookConfig} from "../structs/JBDeployerHookConfig.sol";
9
9
  import {JBOmnichain721Config} from "../structs/JBOmnichain721Config.sol";
10
10
  import {JBSuckerDeploymentConfig} from "../structs/JBSuckerDeploymentConfig.sol";
11
11
 
12
- /// @notice Interface for the omnichain deployer a one-stop contract that launches Juicebox projects with a tiered
13
- /// 721
14
- /// hook and cross-chain suckers, then serves as the data hook wrapper that coordinates pay/cash-out logic across all
15
- /// chains.
12
+ /// @notice Interface for launching Juicebox projects with a 721 tiers hook and cross-chain suckers, then coordinating
13
+ /// pay/cash-out logic through a data hook wrapper.
16
14
  interface IJBOmnichainDeployer {
17
15
  /// @notice The controller used for every project launch and ruleset queue.
18
16
  function CONTROLLER() external view returns (IJBController);
@@ -3,8 +3,8 @@ pragma solidity ^0.8.0;
3
3
 
4
4
  import {JBSuckerDeployerConfig} from "@bananapus/suckers-v6/src/structs/JBSuckerDeployerConfig.sol";
5
5
 
6
- /// @custom:member deployerConfigurations The information for how to suck tokens to other chains.
7
- /// @custom:member salt The salt to use for creating suckers so that they use the same address across chains.
6
+ /// @custom:member deployerConfigurations Sucker deployer configs and token mappings for peer chains.
7
+ /// @custom:member salt The salt combined with `_msgSender()` to create deterministic sucker addresses.
8
8
  struct JBSuckerDeploymentConfig {
9
9
  JBSuckerDeployerConfig[] deployerConfigurations;
10
10
  bytes32 salt;