keeper

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(k Keeper) types.MsgServer

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

Types

type Keeper

type Keeper struct {
	IidKeeper  iidkeeper.Keeper
	WasmKeeper wasmtypes.ContractOpsKeeper
	ParamSpace paramstypes.Subspace
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(cdc codec.BinaryCodec, key, memKey sdk.StoreKey, iidKeeper iidkeeper.Keeper, wasmKeeper wasmkeeper.Keeper,
	paramSpace paramstypes.Subspace) Keeper

func (Keeper) CheckTokensDuplicateName

func (k Keeper) CheckTokensDuplicateName(ctx sdk.Context, name string) bool

helper function to check if there are any tokens with provded name, return true if it is a duplicate name

func (Keeper) Delete

func (k Keeper) Delete(
	ctx sdk.Context,
	key []byte,
	prefix []byte,
)

Delete - deletes a value form the store

func (Keeper) Get

func (k Keeper) Get(
	ctx sdk.Context,
	key []byte,
	prefix []byte,
	unmarshal UnmarshalFn,
) (i interface{}, found bool)

Get gets an item from the store by bytes

func (Keeper) GetAll

func (k Keeper) GetAll(
	ctx sdk.Context,
	prefix []byte,
) sdk.Iterator

GetAll values from with a prefix from the store

func (Keeper) GetMinterTokens

func (k Keeper) GetMinterTokens(ctx sdk.Context, minter string) []*types.Token

func (Keeper) GetMinterTokensIterator

func (k Keeper) GetMinterTokensIterator(ctx sdk.Context, minter string) sdk.Iterator

func (Keeper) GetMinterTokensStore

func (k Keeper) GetMinterTokensStore(ctx sdk.Context, minter string) prefix.Store

func (Keeper) GetParams

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

GetParams returns the total set of project parameters.

func (Keeper) GetToken

func (k Keeper) GetToken(ctx sdk.Context, minter, contractAddress string) (types.Token, error)

func (Keeper) GetTokenById

func (k Keeper) GetTokenById(ctx sdk.Context, id string) (*types.TokenProperties, *types.Token, error)

helper function to get the Token and TokenProperties from tokenId

func (Keeper) GetTokenByName

func (k Keeper) GetTokenByName(ctx sdk.Context, name string) (*types.Token, bool)

helper function to get the token with provded name

func (Keeper) GetTokenIterator

func (k Keeper) GetTokenIterator(ctx sdk.Context) sdk.Iterator

func (Keeper) GetTokenProperties

func (k Keeper) GetTokenProperties(ctx sdk.Context, id string) (types.TokenProperties, error)

func (Keeper) GetTokenPropertiesAll

func (k Keeper) GetTokenPropertiesAll(ctx sdk.Context) []types.TokenProperties

func (Keeper) GetTokenPropertiesAllIterator

func (k Keeper) GetTokenPropertiesAllIterator(ctx sdk.Context) sdk.Iterator

func (Keeper) GetTokens

func (k Keeper) GetTokens(ctx sdk.Context) []types.Token

func (Keeper) Logger

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

func (Keeper) Marshal

func (k Keeper) Marshal(value interface{}) (bytes []byte)

func (Keeper) Set

func (k Keeper) Set(ctx sdk.Context,
	key []byte,
	prefix []byte,
	i interface{},
	marshal MarshalFn,
)

Set sets a value in the db with a prefixed key

func (Keeper) SetParams

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

SetParams sets the total set of project parameters.

func (Keeper) SetToken

func (k Keeper) SetToken(ctx sdk.Context, value types.Token)

func (Keeper) SetTokenProperties

func (k Keeper) SetTokenProperties(ctx sdk.Context, value types.TokenProperties)

func (Keeper) Unmarshal

func (k Keeper) Unmarshal(data []byte, val codec.ProtoMarshaler) bool

Unmarshal unmarshal a byte slice to a struct, return false in case of errors

func (Keeper) UnmarshalToken

func (k Keeper) UnmarshalToken(value []byte) (interface{}, bool)

func (Keeper) UnmarshalTokenProperties

func (k Keeper) UnmarshalTokenProperties(value []byte) (interface{}, bool)

type MarshalFn

type MarshalFn func(value interface{}) []byte

MarshalFn is a generic function to marshal bytes

type Querier

type Querier struct {
	Keeper
}

Querier defines a wrapper around the x/token keeper providing gRPC method handlers.

func NewQuerier

func NewQuerier(k Keeper) Querier

func (Querier) Params

type UnmarshalFn

type UnmarshalFn func(value []byte) (interface{}, bool)

UnmarshalFn is a generic function to unmarshal bytes

Jump to

Keyboard shortcuts

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