cosmos-sdk: github.com/cosmos/cosmos-sdk/x/gov/client/utils Index | Files

package utils

import "github.com/cosmos/cosmos-sdk/x/gov/client/utils"

Index

Package Files

query.go utils.go

func NormalizeProposalStatus Uses

func NormalizeProposalStatus(status string) string

NormalizeProposalStatus - normalize user specified proposal status

func NormalizeProposalType Uses

func NormalizeProposalType(proposalType string) string

NormalizeProposalType - normalize user specified proposal type

func NormalizeVoteOption Uses

func NormalizeVoteOption(option string) string

NormalizeVoteOption - normalize user specified vote option

func QueryDepositByTxQuery Uses

func QueryDepositByTxQuery(clientCtx client.Context, params types.QueryDepositParams) ([]byte, error)

QueryDepositByTxQuery will query for a single deposit via a direct txs tags query.

func QueryDepositsByTxQuery Uses

func QueryDepositsByTxQuery(clientCtx client.Context, params types.QueryProposalParams) ([]byte, error)

QueryDepositsByTxQuery will query for deposits via a direct txs tags query. It will fetch and build deposits directly from the returned txs and return a JSON marshalled result or any error that occurred.

NOTE: SearchTxs is used to facilitate the txs query which does not currently support configurable pagination.

func QueryProposalByID Uses

func QueryProposalByID(proposalID uint64, clientCtx client.Context, queryRoute string) ([]byte, error)

QueryProposalByID takes a proposalID and returns a proposal

func QueryVoteByTxQuery Uses

func QueryVoteByTxQuery(clientCtx client.Context, params types.QueryVoteParams) ([]byte, error)

QueryVoteByTxQuery will query for a single vote via a direct txs tags query.

func QueryVotesByTxQuery Uses

func QueryVotesByTxQuery(clientCtx client.Context, 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.

type Proposer Uses

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 Uses

func NewProposer(proposalID uint64, proposer string) Proposer

NewProposer returns a new Proposer given id and proposer

func QueryProposerByTxQuery Uses

func QueryProposerByTxQuery(clientCtx client.Context, proposalID uint64) (Proposer, error)

QueryProposerByTxQuery will query for a proposer of a governance proposal by ID.

func (Proposer) String Uses

func (p Proposer) String() string

Package utils imports 5 packages (graph) and is imported by 2 packages. Updated 2020-08-13. Refresh now. Tools for package owners.