queryutil

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AvgInflationRate

func AvgInflationRate(ctx context.Context, cprov cchain.Provider, waitBlocks uint64) (math.LegacyDec, bool, error)

AvgInflationRate returns the average inflation for all delegations over the given number of blocks or true if all delegations changed (couldn't calculate inflation).

func CurrentUpgrade

func CurrentUpgrade(ctx context.Context, cprov cchain.Provider) (string, error)

CurrentUpgrade returns the current applied upgrade.

Note it will return genesis upgrade if unknown upgrades are applied. This is due to CosmosSDK not providing an API to actually fetch applied upgrades :(.

func DelegatorInflationRates

func DelegatorInflationRates(ctx context.Context, cprov cchain.Provider, delegator sdk.AccAddress, waitBlocks uint64) ([]math.LegacyDec, bool, error)

DelegatorInflationRates returns the inflation rate per delegation for the given delegator over the given number of blocks, or true if the delegation changed (couldn't calculate inflation).

func NextUpgrade

func NextUpgrade(ctx context.Context, cprov cchain.Provider) (string, bool, error)

NextUpgrade returns the next upgrade to apply, or false if all upgrades has been applied.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳