Skip to content

Commit

Permalink
chore: fixup
Browse files Browse the repository at this point in the history
Signed-off-by: moul <[email protected]>
  • Loading branch information
moul committed Jul 5, 2024
1 parent 5f1e2ff commit 94f30b5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions examples/gno.land/r/demo/bar20/bar20.gno
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (

"gno.land/p/demo/grc/grc20"
"gno.land/p/demo/ufmt"
"gno.land/r/demo/grc20reg"
)

var (
Expand All @@ -19,6 +20,7 @@ var (
func init() {
banker = grc20.NewAdminToken("Bar", "BAR", 4)
Token = banker.GRC20()
grc20reg.Register(token, "")
}

func Faucet() string {
Expand Down
1 change: 1 addition & 0 deletions examples/gno.land/r/demo/bar20/gno.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ require (
gno.land/p/demo/grc/grc20 v0.0.0-latest
gno.land/p/demo/testutils v0.0.0-latest
gno.land/p/demo/ufmt v0.0.0-latest
gno.land/r/demo/grc20reg v0.0.0-latest
)
2 changes: 2 additions & 0 deletions examples/gno.land/r/demo/grc20factory/grc20factory.gno
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (

"gno.land/p/demo/avl"
"gno.land/p/demo/grc/grc20"
"gno.land/r/demo/grc20reg"
)

// XXX: the p/grc20 library needs a refactor to change names (i.e., adminToken)
Expand Down Expand Up @@ -36,6 +37,7 @@ func NewTokenWithAdmin(name, symbol string, decimals uint, initialMint uint64, a
admin: admin,
}
tokens.Set(symbol, &t)
grc20reg.Register(newToken.GRC20(), symbol)
}

// method proxies as public functions.
Expand Down
2 changes: 1 addition & 1 deletion examples/gno.land/r/demo/grc20reg/grc20reg.gno
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"gno.land/p/demo/ufmt"
)

var registry = avl.NewTree() // pkg path -> IGRC20
var registry = avl.NewTree() // rlmPath[.slug] -> IGRC20

func Register(token grc20.IGRC20, slug string) {
rlmPath := std.PrevRealm().PkgPath()
Expand Down

0 comments on commit 94f30b5

Please sign in to comment.