github.com/lino-network/lino@v0.6.11/x/reputation/keeper.go (about) 1 package reputation 2 3 //go:generate mockery -name ReputationKeeper 4 5 import ( 6 codec "github.com/cosmos/cosmos-sdk/codec" 7 sdk "github.com/cosmos/cosmos-sdk/types" 8 9 "github.com/lino-network/lino/types" 10 ) 11 12 type ReputationKeeper interface { 13 // upon donation, record this donation and return the impact factor. 14 DonateAt( 15 ctx sdk.Context, 16 username types.AccountKey, 17 post types.Permlink, 18 amount types.MiniDollar) (types.MiniDollar, sdk.Error) 19 20 // get user's latest reputation, which is the largest impact factor a user can 21 // make in a window. 22 GetReputation(ctx sdk.Context, username types.AccountKey) (types.MiniDollar, sdk.Error) 23 24 // update game status on block end. 25 Update(ctx sdk.Context) sdk.Error 26 27 // return the current round start time 28 GetCurrentRound(ctx sdk.Context) (int64, sdk.Error) 29 30 // import/export this module to files 31 ExportToFile(ctx sdk.Context, cdc *codec.Codec, file string) error 32 ImportFromFile(ctx sdk.Context, cdc *codec.Codec, file string) error 33 }