keeper

package
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllInvariants

func AllInvariants(k Keeper) sdk.Invariant

AllInvariants runs all invariants of the x/streamer module.

func DemandOrderCountInvariant

func DemandOrderCountInvariant(k Keeper) sdk.Invariant

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

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

func RegisterInvariants

func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)

RegisterInvariants registers the bank module invariants

func UnderlyingPacketExistInvariant

func UnderlyingPacketExistInvariant(k Keeper) sdk.Invariant

Types

type Keeper

type Keeper struct {
	types.AccountKeeper
	types.BankKeeper
	types.DelayedAckKeeper
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey storetypes.StoreKey,
	ps paramtypes.Subspace,
	accountKeeper types.AccountKeeper,
	bankKeeper types.BankKeeper,
	delayedAckKeeper types.DelayedAckKeeper,
) *Keeper

func (Keeper) EpochIdentifier

func (k Keeper) EpochIdentifier(ctx sdk.Context) (res string)

func (Keeper) ErrAckFee

func (k Keeper) ErrAckFee(ctx sdk.Context) (res sdk.Dec)

func (Keeper) FulfillOrder

func (k Keeper) FulfillOrder(ctx sdk.Context, order *types.DemandOrder, fulfillerAddress sdk.AccAddress) error

FulfillOrder should be called only at most once per order.

func (Keeper) GetDelayedAckHooks

func (k Keeper) GetDelayedAckHooks() delayeacktypes.DelayedAckHooks

func (Keeper) GetDemandOrder

func (k Keeper) GetDemandOrder(ctx sdk.Context, status commontypes.Status, id string) (*types.DemandOrder, error)

GetDemandOrder returns the demand order with the given id and status.

func (*Keeper) GetHooks

func (k *Keeper) GetHooks() types.EIBCHooks

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) ListAllDemandOrders

func (k Keeper) ListAllDemandOrders(
	ctx sdk.Context,
) (list []*types.DemandOrder, err error)

ListAllDemandOrders returns all demand orders.

func (Keeper) ListDemandOrdersByStatus

func (k Keeper) ListDemandOrdersByStatus(ctx sdk.Context, status commontypes.Status) (list []*types.DemandOrder, err error)

func (Keeper) Logger

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

func (*Keeper) SetDelayedAckKeeper

func (k *Keeper) SetDelayedAckKeeper(delayedAckKeeper types.DelayedAckKeeper)

SetDelayedAckKeeper sets the delayedack keeper. must be called when initializing the keeper.

func (Keeper) SetDemandOrder

func (k Keeper) SetDemandOrder(ctx sdk.Context, order *types.DemandOrder) error

func (*Keeper) SetHooks

func (k *Keeper) SetHooks(hooks types.EIBCHooks)

func (Keeper) SetParams

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

SetParams set the params

func (Keeper) TimeoutFee

func (k Keeper) TimeoutFee(ctx sdk.Context) (res sdk.Dec)

func (*Keeper) UpdateDemandOrderWithStatus

func (k *Keeper) UpdateDemandOrderWithStatus(ctx sdk.Context, demandOrder *types.DemandOrder, newStatus commontypes.Status) (*types.DemandOrder, error)

UpdateDemandOrderWithStatus deletes the current demand order and creates a new one with and updated packet status under a new key. Updating the status should be called only with this method as it effects the key of the packet. The assumption is that the passed demand order packet status field is not updated directly.

type Querier

type Querier struct {
	Keeper
}

func NewQuerier

func NewQuerier(k Keeper) Querier

NewQuerier creates a new Querier struct.

func (Querier) Params

Jump to

Keyboard shortcuts

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