Documentation ¶
Index ¶
- Constants
- Variables
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) 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
- type Migrator
- type Querier
- func (q Querier) Fileupload(c context.Context, req *types.QueryFileUploadRequest) (*types.QueryFileUploadResponse, error)
- func (q Querier) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (q Querier) Prepay(c context.Context, req *types.QueryPrepayRequest) (*types.QueryPrepayResponse, error)
Constants ¶
const ( QueryUploadedFile = "uploaded_file" QueryPrepay = "prepay" QuerySimulatePrepay = "simulate_prepay" QueryCurrUozPrice = "curr_uoz_price" QueryUozSupply = "uoz_supply" QuerySdsParams = "params" )
Variables ¶
var (
RewardToUstos = sdk.NewInt(1)
)
Functions ¶
func NewMsgServerImpl ¶ added in v0.8.0
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) GetFileInfoBytesByFileHash ¶
GetFileInfoBytesByFileHash Returns the hash of file
func (Keeper) GetPrepayBytes ¶
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
IteratePrepay Iterate over all prepay KVs. Iteration for all prepay KVs
func (Keeper) SetFileHash ¶
SetFileHash Sets sender-fileHash KV pair
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
NewMigrator returns a new Migrator.
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 (q Querier) Fileupload(c context.Context, req *types.QueryFileUploadRequest) (*types.QueryFileUploadResponse, error)
func (Querier) Params ¶ added in v0.8.0
func (q Querier) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Querier) Prepay ¶ added in v0.8.0
func (q Querier) Prepay(c context.Context, req *types.QueryPrepayRequest) (*types.QueryPrepayResponse, error)