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 Matija's Homepage realm to examples #2916

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

matijamarjanovic
Copy link

Summary

This pull request adds a new realm example to the Gno examples repository—Matija's Homepage. It showcases a personal homepage built on the Gno chain where users can interact by voting with GNOT tokens to change the page's color. The more tokens users send, the greater influence they have on the color scheme, providing an interactive and dynamic experience.

Key Features

  • Profile Section: Displays a personal profile with an image and description.
  • Color Voting: Users can vote for the page's color (red, green, blue) by sending GNOT tokens. RGB values are adjusted based on the amount sent.
  • Dynamic Updates: The homepage dynamically updates the color based on votes, showcasing real-time interaction on the Gno blockchain.
  • Links to GitHub and LinkedIn: Includes buttons for GitHub and LinkedIn, making it easy for users to connect.

Tools & Technologies

  • Utilizes Gno's native functions to handle voting and token transfers.
  • Provides a simple, yet effective example of how personal realms can be interactive and engaging on the Gno platform.

Why this is valuable

This example highlights the possibilities of personal realms on Gno, showing how users can create unique and interactive profiles. It’s a fun and approachable entry point for anyone new to Gno development, while also demonstrating the platform's flexibility and potential for creative expression.

@matijamarjanovic matijamarjanovic requested review from a team as code owners October 7, 2024 02:27
@matijamarjanovic matijamarjanovic requested review from ltzmaxwell and gfanton and removed request for a team October 7, 2024 02:27
@github-actions github-actions bot added the 🧾 package/realm Tag used for new Realms or Packages. label Oct 7, 2024
@matijamarjanovic matijamarjanovic changed the title Matija's Homepage Realm Example feat: Matija's Homepage Realm Example Oct 7, 2024
@jefft0 jefft0 added the review team PRs that should be reviewed first by the review team or external contributors label Oct 8, 2024
@matijamarjanovic matijamarjanovic changed the title feat: Matija's Homepage Realm Example feat: add Matija's Homepage realm to examples Oct 8, 2024
Copy link
Member

@notJoon notJoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments. please check them out. thank you

Comment on lines +9 to +10
main std.Address // tony's main address
backup std.Address // backup address
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these two variable's names are seems ambiguous. Could you update their names? like mainAddr

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, please see fix in this commit: 16529d3


func SetAddress(a std.Address) error {
if !a.IsValid() {
return errors.New("config: invalid address")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

error messages are repeated (invalid arress and unauthorized). please make them as constant.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, pleas see fix im this commit: 15e15a2

return backup
}

func SetAddress(a std.Address) error {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very niptick: consider change parameter name a to more concrete name.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, please see fix here: ef98d67

matijamarjanovic and others added 4 commits October 10, 2024 16:11
…ble's names are seems ambiguous. Could you update their names? like mainAddr)
… on PR - error messages are repeated (invalid arress and unauthorized). please make them as constant.)
…mment on PR - very niptick: consider change parameter name a to more concrete name.)
@matijamarjanovic
Copy link
Author

matijamarjanovic commented Oct 10, 2024

Thank you for your insights @notJoon. I've fixed the issues, please let me know if I can make anything more appropriate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧾 package/realm Tag used for new Realms or Packages. review team PRs that should be reviewed first by the review team or external contributors
Projects
Status: In Progress
Status: In Review
Development

Successfully merging this pull request may close these issues.

3 participants