utils

package
v0.5.14 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeFeesWithBaseReq

func ComputeFeesWithBaseReq(
	clientCtx client.Context, br rest.BaseReq, msgs ...sdk.Msg) (*legacytx.StdFee, error)

ComputeFeesWithBaseReq returns fee amount with given stdTx.

func ComputeFeesWithCmd

func ComputeFeesWithCmd(
	clientCtx client.Context, flagSet *pflag.FlagSet, msgs ...sdk.Msg) (*legacytx.StdFee, error)

ComputeFeesWithCmd returns fee amount with cli options.

func FilterMsgAndComputeTax

func FilterMsgAndComputeTax(clientCtx client.Context, msgs ...sdk.Msg) (taxes sdk.Coins, err error)

FilterMsgAndComputeTax computes the stability tax on MsgSend and MsgMultiSend.

func ParseFloat64

func ParseFloat64(s string, defaultIfEmpty float64) (n float64, err error)

ParseFloat64 parses string to float64

Types

type ComputeReqParams

type ComputeReqParams struct {
	Memo          string
	ChainID       string
	AccountNumber uint64
	Sequence      uint64
	GasPrices     sdk.DecCoins
	Gas           string
	GasAdjustment string

	Msgs []sdk.Msg
}

ComputeReqParams no-lint

type EstimateFeeReq

type EstimateFeeReq struct {
	BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`
	Msgs    []sdk.Msg    `json:"msgs" yaml:"msgs"`
}

EstimateFeeReq defines a tx fee estimation request.

func (EstimateFeeReq) UnpackInterfaces

func (m EstimateFeeReq) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error

UnpackInterfaces implements the UnpackInterfacesMessage interface.

type EstimateFeeResp

type EstimateFeeResp struct {
	Fee legacytx.StdFee `json:"fee" yaml:"fee"`
}

EstimateFeeResp defines a tx fee estimation response

Jump to

Keyboard shortcuts

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