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>
impl<Balance: Clone, RelayBlockNumber: Clone> Clone for SaleInfoRecord<Balance, RelayBlockNumber>
Source§fn clone(&self) -> SaleInfoRecord<Balance, RelayBlockNumber>
fn clone(&self) -> SaleInfoRecord<Balance, RelayBlockNumber>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<Balance, RelayBlockNumber> Debug for SaleInfoRecord<Balance, RelayBlockNumber>
impl<Balance, RelayBlockNumber> Debug for SaleInfoRecord<Balance, RelayBlockNumber>
Source§impl<Balance, RelayBlockNumber> Decode for SaleInfoRecord<Balance, RelayBlockNumber>where
RelayBlockNumber: Decode,
Balance: Decode,
Option<Balance>: Decode,
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>
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<Self, Error>
§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
§fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
§fn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
Source§impl<Balance, RelayBlockNumber> Encode for SaleInfoRecord<Balance, RelayBlockNumber>where
RelayBlockNumber: Encode,
Balance: Encode,
Option<Balance>: Encode,
impl<Balance, RelayBlockNumber> Encode for SaleInfoRecord<Balance, RelayBlockNumber>where
RelayBlockNumber: Encode,
Balance: Encode,
Option<Balance>: Encode,
Source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
Source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Source§impl<Balance, RelayBlockNumber> MaxEncodedLen for SaleInfoRecord<Balance, RelayBlockNumber>where
RelayBlockNumber: MaxEncodedLen,
Balance: MaxEncodedLen,
Option<Balance>: MaxEncodedLen,
impl<Balance, RelayBlockNumber> MaxEncodedLen for SaleInfoRecord<Balance, RelayBlockNumber>where
RelayBlockNumber: MaxEncodedLen,
Balance: MaxEncodedLen,
Option<Balance>: MaxEncodedLen,
Source§fn max_encoded_len() -> usize
fn max_encoded_len() -> usize
Source§impl<Balance: PartialEq, RelayBlockNumber: PartialEq> PartialEq for SaleInfoRecord<Balance, RelayBlockNumber>
impl<Balance: PartialEq, RelayBlockNumber: PartialEq> PartialEq for SaleInfoRecord<Balance, RelayBlockNumber>
Source§fn eq(&self, other: &SaleInfoRecord<Balance, RelayBlockNumber>) -> bool
fn eq(&self, other: &SaleInfoRecord<Balance, RelayBlockNumber>) -> bool
self
and other
values to be equal, and is used by ==
.