keeper

package
v0.15.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLegacyQuerier

func NewLegacyQuerier(keeper Keeper) sdk.Querier

NewLegacyQuerier is the module level router for state queries

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

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

func (k Keeper) AccumulateDrops(ctx sdk.Context, addr string, amount sdk.Coins) error

AccumulateDrops collects funds from a senders account and transfers it to the Dispensation module account

func (Keeper) AddMintAmount added in v0.12.0

func (k Keeper) AddMintAmount(ctx sdk.Context, mintedCoin sdk.Coin) error

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 (k Keeper) DeleteClaim(ctx sdk.Context, recipient string, userClaimType types.DistributionType)

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,
	distributionCount int64) (*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 'distributionCount' items

func (Keeper) Exists

func (k Keeper) Exists(ctx sdk.Context, key []byte) bool

func (Keeper) ExistsClaim

func (k Keeper) ExistsClaim(ctx sdk.Context, recipient string, userClaimType types.DistributionType) bool

func (Keeper) ExistsDistribution

func (k Keeper) ExistsDistribution(ctx sdk.Context, name string, distributionType types.DistributionType, authorizedRunner string) bool

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) GetClaim

func (k Keeper) GetClaim(ctx sdk.Context, recipient string, userClaimType types.DistributionType) (types.UserClaim, error)

func (Keeper) GetClaims

func (k Keeper) GetClaims(ctx sdk.Context) *types.UserClaims

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 (k Keeper) GetDistributionIterator(ctx sdk.Context) sdk.Iterator

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 (k Keeper) GetDistributionRecordsIterator(ctx sdk.Context, status types.DistributionStatus) sdk.Iterator

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,
	distributionCount int64) *types.DistributionRecords

func (Keeper) GetLimitedRecordsForStatus

func (k Keeper) GetLimitedRecordsForStatus(ctx sdk.Context, status types.DistributionStatus) *types.DistributionRecords

func (Keeper) GetMintController added in v0.12.0

func (k Keeper) GetMintController(ctx sdk.Context) (types.MintController, bool)

func (Keeper) GetRecords

func (k Keeper) GetRecords(ctx sdk.Context) *types.DistributionRecords

func (Keeper) GetRecordsForName

func (k Keeper) GetRecordsForName(ctx sdk.Context, name string) *types.DistributionRecords

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 (k Keeper) GetRecordsForRecipient(ctx sdk.Context, recipient string) *types.DistributionRecords

func (Keeper) GetUserClaimsIterator

func (k Keeper) GetUserClaimsIterator(ctx sdk.Context) sdk.Iterator

func (Keeper) HasCoins

func (k Keeper) HasCoins(ctx sdk.Context, user sdk.AccAddress, coins sdk.Coins) bool

func (Keeper) IsLastBlock added in v0.12.0

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

func (Keeper) Logger

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

Logger returns a module-specific logger.

func (Keeper) SetClaim

func (k Keeper) SetClaim(ctx sdk.Context, ar types.UserClaim) error

func (Keeper) SetDistribution

func (k Keeper) SetDistribution(ctx sdk.Context, ar types.Distribution) error

func (Keeper) SetDistributionRecord

func (k Keeper) SetDistributionRecord(ctx sdk.Context, dr types.DistributionRecord) error

func (Keeper) SetMintController added in v0.12.0

func (k Keeper) SetMintController(ctx sdk.Context, mintController types.MintController)

func (Keeper) TokensCanBeMinted added in v0.12.0

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

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 Migrator added in v0.12.0

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

func NewMigrator added in v0.12.0

func NewMigrator(keeper Keeper) Migrator

func (Migrator) MigrateToVer2 added in v0.12.0

func (m Migrator) MigrateToVer2(ctx sdk.Context) error

type Querier

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

func NewQuerier

func NewQuerier(k Keeper) Querier

func (Querier) ClaimsByType

Jump to

Keyboard shortcuts

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