Documentation ¶
Index ¶
- func NormalizeProposalStatus(status string) string
- func NormalizeVoteOption(option string) string
- func QueryProposalByID(proposalID uint64, cliCtx context.CLIContext, queryRoute string) ([]byte, error)
- func QueryVoteByTxQuery(cliCtx context.CLIContext, params types.QueryVoteParams) ([]byte, error)
- func QueryVotesByTxQuery(cliCtx context.CLIContext, params types.QueryProposalVotesParams) ([]byte, error)
- type Proposer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NormalizeProposalStatus ¶
NormalizeProposalStatus - normalize user specified proposal status
func NormalizeVoteOption ¶
NormalizeVoteOption - normalize user specified vote option
func QueryProposalByID ¶
func QueryProposalByID(proposalID uint64, cliCtx context.CLIContext, queryRoute string) ([]byte, error)
QueryProposalByID takes a proposalID and returns a proposal
func QueryVoteByTxQuery ¶
func QueryVoteByTxQuery(cliCtx context.CLIContext, params types.QueryVoteParams) ([]byte, error)
QueryVoteByTxQuery will query for a single vote via a direct txs tags query.
func QueryVotesByTxQuery ¶
func QueryVotesByTxQuery(cliCtx context.CLIContext, params types.QueryProposalVotesParams) ([]byte, error)
QueryVotesByTxQuery will query for votes via a direct txs tags query. It will fetch and build votes directly from the returned txs and return a JSON marshalled result or any error that occurred.
Types ¶
type Proposer ¶
type Proposer struct { ProposalID uint64 `json:"proposal_id" yaml:"proposal_id"` Proposer string `json:"proposer" yaml:"proposer"` }
Proposer contains metadata of a governance proposal used for querying a proposer.
func NewProposer ¶
NewProposer returns a new Proposer given id and proposer
func QueryProposerByTxQuery ¶
func QueryProposerByTxQuery(cliCtx context.CLIContext, proposalID uint64) (Proposer, error)
QueryProposerByTxQuery will query for a proposer of a governance proposal by ID.