Documentation ¶
Index ¶
- Constants
- Variables
- func AddBalance(xi, xd, yi, yd uint64) (i, d uint64)
- func GetAmountISAAC(amountStr, unit string) (*big.Int, error)
- func GetISAACAmountTextByUnit(amount *big.Int, unit string) string
- func GetISAACAmountTextUnitByUnit(amount *big.Int, unit string) string
- func GetNewtonAmountISAAC(amountStr, unit string) (*big.Int, error)
- func GetTodayEndUnix() int64
- func GetTodayStartUnix() int64
- func GetTodayUnix() int64
- func GetTomorrowUnix() int64
- func GetYesterdayEndUnix() int64
- func GetYesterdayStartUnix() int64
- func GetYesterdayUnix() int64
- func MergeBalance(i, d uint64) *big.Int
- func MergeBalanceNEW(i, d uint64) string
- func SplitBalance(balance *big.Int) (uint64, uint64)
- func Version() string
Constants ¶
View Source
const (
AccountFaucetDripped = 1
)
account faucet
Variables ¶
View Source
var ( ErrInvalidAddress = errors.New("invalid hex-encoded address") ErrSelfSending = errors.New("not allowed to send to yourself") ErrExceedMaxAmount = errors.New("exceeds the maximum amount") ErrNoExistFromAddress = errors.New("not exist from address") ErrTaskStatusNotSubmitted = errors.New("task status is not submitted") ErrDBAmount = errors.New("database amount error") ErrStringToBigInt = errors.New("value convert to big int error") ErrNegative = errors.New("value cannot be negative") )
View Source
var (
BigNEW *big.Int = big.NewInt(1e+18) // BigNEW in WEI
)
View Source
var ( // newton // 100,000,000,000 NEW NewtonMax = big.NewInt(0).Mul(big.NewInt(100000000000), big1NEWInWEI) )
Functions ¶
func AddBalance ¶
func GetISAACAmountTextByUnit ¶
GetISAACAmountTextByUnit convert 1000000000 ISAAC to string of 0.000000001 NEW or 1000000000 ISAAC
func GetTodayEndUnix ¶
func GetTodayEndUnix() int64
func GetTodayStartUnix ¶
func GetTodayStartUnix() int64
func GetTodayUnix ¶
func GetTodayUnix() int64
func GetTomorrowUnix ¶
func GetTomorrowUnix() int64
func GetYesterdayEndUnix ¶
func GetYesterdayEndUnix() int64
func GetYesterdayStartUnix ¶
func GetYesterdayStartUnix() int64
func GetYesterdayUnix ¶
func GetYesterdayUnix() int64
func MergeBalance ¶
MergeBalance merge balance in interger and fractional into big.Int
func MergeBalanceNEW ¶
MergeBalanceNEW MergeBalanceNEW string
func SplitBalance ¶
SplitBalance convert balance to a decimal number in NEW return the integer and fractional parts
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.