keeper

package
v0.5.6-x.2 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2022 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxCountPerPage = 100

	AllBlocksQuery = "block.height > 1"
	OrderByAsc     = "asc"
)
View Source
const (
	QueryAllTxs = "tx.height >= 1"
)

Variables

This section is empty.

Functions

func BalancesToAccounts

func BalancesToAccounts(balances []banktypes.Balance) []sdk.AccAddress

func NewQuerier

func NewQuerier(keeper Keeper, cdc *codec.LegacyAmino) sdk.Querier

func ValidatorsToAccounts

func ValidatorsToAccounts(validators []stakingtypes.Validator) ([]sdk.AccAddress, error)

Types

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

func (Keeper) GetAccountTxsCount

func (k Keeper) GetAccountTxsCount(accounts ...sdk.AccAddress) (map[string]int64, error)

GetAccountTxsCount TODO: very bad method, it is better not to use it, or rewrite it more optimized

func (Keeper) GetAvgBlockSizePerDay

func (k Keeper) GetAvgBlockSizePerDay(startDate, endDate *time.Time) ([]telemetrytypes.AverageBlockSizePerDay, error)

func (Keeper) GetAvgBlockTimePerDay

func (k Keeper) GetAvgBlockTimePerDay(startDate, endDate *time.Time) ([]telemetrytypes.AverageBlockTimePerDay, error)

func (Keeper) GetAvgTxFeePerDay

func (k Keeper) GetAvgTxFeePerDay(startDate, endDate *time.Time) ([]telemetrytypes.AverageTxFeePerDay, error)

func (Keeper) GetBalances

func (k Keeper) GetBalances(ctx sdk.Context, addrs ...sdk.AccAddress) []banktypes.Balance

func (Keeper) GetBlockValidators

func (k Keeper) GetBlockValidators(blockHeight int64) ([]tendermint.Validator, error)

func (Keeper) GetBlocksByDates

func (k Keeper) GetBlocksByDates(startDate, endDate *time.Time) (map[time.Time][]*tendermint.Block, error)

func (Keeper) GetBlocksByValidator

func (k Keeper) GetBlocksByValidator(ctx sdk.Context, valAddr sdk.ValAddress) ([]telemetrytypes.ValidatorBlock, error)

func (Keeper) GetPaginatedBalances

func (k Keeper) GetPaginatedBalances(
	ctx sdk.Context,
	denom string,
	desc bool,
	pagination *query.PageRequest,
) ([]banktypes.Balance, uint64)

func (Keeper) GetTopValidatorsByBlocks

func (k Keeper) GetTopValidatorsByBlocks(
	ctx sdk.Context,
	startDate, endDate *time.Time,
	desc bool,
	pagination *query.PageRequest,
) ([]telemetrytypes.ValidatorBlockStats, uint64, error)

func (Keeper) GetTxVolumePerDay

func (k Keeper) GetTxVolumePerDay(startDate, endDate *time.Time) ([]telemetrytypes.TxVolumePerDay, error)

func (Keeper) GetTxs

func (k Keeper) GetTxs(page, maxTxsPerPage int) (*coretypes.ResultTxSearch, error)

func (Keeper) GetValidatorBlocks

func (k Keeper) GetValidatorBlocks(
	ctx sdk.Context,
	valAddr sdk.ValAddress,
	desc bool,
	pagination *query.PageRequest,
) ([]telemetrytypes.ValidatorBlock, uint64, error)

Jump to

Keyboard shortcuts

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