Documentation ¶
Index ¶
- func AbiDecodeString(bz []byte) (string, error)
- func AbiEncodeString(str string) ([]byte, error)
- func BeautifyJson(bzJson []byte) ([]byte, error)
- func ConvertDisplayWithExponentIntoRaw(display string, exponent int, decimalsPoint rune) (number, highNumber, lowNumber *big.Int, err error)
- func ConvertNumberIntoDisplayWithExponent(number *big.Int, exponent int) (display string, highNumber, lowNumber *big.Int, err error)
- func ExitOnErr(err error, msg string)
- func PanicIfErr(err error, msg string)
- func PrintfStdErr(format string, a ...any)
- func PrintlnStdErr(a ...any)
- func ProvidedArgsOrFromPipe(providedArgs []string) (outputArgs []string, err error)
- func RequireArgs(args []string, cmd *cobra.Command)
- func RequireExactArgsCount(args []string, want int, cmd *cobra.Command)
- func TryPrintBeautyJson(bz []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbiDecodeString ¶
func AbiEncodeString ¶
func BeautifyJson ¶
BeautifyJson beautifies the given json.
func ConvertDisplayWithExponentIntoRaw ¶ added in v1.4.0
func ConvertNumberIntoDisplayWithExponent ¶ added in v1.4.0
func ExitOnErr ¶ added in v1.4.0
ExitOnErr exit the app with code 1 if error. Or does nothing if no error.
func PanicIfErr ¶ added in v1.4.2
PanicIfErr raises a panic. If the `err` is nil, this method does nothing
func PrintfStdErr ¶ added in v1.4.2
PrintfStdErr does printf to StdErr
func PrintlnStdErr ¶ added in v1.4.2
func PrintlnStdErr(a ...any)
PrintlnStdErr does println to StdErr
func ProvidedArgsOrFromPipe ¶ added in v1.4.0
ProvidedArgsOrFromPipe will prioritize provided args, if not provided, it will try to read from pipe.
func RequireArgs ¶ added in v1.4.0
RequireArgs will exit program if no arg provided.
func RequireExactArgsCount ¶ added in v1.4.0
RequireExactArgsCount will exit program if number of arguments is not equal to want.
func TryPrintBeautyJson ¶ added in v1.4.0
func TryPrintBeautyJson(bz []byte)
TryPrintBeautyJson tries to beautify the given json and print it. If failed to beautify, it will print the original json.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.