pub struct EngineConfig { /* private fields */ }
Expand description
The runtime configuration of the execution engine
Implementations§
source§impl EngineConfig
impl EngineConfig
sourcepub fn new(
max_query_depth: u64,
max_associated_keys: u32,
max_runtime_call_stack_height: u32,
minimum_delegation_amount: u64,
strict_argument_checking: bool,
vesting_schedule_period_millis: u64,
max_delegators_per_validator: Option<u32>,
wasm_config: WasmConfig,
system_config: SystemConfig
) -> EngineConfig
👎Deprecated since 3.0.0: prefer to use EngineConfigBuilder to construct an EngineConfig
pub fn new( max_query_depth: u64, max_associated_keys: u32, max_runtime_call_stack_height: u32, minimum_delegation_amount: u64, strict_argument_checking: bool, vesting_schedule_period_millis: u64, max_delegators_per_validator: Option<u32>, wasm_config: WasmConfig, system_config: SystemConfig ) -> EngineConfig
Creates a new EngineConfig
instance.
New code should use EngineConfigBuilder
instead as some config options will otherwise be
defaulted.
sourcepub fn max_associated_keys(&self) -> u32
pub fn max_associated_keys(&self) -> u32
Returns the current max associated keys config.
sourcepub fn max_runtime_call_stack_height(&self) -> u32
pub fn max_runtime_call_stack_height(&self) -> u32
Returns the current max runtime call stack height config.
sourcepub fn wasm_config(&self) -> &WasmConfig
pub fn wasm_config(&self) -> &WasmConfig
Returns the current wasm config.
sourcepub fn system_config(&self) -> &SystemConfig
pub fn system_config(&self) -> &SystemConfig
Returns the current system config.
sourcepub fn minimum_delegation_amount(&self) -> u64
pub fn minimum_delegation_amount(&self) -> u64
Returns the minimum delegation amount in motes.
sourcepub fn strict_argument_checking(&self) -> bool
pub fn strict_argument_checking(&self) -> bool
Get the engine config’s strict argument checking flag.
sourcepub fn vesting_schedule_period_millis(&self) -> u64
pub fn vesting_schedule_period_millis(&self) -> u64
Get the vesting schedule period.
sourcepub fn max_delegators_per_validator(&self) -> Option<u32>
pub fn max_delegators_per_validator(&self) -> Option<u32>
Get the max delegators per validator
sourcepub fn administrative_accounts(&self) -> &BTreeSet<AccountHash>
pub fn administrative_accounts(&self) -> &BTreeSet<AccountHash>
Returns the engine config’s administrative accounts.
sourcepub fn allow_auction_bids(&self) -> bool
pub fn allow_auction_bids(&self) -> bool
Returns true if auction bids are allowed.
sourcepub fn allow_unrestricted_transfers(&self) -> bool
pub fn allow_unrestricted_transfers(&self) -> bool
Returns true if unrestricted transfers are allowed.
sourcepub fn refund_handling(&self) -> &RefundHandling
pub fn refund_handling(&self) -> &RefundHandling
Returns the engine config’s refund ratio.
sourcepub fn fee_handling(&self) -> FeeHandling
pub fn fee_handling(&self) -> FeeHandling
Returns the engine config’s fee handling strategy.
Trait Implementations§
source§impl Clone for EngineConfig
impl Clone for EngineConfig
source§fn clone(&self) -> EngineConfig
fn clone(&self) -> EngineConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for EngineConfig
impl Debug for EngineConfig
Auto Trait Implementations§
impl RefUnwindSafe for EngineConfig
impl Send for EngineConfig
impl Sync for EngineConfig
impl Unpin for EngineConfig
impl UnwindSafe for EngineConfig
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.