Search Apps Documentation Source Content File Folder Download Copy Actions Download

z_commondao_must_execute_0_filetest.gno

0.59 Kb ยท 24 lines
 1// PKGPATH: gno.land/r/test
 2package test
 3
 4import (
 5	"time"
 6
 7	"gno.land/p/nt/commondao"
 8)
 9
10type testPropDef struct{}
11
12func (testPropDef) Title() string                               { return "" }
13func (testPropDef) Body() string                                { return "" }
14func (testPropDef) VotingPeriod() time.Duration                 { return 0 }
15func (testPropDef) Execute(cur realm) error                     { return nil }
16func (testPropDef) Tally(commondao.VotingContext) (bool, error) { return true, nil }
17
18func main() {
19	commondao.MustExecute(testPropDef{})
20	println("ok")
21}
22
23// Output:
24// ok