Documentation ¶
Index ¶
- Constants
- Variables
- func InitGenesis(ctx sdk.Context, k Keeper, data GenesisState)
- type AppModule
- func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions
- func (am AppModule) BeginBlock(ctx context.Context) error
- func (AppModule) ConsensusVersion() uint64
- 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 (ab AppModuleBasic) GetTxCmd() *cobra.Command
- func (AppModuleBasic) Name() string
- func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *gwruntime.ServeMux)
- func (AppModuleBasic) RegisterInterfaces(registry cdctypes.InterfaceRegistry)
- func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
- func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error
- type DataRecord
- type GenesisState
- type Keeper
- type ModuleInputs
- type ModuleOutputs
- type NetworkAward
- type Params
- type ReferralFee
- type Status
- type StatusCheckResult
Constants ¶
const ConsensusVersion = 1
ConsensusVersion defines the current x/referral module consensus version.
const (
ModuleName = types.ModuleName
)
Variables ¶
var ( // functions aliases DefaultGenesisState = types.DefaultGenesisState ValidateGenesis = types.ValidateGenesis )
Functions ¶
func InitGenesis ¶
func InitGenesis(ctx sdk.Context, k Keeper, data GenesisState)
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 referral module.
func NewAppModule ¶
func NewAppModule(cdc codec.Codec, k Keeper, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, stakingKeeper types.StakingKeeper, ) AppModule
NewAppModule creates a new AppModule object
func (AppModule) AutoCLIOptions ¶
func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions
AutoCLIOptions implements the autocli.HasAutoCLIConfig interface.
func (AppModule) BeginBlock ¶
BeginBlock returns the begin blocker for the referral module.
func (AppModule) ConsensusVersion ¶
ConsensusVersion implements AppModule/ConsensusVersion.
func (AppModule) ExportGenesis ¶
ExportGenesis returns the exported genesis state as raw bytes for the referral module.
func (AppModule) InitGenesis ¶
InitGenesis performs genesis initialization for the referral 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 referral module invariants.
func (AppModule) RegisterServices ¶
func (am AppModule) RegisterServices(cfg module.Configurator)
RegisterServices registers module services.
type AppModuleBasic ¶
type AppModuleBasic struct {
// contains filtered or unexported fields
}
AppModuleBasic defines the basic application module used by the referral module.
func (AppModuleBasic) DefaultGenesis ¶
func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage
DefaultGenesis returns default genesis state as raw bytes for the referral module.
func (AppModuleBasic) GetTxCmd ¶
func (ab AppModuleBasic) GetTxCmd() *cobra.Command
GetTxCmd returns the root tx command for the referral module.
func (AppModuleBasic) Name ¶
func (AppModuleBasic) Name() string
Name returns the referral module's name.
func (AppModuleBasic) RegisterGRPCGatewayRoutes ¶
func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *gwruntime.ServeMux)
RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the distribution module.
func (AppModuleBasic) RegisterInterfaces ¶
func (AppModuleBasic) RegisterInterfaces(registry cdctypes.InterfaceRegistry)
RegisterInterfaces implements InterfaceModule
func (AppModuleBasic) RegisterLegacyAminoCodec ¶
func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
RegisterCodec registers the referral module's types for the given codec.
func (AppModuleBasic) ValidateGenesis ¶
func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error
ValidateGenesis performs genesis state validation for the referral module.
type DataRecord ¶
type GenesisState ¶
type GenesisState = types.GenesisState
func ExportGenesis ¶
func ExportGenesis(ctx sdk.Context, k Keeper) (data *GenesisState)
ExportGenesis writes the current store values to a genesis file, which can be imported again with InitGenesis
type ModuleInputs ¶
type ModuleInputs struct { depinject.In Config *modulev1.Module StoreService store.KVStoreService Cdc codec.Codec AccountKeeper types.AccountKeeper BankKeeper types.BankKeeper StakingKeeper types.StakingKeeper }
type ModuleOutputs ¶
type ModuleOutputs struct { depinject.Out ReferralKeeper keeper.Keeper Module appmodule.AppModule RefHooks stakingtypes.RefStakingHooksWrapper }
func ProvideModule ¶
func ProvideModule(in ModuleInputs) ModuleOutputs
type NetworkAward ¶
type NetworkAward = types.NetworkAward
type ReferralFee ¶
type ReferralFee = types.ReferralFee
type StatusCheckResult ¶
type StatusCheckResult = types.StatusCheckResult