common

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: Apache-2.0 Imports: 6 Imported by: 52

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddressArrayToEth added in v0.5.0

func AddressArrayToEth(addresses []Address) []ethcommon.Address

func HashSliceToRaw added in v0.6.5

func HashSliceToRaw(slice []Hash) [][32]byte

func NewEthHashesFromHashes added in v0.7.0

func NewEthHashesFromHashes(a []Hash) []ethcommon.Hash

func RandBigInt added in v0.6.0

func RandBigInt() *big.Int

func RandBigIntBelowBound added in v0.6.0

func RandBigIntBelowBound(max *big.Int) *big.Int

func RandBytes added in v0.6.0

func RandBytes(size int) []byte

Types

type Address

type Address [20]byte

func AddressArrayFromEth added in v0.5.0

func AddressArrayFromEth(addresses []ethcommon.Address) []Address

func HexToAddress

func HexToAddress(hex string) Address

func NewAddressFromEth

func NewAddressFromEth(a ethcommon.Address) Address

func RandAddress added in v0.6.0

func RandAddress() Address

func (Address) Bytes added in v0.7.1

func (a Address) Bytes() []byte

func (Address) Equals

func (a Address) Equals(a2 Address) bool

func (Address) Hex

func (a Address) Hex() string

func (Address) IsZero

func (a Address) IsZero() bool

func (Address) ShortString

func (a Address) ShortString() string

func (Address) String

func (a Address) String() string

func (Address) ToEthAddress

func (a Address) ToEthAddress() ethcommon.Address

type BlockId

type BlockId struct {
	Height     *TimeBlocks
	HeaderHash Hash
}

func (*BlockId) Clone

func (id *BlockId) Clone() *BlockId

func (*BlockId) Equals

func (id *BlockId) Equals(id2 *BlockId) bool

func (*BlockId) MarshalZerologObject added in v0.8.0

func (id *BlockId) MarshalZerologObject(e *zerolog.Event)

func (*BlockId) String

func (id *BlockId) String() string

type Hash

type Hash [32]byte

func HashArrayFromEth added in v0.7.0

func HashArrayFromEth(hashes []ethcommon.Hash) []Hash

func HexToHash added in v0.7.0

func HexToHash(hex string) Hash

func NewHashFromEth

func NewHashFromEth(a ethcommon.Hash) Hash

func RandHash added in v0.6.0

func RandHash() Hash

func (Hash) Bytes

func (h Hash) Bytes() []byte

func (Hash) Equals

func (h Hash) Equals(h2 Hash) bool

func (Hash) ShortString

func (h Hash) ShortString() string

func (Hash) String

func (h Hash) String() string

func (Hash) ToEthHash

func (h Hash) ToEthHash() ethcommon.Hash

type TimeBlocks

type TimeBlocks big.Int

func NewTimeBlocks

func NewTimeBlocks(val *big.Int) *TimeBlocks

func NewTimeBlocksInt

func NewTimeBlocksInt(val int64) *TimeBlocks

func (*TimeBlocks) AsInt

func (tb *TimeBlocks) AsInt() *big.Int

func (*TimeBlocks) Clone

func (tb *TimeBlocks) Clone() *TimeBlocks

func (*TimeBlocks) Cmp

func (tb *TimeBlocks) Cmp(tb2 *TimeBlocks) int

func (*TimeBlocks) String

func (tb *TimeBlocks) String() string

Jump to

Keyboard shortcuts

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