utils

package
v0.0.0-...-f6e75f2 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Denom of matic
	MaticDenom = "MATIC"
)

Functions

func ConvertNanoSecToMinutes

func ConvertNanoSecToMinutes(nanoSec int64) int64

ConvertNanoSecToMinutes converts nano seconds into minutes

func ConvertToCommaSeparated

func ConvertToCommaSeparated(amt string) string

ConvertToCommaSeparated converts value into comma seperated for user friendly

func ConvertToMatic

func ConvertToMatic(amount string) string

ConvertToMatic converts amount into matic and returns

func ConvertWeiToEth

func ConvertWeiToEth(num *big.Int) string

ConvertWeiToEth converts wei into eth value

func DecodeEthCallResult

func DecodeEthCallResult(resp string) []string

DecodeEthCallResult decodes the eth_call result and resturns the array

func Encode

func Encode(b []byte) string

Encode encodes b as a hex string with 0x prefix.

func EncodeToHex

func EncodeToHex(b []byte) string

EncodeToHex encodes b as a hex string with 0x prefix.

func FixSelfStakeDecimals

func FixSelfStakeDecimals(num *big.Int) string

ConvertWeiToEth converts wei into eth value

func GetUserDateFormat

func GetUserDateFormat(timeToConvert string) string

GetUserDateFormat to which returns date in a user friendly

func HexToBigInt

func HexToBigInt(hex string) (*big.Int, bool)

HexToBigInt convert hex value into big int

func HexToIntConversion

func HexToIntConversion(hex string) (int, error)

HexToIntConversion converts hex into int format

Types

This section is empty.

Jump to

Keyboard shortcuts

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