Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) Claim(ctx sdk.Context, msg *types.MsgClaim) (types.ClaimRecord, error)
- func (k Keeper) DeleteAirdrop(ctx sdk.Context, airdropId uint64)
- func (k Keeper) DeleteClaimRecord(ctx sdk.Context, record types.ClaimRecord)
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) GetAirdrop(ctx sdk.Context, airdropId uint64) (airdrop types.Airdrop, found bool)
- func (k Keeper) GetAllAirdrops(ctx sdk.Context) []types.Airdrop
- func (k Keeper) GetAllClaimRecordsByAirdropId(ctx sdk.Context, airdropId uint64) (records []types.ClaimRecord)
- func (k Keeper) GetClaimRecordByRecipient(ctx sdk.Context, airdropId uint64, recipient sdk.AccAddress) (record types.ClaimRecord, found bool)
- func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState)
- func (k Keeper) IterateAllAirdrops(ctx sdk.Context, cb func(airdrop types.Airdrop) (stop bool))
- func (k Keeper) IterateAllClaimRecordsByAirdropId(ctx sdk.Context, airdropId uint64, ...)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) SetAirdrop(ctx sdk.Context, airdrop types.Airdrop)
- func (k Keeper) SetClaimRecord(ctx sdk.Context, record types.ClaimRecord)
- func (k Keeper) TerminateAirdrop(ctx sdk.Context, airdrop types.Airdrop) error
- func (k Keeper) ValidateCondition(ctx sdk.Context, recipient sdk.AccAddress, ct types.ConditionType) error
- type Querier
- func (k Querier) Airdrop(c context.Context, req *types.QueryAirdropRequest) (*types.QueryAirdropResponse, error)
- func (k Querier) Airdrops(c context.Context, req *types.QueryAirdropsRequest) (*types.QueryAirdropsResponse, error)
- func (k Querier) ClaimRecord(c context.Context, req *types.QueryClaimRecordRequest) (*types.QueryClaimRecordResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
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 sdk.StoreKey, bk types.BankKeeper, dk types.DistrKeeper, gk types.GovKeeper, lk types.LiquidityKeeper, lsk types.LiquidStakingKeeper, ) Keeper
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 ¶
GetAirdrop returns the airdrop object from the airdrop id.
func (Keeper) GetAllAirdrops ¶
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 (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) SetAirdrop ¶
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 ¶
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 ¶
func (k Querier) Airdrop(c context.Context, req *types.QueryAirdropRequest) (*types.QueryAirdropResponse, error)
Airdrop queries the specific airdrop.
func (Querier) Airdrops ¶
func (k Querier) Airdrops(c context.Context, req *types.QueryAirdropsRequest) (*types.QueryAirdropsResponse, error)
Airdrops queries all the existing airdrops.
func (Querier) ClaimRecord ¶
func (k Querier) ClaimRecord(c context.Context, req *types.QueryClaimRecordRequest) (*types.QueryClaimRecordResponse, error)
ClaimRecord queries the specific claim record.