Skip to content

Implement Quest Completion Event Indexing#227

Open
Godbrand0 wants to merge 1 commit into
MindFlowInteractive:mainfrom
Godbrand0:issue-205-quest-event-indexing
Open

Implement Quest Completion Event Indexing#227
Godbrand0 wants to merge 1 commit into
MindFlowInteractive:mainfrom
Godbrand0:issue-205-quest-event-indexing

Conversation

@Godbrand0
Copy link
Copy Markdown

Closes #205

Summary

  • Added CHAIN_STARTED event in start_chain to track player participation (was missing)
  • Promoted inline symbol_short!("rwrd_clmd") and symbol_short!("pool_fund") to named constants REWARD_CLAIMED and POOL_FUNDED
  • Added chain_id as an indexed topic to QUEST_COMPLETED, CHAIN_COMPLETED, PROGRESS_CHECKPOINT, CHAIN_RESET, REWARD_CLAIMED, and POOL_FUNDED events so Stellar indexers can filter by chain without scanning all event data fields

Event changes

Event Topics (indexed) Data
chain_crt (name, chain_id) (admin, title, desc, quest_count)
chn_start (new) (name, player, chain_id) (start_time,)
qst_done (name, player, chain_id) (quest_id, reward)
chn_done (name, player, chain_id) (duration, total_reward)
checkpt (name, player, chain_id) (quest_id,)
chn_reset (name, player, chain_id) (checkpoint_id,)
rwrd_clmd (name, player, chain_id) (amount,)
pool_fund (name, admin, chain_id) (amount, new_total)

Test plan

  • test_event_chain_created — verifies chain_crt topics include chain_id
  • test_event_chain_started — verifies new chn_start event with player and chain_id indexed
  • test_event_quest_completed — verifies qst_done topics include player and chain_id
  • test_event_chain_completed — verifies chn_done topics include player and chain_id
  • test_event_reward_claimed — verifies rwrd_clmd topics include player and chain_id

- Add CHAIN_STARTED event emitted when a player joins a chain (participation tracking)
- Add REWARD_CLAIMED and POOL_FUNDED as named constants (replace inline symbol_short!)
- Add chain_id as indexed topic to QUEST_COMPLETED, CHAIN_COMPLETED, PROGRESS_CHECKPOINT,
  CHAIN_RESET, REWARD_CLAIMED, and POOL_FUNDED events for off-chain analytics
- Add event tests covering chain creation, participation, quest completion,
  chain completion, and reward claiming

Closes MindFlowInteractive#205
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 27, 2026

@Godbrand0 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! 🚀

Learn more about application limits

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.

Implement Quest Completion Event Indexing

1 participant