referral

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

README

x/referral Module

This is the third party provided code for referral marketing system module. It's uses x/staking hooks for stake change related actions and referral structure coins distribution

Documentation

Index

Constants

View Source
const ConsensusVersion = 1

ConsensusVersion defines the current x/referral module consensus version.

View Source
const (
	ModuleName = types.ModuleName
)

Variables

View Source
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

func (am AppModule) BeginBlock(ctx context.Context) error

BeginBlock returns the begin blocker for the referral module.

func (AppModule) ConsensusVersion

func (AppModule) ConsensusVersion() uint64

ConsensusVersion implements AppModule/ConsensusVersion.

func (AppModule) ExportGenesis

func (am AppModule) ExportGenesis(ctx sdk.Context, mrshl codec.JSONCodec) json.RawMessage

ExportGenesis returns the exported genesis state as raw bytes for the referral module.

func (AppModule) InitGenesis

func (am AppModule) InitGenesis(ctx sdk.Context, mrshl codec.JSONCodec, data json.RawMessage)

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) Name

func (AppModule) Name() string

Name returns the referral module's name.

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

ValidateGenesis performs genesis state validation for the referral module.

type DataRecord

type DataRecord = types.Info

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 Keeper

type Keeper = keeper.Keeper

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 Params

type Params = types.Params

type ReferralFee

type ReferralFee = types.ReferralFee

type Status

type Status = types.Status

type StatusCheckResult

type StatusCheckResult = types.StatusCheckResult

Directories

Path Synopsis
client
cli

Jump to

Keyboard shortcuts

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