Feat/deployment access control#319
Merged
manoahLinks merged 3 commits intoApr 29, 2026
Merged
Conversation
The workspace on `origin/main` does not currently compile: a botched merge replaced `event_manager/src/lib.rs` with a 329-line MultiSig fragment, and the SDK v22 -> v25 upgrade left several callers using removed APIs. - Restore event_manager/src/lib.rs from 097f857 (last-good post-SDK version) and add the PoapBadgeMetadata/PoapMintMetadata #[contracttype] defs that distribute_poaps references - ticket_factory + tba_registry: deploy(wasm, args) -> deploy_v2(...) - ticket_nft: clone Address before storage move so the subsequent events.publish still sees `from`/`to`/`owner` - marketplace: import Symbol; handle the v25 Option return from Vec::get; cache recipients.len() before the move into RoyaltyConfig - dao_governance: drop env.invoker() in favor of admin require_auth(); cast usize -> u32 for Vec::remove; cast i128 -> u128 for the voting-power return type; stub total_supply() (removed in v25) returning 0 with a TODO After this commit `cargo check --workspace` is green; storage optimization for crowdpass-live#203 follows in a separate commit.
Adds a role-based access control system governing which addresses are authorized to deploy new CrowdPass Soroban contract instances. - DeployerRegistry contract with admin-managed allowlist - Role enum covering Admin, Deployer, and Operator permissions - require_auth() enforcement on all deployment paths - Events emitted for deployer additions, removals, and deployments - Admin transfer function with two-step confirmation pattern - Comprehensive tests for all permission combinations Closes crowdpass-live#208
|
@Sage-senpai Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Description — feat/deployment-access-control
Description
Adds a role-based access control (RBAC) layer that gates who is allowed to deploy new CrowdPass child contracts (per-event ticket NFTs deployed via ticket_factory). The system is split into two pieces:
A new standalone DeployerRegistry contract holding the admin pointer, a per-address allowlist, and a two-step admin transfer flow.
An optional registry hook on ticket_factory::deploy_ticket that consults registry.is_authorized(minter) before invoking env.deployer() when a registry has been wired in via set_deployer_registry(Some(addr)). When no registry is configured the factory falls back to its historical admin-only model — fully backwards-compatible.
The branch carries two commits:
fix(contracts): restore event_manager and resolve SDK v25 build errors — the same prerequisite cherry-picked from the #203/#205 branches. origin/main doesn't compile because of a botched merge in event_manager plus residual SDK v22 → v25 migration debt; without this fix there's no buildable baseline to test #208 against.
feat(contracts): implement access control for contract deployment — the actual #208 work.
If you'd prefer one commit on merge, squash. If the build-fix lands first via a separate PR (e.g. via the #203 branch), this branch will rebase cleanly onto it.
Type of Change
Bug fix (behavioral)
New feature
Build fix (prerequisite — upstream main was broken before this PR)
Breaking change
Related Issues
Closes #208