Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
d625cd3
(fixes): Merge main into fixesandmerging, accepting incoming changes
syed-ghufran-hassan Jul 29, 2026
7f58ad3
fix(quest-engine): prevent duplicate explore quest payouts
syed-ghufran-hassan Jul 30, 2026
fa90e41
Merge branch 'main' into feat/explore-verification-replay-guard
syed-ghufran-hassan Jul 30, 2026
53abaad
fix(quest-engine): prevent duplicate explore quest payouts
syed-ghufran-hassan Jul 30, 2026
2e92797
fix(quest-engine): prevent duplicate explore quest payouts
syed-ghufran-hassan Jul 30, 2026
ade07e9
Feat/explore verification replay guard
syed-ghufran-hassan Jul 30, 2026
485ff0c
fix(quest-engine): prevent duplicate explore quest payouts
syed-ghufran-hassan Jul 30, 2026
f74f216
refactor(quest-engine): unify batch and single review payout logic
syed-ghufran-hassan Jul 31, 2026
f5d40e9
refactor(quest-engine): unify batch and single review payout logic
syed-ghufran-hassan Jul 31, 2026
55b15ca
feat(course-registry): require explicit completion integration config…
syed-ghufran-hassan Aug 1, 2026
2697e11
feat(course-registry): require explicit completion integration config…
syed-ghufran-hassan Aug 1, 2026
5f6c763
feat(course-registry): require explicit completion integration config…
syed-ghufran-hassan Aug 1, 2026
b99bdbf
feat(course-registry): require explicit completion integration config…
syed-ghufran-hassan Aug 1, 2026
3bd2087
feat(course-registry): require explicit completion integration config…
syed-ghufran-hassan Aug 1, 2026
dc086b7
feat(course-registry): require explicit completion integration config…
syed-ghufran-hassan Aug 1, 2026
a623b56
feat(course-registry): require explicit completion integration config…
syed-ghufran-hassan Aug 1, 2026
63d58c2
feat(course-registry): require explicit completion integration config…
syed-ghufran-hassan Aug 1, 2026
c06d73a
feat(course-registry): require explicit completion integration config…
syed-ghufran-hassan Aug 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
329 changes: 280 additions & 49 deletions contracts/course-registry/src/lib.rs

Large diffs are not rendered by default.

1,257 changes: 695 additions & 562 deletions contracts/course-registry/src/test.rs

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions contracts/course-registry/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@ pub struct Course {
pub metadata_hash: BytesN<32>,
pub active: bool,
pub reward_amount: i128,
pub completion_policy: CompletionPolicy,
}

#[contracttype]
#[derive(Clone, Debug, Eq, PartialEq, Default)]
pub enum CompletionPolicy {
/// No integrations required - all side effects silently skipped if addresses missing
#[default]
Optional,
/// Reward pool required for course completion
RewardRequired,
/// Badge NFT required for course completion
BadgeRequired,
/// Both reward pool and badge NFT required for course completion
BothRequired,
}

#[contracttype]
Expand All @@ -19,4 +34,5 @@ pub enum DataKey {
Admin,
BadgeNftAddress,
RewardPoolAddress,
CompletionPolicy(u32),
}
Loading
Loading