Skip to content

feat(contracts): separate Minter role from Admin in MembershipToken - #212

Open
endofdays7 wants to merge 9 commits into
NovaCoreLabs1:mainfrom
endofdays7:feat/77-minter-role-separation
Open

feat(contracts): separate Minter role from Admin in MembershipToken#212
endofdays7 wants to merge 9 commits into
NovaCoreLabs1:mainfrom
endofdays7:feat/77-minter-role-separation

Conversation

@endofdays7

Copy link
Copy Markdown
  • Add Minter variant to UserRole enum (between Member and Admin)
  • Add set_minter() / get_minter() to MembershipToken contract
  • Gate issue_token() on minter auth with admin fallback
  • Add set_minter endpoint to AccessControl contract
  • Add 6 behavioral tests for minter role separation
  • Update legacy role check to recognize Minter string

Closes #77

Description

Closes #

Change type

  • feat: new feature
  • fix: bug fix
  • docs: documentation only
  • style: formatting, code style
  • refactor: code restructuring
  • test: adding or updating tests
  • chore: build, CI, tooling

Test plan

  • Unit tests added/updated
  • Integration tests pass
  • Manual testing performed

Screenshots

Breaking changes

  • No breaking changes
  • Breaking changes (describe):

- Add Minter variant to UserRole enum (between Member and Admin)
- Add set_minter() / get_minter() to MembershipToken contract
- Gate issue_token() on minter auth with admin fallback
- Add set_minter endpoint to AccessControl contract
- Add 6 behavioral tests for minter role separation
- Update legacy role check to recognize Minter string

Closes NovaCoreLabs1#77
- Remove unused imports/variables across 10 frontend files
- Apply backend ESLint auto-fix formatting
- Lint: 29 → 15 warnings (all remaining are any types and img tags)
- Rename unused `admin` param to `_admin` in set_minter
- Collapse multi-line method chains for rustfmt compliance
- Remove trailing blank line in test.rs
…est errors

- Fix test_set_minter_fails_without_admin & test_minter_cannot_change_minter by using storage injection instead of client.set_admin() without mock_all_auths (follows existing pattern)

- Fix PostCSS config: import @tailwindcss/postcss directly instead of ESM-incompatible string reference

- Fix vitest config: add resolve.alias for @/ path inside workspace member config
- Fix test_minter_cannot_change_minter: use storage injection for minter too

- Create backend/src/hub/README.md for multi-tenant hub module

- Remove --turbopack flag from frontend build to fix lightningcss native module resolution
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Minter role separation in MembershipToken contract

1 participant