Documentation ¶
Index ¶
- Variables
- func BeginBlocker(ctx context.Context, req abci.RequestBeginBlock)
- func EndBlocker(ctx context.Context, req abci.RequestEndBlock)
- func ExportGenesis(ctx context.Context) types.GenesisState
- func InitGenesis(ctx context.Context, data types.GenesisState)
- func NewAppModule() types.AppModule
- type AppModule
- func (am AppModule) BeginBlock(ctx context.Context, req abci.RequestBeginBlock)
- func (am AppModule) EndBlock(ctx context.Context, req abci.RequestEndBlock) []abci.ValidatorUpdate
- func (am AppModule) ExportGenesis(ctx context.Context) json.RawMessage
- func (am AppModule) InitGenesis(ctx context.Context, bapp *baseabci.BaseApp, data json.RawMessage) []abci.ValidatorUpdate
- func (am AppModule) RegisterInvariants(ir types.InvariantRegistry)
- func (am AppModule) RegisterQuerier(qr types.QueryRegistry)
- type AppModuleBasic
- func (amb AppModuleBasic) DefaultGenesis() json.RawMessage
- func (amb AppModuleBasic) GetMapperAndHooks() types.MapperWithHooks
- func (amb AppModuleBasic) GetQueryCmds(cdc *amino.Codec) []*cobra.Command
- func (amb AppModuleBasic) GetTxCmds(cdc *amino.Codec) []*cobra.Command
- func (amb AppModuleBasic) Name() string
- func (amb AppModuleBasic) RegisterCodec(cdc *amino.Codec)
- func (amb AppModuleBasic) RegisterRestRoutes(ctx cliContext.CLIContext, routes *mux.Router)
- func (amb AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
- type DelegatorEarningsStartInfo
- type GenesisState
- type Params
- type StakingHooks
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ModuleName = types.Distribution Cdc = types.Cdc RegisterCodec = types.RegisterCodec DefaultGenesis = types.DefaultGenesisState ValidateGenesis = types.ValidateGenesis MapperName = types.MapperName NewMapper = mapper.NewMapper GetMapper = mapper.GetMapper Query = mapper.Query BuildDelegatorEarningStartInfoKey = types.BuildDelegatorEarningStartInfoKey ParamsSpace = types.ParamSpace NewStakingHooks = mapper.NewStakingHooks QueryCommands = client.QueryCommands TxCommands = client.TxCommands )
Functions ¶
func BeginBlocker ¶
func BeginBlocker(ctx context.Context, req abci.RequestBeginBlock)
beginBlocker根据Vote信息进行QOS分配: mint+tx fee
func EndBlocker ¶
func EndBlocker(ctx context.Context, req abci.RequestEndBlock)
对delegator的收益进行发放,并决定是否有下一次收益
func ExportGenesis ¶
func ExportGenesis(ctx context.Context) types.GenesisState
func InitGenesis ¶
func InitGenesis(ctx context.Context, data types.GenesisState)
func NewAppModule ¶ added in v0.0.6
Types ¶
type AppModule ¶ added in v0.0.6
type AppModule struct {
AppModuleBasic
}
模块结构
func (AppModule) BeginBlock ¶ added in v0.0.6
func (am AppModule) BeginBlock(ctx context.Context, req abci.RequestBeginBlock)
App BeginBlocker 中执行操作
func (AppModule) EndBlock ¶ added in v0.0.6
func (am AppModule) EndBlock(ctx context.Context, req abci.RequestEndBlock) []abci.ValidatorUpdate
App EndBlocker 中执行操作
func (AppModule) ExportGenesis ¶ added in v0.0.6
func (am AppModule) ExportGenesis(ctx context.Context) json.RawMessage
导出状态数据
func (AppModule) InitGenesis ¶ added in v0.0.6
func (am AppModule) InitGenesis(ctx context.Context, bapp *baseabci.BaseApp, data json.RawMessage) []abci.ValidatorUpdate
初始化本模块
func (AppModule) RegisterInvariants ¶ added in v0.0.6
func (am AppModule) RegisterInvariants(ir types.InvariantRegistry)
注册数据验证
func (AppModule) RegisterQuerier ¶ added in v0.0.6
func (am AppModule) RegisterQuerier(qr types.QueryRegistry)
返回本模块自定义应用查询路由信息
type AppModuleBasic ¶ added in v0.0.6
type AppModuleBasic struct{}
基础模块结构
func (AppModuleBasic) DefaultGenesis ¶ added in v0.0.6
func (amb AppModuleBasic) DefaultGenesis() json.RawMessage
默认初始状态数据
func (AppModuleBasic) GetMapperAndHooks ¶ added in v0.0.6
func (amb AppModuleBasic) GetMapperAndHooks() types.MapperWithHooks
返回数据库操作 Mapper
func (AppModuleBasic) GetQueryCmds ¶ added in v0.0.6
func (amb AppModuleBasic) GetQueryCmds(cdc *amino.Codec) []*cobra.Command
返回查询命令集合
func (AppModuleBasic) GetTxCmds ¶ added in v0.0.6
func (amb AppModuleBasic) GetTxCmds(cdc *amino.Codec) []*cobra.Command
返回交易命令集合
func (AppModuleBasic) RegisterCodec ¶ added in v0.0.6
func (amb AppModuleBasic) RegisterCodec(cdc *amino.Codec)
amino 相关类/对象注册
func (AppModuleBasic) RegisterRestRoutes ¶ added in v0.0.8
func (amb AppModuleBasic) RegisterRestRoutes(ctx cliContext.CLIContext, routes *mux.Router)
func (AppModuleBasic) ValidateGenesis ¶ added in v0.0.6
func (amb AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
校验初始状态数据
type DelegatorEarningsStartInfo ¶ added in v0.0.6
type DelegatorEarningsStartInfo = types.DelegatorEarningsStartInfo
type GenesisState ¶
type GenesisState = types.GenesisState
type StakingHooks ¶ added in v0.0.6
type StakingHooks = mapper.StakingHooks
Click to show internal directories.
Click to hide internal directories.