keeper

package
v0.49.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: Apache-2.0 Imports: 10 Imported by: 5

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.

func ValidateLegacyContract

func ValidateLegacyContract(k Keeper, ctx sdk.Context, contractID string) error

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,
	ck token.ClassKeeper,
) Keeper

NewKeeper returns a token keeper

func (Keeper) Abandon

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

func (Keeper) AuthorizeOperator

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

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

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

func (Keeper) GetClass

func (k Keeper) GetClass(ctx sdk.Context, contractID string) (*token.Contract, 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

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.Contract, owner, to sdk.AccAddress, amount sdk.Int) string

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.Attribute) error

func (Keeper) OperatorBurn

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

func (Keeper) RevokeOperator

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

func (Keeper) Send

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