keeper

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

func NewQuerier

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

Types

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(cdc codec.Marshaler, storeKey, memKey sdk.StoreKey, ps paramtypes.Subspace) *Keeper

func (Keeper) Aggregate

func (keeper Keeper) Aggregate(ctx sdk.Context, key string) error

Aggregate does an aggregation of responses for a task and updated task result.

func (Keeper) CreateOracleScript

func (keeper Keeper) CreateOracleScript(ctx sdk.Context, msg types.MsgCreateOracleScript) error

create the oracle script

func (Keeper) CreateReporter

func (keeper Keeper) CreateReporter(ctx sdk.Context, msg types.MsgCreateReporter) error

create the reporter

func (Keeper) CreateRequest

func (keeper Keeper) CreateRequest(ctx sdk.Context, msg types.MsgCreateRequest) error

create the request

func (Keeper) DeleteReporter

func (keeper Keeper) DeleteReporter(ctx sdk.Context, msg types.MsgDeleteReporter) error

func (Keeper) EditOracleScript

func (keeper Keeper) EditOracleScript(ctx sdk.Context, msg types.MsgEditOracleScript) error

edit the oracle script

func (Keeper) GetAllOracleScripts

func (keeper Keeper) GetAllOracleScripts(ctx sdk.Context) []types.OracleScript

func (Keeper) GetAllPrices

func (keeper Keeper) GetAllPrices(ctx sdk.Context) []types.Prices

func (Keeper) GetAllReporters

func (keeper Keeper) GetAllReporters(ctx sdk.Context) []types.Reporter

func (Keeper) GetAllRequests

func (keeper Keeper) GetAllRequests(ctx sdk.Context) []types.Request

func (Keeper) GetClosedBlockRequestExternalids

func (keeper Keeper) GetClosedBlockRequestExternalids(ctx sdk.Context) []string

func (Keeper) GetLatestRequest

func (keeper Keeper) GetLatestRequest(ctx sdk.Context) types.Request

func (Keeper) GetOracleScript

func (keeper Keeper) GetOracleScript(ctx sdk.Context, oracleScriptId string) types.OracleScript

func (Keeper) GetOracleScriptCount

func (keeper Keeper) GetOracleScriptCount(ctx sdk.Context) int64

GetOracleScriptCount get the total number of reporter

func (Keeper) GetOracleScriptCreator

func (keeper Keeper) GetOracleScriptCreator(ctx sdk.Context, oracleScriptId string) string

func (Keeper) GetParams

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

GetParams returns the total set of oracle parameters.

func (Keeper) GetPrices

func (keeper Keeper) GetPrices(ctx sdk.Context, symbol string) types.Prices

func (Keeper) GetReporter

func (keeper Keeper) GetReporter(ctx sdk.Context, key string) types.Reporter

func (Keeper) GetReporterCount

func (keeper Keeper) GetReporterCount(ctx sdk.Context) int64

GetReporterCount get the total number of reporter

func (Keeper) GetReporterCreator

func (keeper Keeper) GetReporterCreator(ctx sdk.Context, key string) string

func (Keeper) GetRequest

func (keeper Keeper) GetRequest(ctx sdk.Context, key string) types.Request

func (Keeper) GetRequestCount

func (keeper Keeper) GetRequestCount(ctx sdk.Context) int64

GetRequestCount get the total number of request

func (Keeper) GetRequestRequester

func (keeper Keeper) GetRequestRequester(ctx sdk.Context, key string) string

func (Keeper) HasOracleScript

func (keeper Keeper) HasOracleScript(ctx sdk.Context, key string) bool

func (Keeper) HasReporter

func (keeper Keeper) HasReporter(ctx sdk.Context, key string) bool

func (Keeper) HasRequest

func (keeper Keeper) HasRequest(ctx sdk.Context, key string) bool

func (Keeper) IsValidReport

func (keeper Keeper) IsValidReport(ctx sdk.Context, request types.Request, report *types.Report) error

IsValidReport returns error if a report is not valid

func (Keeper) Logger

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

func (Keeper) QueryOracleScript

func (keeper Keeper) QueryOracleScript(context context.Context, request *types.QueryGetOracleScriptRequest) (*types.QueryGetOracleScriptResponse, error)

func (Keeper) QueryOracleScriptCount

func (keeper Keeper) QueryOracleScriptCount(context context.Context, request *types.QueryGetOracleScriptCountRequest) (*types.QueryGetOracleScriptCountResponse, error)

func (Keeper) QueryOracleScripts

func (keeper Keeper) QueryOracleScripts(context context.Context, request *types.QueryAllOracleScriptsRequest) (*types.QueryAllOracleScriptsResponse, error)

func (Keeper) QueryParams

func (keeper Keeper) QueryParams(context context.Context, request *types.QueryGetParamsRequest) (*types.QueryGetParamsReponse, error)

func (Keeper) QueryReporter

func (keeper Keeper) QueryReporter(context context.Context, request *types.QueryGetReporterRequest) (*types.QueryGetReporterResponse, error)

func (Keeper) QueryReporterCount

func (keeper Keeper) QueryReporterCount(context context.Context, request *types.QueryGetReporterCountRequest) (*types.QueryGetReporterCountResponse, error)

func (Keeper) QueryReporters

func (keeper Keeper) QueryReporters(context context.Context, request *types.QueryAllReportersRequest) (*types.QueryAllReportersResponse, error)

func (Keeper) ReportToRequest

func (keeper Keeper) ReportToRequest(ctx sdk.Context, msg types.MsgCreateReport) error

report to request

func (Keeper) SetOracleScriptCount

func (keeper Keeper) SetOracleScriptCount(ctx sdk.Context, count int64)

SetOracleScriptCount set the total number of repoter

func (Keeper) SetParams

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

SetParams sets the oracle parameters to the param space.

func (Keeper) SetPrices

func (keeper Keeper) SetPrices(ctx sdk.Context, calldata, result string, resolve_time int64) error

func (Keeper) SetReporterCount

func (keeper Keeper) SetReporterCount(ctx sdk.Context, count int64)

SetReporterCount set the total number of repoter

func (Keeper) SetRequest

func (keeper Keeper) SetRequest(ctx sdk.Context, request types.Request)

SetRequest sets a request in KVStore

func (Keeper) SetRequestCount

func (keeper Keeper) SetRequestCount(ctx sdk.Context, count int64)

SetRequestCount set the total number of request

Jump to

Keyboard shortcuts

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