keeper

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: Apache-2.0 Imports: 15 Imported by: 3

Documentation

Index

Constants

View Source
const FailuresQueryMaxLimit uint64 = query.DefaultLimit

Variables

This section is empty.

Functions

This section is empty.

Types

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey storetypes.StoreKey,
	ps paramtypes.Subspace,
	wasmKeeper types.WasmKeeper,
) *Keeper

func (Keeper) AddContractFailure

func (k Keeper) AddContractFailure(ctx sdk.Context, channelID string, address string, ackID uint64, ackType string)

AddContractFailure adds a specific failure to the store using address as the key

func (Keeper) AddressFailures

func (Keeper) GetAllFailures

func (k Keeper) GetAllFailures(ctx sdk.Context) (list []types.Failure)

GetAllFailure returns all failures

func (Keeper) GetNextFailureIDKey

func (k Keeper) GetNextFailureIDKey(ctx sdk.Context, address string) uint64

func (Keeper) GetParams

func (k Keeper) GetParams(_ sdk.Context) types.Params

GetParams get all parameters as types.Params

func (Keeper) HasContractInfo

func (k Keeper) HasContractInfo(ctx sdk.Context, contractAddress sdk.AccAddress) bool

func (Keeper) Logger

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

func (Keeper) Params

func (Keeper) SetParams

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

SetParams set the params

func (Keeper) SudoError

func (k Keeper) SudoError(
	ctx sdk.Context,
	senderAddress sdk.AccAddress,
	request channeltypes.Packet,
	details string,
) ([]byte, error)

func (Keeper) SudoKVQueryResult

func (k Keeper) SudoKVQueryResult(
	ctx sdk.Context,
	contractAddress sdk.AccAddress,
	queryID uint64,
) ([]byte, error)

SudoKVQueryResult is used to pass a kv query id to the contract that registered the query when a query result is provided by the relayer.

func (Keeper) SudoOnChanOpenAck

func (k Keeper) SudoOnChanOpenAck(
	ctx sdk.Context,
	contractAddress sdk.AccAddress,
	details types.OpenAckDetails,
) ([]byte, error)

func (Keeper) SudoResponse

func (k Keeper) SudoResponse(
	ctx sdk.Context,
	senderAddress sdk.AccAddress,
	request channeltypes.Packet,
	msg []byte,
) ([]byte, error)

func (Keeper) SudoTimeout

func (k Keeper) SudoTimeout(
	ctx sdk.Context,
	senderAddress sdk.AccAddress,
	request channeltypes.Packet,
) ([]byte, error)

func (Keeper) SudoTxQueryResult

func (k Keeper) SudoTxQueryResult(
	ctx sdk.Context,
	contractAddress sdk.AccAddress,
	queryID uint64,
	height ibcclienttypes.Height,
	data []byte,
) ([]byte, error)

SudoTxQueryResult is used to pass a tx query result to the contract that registered the query to:

  1. check whether the transaction actually satisfies the initial query arguments;
  2. execute business logic related to the tx query result / save the result to state.

Jump to

Keyboard shortcuts

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