Documentation ¶
Index ¶
- Variables
- func AllInvariants(k Keeper) sdk.Invariant
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func PayingPoolReserveAmountInvariant(k Keeper) sdk.Invariant
- func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)
- func SellingPoolReserveAmountInvariant(k Keeper) sdk.Invariant
- func VestingPoolReserveAmountInvariant(k Keeper) sdk.Invariant
- type Keeper
- func (k Keeper) AddAllowedBidders(ctx sdk.Context, auctionId uint64, allowedBidders []types.AllowedBidder) error
- func (k Keeper) AfterBatchAuctionCreated(ctx sdk.Context, auctionId uint64, auctioneer string, startPrice sdk.Dec, ...)
- func (k Keeper) AfterFixedPriceAuctionCreated(ctx sdk.Context, auctionId uint64, auctioneer string, startPrice sdk.Dec, ...)
- func (k Keeper) AllocateSellingCoin(ctx sdk.Context, auction types.AuctionI, mInfo MatchingInfo) error
- func (k Keeper) ApplyVestingSchedules(ctx sdk.Context, auction types.AuctionI) error
- func (k Keeper) BeforeAllowedBidderUpdated(ctx sdk.Context, auctionId uint64, bidder sdk.AccAddress, ...)
- func (k Keeper) BeforeAllowedBiddersAdded(ctx sdk.Context, allowedBidders []types.AllowedBidder)
- func (k Keeper) BeforeAuctionCanceled(ctx sdk.Context, auctionId uint64, auctioneer string)
- func (k Keeper) BeforeBatchAuctionCreated(ctx sdk.Context, auctioneer string, startPrice sdk.Dec, minBidPrice sdk.Dec, ...)
- func (k Keeper) BeforeBidModified(ctx sdk.Context, auctionId uint64, bidId uint64, bidder string, ...)
- func (k Keeper) BeforeBidPlaced(ctx sdk.Context, auctionId uint64, bidId uint64, bidder string, ...)
- func (k Keeper) BeforeFixedPriceAuctionCreated(ctx sdk.Context, auctioneer string, startPrice sdk.Dec, sellingCoin sdk.Coin, ...)
- func (k Keeper) BeforeSellingCoinsAllocated(ctx sdk.Context, auctionId uint64, allocationMap map[string]math.Int, ...)
- func (k Keeper) CalculateBatchAllocation(ctx sdk.Context, auction types.AuctionI) MatchingInfo
- func (k Keeper) CalculateFixedPriceAllocation(ctx sdk.Context, auction types.AuctionI) MatchingInfo
- func (k Keeper) CancelAuction(ctx sdk.Context, msg *types.MsgCancelAuction) error
- func (k Keeper) CloseBatchAuction(ctx sdk.Context, auction types.AuctionI)
- func (k Keeper) CloseFixedPriceAuction(ctx sdk.Context, auction types.AuctionI)
- func (k Keeper) CreateBatchAuction(ctx sdk.Context, msg *types.MsgCreateBatchAuction) (types.AuctionI, error)
- func (k Keeper) CreateFixedPriceAuction(ctx sdk.Context, msg *types.MsgCreateFixedPriceAuction) (types.AuctionI, error)
- func (k Keeper) ExecuteStandByStatus(ctx sdk.Context, auction types.AuctionI)
- func (k Keeper) ExecuteStartedStatus(ctx sdk.Context, auction types.AuctionI)
- func (k Keeper) ExecuteVestingStatus(ctx sdk.Context, auction types.AuctionI)
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) ExtendRound(ctx sdk.Context, ba *types.BatchAuction)
- func (k Keeper) GetAllowedBidder(ctx sdk.Context, auctionId uint64, bidderAddr sdk.AccAddress) (allowedBidder types.AllowedBidder, found bool)
- func (k Keeper) GetAllowedBiddersByAuction(ctx sdk.Context, auctionId uint64) (allowedBidders []types.AllowedBidder)
- func (k Keeper) GetAuction(ctx sdk.Context, id uint64) (auction types.AuctionI, found bool)
- func (k Keeper) GetAuctions(ctx sdk.Context) (auctions []types.AuctionI)
- func (k Keeper) GetBid(ctx sdk.Context, auctionId uint64, bidId uint64) (bid types.Bid, found bool)
- func (k Keeper) GetBids(ctx sdk.Context) []types.Bid
- func (k Keeper) GetBidsByAuctionId(ctx sdk.Context, auctionId uint64) []types.Bid
- func (k Keeper) GetBidsByBidder(ctx sdk.Context, bidderAddr sdk.AccAddress) []types.Bid
- func (k Keeper) GetLastAuctionId(ctx sdk.Context) uint64
- func (k Keeper) GetLastBidId(ctx sdk.Context, auctionId uint64) uint64
- func (k Keeper) GetLastMatchedBidsLen(ctx sdk.Context, auctionId uint64) int64
- func (k Keeper) GetNextAuctionIdWithUpdate(ctx sdk.Context) uint64
- func (k Keeper) GetNextBidIdWithUpdate(ctx sdk.Context, auctionId uint64) uint64
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetVestingQueue(ctx sdk.Context, auctionId uint64, releaseTime time.Time) types.VestingQueue
- func (k Keeper) GetVestingQueues(ctx sdk.Context) []types.VestingQueue
- func (k Keeper) GetVestingQueuesByAuctionId(ctx sdk.Context, auctionId uint64) []types.VestingQueue
- func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState)
- func (k Keeper) IterateAllowedBiddersByAuction(ctx sdk.Context, auctionId uint64, ...) error
- func (k Keeper) IterateAuctions(ctx sdk.Context, cb func(auction types.AuctionI) (stop bool))
- func (k Keeper) IterateBids(ctx sdk.Context, cb func(bid types.Bid) (stop bool))
- func (k Keeper) IterateBidsByAuctionId(ctx sdk.Context, auctionId uint64, cb func(bid types.Bid) (stop bool))
- func (k Keeper) IterateBidsByBidder(ctx sdk.Context, bidderAddr sdk.AccAddress, cb func(bid types.Bid) (stop bool))
- func (k Keeper) IterateVestingQueues(ctx sdk.Context, cb func(queue types.VestingQueue) (stop bool))
- func (k Keeper) IterateVestingQueuesByAuctionId(ctx sdk.Context, auctionId uint64, ...)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) ModifyBid(ctx sdk.Context, msg *types.MsgModifyBid) error
- func (k Keeper) PayCreationFee(ctx sdk.Context, auctioneerAddr sdk.AccAddress) error
- func (k Keeper) PayPlaceBidFee(ctx sdk.Context, bidderAddr sdk.AccAddress) error
- func (k Keeper) PlaceBid(ctx sdk.Context, msg *types.MsgPlaceBid) (types.Bid, error)
- func (k Keeper) RefundPayingCoin(ctx sdk.Context, auction types.AuctionI, mInfo MatchingInfo) error
- func (k Keeper) RefundRemainingSellingCoin(ctx sdk.Context, auction types.AuctionI) error
- func (k Keeper) ReleaseVestingPayingCoin(ctx sdk.Context, auction types.AuctionI) error
- func (k Keeper) ReservePayingCoin(ctx sdk.Context, auctionId uint64, bidderAddr sdk.AccAddress, ...) error
- func (k Keeper) ReserveSellingCoin(ctx sdk.Context, auctionId uint64, auctioneerAddr sdk.AccAddress, ...) error
- func (k Keeper) SetAllowedBidder(ctx sdk.Context, auctionId uint64, allowedBidder types.AllowedBidder)
- func (k Keeper) SetAuction(ctx sdk.Context, auction types.AuctionI)
- func (k Keeper) SetAuctionId(ctx sdk.Context, id uint64)
- func (k Keeper) SetBid(ctx sdk.Context, bid types.Bid)
- func (k Keeper) SetBidId(ctx sdk.Context, auctionId uint64, bidId uint64)
- func (k *Keeper) SetHooks(fk types.FundraisingHooks) *Keeper
- func (k Keeper) SetMatchedBidsLen(ctx sdk.Context, auctionId uint64, matchedLen int64)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetVestingQueue(ctx sdk.Context, queue types.VestingQueue)
- func (k Keeper) UpdateAllowedBidder(ctx sdk.Context, auctionId uint64, bidder sdk.AccAddress, ...) error
- func (k Keeper) ValidateBatchManyBid(ctx sdk.Context, auction types.AuctionI, bid types.Bid) error
- func (k Keeper) ValidateBatchWorthBid(ctx sdk.Context, auction types.AuctionI, bid types.Bid) error
- func (k Keeper) ValidateFixedPriceBid(ctx sdk.Context, auction types.AuctionI, bid types.Bid) error
- type MatchingInfo
- type Querier
- func (k Querier) AllowedBidder(c context.Context, req *types.QueryAllowedBidderRequest) (*types.QueryAllowedBidderResponse, error)
- func (k Querier) AllowedBidders(c context.Context, req *types.QueryAllowedBiddersRequest) (*types.QueryAllowedBiddersResponse, error)
- func (k Querier) Auction(c context.Context, req *types.QueryAuctionRequest) (*types.QueryAuctionResponse, error)
- func (k Querier) Auctions(c context.Context, req *types.QueryAuctionsRequest) (*types.QueryAuctionsResponse, error)
- func (k Querier) Bid(c context.Context, req *types.QueryBidRequest) (*types.QueryBidResponse, error)
- func (k Querier) Bids(c context.Context, req *types.QueryBidsRequest) (*types.QueryBidsResponse, error)
- func (k Querier) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Querier) Vestings(c context.Context, req *types.QueryVestingsRequest) (*types.QueryVestingsResponse, error)
Constants ¶
This section is empty.
Variables ¶
var ( // EnableAddAllowedBidder indicates whether msgServer accepts MsgAddAllowedBidder or not. // Never set this to true in production environment. Doing that will expose serious attack vector. // Default is false, which means AddAllowedBidder can't be executed through message level. EnableAddAllowedBidder = false )
Functions ¶
func AllInvariants ¶
AllInvariants runs all invariants of the fundraising module.
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
func PayingPoolReserveAmountInvariant ¶
PayingPoolReserveAmountInvariant checks an invariant that the total bid amount must equal or greater than the paying reserve account balance.
func RegisterInvariants ¶
func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)
RegisterInvariants registers all fundraising invariants.
func SellingPoolReserveAmountInvariant ¶
SellingPoolReserveAmountInvariant checks an invariant that the total amount of selling coin for an auction must equal or greater than the selling reserve account balance.
func VestingPoolReserveAmountInvariant ¶
VestingPoolReserveAmountInvariant checks an invariant that the total vesting amount must be equal or greater than the vesting reserve account balance.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, key storetypes.StoreKey, memKey storetypes.StoreKey, paramSpace paramtypes.Subspace, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, distrKeeper types.DistrKeeper, ) Keeper
func (Keeper) AddAllowedBidders ¶
func (k Keeper) AddAllowedBidders(ctx sdk.Context, auctionId uint64, allowedBidders []types.AllowedBidder) error
AddAllowedBidders is a function that is implemented for an external module. An external module uses this function to add allowed bidders in the auction's allowed bidders list. It doesn't look up the bidder's previous maximum bid amount. Instead, it overlaps. It doesn't have any auctioneer's verification logic because the module is fundamentally designed to delegate full authorization to an external module. It is up to an external module to freely add necessary verification and operations depending on their use cases.
func (Keeper) AfterBatchAuctionCreated ¶
func (k Keeper) AfterBatchAuctionCreated( ctx sdk.Context, auctionId uint64, auctioneer string, startPrice sdk.Dec, minBidPrice sdk.Dec, sellingCoin sdk.Coin, payingCoinDenom string, vestingSchedules []types.VestingSchedule, maxExtendedRound uint32, extendedRoundRate sdk.Dec, startTime time.Time, endTime time.Time, )
AfterBatchAuctionCreated - call hook if registered
func (Keeper) AfterFixedPriceAuctionCreated ¶
func (k Keeper) AfterFixedPriceAuctionCreated( ctx sdk.Context, auctionId uint64, auctioneer string, startPrice sdk.Dec, sellingCoin sdk.Coin, payingCoinDenom string, vestingSchedules []types.VestingSchedule, startTime time.Time, endTime time.Time, )
AfterFixedPriceAuctionCreated - call hook if registered
func (Keeper) AllocateSellingCoin ¶
func (k Keeper) AllocateSellingCoin(ctx sdk.Context, auction types.AuctionI, mInfo MatchingInfo) error
AllocateSellingCoin allocates allocated selling coin for all matched bids in MatchingInfo and releases them from the selling reserve account.
func (Keeper) ApplyVestingSchedules ¶
ApplyVestingSchedules stores vesting queues based on the vesting schedules of the auction and sets status to vesting.
func (Keeper) BeforeAllowedBidderUpdated ¶
func (k Keeper) BeforeAllowedBidderUpdated( ctx sdk.Context, auctionId uint64, bidder sdk.AccAddress, maxBidAmount math.Int, )
BeforeAllowedBidderUpdated - call hook if registered
func (Keeper) BeforeAllowedBiddersAdded ¶
func (k Keeper) BeforeAllowedBiddersAdded( ctx sdk.Context, allowedBidders []types.AllowedBidder, )
BeforeAllowedBiddersAdded - call hook if registered
func (Keeper) BeforeAuctionCanceled ¶
BeforeAuctionCanceled - call hook if registered
func (Keeper) BeforeBatchAuctionCreated ¶
func (k Keeper) BeforeBatchAuctionCreated( ctx sdk.Context, auctioneer string, startPrice sdk.Dec, minBidPrice sdk.Dec, sellingCoin sdk.Coin, payingCoinDenom string, vestingSchedules []types.VestingSchedule, maxExtendedRound uint32, extendedRoundRate sdk.Dec, startTime time.Time, endTime time.Time, )
BeforeBatchAuctionCreated - call hook if registered
func (Keeper) BeforeBidModified ¶
func (k Keeper) BeforeBidModified( ctx sdk.Context, auctionId uint64, bidId uint64, bidder string, bidType types.BidType, price sdk.Dec, coin sdk.Coin, )
BeforeBidModified - call hook if registered
func (Keeper) BeforeBidPlaced ¶
func (k Keeper) BeforeBidPlaced( ctx sdk.Context, auctionId uint64, bidId uint64, bidder string, bidType types.BidType, price sdk.Dec, coin sdk.Coin, )
BeforeBidPlaced - call hook if registered
func (Keeper) BeforeFixedPriceAuctionCreated ¶
func (k Keeper) BeforeFixedPriceAuctionCreated( ctx sdk.Context, auctioneer string, startPrice sdk.Dec, sellingCoin sdk.Coin, payingCoinDenom string, vestingSchedules []types.VestingSchedule, startTime time.Time, endTime time.Time, )
BeforeFixedPriceAuctionCreated - call hook if registered
func (Keeper) BeforeSellingCoinsAllocated ¶
func (k Keeper) BeforeSellingCoinsAllocated( ctx sdk.Context, auctionId uint64, allocationMap map[string]math.Int, refundMap map[string]math.Int, )
BeforeSellingCoinsAllocated - call hook if registered
func (Keeper) CalculateBatchAllocation ¶
func (Keeper) CalculateFixedPriceAllocation ¶
CalculateFixedPriceAllocation loops through all bids for the auction and calculate matching information.
func (Keeper) CancelAuction ¶
CancelAuction handles types.MsgCancelAuction and cancels the auction. An auction can only be canceled when it is not started yet.
func (Keeper) CloseBatchAuction ¶
CloseBatchAuction closes a batch auction.
func (Keeper) CloseFixedPriceAuction ¶
CloseFixedPriceAuction closes a fixed price auction.
func (Keeper) CreateBatchAuction ¶
func (k Keeper) CreateBatchAuction(ctx sdk.Context, msg *types.MsgCreateBatchAuction) (types.AuctionI, error)
CreateBatchAuction handles types.MsgCreateBatchAuction and create a batch auction. Note that the module is designed to delegate authorization to an external module to add allowed bidders for the auction.
func (Keeper) CreateFixedPriceAuction ¶
func (k Keeper) CreateFixedPriceAuction(ctx sdk.Context, msg *types.MsgCreateFixedPriceAuction) (types.AuctionI, error)
CreateFixedPriceAuction handles types.MsgCreateFixedPriceAuction and create a fixed price auction. Note that the module is designed to delegate authorization to an external module to add allowed bidders for the auction.
func (Keeper) ExecuteStandByStatus ¶
ExecuteStandByStatus simply updates the auction status to AuctionStatusStarted if the auction is ready to get started.
func (Keeper) ExecuteStartedStatus ¶
ExecuteStartedStatus executes operations depending on the auction type.
func (Keeper) ExecuteVestingStatus ¶
ExecuteVestingStatus first gets all vesting queues in the store and look up the release time of each vesting queue to see if the module needs to distribute the paying coin to the auctioneer.
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns the module's exported genesis state.
func (Keeper) ExtendRound ¶
func (k Keeper) ExtendRound(ctx sdk.Context, ba *types.BatchAuction)
ExtendRound extends another round of ExtendedPeriod value for the auction.
func (Keeper) GetAllowedBidder ¶
func (k Keeper) GetAllowedBidder(ctx sdk.Context, auctionId uint64, bidderAddr sdk.AccAddress) (allowedBidder types.AllowedBidder, found bool)
GetAllowedBidder returns an allowed bidder object for the given auction id and bidder address.
func (Keeper) GetAllowedBiddersByAuction ¶
func (k Keeper) GetAllowedBiddersByAuction(ctx sdk.Context, auctionId uint64) (allowedBidders []types.AllowedBidder)
GetAllowedBiddersByAuction returns allowed bidders list for the auction.
func (Keeper) GetAuction ¶
GetAuction returns an auction interface from the given auction id.
func (Keeper) GetAuctions ¶
GetAuctions returns all auctions in the store.
func (Keeper) GetBid ¶
GetBid returns a bid for the given auction id and bid id. A bidder can have as many bids as they want, so bid id is required to get the bid.
func (Keeper) GetBidsByAuctionId ¶
GetBidsByAuctionId returns all bids associated with the auction id that are registered in the store.
func (Keeper) GetBidsByBidder ¶
GetBidsByBidder returns all bids associated with the bidder that are registered in the store.
func (Keeper) GetLastAuctionId ¶
GetLastAuctionId returns the last auction id.
func (Keeper) GetLastBidId ¶
GetLastBidId returns the last bid id for the bid.
func (Keeper) GetLastMatchedBidsLen ¶
func (Keeper) GetNextAuctionIdWithUpdate ¶
GetNextAuctionIdWithUpdate increments auction id by one and store it.
func (Keeper) GetNextBidIdWithUpdate ¶
GetNextBidId increments bid id by one and set it.
func (Keeper) GetVestingQueue ¶
func (k Keeper) GetVestingQueue(ctx sdk.Context, auctionId uint64, releaseTime time.Time) types.VestingQueue
GetVestingQueue returns a slice of vesting queues that the auction is complete and waiting in a queue to release the vesting amount of coin at the respective release time.
func (Keeper) GetVestingQueues ¶
func (k Keeper) GetVestingQueues(ctx sdk.Context) []types.VestingQueue
GetVestingQueues returns all vesting queues registered in the store.
func (Keeper) GetVestingQueuesByAuctionId ¶
GetVestingQueuesByAuctionId returns all vesting queues associated with the auction id that are registered in the store.
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState)
InitGenesis initializes the module's state from a provided genesis state.
func (Keeper) IterateAllowedBiddersByAuction ¶
func (k Keeper) IterateAllowedBiddersByAuction(ctx sdk.Context, auctionId uint64, cb func(ab types.AllowedBidder) (stop bool, err error)) error
IterateAllowedBiddersByAuction iterates through all the allowed bidder for the auction and call cb for each allowed bidder.
func (Keeper) IterateAuctions ¶
IterateAuctions iterates over all the stored auctions and performs a callback function. Stops iteration when callback returns true.
func (Keeper) IterateBids ¶
IterateBids iterates through all bids stored in the store and invokes callback function for each item. Stops the iteration when the callback function returns true.
func (Keeper) IterateBidsByAuctionId ¶
func (k Keeper) IterateBidsByAuctionId(ctx sdk.Context, auctionId uint64, cb func(bid types.Bid) (stop bool))
IterateBidsByAuctionId iterates through all bids associated with the auction id stored in the store and invokes callback function for each item. Stops the iteration when the callback function returns true.
func (Keeper) IterateBidsByBidder ¶
func (k Keeper) IterateBidsByBidder(ctx sdk.Context, bidderAddr sdk.AccAddress, cb func(bid types.Bid) (stop bool))
IterateBidsByBidder iterates through all bids associated with the bidder stored in the store and invokes callback function for each item. Stops the iteration when the callback function returns true.
func (Keeper) IterateVestingQueues ¶
func (k Keeper) IterateVestingQueues(ctx sdk.Context, cb func(queue types.VestingQueue) (stop bool))
IterateVestingQueues iterates through all VestingQueues and invokes callback function for each item. Stops the iteration when the callback function returns true.
func (Keeper) IterateVestingQueuesByAuctionId ¶
func (k Keeper) IterateVestingQueuesByAuctionId(ctx sdk.Context, auctionId uint64, cb func(queue types.VestingQueue) (stop bool))
IterateVestingQueuesByAuctionId iterates through all VestingQueues associated with the auction id stored in the store and invokes callback function for each item. Stops the iteration when the callback function returns true.
func (Keeper) ModifyBid ¶
ModifyBid handles types.MsgModifyBid and stores the modified bid. A bidder must provide either greater bid price or coin amount. They are not permitted to modify with less bid price or coin amount.
func (Keeper) PayCreationFee ¶
PayCreationFee sends the auction creation fee to the fee collector account.
func (Keeper) PayPlaceBidFee ¶
PayPlaceBidFee sends the fee when placing a bid for an auction to the fee collector account.
func (Keeper) RefundPayingCoin ¶
RefundPayingCoin refunds paying coin to the corresponding bidders.
func (Keeper) RefundRemainingSellingCoin ¶
RefundRemainingSellingCoin refunds the remaining selling coin to the auctioneer.
func (Keeper) ReleaseVestingPayingCoin ¶
ReleaseVestingPayingCoin releases the vested selling coin to the auctioneer from the vesting reserve account.
func (Keeper) ReservePayingCoin ¶
func (k Keeper) ReservePayingCoin(ctx sdk.Context, auctionId uint64, bidderAddr sdk.AccAddress, payingCoin sdk.Coin) error
ReservePayingCoin reserves paying coin to the paying reserve account.
func (Keeper) ReserveSellingCoin ¶
func (k Keeper) ReserveSellingCoin(ctx sdk.Context, auctionId uint64, auctioneerAddr sdk.AccAddress, sellingCoin sdk.Coin) error
ReserveSellingCoin reserves the selling coin to the selling reserve account.
func (Keeper) SetAllowedBidder ¶
func (k Keeper) SetAllowedBidder(ctx sdk.Context, auctionId uint64, allowedBidder types.AllowedBidder)
SetAllowedBidder stores an allowed bidder object for the auction.
func (Keeper) SetAuction ¶
SetAuction sets an auction with the given auction id.
func (Keeper) SetAuctionId ¶
SetAuctionId stores the last auction id.
func (*Keeper) SetHooks ¶
func (k *Keeper) SetHooks(fk types.FundraisingHooks) *Keeper
SetHooks sets the fundraising hooks.
func (Keeper) SetMatchedBidsLen ¶
func (Keeper) SetVestingQueue ¶
func (k Keeper) SetVestingQueue(ctx sdk.Context, queue types.VestingQueue)
SetVestingQueue sets vesting queue into with the given release time and auction id.
func (Keeper) UpdateAllowedBidder ¶
func (k Keeper) UpdateAllowedBidder(ctx sdk.Context, auctionId uint64, bidder sdk.AccAddress, maxBidAmount math.Int) error
UpdateAllowedBidder is a function that is implemented for an external module. An external module uses this function to update maximum bid amount of particular allowed bidder in the auction. It doesn't have any auctioneer's verification logic because the module is fundamentally designed to delegate full authorization to an external module. It is up to an external module to freely add necessary verification and operations depending on their use cases.
func (Keeper) ValidateBatchManyBid ¶
ValidateBatchManyBid validates a batch many bid type.
func (Keeper) ValidateBatchWorthBid ¶
ValidateBatchWorthBid validates a batch worth bid type.
type MatchingInfo ¶
type MatchingInfo struct { MatchedLen int64 // the length of matched bids MatchedPrice sdk.Dec // the final matched price TotalMatchedAmount math.Int // the total sold amount AllocationMap map[string]math.Int // the map that holds allocate amount information for each bidder ReservedMatchedMap map[string]math.Int // the map that holds each bidder's matched amount out of their total reserved amount RefundMap map[string]math.Int // the map that holds refund amount information for each bidder }
MatchingInfo holds information about an auction matching information.
type Querier ¶
type Querier struct {
Keeper
}
Querier is used as Keeper will have duplicate methods if used directly, and gRPC names take precedence over keeper.
func (Querier) AllowedBidder ¶
func (k Querier) AllowedBidder(c context.Context, req *types.QueryAllowedBidderRequest) (*types.QueryAllowedBidderResponse, error)
AllowedBidder queries the specific allowed bidder information.
func (Querier) AllowedBidders ¶
func (k Querier) AllowedBidders(c context.Context, req *types.QueryAllowedBiddersRequest) (*types.QueryAllowedBiddersResponse, error)
AllowedBidders queries all allowed bidders for the auction.
func (Querier) Auction ¶
func (k Querier) Auction(c context.Context, req *types.QueryAuctionRequest) (*types.QueryAuctionResponse, error)
Auction queries the specific auction.
func (Querier) Auctions ¶
func (k Querier) Auctions(c context.Context, req *types.QueryAuctionsRequest) (*types.QueryAuctionsResponse, error)
Auctions queries all auctions.
func (Querier) Bid ¶
func (k Querier) Bid(c context.Context, req *types.QueryBidRequest) (*types.QueryBidResponse, error)
Bid queries the specific bid from the auction id and bid id.
func (Querier) Bids ¶
func (k Querier) Bids(c context.Context, req *types.QueryBidsRequest) (*types.QueryBidsResponse, error)
Bids queries all bids for the auction.
func (Querier) Params ¶
func (k Querier) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params queries the parameters of the fundraising module.
func (Querier) Vestings ¶
func (k Querier) Vestings(c context.Context, req *types.QueryVestingsRequest) (*types.QueryVestingsResponse, error)
Vestings queries all vesting queues for the auction.