Verify: Boolean
This is the simplest verification pattern. Your canister exposes a query
method that returns true
if the user has completed the quest, and false
otherwise.
When to Use
- The quest is a single, binary action (e.g., "Has the user minted an NFT?").
Motoko Example
public query func verifyMintedNFT(principal : Principal) : async Bool {
// Check if the principal owns at least one NFT
let nfts = getNFTsOwnedBy(principal);
return nfts.size() > 0;
}
Integration
- ICQuests will call this method and award XP if it returns
true
. - The method must be public and read-only (
query
).
Tip: Keep the logic simple and deterministic for best results.