Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) ChargeFundersOfPool(ctx sdk.Context, poolId uint64, recipient string) (sdk.Coins, 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) GetCoinWhitelist(ctx sdk.Context) (whitelist []types.WhitelistCoinEntry)
- func (k Keeper) GetCoinWhitelistMap(ctx sdk.Context) (whitelist map[string]types.WhitelistCoinEntry)
- 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(ctx sdk.Context, 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) (amounts sdk.Coins)
- func (k Keeper) Logger() 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)
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, storeService store.KVStoreService, memService store.MemoryStoreService, logger log.Logger, authority string, accountKeeper util.AccountKeeper, bankKeeper util.BankKeeper, poolKeeper types.PoolKeeper, upgradeKeeper util.UpgradeKeeper, ) Keeper
func (Keeper) ChargeFundersOfPool ¶
func (k Keeper) ChargeFundersOfPool(ctx sdk.Context, poolId uint64, recipient string) (sdk.Coins, error)
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 recipient module account. If there are no more active funders, an event is emitted. This method only charges coins which are whitelisted.
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) GetCoinWhitelist ¶ added in v1.5.0
func (k Keeper) GetCoinWhitelist(ctx sdk.Context) (whitelist []types.WhitelistCoinEntry)
GetCoinWhitelist gets the coin whitelist from the params of the funding module
func (Keeper) GetCoinWhitelistMap ¶ added in v1.5.0
func (k Keeper) GetCoinWhitelistMap(ctx sdk.Context) (whitelist map[string]types.WhitelistCoinEntry)
GetCoinWhitelistMap gets the coin whitelist as a map with the denom as key for easier lookup. WARNING: Don't use this for setter functions since go maps are non-deterministic!
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(ctx sdk.Context, 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