queriers

package
v0.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func QueryBox

func QueryBox(ctx sdk.Context, id string, keeper keeper.Keeper) ([]byte, sdk.Error)

func QueryList

func QueryList(ctx sdk.Context, req abci.RequestQuery, keeper keeper.Keeper) ([]byte, sdk.Error)
func QueryDepositAmountFromDepositBox(ctx sdk.Context, id string, accAddress string, keeper keeper.Keeper) ([]byte, sdk.Error) {
	address, err := sdk.AccAddressFromBech32(accAddress)
	if err != nil {
		return nil, sdk.ErrInvalidAddress(accAddress)
	}
	amount := keeper.GetDepositByAddress(ctx, id, address)

	bz, err := codec.MarshalJSONIndent(keeper.Getcdc(), amount)
	if err != nil {
		return nil, sdk.ErrInternal(sdk.AppendMsgToErr("could not marshal result to JSON", err.Error()))
	}
	return bz, nil
}

func QueryName

func QueryName(ctx sdk.Context, boxType string, name string, keeper keeper.Keeper) ([]byte, sdk.Error)

func QueryParams added in v0.6.0

func QueryParams(ctx sdk.Context, keeper keeper.Keeper) ([]byte, sdk.Error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL