Skip to content

Multicampaign registry contract (one contract, many campaigns) #44

Description

@P3az3

Problem Statement Today milestonex-campaign is single-campaign-per-instance. There is no contract-level multi-campaign registry. The deprecated core contract attempts multi-campaign (create_campaign returns an auto-incremented id) but is the wrong API/architecture.

Expected Outcome A new contract (or major revision to campaign/) that supports many campaigns in one instance, with:

  • create_campaign(creator, metadata) -> u64 returning a campaign ID.
  • donate(env, donor, campaign_id, amount, asset) taking the campaign id.
  • Status transitions per campaign, scoped correctly.
  • Reads/writes scoped by ID.
  • A MAX_CAMPAIGNS_PER_INSTANCE constant.
  • Same typed-error space.

Acceptance Criteria

  • New contract milestonex-campaigns-registry (or equivalent) implements the API.
  • Tests: 5+ concurrent campaigns, distinct counters, distinct statuses.
  • Migration plan from single-campaign pattern is documented.
  • Backward compatibility maintained (or a hardfork documented).

Implementation Notes

  • This is a major feature; coordinate with roadmap.
  • Reference the existing common and campaign modular design to avoid duplicating logic.

Affected Files / Modules

  • New: crates/contracts/campaigns-registry/ (or equivalent)
  • Cargo.toml
  • README.md
  • New docs: docs/multi-campaign.md

Dependencies — Issue 9 (type unification), Issue 12 (typed-error stability), Issue 14 (deployment plumbing).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26architectureCross-cutting structural design choice.featureNew capability or public surface.milestone-v2Work targeting the v2 roadmap.priority/p2Should-do in current quarter.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions