util

package
v0.0.0-...-101354e Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalcGasCost

func CalcGasCost(gasLimit uint64, gasPrice *big.Int) *big.Int

CalcGasCost calculate gas cost given gas limit (units) and gas price (wei)

func IsValidAddress

func IsValidAddress(iaddress interface{}) bool

IsValidAddress validate hex address

func IsZeroAddress

func IsZeroAddress(iaddress interface{}) bool

IsZeroAddress validate if it's a 0 address

func PublicKeyBytesToAddress

func PublicKeyBytesToAddress(publicKey []byte) common.Address

PublicKeyBytesToAddress ...

func SigRSV

func SigRSV(isig interface{}) ([32]byte, [32]byte, uint8)

SigRSV signatures R S V returned as arrays

func ToDecimal

func ToDecimal(ivalue interface{}, decimals int) decimal.Decimal

ToDecimal wei to decimals

func ToWei

func ToWei(iamount interface{}, decimals int) *big.Int

ToWei decimals to wei

Types

This section is empty.

Jump to

Keyboard shortcuts

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