assets

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 19, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoQuotesForCurrency = errors.New("cannot unmarshal json.Number into currency")

Functions

This section is empty.

Types

type Adam

type Adam big.Int

Adam contains a field to represent the smallest units of ADAM

func NewLink(w int64) *Adam

NewLink returns a new struct to represent ADAM from it's smallest unit

func (*Adam) Add

func (l *Adam) Add(x, y *Adam) *Adam

Add defers to big.Int Add

func (*Adam) Cmp

func (l *Adam) Cmp(y *Adam) int

Cmp defers to big.Int Cmp

func (*Adam) IsZero

func (l *Adam) IsZero() bool

IsZero returns true when the value is 0 and false otherwise

func (Adam) MarshalJSON

func (l Adam) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*Adam) MarshalText

func (l *Adam) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface.

func (*Adam) Scan

func (l *Adam) Scan(value interface{}) error

Scan reads the database value and returns an instance.

func (*Adam) Set

func (l *Adam) Set(x *Adam) *Adam

Set delegates to *big.Int.Set

func (*Adam) SetInt64

func (l *Adam) SetInt64(w int64) *Adam

SetInt64 delegates to *big.Int.SetInt64

func (*Adam) SetString

func (l *Adam) SetString(s string, base int) (*Adam, bool)

SetString delegates to *big.Int.SetString

func (*Adam) String

func (l *Adam) String() string

String returns Adam formatted as a string.

func (*Adam) Symbol

func (*Adam) Symbol() string

Symbol returns ADAM

func (*Adam) Text

func (l *Adam) Text(base int) string

Text defers to big.Int Text

func (*Adam) ToHash

func (l *Adam) ToHash() common.Hash

ToHash returns a 32 byte representation of this value

func (*Adam) ToInt

func (l *Adam) ToInt() *big.Int

ToInt returns the Adam value as a *big.Int.

func (*Adam) UnmarshalJSON

func (l *Adam) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*Adam) UnmarshalText

func (l *Adam) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface.

func (Adam) Value

func (l Adam) Value() (driver.Value, error)

Value returns the Adam value for serialization to database.

type Eth

type Eth big.Int

Eth contains a field to represent the smallest units of ETH

func NewEth

func NewEth(w int64) *Eth

NewEth returns a new struct to represent ETH from it's smallest unit (wei)

func NewEthValue

func NewEthValue(w int64) Eth

NewEthValue returns a new struct to represent ETH from it's smallest unit (wei)

func NewEthValueS

func NewEthValueS(s string) (Eth, error)

NewEthValueS returns a new struct to represent ETH from a string value of Eth (not wei)

func (*Eth) Cmp

func (e *Eth) Cmp(y *Eth) int

Cmp delegates to *big.Int.Cmp

func (*Eth) IsZero

func (e *Eth) IsZero() bool

IsZero returns true when the value is 0 and false otherwise

func (Eth) MarshalJSON

func (e Eth) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*Eth) MarshalText

func (e *Eth) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface.

func (*Eth) Scan

func (e *Eth) Scan(value interface{}) error

Scan reads the database value and returns an instance.

func (*Eth) SetInt64

func (e *Eth) SetInt64(w int64) *Eth

SetInt64 delegates to *big.Int.SetInt64

func (*Eth) SetString

func (e *Eth) SetString(s string, base int) (*Eth, bool)

SetString delegates to *big.Int.SetString

func (*Eth) String

func (e *Eth) String() string

func (*Eth) Symbol

func (*Eth) Symbol() string

Symbol returns ETH

func (*Eth) ToInt

func (e *Eth) ToInt() *big.Int

ToInt returns the Eth value as a *big.Int.

func (*Eth) UnmarshalJSON

func (e *Eth) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*Eth) UnmarshalText

func (e *Eth) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface.

func (Eth) Value

func (e Eth) Value() (driver.Value, error)

Value returns the Eth value for serialization to database.

Jump to

Keyboard shortcuts

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