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

std: std.OriginPkgAddress() returns the user's address when using gnokey maketx run #3976

Open
ajnavarro opened this issue Mar 19, 2025 · 1 comment · May be fixed by #3996
Open

std: std.OriginPkgAddress() returns the user's address when using gnokey maketx run #3976

ajnavarro opened this issue Mar 19, 2025 · 1 comment · May be fixed by #3996
Assignees
Labels
🐞 bug Something isn't working

Comments

@ajnavarro
Copy link
Contributor

ajnavarro commented Mar 19, 2025

Description

When the user calls a script using gnokey maketx run The result of OriginPkgAddress is the user's address instead of the realms being called.

If we see the run command as a sequence of calls to call commands, every function called should have the originPkgAddress as itself. Example:

package main

import (
  "gno.land/r/pkg/one"
  "gno.land/r/pkg/two"
)

func main() {
  out := one.Function() // std.OriginPkgAddress() should be gno.land/r/pkg/one but it is the user's address.
  two.DoSomething(out) // std.OriginPkgAddress() should be gno.land/r/pkg/two but it is the user's address.
}
@moul
Copy link
Member

moul commented Mar 20, 2025

Yes, in the meantime, is it possible to consider chaining PreviousRealm calls?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
5 participants