types

package
v0.0.0-...-b9e1d45 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2022 License: LGPL-3.0 Imports: 5 Imported by: 7

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

BlockHeight is used for height of the block

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 NumBlocks

type NumBlocks = uint64

NumBlocks holds number of blocks in current group.

type ShardID

type ShardID = uint64

ShardID is used for a shard index, from 0 to NUM_SHARDS - 1.

type StorageUsage

type StorageUsage = uint64

StorageUsage is used to count the amount of storage used by a contract.

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
JackTT - Gopher 🇻🇳