referrerpolicy=no-referrer-when-downgrade
pallet_broker

Type Alias SaleInfoRecordOf

Source
pub type SaleInfoRecordOf<T> = SaleInfoRecord<BalanceOf<T>, RelayBlockNumberOf<T>>;

Aliased Type§

struct SaleInfoRecordOf<T> {
    pub sale_start: <<<T as Config>::Coretime as CoretimeInterface>::RelayChainBlockNumberProvider as BlockNumberProvider>::BlockNumber,
    pub leadin_length: <<<T as Config>::Coretime as CoretimeInterface>::RelayChainBlockNumberProvider as BlockNumberProvider>::BlockNumber,
    pub end_price: <<T as Config>::Currency as Inspect<<T as Config>::AccountId>>::Balance,
    pub region_begin: u32,
    pub region_end: u32,
    pub ideal_cores_sold: u16,
    pub cores_offered: u16,
    pub first_core: u16,
    pub sellout_price: Option<<<T as Config>::Currency as Inspect<<T as Config>::AccountId>>::Balance>,
    pub cores_sold: u16,
}

Fields§

§sale_start: <<<T as Config>::Coretime as CoretimeInterface>::RelayChainBlockNumberProvider as BlockNumberProvider>::BlockNumber

The relay block number at which the sale will/did start.

§leadin_length: <<<T as Config>::Coretime as CoretimeInterface>::RelayChainBlockNumberProvider as BlockNumberProvider>::BlockNumber

The length in blocks of the Leadin Period (where the price is decreasing).

§end_price: <<T as Config>::Currency as Inspect<<T as Config>::AccountId>>::Balance

The price of Bulk Coretime after the Leadin Period.

§region_begin: u32

The first timeslice of the Regions which are being sold in this sale.

§region_end: u32

The timeslice on which the Regions which are being sold in the sale terminate. (i.e. One after the last timeslice which the Regions control.)

§ideal_cores_sold: u16

The number of cores we want to sell, ideally. Selling this amount would result in no change to the price for the next sale.

§cores_offered: u16

Number of cores which are/have been offered for sale.

§first_core: u16

The index of the first core which is for sale. Core of Regions which are sold have incrementing indices from this.

§sellout_price: Option<<<T as Config>::Currency as Inspect<<T as Config>::AccountId>>::Balance>

The price at which cores have been sold out.

Will only be None if no core was offered for sale.

§cores_sold: u16

Number of cores which have been sold; never more than cores_offered.

Trait Implementations

Source§

impl<Balance: Clone, RelayBlockNumber: Clone> Clone for SaleInfoRecord<Balance, RelayBlockNumber>

Source§

fn clone(&self) -> SaleInfoRecord<Balance, RelayBlockNumber>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Balance, RelayBlockNumber> Debug for SaleInfoRecord<Balance, RelayBlockNumber>
where Balance: Debug, RelayBlockNumber: Debug,

Source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Balance, RelayBlockNumber> Decode for SaleInfoRecord<Balance, RelayBlockNumber>
where RelayBlockNumber: Decode, Balance: Decode, Option<Balance>: Decode,

Source§

fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<Self, Error>

Attempt to deserialise the value from input.
§

fn decode_into<I>( input: &mut I, dst: &mut MaybeUninit<Self>, ) -> Result<DecodeFinished, Error>
where I: Input,

Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
§

fn skip<I>(input: &mut I) -> Result<(), Error>
where I: Input,

Attempt to skip the encoded value from input. Read more
§

fn encoded_fixed_size() -> Option<usize>

Returns the fixed encoded size of the type. Read more
Source§

impl<Balance, RelayBlockNumber> Encode for SaleInfoRecord<Balance, RelayBlockNumber>
where RelayBlockNumber: Encode, Balance: Encode, Option<Balance>: Encode,

Source§

fn size_hint(&self) -> usize

If possible give a hint of expected size of the encoding. Read more
Source§

fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )

Convert self to a slice and append it to the destination.
§

fn encode(&self) -> Vec<u8>

Convert self to an owned vector.
§

fn using_encoded<R, F>(&self, f: F) -> R
where F: FnOnce(&[u8]) -> R,

Convert self to a slice and then invoke the given closure with it.
§

fn encoded_size(&self) -> usize

Calculates the encoded size. Read more
Source§

impl<Balance, RelayBlockNumber> MaxEncodedLen for SaleInfoRecord<Balance, RelayBlockNumber>
where RelayBlockNumber: MaxEncodedLen, Balance: MaxEncodedLen, Option<Balance>: MaxEncodedLen,

Source§

fn max_encoded_len() -> usize

Upper bound, in bytes, of the maximum encoded size of this item.
Source§

impl<Balance: PartialEq, RelayBlockNumber: PartialEq> PartialEq for SaleInfoRecord<Balance, RelayBlockNumber>

Source§

fn eq(&self, other: &SaleInfoRecord<Balance, RelayBlockNumber>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<Balance, RelayBlockNumber> TypeInfo for SaleInfoRecord<Balance, RelayBlockNumber>
where RelayBlockNumber: TypeInfo + 'static, Balance: TypeInfo + 'static, Option<Balance>: TypeInfo + 'static,

Source§

type Identity = SaleInfoRecord<Balance, RelayBlockNumber>

The type identifying for which type info is provided. Read more
Source§

fn type_info() -> Type

Returns the static type identifier for Self.
Source§

impl<Balance, RelayBlockNumber> EncodeLike for SaleInfoRecord<Balance, RelayBlockNumber>
where RelayBlockNumber: Encode, Balance: Encode, Option<Balance>: Encode,

Source§

impl<Balance: Eq, RelayBlockNumber: Eq> Eq for SaleInfoRecord<Balance, RelayBlockNumber>

Source§

impl<Balance, RelayBlockNumber> StructuralPartialEq for SaleInfoRecord<Balance, RelayBlockNumber>