Skip to content

Commit

Permalink
Merge branch 'feat/token-hub' into feat/gnocket
Browse files Browse the repository at this point in the history
  • Loading branch information
matijamarjanovic committed Jan 18, 2025
2 parents 5abc262 + c333c42 commit 0e65808
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions examples/gno.land/r/matijamarjanovic/tokenhub/tokenhub.gno
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
}
Expand All @@ -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)
}
Expand Down

0 comments on commit 0e65808

Please sign in to comment.