keeper

package
v15.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ModuleLogger

func ModuleLogger(ctx sdk.Context) log.Logger

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

Types

type Keeper

type Keeper struct {
	Schema              collections.Schema
	Params              collections.Item[types.Params]
	PrivilegedContracts collections.Map[[]byte, []byte]
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeService corestoretypes.KVStoreService,
	wk types.WasmKeeper,
	authority string,
) Keeper

func (Keeper) GetAuthority

func (k Keeper) GetAuthority() string

GetAuthority returns the x/wasm module's authority.

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (params types.Params, err error)

GetParams returns the total set of minting parameters.

func (Keeper) IsAdminAddress

func (k Keeper) IsAdminAddress(ctx sdk.Context, address string) bool

func (Keeper) IsPrivileged

func (k Keeper) IsPrivileged(ctx sdk.Context, contractAddr sdk.AccAddress) bool

IsPrivileged returns if the given contract is part of the privilege contract list

func (Keeper) IteratePrivileged

func (k Keeper) IteratePrivileged(ctx sdk.Context, doSomething func(sdk.AccAddress) bool)

IteratePrivileged executes the given func on all the privilege contracts

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error

SetParams sets the total set of minting parameters.

func (Keeper) SetPrivileged

func (k Keeper) SetPrivileged(ctx sdk.Context, contractAddr sdk.AccAddress) error

SetPrivileged checks if the given contract exists and adds it to the list of privilege contracts

func (Keeper) UnsetPrivileged

func (k Keeper) UnsetPrivileged(ctx sdk.Context, contractAddr sdk.AccAddress) error

UnsetPrivileged checks if the given contract exists and if it has privilege and remove it from the list of privileg contracts

type QueryServer

type QueryServer struct {
	// contains filtered or unexported fields
}

QueryServer implements the module gRPC query service.

func NewQueryServer

func NewQueryServer(keeper Keeper) *QueryServer

NewQueryServer creates a new gRPC query server.

func (QueryServer) ListPrivileged

ListPrivileged lists the addresses of all the contracts which have been promoted to privilege status

func (QueryServer) Params

Params fetches all the params of x/cron module

Jump to

Keyboard shortcuts

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