sdkutil

package
v6.1.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Emit

func Emit(ctx *sdk.Context, event proto.Message)

Emit proto event and log on error

func FormatDec

func FormatDec(d sdk.Dec) string

FormatDec formats a sdk.Dec as a string with no trailing zeroes after the decimal point, omitting the decimal point as well for whole numbers. e.g. 4.000 -> 4 and 3.500 -> 3.5

func FormatDecCoin

func FormatDecCoin(c sdk.DecCoin) string

FormatDecCoin formats a sdk.DecCoin with no trailing zeroes after the decimal point in its amount, omitting the decimal point as well for whole numbers. Also places a space between amount and denom. e.g. 4.000uumee -> 4 uumee and 3.500ibc/abcd -> 3.5 ibc/abcd

func StartMsg

func StartMsg(ctx context.Context, msg sdk.Msg) (sdk.Context, error)

StartMsg unpacks sdk.Context and validates msg.

func ValidateProtoMsg added in v6.1.0

func ValidateProtoMsg(msg proto.Message) error

ValidateProtoMsg tries to run msg.ValidateBasic

Types

This section is empty.

Jump to

Keyboard shortcuts

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