Skip to content

ProjectStatus::Active/Funded/Completed are unreachable — status never advances past Pending #329

Description

@abayomicornelius

Area

Project Registry / State Machine

Complexity

Medium-hard

File(s)

project_registry/src/types.rs:106-115 (ProjectStatus), project_registry/src/lib.rs:205 (only assignment besides Archived at :234)

Problem

ProjectStatus defines five variants (Pending, Active, Funded, Completed, Archived), but grepping all of lib.rs for ProjectStatus:: shows exactly two writes: Pending at creation and Archived in archive_project. No function in this contract (nor any cross-contract call from the vault) ever sets Active, Funded, or Completed. Every project that isn't explicitly archived stays Pending forever, even after being fully funded and repaid. Any off-chain indexer or downstream logic branching on these three variants is dead code path that can never trigger.

Scope

In:

  • Either wire a real transition (e.g. an admin/vault-callable set_project_status, or an implicit transition inside deposit_collateral/vault funding), or clarify in types.rs/API.md that these variants are reserved/vault-managed and currently unset by this contract.

Out:

  • Implementing the vault-side funding-status cross-contract call (separate, larger piece of work — flag as a dependency).

Acceptance Criteria

  • Either a new transition path exists and is tested, or the doc comment on ProjectStatus/ProjectData.status in types.rs explicitly states which variants this contract can produce today

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave programbugSomething isn't workingcontractSmart contract logic and design

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions