keeper

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DataRequestPrefix defines prefix to store Data Request Wasm binaries.
	DataRequestPrefix = collections.NewPrefix(0)
	// OverlayPrefix defines prefix to store Overlay Wasm binaries.
	OverlayPrefix = collections.NewPrefix(1)
	// ProxyContractRegistryPrefix defines prefix to store address of
	// Proxy Contract.
	ProxyContractRegistryPrefix = collections.NewPrefix(2)
	// ParamsPrefix defines prefix to store parameters of wasm-storage module.
	ParamsPrefix = collections.NewPrefix(3)
)

Functions

func GetDataRequestWasmKeyPrefixFull added in v0.1.2

func GetDataRequestWasmKeyPrefixFull(hash []byte) []byte

func GetOverlayWasmKeyPrefixFull added in v0.1.2

func GetOverlayWasmKeyPrefixFull(hash []byte) []byte

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 {

	// state management
	Schema                collections.Schema
	DataRequestWasm       collections.Map[[]byte, types.Wasm]
	OverlayWasm           collections.Map[[]byte, types.Wasm]
	ProxyContractRegistry collections.Item[string]
	Params                collections.Item[types.Params]
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(cdc codec.BinaryCodec, storeService storetypes.KVStoreService, authority string, wk wasmtypes.ContractOpsKeeper) *Keeper

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) GetDataRequestWasm

func (k Keeper) GetDataRequestWasm(ctx sdk.Context, hash []byte) (*types.Wasm, error)

GetDataRequestWasm returns Data Request Wasm given its key.

func (Keeper) GetOverlayWasm

func (k Keeper) GetOverlayWasm(ctx sdk.Context, hash []byte) (*types.Wasm, error)

GetOverlayWasm returns Overlay Wasm given its key.

func (Keeper) HasDataRequestWasm

func (k Keeper) HasDataRequestWasm(ctx sdk.Context, wasm *types.Wasm) (bool, error)

HasDataRequestWasm checks if a given Data Request Wasm exists.

func (Keeper) HasOverlayWasm

func (k Keeper) HasOverlayWasm(ctx sdk.Context, wasm *types.Wasm) (bool, error)

HasOverlayWasm checks if a given Overlay Wasm exists.

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) SetDataRequestWasm

func (k Keeper) SetDataRequestWasm(ctx sdk.Context, wasm *types.Wasm) error

SetDataRequestWasm stores Data Request Wasm using its hash as the key.

func (Keeper) SetOverlayWasm

func (k Keeper) SetOverlayWasm(ctx sdk.Context, wasm *types.Wasm) error

SetOverlayWasm stores Overlay Wasm using its hash as the key.

Jump to

Keyboard shortcuts

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