Documentation ¶
Index ¶
- Constants
- Variables
- func AddGovPropFlagsToCmd(cmd *cobra.Command)
- func NewCmdDraftProposal() *cobra.Command
- func NewCmdSubmitLegacyProposal() *cobra.Command
- func NewCmdSubmitProposal() *cobra.Command
- func NewCmdWeightedVote() *cobra.Command
- func NewTxCmd(legacyPropCmds []*cobra.Command) *cobra.Command
- func PromptMetadata(skip bool) (types.ProposalMetadata, error)
- func ReadGovPropCmdFlags(proposer string, flagSet *pflag.FlagSet) (*govv1.MsgSubmitProposal, error)
- func ReadGovPropFlags(clientCtx client.Context, flagSet *pflag.FlagSet) (*govv1.MsgSubmitProposal, error)
- func ValidatePromptCoins(input string) error
- func ValidatePromptNotEmpty(input string) error
Constants ¶
const ( FlagTitle = "title" FlagDeposit = "deposit" FlagMetadata = "metadata" FlagSummary = "summary" FlagExpedited = "expedited" // Deprecated: only used for v1beta1 legacy proposals. FlagProposal = "proposal" // Deprecated: only used for v1beta1 legacy proposals. FlagDescription = "description" // Deprecated: only used for v1beta1 legacy proposals. FlagProposalType = "type" )
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 NewCmdDraftProposal ¶
NewCmdDraftProposal let a user generate a draft proposal.
func NewCmdSubmitLegacyProposal ¶
NewCmdSubmitLegacyProposal implements submitting a proposal transaction command. Deprecated: please use NewCmdSubmitProposal instead.
func NewCmdSubmitProposal ¶
NewCmdSubmitProposal implements submitting a proposal transaction command.
func NewCmdWeightedVote ¶
NewCmdWeightedVote implements creating a new weighted vote command. TODO(@julienrbrt): remove this once AutoCLI can flatten nested structs.
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 PromptMetadata ¶
func PromptMetadata(skip bool) (types.ProposalMetadata, error)
PromptMetadata prompts for proposal metadata or only title and summary if skip is true
func ReadGovPropCmdFlags ¶
ReadGovPropCmdFlags parses a MsgSubmitProposal from the provided context and flags. Setting the messages is up to the caller.
See also AddGovPropFlagsToCmd.
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. Deprecated: use ReadPropCmdFlags instead, as this depends on global bech32 prefixes.
func ValidatePromptCoins ¶
ValidatePromptCoins validates that the input contains valid sdk.Coins
func ValidatePromptNotEmpty ¶
ValidatePromptNotEmpty validates that the input is not empty.
Types ¶
This section is empty.