Struct oasis_runtime_sdk::modules::core::DynamicMinGasPrice
source · pub struct DynamicMinGasPrice {
pub enabled: bool,
pub target_block_gas_usage_percentage: u8,
pub min_price_max_change_denominator: u8,
}
Expand description
Dynamic min gas price parameters.
Fields§
§enabled: bool
Enables the dynamic min gas price feature which dynamically adjusts the minimum gas price based on block fullness, inspired by EIP-1559.
Only takes effect if min_gas_price
(s) are set.
target_block_gas_usage_percentage: u8
Target block gas usage indicates the desired block gas usage as a percentage of the total block gas limit.
The min gas price will adjust up or down depending on whether the actual gas usage is above or below this target.
min_price_max_change_denominator: u8
Represents a constant value used to limit the rate at which the min price can change between blocks.
For example, if min_price_max_change_denominator
is set to 8, the maximum change in
min price is 12.5% between blocks.
Trait Implementations§
source§impl Clone for DynamicMinGasPrice
impl Clone for DynamicMinGasPrice
source§fn clone(&self) -> DynamicMinGasPrice
fn clone(&self) -> DynamicMinGasPrice
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for DynamicMinGasPrice
impl Debug for DynamicMinGasPrice
source§impl Decode for DynamicMinGasPrice
impl Decode for DynamicMinGasPrice
source§fn try_default() -> Result<Self, DecodeError>
fn try_default() -> Result<Self, DecodeError>
Try to decode from a missing/null/undefined value.
source§fn try_from_cbor_value(value: Value) -> Result<Self, DecodeError>
fn try_from_cbor_value(value: Value) -> Result<Self, DecodeError>
Try to decode from a given CBOR value.
§fn try_from_cbor_value_default(value: Value) -> Result<Self, DecodeError>where
Self: Sized,
fn try_from_cbor_value_default(value: Value) -> Result<Self, DecodeError>where
Self: Sized,
Try to decode from a given CBOR value, calling
try_default
in case the value is null or
undefined.source§impl Default for DynamicMinGasPrice
impl Default for DynamicMinGasPrice
source§fn default() -> DynamicMinGasPrice
fn default() -> DynamicMinGasPrice
Returns the “default value” for a type. Read more
source§impl Encode for DynamicMinGasPrice
impl Encode for DynamicMinGasPrice
source§impl EncodeAsMap for DynamicMinGasPrice
impl EncodeAsMap for DynamicMinGasPrice
§fn into_cbor_value_map(self) -> Valuewhere
Self: Sized,
fn into_cbor_value_map(self) -> Valuewhere
Self: Sized,
Encode the type into a CBOR Map.
§fn into_cbor_map(self) -> Vec<(Value, Value)>where
Self: Sized,
fn into_cbor_map(self) -> Vec<(Value, Value)>where
Self: Sized,
Encode the type into a CBOR Map, returning the map items.
Auto Trait Implementations§
impl Freeze for DynamicMinGasPrice
impl RefUnwindSafe for DynamicMinGasPrice
impl Send for DynamicMinGasPrice
impl Sync for DynamicMinGasPrice
impl Unpin for DynamicMinGasPrice
impl UnwindSafe for DynamicMinGasPrice
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)