Documentation
¶
Index ¶
- func CalculateAllocatedAmount(gross sdkmath.Int, rate sdkmath.LegacyDec) (sdkmath.Int, error)
- func CalculateSettlement(gross, allocated, min, max sdkmath.Int) (burn, community sdkmath.Int, err error)
- func NewMsgServerImpl(k Keeper) types.MsgServer
- type Keeper
- func (k Keeper) Authority() string
- func (k Keeper) BeginBlock(ctx context.Context) error
- func (k Keeper) CurrentPeriod(ctx context.Context, req *types.QueryCurrentPeriodRequest) (*types.QueryCurrentPeriodResponse, error)
- func (k Keeper) ExportGenesis(ctx context.Context) (*types.GenesisState, error)
- func (k Keeper) GetParams(ctx context.Context) (types.Params, error)
- func (k Keeper) InitGenesis(ctx context.Context, state *types.GenesisState) error
- func (k Keeper) Logger(ctx context.Context) log.Logger
- func (k Keeper) Params(ctx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) SetParams(ctx context.Context, params types.Params) error
- func (k Keeper) Status(ctx context.Context, req *types.QueryStatusRequest) (*types.QueryStatusResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateAllocatedAmount ¶
CalculateAllocatedAmount applies a deterministic decimal multiplication and truncates toward zero.
func CalculateSettlement ¶
func CalculateSettlement(gross, allocated, min, max sdkmath.Int) (burn, community sdkmath.Int, err error)
CalculateSettlement returns burn and community amounts while preserving burn+community=allocated.
func NewMsgServerImpl ¶
Types ¶
type Keeper ¶
type Keeper struct {
ParamsStore collections.Item[types.Params]
CurrentPeriodStore collections.Item[types.CurrentPeriod]
Schema collections.Schema
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( c codec.Codec, storeService store.KVStoreService, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, distKeeper types.DistributionKeeper, authority string, ) Keeper
func (Keeper) BeginBlock ¶
BeginBlock atomically routes the FeeCollector balance and, at the period boundary, settles it.
func (Keeper) CurrentPeriod ¶
func (k Keeper) CurrentPeriod(ctx context.Context, req *types.QueryCurrentPeriodRequest) (*types.QueryCurrentPeriodResponse, error)
func (Keeper) ExportGenesis ¶
func (Keeper) InitGenesis ¶
func (Keeper) Params ¶
func (k Keeper) Params(ctx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) Status ¶
func (k Keeper) Status(ctx context.Context, req *types.QueryStatusRequest) (*types.QueryStatusResponse, error)