Search Apps Documentation Source Content File Folder Download Copy Actions Download

govdao_execute_proposal_03_filetest.gno

0.43 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() {
15	// Create a dummy executor
16	cb := func(realm) error { return nil }
17	executor = dao.NewSimpleExecutor(cb, "")
18}
19
20func main() {
21	// Try to execute a proposal that doesn't exist
22	govdao.ExecuteProposal(404, executor)
23}
24
25// Error:
26// proposal not found