cmn

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2019 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package common contains various helper functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BigToAddress

func BigToAddress(b *big.Int) common.Address

func BigToHash

func BigToHash(b *big.Int) common.Hash

func Bytes2Hex

func Bytes2Hex(d []byte) string

func CopyBytes

func CopyBytes(b []byte) (copiedBytes []byte)

Copy bytes

Returns an exact copy of the provided bytes

func EmptyHash

func EmptyHash(h common.Hash) bool

func FromHex

func FromHex(s string) []byte

func HasHexPrefix

func HasHexPrefix(str string) bool

func Hex2Bytes

func Hex2Bytes(str string) []byte

func Hex2BytesFixed

func Hex2BytesFixed(str string, flen int) []byte

func HexToAddress

func HexToAddress(s string) common.Address

func HexToHash

func HexToHash(s string) common.Hash

func IsHex

func IsHex(str string) bool

func LeftPadBytes

func LeftPadBytes(slice []byte, l int) []byte

func RightPadBytes

func RightPadBytes(slice []byte, l int) []byte

func StringToAddress

func StringToAddress(s string) common.Address

func StringToHash

func StringToHash(s string) common.Hash

func ToHex

func ToHex(b []byte) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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