reputation

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

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

func ErrPostNotFound

func ErrPostNotFound(permlink types.Permlink) sdk.Error

ErrPostNotFound - error when post 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 (rep ReputationManager) GetCurrentRound(ctx sdk.Context) (int64, sdk.Error)

func (ReputationManager) GetReputation

func (rep ReputationManager) GetReputation(ctx sdk.Context, username types.AccountKey) (types.Coin, sdk.Error)

func (ReputationManager) GetSumRep

func (rep ReputationManager) GetSumRep(ctx sdk.Context, post types.Permlink) (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)

func (ReputationManager) ReportAt

func (rep ReputationManager) ReportAt(ctx sdk.Context,
	username types.AccountKey, post types.Permlink) (types.Coin, sdk.Error)

func (ReputationManager) Update

func (rep ReputationManager) Update(ctx sdk.Context) sdk.Error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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