keeper

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func NewQuerier

func NewQuerier(k Keeper) sdk.Querier

NewQuerier creates a new querier for sds clients.

Types

type Keeper

type Keeper struct {
	BankKeeper     bank.Keeper
	RegisterKeeper register.Keeper
	PotKeeper      pot.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,
	bankKeeper bank.Keeper,
	registerKeeper register.Keeper,
	potKeeper pot.Keeper,
) Keeper

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

func (Keeper) GetFileInfoBytesByFileHash

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

GetFileInfoBytesByFileHash Returns the hash of file

func (Keeper) GetPrepay

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

GetPrepay Returns the existing prepay coins

func (Keeper) GetPrepayBytes

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

GetPrepay Returns bytearr of the existing prepay coins

func (Keeper) Logger

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

Logger returns a module-specific logger.

func (Keeper) Prepay

func (fk 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 (fk Keeper) SetFileHash(ctx sdk.Context, fileHash []byte, fileInfo types.FileInfo)

SetFileHash Sets sender-fileHash KV pair

Jump to

Keyboard shortcuts

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