Skip to content

🔧 Add maximum plan limit per merchant #51

@Smartdevs17

Description

@Smartdevs17

Problem

No limit on number of plans a merchant can create.

Context

Unlimited plans could cause storage issues and degrade UX.

Proposed Solution

Add plan limits:

  1. Define MAX_PLANS_PER_MERCHANT constant
  2. Check limit before creating plan
  3. Return error if exceeded
  4. Consider configurable limits

Acceptance Criteria

  • Limit enforced on contract
  • Clear error when limit reached
  • Admin can update limit
  • Existing plans unaffected

Technical Notes

File: contracts/src/lib.rs
Constant: Add to top of file
Function: create_plan

Constraints

  • Consider gas for iteration
  • Upgrade path for limits
  • Backward compatibility

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programenhancementNew feature or requestsmart-contractsRust/Soroban smart contract work

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions