keeper

package
v1.6.5 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl added in v1.5.0

func NewMsgServerImpl(keeper Keeper) types.MsgServer

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

func NewQueryServerImpl added in v1.5.0

func NewQueryServerImpl(keeper Keeper) types.QueryServer

NewQueryServerImpl returns an implementation of the QueryServer interface for the provided Keeper.

Types

type Keeper

type Keeper struct {
	AuthKeeper    authkeeper.AccountKeeper
	BankKeeper    bankkeeper.Keeper
	StakingKeeper *stakingkeeper.Keeper
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(cdc codec.BinaryCodec, storeKey, memKey storetypes.StoreKey, auth authkeeper.AccountKeeper, bank bankkeeper.Keeper, sk *stakingkeeper.Keeper) *Keeper

NewKeeper Create a new keeper instance and return the pointer

func (Keeper) BeamsIterator

func (k Keeper) BeamsIterator(ctx sdk.Context) sdk.Iterator

BeamsIterator Return a ready to use iterator for the whole beams queue

func (Keeper) ClaimBeam

func (k Keeper) ClaimBeam(goCtx context.Context, msg *types.MsgClaimBeam) (*types.MsgClaimBeamResponse, error)

ClaimBeam Final user endpoint to claim and acquire the money

func (Keeper) ClosedBeamsQueueIterator

func (k Keeper) ClosedBeamsQueueIterator(ctx sdk.Context) sdk.Iterator

ClosedBeamsQueueIterator Return a ready to use iterator for the closed only beams queue

func (Keeper) CreateBeamModuleAccount added in v1.0.3

func (k Keeper) CreateBeamModuleAccount(ctx sdk.Context, amount sdk.Coin)

CreateBeamModuleAccount create the module account

func (Keeper) DeleteBeam added in v1.6.2

func (k Keeper) DeleteBeam(ctx sdk.Context, key string) error

DeleteBeam Delete a beam by its ID and return error in case of non-existent entity

func (Keeper) GetBeam

func (k Keeper) GetBeam(ctx sdk.Context, key string) (types.Beam, error)

GetBeam Return a beam instance for the given key

func (Keeper) GetBeamAccount

func (k Keeper) GetBeamAccount(ctx sdk.Context) sdk.AccAddress

GetBeamAccount Return the beam module account interface

func (Keeper) GetBeamAccountBalance added in v1.0.3

func (k Keeper) GetBeamAccountBalance(ctx sdk.Context) sdk.Coin

GetBeamAccountBalance gets the airdrop coin balance of module account

func (Keeper) GetBeamIDsFromBlockQueue added in v1.1.0

func (k Keeper) GetBeamIDsFromBlockQueue(ctx sdk.Context, height int) []string

GetBeamIDsFromBlockQueue Return a slice of beam IDs for a given height

func (Keeper) HasBeam

func (k Keeper) HasBeam(ctx sdk.Context, beamID string) bool

HasBeam Check if a beam instance exists or not (by its key)

func (Keeper) InsertClosedBeamQueue

func (k Keeper) InsertClosedBeamQueue(ctx sdk.Context, beamID string)

InsertClosedBeamQueue Insert a beam ID inside the closed beam queue

func (Keeper) InsertOpenBeamByBlockQueue added in v1.1.0

func (k Keeper) InsertOpenBeamByBlockQueue(ctx sdk.Context, height int, beamID string)

InsertOpenBeamByBlockQueue Insert a beam ID inside the by-block store entry

func (Keeper) InsertOpenBeamQueue

func (k Keeper) InsertOpenBeamQueue(ctx sdk.Context, beamID string)

InsertOpenBeamQueue Insert a beam ID inside the active beam queue

func (Keeper) IterateBeams

func (k Keeper) IterateBeams(ctx sdk.Context, cb func(beam types.Beam) (stop bool))

IterateBeams Iterate over the whole beam queue

func (Keeper) IterateClosedBeamsQueue

func (k Keeper) IterateClosedBeamsQueue(ctx sdk.Context, cb func(beam types.Beam) (stop bool))

IterateClosedBeamsQueue Iterate over the closed only beams queue

func (Keeper) IterateOpenBeamsByBlockQueue added in v1.1.0

func (k Keeper) IterateOpenBeamsByBlockQueue(ctx sdk.Context, cb func(beam types.Beam) (stop bool))

IterateOpenBeamsByBlockQueue Iterate over the open by block beams queue

func (Keeper) IterateOpenBeamsQueue

func (k Keeper) IterateOpenBeamsQueue(ctx sdk.Context, cb func(beam types.Beam) (stop bool))

IterateOpenBeamsQueue Iterate over the open only beams queue

func (Keeper) ListBeams

func (k Keeper) ListBeams(ctx sdk.Context) (beams []*types.Beam)

ListBeams Return a list of in store beams

func (Keeper) ListBeamsFromClosedQueue added in v1.1.2

func (k Keeper) ListBeamsFromClosedQueue(ctx sdk.Context) (beams []*types.Beam)

ListBeamsFromClosedQueue Return a list of in store queue beams

func (Keeper) ListBeamsFromOldOpenQueue added in v1.1.2

func (k Keeper) ListBeamsFromOldOpenQueue(ctx sdk.Context) (beams []*types.Beam)

ListBeamsFromOldOpenQueue Return a list of in store queue beams

func (Keeper) ListBeamsFromOpenQueue added in v1.1.2

func (k Keeper) ListBeamsFromOpenQueue(ctx sdk.Context) (beams []*types.Beam)

func (Keeper) Logger

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

Logger Return a keeper logger instance

func (Keeper) OpenBeam

func (k Keeper) OpenBeam(goCtx context.Context, msg *types.MsgOpenBeam) (*types.MsgOpenBeamResponse, error)

OpenBeam Create a new beam instance

func (Keeper) OpenBeamsByBlockQueueIterator added in v1.1.0

func (k Keeper) OpenBeamsByBlockQueueIterator(ctx sdk.Context) sdk.Iterator

OpenBeamsByBlockQueueIterator Return a ready to use iterator for the open by block only beams queue

func (Keeper) OpenBeamsQueueIterator

func (k Keeper) OpenBeamsQueueIterator(ctx sdk.Context) sdk.Iterator

OpenBeamsQueueIterator Return a ready to use iterator for the open only beams queue

func (Keeper) RemoveFromClosedBeamQueue

func (k Keeper) RemoveFromClosedBeamQueue(ctx sdk.Context, beamID string)

RemoveFromClosedBeamQueue Remove a beam ID from the closed beam queue

func (Keeper) RemoveFromOpenBeamByBlockQueue added in v1.1.0

func (k Keeper) RemoveFromOpenBeamByBlockQueue(ctx sdk.Context, height int, beamID string)

RemoveFromOpenBeamByBlockQueue Remove a beam ID from the active beam queue by its height

func (Keeper) RemoveFromOpenBeamQueue

func (k Keeper) RemoveFromOpenBeamQueue(ctx sdk.Context, beamID string)

RemoveFromOpenBeamQueue Remove a beam ID from the active beam queue

func (Keeper) SetBeam

func (k Keeper) SetBeam(ctx sdk.Context, beamID string, beam *types.Beam)

SetBeam Replace the beam at the specified "id" position

func (Keeper) UpdateBeam

func (k Keeper) UpdateBeam(goCtx context.Context, msg *types.MsgUpdateBeam) (*types.MsgUpdateBeamResponse, error)

UpdateBeam Update a beam instance and proceeds any require state machine update

func (Keeper) UpdateBeamStatus

func (k Keeper) UpdateBeamStatus(ctx sdk.Context, beamID string, newStatus types.BeamState) error

UpdateBeamStatus This process a beam close request, but its also pass over checks. You should not use this directly but rather prefer the UpdateBeam method.

Jump to

Keyboard shortcuts

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