keeper

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryUploadedFile   = "uploaded_file"
	QueryPrepay         = "prepay"
	QuerySimulatePrepay = "simulate_prepay"
	QueryCurrUozPrice   = "curr_uoz_price"
	QueryUozSupply      = "uoz_supply"
	QuerySdsParams      = "params"
)

Variables

View Source
var (
	RewardToUstos = sdk.NewInt(1)
)

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.

func NewQuerier

func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier

NewQuerier creates a new querier for sds clients.

Types

type Keeper

type Keeper struct {
	RegisterKeeper registerKeeper.Keeper
	PotKeeper      potKeeper.Keeper
	// contains filtered or unexported fields
}

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

func NewKeeper

func NewKeeper(
	cdc codec.Codec,
	key sdk.StoreKey,
	paramSpace paramtypes.Subspace,
	bankKeeper bankKeeper.Keeper,
	registerKeeper registerKeeper.Keeper,
	potKeeper potKeeper.Keeper,
) 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) GetFileInfoBytesByFileHash

func (k Keeper) GetFileInfoBytesByFileHash(ctx sdk.Context, key []byte) ([]byte, error)

GetFileInfoBytesByFileHash Returns the hash of file

func (Keeper) GetParams added in v0.6.0

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

GetParams returns the total set of sds parameters.

func (Keeper) GetPrepay

func (k Keeper) GetPrepay(ctx sdk.Context, sender sdk.AccAddress) (sdk.Int, error)

GetPrepay Returns the existing prepay coins

func (Keeper) GetPrepayBytes

func (k Keeper) GetPrepayBytes(ctx sdk.Context, sender sdk.AccAddress) ([]byte, error)

GetPrepayBytes returns bytearr of the existing prepay coins

func (Keeper) IterateFileUpload added in v0.6.2

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

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

func (Keeper) IteratePrepay added in v0.6.2

func (k Keeper) IteratePrepay(ctx sdk.Context, handler func(sdk.AccAddress, sdk.Int) (stop bool))

IteratePrepay Iterate over all prepay KVs. Iteration for all prepay KVs

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) (sdk.Int, error)

Prepay transfers coins from bank to sds (volumn) pool

func (Keeper) SetFileHash

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

SetFileHash Sets sender-fileHash KV pair

func (Keeper) SetParams added in v0.6.0

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

SetParams sets the sds parameters to the param space.

func (Keeper) SetPrepay added in v0.6.2

func (k Keeper) SetPrepay(ctx sdk.Context, sender sdk.AccAddress, coins sdk.Coins) error

SetPrepay Sets init coins

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) 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) Params added in v0.8.0

func (Querier) Prepay added in v0.8.0

Jump to

Keyboard shortcuts

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