utils

package
v0.0.0-...-828d3b4 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeDecimal

func DecodeDecimal(d string) decimal.Decimal

func DecodeDecimalPtr

func DecodeDecimalPtr(d string) (dd *decimal.Decimal)

func DivRav

func DivRav(data int64) decimal.Decimal

func Fix0x

func Fix0x(input string) string

func FormatTimestamp

func FormatTimestamp(timestamp int64) string

func Has0xPrefix

func Has0xPrefix(input string) bool

func HexToAddress

func HexToAddress(hexStr string) string

func HexToDecimal

func HexToDecimal(hexStr string) *big.Int

func HexToDecimalInt

func HexToDecimalInt(hexStr string) int

func IsAddress

func IsAddress(address string) bool

func IsHashHex

func IsHashHex(s string) bool

func IsHex

func IsHex(str string) bool

IsHex validates whether each byte is valid hexadecimal string.

func IsHexAddress

func IsHexAddress(s string) bool

IsHexAddress verifies whether a string can represent a valid hex-encoded Ethereum address or not.

func IsHexSting

func IsHexSting(str string) bool

IsHexSting validates whether each byte is valid hexadecimal string.

func IsNumber

func IsNumber(s string) bool

func Substring

func Substring(input string, start, end int) (str string)

func SubstringFromIndex

func SubstringFromIndex(input string, index int) string

func TruncateString

func TruncateString(s string, length int) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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