keeper

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(k Keeper) sdk.Handler

NewHandler creates an sdk.Handler for all the token type messages

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

NewKeeper returns a token keeper

func (Keeper) Approve

func (k Keeper) Approve(ctx sdk.Context, approver, proxy sdk.AccAddress, classID string) error

func (Keeper) Burn

func (k Keeper) Burn(ctx sdk.Context, from sdk.AccAddress, amounts []token.FT) error

func (Keeper) BurnFrom

func (k Keeper) BurnFrom(ctx sdk.Context, proxy, from sdk.AccAddress, amounts []token.FT) error

func (Keeper) ExportGenesis

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

ExportGenesis returns a GenesisState for a given context.

func (Keeper) GetApprove

func (k Keeper) GetApprove(ctx sdk.Context, approver, proxy sdk.AccAddress, classID string) bool

func (Keeper) GetBalance

func (k Keeper) GetBalance(ctx sdk.Context, addr sdk.AccAddress, classID string) token.FT

func (Keeper) GetBurn

func (k Keeper) GetBurn(ctx sdk.Context, classID string) token.FT

func (Keeper) GetClass

func (k Keeper) GetClass(ctx sdk.Context, classID string) (*token.Token, error)

func (Keeper) GetGrant

func (k Keeper) GetGrant(ctx sdk.Context, grantee sdk.AccAddress, classID, action string) bool

func (Keeper) GetMint

func (k Keeper) GetMint(ctx sdk.Context, classID string) token.FT

func (Keeper) GetSupply

func (k Keeper) GetSupply(ctx sdk.Context, classID string) token.FT

func (Keeper) Grant

func (k Keeper) Grant(ctx sdk.Context, granter, grantee sdk.AccAddress, classID, action string) error

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

func (Keeper) Mint

func (k Keeper) Mint(ctx sdk.Context, grantee, to sdk.AccAddress, amounts []token.FT) error

func (Keeper) Modify

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

func (Keeper) Revoke

func (k Keeper) Revoke(ctx sdk.Context, grantee sdk.AccAddress, classID, action string) error

func (Keeper) Transfer

func (k Keeper) Transfer(ctx sdk.Context, from, to sdk.AccAddress, amounts []token.FT) error

func (Keeper) TransferFrom

func (k Keeper) TransferFrom(ctx sdk.Context, proxy, from, to sdk.AccAddress, amounts []token.FT) error

Jump to

Keyboard shortcuts

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