Skip to content

Commit

Permalink
revert change
Browse files Browse the repository at this point in the history
  • Loading branch information
omarsy committed Jan 20, 2025
1 parent d55c5a0 commit 5d1c3e8
Show file tree
Hide file tree
Showing 42 changed files with 292 additions and 209 deletions.
3 changes: 0 additions & 3 deletions examples/gno.land/r/demo/banktest/z_0_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ package bank1
import (
"std"

"gno.land/p/demo/testutils"
"gno.land/r/demo/banktest"
)

Expand All @@ -30,8 +29,6 @@ func main() {
// simulate a Deposit call. use Send + OrigSend to simulate -send.
banker.SendCoins(mainaddr, banktestAddr, std.Coins{{"ugnot", 100_000_000}})
std.TestSetOrigSend(std.Coins{{"ugnot", 100_000_000}}, nil)
caller := testutils.TestAddress("caller")
std.TestSetRealm(std.NewUserRealm(caller))
res := banktest.Deposit("ugnot", 50_000_000)
println("Deposit():", res)

Expand Down
3 changes: 0 additions & 3 deletions examples/gno.land/r/demo/banktest/z_1_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ package bank1
import (
"std"

"gno.land/p/demo/testutils"
"gno.land/r/demo/banktest"
)

Expand All @@ -19,8 +18,6 @@ func main() {
std.TestSetOrigPkgAddr(banktestAddr)
std.TestIssueCoins(banktestAddr, std.Coins{{"ugnot", 100000000}})
std.TestSetOrigSend(std.Coins{{"ugnot", 100000000}}, nil)
caller := testutils.TestAddress("caller")
std.TestSetRealm(std.NewUserRealm(caller))
res := banktest.Deposit("ugnot", 101000000)
println(res)
}
Expand Down
3 changes: 0 additions & 3 deletions examples/gno.land/r/demo/banktest/z_2_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ package bank1
import (
"std"

"gno.land/p/demo/testutils"
"gno.land/r/demo/banktest"
)

Expand All @@ -27,8 +26,6 @@ func main() {
std.TestSetOrigPkgAddr(banktestAddr)
std.TestIssueCoins(banktestAddr, std.Coins{{"ugnot", 100000000}})
std.TestSetOrigSend(std.Coins{{"ugnot", 100000000}}, nil)
caller := testutils.TestAddress("caller")
std.TestSetRealm(std.NewUserRealm(caller))
res := banktest.Deposit("ugnot", 55000000)
println("Deposit():", res)

Expand Down
5 changes: 0 additions & 5 deletions examples/gno.land/r/demo/groups/z_0_a_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,12 @@
package groups_test

import (
"std"

"gno.land/p/demo/testutils"
"gno.land/r/demo/groups"
)

var gid groups.GroupID

func main() {
test := testutils.TestAddress("test")
std.TestSetRealm(std.NewUserRealm(test))
gid = groups.CreateGroup("test_group")
println(gid)
println(groups.Render(""))
Expand Down
5 changes: 0 additions & 5 deletions examples/gno.land/r/demo/groups/z_0_b_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,13 @@
package groups_test

import (
"std"

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

var gid groups.GroupID

func main() {
test := testutils.TestAddress("test")
std.TestSetRealm(std.NewUserRealm(test))
users.Register("", "gnouser", "my profile")
gid = groups.CreateGroup("test_group")
println(gid)
Expand Down
5 changes: 0 additions & 5 deletions examples/gno.land/r/demo/groups/z_0_c_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,13 @@ package groups_test
// SEND: 200000000ugnot

import (
"std"

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

var gid groups.GroupID

func main() {
test := testutils.TestAddress("test")
std.TestSetRealm(std.NewUserRealm(test))
users.Register("", "gnouser", "my profile")
gid = groups.CreateGroup("test_group")
println(gid)
Expand Down
4 changes: 1 addition & 3 deletions examples/gno.land/r/demo/groups/z_1_a_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ var gid groups.GroupID
const admin = std.Address("g1manfred47kzduec920z88wfr64ylksmdcedlf5")

func main() {
caller := testutils.TestAddress("caller")
std.TestSetRealm(std.NewUserRealm(caller))
std.TestSetOrigCaller(caller)
caller := std.GetOrigCaller() // main
users.Register("", "gnouser0", "my profile 1")

std.TestSetOrigCaller(admin)
Expand Down
5 changes: 0 additions & 5 deletions examples/gno.land/r/demo/groups/z_1_b_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,13 @@ package groups_test
// SEND: 200000000ugnot

import (
"std"

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

var gid groups.GroupID

func main() {
test := testutils.TestAddress("test")
std.TestSetRealm(std.NewUserRealm(test))
users.Register("", "gnouser", "my profile")
gid = groups.CreateGroup("test_group")
println(gid)
Expand Down
2 changes: 0 additions & 2 deletions examples/gno.land/r/demo/groups/z_1_c_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import (
var gid groups.GroupID

func main() {
test := testutils.TestAddress("test")
std.TestSetRealm(std.NewUserRealm(test))
gid = groups.CreateGroup("test_group")
println(gid)

Expand Down
4 changes: 1 addition & 3 deletions examples/gno.land/r/demo/groups/z_2_a_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ var gid groups.GroupID
const admin = std.Address("g1manfred47kzduec920z88wfr64ylksmdcedlf5")

func main() {
caller := testutils.TestAddress("caller")
std.TestSetRealm(std.NewUserRealm(caller))
std.TestSetOrigCaller(caller)
caller := std.GetOrigCaller() // main
users.Register("", "gnouser0", "my profile 1")

std.TestSetOrigCaller(admin)
Expand Down
5 changes: 0 additions & 5 deletions examples/gno.land/r/demo/groups/z_2_b_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,13 @@ package groups_test
// SEND: 200000000ugnot

import (
"std"

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

var gid groups.GroupID

func main() {
caller := testutils.TestAddress("caller")
std.TestSetRealm(std.NewUserRealm(caller))
users.Register("", "gnouser", "my profile")
gid = groups.CreateGroup("test_group")
println(gid)
Expand Down
2 changes: 0 additions & 2 deletions examples/gno.land/r/demo/groups/z_2_d_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import (
var gid groups.GroupID

func main() {
caller := testutils.TestAddress("caller")
std.TestSetRealm(std.NewUserRealm(caller))
users.Register("", "gnouser", "my profile")
gid = groups.CreateGroup("test_group")
println(gid)
Expand Down
5 changes: 0 additions & 5 deletions examples/gno.land/r/demo/groups/z_2_e_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,13 @@ package groups_test
// SEND: 200000000ugnot

import (
"std"

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

var gid groups.GroupID

func main() {
caller := testutils.TestAddress("caller")
std.TestSetRealm(std.NewUserRealm(caller))
users.Register("", "gnouser", "my profile")
gid = groups.CreateGroup("test_group")
println(gid)
Expand Down
5 changes: 0 additions & 5 deletions examples/gno.land/r/demo/groups/z_2_f_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,13 @@ package groups_test
// SEND: 200000000ugnot

import (
"std"

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

var gid groups.GroupID

func main() {
caller := testutils.TestAddress("caller")
std.TestSetRealm(std.NewUserRealm(caller))
users.Register("", "gnouser", "my profile")
gid = groups.CreateGroup("test_group")
println(gid)
Expand Down
3 changes: 0 additions & 3 deletions examples/gno.land/r/demo/groups/z_2_g_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ import (
var gid groups.GroupID

func main() {
caller := testutils.TestAddress("caller")
std.TestSetRealm(std.NewUserRealm(caller))
std.TestSetOrigCaller(caller)
users.Register("", "gnouser", "my profile")
gid = groups.CreateGroup("test_group")
println(gid)
Expand Down
5 changes: 0 additions & 5 deletions examples/gno.land/r/demo/users/z_0_b_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,10 @@ package main
// SEND: 19900000ugnot

import (
"std"

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

func main() {
caller := testutils.TestAddress("caller")
std.TestSetRealm(std.NewUserRealm(caller))
users.Register("", "gnouser", "my profile")
println("done")
}
Expand Down
3 changes: 0 additions & 3 deletions examples/gno.land/r/demo/users/z_0_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@ package main
import (
"std"

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

func main() {
caller := testutils.TestAddress("caller")
std.TestSetRealm(std.NewUserRealm(caller))
std.TestSetOrigSend(std.Coins{std.NewCoin("dontcare", 1)}, nil)
users.Register("", "gnouser", "my profile")
println("done")
Expand Down
5 changes: 1 addition & 4 deletions examples/gno.land/r/demo/users/z_10_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ import (
const admin = std.Address("g1manfred47kzduec920z88wfr64ylksmdcedlf5")

func init() {
caller := testutils.TestAddress("caller")
std.TestSetRealm(std.NewUserRealm(caller))
std.TestSetOrigCaller(caller)
caller := std.GetOrigCaller() // main
test2 := testutils.TestAddress("test2")
// as admin, invite gnouser and test2
std.TestSetOrigCaller(admin)
Expand All @@ -26,7 +24,6 @@ func init() {
func main() {
// register as test2
test2 := testutils.TestAddress("test2")
std.TestSetRealm(std.NewUserRealm(test2))
std.TestSetOrigCaller(test2)
users.Register(admin, "test222", "my profile 2")
println("done")
Expand Down
4 changes: 1 addition & 3 deletions examples/gno.land/r/demo/users/z_11_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@ package main
import (
"std"

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

const admin = std.Address("g1manfred47kzduec920z88wfr64ylksmdcedlf5")

func main() {
caller := testutils.TestAddress("caller")
std.TestSetRealm(std.NewUserRealm(caller))
std.TestSetOrigCaller(admin)
caller := std.GetOrigCaller() // main
users.AdminAddRestrictedName("superrestricted")

// test restricted name
Expand Down
4 changes: 1 addition & 3 deletions examples/gno.land/r/demo/users/z_11b_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@ package main
import (
"std"

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

const admin = std.Address("g1manfred47kzduec920z88wfr64ylksmdcedlf5")

func main() {
caller := testutils.TestAddress("caller")
std.TestSetRealm(std.NewUserRealm(caller))
std.TestSetOrigCaller(admin)
caller := std.GetOrigCaller() // main
// add restricted name
users.AdminAddRestrictedName("superrestricted")
// grant invite to caller
Expand Down
4 changes: 0 additions & 4 deletions examples/gno.land/r/demo/users/z_12_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@ package main
// SEND: 200000000ugnot

import (
"std"
"strconv"

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

func main() {
caller := testutils.TestAddress("caller")
std.TestSetRealm(std.NewUserRealm(caller))
users.Register("", "alicia", "my profile")

{
Expand Down
6 changes: 0 additions & 6 deletions examples/gno.land/r/demo/users/z_1_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,10 @@ package main
// SEND: 200000000ugnot

import (
"std"

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

func main() {
caller := testutils.TestAddress("caller")
std.TestSetRealm(std.NewUserRealm(caller))

users.Register("", "gnouser", "my profile")
println("done")
}
Expand Down
4 changes: 1 addition & 3 deletions examples/gno.land/r/demo/users/z_2_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ import (
const admin = std.Address("g1manfred47kzduec920z88wfr64ylksmdcedlf5")

func main() {
caller := testutils.TestAddress("caller")
std.TestSetRealm(std.NewUserRealm(caller))
std.TestSetOrigCaller(caller)
caller := std.GetOrigCaller() // main
users.Register("", "gnouser", "my profile")
// as admin, grant invites to gnouser
std.TestSetOrigCaller(admin)
Expand Down
4 changes: 1 addition & 3 deletions examples/gno.land/r/demo/users/z_3_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ import (
const admin = std.Address("g1manfred47kzduec920z88wfr64ylksmdcedlf5")

func main() {
caller := testutils.TestAddress("caller")
std.TestSetRealm(std.NewUserRealm(caller))
std.TestSetOrigCaller(caller)
caller := std.GetOrigCaller() // main
users.Register("", "gnouser", "my profile")
// as admin, grant invites to gnouser
std.TestSetOrigCaller(admin)
Expand Down
4 changes: 1 addition & 3 deletions examples/gno.land/r/demo/users/z_4_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ import (
const admin = std.Address("g1manfred47kzduec920z88wfr64ylksmdcedlf5")

func main() {
caller := testutils.TestAddress("caller")
std.TestSetRealm(std.NewUserRealm(caller))
std.TestSetOrigCaller(caller)
caller := std.GetOrigCaller() // main
users.Register("", "gnouser", "my profile")
// as admin, grant invites to gnouser
std.TestSetOrigCaller(admin)
Expand Down
Loading

0 comments on commit 5d1c3e8

Please sign in to comment.