unit

package
v2.6.4 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// Rau is the smallest non-fungible token unit
	Rau IotexUnit = 1
	// KRau is 1000 Rau
	KRau = Rau * 1000
	// MRau is 1000 KRau
	MRau = KRau * 1000
	// GRau is 1000 MRau
	GRau = MRau * 1000
	// Qev is 1000 GRau
	Qev = GRau * 1000
	// Jin is 1000 Qev
	Jin = Qev * 1000
	// Iotx is 1000 Jin, which should be fit into int64
	Iotx = Jin * 1000
)

Variables

This section is empty.

Functions

func FromRau

func FromRau(rau *big.Int, unit string) *big.Int

FromRau converts Rau string into diffrent unit string

func ToRau

func ToRau(num *big.Int, unit string) *big.Int

ToRau converts different unit string into Rau string

Types

type IotexUnit

type IotexUnit int64

IotexUnit defines iotex unit type.

func (*IotexUnit) FromString

func (u *IotexUnit) FromString(s string)

FromString converts string to IotexUnit.

Jump to

Keyboard shortcuts

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