Documentation ¶
Index ¶
- func AmountToString(amount uint64, decimals uint32) string
- func BytesToUint64(b []byte) uint64
- func InsertSeparator(value string, reverse bool) string
- func StringToAmount(amountIn string, decimals uint32) (uint64, error)
- func Uint256ToBytes(i *uint256.Int) []byte
- func Uint64ToBytes(i uint64) []byte
- func Uint64ToBytes32(n uint64) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AmountToString ¶
AmountToString converts amount to string with specified decimals NB! it is assumed that the decimal places value is sane and verified before calling this method.
func BytesToUint64 ¶
func InsertSeparator ¶
InsertSeparator inserts apostrophe as thousands separator. The reverse flag defines the direction in which the insertion should happen InsertSeparator("1234", false) => 1'234 (for the integral part) InsertSeparator("1234", true) => 123'4 (for the fractional part)
func StringToAmount ¶
StringToAmount converts string and decimals to uint64 amount
func Uint256ToBytes ¶
func Uint64ToBytes ¶
func Uint64ToBytes32 ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.