Documentation ¶
Index ¶
- Constants
- Variables
- func NewQuerier(k Keeper) sdk.Querier
- type Keeper
- func (k Keeper) BondDenom(ctx sdk.Context) (res string)
- func (k Keeper) GetFileInfoBytesByFileHash(ctx sdk.Context, key []byte) ([]byte, error)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetPrepay(ctx sdk.Context, sender sdk.AccAddress) (sdk.Int, error)
- func (k Keeper) GetPrepayBytes(ctx sdk.Context, sender sdk.AccAddress) ([]byte, error)
- func (k Keeper) IterateFileUpload(ctx sdk.Context, handler func(string, types.FileInfo) (stop bool))
- func (k Keeper) IteratePrepay(ctx sdk.Context, handler func(sdk.AccAddress, sdk.Int) (stop bool))
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Prepay(ctx sdk.Context, sender sdk.AccAddress, coins sdk.Coins) (sdk.Int, error)
- func (k Keeper) SetFileHash(ctx sdk.Context, fileHash []byte, fileInfo types.FileInfo)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetPrepay(ctx sdk.Context, sender sdk.AccAddress, coins sdk.Coins) error
Constants ¶
View Source
const ( QueryFileHash = "uploaded_file" QueryPrepay = "prepay" QuerySimulatePrepay = "simulate_prepay" QueryCurrUozPrice = "curr_uoz_price" QueryUozSupply = "uoz_supply" )
Variables ¶
View Source
var (
RewardToUstos = sdk.NewInt(1)
)
Functions ¶
func NewQuerier ¶
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, paramSpace params.Subspace, 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 ¶
GetFileInfoBytesByFileHash Returns the hash of file
func (Keeper) GetPrepayBytes ¶
GetPrepay 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.
func (Keeper) IteratePrepay ¶ added in v0.6.2
IteratePrepay Iterate over all prepay KVs.
func (Keeper) SetFileHash ¶
SetFileHash Sets sender-fileHash KV pair
Click to show internal directories.
Click to hide internal directories.