Verify explore quest implementation#81
Merged
Merged
Conversation
|
@Birdmannn Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Kaylahray
approved these changes
Jun 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Quest Engine: Explore Quest Implementation
Overview
Implemented Explore Quest functionality that allows the admin to verify off-chain actions and trigger payouts from the RewardPool.
Changes
1. Contract Implementation
File:
contracts/quest-engine/src/lib.rsAdded:
RewardPoolClientinterface to interact with RewardPool contractExploreQuestVerifiedevent for tracking verified questscreate_explore_quest()function - Admin creates Explore Quests (no escrow)verify_explore_quest()function - Admin verifies completion and triggers RewardPool payoutKey Functions:
create_explore_quest(admin, reward_amount, metadata_hash) -> u32QuestType::Exploreverify_explore_quest(admin, learner, quest_id)RewardPool.distribute_reward()to pay learnerExploreQuestVerifiedeventValidation:
2. Events
New Event:
ExploreQuestVerified3. Tests
File:
contracts/quest-engine/src/test.rsAdded 9 new tests:
test_create_explore_quest_success- Creates Explore Questtest_create_explore_quest_unauthorized- Rejects non-admintest_create_explore_quest_increments_ids- Verifies ID countertest_verify_explore_quest_success- Successful verificationtest_verify_explore_quest_unauthorized- Rejects non-admintest_verify_explore_quest_nonexistent- Handles missing questtest_verify_explore_quest_wrong_type- Rejects Build Queststest_explore_quest_emits_event- Verifies event emissiontest_mixed_quest_types- Tests Build + Explore coexistence4. Quest Types Comparison
Usage Flow
Creating Explore Quest
Verifying Completion
Verification
✅ All tests pass (129 total across all contracts)
✅ Clippy clean
✅ Formatting correct
✅ Wasm builds successfully
✅ Quest Engine now exports 10 functions (was 8)
✅ CI ready
Integration Requirements
verify_explore_quest()after off-chain verificationCloses [QuestEngine] Verify explore quest #56