Documentation ¶
Index ¶
- func CoinIsZero(coin sdk.Coin) bool
- func DecCoinIsNegative(coin sdk.DecCoin) bool
- func DecCoinIsZero(coin sdk.DecCoin) bool
- func ExecuteWithGasLimit(ctx sdk.Context, gasLimit uint64, f func(ctx sdk.Context) error) (gasUsed uint64, err error)
- func GetStringSliceFlag(cmd *cobra.Command, flagName string, canBeEmpty bool) ([]string, error)
- func GetUint64Flag(cmd *cobra.Command, flagName string, canBeEmpty bool) (uint64, error)
- func GetUint64SliceFlag(cmd *cobra.Command, flagName string, canBeEmpty bool) ([]uint64, error)
- func NewDecFromUint64(v uint64) sdk.Dec
- func ParseAccAddressArg(argName, argValue string) (sdk.AccAddress, error)
- func ParseAccAddressFlag(cmd *cobra.Command, flagName string, isRequired bool) (*sdk.AccAddress, error)
- func ParseCoinArg(argName, argValue string) (sdk.Coin, error)
- func ParseInt64Arg(argName, argValue string) (int64, error)
- func ParseUint64Arg(argName, argValue string) (uint64, error)
- func ReadPageRequest(flagSet *pflag.FlagSet) (*query.PageRequest, error)
- func SplitCoins(coins sdk.Coins, ratio sdk.Dec) (stack1, stack2 sdk.Coins)
- func Uint64Ptr(v uint64) *uint64
- func ValidateCoin(coin sdk.Coin) error
- func ValidateDecCoin(coin sdk.DecCoin) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CoinIsZero ¶
CoinIsZero checks if sdk.Coin is set (not panics in case Amount is nil).
func DecCoinIsNegative ¶
DecCoinIsNegative checks if sdk.DecCoin is negative (not panics in case Amount is nil).
func DecCoinIsZero ¶
DecCoinIsZero checks if sdk.DecCoin is set (not panics in case Amount is nil).
func ExecuteWithGasLimit ¶
func ExecuteWithGasLimit(ctx sdk.Context, gasLimit uint64, f func(ctx sdk.Context) error) (gasUsed uint64, err error)
ExecuteWithGasLimit executes a function with a gas limit. Taken from: https://github.com/cosmos/cosmos-sdk/pull/18475
func GetStringSliceFlag ¶
GetStringSliceFlag is a helper function to get a slice of strings CLI flag.
func GetUint64Flag ¶
GetUint64Flag is a helper function to get a uint64 CLI flag.
func GetUint64SliceFlag ¶
GetUint64SliceFlag is a helper function to get a slice of uint64 CLI flag.
func NewDecFromUint64 ¶
NewDecFromUint64 converts a uint64 value to the sdk.Dec.
func ParseAccAddressArg ¶
func ParseAccAddressArg(argName, argValue string) (sdk.AccAddress, error)
ParseAccAddressArg is a helper function to parse an account address CLI argument.
func ParseAccAddressFlag ¶
func ParseAccAddressFlag(cmd *cobra.Command, flagName string, isRequired bool) (*sdk.AccAddress, error)
ParseAccAddressFlag is a helper function to parse an account address CLI flag.
func ParseCoinArg ¶
ParseCoinArg is a helper function to parse uint64 CLI argument.
func ParseInt64Arg ¶
ParseInt64Arg is a helper function to parse int64 CLI argument.
func ParseUint64Arg ¶
ParseUint64Arg is a helper function to parse uint64 CLI argument.
func ReadPageRequest ¶
func ReadPageRequest(flagSet *pflag.FlagSet) (*query.PageRequest, error)
ReadPageRequest reads and builds the necessary page request flags for pagination. This is fixed version of the client.ReadPageRequest function. The original version uses the "--page-key" flag as is, instead of base64 decoding it.
func SplitCoins ¶
SplitCoins splits coins in a proportion defined by the ratio. CONTRACT: inputs must be valid.
func ValidateCoin ¶
ValidateCoin performs a stricter validation of sdk.Coin comparing to the SDK version.
func ValidateDecCoin ¶
ValidateDecCoin performs a stricter validation of sdk.DecCoin comparing to the SDK version.
Types ¶
This section is empty.