Documentation ¶
Overview ¶
DONTCOVER nolint
Index ¶
- Constants
- func ErrInvalidProposalContent(cs sdk.CodespaceType, msg string) sdk.Error
- func RegisterCodec(cdc *codec.Codec)
- func ValidateAbstract(codespace sdk.CodespaceType, c Content) sdk.Error
- type Content
- type GenesisState
- type Proposal
- type ProposalQueue
- type Proposals
- type SoftwareUpgradeProposal
- func (sup SoftwareUpgradeProposal) GetDescription() string
- func (sup SoftwareUpgradeProposal) GetTitle() string
- func (sup SoftwareUpgradeProposal) ProposalRoute() string
- func (sup SoftwareUpgradeProposal) ProposalType() string
- func (sup SoftwareUpgradeProposal) String() string
- func (sup SoftwareUpgradeProposal) ValidateBasic() sdk.Error
- type TextProposal
Constants ¶
View Source
const ( ModuleName = "gov" RouterKey = ModuleName DefaultCodespace sdk.CodespaceType = "gov" ProposalTypeText string = "Text" ProposalTypeSoftwareUpgrade string = "SoftwareUpgrade" MaxDescriptionLength int = 5000 MaxTitleLength int = 140 CodeInvalidContent sdk.CodeType = 6 )
Variables ¶
This section is empty.
Functions ¶
func ErrInvalidProposalContent ¶
func ErrInvalidProposalContent(cs sdk.CodespaceType, msg string) sdk.Error
func RegisterCodec ¶
func ValidateAbstract ¶
func ValidateAbstract(codespace sdk.CodespaceType, c Content) sdk.Error
Types ¶
type Content ¶
type Content interface { GetTitle() string GetDescription() string ProposalRoute() string ProposalType() string ValidateBasic() sdk.Error String() string }
func NewSoftwareUpgradeProposal ¶ added in v0.36.0
func NewTextProposal ¶
type GenesisState ¶
type GenesisState struct { StartingProposalID uint64 `json:"starting_proposal_id"` Deposits v034gov.Deposits `json:"deposits"` Votes v034gov.Votes `json:"votes"` Proposals []Proposal `json:"proposals"` DepositParams v034gov.DepositParams `json:"deposit_params"` VotingParams v034gov.VotingParams `json:"voting_params"` TallyParams v034gov.TallyParams `json:"tally_params"` }
func Migrate ¶
func Migrate(oldGenState v034gov.GenesisState) GenesisState
Migrate accepts exported genesis state from v0.34 and migrates it to v0.36 genesis state. This migration flattens the deposits and votes and updates the proposal content to the new
func NewGenesisState ¶
func NewGenesisState( startingProposalID uint64, deposits v034gov.Deposits, votes v034gov.Votes, proposals []Proposal, depositParams v034gov.DepositParams, votingParams v034gov.VotingParams, tallyParams v034gov.TallyParams, ) GenesisState
type Proposal ¶
type Proposal struct { Content `json:"content"` ProposalID uint64 `json:"id"` Status v034gov.ProposalStatus `json:"proposal_status"` FinalTallyResult v034gov.TallyResult `json:"final_tally_result"` SubmitTime time.Time `json:"submit_time"` DepositEndTime time.Time `json:"deposit_end_time"` TotalDeposit sdk.Coins `json:"total_deposit"` VotingStartTime time.Time `json:"voting_start_time"` VotingEndTime time.Time `json:"voting_end_time"` }
type ProposalQueue ¶
type ProposalQueue []uint64
type SoftwareUpgradeProposal ¶ added in v0.36.0
type SoftwareUpgradeProposal struct { Title string `json:"title"` Description string `json:"description"` }
func (SoftwareUpgradeProposal) GetDescription ¶ added in v0.36.0
func (sup SoftwareUpgradeProposal) GetDescription() string
func (SoftwareUpgradeProposal) GetTitle ¶ added in v0.36.0
func (sup SoftwareUpgradeProposal) GetTitle() string
func (SoftwareUpgradeProposal) ProposalRoute ¶ added in v0.36.0
func (sup SoftwareUpgradeProposal) ProposalRoute() string
func (SoftwareUpgradeProposal) ProposalType ¶ added in v0.36.0
func (sup SoftwareUpgradeProposal) ProposalType() string
func (SoftwareUpgradeProposal) String ¶ added in v0.36.0
func (sup SoftwareUpgradeProposal) String() string
func (SoftwareUpgradeProposal) ValidateBasic ¶ added in v0.36.0
func (sup SoftwareUpgradeProposal) ValidateBasic() sdk.Error
type TextProposal ¶
func (TextProposal) GetDescription ¶
func (tp TextProposal) GetDescription() string
func (TextProposal) GetTitle ¶
func (tp TextProposal) GetTitle() string
func (TextProposal) ProposalRoute ¶
func (tp TextProposal) ProposalRoute() string
func (TextProposal) ProposalType ¶
func (tp TextProposal) ProposalType() string
func (TextProposal) String ¶
func (tp TextProposal) String() string
func (TextProposal) ValidateBasic ¶
func (tp TextProposal) ValidateBasic() sdk.Error
Click to show internal directories.
Click to hide internal directories.