ChainSafe / ChainSafe/open-creator-rails
Requiring approval for subscriptions
- Dominant language
- Solidity
- Stars
- 2
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
**What**
Implement an approval workflow where subscription requests require owner approval before becoming active.
**Why**
Asset owners may want to vet subscribers before granting access. This enables gated access, membership review, or compliance requirements where not all subscription requests should be automatically granted.
**How**
- Add a pending subscriptions mechanism (e.g. mapping or struct for pending requests)
- Modify the subscribe flow to create a pending request instead of immediately activating
- Implement `approveSubscription(address)` and `rejectSubscription(address)` with onlyOwner modifier
- Ensure users can only have one pending request per asset
- Add tests for pending, approved, and rejected flows
**Acceptance Criteria**
- Subscription requests go into a pending state instead of immediate activation
- Asset owners can approve or reject pending subscriptions
- Approved subscriptions become active; rejected ones are cleared
- Users cannot bypass the approval flow
- Comprehensive test coverage including approval and rejection flows
**Estimation**
**Dependencies**
Depends on #9 (Implement Asset Contract)
Contributor guide
Assessment
This issue has not been assessed yet.