Skip to content

Commit

Permalink
fix: modify maps structure, more data
Browse files Browse the repository at this point in the history
  • Loading branch information
whoabuddy committed Aug 28, 2024
1 parent ba59d80 commit 2498ad2
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions contracts/ex8-02.clar
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,34 @@
;; data maps
;;

;; track round info
(define-map LotteryRound
;; track stats per round
(define-map LotteryRounds
uint
{
ticketsSold: uint,
firstNftId: uint,
stxInPool: uint,
ticketsSold: uint,
winner: (optional principal)
}
)

;; track user info
(define-map UserTickets
;; track stats per user
(define-map UserStats
principal
{
tickets: uint,
lastRound: uint,
totalStxSpent: uint,
totalTickets: uint,
totalWon: uint,
}
)

;; track stats per user per round
(define-map UserRounds
{ user: principal, round: uint }
{ tickets: uint, stxSpent: uint }
)

;; public functions
;;

Expand Down

0 comments on commit 2498ad2

Please sign in to comment.