gnolang / gno

Gno: An interpreted, stack-based Go virtual machine to build succinct and composable apps + Gno.land: a blockchain for timeless code and fair open-source
https://gno.land/
Other
839 stars 342 forks source link

feat(examples): add guestbook realm #2345

Open thehowl opened 1 week ago

thehowl commented 1 week ago

I wanted a simple realm that allows any user to interact with it and see something happen. This is a guestbook realm; it allows anyone to leave a small message, which will be associated with their address.

It also is a nice showcase of how to effectively do pagination with AVL trees. I don't think we have many such examples so far.

thehowl commented 1 week ago

Leon pointed out that we have r/demo/userbook, which achieves something similar. We can consider whether to keep both, or just one or the other.

I see two advantages with this realm: using avl.Trees + pagination, and providing users with a way to actually "write something" (with the consequence of moderation -- hence why there is an admin function the remove a user's post; though obviously with the faucet working anyone can just have another account).

cc @moul