keeper

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQuerier

func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier

NewQuerier Return a querier instance

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) BeamsOpenQueue added in v1.1.0

func (Keeper) ClaimBeam

func (k Keeper) ClaimBeam(ctx sdk.Context, msg types.MsgClaimBeam) 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) 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(ctx sdk.Context, msg types.MsgOpenBeam) 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(ctx sdk.Context, msg types.MsgUpdateBeam) 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