Skip to content
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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

feat: add player stats for raffle #173

wants to merge 7 commits into from

Conversation

moul
Copy link
Contributor

@moul moul commented Sep 26, 2023

Addresses #159.

This will compute stats from games, that can be fetched from other contracts to build onchain raffles.

@moul moul self-assigned this Sep 26, 2023
@netlify
Copy link

netlify bot commented Sep 26, 2023

Deploy Preview for gnochess-signup-form canceled.

Name Link
🔨 Latest commit d57ec87
🔍 Latest deploy log https://app.netlify.com/sites/gnochess-signup-form/deploys/65133f1d33187a00080cbc13

@netlify
Copy link

netlify bot commented Sep 26, 2023

Deploy Preview for gnochess canceled.

Name Link
🔨 Latest commit d57ec87
🔍 Latest deploy log https://app.netlify.com/sites/gnochess/deploys/65133f1def26370009cb41a7

Signed-off-by: moul <94029+moul@users.noreply.github.com>
Signed-off-by: moul <94029+moul@users.noreply.github.com>
Signed-off-by: moul <94029+moul@users.noreply.github.com>
Signed-off-by: moul <94029+moul@users.noreply.github.com>
Signed-off-by: moul <94029+moul@users.noreply.github.com>
Signed-off-by: moul <94029+moul@users.noreply.github.com>
Signed-off-by: moul <94029+moul@users.noreply.github.com>
@moul moul marked this pull request as ready for review September 26, 2023 20:46
@moul moul requested a review from thehowl September 26, 2023 20:46
Copy link
Collaborator

@albttx albttx left a 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{}
Copy link
Contributor

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) ?

Copy link
Contributor Author

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 👍

Copy link
Contributor

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!

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.

3 participants