query

package
v0.0.0-...-afe9103 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAddressFromKey

func GetAddressFromKey(clientCtx client.Context, keyName string) (sdk.AccAddress, error)

set fields in client context with keyname

func QueryBalances

func QueryBalances(keyName string) (sdk.Coins, error)

func QueryEpochProvision

func QueryEpochProvision(epoch epoch.EpochInfo) cosmostypes.Dec

func QueryPoolId

func QueryPoolId(poolId int) (*types.Pool, error)

func QueryPools

func QueryPools() ([]types.Pool, error)

func QuerySpotPrice

func QuerySpotPrice(poolId int, tokenInDenom string, tokenOutDenom string) (float64, error)

func QueryTx

func QueryTx(txHash string) (*types.TxResponse, error)

func QueryTxWithRetry

func QueryTxWithRetry(txHash string, trials int) (*types.TxResponse, error)

func QueryUosmoBalance

func QueryUosmoBalance(keyName string) (*big.Int, error)

Types

type DistributionProportions

type DistributionProportions struct {
	PoolIncentives cosmostypes.Dec
}

type Pool

type Pool struct {
	TotalValueLocked        cosmostypes.Dec // probably wrong.
	DistributionProportions DistributionProportions
	GuageId                 int32
	PotWeight               cosmostypes.Dec
	PoolId                  int32
	PoolIncentives          cosmostypes.Dec
	EpochIdentifier         string
	TotalWeight             cosmostypes.Dec // total weight of funds in poolId
	Duration                int64           // duration in seconds that funds are locked in pool.
	APY                     float64
}

func CalculatePoolAPY

func CalculatePoolAPY(pool Pool, duration time.Duration) Pool

Jump to

Keyboard shortcuts

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