currencies

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2020 License: GPL-3.0 Imports: 16 Imported by: 2

Documentation

Overview

Aliases to use them outside pocket without import of specific package.

Register codecs for currencies module.

Message handler for currencies module.

Implements keeper for currencies module.

Implements multisignature message handler for currency module.

Implements querier for currency module.

Index

Constants

View Source
const (
	ModuleName       = types.ModuleName
	StoreKey         = types.ModuleName
	DefaultCodespace = types.DefaultCodespace
	QuerierRoute     = types.ModuleName
)
View Source
const (
	QueryGetDestroys = "destroys"
	QueryGetDestroy  = "destroy"
	QueryGetIssue    = "issue"
	QueryGetCurrency = "currency"
)

Variables

View Source
var ModuleCdc *codec.Codec

Functions

func NewAppMsModule

func NewAppMsModule(ccKeeper Keeper) core.AppMsModule

Create new PoA module.

func NewHandler

func NewHandler(keeper Keeper) sdk.Handler

Handler for currencies messages, provess issue/destroy messages.

func NewMsHandler

func NewMsHandler(keeper Keeper) core.MsHandler

Handler for currencies messages, proves issue/destroy messages.

func NewQuerier

func NewQuerier(ccKeeper Keeper) sdk.Querier

Creating new querier.

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

Register amino types for Currencies module.

Types

type AppModule

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

PoA module.

func (AppModule) BeginBlock

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

Process begin block (abci).

func (AppModule) EndBlock

Process end block (abci).

func (AppModule) ExportGenesis

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

Export genesis.

func (AppModule) InitGenesis

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

Initialize genesis.

func (AppModule) Name

func (AppModule) Name() string

Get name of module.

func (AppModule) NewHandler

func (app AppModule) NewHandler() sdk.Handler

Create new handler.

func (AppModule) NewMsHandler

func (app AppModule) NewMsHandler() core.MsHandler

Create new multisignature handler.

func (AppModule) NewQuerierHandler

func (app AppModule) NewQuerierHandler() sdk.Querier

Get new querier for PoA module.

func (AppModule) QuerierRoute

func (AppModule) QuerierRoute() string

Get route for querier.

func (AppModule) RegisterInvariants

func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry)

Register module invariants.

func (AppModule) Route

func (AppModule) Route() string

Base route of module (for handler).

type AppModuleBasic

type AppModuleBasic struct{}

func (AppModuleBasic) DefaultGenesis

func (module AppModuleBasic) DefaultGenesis() json.RawMessage

Generate default genesis.

func (AppModuleBasic) GetQueryCmd

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

Get query commands for CLI.

func (AppModuleBasic) GetTxCmd

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

Get transaction commands for CLI.

func (AppModuleBasic) Name

func (AppModuleBasic) Name() string

Module name.

func (AppModuleBasic) RegisterCodec

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

Registering codecs.

func (AppModuleBasic) RegisterRESTRoutes

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

Register REST routes.

func (AppModuleBasic) ValidateGenesis

func (AppModuleBasic) ValidateGenesis(json.RawMessage) error

Validate exists genesis.

type Keeper

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

Currency keeper struct.

func NewKeeper

func NewKeeper(coinKeeper bank.Keeper, storeKey sdk.StoreKey, cdc *cdcCodec.Codec) Keeper

Create new currency keeper.

func (Keeper) DestroyCurrency

func (keeper Keeper) DestroyCurrency(ctx sdk.Context, chainID, symbol, recipient string, amount sdk.Int, spender sdk.AccAddress) sdk.Error

Destroy currency.

func (Keeper) GetCurrency deprecated

func (keeper Keeper) GetCurrency(ctx sdk.Context, symbol string) types.Currency

Deprecated: Get currency by denom/symbol.

func (Keeper) GetDestroy

func (keeper Keeper) GetDestroy(ctx sdk.Context, id sdk.Int) types.Destroy

Get destroy by id.

func (Keeper) GetIssue

func (keeper Keeper) GetIssue(ctx sdk.Context, issueID string) types.Issue

Get currency issue by id.

func (Keeper) HasDestroy

func (keeper Keeper) HasDestroy(ctx sdk.Context, id sdk.Int) bool

Has destroy.

func (Keeper) IssueCurrency

func (keeper Keeper) IssueCurrency(ctx sdk.Context, symbol string, amount sdk.Int, decimals int8, recipient sdk.AccAddress, issueID string) sdk.Error

Issue currency.

Directories

Path Synopsis
Implements getters for query and transaction CLI commands.
Implements getters for query and transaction CLI commands.
cli
Multisignature currency module commands for CLI.
Multisignature currency module commands for CLI.
rest
Implements REST API calls for currency module.
Implements REST API calls for currency module.
Destroy currency message implementation.
Destroy currency message implementation.
Currency type implementation.
Currency type implementation.

Jump to

Keyboard shortcuts

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