-
Notifications
You must be signed in to change notification settings - Fork 371
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(examples): hall of fame #2842
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: moul <[email protected]>
Signed-off-by: moul <[email protected]>
Signed-off-by: moul <[email protected]>
Signed-off-by: moul <[email protected]>
Signed-off-by: moul <[email protected]>
Signed-off-by: moul <[email protected]>
Signed-off-by: moul <[email protected]>
Signed-off-by: moul <[email protected]>
Signed-off-by: moul <[email protected]>
Signed-off-by: moul <[email protected]>
Signed-off-by: moul <[email protected]>
Signed-off-by: moul <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2842 +/- ##
=======================================
Coverage 61.10% 61.11%
=======================================
Files 564 564
Lines 75355 75351 -4
=======================================
+ Hits 46045 46050 +5
+ Misses 25946 25937 -9
Partials 3364 3364
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: moul <[email protected]>
Signed-off-by: moul <[email protected]>
Signed-off-by: moul <[email protected]>
Signed-off-by: moul <[email protected]>
) | ||
|
||
const ( | ||
likesBar = "#### [%d 👍](/r/demo/hof?help&__func=Upvote&pkgpath=%s) - [%d 👎](/r/demo/hof?help&__func=Downvote&pkgPath=%s)\n\n" |
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.
for this, you'll be able to use #2887
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.
Can you consider reviewing #2887 so we can use it in this PR?
examples/gno.land/r/demo/hof/hof.gno
Outdated
|
||
// Must not yet exist and must be called from code | ||
if submission.IsUser() { | ||
panic(ErrNonCodeCall.Error()) |
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.
I think we should not panic about registration but instead return an error.
If someone has a conditional registration that can occur 0 or N times, it will brick their contract.
Additionally, when we add "upgradeable contracts," the init() function can be called multiple times.
I suggest returning an error but ignoring it from the caller by default, as we don't need to address it.
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.
What about this? :D
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.
I'm sorry if I initially said something wrong; I don't recall the context.
However, Register
should not panic. Let's avoid returning anything and don't panic.
The goal is to ensure you're registered at launch without needing complex logic to check if you were already registered. It's similar to a "Set" or "Upsert" in other systems (can override with the same value), or sending a "wakeup" UDP packet where it doesn't matter if the system is already up and running.
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.
Description
Depends on #2584 for
avlpager
Introduces the
r/demo/hof
realm.The Hall of Fame is an exhibition that holds items. Users can add their realms to the Hall of Fame by importing the Hall of Fame realm and calling
hof.Register()
from theirinit
function.The realm is moderated and the registrations be paused at will.
Contributors' checklist...
BREAKING CHANGE: xxx
message was included in the description