Documentation ¶
Index ¶
- Variables
- func NewMsgServerImpl(keeper *Keeper) types.MsgServer
- func RegisterInvariants(registry sdk.InvariantRegistry, keeper Keeper, bankKeeper types.BankKeeper)
- type Hooks
- func (h Hooks) AfterProposalDeposit(ctx sdk.Context, proposalID uint64, depositorAddr sdk.AccAddress)
- func (h Hooks) AfterProposalFailedMinDeposit(ctx sdk.Context, proposalID uint64)
- func (h Hooks) AfterProposalSubmission(ctx sdk.Context, proposalID uint64)
- func (h Hooks) AfterProposalVote(ctx sdk.Context, proposalID uint64, voterAddr sdk.AccAddress)
- func (h Hooks) AfterProposalVotingPeriodEnded(ctx sdk.Context, proposalID uint64)
- type Keeper
- func (k Keeper) CalcClaimableAmount(ctx sdk.Context, userAddr sdk.AccAddress) (claimable sdk.Int, claimed sdk.Int, claimedCnt int32)
- func (k Keeper) DeleteAirdropInfo(ctx sdk.Context)
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) GetAirdropInfo(ctx sdk.Context) *types.AirdropInfo
- func (k Keeper) GetUserState(ctx sdk.Context, user sdk.AccAddress) (*types.UserState, error)
- func (k Keeper) Hooks() Hooks
- func (k Keeper) InitGenesis(ctx sdk.Context, genState *types.GenesisState)
- func (k Keeper) IsEligible(ctx sdk.Context, userAddr sdk.AccAddress) bool
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) PostClaimedSnAsset(ctx sdk.Context, userAddr sdk.AccAddress)
- func (k Keeper) PostProposalVote(ctx sdk.Context, proposalID uint64, voterAddr sdk.AccAddress)
- func (k Keeper) SetAirdropInfo(ctx sdk.Context, info *types.AirdropInfo)
- func (k Keeper) SetUserState(ctx sdk.Context, user sdk.AccAddress, state *types.UserState) error
- func (k Keeper) ValidClaimableDate(ctx sdk.Context) bool
- func (k Keeper) ValidQuestDate(ctx sdk.Context) bool
- type Querier
- func (q Querier) AirdropInfo(goCtx context.Context, _ *types.QueryAirdropInfoRequest) (*types.QueryAirdropInfoResponse, error)
- func (q Querier) QuestState(goCtx context.Context, request *types.QueryQuestStateRequest) (*types.QueryQuestStateResponse, error)
- func (q Querier) TotalAllocatedAirdropToken(goCtx context.Context, request *types.QueryTotalAllocatedAirdropTokenRequest) (*types.QueryTotalAllocatedAirdropTokenResponse, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( QuestStateNotStarted = int32(types.QuestStateType_QUEST_STATE_NOT_STARTED) QuestStateClaimable = int32(types.QuestStateType_QUEST_STATE_CLAIMABLE) QuestStateClaimed = int32(types.QuestStateType_QUEST_STATE_CLAIMED) QuestTypeNothingToDo = int32(types.QuestType_QUEST_NOTHING_TO_DO) QuestTypeSocial = int32(types.QuestType_QUEST_SOCIAL) QuestTypeSnAssetClaim = int32(types.QuestType_QUEST_SN_ASSET_CLAIM) QuestTypeProvideLiquidity = int32(types.QuestType_QUEST_PROVIDE_LIQUIDITY) QuestTypeVoteOnProposals = int32(types.QuestType_QUEST_VOTE_ON_PROPOSALS) )
Functions ¶
func NewMsgServerImpl ¶
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 (Hooks) AfterProposalFailedMinDeposit ¶
func (Hooks) AfterProposalSubmission ¶
func (Hooks) AfterProposalVote ¶
AfterProposalVote is executed from the gov module when a user votes on a proposal
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 (Keeper) DeleteAirdropInfo ¶
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 ¶
GetUserState returns airdrop state for the user
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, genState *types.GenesisState)
func (Keeper) IsEligible ¶
IsEligible checks if the user is eligible for airdrop
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 ¶
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 ¶
SetUserState sets airdrop state for the user
func (Keeper) ValidClaimableDate ¶
ValidClaimableDate returns true if the current time is in airdrop period
type Querier ¶
type Querier struct {
// contains filtered or unexported fields
}
func NewQuerier ¶
func (Querier) AirdropInfo ¶
func (q Querier) AirdropInfo(goCtx context.Context, _ *types.QueryAirdropInfoRequest) (*types.QueryAirdropInfoResponse, error)
AirdropInfo returns the airdrop info
func (Querier) QuestState ¶
func (q Querier) QuestState(goCtx context.Context, request *types.QueryQuestStateRequest) (*types.QueryQuestStateResponse, error)
QuestState returns state of the quest for the given user
func (Querier) TotalAllocatedAirdropToken ¶
func (q Querier) TotalAllocatedAirdropToken(goCtx context.Context, request *types.QueryTotalAllocatedAirdropTokenRequest) (*types.QueryTotalAllocatedAirdropTokenResponse, error)
Click to show internal directories.
Click to hide internal directories.