keeper

package
v0.0.0-...-a6871c7 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 15 Imported by: 1

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]
	// RecipientFundPercentage key: RecipientAddr | value: Percentage in math.Int
	RecipientFundPercentage collections.Map[sdk.AccAddress, math.Int]
	// RecipientFundDistribution key: RecipientAddr | value: Claimable amount
	RecipientFundDistribution collections.Map[sdk.AccAddress, math.Int]
	// ToDistribute is to keep track of funds distributed
	ToDistribute collections.Item[math.Int]
	// contains filtered or unexported fields
}

func NewKeeper

func (Keeper) DistributeFromCommunityPool

func (k Keeper) DistributeFromCommunityPool(ctx context.Context, amount sdk.Coins, receiveAddr sdk.AccAddress) 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 sdk.AccAddress) 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 sdk.AccAddress) 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) SetToDistribute

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

SetToDistribute sets the amount to be distributed among recipients. This could be only set by the authority address.

type MsgServer

type MsgServer struct {
	Keeper
}

func (MsgServer) CancelContinuousFund

func (MsgServer) ClaimBudget

func (MsgServer) CommunityPoolSpend

func (MsgServer) CreateContinuousFund

func (MsgServer) FundCommunityPool

func (MsgServer) SubmitBudgetProposal

func (MsgServer) WithdrawContinuousFund

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