utils

package
v0.0.0-...-9bbcd85 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddressEqual

func AddressEqual(address1, address2 string) (bool, error)

func AddressFormatByEIP55

func AddressFormatByEIP55(address string) (string, error)

func FormatUnits2Float64

func FormatUnits2Float64(iWei interface{}, decimals uint8) (float64, error)

func GetAddressTxNonceWithClient

func GetAddressTxNonceWithClient(client *ethclient.Client, userAddress string) (*uint64, error)

func GetAddressTxNonceWithRPC

func GetAddressTxNonceWithRPC(rpc string, userAddress string) (*uint64, error)

func GetChainIdWithClient

func GetChainIdWithClient(client *ethclient.Client) (uint64, error)

func GetChainIdWithRPC

func GetChainIdWithRPC(rpc string) (uint64, error)

func GetLatestBlockNumWithClient

func GetLatestBlockNumWithClient(client *ethclient.Client) (uint64, error)

func GetLatestBlockNumWithRPC

func GetLatestBlockNumWithRPC(rpc string) (uint64, error)

func GetNativeBalanceWithClient

func GetNativeBalanceWithClient(client *ethclient.Client, address string) (float64, error)

func GetNativeBalanceWithRPC

func GetNativeBalanceWithRPC(rpc string, address string) (float64, error)

func IsAddressFormatByEIP55

func IsAddressFormatByEIP55(address string) (bool, error)

func IsHexAddressValid

func IsHexAddressValid(address string) bool

func ParseUnits2String

func ParseUnits2String(iValue interface{}, decimals uint8) (string, error)

func String2BigInt

func String2BigInt(src string) *big.Int

Types

This section is empty.

Jump to

Keyboard shortcuts

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