Documentation ¶
Index ¶
- Constants
- Variables
- func InitGenesis(ctx sdk.Context, k keeper.Keeper, state GenesisState)
- func NewHandler(keeper Keeper) sdk.Handler
- func ValidateGenesis(data GenesisState) error
- type AppModule
- func (AppModule) BeginBlock(sdk.Context, abci.RequestBeginBlock)
- func (AppModule) EndBlock(sdk.Context, abci.RequestEndBlock) []abci.ValidatorUpdate
- func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
- func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate
- func (am AppModule) NewHandler() sdk.Handler
- func (am AppModule) NewQuerierHandler() sdk.Querier
- func (AppModule) QuerierRoute() string
- func (AppModule) RegisterInvariants(sdk.InvariantRegistry)
- func (AppModule) Route() string
- type AppModuleBasic
- func (AppModuleBasic) DefaultGenesis() json.RawMessage
- func (AppModuleBasic) GetQueryCmd(*codec.Codec) *cobra.Command
- func (AppModuleBasic) GetTxCmd(*codec.Codec) *cobra.Command
- func (AppModuleBasic) Name() string
- func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
- func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)
- func (AppModuleBasic) ValidateGenesis(data json.RawMessage) error
- type Attendee
- type GenesisAttendees
- type GenesisPrizes
- type GenesisScans
- type GenesisService
- type GenesisState
- type Keeper
- type MsgKey
Constants ¶
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 ¶
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 ¶
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 ¶
NewAppModule creates a new AppModule object nolint: gocritic
func (AppModule) BeginBlock ¶
func (AppModule) BeginBlock(sdk.Context, abci.RequestBeginBlock)
BeginBlock runs at the beginning of each block
func (AppModule) EndBlock ¶
func (AppModule) EndBlock(sdk.Context, abci.RequestEndBlock) []abci.ValidatorUpdate
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 ¶
NewHandler return's the module's handler
func (AppModule) NewQuerierHandler ¶
NewQuerierHandler returns the handler for the querier
func (AppModule) QuerierRoute ¶
QuerierRoute returns the key for the router
func (AppModule) RegisterInvariants ¶
func (AppModule) RegisterInvariants(sdk.InvariantRegistry)
RegisterInvariants registers the invariants for this module
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 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