gno icon indicating copy to clipboard operation
gno copied to clipboard

feat(maketx run): prevrealm.IsUser() == true

Open moul opened this issue 6 months ago • 1 comments

  • [x] workaround; maketx run is UserRealm
  • [ ] discuss the workaround
  • [ ] fix and complete tests

Problem: CleanShot 2025-06-20 at 17 48 02

This PR retains the msgrun realm as prevrealm, but modifies realm.IsUser() to return true when pkgpath is empty or when pkgpath is a maketx run path.

Before proceeding with unit tests, I would appreciate more feedback to confirm if this aligns with our goals. Additionally, since I copied the regular expression from the ./gnovm/pkg/gnolang Go package, this solution is not optimized, and the gas cost is significantly increasing in unit tests. This should not be an issue on-chain if the regular expression global var is persisted as I expect.

Furthermore, we will soon refactor maketx run to use a new /e/ path prefix, which will allow us to eliminate this regular expression entirely.

moul avatar Jun 20 '25 14:06 moul

🛠 PR Checks Summary

All Automated Checks passed. ✅

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)

☑️ 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
└── 🟢 And
    ├── 🟢 The base branch matches this pattern: ^master$
    └── 🟢 The pull request was created from a fork (head branch repo: moul/gno)

Then

🟢 Requirement satisfied
└── 🟢 Maintainer can modify this pull request

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

Gno2D2 avatar Jun 20 '25 14:06 Gno2D2

Closing in favor of #4435

moul avatar Jul 08 '25 09:07 moul