types

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: Apache-2.0 Imports: 6 Imported by: 3

Documentation

Index

Constants

View Source
const (
	COIN_DECIMAL int16 = 18
	FONS               = "1"
	KFONS              = "1000"
	MFONS              = "1000000"
	GFONS              = "1000000000"
	UBEATOZ            = "1000000000000"
	MiBEATOZ           = "1000000000000000"
	COIN               = "1000000000000000000"             // 10^18 fons
	KCOIN              = "1000000000000000000000"          // 10^21 fons
	MCOIN              = "1000000000000000000000000"       // 10^24 fons
	GCOIN              = "1000000000000000000000000000"    // 10^27 fons
	TCOIN              = "1000000000000000000000000000000" // 10^30 fons
)
View Source
const (
	ACCT_COMMON_TYPE int16 = 1 + iota
)
View Source
const AddrSize = 20

Variables

This section is empty.

Functions

func FromFons

func FromFons(sau *uint256.Int) (uint64, uint64)

from fons to COIN and Remain

func IsZeroAddress

func IsZeroAddress(addr Address) bool

func ToFons

func ToFons(n uint64) *uint256.Int

Coin to fons

Types

type Address

type Address = abytes.HexBytes

func HexToAddress

func HexToAddress(_hex string) (Address, error)

func RandAddress

func RandAddress() Address

func ZeroAddress

func ZeroAddress() Address

type IEncoder

type IEncoder interface {
	Encode() ([]byte, xerrors.XError)
	Decode([]byte) xerrors.XError
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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