utils

package
v1.5.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2022 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeProposalStatus

func NormalizeProposalStatus(status string) string

NormalizeProposalStatus - normalize user specified proposal status

func NormalizeProposalType

func NormalizeProposalType(proposalType string) string

NormalizeProposalType - normalize user specified proposal type

func NormalizeVoteOption

func NormalizeVoteOption(option string) string

NormalizeVoteOption - normalize user specified vote option

func QueryDepositByTxQuery

func QueryDepositByTxQuery(cliCtx context.CLIContext, params types.QueryDepositParams) ([]byte, error)

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

func QueryDepositsByTxQuery

func QueryDepositsByTxQuery(cliCtx context.CLIContext, 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

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.QueryProposalParams) ([]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.

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

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

func NewProposer(proposalID uint64, proposer string) Proposer

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.

func (Proposer) String

func (p Proposer) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL