Documentation ¶
Index ¶
- func ExpectParamGet[T any](obj *T, paramKeeper *mocks.MockParamKeeper, key []byte, times int)
- 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 ExpectParamGet ¶
func ExpectParamGet[T any](obj *T, paramKeeper *mocks.MockParamKeeper, key []byte, times int)
ExpectParamGet is a helper function that sets up an expected mock call for the provided type.
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.