Documentation ¶
Index ¶
- Constants
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) Dequeue(ctx sdk.Context)
- func (k Keeper) DetectBlockEvents(ctx sdk.Context)
- func (k Keeper) Enqueue(ctx sdk.Context, item types.QueuedTrigger)
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) GetAllGasLimits(ctx sdk.Context) (gasLimits []types.GasLimit, err error)
- func (k Keeper) GetAllQueueItems(ctx sdk.Context) (items []types.QueuedTrigger, err error)
- func (k Keeper) GetAllTriggers(ctx sdk.Context) (triggers []types.Trigger, err error)
- func (k Keeper) GetEventListener(ctx sdk.Context, eventName string, order uint64, ...) (trigger triggertypes.Trigger, err error)
- func (k Keeper) GetGasLimit(ctx sdk.Context, id types.TriggerID) (gasLimit uint64)
- func (k Keeper) GetTrigger(ctx sdk.Context, id types.TriggerID) (trigger types.Trigger, err error)
- func (k Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState)
- func (k Keeper) IterateEventListeners(ctx sdk.Context, eventName string, ...) error
- func (k Keeper) IterateGasLimits(ctx sdk.Context, handle func(gasLimit types.GasLimit) (stop bool, err error)) error
- func (k Keeper) IterateTriggers(ctx sdk.Context, handle func(trigger types.Trigger) (stop bool, err error)) error
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) NewTriggerWithID(ctx sdk.Context, owner string, event *codectypes.Any, ...) types.Trigger
- func (k Keeper) ProcessTriggers(ctx sdk.Context)
- func (k Keeper) QueueIsEmpty(ctx sdk.Context) bool
- func (k Keeper) QueuePeek(ctx sdk.Context) *types.QueuedTrigger
- func (k Keeper) QueueTrigger(ctx sdk.Context, trigger types.Trigger)
- func (k Keeper) RegisterTrigger(ctx sdk.Context, trigger triggertypes.Trigger)
- func (k Keeper) RemoveEventListener(ctx sdk.Context, trigger triggertypes.Trigger) bool
- func (k Keeper) RemoveGasLimit(ctx sdk.Context, id types.TriggerID) bool
- func (k Keeper) RemoveTrigger(ctx sdk.Context, id types.TriggerID) bool
- func (k Keeper) SetEventListener(ctx sdk.Context, trigger triggertypes.Trigger)
- func (k Keeper) SetGasLimit(ctx sdk.Context, id types.TriggerID, gasLimit uint64)
- func (k Keeper) SetTrigger(ctx sdk.Context, trigger types.Trigger)
- func (k Keeper) TriggerByID(ctx context.Context, req *types.QueryTriggerByIDRequest) (*types.QueryTriggerByIDResponse, error)
- func (k Keeper) Triggers(ctx context.Context, req *types.QueryTriggersRequest) (*types.QueryTriggersResponse, error)
- func (k Keeper) UnregisterTrigger(ctx sdk.Context, trigger triggertypes.Trigger)
Constants ¶
const ( SetGasLimitCost uint64 = 2510 MaximumTriggerGas uint64 = 2000000 )
const ( MaximumActions uint64 = 5 MaximumQueueGas uint64 = 2000000 )
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the account MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, key storetypes.StoreKey, router baseapp.IMsgServiceRouter, ) Keeper
func (Keeper) Dequeue ¶
DequeueTrigger Removes the first item from the queue and updates the internal counters.
func (Keeper) DetectBlockEvents ¶
DetectBlockEvents Detects triggers that have been activated by their corresponding events.
func (Keeper) Enqueue ¶
func (k Keeper) Enqueue(ctx sdk.Context, item types.QueuedTrigger)
Enqueue Adds an item to the end of the queue and adjusts the internal counters.
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns a GenesisState for a given context.
func (Keeper) GetAllGasLimits ¶
GetAllGasLimits Gets all the gas limits within the store.
func (Keeper) GetAllQueueItems ¶
GetAllQueueItems Gets all the queue items within the store.
func (Keeper) GetAllTriggers ¶
GetAllTriggers Gets all the triggers within the store.
func (Keeper) GetEventListener ¶
func (k Keeper) GetEventListener(ctx sdk.Context, eventName string, order uint64, triggerID triggertypes.TriggerID) (trigger triggertypes.Trigger, err error)
GetEventListener Gets the event listener from the store.
func (Keeper) GetGasLimit ¶
GetGasLimit Gets a gas limit by id
func (Keeper) GetTrigger ¶
GetTrigger Gets a trigger from the store by id.
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState)
InitGenesis new trigger genesis
func (Keeper) IterateEventListeners ¶
func (k Keeper) IterateEventListeners(ctx sdk.Context, eventName string, handle func(trigger triggertypes.Trigger) (stop bool, err error)) error
IterateEventListeners Iterates through all the event listeners.
func (Keeper) IterateGasLimits ¶
func (k Keeper) IterateGasLimits(ctx sdk.Context, handle func(gasLimit types.GasLimit) (stop bool, err error)) error
IterateGasLimits Iterates through all the gas limits.
func (Keeper) IterateTriggers ¶
func (k Keeper) IterateTriggers(ctx sdk.Context, handle func(trigger types.Trigger) (stop bool, err error)) error
IterateTriggers Iterates through all the triggers.
func (Keeper) NewTriggerWithID ¶
func (k Keeper) NewTriggerWithID(ctx sdk.Context, owner string, event *codectypes.Any, actions []*codectypes.Any) types.Trigger
NewTriggerWithID Creates a trigger with the latest ID.
func (Keeper) ProcessTriggers ¶
ProcessTriggers Reads triggers from queues and attempts to run them.
func (Keeper) QueueIsEmpty ¶
QueueIsEmpty Checks if the queue is empty.
func (Keeper) QueuePeek ¶
func (k Keeper) QueuePeek(ctx sdk.Context) *types.QueuedTrigger
QueuePeek Returns the next item to be dequeued.
func (Keeper) QueueTrigger ¶
QueueTrigger Creates a QueuedTrigger and Enqueues it
func (Keeper) RegisterTrigger ¶
func (k Keeper) RegisterTrigger(ctx sdk.Context, trigger triggertypes.Trigger)
RegisterTrigger Adds the trigger to the trigger, event listener, and gas store
func (Keeper) RemoveEventListener ¶
RemoveEventListener Removes the trigger from the event listener store.
func (Keeper) RemoveGasLimit ¶
RemoveGasLimit Removes a gas limit for a trigger
func (Keeper) RemoveTrigger ¶
RemoveTrigger Removes a trigger from the store.
func (Keeper) SetEventListener ¶
func (k Keeper) SetEventListener(ctx sdk.Context, trigger triggertypes.Trigger)
SetEventListener Adds the trigger to the event listener store.
func (Keeper) SetGasLimit ¶
SetGasLimit Sets a gas limit for a trigger
func (Keeper) SetTrigger ¶
SetTrigger Sets the trigger in the store.
func (Keeper) TriggerByID ¶
func (k Keeper) TriggerByID(ctx context.Context, req *types.QueryTriggerByIDRequest) (*types.QueryTriggerByIDResponse, error)
TriggerByID returns a trigger matching the ID.
func (Keeper) Triggers ¶
func (k Keeper) Triggers(ctx context.Context, req *types.QueryTriggersRequest) (*types.QueryTriggersResponse, error)
Triggers returns the list of triggers.
func (Keeper) UnregisterTrigger ¶
func (k Keeper) UnregisterTrigger(ctx sdk.Context, trigger triggertypes.Trigger)
UnregisterTrigger Removes the trigger from the trigger, and event listener