Search Apps Documentation Source Content File Folder Download Copy Actions Download

zp_0_i_filetest.gno

0.81 Kb · 38 lines
 1package main
 2
 3import (
 4	"testing"
 5
 6	"gno.land/r/nt/commondao/v0"
 7)
 8
 9const (
10	owner = address("g16jpf0puufcpcjkph5nxueec8etpcldz7zwgydq") // @devx
11	user  = address("g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5") // @test1
12)
13
14var daoID uint64
15
16func init() {
17	testing.SetRealm(testing.NewUserRealm(owner))
18	commondao.Invite(cross, user)
19
20	testing.SetRealm(testing.NewUserRealm(user))
21	testing.SetRealm(testing.NewCodeRealm("gno.land/r/demo/test"))
22	dao := commondao.New(cross, "Foo")
23	dao.Members().Add(user)
24
25	options := commondao.GetOptions(dao.ID())
26	options.SetAllowMembersUpdate(true)
27
28	daoID = dao.ID()
29}
30
31func main() {
32	testing.SetRealm(testing.NewUserRealm(user))
33
34	commondao.CreateMembersUpdateProposal(cross, daoID, "", owner.String())
35}
36
37// Error:
38// address is not a DAO member: g16jpf0puufcpcjkph5nxueec8etpcldz7zwgydq