keeper

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the airdrop MsgServer interface for the provided Keeper.

func NewQuerier

func NewQuerier(keeper Keeper) types.QueryServer

NewQuerier returns an implementation of the airdrop QueryServer 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,
	accountKeeper types.AccountKeeper,
	bankKeeper types.BankKeeper,
	stakingKeeper types.StakingKeeper,
	distributionKeeper types.DistributionKeeper,
	authority string,
) Keeper

NewKeeper constructs a new keeper for airdrop module.

func (Keeper) AirdropModuleAddress added in v0.1.4

func (k Keeper) AirdropModuleAddress(ctx sdk.Context) sdk.AccAddress

AirdropModuleAddress returns the airdrop module account address

func (Keeper) ChangeAirdropAccountState added in v0.2.0

func (k Keeper) ChangeAirdropAccountState(
	ctx sdk.Context,
	account *types.AirdropAccount,
	newState types.AirdropAccount_State,
) error

func (Keeper) CreateAirdropAccount added in v0.2.0

func (k Keeper) CreateAirdropAccount(
	ctx sdk.Context,
	airdropAccount *types.AirdropAccount,
) (err error)

CreateOriginAccount creates an origin account for the airdrop account and stores it using the unclaimed account type.

func (Keeper) CreateClaimAccount added in v0.1.4

func (k Keeper) CreateClaimAccount(ctx sdk.Context, aa *types.AirdropAccount) error

CreateClaimAccount creates a new delayed vesting claim account

func (Keeper) CreateOriginAccount added in v0.1.4

func (k Keeper) CreateOriginAccount(ctx sdk.Context, aa *types.AirdropAccount) error

CreateOriginAccount creates a new continuously vesting origin account

func (Keeper) DeleteAirdropAccount added in v0.2.0

func (k Keeper) DeleteAirdropAccount(
	ctx sdk.Context,
	account *types.AirdropAccount,
	state types.AirdropAccount_State,
)

func (Keeper) DistributionModuleAddress added in v0.1.4

func (k Keeper) DistributionModuleAddress(ctx sdk.Context) sdk.AccAddress

DistributionModuleAddress returns the distribution module account address

func (Keeper) GetAirdropAccount

func (k Keeper) GetAirdropAccount(
	ctx sdk.Context,
	originAddress string,
	state types.AirdropAccount_State,
) (*types.AirdropAccount, error)

GetAirdropAccount returns the airdrop account from the store

func (Keeper) GetAllAirdropAccounts

func (k Keeper) GetAllAirdropAccounts(
	ctx sdk.Context,
) (accounts []*types.AirdropAccount)

GetAllAirdropAccounts returns all airdrop accounts from the store

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)

GetParams gets the airdrop module's parameters.

func (Keeper) MintClaimTokensToAirdrop added in v0.1.4

func (k Keeper) MintClaimTokensToAirdrop(ctx sdk.Context, aa *types.AirdropAccount) error

MintClaimTokens mints the claimAmount of tokens to the airdrop module account

func (Keeper) MintClaimTokensToDistribution added in v0.1.4

func (k Keeper) MintClaimTokensToDistribution(ctx sdk.Context, aa *types.AirdropAccount) error

MintClaimTokensToDistribution mints the claimAmount of tokens to the distribution module account

func (Keeper) MintOriginTokens added in v0.1.4

func (k Keeper) MintOriginTokens(ctx sdk.Context, aa *types.AirdropAccount) error

MintOriginTokens mints the originAmount of tokens to the airdrop module account

func (Keeper) PaginatedAirdropAccounts added in v0.2.0

func (k Keeper) PaginatedAirdropAccounts(
	ctx sdk.Context,
	state types.AirdropAccount_State,
	limit int,
) (accounts []*types.AirdropAccount)

PaginatedAirdropAccounts returns a paginated list of airdrop accounts

func (Keeper) SendClaimTokens added in v0.1.4

func (k Keeper) SendClaimTokens(ctx sdk.Context, aa *types.AirdropAccount) error

SendClaimTokens sends the claim tokens to the claim account from the airdrop module

func (Keeper) SendOriginTokens added in v0.1.4

func (k Keeper) SendOriginTokens(ctx sdk.Context, aa *types.AirdropAccount) error

SendOriginTokens sends the origin tokens to the origin account from the airdrop module

func (Keeper) SetAirdropAccount

func (k Keeper) SetAirdropAccount(
	ctx sdk.Context,
	account *types.AirdropAccount,
) (err error)

SetAirdropAccount saves the airdrop account to the store using the OriginAddress as the key.

func (Keeper) SetClaimAmount added in v0.1.4

func (k Keeper) SetClaimAmount(ctx sdk.Context, aa *types.AirdropAccount)

SetClaimAmount calculates and sets the claim amount for the airdrop account

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

SetParams sets the airdrop module's parameters.

func (Keeper) VerifyDelegationRequirement added in v0.1.4

func (k Keeper) VerifyDelegationRequirement(
	ctx sdk.Context,
	aa *types.AirdropAccount,
) error

VerifyDelegationRequirement returns an error if the total shares delegated is less than the delegation requirement.

Jump to

Keyboard shortcuts

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