govdao_execute_proposal_03_filetest.gno
0.46 Kb · 26 lines
1// PKGPATH: gno.land/r/test/govdao
2package govdao
3
4import (
5 "gno.land/r/gov/dao"
6 "gno.land/r/gov/dao/v3/impl"
7)
8
9var (
10 executor dao.Executor
11 govdao = impl.NewGovDAO()
12)
13
14func init(cur realm) {
15 // Create a dummy executor
16 cb := func(realm) error { return nil }
17 executor = dao.NewSimpleExecutor(0, cur, cb, "")
18}
19
20func main(cur realm) {
21 // Try to execute a proposal that doesn't exist
22 govdao.ExecuteProposal(0, cur, 404, executor)
23}
24
25// Error:
26// proposal not found