keeper

package
v5.0.0-rc7 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: Apache-2.0 Imports: 13 Imported by: 3

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 (Keeper) Claim

func (k Keeper) Claim(ctx sdk.Context, msg *types.MsgClaim) (types.ClaimRecord, error)

func (Keeper) DeleteAirdrop

func (k Keeper) DeleteAirdrop(ctx sdk.Context, airdropId uint64)

func (Keeper) DeleteClaimRecord

func (k Keeper) DeleteClaimRecord(ctx sdk.Context, record types.ClaimRecord)

func (Keeper) ExportGenesis

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

ExportGenesis returns the module's exported genesis.

func (Keeper) GetAirdrop

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

GetAirdrop returns the airdrop object from the airdrop id.

func (Keeper) GetAllAirdrops

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

GetAllAirdrops returns all types.Airdrop stored.

func (Keeper) GetAllClaimRecordsByAirdropId

func (k Keeper) GetAllClaimRecordsByAirdropId(ctx sdk.Context, airdropId uint64) (records []types.ClaimRecord)

GetAllClaimRecordsByAirdropId returns all types.ClaimRecord stored.

func (Keeper) GetClaimRecordByRecipient

func (k Keeper) GetClaimRecordByRecipient(ctx sdk.Context, airdropId uint64, recipient sdk.AccAddress) (record types.ClaimRecord, found bool)

GetClaimRecordByRecipient returns the claim record for the given airdrop id and the recipient address.

func (Keeper) InitGenesis

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

InitGenesis initializes the module's state from a provided genesis state.

func (Keeper) IterateAllAirdrops

func (k Keeper) IterateAllAirdrops(ctx sdk.Context, cb func(airdrop types.Airdrop) (stop bool))

func (Keeper) IterateAllClaimRecordsByAirdropId

func (k Keeper) IterateAllClaimRecordsByAirdropId(ctx sdk.Context, airdropId uint64, cb func(record types.ClaimRecord) (stop bool))

IterateAllClaimRecordsByAirdropId iterates over all types.ClaimRecord stored.

func (Keeper) Logger

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

func (Keeper) SetAirdrop

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

SetAirdrop sets start and end times and stores the airdrop.

func (Keeper) SetClaimRecord

func (k Keeper) SetClaimRecord(ctx sdk.Context, record types.ClaimRecord)

SetClaimRecord stores a types.ClaimRecord.

func (Keeper) TerminateAirdrop

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

TerminateAirdrop terminates the airdrop and transfer the remaining coins to the community pool.

func (Keeper) ValidateCondition

func (k Keeper) ValidateCondition(ctx sdk.Context, recipient sdk.AccAddress, ct types.ConditionType) error

ValidateCondition validates if the recipient has executed the condition.

type Querier

type Querier struct {
	Keeper
}

Querier is used as Keeper will have duplicate methods if used directly, and gRPC names take precedence over keeper.

func (Querier) Airdrop

Airdrop queries the specific airdrop.

func (Querier) Airdrops

Airdrops queries all the existing airdrops.

func (Querier) ClaimRecord

ClaimRecord queries the specific claim record.

Jump to

Keyboard shortcuts

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