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: 18 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 module.

func MismatchUsedAllocationsInvariant

func MismatchUsedAllocationsInvariant(k Keeper) sdk.Invariant

MismatchUsedAllocationsInvariant invariant that checks if the number of used allocations in `UsedAllocations` is different from the sum of per-auction used allocations in `AuctionUsedAllocations`

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 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,
	ps paramtypes.Subspace,
	fundraisingKeeper types.FundraisingKeeper,
	stakingKeeper types.StakingKeeper,
) *Keeper

func (Keeper) AllocationPrice

func (k Keeper) AllocationPrice(ctx sdk.Context) (res types.AllocationPrice)

AllocationPrice returns the AllocationPrice param

func (Keeper) GetAllAuctionUsedAllocations

func (k Keeper) GetAllAuctionUsedAllocations(ctx sdk.Context) (list []types.AuctionUsedAllocations)

GetAllAuctionUsedAllocations returns all auctionUsedAllocations

func (Keeper) GetAllAuctionUsedAllocationsByAddress

func (k Keeper) GetAllAuctionUsedAllocationsByAddress(ctx sdk.Context, address string) (list []types.AuctionUsedAllocations)

func (Keeper) GetAllUsedAllocations

func (k Keeper) GetAllUsedAllocations(ctx sdk.Context) (list []types.UsedAllocations)

GetAllUsedAllocations returns all usedAllocations

func (Keeper) GetAuctionUsedAllocations

func (k Keeper) GetAuctionUsedAllocations(ctx sdk.Context, address string, auctionID uint64) (val types.AuctionUsedAllocations, found bool)

GetAuctionUsedAllocations returns a auctionUsedAllocations from its index

func (Keeper) GetAvailableAllocations

func (k Keeper) GetAvailableAllocations(ctx sdk.Context, address string) (sdkmath.Int, error)

GetAvailableAllocations returns the number of allocations that are unused

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) GetTotalAllocations

func (k Keeper) GetTotalAllocations(ctx sdk.Context, address string) (sdkmath.Int, error)

GetTotalAllocations returns the number of available allocations based on delegations

func (Keeper) GetUsedAllocations

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

GetUsedAllocations returns a usedAllocations from its index

func (Keeper) IsRegistrationEnabled added in v0.3.0

func (k Keeper) IsRegistrationEnabled(ctx sdk.Context, auctionStartTime time.Time) bool

IsRegistrationEnabled returns true if the current block time is within the allowed registration period

func (Keeper) Logger

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

func (Keeper) Params

func (Keeper) ParticipationTierList

func (k Keeper) ParticipationTierList(ctx sdk.Context) (res []types.Tier)

ParticipationTierList returns the ParticipationTierList param

func (Keeper) RegistrationPeriod

func (k Keeper) RegistrationPeriod(ctx sdk.Context) (res time.Duration)

RegistrationPeriod returns the RegistrationPeriod param

func (Keeper) SetAuctionUsedAllocations

func (k Keeper) SetAuctionUsedAllocations(ctx sdk.Context, auctionUsedAllocations types.AuctionUsedAllocations)

SetAuctionUsedAllocations set a specific auctionUsedAllocations in the store from its index

func (Keeper) SetParams

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

SetParams set the params

func (Keeper) SetUsedAllocations

func (k Keeper) SetUsedAllocations(ctx sdk.Context, usedAllocations types.UsedAllocations)

SetUsedAllocations set a specific usedAllocations in the store from its index

func (Keeper) WithdrawalDelay

func (k Keeper) WithdrawalDelay(ctx sdk.Context) (res time.Duration)

WithdrawalDelay returns the WithdrawalDelay param

Jump to

Keyboard shortcuts

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