Skip to content

Resolved#42

Merged
Kaylahray merged 4 commits into
learnault:mainfrom
Levi-Ojukwu:resolved
Apr 28, 2026
Merged

Resolved#42
Kaylahray merged 4 commits into
learnault:mainfrom
Levi-Ojukwu:resolved

Conversation

@Levi-Ojukwu
Copy link
Copy Markdown
Contributor

@Levi-Ojukwu Levi-Ojukwu commented Apr 27, 2026

Closes #36
Closes #37


@Levi-Ojukwu
Copy link
Copy Markdown
Contributor Author

Linked Issue

Closes #36
Closes #37

Description

Implemented the full submission and review flow for Build Quests in the QuestEngine, enabling learners to submit proof and employers to review and trigger payouts.

What changed?

  • Added submit_proof function for learners to submit IPFS proof hashes
  • Added review_submission function for employers to approve/reject submissions
  • Implemented escrow payout logic from QuestEngine to learner on approval
  • Added submission status tracking (Pending, Approved, Rejected)
  • Emitted relevant events (ProofSubmitted, SubmissionReviewed)
  • Added unit tests covering submission and review flows

Why was it changed?

  • To enable end-to-end lifecycle for Build Quests
  • Ensures learners can submit work and receive payment upon approval
  • Prevents duplicate submissions and double payouts

How was it implemented?

  • Enforced authentication using require_auth() for both learner and employer
  • Validated quest state (active, correct type) before allowing submission
  • Stored submissions using (learner, quest_id) as unique key
  • Ensured submission uniqueness and proper state transitions
  • Implemented conditional payout logic using token transfer from contract escrow
  • Updated and persisted submission status after review

@Kaylahray Kaylahray merged commit 96eb200 into learnault:main Apr 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[QuestEngine] Validate & Payout Build Quest [QuestEngine] Submit Quest Proof

2 participants