Documentation ¶
Index ¶
- Constants
- Variables
- func ExportGenesis(ctx sdk.Context, k keeper.Keeper) (data *types.GenesisState)
- func InitGenesis(ctx sdk.Context, k keeper.Keeper, data types.GenesisState)
- type AppModule
- func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions
- func (am AppModule) BeginBlock(ctx context.Context) error
- func (am AppModule) ExportGenesis(ctx sdk.Context, mrshl codec.JSONCodec) json.RawMessage
- func (am AppModule) InitGenesis(ctx sdk.Context, mrshl codec.JSONCodec, data json.RawMessage)
- func (am AppModule) IsAppModule()
- func (am AppModule) IsOnePerModuleType()
- func (AppModule) Name() string
- func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry)
- func (am AppModule) RegisterServices(cfg module.Configurator)
- type AppModuleBasic
- func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage
- func (AppModuleBasic) GetQueryCmd() *cobra.Command
- func (AppModuleBasic) GetTxCmd() *cobra.Command
- func (AppModuleBasic) Name() string
- func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux)
- func (AppModuleBasic) RegisterInterfaces(registry codecTypes.InterfaceRegistry)
- func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
- func (AppModuleBasic) RegisterRESTRoutes(ctx client.Context, rtr *mux.Router)
- func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error
- type GenesisState
- type Keeper
- type ModuleInputs
- type ModuleOutputs
- type Params
Constants ¶
const (
ModuleName = types.ModuleName
)
Variables ¶
var ( // functions aliases DefaultGenesisState = types.DefaultGenesisState ValidateGenesis = types.ValidateGenesis )
Functions ¶
func ExportGenesis ¶
ExportGenesis writes the current store values to a genesis file, which can be imported again with InitGenesis
func InitGenesis ¶
InitGenesis initialize default parameters and the keeper's address to pubkey map
Types ¶
type AppModule ¶
type AppModule struct { AppModuleBasic // contains filtered or unexported fields }
AppModule implements an application module for the vote module.
func NewAppModule ¶
func NewAppModule(cdc codec.Codec, k keeper.Keeper, referralKeeper types.ReferralKeeper, ) AppModule
NewAppModule creates a new AppModule object
func (AppModule) AutoCLIOptions ¶
func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions
AutoCLIOptions implements the autocli.HasAutoCLIConfig interface.
func (AppModule) ExportGenesis ¶
ExportGenesis returns the exported genesis state as raw bytes for the vote module.
func (AppModule) InitGenesis ¶
InitGenesis performs genesis initialization for the vote module. It returns no validator updates.
func (AppModule) IsAppModule ¶
func (am AppModule) IsAppModule()
IsAppModule implements the appmodule.AppModule interface.
func (AppModule) IsOnePerModuleType ¶
func (am AppModule) IsOnePerModuleType()
IsOnePerModuleType implements the depinject.OnePerModuleType interface.
func (AppModule) RegisterInvariants ¶
func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry)
RegisterInvariants registers the vote module invariants.
func (AppModule) RegisterServices ¶
func (am AppModule) RegisterServices(cfg module.Configurator)
type AppModuleBasic ¶
type AppModuleBasic struct {
// contains filtered or unexported fields
}
AppModuleBasic defines the basic application module used by the vote module.
func (AppModuleBasic) DefaultGenesis ¶
func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage
DefaultGenesis returns default genesis state as raw bytes for the vote module.
func (AppModuleBasic) GetQueryCmd ¶
func (AppModuleBasic) GetQueryCmd() *cobra.Command
GetQueryCmd returns no root query command for the vote module.
func (AppModuleBasic) GetTxCmd ¶
func (AppModuleBasic) GetTxCmd() *cobra.Command
GetTxCmd returns the root tx command for the vote module.
func (AppModuleBasic) Name ¶
func (AppModuleBasic) Name() string
Name returns the vote module's name.
func (AppModuleBasic) RegisterGRPCGatewayRoutes ¶
func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux)
func (AppModuleBasic) RegisterInterfaces ¶
func (AppModuleBasic) RegisterInterfaces(registry codecTypes.InterfaceRegistry)
func (AppModuleBasic) RegisterLegacyAminoCodec ¶
func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
RegisterCodec registers the vote module's types for the given codec.
func (AppModuleBasic) RegisterRESTRoutes ¶
func (AppModuleBasic) RegisterRESTRoutes(ctx client.Context, rtr *mux.Router)
RegisterRESTRoutes registers the REST routes for the vote module.
func (AppModuleBasic) ValidateGenesis ¶
func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error
ValidateGenesis performs genesis state validation for the vote module.
type GenesisState ¶
type GenesisState = types.GenesisState
type ModuleInputs ¶
type ModuleInputs struct { depinject.In Config *modulev1.Module StoreService store.KVStoreService Cdc codec.Codec ReferralKeeper types.ReferralKeeper AccountKeeper types.AccountKeeper MsgServiceRouter baseapp.MessageRouter }
type ModuleOutputs ¶
func ProvideModule ¶
func ProvideModule(in ModuleInputs) ModuleOutputs