keeper

package
v0.2.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 16 Imported by: 3

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 protocolpool MsgServer interface for the provided Keeper.

Types

type Keeper

type Keeper struct {
	appmodule.Environment

	// State
	Schema         collections.Schema
	BudgetProposal collections.Map[sdk.AccAddress, types.Budget]
	ContinuousFund collections.Map[sdk.AccAddress, types.ContinuousFund]
	// RecipientFundDistribution key: RecipientAddr | value: Claimable amount
	RecipientFundDistribution collections.Map[sdk.AccAddress, types.DistributionAmount]
	Distributions             collections.Map[time.Time, types.DistributionAmount] // key: time.Time, denom | value: amounts
	LastBalance               collections.Item[types.DistributionAmount]
	Params                    collections.Item[types.Params]
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(cdc codec.BinaryCodec, env appmodule.Environment, ak types.AccountKeeper, bk types.BankKeeper, authority string,
) Keeper

func (Keeper) BeginBlocker

func (k Keeper) BeginBlocker(ctx context.Context) error

func (Keeper) DistributeFromCommunityPool

func (k Keeper) DistributeFromCommunityPool(ctx context.Context, amount sdk.Coins, receiveAddr []byte) error

DistributeFromCommunityPool distributes funds from the protocolpool module account to a receiver address.

func (Keeper) DistributeFromStreamFunds

func (k Keeper) DistributeFromStreamFunds(ctx context.Context, amount sdk.Coins, receiveAddr []byte) error

DistributeFromStreamFunds distributes funds from the protocolpool's stream module account to a receiver address.

func (Keeper) ExportGenesis

func (k Keeper) ExportGenesis(ctx context.Context) (*types.GenesisState, error)

func (Keeper) FundCommunityPool

func (k Keeper) FundCommunityPool(ctx context.Context, amount sdk.Coins, sender []byte) error

FundCommunityPool allows an account to directly fund the community fund pool.

func (Keeper) GetAuthority

func (k Keeper) GetAuthority() string

GetAuthority returns the x/protocolpool module's authority.

func (Keeper) GetCommunityPool

func (k Keeper) GetCommunityPool(ctx context.Context) (sdk.Coins, error)

GetCommunityPool gets the community pool balance.

func (Keeper) InitGenesis

func (k Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) error

func (Keeper) IterateAndUpdateFundsDistribution

func (k Keeper) IterateAndUpdateFundsDistribution(ctx context.Context) error

func (Keeper) SetToDistribute

func (k Keeper) SetToDistribute(ctx context.Context) error

SetToDistribute sets the amount to be distributed among recipients.

type MsgServer

type MsgServer struct {
	Keeper
}

func (MsgServer) ClaimBudget

func (MsgServer) FundCommunityPool

func (MsgServer) UpdateParams

type Querier

type Querier struct {
	Keeper
}

func NewQuerier

func NewQuerier(keeper Keeper) Querier

func (Querier) CommunityPool

CommunityPool queries the community pool coins

func (Querier) UnclaimedBudget

UnclaimedBudget queries the unclaimed budget for given recipient

Jump to

Keyboard shortcuts

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