longy

package
v0.0.0-...-4fa03f3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2019 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ModuleName is the name of the module
	ModuleName = types.ModuleName
	// StoreKey is the key used to access the store
	StoreKey = types.StoreKey
	// RouterKey is the key for routing messages to our handler
	RouterKey = types.RouterKey

	// CodeAttendeeKeyed is the alias for AttendeeKeyed
	CodeAttendeeKeyed = types.AttendeeKeyed
)

Variables

View Source
var (
	// ModuleCdc is the alias for the amino with the module's types registered
	ModuleCdc = types.ModuleCdc

	// RegisterCodec is the function alias to register types
	RegisterCodec = types.RegisterCodec

	// NewKeeper is the new keeper function alias for longy
	NewKeeper = keeper.NewKeeper

	// NewAttendee is the function alias for creating a new attendee
	NewAttendee = types.NewAttendee

	// NewMsgKey is the function alias for the MsgKey type
	NewMsgKey = types.NewMsgKey

	// NewMsgBonus is the function alias for the MsgBonus type
	NewMsgBonus = types.NewMsgBonus

	// NewMsgClearBonus is the function alias for the MsgBonus type
	NewMsgClearBonus = types.NewMsgClearBonus

	// NewQuerier is the function alias for creating a new querier
	NewQuerier = querier.NewQuerier
)

Functions

func InitGenesis

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

InitGenesis will run module initialization using the genesis state

func NewHandler

func NewHandler(keeper Keeper) sdk.Handler

NewHandler constructor for our button module

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

ValidateGenesis validates that the passed genesis state is valid

Types

type AppModule

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

AppModule structure holding or keepers together

func NewAppModule

func NewAppModule(keeper Keeper) AppModule

NewAppModule creates a new AppModule object nolint: gocritic

func (AppModule) BeginBlock

BeginBlock runs at the beginning of each block

func (AppModule) EndBlock

EndBlock runs at the end of each block

func (AppModule) ExportGenesis

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

ExportGenesis export genesis nolint: gocritic

func (AppModule) InitGenesis

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

InitGenesis init-genesis nolint: gocritic

func (AppModule) NewHandler

func (am AppModule) NewHandler() sdk.Handler

NewHandler return's the module's handler

func (AppModule) NewQuerierHandler

func (am AppModule) NewQuerierHandler() sdk.Querier

NewQuerierHandler returns the handler for the querier

func (AppModule) QuerierRoute

func (AppModule) QuerierRoute() string

QuerierRoute returns the key for the router

func (AppModule) RegisterInvariants

func (AppModule) RegisterInvariants(sdk.InvariantRegistry)

RegisterInvariants registers the invariants for this module

func (AppModule) Route

func (AppModule) Route() string

Route returns the route key for the the appropriate messages

type AppModuleBasic

type AppModuleBasic struct{}

AppModuleBasic is

func (AppModuleBasic) DefaultGenesis

func (AppModuleBasic) DefaultGenesis() json.RawMessage

DefaultGenesis returns the default genesis for this module if any

func (AppModuleBasic) GetQueryCmd

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

GetQueryCmd returns any query commands from this module to the parent command in the cli

func (AppModuleBasic) GetTxCmd

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

GetTxCmd returns any tx commands from this module to the parent command in the cli

func (AppModuleBasic) Name

func (AppModuleBasic) Name() string

Name returns the name of the module

func (AppModuleBasic) RegisterCodec

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

RegisterCodec registers module to the codec

func (AppModuleBasic) RegisterRESTRoutes

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

RegisterRESTRoutes registers our module rest endpoints

func (AppModuleBasic) ValidateGenesis

func (AppModuleBasic) ValidateGenesis(data json.RawMessage) error

ValidateGenesis validates that the json genesis is valid to our module

type Attendee

type Attendee = types.Attendee

Attendee is the type alias for Attendee

type GenesisAttendees

type GenesisAttendees = types.GenesisAttendees

GenesisAttendees is the array of attendees for the genesis file

type GenesisPrizes

type GenesisPrizes = types.GenesisPrizes

GenesisPrizes is the array of prizes for the event

type GenesisScans

type GenesisScans = types.GenesisScans

GenesisScans is the array of scans for the genesis file

type GenesisService

type GenesisService = types.GenesisService

GenesisService is the genesis type for the service account

type GenesisState

type GenesisState struct {
	KeyService   GenesisService   `json:"service"`
	BonusService GenesisService   `json:"bonus_service"`
	ClaimService GenesisService   `json:"claim_service"`
	Attendees    GenesisAttendees `json:"attendees"`
	Scans        GenesisScans     `json:"scans"`
	Prizes       GenesisPrizes    `json:"prizes"`
}

GenesisState is the genesis struct for the longy module

func DefaultGenesisState

func DefaultGenesisState() GenesisState

DefaultGenesisState returns the default genesis struct for the longy module

func ExportGenesis

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

ExportGenesis returns a GenesisState for a given context and keeper

func NewGenesisState

func NewGenesisState(service GenesisService, bonusService GenesisService, claimService GenesisService,
	attendees []types.Attendee, scans []types.Scan, prizes types.GenesisPrizes) GenesisState

NewGenesisState returns a genesis object of the state given the input params

type Keeper

type Keeper = keeper.Keeper

Keeper is the keeper alias for longy

type MsgKey

type MsgKey = types.MsgKey

MsgKey is the type alias for MsgKey

Directories

Path Synopsis
client
cli
internal

Jump to

Keyboard shortcuts

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