Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
- type Keeper
- func (k Keeper) DeleteOracleRandRequest(ctx sdk.Context, requestContextID []byte)
- func (k Keeper) DequeueRandomRequest(ctx sdk.Context, height int64, reqID []byte)
- func (k Keeper) EnqueueRandomRequest(ctx sdk.Context, height int64, reqID []byte, request types.Request)
- func (k Keeper) GetCdc() codec.Marshaler
- func (k Keeper) GetMaxServiceRequestTimeout(ctx sdk.Context) int64
- func (k Keeper) GetOracleRandRequest(ctx sdk.Context, requestContextID []byte) (types.Request, error)
- func (k Keeper) GetRandom(ctx sdk.Context, reqID []byte) (types.Random, error)
- func (k Keeper) GetRequestContext(ctx sdk.Context, requestContextID tmbytes.HexBytes) (exported.RequestContext, bool)
- func (k Keeper) HandlerResponse(ctx sdk.Context, requestContextID tmbytes.HexBytes, responseOutput []string, ...)
- func (k Keeper) HandlerStateChanged(ctx sdk.Context, requestContextID tmbytes.HexBytes, err string)
- func (k Keeper) IterateRandomRequestQueue(ctx sdk.Context, op func(h int64, reqID []byte, r types.Request) (stop bool))
- func (k Keeper) IterateRandomRequestQueueByHeight(ctx sdk.Context, height int64) sdk.Iterator
- func (k Keeper) IterateRandoms(ctx sdk.Context, op func(r types.Random) (stop bool))
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Random(c context.Context, req *types.QueryRandomRequest) (*types.QueryRandomResponse, error)
- func (k Keeper) RandomRequestQueue(c context.Context, req *types.QueryRandomRequestQueueRequest) (*types.QueryRandomRequestQueueResponse, error)
- func (k Keeper) RequestRandom(ctx sdk.Context, consumer sdk.AccAddress, blockInterval uint64, oracle bool, ...) (types.Request, error)
- func (k Keeper) RequestService(ctx sdk.Context, consumer sdk.AccAddress, serviceFeeCap sdk.Coins) (tmbytes.HexBytes, error)
- func (k Keeper) SetOracleRandRequest(ctx sdk.Context, requestContextID []byte, request types.Request)
- func (k Keeper) SetRandom(ctx sdk.Context, reqID []byte, random types.Random)
- func (k Keeper) StartRequestContext(ctx sdk.Context, serviceContextID tmbytes.HexBytes, consumer sdk.AccAddress) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶ added in v1.2.0
NewMsgServerImpl returns an implementation of the random MsgServer interface for the provided Keeper.
func NewQuerier ¶
func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
NewQuerier creates a new random Querier instance
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper defines the random module Keeper
func NewKeeper ¶
func NewKeeper(cdc codec.Marshaler, key sdk.StoreKey, bankKeeper types.BankKeeper, serviceKeeper types.ServiceKeeper) Keeper
NewKeeper returns a new random keeper
func (Keeper) DeleteOracleRandRequest ¶
DeleteOracleRandRequest delete an oracle random request
func (Keeper) DequeueRandomRequest ¶
DequeueRandomRequest removes the random number request by the specified height and request id
func (Keeper) EnqueueRandomRequest ¶
func (k Keeper) EnqueueRandomRequest(ctx sdk.Context, height int64, reqID []byte, request types.Request)
EnqueueRandomRequest enqueue the random number request
func (Keeper) GetMaxServiceRequestTimeout ¶
GetMaxServiceRequestTimeout returns MaxServiceRequestTimeout
func (Keeper) GetOracleRandRequest ¶
func (k Keeper) GetOracleRandRequest(ctx sdk.Context, requestContextID []byte) (types.Request, error)
GetOracleRandRequest retrieves the oracle random request by the specified request id
func (Keeper) GetRequestContext ¶
func (k Keeper) GetRequestContext(ctx sdk.Context, requestContextID tmbytes.HexBytes) (exported.RequestContext, bool)
GetRequestContext retrieves the request context by the specified request context id
func (Keeper) HandlerResponse ¶
func (k Keeper) HandlerResponse(ctx sdk.Context, requestContextID tmbytes.HexBytes, responseOutput []string, err error)
HandlerResponse is responsible for processing the data returned from the service module
func (Keeper) HandlerStateChanged ¶
func (Keeper) IterateRandomRequestQueue ¶
func (k Keeper) IterateRandomRequestQueue(ctx sdk.Context, op func(h int64, reqID []byte, r types.Request) (stop bool))
IterateRandomRequestQueue iterates through the random number request queue
func (Keeper) IterateRandomRequestQueueByHeight ¶
IterateRandomRequestQueueByHeight iterates the random number request queue by the specified height
func (Keeper) IterateRandoms ¶
IterateRandoms iterates through all the random numbers
func (Keeper) Random ¶
func (k Keeper) Random(c context.Context, req *types.QueryRandomRequest) (*types.QueryRandomResponse, error)
Random implements the Query/Random gRPC method
func (Keeper) RandomRequestQueue ¶
func (k Keeper) RandomRequestQueue(c context.Context, req *types.QueryRandomRequestQueueRequest) (*types.QueryRandomRequestQueueResponse, error)
RandomRequestQueue implements the Query/RandomRequestQueue gRPC method
func (Keeper) RequestRandom ¶
func (k Keeper) RequestRandom( ctx sdk.Context, consumer sdk.AccAddress, blockInterval uint64, oracle bool, serviceFeeCap sdk.Coins, ) (types.Request, error)
RequestRandom requests a random number
func (Keeper) RequestService ¶
func (k Keeper) RequestService(ctx sdk.Context, consumer sdk.AccAddress, serviceFeeCap sdk.Coins) (tmbytes.HexBytes, error)
RequestService request the service for oracle seed
func (Keeper) SetOracleRandRequest ¶
func (k Keeper) SetOracleRandRequest(ctx sdk.Context, requestContextID []byte, request types.Request)
SetOracleRandRequest stores the oracle random request
func (Keeper) StartRequestContext ¶
func (k Keeper) StartRequestContext( ctx sdk.Context, serviceContextID tmbytes.HexBytes, consumer sdk.AccAddress, ) error
StartRequestContext starts the service context