keeper

package
v0.2.0-dev.3 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyFilter added in v0.1.4

func ApplyFilter(input []byte, reveals []types.RevealBody) ([]int, bool, error)

ApplyFilter processes filter of the type specified in the first byte of consensus filter. It returns an outlier list, which is a boolean list where true at index i means that the reveal at index i is an outlier, consensus boolean, and error.

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

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

func NewQuerierImpl

func NewQuerierImpl(keeper Keeper) types.QueryServer

Types

type EventStoreDataRequestWasmWrapper

type EventStoreDataRequestWasmWrapper struct {
	*types.EventStoreDataRequestWasm
}

func (EventStoreDataRequestWasmWrapper) MarshalJSON

func (e EventStoreDataRequestWasmWrapper) MarshalJSON() ([]byte, error)

MarshalJSON customizes the JSON encoding of the type that implements it

type EventStoreOverlayWasmWrapper

type EventStoreOverlayWasmWrapper struct {
	*types.EventStoreOverlayWasm
}

func (EventStoreOverlayWasmWrapper) MarshalJSON

func (e EventStoreOverlayWasmWrapper) MarshalJSON() ([]byte, error)

type Keeper

type Keeper struct {
	Schema               collections.Schema
	DataRequestWasm      collections.Map[[]byte, types.Wasm]
	OverlayWasm          collections.Map[[]byte, types.Wasm]
	WasmExpiration       collections.KeySet[collections.Pair[int64, []byte]]
	CoreContractRegistry collections.Item[string]
	Params               collections.Item[types.Params]
	// contains filtered or unexported fields
}

func (Keeper) EndBlock added in v0.1.4

func (k Keeper) EndBlock(ctx sdk.Context) (err error)

func (Keeper) FilterAndTally

func (k Keeper) FilterAndTally(ctx sdk.Context, req types.Request) (tallyvm.VmResult, bool, error)

FilterAndTally applies filter and executes tally. It returns the tally VM result, consensus boolean, and error if applicable.

func (Keeper) GetAllWasms

func (k Keeper) GetAllWasms(ctx sdk.Context) []types.Wasm

func (Keeper) GetAuthority added in v0.0.6

func (k Keeper) GetAuthority() string

GetAuthority returns the module's authority.

func (Keeper) GetExpiredWasmKeys added in v0.1.4

func (k Keeper) GetExpiredWasmKeys(ctx sdk.Context, expirationHeight int64) ([][]byte, error)

GetExpiredWasmKeys retrieves the keys of the data request wasms that will expire at the given block height.

func (Keeper) IterateAllDataRequestWasms

func (k Keeper) IterateAllDataRequestWasms(ctx sdk.Context, callback func(wasm types.Wasm) (stop bool)) error

IterateAllDataRequestWasms iterates over the all the stored Data Request Wasms and performs a given callback function.

func (Keeper) IterateAllOverlayWasms

func (k Keeper) IterateAllOverlayWasms(ctx sdk.Context, callback func(wasm types.Wasm) (stop bool)) error

IterateAllOverlayWasms iterates over the all the stored Overlay Wasms and performs a given callback function.

func (Keeper) ListDataRequestWasms

func (k Keeper) ListDataRequestWasms(ctx sdk.Context) []string

ListDataRequestWasms returns hashes and types of all Data Request Wasms in the store.

func (Keeper) ListOverlayWasms

func (k Keeper) ListOverlayWasms(ctx sdk.Context) []string

ListOverlayWasms returns hashes and types of all Overlay Wasms in the store.

func (Keeper) Logger

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

func (Keeper) ProcessExpiredWasms added in v0.1.4

func (k Keeper) ProcessExpiredWasms(ctx sdk.Context) error

func (Keeper) ProcessTallies

func (k Keeper) ProcessTallies(ctx sdk.Context) error

ProcessTallies fetches from the core contract the list of requests to be tallied and then goes through it to filter and tally.

Directories

Path Synopsis
Package testutil is a generated GoMock package.
Package testutil is a generated GoMock package.

Jump to

Keyboard shortcuts

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