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

refactor(examples): use std.Address based behaviour #3580

Merged

Conversation

r3v4s
Copy link
Contributor

@r3v4s r3v4s commented Jan 22, 2025

Description

To make contracts more simpler(and low computation for execution), it is better for contract to manipulate with only std.Address rather than using users.AddressOrName and resolving it. (Discussed with @moul)

Clients such as gnoeky, gnoweb or adena should perform look up(convert username to address) and pass address value to contract.

@r3v4s r3v4s requested review from moul and zivkovicmilos January 22, 2025 09:43
@github-actions github-actions bot added the 🧾 package/realm Tag used for new Realms or Packages. label Jan 22, 2025
@Gno2D2 Gno2D2 added the review/triage-pending PRs opened by external contributors that are waiting for the 1st review label Jan 22, 2025
@Gno2D2
Copy link
Collaborator

Gno2D2 commented Jan 22, 2025

🛠 PR Checks Summary

🔴 Maintainers must be able to edit this pull request (more info)

Manual Checks (for Reviewers):
  • IGNORE the bot requirements for this PR (force green CI check)
Read More

🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers.

✅ Automated Checks (for Contributors):

🔴 Maintainers must be able to edit this pull request (more info)
🟢 Pending initial approval by a review team member (and label matches review triage state)

☑️ Contributor Actions:
  1. Fix any issues flagged by automated checks.
  2. Follow the Contributor Checklist to ensure your PR is ready for review.
    • Add new tests, or document why they are unnecessary.
    • Provide clear examples/screenshots, if necessary.
    • Update documentation, if required.
    • Ensure no breaking changes, or include BREAKING CHANGE notes.
    • Link related issues/PRs, where applicable.
☑️ Reviewer Actions:
  1. Complete manual checks for the PR, including the guidelines and additional checks if applicable.
📚 Resources:
Debug
Automated Checks
Maintainers must be able to edit this pull request (more info)

If

🟢 Condition met
└── 🟢 The pull request was created from a fork (head branch repo: gnoswap-labs/gno)

Then

🔴 Requirement not satisfied
└── 🔴 Maintainer can modify this pull request

Pending initial approval by a review team member (and label matches review triage state)

If

🟢 Condition met
└── 🟢 Not (🔴 Pull request author is a member of the team: tech-staff)

Then

🟢 Requirement satisfied
└── 🟢 If
    ├── 🟢 Condition
    │   └── 🟢 Or
    │       ├── 🟢 At least 1 user(s) of the organization approved the pull request
    │       └── 🔴 This pull request is a draft
    └── 🟢 Then
        └── 🟢 Not (🔴 This label is applied to pull request: review/triage-pending)

Manual Checks
**IGNORE** the bot requirements for this PR (force green CI check)

If

🟢 Condition met
└── 🟢 On every pull request

Can be checked by

  • Any user with comment edit permission

@r3v4s r3v4s force-pushed the refactor/use-std-address-based-behaviour branch from 0f47749 to b2bfbc0 Compare January 22, 2025 09:49
@Kouteki Kouteki added the in focus Core team is prioritizing this work label Jan 22, 2025
@leohhhn leohhhn changed the title refactor: use std.Address based behaviour refactor(examples): use std.Address based behaviour Jan 22, 2025
@leohhhn
Copy link
Contributor

leohhhn commented Jan 22, 2025

Just a heads up: I also made this change in #3166 - you'll want to check out the API of r/sys/users, primarily the users.gno file. It's mostly final

@Gno2D2 Gno2D2 removed the review/triage-pending PRs opened by external contributors that are waiting for the 1st review label Jan 22, 2025
@leohhhn
Copy link
Contributor

leohhhn commented Jan 22, 2025

@r3v4s can you check the bot which is making the CI red? And we can merge after

@notJoon
Copy link
Member

notJoon commented Jan 23, 2025

Please enable the "Allow edits from maintainers" option to fix CI fail.

@r3v4s
Copy link
Contributor Author

r3v4s commented Jan 23, 2025

@leohhhn
CI failing because of Allow edits and access to secrets by maintainers.
@notJoon and I really couldn't find this option on our side T.T

@n0izn0iz
Copy link
Contributor

There was a request to open PRs from our personal forks to address this, not sure you can/should enable this at your org level

@leohhhn
Copy link
Contributor

leohhhn commented Jan 23, 2025

Clicked "ignore" on the bot because the last requirement seems to be a bug on github. Pr looks good.

@leohhhn leohhhn merged commit ed1700a into gnolang:master Jan 23, 2025
23 of 24 checks passed
@leohhhn
Copy link
Contributor

leohhhn commented Jan 23, 2025

Changes were only in the examples folder, but CI didn't run txtar tests on this change breaking master. Fixing: #3590

@leohhhn leohhhn mentioned this pull request Jan 23, 2025
thehowl added a commit that referenced this pull request Jan 23, 2025
## Description

Fixes txtar that needed to be in #3580 

Should've been caught by CI, wasn't

---------

Co-authored-by: Morgan Bazalgette <morgan@morganbaz.com>
stefann-01 pushed a commit to stefann-01/gno that referenced this pull request Jan 24, 2025
## Description

To make contracts more simpler(and low computation for execution), it is
better for contract to manipulate with only `std.Address` rather than
using `users.AddressOrName` and resolving it. ([Discussed with
@moul](gnoswap-labs/gnoswap#465 (comment)))

Clients such as gnoeky, gnoweb or adena should perform look up(convert
username to address) and pass address value to contract.
stefann-01 pushed a commit to stefann-01/gno that referenced this pull request Jan 24, 2025
## Description

Fixes txtar that needed to be in gnolang#3580 

Should've been caught by CI, wasn't

---------

Co-authored-by: Morgan Bazalgette <morgan@morganbaz.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in focus Core team is prioritizing this work 🧾 package/realm Tag used for new Realms or Packages.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants