Trait orml_traits::auction::AuctionHandler[][src]

pub trait AuctionHandler<AccountId, Balance, BlockNumber, AuctionId> {
    fn on_new_bid(
        now: BlockNumber,
        id: AuctionId,
        new_bid: (AccountId, Balance),
        last_bid: Option<(AccountId, Balance)>
    ) -> OnNewBidResult<BlockNumber>;
fn on_auction_ended(id: AuctionId, winner: Option<(AccountId, Balance)>); }
Expand description

Hooks for auction to handle bids.

Required methods

Called when new bid is received. The return value determines if the bid should be accepted and update auction end time. Implementation should reserve money from current winner and refund previous winner.

End an auction with winner

Implementors