keeper

package
v4.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: MIT Imports: 21 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 token MsgServer interface for the provided Keeper.

Types

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.Codec,
	storeKey storetypes.StoreKey,
	accountKeeper types.AccountKeeper,
	bankKeeper types.BankKeeper,
	nftKeeper types.NftKeeper,
	streampayKeeper types.StreamPayKeeper,
	distributionKeeper types.DistributionKeeper,
	authority string,
) Keeper

func (Keeper) Campaign

Campaign returns details of the campaign

func (Keeper) Campaigns

func (Keeper) CancelCampaign

func (k Keeper) CancelCampaign(ctx sdk.Context, campaignId uint64, creator sdk.AccAddress) error

CancelCampaign ...

func (Keeper) Claim

func (k Keeper) Claim(ctx sdk.Context, campaign types.Campaign, claimer sdk.AccAddress, claim types.Claim) error

Claim ...

func (Keeper) Claims

func (Keeper) CreateCampaign

func (k Keeper) CreateCampaign(
	ctx sdk.Context,
	creator sdk.AccAddress,
	campaign types.Campaign,
) error

CreateCampaign ...

func (Keeper) DepositCampaign

func (k Keeper) DepositCampaign(ctx sdk.Context, campaignId uint64, depositor sdk.AccAddress, amount sdk.Coin) error

func (Keeper) FinalizeAndEndCampaigns

func (k Keeper) FinalizeAndEndCampaigns(ctx sdk.Context) error

FinalizeAndEndCampaigns finalizes and ends and all campaigns that are reached end time

func (Keeper) GetAllCampaigns

func (k Keeper) GetAllCampaigns(ctx sdk.Context) (list []types.Campaign)

GetAllCampaigns returns all campaigns

func (Keeper) GetAuthority

func (k Keeper) GetAuthority() string

GetAuthority returns the x/itc module's authority.

func (Keeper) GetCampaign

func (k Keeper) GetCampaign(ctx sdk.Context, id uint64) (val types.Campaign, found bool)

GetCampaign returns a campaign by its id

func (Keeper) GetCampaignCreationFee

func (k Keeper) GetCampaignCreationFee(ctx sdk.Context) (creationFee sdk.Coin)

GetCampaignCreationFee returns the creation fee required to create a campaign.

func (Keeper) GetCampaignsByCreator

func (k Keeper) GetCampaignsByCreator(ctx sdk.Context, creator sdk.AccAddress) (campaigns []types.Campaign)

GetCampaignsByCreator returns all campaigns created by specific address

func (Keeper) GetClaims

func (k Keeper) GetClaims(ctx sdk.Context, campaignId uint64) (claims []types.Claim)

func (Keeper) GetMaxCampaignDuration

func (k Keeper) GetMaxCampaignDuration(ctx sdk.Context) (duration time.Duration)

GetMaxCampaignDuration returns the maximum duration allowed to create a campaign.

func (Keeper) GetModuleAccountAddress

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

func (Keeper) GetNextCampaignNumber

func (k Keeper) GetNextCampaignNumber(ctx sdk.Context) uint64

GetNextCampaignNumber get the next campaign number

func (Keeper) GetParams

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

GetParams gets the parameters for the itc module.

func (Keeper) HasCampaign

func (k Keeper) HasCampaign(ctx sdk.Context, id uint64) bool

func (Keeper) HasClaim

func (k Keeper) HasClaim(ctx sdk.Context, id uint64, nftId string) bool

func (Keeper) Logger

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

func (Keeper) Params

Params returns params of the itc module.

func (Keeper) RemoveCampaign

func (k Keeper) RemoveCampaign(ctx sdk.Context, id uint64)

RemoveCampaign removes a campaign from the store

func (Keeper) RemoveClaims

func (k Keeper) RemoveClaims(ctx sdk.Context, campaignId uint64)

func (Keeper) SetCampaign

func (k Keeper) SetCampaign(ctx sdk.Context, campaign types.Campaign)

SetCampaign set a specific campaign in the store

func (Keeper) SetCampaignWithCreator

func (k Keeper) SetCampaignWithCreator(ctx sdk.Context, creator sdk.AccAddress, id uint64)

func (Keeper) SetClaim

func (k Keeper) SetClaim(ctx sdk.Context, claim types.Claim)

func (Keeper) SetNextCampaignNumber

func (k Keeper) SetNextCampaignNumber(ctx sdk.Context, number uint64)

SetNextCampaignNumber set the next campaign number

func (Keeper) SetParams

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

SetParams sets the parameters for the itc module.

func (Keeper) UnsetCampaignWithCreator

func (k Keeper) UnsetCampaignWithCreator(ctx sdk.Context, creator sdk.AccAddress, id uint64)

type Migrator

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

Migrator is a struct for handling in-place state migrations.

func NewMigrator

func NewMigrator(k Keeper, ss exported.Subspace) Migrator

func (Migrator) Migrate1to2

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

Migrate1to2 migrates the x/itc module state from the consensus version 1 to version 2. Specifically, it takes the parameters that are currently stored and managed by the x/params modules and stores them directly into the x/itc module state.

Jump to

Keyboard shortcuts

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