Documentation ¶
Index ¶
- func GetBroadcastCommand(cdc *codec.Codec) *cobra.Command
- func GetDecodeCommand(codec *amino.Codec) *cobra.Command
- func GetEncodeCommand(cdc *codec.Codec) *cobra.Command
- func QueryTxCmd(cdc *codec.Codec) *cobra.Command
- func QueryTxsByEventsCmd(cdc *codec.Codec) *cobra.Command
- func ValidateTxResult(cliCtx context.CLIContext, resTx *ctypes.ResultTx) error
- type SearchTxsResult
- type TxResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDecodeCommand ¶
GetDecodeCommand returns the decode command to take Amino-serialized bytes and turn it into a JSONified transaction.
func GetEncodeCommand ¶
GetEncodeCommand returns the encode command to take a JSONified transaction and turn it into Amino-serialized bytes
func QueryTxsByEventsCmd ¶
QueryTxsByEventsCmd returns a command to search through transactions by events.
func ValidateTxResult ¶
func ValidateTxResult(cliCtx context.CLIContext, resTx *ctypes.ResultTx) error
ValidateTxResult performs transaction verification.
Types ¶
type SearchTxsResult ¶
type SearchTxsResult struct { TotalCount int `json:"total_count"` // Count of all txs Count int `json:"count"` // Count of txs in current page PageNumber int `json:"page_number"` // Index of current page, start from 1 PageTotal int `json:"page_total"` // Count of total pages Limit int `json:"limit"` // Max count txs per page Txs []TxResponse `json:"txs"` // List of txs in current page }
SearchTxsResult defines a structure for querying txs pageable
func NewSearchTxsResult ¶
func NewSearchTxsResult(totalCount, count, page, limit int, txs []TxResponse) SearchTxsResult
func QueryTxsByEvents ¶
func QueryTxsByEvents(cliCtx context.CLIContext, events []string, page, limit int, orderBy string) (*SearchTxsResult, error)
QueryTxsByEvents performs a search for transactions for a given set of events via the Tendermint RPC. An event takes the form of: "{eventAttribute}.{attributeKey} = '{attributeValue}'". Each event is concatenated with an 'AND' operand. It returns a slice of Info object containing txs and metadata. An error is returned if the query fails. If an empty string is provided it will order txs by asc
type TxResponse ¶
type TxResponse sdk.TxResponse
func QueryTx ¶
func QueryTx(cliCtx context.CLIContext, hashHexStr string) (TxResponse, error)
QueryTx queries for a single transaction by a hash string in hex format. An error is returned if the transaction does not exist or cannot be queried.
func (TxResponse) Empty ¶
func (txRes TxResponse) Empty() bool
func (TxResponse) PrettifyJSON ¶
func (txRes TxResponse) PrettifyJSON(cdc *codec.Codec) ([]byte, error)