Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) ChargeFundersOfPool(ctx sdk.Context, poolId uint64) (payout uint64, err error)
- func (k Keeper) CreateFundingState(ctx sdk.Context, poolId uint64)
- func (k Keeper) DoesFunderExist(ctx sdk.Context, funderAddress string) bool
- func (k Keeper) DoesFundingExist(ctx sdk.Context, funderAddress string, poolId uint64) bool
- func (k Keeper) DoesFundingStateExist(ctx sdk.Context, poolId uint64) bool
- func (k Keeper) GetActiveFundings(ctx sdk.Context, fundingState types.FundingState) (fundings []types.Funding)
- func (k Keeper) GetAllFunders(ctx sdk.Context) (funders []types.Funder)
- func (k Keeper) GetAllFundingStates(ctx sdk.Context) (fundingStates []types.FundingState)
- func (k Keeper) GetAllFundings(ctx sdk.Context) (fundings []types.Funding)
- func (k Keeper) GetFunder(ctx sdk.Context, funderAddress string) (funder types.Funder, found bool)
- func (k Keeper) GetFunding(ctx sdk.Context, funderAddress string, poolId uint64) (funding types.Funding, found bool)
- func (k Keeper) GetFundingState(ctx sdk.Context, poolId uint64) (fundingState types.FundingState, found bool)
- func (k Keeper) GetFundingsOfFunder(ctx sdk.Context, funderAddress string) (fundings []types.Funding)
- func (k Keeper) GetFundingsOfPool(ctx sdk.Context, poolId uint64) (fundings []types.Funding)
- func (k Keeper) GetLowestFunding(fundings []types.Funding) (lowestFunding *types.Funding, err error)
- func (k Keeper) GetPaginatedFundersQuery(ctx sdk.Context, pagination *query.PageRequest, search string) ([]types.Funder, *query.PageResponse, error)
- func (k Keeper) GetPaginatedFundingQuery(ctx sdk.Context, pagination *query.PageRequest, funderAddress *string, ...) ([]types.Funding, *query.PageResponse, error)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetTotalActiveFunding(ctx sdk.Context, poolId uint64) (amount uint64)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) SetFunder(ctx sdk.Context, funder *types.Funder)
- func (k Keeper) SetFunding(ctx sdk.Context, funding *types.Funding)
- func (k Keeper) SetFundingState(ctx sdk.Context, fundingState *types.FundingState)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) StoreKey() storetypes.StoreKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey, memKey storetypes.StoreKey, authority string, accountKeeper types.AccountKeeper, bankKeeper util.BankKeeper, poolKeeper types.PoolKeeper, upgradeKeeper util.UpgradeKeeper, ) *Keeper
func (Keeper) ChargeFundersOfPool ¶
ChargeFundersOfPool charges all funders of a pool with their amount_per_bundle If the amount is lower than the amount_per_bundle, the max amount is charged and the funder is removed from the active funders list. The amount is transferred from the funders to the pool module account where it can be paid out. If there are no more active funders, an event is emitted.
func (Keeper) CreateFundingState ¶
func (Keeper) DoesFunderExist ¶
DoesFunderExist checks if the funding exists
func (Keeper) DoesFundingExist ¶
DoesFundingExist checks if the funding exists
func (Keeper) DoesFundingStateExist ¶
DoesFundingStateExist checks if the FundingState exists
func (Keeper) GetActiveFundings ¶
func (Keeper) GetAllFunders ¶
GetAllFunders returns all funders
func (Keeper) GetAllFundingStates ¶
func (k Keeper) GetAllFundingStates(ctx sdk.Context) (fundingStates []types.FundingState)
GetAllFundingStates returns all FundingStates
func (Keeper) GetAllFundings ¶
GetAllFundings returns all fundings
func (Keeper) GetFunding ¶
func (k Keeper) GetFunding(ctx sdk.Context, funderAddress string, poolId uint64) (funding types.Funding, found bool)
GetFunding returns the funding
func (Keeper) GetFundingState ¶
func (k Keeper) GetFundingState(ctx sdk.Context, poolId uint64) (fundingState types.FundingState, found bool)
GetFundingState returns the FundingState
func (Keeper) GetFundingsOfFunder ¶
func (k Keeper) GetFundingsOfFunder(ctx sdk.Context, funderAddress string) (fundings []types.Funding)
GetFundingsOfFunder returns all fundings of a funder
func (Keeper) GetFundingsOfPool ¶
GetFundingsOfPool returns all fundings of a pool
func (Keeper) GetLowestFunding ¶
func (k Keeper) GetLowestFunding(fundings []types.Funding) (lowestFunding *types.Funding, err error)
GetLowestFunding returns the funding with the lowest amount Precondition: len(fundings) > 0
func (Keeper) GetPaginatedFundersQuery ¶
func (k Keeper) GetPaginatedFundersQuery( ctx sdk.Context, pagination *query.PageRequest, search string, ) ([]types.Funder, *query.PageResponse, error)
GetPaginatedFundersQuery performs a full search on all funders with the given parameters.
func (Keeper) GetPaginatedFundingQuery ¶
func (k Keeper) GetPaginatedFundingQuery( ctx sdk.Context, pagination *query.PageRequest, funderAddress *string, poolId *uint64, fundingStatus queryTypes.FundingStatus, ) ([]types.Funding, *query.PageResponse, error)
GetPaginatedFundingQuery performs a full search on all fundings with the given parameters. Requires either funderAddress or poolId to be provided.
func (Keeper) GetTotalActiveFunding ¶
func (Keeper) Params ¶
func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) SetFunding ¶
SetFunding sets a specific funding in the store from its index
func (Keeper) SetFundingState ¶
func (k Keeper) SetFundingState(ctx sdk.Context, fundingState *types.FundingState)
SetFundingState sets a specific FundingState in the store from its index
func (Keeper) StoreKey ¶
func (k Keeper) StoreKey() storetypes.StoreKey