diff --git a/examples/gno.land/r/matijamarjanovic/tokenhub/tokenhub.gno b/examples/gno.land/r/matijamarjanovic/tokenhub/tokenhub.gno index 41fd7a11fb7..ec032c2dd3e 100644 --- a/examples/gno.land/r/matijamarjanovic/tokenhub/tokenhub.gno +++ b/examples/gno.land/r/matijamarjanovic/tokenhub/tokenhub.gno @@ -90,6 +90,7 @@ func RegisterGRC1155Token(mtGetter grc1155.MultiTokenGetter, tokenID string) err return nil } +// for realm use func GetMyBalancesAll() string { return getBalances(string(std.PrevRealm().Addr())) } @@ -98,6 +99,15 @@ func GetMyBalances() string { return getNonZeroBalances(string(std.PrevRealm().Addr())) } +// for user use +func GetMyBalancesAllOrigCaller() string { + return getBalances(string(std.GetOrigCaller())) +} + +func GetMyBalancesOrigCaller() string { + return getNonZeroBalances(string(std.GetOrigCaller())) +} + func GetGRC20(key string) grc20.TokenGetter { return grc20reg.Get(key) }