keeper

package
v24.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

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

Types

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey storetypes.StoreKey,
	bankKeeper types.BankKeeper,
) Keeper

func (Keeper) Airdrop

Queries the configuration for a given airdrop

func (Keeper) AllAirdrops

Queries all airdrop configurations

func (Keeper) AllAllocations

Queries all allocations for a given airdrop

func (Keeper) ClaimDaily

func (k Keeper) ClaimDaily(ctx sdk.Context, airdropId, claimer string) error

User transaction to claim all the pending airdrop rewards up to the current day

func (Keeper) ClaimEarly

func (k Keeper) ClaimEarly(ctx sdk.Context, airdropId, claimer string) error

User transaction to claim a portion of their total amount now, and forfeit the remainder to be clawed back

func (Keeper) ExportGenesis

func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState

Export's module state into genesis file

func (Keeper) GetAirdrop

func (k Keeper) GetAirdrop(ctx sdk.Context, airdropId string) (airdrop types.Airdrop, found bool)

Retrieves an airdrop configuration from the store

func (Keeper) GetAllAirdrops

func (k Keeper) GetAllAirdrops(ctx sdk.Context) (airdrops []types.Airdrop)

Retrieves all airdrop configurations from the store

func (Keeper) GetAllUserAllocations

func (k Keeper) GetAllUserAllocations(ctx sdk.Context) (userAllocations []types.UserAllocation)

Retrieves all user allocations across all airdrops

func (Keeper) GetParams

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

Retrieves the module parameters

func (Keeper) GetUserAllocation

func (k Keeper) GetUserAllocation(ctx sdk.Context, airdropId, address string) (allocation types.UserAllocation, found bool)

Retrieves a user allocation record from the store

func (Keeper) GetUserAllocationsForAddress

func (k Keeper) GetUserAllocationsForAddress(ctx sdk.Context, address string) (userAllocations []types.UserAllocation)

Retreives all user allocations for a given address

func (Keeper) GetUserAllocationsForAirdrop

func (k Keeper) GetUserAllocationsForAirdrop(ctx sdk.Context, airdropId string) (userAllocations []types.UserAllocation)

Retrieves all the user allocations for a given airdrop

func (Keeper) InitGenesis

func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState)

Loads module state from genesis

func (Keeper) LinkAddresses

func (k Keeper) LinkAddresses(ctx sdk.Context, airdropId, strideAddress, hostAddress string) error

Admin transaction to merge allocations between a stride and non-stride address If the stride address does not yet have an allocation, the host allocation will be overwritten with the stride address Otherwise, if the stride allocation already exists, the two allocations will be merged and set in on the stride allocation There's no need to merge the Claimed or Forfeited amounts because the host allocations cannot be claimed through a non-stride address

func (Keeper) Logger

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

Logger returns a module-specific logger.

func (Keeper) RemoveAirdrop

func (k Keeper) RemoveAirdrop(ctx sdk.Context, airdropId string)

Removes an airdrop configuration from the store

func (Keeper) RemoveUserAllocation

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

Removes a user allocation record from the store

func (Keeper) SetAirdrop

func (k Keeper) SetAirdrop(ctx sdk.Context, airdrop types.Airdrop)

Writes an airdrop configuration to the store

func (Keeper) SetParams

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

Writes params to the store

func (Keeper) SetUserAllocation

func (k Keeper) SetUserAllocation(ctx sdk.Context, userAllocation types.UserAllocation)

Writes a user allocation record to the store

func (Keeper) UserAllocation

Queries the allocation for a given user for an airdrop

func (Keeper) UserAllocations

Queries the allocations for a given user across all airdrops

func (Keeper) UserSummary

Queries the state of an address for an airdrop (daily claim or claim early) and the amount claimed and remaining

Jump to

Keyboard shortcuts

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