prototyp

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: Apache-2.0 Imports: 5 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BigInt

type BigInt big.Int

BigInt is a type alias for big.Int used for JSON/Database marshalling.

For JSON values we encoded BigInt's as strings.

For Database values we encoded BigInt's as NUMERIC(78).

func NewBigInt

func NewBigInt(n int64) BigInt

func ToBigInt

func ToBigInt(b *big.Int) BigInt

func ToBigIntArray

func ToBigIntArray(bs []*big.Int) []BigInt

func ToBigIntArrayFromStringArray

func ToBigIntArrayFromStringArray(s []string, base int) ([]BigInt, error)

func ToBigIntFromInt64

func ToBigIntFromInt64(n int64) BigInt

func (*BigInt) Add

func (b *BigInt) Add(n *big.Int)

func (BigInt) Equals

func (b BigInt) Equals(n *big.Int) bool

func (BigInt) Gt

func (b BigInt) Gt(n *big.Int) bool

func (BigInt) Gte

func (b BigInt) Gte(n *big.Int) bool

func (BigInt) Int

func (b BigInt) Int() *big.Int

func (BigInt) Int64

func (b BigInt) Int64() int64

func (BigInt) Lt

func (b BigInt) Lt(n *big.Int) bool

func (BigInt) Lte

func (b BigInt) Lte(n *big.Int) bool

func (BigInt) MarshalJSON

func (b BigInt) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (BigInt) MarshalText

func (b BigInt) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*BigInt) Scan

func (b *BigInt) Scan(src interface{}) error

func (BigInt) String

func (b BigInt) String() string

func (*BigInt) Sub

func (b *BigInt) Sub(n *big.Int)

func (BigInt) Uint64

func (b BigInt) Uint64() uint64

func (*BigInt) UnmarshalJSON

func (b *BigInt) UnmarshalJSON(text []byte) error

UnmarshalJSON implements json.Unmarshaler

func (*BigInt) UnmarshalText

func (b *BigInt) UnmarshalText(text []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (BigInt) Value

func (b BigInt) Value() (driver.Value, error)

type Hash

type Hash string

Hash is a type alias for common.Hash used for data normalization with JSON/Database marshalling.

func HashFromString

func HashFromString(s string) Hash

func (*Hash) Hash

func (h *Hash) Hash() common.Hash

func (Hash) IsValidAddress

func (h Hash) IsValidAddress() bool

func (Hash) IsValidTxnHash

func (h Hash) IsValidTxnHash() bool

func (Hash) IsZeroValue

func (h Hash) IsZeroValue() bool

func (*Hash) MarshalText

func (h *Hash) MarshalText() ([]byte, error)

UnmarshalText implements encoding.TextMarshaler.

func (*Hash) Scan

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

func (Hash) String

func (h Hash) String() string

func (Hash) ToAddress

func (h Hash) ToAddress() common.Address

func (Hash) ToHash

func (h Hash) ToHash() common.Hash

func (*Hash) UnmarshalText

func (h *Hash) UnmarshalText(src []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (Hash) Value

func (h Hash) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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