asset

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2019 License: Apache-2.0, Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryList = "list"
)

Variables

This section is empty.

Functions

func InitGenesis

func InitGenesis(ctx sdk.Context, keeper Keeper, data GenesisState)

func NewHandler

func NewHandler(keeper Keeper) sdk.Handler

func NewQuerier

func NewQuerier(keeper Keeper) sdk.Querier

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

Types

type AppModule

type AppModule struct {
	AppModuleBasic
	// contains filtered or unexported fields
}

func NewAppModule

func NewAppModule(k Keeper, bk bank.Keeper) AppModule

func (AppModule) BeginBlock

func (a AppModule) BeginBlock(sdk.Context, abci.RequestBeginBlock)

func (AppModule) EndBlock

func (AppModule) ExportGenesis

func (a AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage

func (AppModule) InitGenesis

func (a AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate

func (AppModule) NewHandler

func (a AppModule) NewHandler() sdk.Handler

func (AppModule) NewQuerierHandler

func (a AppModule) NewQuerierHandler() sdk.Querier

func (AppModule) QuerierRoute

func (a AppModule) QuerierRoute() string

func (AppModule) RegisterInvariants

func (a AppModule) RegisterInvariants(sdk.InvariantRegistry)

func (AppModule) Route

func (a AppModule) Route() string

type AppModuleBasic

type AppModuleBasic struct{}

func (AppModuleBasic) DefaultGenesis

func (a AppModuleBasic) DefaultGenesis() json.RawMessage

func (AppModuleBasic) GetQueryCmd

func (a AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command

func (AppModuleBasic) GetTxCmd

func (a AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command

func (AppModuleBasic) Name

func (a AppModuleBasic) Name() string

func (AppModuleBasic) RegisterCodec

func (a AppModuleBasic) RegisterCodec(cdc *codec.Codec)

func (AppModuleBasic) RegisterRESTRoutes

func (a AppModuleBasic) RegisterRESTRoutes(context.CLIContext, *mux.Router)

func (AppModuleBasic) ValidateGenesis

func (a AppModuleBasic) ValidateGenesis(b json.RawMessage) error

type GenesisState

type GenesisState struct {
	Assets []types.Asset `json:"assets"`
}

func DefaultGenesisState

func DefaultGenesisState() GenesisState

func ExportGenesis

func ExportGenesis(ctx sdk.Context, k Keeper) GenesisState

func NewGenesisState

func NewGenesisState(assets []types.Asset) GenesisState

type IteratorCB

type IteratorCB func(asset types.Asset) bool

type Keeper

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

func NewKeeper

func NewKeeper(bk bank.Keeper, sk sdk.StoreKey, cdc *codec.Codec) Keeper

func (Keeper) Balance

func (k Keeper) Balance(ctx sdk.Context, id store.EntityID, owner sdk.AccAddress) sdk.Uint

func (Keeper) Burn

func (k Keeper) Burn(ctx sdk.Context, id store.EntityID, burner sdk.AccAddress, quantity sdk.Uint) sdk.Error

func (Keeper) Create

func (k Keeper) Create(ctx sdk.Context, name string, symbol string, owner sdk.AccAddress, totalSupply sdk.Uint) (types.Asset, sdk.Error)

func (Keeper) Get

func (k Keeper) Get(ctx sdk.Context, id store.EntityID) (types.Asset, sdk.Error)

func (Keeper) Has

func (k Keeper) Has(ctx sdk.Context, id store.EntityID) bool

func (Keeper) Inject

func (k Keeper) Inject(ctx sdk.Context, asset types.Asset)

func (Keeper) Iterator

func (k Keeper) Iterator(ctx sdk.Context, cb IteratorCB)

func (Keeper) Mint

func (k Keeper) Mint(ctx sdk.Context, id store.EntityID, quantity sdk.Uint) sdk.Error

func (Keeper) Set

func (k Keeper) Set(ctx sdk.Context, asset types.Asset) sdk.Error

func (Keeper) Transfer

func (k Keeper) Transfer(ctx sdk.Context, id store.EntityID, from sdk.AccAddress, to sdk.AccAddress, quantity sdk.Uint) sdk.Error

func (Keeper) TransferFromOwner

func (k Keeper) TransferFromOwner(ctx sdk.Context, id store.EntityID, to sdk.AccAddress, quantity sdk.Uint) sdk.Error

Directories

Path Synopsis
client
cli

Jump to

Keyboard shortcuts

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