Skip to content

Commit

Permalink
refactor!: split r/demo/users (#1433)
Browse files Browse the repository at this point in the history
Splits `r/demo/users` into `p/demo/users` and `r/demo/users` 

Related #1393 

<details><summary>Contributors' checklist...</summary>

- [x] Added new tests, or not needed, or not feasible
- [x] Provided an example (e.g. screenshot) to aid review or the PR is
self-explanatory
- [x] Updated the official documentation or not needed
- [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message
was included in the description
- [x] Added references to related issues and PRs
- [x] Provided any useful hints for running manual tests
- [x] Added new benchmarks to [generated
graphs](https://gnoland.github.io/benchmarks), if any. More info
[here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md).
</details>
  • Loading branch information
harry-hov authored Feb 29, 2024
1 parent 9b37107 commit d32b583
Show file tree
Hide file tree
Showing 28 changed files with 282 additions and 279 deletions.
32 changes: 16 additions & 16 deletions examples/gno.land/p/demo/grc/grc1155/basic_grc1155_token_test.gno
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"std"
"testing"

"gno.land/r/demo/users"
"gno.land/p/demo/users"
)

const dummyURI = "ipfs://xyz"
Expand Down Expand Up @@ -35,8 +35,8 @@ func TestBalanceOf(t *testing.T) {
t.Errorf("should not be nil")
}

addr1 := users.AddressOrName("g1var589z07ppjsjd24ukm4uguzwdt0tw7g47cgm").Resolve()
addr2 := users.AddressOrName("g1us8428u2a5satrlxzagqqa5m6vmuze025anjlj").Resolve()
addr1 := std.Address("g1var589z07ppjsjd24ukm4uguzwdt0tw7g47cgm")
addr2 := std.Address("g1us8428u2a5satrlxzagqqa5m6vmuze025anjlj")

tid1 := TokenID("1")
tid2 := TokenID("2")
Expand Down Expand Up @@ -86,8 +86,8 @@ func TestBalanceOfBatch(t *testing.T) {
t.Errorf("should not be nil")
}

addr1 := users.AddressOrName("g1var589z07ppjsjd24ukm4uguzwdt0tw7g47cgm").Resolve()
addr2 := users.AddressOrName("g1us8428u2a5satrlxzagqqa5m6vmuze025anjlj").Resolve()
addr1 := std.Address("g1var589z07ppjsjd24ukm4uguzwdt0tw7g47cgm")
addr2 := std.Address("g1us8428u2a5satrlxzagqqa5m6vmuze025anjlj")

tid1 := TokenID("1")
tid2 := TokenID("2")
Expand Down Expand Up @@ -126,8 +126,8 @@ func TestIsApprovedForAll(t *testing.T) {
t.Errorf("should not be nil")
}

addr1 := users.AddressOrName("g1var589z07ppjsjd24ukm4uguzwdt0tw7g47cgm").Resolve()
addr2 := users.AddressOrName("g1us8428u2a5satrlxzagqqa5m6vmuze025anjlj").Resolve()
addr1 := std.Address("g1var589z07ppjsjd24ukm4uguzwdt0tw7g47cgm")
addr2 := std.Address("g1us8428u2a5satrlxzagqqa5m6vmuze025anjlj")

isApprovedForAll := dummy.IsApprovedForAll(addr1, addr2)
if isApprovedForAll != false {
Expand All @@ -142,7 +142,7 @@ func TestSetApprovalForAll(t *testing.T) {
}

caller := std.GetOrigCaller()
addr := users.AddressOrName("g1var589z07ppjsjd24ukm4uguzwdt0tw7g47cgm").Resolve()
addr := std.Address("g1var589z07ppjsjd24ukm4uguzwdt0tw7g47cgm")

isApprovedForAll := dummy.IsApprovedForAll(caller, addr)
if isApprovedForAll != false {
Expand Down Expand Up @@ -177,7 +177,7 @@ func TestSafeTransferFrom(t *testing.T) {
}

caller := std.GetOrigCaller()
addr := users.AddressOrName("g1var589z07ppjsjd24ukm4uguzwdt0tw7g47cgm").Resolve()
addr := std.Address("g1var589z07ppjsjd24ukm4uguzwdt0tw7g47cgm")

tid := TokenID("1")

Expand Down Expand Up @@ -224,7 +224,7 @@ func TestSafeBatchTransferFrom(t *testing.T) {
}

caller := std.GetOrigCaller()
addr := users.AddressOrName("g1var589z07ppjsjd24ukm4uguzwdt0tw7g47cgm").Resolve()
addr := std.Address("g1var589z07ppjsjd24ukm4uguzwdt0tw7g47cgm")

tid1 := TokenID("1")
tid2 := TokenID("2")
Expand Down Expand Up @@ -280,8 +280,8 @@ func TestSafeMint(t *testing.T) {
t.Errorf("should not be nil")
}

addr1 := users.AddressOrName("g1var589z07ppjsjd24ukm4uguzwdt0tw7g47cgm").Resolve()
addr2 := users.AddressOrName("g1us8428u2a5satrlxzagqqa5m6vmuze025anjlj").Resolve()
addr1 := std.Address("g1var589z07ppjsjd24ukm4uguzwdt0tw7g47cgm")
addr2 := std.Address("g1us8428u2a5satrlxzagqqa5m6vmuze025anjlj")

tid1 := TokenID("1")
tid2 := TokenID("2")
Expand Down Expand Up @@ -327,8 +327,8 @@ func TestSafeBatchMint(t *testing.T) {
t.Errorf("should not be nil")
}

addr1 := users.AddressOrName("g1var589z07ppjsjd24ukm4uguzwdt0tw7g47cgm").Resolve()
addr2 := users.AddressOrName("g1us8428u2a5satrlxzagqqa5m6vmuze025anjlj").Resolve()
addr1 := std.Address("g1var589z07ppjsjd24ukm4uguzwdt0tw7g47cgm")
addr2 := std.Address("g1us8428u2a5satrlxzagqqa5m6vmuze025anjlj")

tid1 := TokenID("1")
tid2 := TokenID("2")
Expand Down Expand Up @@ -374,7 +374,7 @@ func TestBurn(t *testing.T) {
t.Errorf("should not be nil")
}

addr := users.AddressOrName("g1var589z07ppjsjd24ukm4uguzwdt0tw7g47cgm").Resolve()
addr := std.Address("g1var589z07ppjsjd24ukm4uguzwdt0tw7g47cgm")

tid1 := TokenID("1")
tid2 := TokenID("2")
Expand Down Expand Up @@ -417,7 +417,7 @@ func TestBatchBurn(t *testing.T) {
t.Errorf("should not be nil")
}

addr := users.AddressOrName("g1var589z07ppjsjd24ukm4uguzwdt0tw7g47cgm").Resolve()
addr := std.Address("g1var589z07ppjsjd24ukm4uguzwdt0tw7g47cgm")

tid1 := TokenID("1")
tid2 := TokenID("2")
Expand Down
2 changes: 1 addition & 1 deletion examples/gno.land/p/demo/grc/grc1155/gno.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ module gno.land/p/demo/grc/grc1155
require (
gno.land/p/demo/avl v0.0.0-latest
gno.land/p/demo/ufmt v0.0.0-latest
gno.land/r/demo/users v0.0.0-latest
gno.land/p/demo/users v0.0.0-latest
)
Loading

0 comments on commit d32b583

Please sign in to comment.