Implement Quest Completion Event Indexing#227
Open
Godbrand0 wants to merge 1 commit into
Open
Conversation
- 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
|
@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! 🚀 |
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.
Closes #205
Summary
CHAIN_STARTEDevent instart_chainto track player participation (was missing)symbol_short!("rwrd_clmd")andsymbol_short!("pool_fund")to named constantsREWARD_CLAIMEDandPOOL_FUNDEDchain_idas an indexed topic toQUEST_COMPLETED,CHAIN_COMPLETED,PROGRESS_CHECKPOINT,CHAIN_RESET,REWARD_CLAIMED, andPOOL_FUNDEDevents so Stellar indexers can filter by chain without scanning all event data fieldsEvent changes
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— verifieschain_crttopics includechain_idtest_event_chain_started— verifies newchn_startevent withplayerandchain_idindexedtest_event_quest_completed— verifiesqst_donetopics includeplayerandchain_idtest_event_chain_completed— verifieschn_donetopics includeplayerandchain_idtest_event_reward_claimed— verifiesrwrd_clmdtopics includeplayerandchain_id