keeper

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper *Keeper) types.MsgServer

func RegisterInvariants

func RegisterInvariants(registry sdk.InvariantRegistry, keeper Keeper, bankKeeper types.BankKeeper)

Types

type Hooks

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

func (Hooks) AfterProposalDeposit

func (h Hooks) AfterProposalDeposit(ctx sdk.Context, proposalID uint64, depositorAddr sdk.AccAddress)

func (Hooks) AfterProposalFailedMinDeposit

func (h Hooks) AfterProposalFailedMinDeposit(ctx sdk.Context, proposalID uint64)

func (Hooks) AfterProposalSubmission

func (h Hooks) AfterProposalSubmission(ctx sdk.Context, proposalID uint64)

func (Hooks) AfterProposalVote

func (h Hooks) AfterProposalVote(ctx sdk.Context, proposalID uint64, voterAddr sdk.AccAddress)

AfterProposalVote is executed from the gov module when a user votes on a proposal

func (Hooks) AfterProposalVotingPeriodEnded

func (h Hooks) AfterProposalVotingPeriodEnded(ctx sdk.Context, proposalID uint64)

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	key sdk.StoreKey,
	bankKeeper types.BankKeeper,
) Keeper

func (Keeper) CalcClaimableAmount

func (k Keeper) CalcClaimableAmount(ctx sdk.Context, userAddr sdk.AccAddress) (claimable sdk.Int, claimed sdk.Int, claimedCnt int32)

func (Keeper) DeleteAirdropInfo

func (k Keeper) DeleteAirdropInfo(ctx sdk.Context)

DeleteAirdropInfo delete airdrop info

func (Keeper) ExportGenesis

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

func (Keeper) GetAirdropInfo

func (k Keeper) GetAirdropInfo(ctx sdk.Context) *types.AirdropInfo

GetAirdropInfo returns airdrop info

func (Keeper) GetUserState

func (k Keeper) GetUserState(ctx sdk.Context, user sdk.AccAddress) (*types.UserState, error)

GetUserState returns airdrop state for the user

func (Keeper) Hooks

func (k Keeper) Hooks() Hooks

func (Keeper) InitGenesis

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

func (Keeper) IsEligible

func (k Keeper) IsEligible(ctx sdk.Context, userAddr sdk.AccAddress) bool

IsEligible checks if the user is eligible for airdrop

func (Keeper) Logger

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

func (Keeper) PostClaimedSnAsset

func (k Keeper) PostClaimedSnAsset(ctx sdk.Context, userAddr sdk.AccAddress)

PostClaimedSnAsset is executed from the GAL module when a user claims an asset

func (Keeper) PostProposalVote

func (k Keeper) PostProposalVote(ctx sdk.Context, proposalID uint64, voterAddr sdk.AccAddress)

PostProposalVote is executed from the gov module when a user votes on a proposal

func (Keeper) SetAirdropInfo

func (k Keeper) SetAirdropInfo(ctx sdk.Context, info *types.AirdropInfo)

SetAirdropInfo sets airdrop info.

func (Keeper) SetUserState

func (k Keeper) SetUserState(ctx sdk.Context, user sdk.AccAddress, state *types.UserState) error

SetUserState sets airdrop state for the user

func (Keeper) ValidClaimableDate

func (k Keeper) ValidClaimableDate(ctx sdk.Context) bool

ValidClaimableDate returns true if the current time is in airdrop period

func (Keeper) ValidQuestDate

func (k Keeper) ValidQuestDate(ctx sdk.Context) bool

ValidQuestDate returns true if the current time is valid for the user to perform quests

type Querier

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

func NewQuerier

func NewQuerier(k Keeper) Querier

func (Querier) AirdropInfo

AirdropInfo returns the airdrop info

func (Querier) QuestState

QuestState returns state of the quest for the given user

Jump to

Keyboard shortcuts

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