utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const MaxPerPage = 100

Variables

View Source
var (
	GenerateOrBroadcastMsgs    = cosmosutils.GenerateOrBroadcastMsgs
	GetTxEncoder               = cosmosutils.GetTxEncoder
	WriteGenerateStdTxResponse = cosmosutils.WriteGenerateStdTxResponse
)

Functions

func BlockWithTxResponses

func BlockWithTxResponses(cliCtx context.CLIContext, latestBlockHeight, fromBlockHeight, fetchSize int64) (blockWithRxResultsWrapper *types.HasMoreResponseWrapper, err error)

func LatestBlockHeight

func LatestBlockHeight(cliCtx context.CLIContext) (int64, error)

func ParseHTTPArgs

func ParseHTTPArgs(r *http.Request) (tags []string, page, limit int, err error)

ParseHTTPArgs parses the request's URL and returns a slice containing all arguments pairs. It separates page and limit used for pagination.

func QueryGenesisAccount

func QueryGenesisAccount(cliCtx context.CLIContext, page, perPage int) (local.SearchGenesisAccountResult, error)

func QueryGenesisTx

func QueryGenesisTx(cliCtx context.CLIContext) ([]sdk.Tx, error)

func QueryTx

func QueryTx(cliCtx context.CLIContext, hashHexStr string) (local.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 QueryTxsByEvents

func QueryTxsByEvents(cliCtx context.CLIContext, events []string, page, limit int) (*local.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.

Types

This section is empty.

Directories

Path Synopsis
Package mock_client is a generated GoMock package.
Package mock_client is a generated GoMock package.

Jump to

Keyboard shortcuts

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