Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Fixed8Converter ¶
type Fixed8Converter struct {
// contains filtered or unexported fields
}
Fixed8Converter is a converter with base precision of Fixed8. It uses int64 values because there is a guarantee that balance contract will operate with `Deposit` and `Withdraw` amounts that less than 2**53-1. This is a JSON bound that uses neo node. Neo-go has int64 limit for `smartcontract.Parameter` of integer type.
func NewConverter ¶
func NewConverter(precision uint32) Fixed8Converter
NewConverter returns Fixed8Converter.
func (Fixed8Converter) ToBalancePrecision ¶
func (c Fixed8Converter) ToBalancePrecision(n int64) int64
ToBalancePrecision converts n of Fixed8 precision to balance contract precision.
func (Fixed8Converter) ToFixed8 ¶
func (c Fixed8Converter) ToFixed8(n int64) int64
ToFixed8 converts n of balance contract precision to Fixed8 precision.
Click to show internal directories.
Click to hide internal directories.