pub struct Config { /* private fields */ }Expand description
Configuration settings.
Implementations§
Source§impl Config
impl Config
Sourcepub const fn new(
transfer_config: TransferConfig,
fee_handling: FeeHandling,
refund_handling: RefundHandling,
vesting_schedule_period_millis: u64,
allow_auction_bids: bool,
compute_rewards: bool,
max_delegators_per_validator: u32,
minimum_bid_amount: u64,
minimum_delegation_amount: u64,
balance_hold_interval: u64,
include_credits: bool,
credit_cap: Ratio<U512>,
enable_addressable_entity: bool,
native_transfer_cost: u32,
) -> Self
pub const fn new( transfer_config: TransferConfig, fee_handling: FeeHandling, refund_handling: RefundHandling, vesting_schedule_period_millis: u64, allow_auction_bids: bool, compute_rewards: bool, max_delegators_per_validator: u32, minimum_bid_amount: u64, minimum_delegation_amount: u64, balance_hold_interval: u64, include_credits: bool, credit_cap: Ratio<U512>, enable_addressable_entity: bool, native_transfer_cost: u32, ) -> Self
Ctor.
Sourcepub fn from_chainspec(chainspec: &Chainspec) -> Self
pub fn from_chainspec(chainspec: &Chainspec) -> Self
Ctor from chainspec.
Sourcepub fn transfer_config(&self) -> &TransferConfig
pub fn transfer_config(&self) -> &TransferConfig
Returns transfer config.
Sourcepub fn fee_handling(&self) -> &FeeHandling
pub fn fee_handling(&self) -> &FeeHandling
Returns fee handling setting.
Sourcepub fn refund_handling(&self) -> &RefundHandling
pub fn refund_handling(&self) -> &RefundHandling
Returns refund handling setting.
Sourcepub fn vesting_schedule_period_millis(&self) -> u64
pub fn vesting_schedule_period_millis(&self) -> u64
Returns vesting schedule period millis setting.
Sourcepub fn allow_auction_bids(&self) -> bool
pub fn allow_auction_bids(&self) -> bool
Returns if auction bids are allowed.
Sourcepub fn compute_rewards(&self) -> bool
pub fn compute_rewards(&self) -> bool
Returns if rewards should be computed.
Sourcepub fn max_delegators_per_validator(&self) -> u32
pub fn max_delegators_per_validator(&self) -> u32
Returns max delegators per validator setting.
Sourcepub fn minimum_bid_amount(&self) -> u64
pub fn minimum_bid_amount(&self) -> u64
Returns minimum bid amount setting.
Sourcepub fn minimum_delegation_amount(&self) -> u64
pub fn minimum_delegation_amount(&self) -> u64
Returns minimum delegation amount setting.
Sourcepub fn balance_hold_interval(&self) -> u64
pub fn balance_hold_interval(&self) -> u64
Returns balance hold interval setting.
Sourcepub fn include_credits(&self) -> bool
pub fn include_credits(&self) -> bool
Returns include credit setting.
Sourcepub fn credit_cap(&self) -> Ratio<U512>
pub fn credit_cap(&self) -> Ratio<U512>
Returns validator credit cap setting.
Sourcepub fn enable_addressable_entity(&self) -> bool
pub fn enable_addressable_entity(&self) -> bool
Enable the addressable entity and migrate accounts/contracts to entities.
Sourcepub fn set_transfer_config(self, transfer_config: TransferConfig) -> Self
pub fn set_transfer_config(self, transfer_config: TransferConfig) -> Self
Changes the transfer config.
Trait Implementations§
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more