ethtypes

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2026 License: Apache-2.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BigIntegerFromString

func BigIntegerFromString(ctx context.Context, s string) (*big.Int, error)

func UnmarshalBigInt

func UnmarshalBigInt(ctx context.Context, b []byte) (*big.Int, error)

Types

type Address0xHex

type Address0xHex [20]byte

Address0xHex formats with an 0x prefix, but no checksum (lower case)

func MustNewAddress

func MustNewAddress(s string) *Address0xHex

func NewAddress

func NewAddress(s string) (*Address0xHex, error)

func (Address0xHex) MarshalJSON

func (a Address0xHex) MarshalJSON() ([]byte, error)

func (*Address0xHex) SetString

func (a *Address0xHex) SetString(s string) error

func (Address0xHex) String

func (a Address0xHex) String() string

func (*Address0xHex) UnmarshalJSON

func (a *Address0xHex) UnmarshalJSON(b []byte) error

type AddressPlainHex

type AddressPlainHex AddressWithChecksum

AddressPlainHex can parse the same, but formats as just flat hex (no prefix)

func (AddressPlainHex) MarshalJSON

func (a AddressPlainHex) MarshalJSON() ([]byte, error)

func (AddressPlainHex) String

func (a AddressPlainHex) String() string

func (*AddressPlainHex) UnmarshalJSON

func (a *AddressPlainHex) UnmarshalJSON(b []byte) error

type AddressWithChecksum

type AddressWithChecksum Address0xHex

AddressWithChecksum uses full 0x prefixed checksum address format

func NewAddressWithChecksum

func NewAddressWithChecksum(s string) (*AddressWithChecksum, error)

func (AddressWithChecksum) MarshalJSON

func (a AddressWithChecksum) MarshalJSON() ([]byte, error)

func (AddressWithChecksum) String

func (a AddressWithChecksum) String() string

func (*AddressWithChecksum) UnmarshalJSON

func (a *AddressWithChecksum) UnmarshalJSON(b []byte) error

type HexBytes0xPrefix

type HexBytes0xPrefix []byte

HexBytes0xPrefix are serialized to JSON as hex with an `0x` prefix

func MustNewHexBytes0xPrefix

func MustNewHexBytes0xPrefix(s string) HexBytes0xPrefix

func NewHexBytes0xPrefix

func NewHexBytes0xPrefix(s string) (HexBytes0xPrefix, error)

func (HexBytes0xPrefix) Equals

func (h HexBytes0xPrefix) Equals(h2 HexBytes0xPrefix) bool

func (HexBytes0xPrefix) MarshalJSON

func (h HexBytes0xPrefix) MarshalJSON() ([]byte, error)

func (HexBytes0xPrefix) String

func (h HexBytes0xPrefix) String() string

func (*HexBytes0xPrefix) UnmarshalJSON

func (h *HexBytes0xPrefix) UnmarshalJSON(b []byte) error

type HexBytesPlain

type HexBytesPlain []byte

HexBytesPlain is simple bytes that are JSON stored/retrieved as hex

func (HexBytesPlain) Equals

func (h HexBytesPlain) Equals(h2 HexBytesPlain) bool

func (HexBytesPlain) MarshalJSON

func (h HexBytesPlain) MarshalJSON() ([]byte, error)

func (HexBytesPlain) String

func (h HexBytesPlain) String() string

func (*HexBytesPlain) UnmarshalJSON

func (h *HexBytesPlain) UnmarshalJSON(b []byte) error

type HexInteger

type HexInteger big.Int

HexInteger is a positive integer - serializes to JSON as an 0x hex string (no leading zeros), and parses flexibly depending on the prefix (so 0x for hex, or base 10 for plain string / float64)

func NewHexInteger

func NewHexInteger(i *big.Int) *HexInteger

func NewHexInteger64

func NewHexInteger64(i int64) *HexInteger

func NewHexIntegerU64

func NewHexIntegerU64(i uint64) *HexInteger

func (*HexInteger) BigInt

func (h *HexInteger) BigInt() *big.Int

func (*HexInteger) Int64

func (h *HexInteger) Int64() int64

func (HexInteger) MarshalJSON

func (h HexInteger) MarshalJSON() ([]byte, error)

func (*HexInteger) Scan

func (h *HexInteger) Scan(src interface{}) error

func (*HexInteger) String

func (h *HexInteger) String() string

func (*HexInteger) Uint64

func (h *HexInteger) Uint64() uint64

func (*HexInteger) UnmarshalJSON

func (h *HexInteger) UnmarshalJSON(b []byte) error

type HexUint64

type HexUint64 uint64

HexUint64 is a positive integer - serializes to JSON as an 0x hex string (no leading zeros), and parses flexibly depending on the prefix (so 0x for hex, or base 10 for plain string / float64)

func (HexUint64) MarshalJSON

func (h HexUint64) MarshalJSON() ([]byte, error)

func (*HexUint64) Scan

func (h *HexUint64) Scan(src interface{}) error

func (*HexUint64) String

func (h *HexUint64) String() string

func (HexUint64) Uint64

func (h HexUint64) Uint64() uint64

func (*HexUint64) Uint64OrZero

func (h *HexUint64) Uint64OrZero() uint64

func (*HexUint64) UnmarshalJSON

func (h *HexUint64) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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