Trait serp_traits::auction::Auction[][src]

pub trait Auction<AccountId, BlockNumber> {
    type AuctionId: FullCodec + Default + Copy + Eq + PartialEq + MaybeSerializeDeserialize + Bounded + Debug;
    type Balance: AtLeast32Bit + FullCodec + Copy + MaybeSerializeDeserialize + Debug + Default;
    fn auction_info(
        id: Self::AuctionId
    ) -> Option<AuctionInfo<AccountId, Self::Balance, BlockNumber>>;
fn update_auction(
        id: Self::AuctionId,
        info: AuctionInfo<AccountId, Self::Balance, BlockNumber>
    ) -> DispatchResult;
fn new_auction(
        start: BlockNumber,
        end: Option<BlockNumber>
    ) -> Result<Self::AuctionId, DispatchError>;
fn remove_auction(id: Self::AuctionId); }

Abstraction over a simple auction system.

Associated Types

type AuctionId: FullCodec + Default + Copy + Eq + PartialEq + MaybeSerializeDeserialize + Bounded + Debug[src]

The id of an AuctionInfo

type Balance: AtLeast32Bit + FullCodec + Copy + MaybeSerializeDeserialize + Debug + Default[src]

The price to bid.

Loading content...

Required methods

fn auction_info(
    id: Self::AuctionId
) -> Option<AuctionInfo<AccountId, Self::Balance, BlockNumber>>
[src]

The auction info of id

fn update_auction(
    id: Self::AuctionId,
    info: AuctionInfo<AccountId, Self::Balance, BlockNumber>
) -> DispatchResult
[src]

Update the auction info of id with info

fn new_auction(
    start: BlockNumber,
    end: Option<BlockNumber>
) -> Result<Self::AuctionId, DispatchError>
[src]

Create new auction with specific startblock and endblock, return the id of the auction

fn remove_auction(id: Self::AuctionId)[src]

Remove auction by id

Loading content...

Implementors

Loading content...