Documentation ¶
Index ¶
- func NewLegacyQuerier(keeper Keeper) sdk.Querier
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) AccumulateDrops(ctx sdk.Context, addr string, amount sdk.Coins) error
- func (k Keeper) ChangeRecordStatus(ctx sdk.Context, dr types.DistributionRecord, height int64, ...) error
- func (k Keeper) Codec() codec.BinaryCodec
- func (k Keeper) CreateDrops(ctx sdk.Context, output []banktypes.Output, name string, ...) error
- func (k Keeper) DeleteClaim(ctx sdk.Context, recipient string, userClaimType types.DistributionType)
- func (k Keeper) DeleteDistributionRecord(ctx sdk.Context, distributionName string, recipientAddress string, ...) error
- func (k Keeper) DistributeDrops(ctx sdk.Context, height int64, distributionName string, ...) (*types.DistributionRecords, error)
- func (k Keeper) Exists(ctx sdk.Context, key []byte) bool
- func (k Keeper) ExistsClaim(ctx sdk.Context, recipient string, userClaimType types.DistributionType) bool
- func (k Keeper) ExistsDistribution(ctx sdk.Context, name string, distributionType types.DistributionType, ...) bool
- func (k Keeper) ExistsDistributionRecord(ctx sdk.Context, airdropName string, recipientAddress string, ...) bool
- func (k Keeper) GetAccountKeeper() types.AccountKeeper
- func (k Keeper) GetBankKeeper() types.BankKeeper
- func (k Keeper) GetClaim(ctx sdk.Context, recipient string, userClaimType types.DistributionType) (types.UserClaim, error)
- func (k Keeper) GetClaims(ctx sdk.Context) *types.UserClaims
- func (k Keeper) GetClaimsByType(ctx sdk.Context, userClaimType types.DistributionType) *types.UserClaims
- func (k Keeper) GetDistribution(ctx sdk.Context, name string, distributionType types.DistributionType, ...) (*types.Distribution, error)
- func (k Keeper) GetDistributionIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) GetDistributionRecord(ctx sdk.Context, airdropName string, recipientAddress string, ...) (*types.DistributionRecord, error)
- func (k Keeper) GetDistributionRecordsIterator(ctx sdk.Context, status types.DistributionStatus) sdk.Iterator
- func (k Keeper) GetDistributions(ctx sdk.Context) *types.Distributions
- func (k Keeper) GetLimitedRecordsForRunner(ctx sdk.Context, distributionName string, authorizedRunner string, ...) *types.DistributionRecords
- func (k Keeper) GetLimitedRecordsForStatus(ctx sdk.Context, status types.DistributionStatus) *types.DistributionRecords
- func (k Keeper) GetRecords(ctx sdk.Context) *types.DistributionRecords
- func (k Keeper) GetRecordsForName(ctx sdk.Context, name string) *types.DistributionRecords
- func (k Keeper) GetRecordsForNameAndStatus(ctx sdk.Context, name string, status types.DistributionStatus) *types.DistributionRecords
- func (k Keeper) GetRecordsForNameStatusAndType(ctx sdk.Context, name string, status types.DistributionStatus, ...) *types.DistributionRecords
- func (k Keeper) GetRecordsForRecipient(ctx sdk.Context, recipient string) *types.DistributionRecords
- func (k Keeper) GetUserClaimsIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) HasCoins(ctx sdk.Context, user sdk.AccAddress, coins sdk.Coins) bool
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) SetClaim(ctx sdk.Context, ar types.UserClaim) error
- func (k Keeper) SetDistribution(ctx sdk.Context, ar types.Distribution) error
- func (k Keeper) SetDistributionRecord(ctx sdk.Context, dr types.DistributionRecord) error
- func (k Keeper) VerifyAndSetDistribution(ctx sdk.Context, distributionName string, ...) error
- type Querier
- func (q Querier) AllDistributions(ctx context.Context, _ *types.QueryAllDistributionsRequest) (*types.QueryAllDistributionsResponse, error)
- func (q Querier) ClaimsByType(ctx context.Context, request *types.QueryClaimsByTypeRequest) (*types.QueryClaimsResponse, error)
- func (q Querier) RecordsByDistributionName(ctx context.Context, request *types.QueryRecordsByDistributionNameRequest) (*types.QueryRecordsByDistributionNameResponse, error)
- func (q Querier) RecordsByRecipient(ctx context.Context, request *types.QueryRecordsByRecipientAddrRequest) (*types.QueryRecordsByRecipientAddrResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLegacyQuerier ¶
NewLegacyQuerier is the module level router for state queries
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the clp MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper of the clp store
func NewKeeper ¶
func NewKeeper(cdc codec.BinaryCodec, key sdk.StoreKey, bankkeeper types.BankKeeper, accountKeeper types.AccountKeeper, ps paramtypes.Subspace) Keeper
NewKeeper creates a dispensation keeper
func (Keeper) AccumulateDrops ¶
AccumulateDrops collects funds from a senders account and transfers it to the Dispensation module account
func (Keeper) ChangeRecordStatus ¶
func (k Keeper) ChangeRecordStatus(ctx sdk.Context, dr types.DistributionRecord, height int64, newStatus types.DistributionStatus) error
func (Keeper) Codec ¶
func (k Keeper) Codec() codec.BinaryCodec
func (Keeper) CreateDrops ¶
func (k Keeper) CreateDrops(ctx sdk.Context, output []banktypes.Output, name string, distributionType types.DistributionType, authorizedRunner string) error
CreateAndDistributeDrops creates new drop Records . These records are then used to facilitate distribution Each Recipient and DropName generate a unique Record
func (Keeper) DeleteClaim ¶
func (Keeper) DeleteDistributionRecord ¶
func (k Keeper) DeleteDistributionRecord(ctx sdk.Context, distributionName string, recipientAddress string, status types.DistributionStatus, distributionType types.DistributionType) error
func (Keeper) DistributeDrops ¶
func (k Keeper) DistributeDrops(ctx sdk.Context, height int64, distributionName string, authorizedRunner string, distributionType types.DistributionType) (*types.DistributionRecords, error)
DistributeDrops is called at the beginning of every block . It checks if any pending records are present , if there are it completes the top 10
func (Keeper) ExistsClaim ¶
func (Keeper) ExistsDistribution ¶
func (Keeper) ExistsDistributionRecord ¶
func (k Keeper) ExistsDistributionRecord(ctx sdk.Context, airdropName string, recipientAddress string, status types.DistributionStatus, distributionType types.DistributionType) bool
func (Keeper) GetAccountKeeper ¶
func (k Keeper) GetAccountKeeper() types.AccountKeeper
func (Keeper) GetBankKeeper ¶
func (k Keeper) GetBankKeeper() types.BankKeeper
func (Keeper) GetClaimsByType ¶
func (k Keeper) GetClaimsByType(ctx sdk.Context, userClaimType types.DistributionType) *types.UserClaims
func (Keeper) GetDistribution ¶
func (k Keeper) GetDistribution(ctx sdk.Context, name string, distributionType types.DistributionType, authorizedRunner string) (*types.Distribution, error)
func (Keeper) GetDistributionIterator ¶
func (Keeper) GetDistributionRecord ¶
func (k Keeper) GetDistributionRecord(ctx sdk.Context, airdropName string, recipientAddress string, status types.DistributionStatus, distributionType types.DistributionType) (*types.DistributionRecord, error)
func (Keeper) GetDistributionRecordsIterator ¶
func (Keeper) GetDistributions ¶
func (k Keeper) GetDistributions(ctx sdk.Context) *types.Distributions
func (Keeper) GetLimitedRecordsForRunner ¶
func (k Keeper) GetLimitedRecordsForRunner(ctx sdk.Context, distributionName string, authorizedRunner string, distributionType types.DistributionType, status types.DistributionStatus) *types.DistributionRecords
func (Keeper) GetLimitedRecordsForStatus ¶
func (k Keeper) GetLimitedRecordsForStatus(ctx sdk.Context, status types.DistributionStatus) *types.DistributionRecords
func (Keeper) GetRecords ¶
func (k Keeper) GetRecords(ctx sdk.Context) *types.DistributionRecords
func (Keeper) GetRecordsForName ¶
func (Keeper) GetRecordsForNameAndStatus ¶
func (k Keeper) GetRecordsForNameAndStatus(ctx sdk.Context, name string, status types.DistributionStatus) *types.DistributionRecords
func (Keeper) GetRecordsForNameStatusAndType ¶
func (k Keeper) GetRecordsForNameStatusAndType(ctx sdk.Context, name string, status types.DistributionStatus, distributionType types.DistributionType) *types.DistributionRecords
func (Keeper) GetRecordsForRecipient ¶
func (Keeper) GetUserClaimsIterator ¶
func (Keeper) SetDistribution ¶
func (Keeper) SetDistributionRecord ¶
func (Keeper) VerifyAndSetDistribution ¶
func (k Keeper) VerifyAndSetDistribution(ctx sdk.Context, distributionName string, distributionType types.DistributionType, authorizedRunner string) error
Verify if the distribution is correct The verification is the for distributionName + distributionType
type Querier ¶
type Querier struct {
// contains filtered or unexported fields
}
func NewQuerier ¶
func (Querier) AllDistributions ¶
func (q Querier) AllDistributions(ctx context.Context, _ *types.QueryAllDistributionsRequest) (*types.QueryAllDistributionsResponse, error)
func (Querier) ClaimsByType ¶
func (q Querier) ClaimsByType(ctx context.Context, request *types.QueryClaimsByTypeRequest) (*types.QueryClaimsResponse, error)
func (Querier) RecordsByDistributionName ¶
func (q Querier) RecordsByDistributionName(ctx context.Context, request *types.QueryRecordsByDistributionNameRequest) (*types.QueryRecordsByDistributionNameResponse, error)
func (Querier) RecordsByRecipient ¶
func (q Querier) RecordsByRecipient(ctx context.Context, request *types.QueryRecordsByRecipientAddrRequest) (*types.QueryRecordsByRecipientAddrResponse, error)