cosmos-sdk/x/group/config.go
emidev98 0917d347e3
feat(x/group): extend group config and make it configurable (#18448)
Co-authored-by: Julien Robert <julien@rbrt.fr>
2023-11-27 08:50:30 +00:00

34 lines
914 B
Go

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,
}
}