Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) Airdrop(goCtx context.Context, req *types.QueryAirdropRequest) (*types.QueryAirdropResponse, error)
- func (k Keeper) AllAirdrops(goCtx context.Context, req *types.QueryAllAirdropsRequest) (*types.QueryAllAirdropsResponse, error)
- func (k Keeper) AllAllocations(goCtx context.Context, req *types.QueryAllAllocationsRequest) (*types.QueryAllAllocationsResponse, error)
- func (k Keeper) ClaimDaily(ctx sdk.Context, airdropId, claimer string) error
- func (k Keeper) ClaimEarly(ctx sdk.Context, airdropId, claimer string) error
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) GetAirdrop(ctx sdk.Context, airdropId string) (airdrop types.Airdrop, found bool)
- func (k Keeper) GetAllAirdrops(ctx sdk.Context) (airdrops []types.Airdrop)
- func (k Keeper) GetAllUserAllocations(ctx sdk.Context) (userAllocations []types.UserAllocation)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetUserAllocation(ctx sdk.Context, airdropId, address string) (allocation types.UserAllocation, found bool)
- func (k Keeper) GetUserAllocationsForAddress(ctx sdk.Context, address string) (userAllocations []types.UserAllocation)
- func (k Keeper) GetUserAllocationsForAirdrop(ctx sdk.Context, airdropId string) (userAllocations []types.UserAllocation)
- func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState)
- func (k Keeper) LinkAddresses(ctx sdk.Context, airdropId, strideAddress, hostAddress string) error
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) RemoveAirdrop(ctx sdk.Context, airdropId string)
- func (k Keeper) RemoveUserAllocation(ctx sdk.Context, airdropId, address string)
- func (k Keeper) SetAirdrop(ctx sdk.Context, airdrop types.Airdrop)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetUserAllocation(ctx sdk.Context, userAllocation types.UserAllocation)
- func (k Keeper) UserAllocation(goCtx context.Context, req *types.QueryUserAllocationRequest) (*types.QueryUserAllocationResponse, error)
- func (k Keeper) UserAllocations(goCtx context.Context, req *types.QueryUserAllocationsRequest) (*types.QueryUserAllocationsResponse, error)
- func (k Keeper) UserSummary(goCtx context.Context, req *types.QueryUserSummaryRequest) (*types.QueryUserSummaryResponse, 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 storetypes.StoreKey, bankKeeper types.BankKeeper, ) Keeper
func (Keeper) Airdrop ¶
func (k Keeper) Airdrop(goCtx context.Context, req *types.QueryAirdropRequest) (*types.QueryAirdropResponse, error)
Queries the configuration for a given airdrop
func (Keeper) AllAirdrops ¶
func (k Keeper) AllAirdrops(goCtx context.Context, req *types.QueryAllAirdropsRequest) (*types.QueryAllAirdropsResponse, error)
Queries all airdrop configurations
func (Keeper) AllAllocations ¶
func (k Keeper) AllAllocations(goCtx context.Context, req *types.QueryAllAllocationsRequest) (*types.QueryAllAllocationsResponse, error)
Queries all allocations for a given airdrop
func (Keeper) ClaimDaily ¶
User transaction to claim all the pending airdrop rewards up to the current day
func (Keeper) ClaimEarly ¶
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 ¶
Retrieves an airdrop configuration from the store
func (Keeper) GetAllAirdrops ¶
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) 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 ¶
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) RemoveAirdrop ¶
Removes an airdrop configuration from the store
func (Keeper) RemoveUserAllocation ¶
Removes a user allocation record from the store
func (Keeper) SetAirdrop ¶
Writes an airdrop configuration 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 ¶
func (k Keeper) UserAllocation(goCtx context.Context, req *types.QueryUserAllocationRequest) (*types.QueryUserAllocationResponse, error)
Queries the allocation for a given user for an airdrop
func (Keeper) UserAllocations ¶
func (k Keeper) UserAllocations(goCtx context.Context, req *types.QueryUserAllocationsRequest) (*types.QueryUserAllocationsResponse, error)
Queries the allocations for a given user across all airdrops
func (Keeper) UserSummary ¶
func (k Keeper) UserSummary(goCtx context.Context, req *types.QueryUserSummaryRequest) (*types.QueryUserSummaryResponse, error)
Queries the state of an address for an airdrop (daily claim or claim early) and the amount claimed and remaining