Documentation ¶
Index ¶
- func ExportGenesis(ctx sdk.Context, k Keeper) types.GenesisState
- func HandleSetTokenPricesProposal(ctx sdk.Context, k Keeper, p types.SetTokenPricesProposal) error
- func InitGenesis(ctx sdk.Context, k Keeper, gs types.GenesisState)
- type Keeper
- func (k Keeper) BeginAuction(ctx sdk.Context, startingTokensForSale sdk.Coin, ...) error
- func (k Keeper) BeginBlocker(ctx sdk.Context)
- func (k Keeper) EndBlocker(ctx sdk.Context)
- func (k Keeper) FinishAuction(ctx sdk.Context, auction *types.Auction) error
- func (k Keeper) GetActiveAuctionByID(ctx sdk.Context, id uint32) (types.Auction, bool)
- func (k Keeper) GetActiveAuctions(ctx sdk.Context) []*types.Auction
- func (k Keeper) GetAuctionAccount(ctx sdk.Context) authtypes.ModuleAccountI
- func (k Keeper) GetBid(ctx sdk.Context, auctionID uint32, bidID uint64) (types.Bid, bool)
- func (k Keeper) GetBids(ctx sdk.Context) []*types.Bid
- func (k Keeper) GetBidsByAuctionID(ctx sdk.Context, auctionID uint32) []*types.Bid
- func (k Keeper) GetEndedAuctionByID(ctx sdk.Context, id uint32) (types.Auction, bool)
- func (k Keeper) GetEndedAuctions(ctx sdk.Context) []*types.Auction
- func (k Keeper) GetLastAuctionID(ctx sdk.Context) uint32
- func (k Keeper) GetLastBidID(ctx sdk.Context) uint64
- func (k Keeper) GetParamSet(ctx sdk.Context) types.Params
- func (k Keeper) GetTokenPrice(ctx sdk.Context, denom string) (types.TokenPrice, bool)
- func (k Keeper) GetTokenPrices(ctx sdk.Context) []*types.TokenPrice
- func (k Keeper) IterateAuctions(ctx sdk.Context, auctionTypePrefix []byte, ...)
- func (k Keeper) IterateBids(ctx sdk.Context, ...)
- func (k Keeper) IterateBidsByAuction(ctx sdk.Context, auctionID uint32, ...)
- func (k Keeper) IterateTokenPrices(ctx sdk.Context, ...)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) QueryActiveAuction(c context.Context, request *types.QueryActiveAuctionRequest) (*types.QueryActiveAuctionResponse, error)
- func (k Keeper) QueryActiveAuctions(c context.Context, _ *types.QueryActiveAuctionsRequest) (*types.QueryActiveAuctionsResponse, error)
- func (k Keeper) QueryBid(c context.Context, request *types.QueryBidRequest) (*types.QueryBidResponse, error)
- func (k Keeper) QueryBidsByAuction(c context.Context, request *types.QueryBidsByAuctionRequest) (*types.QueryBidsByAuctionResponse, error)
- func (k Keeper) QueryEndedAuction(c context.Context, request *types.QueryEndedAuctionRequest) (*types.QueryEndedAuctionResponse, error)
- func (k Keeper) QueryEndedAuctions(c context.Context, request *types.QueryEndedAuctionsRequest) (*types.QueryEndedAuctionsResponse, error)
- func (k Keeper) QueryParams(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) QueryTokenPrice(c context.Context, request *types.QueryTokenPriceRequest) (*types.QueryTokenPriceResponse, error)
- func (k Keeper) QueryTokenPrices(c context.Context, _ *types.QueryTokenPricesRequest) (*types.QueryTokenPricesResponse, error)
- func (k Keeper) SubmitBid(c context.Context, msg *types.MsgSubmitBidRequest) (*types.MsgSubmitBidResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportGenesis ¶
func ExportGenesis(ctx sdk.Context, k Keeper) types.GenesisState
ExportGenesis returns the module's exported genesis.
func HandleSetTokenPricesProposal ¶
HandleSetTokenPricesProposal is a handler for executing a passed community token price update proposal
func InitGenesis ¶
func InitGenesis(ctx sdk.Context, k Keeper, gs types.GenesisState)
InitGenesis initializes the module's state from a provided genesis state.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper of the auction store
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, key storetypes.StoreKey, paramSpace paramtypes.Subspace, bankKeeper types.BankKeeper, accountKeeper types.AccountKeeper, fundingModuleAccounts map[string]bool, proceedsModuleAccounts map[string]bool, ) Keeper
NewKeeper creates a new auction Keeper instance
func (Keeper) BeginAuction ¶
func (k Keeper) BeginAuction(ctx sdk.Context, startingTokensForSale sdk.Coin, initialPriceDecreaseRate sdk.Dec, priceDecreaseBlockInterval uint64, fundingModuleAccount string, proceedsModuleAccount string) error
BeginAuction starts a new auction for a single denomination
func (Keeper) BeginBlocker ¶
BeginBlocker is called at the beginning of every block
func (Keeper) EndBlocker ¶
EndBlocker is called at the end of every block
func (Keeper) FinishAuction ¶
FinishAuction completes an auction by sending relevant funds to destination addresses and updates state
func (Keeper) GetActiveAuctionByID ¶
GetActiveAuctionByID returns a specific active auction
func (Keeper) GetActiveAuctions ¶
GetActiveAuctions returns all active auctions
func (Keeper) GetAuctionAccount ¶
func (k Keeper) GetAuctionAccount(ctx sdk.Context) authtypes.ModuleAccountI
Get the auction module account
func (Keeper) GetBidsByAuctionID ¶
GetBidsByAuctionID returns all stored bids for an auction id (that have not been pruned)
func (Keeper) GetEndedAuctionByID ¶
GetEndedAuctionByID returns a specific active auction
func (Keeper) GetEndedAuctions ¶
GetEndedAuctions returns all inactive auctions (that have not been pruned)
func (Keeper) GetLastAuctionID ¶
GetLastAuctionID gets the last auction id
func (Keeper) GetLastBidID ¶
GetLastBidID gets the last bid id
func (Keeper) GetParamSet ¶
GetParamSet returns the vote period from the parameters
func (Keeper) GetTokenPrice ¶
GetTokenPrice returns the stored token price
func (Keeper) GetTokenPrices ¶
func (k Keeper) GetTokenPrices(ctx sdk.Context) []*types.TokenPrice
GetTokenPrices returns all stored token prices
func (Keeper) IterateAuctions ¶
func (k Keeper) IterateAuctions(ctx sdk.Context, auctionTypePrefix []byte, handler func(auctionID uint32, auction types.Auction) (stop bool))
IterateAuctions iterates over all auctions in the store for a given prefix auctionTypePrefix for specifying whether we are iterating over active or ended auctions
func (Keeper) IterateBids ¶
func (k Keeper) IterateBids(ctx sdk.Context, handler func(auctionID uint32, bidID uint64, bid types.Bid) (stop bool))
IterateBids iterates over all bids in the store
func (Keeper) IterateBidsByAuction ¶
func (k Keeper) IterateBidsByAuction(ctx sdk.Context, auctionID uint32, handler func(auctionID uint32, bidID uint64, bid types.Bid) (stop bool))
IterateBidsByAuction iterates over all bids in the store for a given auction
func (Keeper) IterateTokenPrices ¶
func (k Keeper) IterateTokenPrices(ctx sdk.Context, handler func(denom string, tokenPrice types.TokenPrice) (stop bool))
IterateTokenPrices iterates over all token prices in the store
func (Keeper) QueryActiveAuction ¶
func (k Keeper) QueryActiveAuction(c context.Context, request *types.QueryActiveAuctionRequest) (*types.QueryActiveAuctionResponse, error)
QueryActiveAuction implements QueryServer
func (Keeper) QueryActiveAuctions ¶
func (k Keeper) QueryActiveAuctions(c context.Context, _ *types.QueryActiveAuctionsRequest) (*types.QueryActiveAuctionsResponse, error)
QueryActiveAuctions implements QueryServer
func (Keeper) QueryBid ¶
func (k Keeper) QueryBid(c context.Context, request *types.QueryBidRequest) (*types.QueryBidResponse, error)
QueryBid implements QueryServer
func (Keeper) QueryBidsByAuction ¶
func (k Keeper) QueryBidsByAuction(c context.Context, request *types.QueryBidsByAuctionRequest) (*types.QueryBidsByAuctionResponse, error)
QueryBidsByAuction implements QueryServer
func (Keeper) QueryEndedAuction ¶
func (k Keeper) QueryEndedAuction(c context.Context, request *types.QueryEndedAuctionRequest) (*types.QueryEndedAuctionResponse, error)
QueryEndedAuction implements QueryServer
func (Keeper) QueryEndedAuctions ¶
func (k Keeper) QueryEndedAuctions(c context.Context, request *types.QueryEndedAuctionsRequest) (*types.QueryEndedAuctionsResponse, error)
QueryEndedAuctions implements QueryServer
func (Keeper) QueryParams ¶
func (k Keeper) QueryParams(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
QueryParams implements QueryServer
func (Keeper) QueryTokenPrice ¶
func (k Keeper) QueryTokenPrice(c context.Context, request *types.QueryTokenPriceRequest) (*types.QueryTokenPriceResponse, error)
QueryTokenPrice implements QueryServer
func (Keeper) QueryTokenPrices ¶
func (k Keeper) QueryTokenPrices(c context.Context, _ *types.QueryTokenPricesRequest) (*types.QueryTokenPricesResponse, error)
QueryTokenPrices implements QueryServer
func (Keeper) SubmitBid ¶
func (k Keeper) SubmitBid(c context.Context, msg *types.MsgSubmitBidRequest) (*types.MsgSubmitBidResponse, error)
SubmitBid implements types.MsgServer