Documentation ¶
Index ¶
- func EndBlocker(ctx sdk.Context, req abci.RequestEndBlock, rm ReputationManager) (tags sdk.Tags)
- func ErrAccountNotFound(author types.AccountKey) sdk.Error
- func ErrPostNotFound(permlink types.Permlink) sdk.Error
- type ReputationManager
- func (rep ReputationManager) DonateAt(ctx sdk.Context, username types.AccountKey, post types.Permlink, ...) (types.Coin, sdk.Error)
- func (rep ReputationManager) GetCurrentRound(ctx sdk.Context) (int64, sdk.Error)
- func (rep ReputationManager) GetReputation(ctx sdk.Context, username types.AccountKey) (types.Coin, sdk.Error)
- func (rep ReputationManager) GetSumRep(ctx sdk.Context, post types.Permlink) (types.Coin, sdk.Error)
- func (rep ReputationManager) OnStakeIn(ctx sdk.Context, username types.AccountKey, amount types.Coin)
- func (rep ReputationManager) OnStakeOut(ctx sdk.Context, username types.AccountKey, amount types.Coin)
- func (rep ReputationManager) ReportAt(ctx sdk.Context, username types.AccountKey, post types.Permlink) (types.Coin, sdk.Error)
- func (rep ReputationManager) Update(ctx sdk.Context) sdk.Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EndBlocker ¶
func EndBlocker( ctx sdk.Context, req abci.RequestEndBlock, rm ReputationManager) (tags sdk.Tags)
EndBlocker - called every end blocker, udpate new round
func ErrAccountNotFound ¶
func ErrAccountNotFound(author types.AccountKey) sdk.Error
ErrAccountNotFound - error when account is not found
Types ¶
type ReputationManager ¶
type ReputationManager struct {
// contains filtered or unexported fields
}
func NewReputationManager ¶
func NewReputationManager(key sdk.StoreKey, holder param.ParamHolder) ReputationManager
func (ReputationManager) DonateAt ¶
func (rep ReputationManager) DonateAt(ctx sdk.Context, username types.AccountKey, post types.Permlink, coinDay types.Coin) (types.Coin, sdk.Error)
It's caller's responsibility that parameters are all correct, although we do have some checks.
func (ReputationManager) GetCurrentRound ¶
func (ReputationManager) GetReputation ¶
func (rep ReputationManager) GetReputation(ctx sdk.Context, username types.AccountKey) (types.Coin, sdk.Error)
func (ReputationManager) OnStakeIn ¶
func (rep ReputationManager) OnStakeIn(ctx sdk.Context, username types.AccountKey, amount types.Coin)
func (ReputationManager) OnStakeOut ¶
func (rep ReputationManager) OnStakeOut(ctx sdk.Context, username types.AccountKey, amount types.Coin)
Click to show internal directories.
Click to hide internal directories.