Documentation ¶
Index ¶
- Constants
- Variables
- func AddGovPropFlagsToCmd(cmd *cobra.Command)
- func GetCmdConstitution() *cobra.Command
- func GetCmdQueryDeposit() *cobra.Command
- func GetCmdQueryDeposits() *cobra.Command
- func GetCmdQueryParam() *cobra.Command
- func GetCmdQueryParams() *cobra.Command
- func GetCmdQueryProposal() *cobra.Command
- func GetCmdQueryProposals() *cobra.Command
- func GetCmdQueryProposer() *cobra.Command
- func GetCmdQueryTally() *cobra.Command
- func GetCmdQueryVote() *cobra.Command
- func GetCmdQueryVotes() *cobra.Command
- func GetQueryCmd() *cobra.Command
- func NewCmdDeposit() *cobra.Command
- func NewCmdDraftProposal() *cobra.Command
- func NewCmdGenerateConstitutionAmendment() *cobra.Command
- func NewCmdSubmitLegacyProposal() *cobra.Command
- func NewCmdSubmitProposal() *cobra.Command
- func NewCmdVote() *cobra.Command
- func NewCmdWeightedVote() *cobra.Command
- func NewTxCmd(legacyPropCmds []*cobra.Command) *cobra.Command
- func Prompt[T any](data T, namePrefix string) (T, error)
- func PromptMetadata(skip bool) (types.ProposalMetadata, error)
- func ReadGovPropFlags(clientCtx client.Context, flagSet *pflag.FlagSet) (*govv1.MsgSubmitProposal, error)
Constants ¶
const ( FlagTitle = "title" // Deprecated: only used for v1beta1 legacy proposals. FlagDescription = "description" // Deprecated: only used for v1beta1 legacy proposals. FlagProposalType = "type" FlagDeposit = "deposit" FlagMetadata = "metadata" FlagSummary = "summary" // Deprecated: only used for v1beta1 legacy proposals. FlagProposal = "proposal" )
Proposal flags
Variables ¶
var ProposalFlags = []string{ FlagTitle, FlagDescription, FlagProposalType, FlagDeposit, }
ProposalFlags defines the core required fields of a legacy proposal. It is used to verify that these values are not provided in conjunction with a JSON proposal file.
Functions ¶
func AddGovPropFlagsToCmd ¶
AddGovPropFlagsToCmd adds flags for defining MsgSubmitProposal fields.
See also ReadGovPropFlags.
func GetCmdConstitution ¶
func GetCmdQueryDeposit ¶
GetCmdQueryDeposit implements the query proposal deposit command. Command to get a specific Deposit Information.
func GetCmdQueryDeposits ¶
GetCmdQueryDeposits implements the command to query for proposal deposits.
func GetCmdQueryParam ¶
GetCmdQueryParam implements the query param command.
func GetCmdQueryParams ¶
GetCmdQueryParams implements the query params command.
func GetCmdQueryProposal ¶
GetCmdQueryProposal implements the query proposal command.
func GetCmdQueryProposals ¶
GetCmdQueryProposals implements a query proposals command. Command to Get Proposals Information.
func GetCmdQueryProposer ¶
GetCmdQueryProposer implements the query proposer command.
func GetCmdQueryTally ¶
GetCmdQueryTally implements the command to query for proposal tally result.
func GetCmdQueryVote ¶
GetCmdQueryVote implements the query proposal vote command. Command to Get a Vote Information.
func GetCmdQueryVotes ¶
GetCmdQueryVotes implements the command to query for proposal votes.
func GetQueryCmd ¶
GetQueryCmd returns the cli query commands for this module
func NewCmdDeposit ¶
NewCmdDeposit implements depositing tokens for an active proposal.
func NewCmdDraftProposal ¶
NewCmdDraftProposal let a user generate a draft proposal.
func NewCmdGenerateConstitutionAmendment ¶
NewCmdConstitutionAmendmentMsg returns the command to generate the sdk.Msg required for a constitution amendment proposal generating the unified diff between the current constitution (queried) and the updated constitution from the provided markdown file.
func NewCmdSubmitLegacyProposal ¶
NewCmdSubmitLegacyProposal implements submitting a proposal transaction command. Deprecated: please use NewCmdSubmitProposal instead.
func NewCmdSubmitProposal ¶
NewCmdSubmitProposal implements submitting a proposal transaction command.
func NewCmdVote ¶
NewCmdVote implements creating a new vote command.
func NewCmdWeightedVote ¶
NewCmdWeightedVote implements creating a new weighted vote command.
func NewTxCmd ¶
NewTxCmd returns the transaction commands for this module governance ModuleClient is slightly different from other ModuleClients in that it contains a slice of legacy "proposal" child commands. These commands are respective to the proposal type handlers that are implemented in other modules but are mounted under the governance CLI (eg. parameter change proposals).
func Prompt ¶
Prompt prompts the user for all values of the given type. data is the struct to be filled namePrefix is the name to be displayed as "Enter <namePrefix> <field>"
func PromptMetadata ¶
func PromptMetadata(skip bool) (types.ProposalMetadata, error)
PromptMetadata prompts for proposal metadata or only title and summary if skip is true
func ReadGovPropFlags ¶
func ReadGovPropFlags(clientCtx client.Context, flagSet *pflag.FlagSet) (*govv1.MsgSubmitProposal, error)
ReadGovPropFlags parses a MsgSubmitProposal from the provided context and flags. Setting the messages is up to the caller.
See also AddGovPropFlagsToCmd.
Types ¶
This section is empty.