1package main
2
3// SEND: 200000000ugnot
4
5import (
6 "std"
7
8 "gno.land/r/demo/users"
9)
10
11const admin = std.Address("g1manfred47kzduec920z88wfr64ylksmdcedlf5")
12
13func main() {
14 caller := std.GetOrigCaller() // main
15 std.TestSetOrigCaller(admin)
16 // add restricted name
17 users.AdminAddRestrictedName("superrestricted")
18 // grant invite to caller
19 users.Invite(caller.String())
20 // set back caller
21 std.TestSetOrigCaller(caller)
22 // register restricted name with admin invite
23 users.Register(admin, "superrestricted", "my profile")
24 println("done")
25}
26
27// Output:
28// done
z_11b_filetest.gno
0.55 Kb ยท 28 lines