Documentation ¶
Index ¶
- func NewQuerier(keeper Keeper) sdk.Querier
- type Keeper
- func (k Keeper) CloseAuction(ctx sdk.Context, auctionID types.ID) sdk.Error
- func (k Keeper) DecodeAuction(ctx sdk.Context, auctionBytes []byte) types.Auction
- func (k Keeper) DeleteAuction(ctx sdk.Context, auctionID types.ID)
- func (k Keeper) GetAuction(ctx sdk.Context, auctionID types.ID) (types.Auction, bool)
- func (k Keeper) GetAuctionIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) GetParams(ctx sdk.Context) (params types.AuctionParams)
- func (k Keeper) GetQueueIterator(ctx sdk.Context, endTime types.EndTime) sdk.Iterator
- func (k Keeper) InsertIntoQueue(ctx sdk.Context, endTime types.EndTime, auctionID types.ID)
- func (k Keeper) PlaceBid(ctx sdk.Context, auctionID types.ID, bidder sdk.AccAddress, bid sdk.Coin, ...) sdk.Error
- func (k Keeper) SetAuction(ctx sdk.Context, auction types.Auction)
- func (k Keeper) SetParams(ctx sdk.Context, params types.AuctionParams)
- func (k Keeper) StartForwardAuction(ctx sdk.Context, seller sdk.AccAddress, lot sdk.Coin, initialBid sdk.Coin) (types.ID, sdk.Error)
- func (k Keeper) StartForwardReverseAuction(ctx sdk.Context, seller sdk.AccAddress, lot sdk.Coin, maxBid sdk.Coin, ...) (types.ID, sdk.Error)
- func (k Keeper) StartReverseAuction(ctx sdk.Context, buyer sdk.AccAddress, bid sdk.Coin, initialLot sdk.Coin) (types.ID, sdk.Error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewQuerier ¶
NewQuerier is the module level router for state queries
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper(cdc *codec.Codec, supplyKeeper types.SupplyKeeper, storeKey sdk.StoreKey, paramstore subspace.Subspace) Keeper
NewKeeper returns a new auction keeper.
func (Keeper) CloseAuction ¶
CloseAuction closes an auction and distributes funds to the seller and highest bidder. TODO because this is called by the end blocker, it has to be valid for the duration of the EndTime block. Should maybe move this to a begin blocker?
func (Keeper) DecodeAuction ¶
func (Keeper) DeleteAuction ¶
DeleteAuction removes an auction from the store without any validation
func (Keeper) GetAuction ¶
getAuction gets an auction from the store by auctionID
func (Keeper) GetAuctionIterator ¶
GetAuctionIterator returns an iterator over all auctions in the store
func (Keeper) GetParams ¶
func (k Keeper) GetParams(ctx sdk.Context) (params types.AuctionParams)
GetParams gets the auth module's parameters.
func (Keeper) GetQueueIterator ¶
Returns an iterator for all the auctions in the queue that expire by endTime
func (Keeper) InsertIntoQueue ¶
Inserts a AuctionID into the queue at endTime
func (Keeper) PlaceBid ¶
func (k Keeper) PlaceBid(ctx sdk.Context, auctionID types.ID, bidder sdk.AccAddress, bid sdk.Coin, lot sdk.Coin) sdk.Error
PlaceBid places a bid on any auction.
func (Keeper) SetAuction ¶
SetAuction puts the auction into the database and adds it to the queue it overwrites any pre-existing auction with same ID
func (Keeper) SetParams ¶
func (k Keeper) SetParams(ctx sdk.Context, params types.AuctionParams)
SetParams sets the auth module's parameters.
func (Keeper) StartForwardAuction ¶
func (k Keeper) StartForwardAuction(ctx sdk.Context, seller sdk.AccAddress, lot sdk.Coin, initialBid sdk.Coin) (types.ID, sdk.Error)
StartForwardAuction starts a normal auction. Known as flap in maker.
func (Keeper) StartForwardReverseAuction ¶
func (k Keeper) StartForwardReverseAuction(ctx sdk.Context, seller sdk.AccAddress, lot sdk.Coin, maxBid sdk.Coin, otherPerson sdk.AccAddress) (types.ID, sdk.Error)
StartForwardReverseAuction starts an auction where bidders bid up to a maxBid, then switch to bidding down on price. Known as flip in maker.