@bananapus/permission-ids-v6 is the shared constant library for Juicebox V6 operator permissions. It gives every repo in the ecosystem the same numeric meaning for the same permission name.
Architecture: ARCHITECTURE.md
User journeys: USER_JOURNEYS.md
Skills: SKILLS.md
Risks: RISKS.md
Administration: ADMINISTRATION.md
Audit instructions: AUDIT_INSTRUCTIONS.md
This library is intentionally simple: one Solidity file, no storage, no deployment, and no runtime logic. Its value is consistency.
JBPermissions stores operator permissions as packed bits. This package names those bit positions so integrations do not drift across repos.
Use this repo as the single source of truth for permission numbers. Do not redefine permission IDs locally in downstream repos.
If the question is "who can do this action?" you still need JBPermissions in nana-core-v6. This repo only tells you what the numbers mean.
| Range | Area |
|---|---|
1 |
global ROOT permission |
2-23 |
core protocol permissions |
24-27 |
721 hook permissions |
28-30 |
buyback hook and registry permissions |
31 |
router terminal registry permission |
32-35 |
sucker and omnichain deployment permissions |
36-40 |
revnet-core permissions |
The exact constants live in src/JBPermissionIds.sol.
Two IDs deserve extra attention:
SET_BUYBACK_HOOKcovers both setting and permanently locking the configured buyback hookSET_ROUTER_TERMINALcovers both setting and permanently locking the configured router terminal
This repo is a naming registry, not a behavior repo. Its job is to make every other package use the same permission names for the same bit positions.
src/JBPermissionIds.sol
- changing an existing numeric constant is an ecosystem breaking change
- adding a new permission ID without coordinating downstream repos creates semantic drift even if code still compiles
- wildcard project permissions are still dangerous even when the numeric IDs are correct
- numeric permission labels:
JBPermissionIds.sol - runtime permission checks:
nana-core-v6/src/JBPermissions.sol - repo-specific uses of those IDs: the downstream repo that imports them
- Treat this repo as a naming registry for permission bits, not as the runtime permission engine.
- If asked whether an action is allowed, inspect the downstream repo that checks the ID in addition to this file.
npm install @bananapus/permission-ids-v6npm install
forge buildsrc/
JBPermissionIds.sol
ROOTis intentionally powerful and should be granted sparingly- wildcard project scope is convenient but easy to misuse
- some IDs bundle configuration and irreversible locking authority, so their blast radius is larger than the short name suggests
- any change to this file has ecosystem-wide consequences because other repos assume the values stay stable