Documentation ¶
Index ¶
- func GetBalance(ctx context.Context, table api.BatchBalanceTable, addr types.AccAddress, ...) (*api.BatchBalance, error)
- func GetCreditTypeFromBatchDenom(ctx context.Context, store api.StateStore, denom string) (*api.CreditType, error)
- func GetNonNegativeFixedDecs(precision uint32, decimals ...string) ([]math.Dec, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBalance ¶
func GetBalance(ctx context.Context, table api.BatchBalanceTable, addr types.AccAddress, key uint64) (*api.BatchBalance, error)
GetBalance gets the balance from the account, returning a default, zero value balance if no balance is found. NOTE: the default value is not inserted into the balance table in the `not found` case. Calling Update when the default value is returned will cause an error. The `Save` method should be used when dealing with balances from this function.
func GetCreditTypeFromBatchDenom ¶
func GetCreditTypeFromBatchDenom(ctx context.Context, store api.StateStore, denom string) (*api.CreditType, error)
GetCreditTypeFromBatchDenom extracts the classID from a batch denom string, then retrieves it from the params.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.