-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add player stats for raffle #173
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for gnochess-signup-form canceled.
|
✅ Deploy Preview for gnochess canceled.
|
Signed-off-by: moul <[email protected]>
Signed-off-by: moul <[email protected]>
Signed-off-by: moul <[email protected]>
Signed-off-by: moul <[email protected]>
84d10ed
to
31a0c51
Compare
Signed-off-by: moul <[email protected]>
Signed-off-by: moul <[email protected]>
Signed-off-by: moul <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOVE IT !
return res.(*playerStats) | ||
} | ||
|
||
newStats := playerStats{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not
newStats := playerStats{Addr: addr}
?
And so why doing that in the public function instead (line 50) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to save on storage since the address is already known by the avl.Tree
; but I'm okay to move to your solution too. Feel free to patch my PR if you prefer 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No that's fine, it's also good to save storage!
Addresses #159.
This will compute stats from games, that can be fetched from other contracts to build onchain raffles.