Skip to content

escalate_to_arbitration() collects a fee with no on-chain record of the dispute or its resolution status #255

Description

@SYLVIANNORUKA

Description
escalate_to_arbitration() transfers config.fee_per_case from the caller to the contract and emits a dispute_escalated event, but creates no persistent storage record of the dispute itself -- no status, no linkage to a specific enrollment, and nothing indicating whether the dispute is open, resolved, or already paid out. The only trace of the arbitration case existing is a historical event, which is not queryable by any read function in the contract (unlike, say, a RefundRequest, which get_refund_request() can retrieve).

Affected modules: contracts/hamplard/src/lib.rs

Arbitration cases have no on-chain state beyond a historical event, so the contract itself cannot answer "is there an open dispute for this course/student?"

Expected Behavior
escalate_to_arbitration() should create a persistent, queryable record of the dispute (case ID, parties, course, fee paid, status) so its lifecycle can be tracked and resolved on-chain.

Tasks

Define a Dispute/ArbitrationCase record type and a corresponding DataKey.

Persist a record in escalate_to_arbitration() and extend its TTL.

Add a get_arbitration_case() (or similar) read function.

Add a test that a created case is retrievable and reflects the fee paid.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions