keeper

package
v0.46.0-rc8 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServer

func NewMsgServer(keeper Keeper) token.MsgServer

NewMsgServer returns an implementation of the token MsgServer interface for the provided Keeper.

func NewQueryServer

func NewQueryServer(keeper Keeper) token.QueryServer

NewQueryServer returns an implementation of the token QueryServer interface for the provided Keeper.

Types

type Keeper

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

Keeper defines the token module Keeper

func NewKeeper

func NewKeeper(
	cdc codec.Codec,
	key sdk.StoreKey,
	ak token.AccountKeeper,
	ck token.ClassKeeper,
) Keeper

NewKeeper returns a token keeper

func (Keeper) Abandon added in v0.46.0

func (k Keeper) Abandon(ctx sdk.Context, contractID string, grantee sdk.AccAddress, permission token.Permission)

func (Keeper) AuthorizeOperator added in v0.46.0

func (k Keeper) AuthorizeOperator(ctx sdk.Context, contractID string, holder, operator sdk.AccAddress) error

func (Keeper) Burn

func (k Keeper) Burn(ctx sdk.Context, contractID string, from sdk.AccAddress, amount sdk.Int) error

func (Keeper) ExportGenesis

func (k Keeper) ExportGenesis(ctx sdk.Context) *token.GenesisState

ExportGenesis returns a GenesisState for a given context.

func (Keeper) GetAuthorization added in v0.46.0

func (k Keeper) GetAuthorization(ctx sdk.Context, contractID string, holder, operator sdk.AccAddress) (*token.Authorization, error)

func (Keeper) GetBalance

func (k Keeper) GetBalance(ctx sdk.Context, contractID string, addr sdk.AccAddress) sdk.Int

func (Keeper) GetBurnt added in v0.46.0

func (k Keeper) GetBurnt(ctx sdk.Context, contractID string) sdk.Int

func (Keeper) GetClass

func (k Keeper) GetClass(ctx sdk.Context, contractID string) (*token.TokenClass, error)

func (Keeper) GetGrant

func (k Keeper) GetGrant(ctx sdk.Context, contractID string, grantee sdk.AccAddress, permission token.Permission) (*token.Grant, error)

func (Keeper) GetMinted added in v0.46.0

func (k Keeper) GetMinted(ctx sdk.Context, contractID string) sdk.Int

func (Keeper) GetSupply

func (k Keeper) GetSupply(ctx sdk.Context, contractID string) sdk.Int

func (Keeper) Grant

func (k Keeper) Grant(ctx sdk.Context, contractID string, granter, grantee sdk.AccAddress, permission token.Permission)

func (Keeper) InitGenesis

func (k Keeper) InitGenesis(ctx sdk.Context, data *token.GenesisState)

InitGenesis new token genesis

func (Keeper) Issue

func (k Keeper) Issue(ctx sdk.Context, class token.TokenClass, owner, to sdk.AccAddress, amount sdk.Int)

func (Keeper) Mint

func (k Keeper) Mint(ctx sdk.Context, contractID string, grantee, to sdk.AccAddress, amount sdk.Int) error

func (Keeper) Modify

func (k Keeper) Modify(ctx sdk.Context, contractID string, grantee sdk.AccAddress, changes []token.Pair) error

func (Keeper) OperatorBurn added in v0.46.0

func (k Keeper) OperatorBurn(ctx sdk.Context, contractID string, operator, from sdk.AccAddress, amount sdk.Int) error

func (Keeper) RevokeOperator added in v0.46.0

func (k Keeper) RevokeOperator(ctx sdk.Context, contractID string, holder, operator sdk.AccAddress) error

func (Keeper) Send added in v0.46.0

func (k Keeper) Send(ctx sdk.Context, contractID string, from, to sdk.AccAddress, amount sdk.Int) error

Jump to

Keyboard shortcuts

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