types

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: MIT Imports: 5 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func YoctoToNEAR

func YoctoToNEAR(yocto Balance) uint64

TODO

Types

type AccountID

type AccountID = string

Account identifier. Provides access to user's state.

type Balance

type Balance uint128.Uint128

Balance holds amount of yoctoNEAR

func BalanceFromFloat

func BalanceFromFloat(f float64) (bal Balance)

TODO

func BalanceFromString

func BalanceFromString(s string) (bal Balance, err error)

TODO

func NEARToYocto

func NEARToYocto(near uint64) Balance

TODO

func (Balance) Div64

func (bal Balance) Div64(div uint64) Balance

Convenience funcs

func (Balance) MarshalJSON

func (bal Balance) MarshalJSON() ([]byte, error)

func (Balance) String

func (bal Balance) String() string

func (*Balance) UnmarshalJSON

func (bal *Balance) UnmarshalJSON(b []byte) error

type BlockHeight

type BlockHeight = uint64

Some more aliases for blocks...

type Gas

type Gas = uint64

Gas is a type for storing amounts of gas.

var (
	// 30 TGas
	DefaultFunctionCallGas Gas = 30 * 1000000000000
)

type Nonce

type Nonce = uint64

Nonce for transactions.

type ShardID

type ShardID = uint64

type TimeNanos

type TimeNanos = Balance

Time nanoseconds fit into uint128. Using existing Balance type which implements JSON marshal/unmarshal

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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