-
Notifications
You must be signed in to change notification settings - Fork 3.8k
/
Copy pathconfig.go
33 lines (27 loc) · 914 Bytes
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package group
import "time"
// Config used to initialize x/group module avoiding using global variable.
type Config struct {
// MaxExecutionPeriod defines the max duration after a proposal's voting
// period ends that members can send a MsgExec to execute the proposal.
MaxExecutionPeriod time.Duration
// MaxMetadataLen defines the max chars allowed in all
// messages that allows creating or updating a group
// with a metadata field
MaxMetadataLen uint64
// title field
// Defaults to 255 if not explicitly set.
MaxProposalTitleLen uint64
// summary field
// Defaults to 10200 if not explicitly set.
MaxProposalSummaryLen uint64
}
// DefaultConfig returns the default config for group.
func DefaultConfig() Config {
return Config{
MaxExecutionPeriod: 2 * time.Hour * 24 * 7, // Two weeks.
MaxMetadataLen: 255,
MaxProposalTitleLen: 255,
MaxProposalSummaryLen: 10200,
}
}