Skip to content

feat: Add comprehensive event system to Jackpot Wall contract#2

Open
syed-ghufran-hassan wants to merge 1 commit intocryptoflops:mainfrom
syed-ghufran-hassan:patch-1
Open

feat: Add comprehensive event system to Jackpot Wall contract#2
syed-ghufran-hassan wants to merge 1 commit intocryptoflops:mainfrom
syed-ghufran-hassan:patch-1

Conversation

@syed-ghufran-hassan
Copy link
Copy Markdown

  • Add post-created event for every new post with metadata
  • Add jackpot-won event with jackpot ID, amount, and pot details
  • Add pot-updated event for tracking pot balance changes
  • Add emergency-withdrawal event for admin actions
  • Add new-post event for non-jackpot posts

feat: Add protocol statistics and tracking

  • Add total-stx-collected counter
  • Add total-stx-paid counter
  • Add last-jackpot-height and last-jackpot-amount tracking
  • Add jackpot-count for total jackpots awarded
  • Add get-protocol-stats read-only function

feat: Add user statistics tracking

  • Add user-stats-map for tracking user activity
  • Track posts made, jackpots won, total earned, total spent
  • Add get-user-stats read-only function

feat: Add jackpot history tracking

  • Add jackpot-history map for complete jackpot records
  • Track post ID, winner, amount, block height, total posts at time
  • Add get-jackpot-history read-only function

feat: Enhance post data structure

  • Add timestamp to posts
  • Add is-jackpot flag
  • Add jackpot-amount field for winning posts

fix: Resolve naming conflict in user-stats map

  • Rename user-stats map to user-stats-map to avoid conflict with let binding variable
  • Update all references to user-stats-map accordingly
  • Fix variable naming in let bindings for clarity

- Add post-created event for every new post with metadata
- Add jackpot-won event with jackpot ID, amount, and pot details
- Add pot-updated event for tracking pot balance changes
- Add emergency-withdrawal event for admin actions
- Add new-post event for non-jackpot posts

feat: Add protocol statistics and tracking

- Add total-stx-collected counter
- Add total-stx-paid counter
- Add last-jackpot-height and last-jackpot-amount tracking
- Add jackpot-count for total jackpots awarded
- Add get-protocol-stats read-only function

feat: Add user statistics tracking

- Add user-stats-map for tracking user activity
- Track posts made, jackpots won, total earned, total spent
- Add get-user-stats read-only function

feat: Add jackpot history tracking

- Add jackpot-history map for complete jackpot records
- Track post ID, winner, amount, block height, total posts at time
- Add get-jackpot-history read-only function

feat: Enhance post data structure

- Add timestamp to posts
- Add is-jackpot flag
- Add jackpot-amount field for winning posts

fix: Resolve naming conflict in user-stats map

- Rename user-stats map to user-stats-map to avoid conflict with let binding variable
- Update all references to user-stats-map accordingly
- Fix variable naming in let bindings for clarity
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.

1 participant