keeper

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContractHandler

func NewContractHandler(k Keeper, stateProvider StateProvider) *contractHandler

func NewQuerier

func NewQuerier(handler sdk.Handler, keeper Keeper, contractHandler cross.ContractHandler) sdk.Querier

NewQuerier is the module level router for state queries

Types

type Context

type Context interface {
	Signers() []sdk.AccAddress
	Args() [][]byte
	EventManager() *sdk.EventManager
}

func NewContext

func NewContext(signers []sdk.AccAddress, args [][]byte) Context

type Contract

type Contract interface {
	CallMethod(ctx Context, store cross.Store, method string) ([]byte, error)
}

func NewContract

func NewContract(methods []Method) Contract

type Keeper

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

func NewKeeper

func NewKeeper(cdc *codec.Codec, storeKey sdk.StoreKey) Keeper

func (Keeper) GetContractStateStore

func (k Keeper) GetContractStateStore(ctx sdk.Context, id []byte) sdk.KVStore

func (Keeper) MakeContractCallResponseData

func (k Keeper) MakeContractCallResponseData(rv []byte, ops cross.OPs) ([]byte, error)

type Method

type Method struct {
	Name string
	F    func(ctx Context, store cross.Store) ([]byte, error)
}

type StateProvider

type StateProvider = func(sdk.KVStore, cross.StateConstraintType) cross.State

Jump to

Keyboard shortcuts

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