keeper

package
v0.3.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CoordinatorAddrNotFoundInvariant added in v0.2.0

func CoordinatorAddrNotFoundInvariant(k Keeper) sdk.Invariant

CoordinatorAddrNotFoundInvariant invariant that checks if the `CoordinateByAddress` is associated with a coordinator

func GetCoordinatorIDBytes

func GetCoordinatorIDBytes(id uint64) []byte

GetCoordinatorIDBytes returns the byte representation of the ID

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

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

func RegisterInvariants added in v0.2.0

func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)

RegisterInvariants registers all module invariants

Types

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey storetypes.StoreKey,
) *Keeper

func (Keeper) AppendCoordinator

func (k Keeper) AppendCoordinator(
	ctx sdk.Context,
	coordinator types.Coordinator,
) uint64

AppendCoordinator appends a coordinator in the store with a new id and update the counter

func (Keeper) CoordinatorIDFromAddress

func (k Keeper) CoordinatorIDFromAddress(ctx sdk.Context, address string) (id uint64, err error)

CoordinatorIDFromAddress returns the coordinator id associated to an address

func (Keeper) GetAllCoordinator

func (k Keeper) GetAllCoordinator(ctx sdk.Context) (list []types.Coordinator)

GetAllCoordinator returns all coordinator

func (Keeper) GetAllCoordinatorByAddress

func (k Keeper) GetAllCoordinatorByAddress(ctx sdk.Context) (list []types.CoordinatorByAddress)

GetAllCoordinatorByAddress returns all coordinatorByAddress

func (Keeper) GetAllValidator

func (k Keeper) GetAllValidator(ctx sdk.Context) (list []types.Validator)

GetAllValidator returns all validator

func (Keeper) GetAllValidatorByOperatorAddress added in v0.2.0

func (k Keeper) GetAllValidatorByOperatorAddress(ctx sdk.Context) (list []types.ValidatorByOperatorAddress)

GetAllValidatorByOperatorAddress returns all validatorByOperatorAddress

func (Keeper) GetCoordinator

func (k Keeper) GetCoordinator(ctx sdk.Context, id uint64) (val types.Coordinator, found bool)

GetCoordinator returns a coordinator from its id

func (Keeper) GetCoordinatorByAddress

func (k Keeper) GetCoordinatorByAddress(ctx sdk.Context, address string) (types.CoordinatorByAddress, error)

GetCoordinatorByAddress returns the CoordinatorByAddress associated to an address returns ErrCoordAddressNotFound if not found in the store if the corresponding Coordinator is not found or is inactive, returns ErrCritical

func (Keeper) GetCoordinatorCounter added in v0.2.0

func (k Keeper) GetCoordinatorCounter(ctx sdk.Context) uint64

GetCoordinatorCounter get the total number of Coordinators

func (Keeper) GetValidator

func (k Keeper) GetValidator(ctx sdk.Context, address string) (val types.Validator, found bool)

GetValidator returns a validator from its index

func (Keeper) GetValidatorByOperatorAddress added in v0.2.0

func (k Keeper) GetValidatorByOperatorAddress(
	ctx sdk.Context,
	operatorAddress string,
) (val types.ValidatorByOperatorAddress, found bool)

GetValidatorByOperatorAddress returns a validatorByOperatorAddress from its index

func (Keeper) Logger

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

func (Keeper) RemoveCoordinator

func (k Keeper) RemoveCoordinator(ctx sdk.Context, id uint64)

RemoveCoordinator removes a coordinator from the store

func (Keeper) RemoveCoordinatorByAddress

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

RemoveCoordinatorByAddress removes a coordinatorByAddress from the store

func (Keeper) RemoveValidatorByOperatorAddress added in v0.2.0

func (k Keeper) RemoveValidatorByOperatorAddress(ctx sdk.Context, operatorAddress string)

RemoveValidatorByOperatorAddress removes a validatorByOperatorAddress from the store

func (Keeper) SetCoordinator

func (k Keeper) SetCoordinator(ctx sdk.Context, coordinator types.Coordinator)

SetCoordinator set a specific coordinator in the store

func (Keeper) SetCoordinatorByAddress

func (k Keeper) SetCoordinatorByAddress(ctx sdk.Context, coordinatorByAddress types.CoordinatorByAddress)

SetCoordinatorByAddress set a specific coordinatorByAddress in the store from its index

func (Keeper) SetCoordinatorCounter added in v0.2.0

func (k Keeper) SetCoordinatorCounter(ctx sdk.Context, counter uint64)

SetCoordinatorCounter set the total number of coordinator

func (Keeper) SetValidator

func (k Keeper) SetValidator(ctx sdk.Context, validator types.Validator)

SetValidator set a specific validator in the store from its index

func (Keeper) SetValidatorByOperatorAddress added in v0.2.0

func (k Keeper) SetValidatorByOperatorAddress(ctx sdk.Context, validatorByOperatorAddress types.ValidatorByOperatorAddress)

SetValidatorByOperatorAddress set a specific validatorByOperatorAddress in the store from its index

Jump to

Keyboard shortcuts

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