keeper

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl added in v0.8.0

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the bank MsgServer interface for the provided Keeper.

Types

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

Keeper encodes/decodes files using the go-amino (binary) encoding/decoding library.

func NewKeeper

func NewKeeper(
	cdc codec.Codec,
	storeKey storetypes.StoreKey,
	bankKeeper types.BankKeeper,
	registerKeeper types.RegisterKeeper,
	potKeeper types.PotKeeper,
	authority string,
) Keeper

NewKeeper returns a new sdk.NewKeeper that uses go-amino to (binary) encode and decode concrete sdk.MsgUploadFile. nolint

func (Keeper) BondDenom added in v0.6.0

func (k Keeper) BondDenom(ctx sdk.Context) (res string)

BondDenom - Bondable coin denomination

func (Keeper) ExportGenesis added in v0.12.0

func (k Keeper) ExportGenesis(ctx sdk.Context) (data *types.GenesisState)

ExportGenesis writes the current store values to a genesis file, which can be imported again with InitGenesis

func (Keeper) FileUpload added in v0.10.0

func (k Keeper) FileUpload(ctx sdk.Context, fileHash string, reporter stratos.SdsAddress, reporterOwner, uploader sdk.AccAddress) (err error)

func (Keeper) GetFileInfoByFileHash added in v0.10.0

func (k Keeper) GetFileInfoByFileHash(ctx sdk.Context, fileHash []byte) (fileInfo types.FileInfo, found bool)

GetFileInfoByFileHash Returns the fileInfo

func (Keeper) GetParams added in v0.6.0

func (k Keeper) GetParams(ctx sdk.Context) (p types.Params)

GetParams returns the params from the store

func (Keeper) InitGenesis added in v0.12.0

func (k Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState)

InitGenesis initialize default parameters and the keeper's address to pubkey map

func (Keeper) IterateFileInfo added in v0.10.0

func (k Keeper) IterateFileInfo(ctx sdk.Context, handler func(string, types.FileInfo) (stop bool))

IterateFileInfo Iterate over all uploaded files. Iteration for all uploaded files

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

Logger returns a module-specific logger.

func (Keeper) Prepay

func (k Keeper) Prepay(ctx sdk.Context, sender sdk.AccAddress, coins sdk.Coins) (sdkmath.Int, error)

Prepay transfers coins from bank to sds (volume) pool

func (Keeper) SetFileInfo added in v0.10.0

func (k Keeper) SetFileInfo(ctx sdk.Context, fileHash []byte, fileInfo types.FileInfo)

func (Keeper) SetParams added in v0.6.0

func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error

SetParams sets the params on the store

type Migrator added in v0.8.0

type Migrator struct {
	// contains filtered or unexported fields
}

Migrator is a struct for handling in-place store migrations.

func NewMigrator added in v0.8.0

func NewMigrator(keeper Keeper, legacySubspace types.ParamsSubspace) Migrator

NewMigrator returns a new Migrator.

func (Migrator) Migrate1to2 added in v0.8.0

func (m Migrator) Migrate1to2(ctx sdk.Context) error

Migrate1to2 migrates from version 1 to 2.

type Querier added in v0.8.0

type Querier struct {
	Keeper
}

Querier is used as Keeper will have duplicate methods if used directly, and gRPC names take precedence over keeper

func (Querier) Fileupload added in v0.8.0

func (Querier) NozPrice added in v0.10.0

func (Querier) NozSupply added in v0.10.0

func (Querier) Params added in v0.8.0

func (Querier) SimPrepay added in v0.10.0

Jump to

Keyboard shortcuts

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