Skip to main content

ProtocolParameters

Struct ProtocolParameters 

Source
pub struct ProtocolParameters {
Show 35 fields pub protocol_version: ProtocolVersion, pub max_block_body_size: u64, pub max_transaction_size: u64, pub max_block_header_size: u16, pub max_tx_ex_units: ExUnits, pub max_block_ex_units: ExUnits, pub max_value_size: u64, pub max_collateral_inputs: u16, pub min_fee_a: Lovelace, pub min_fee_b: u64, pub stake_credential_deposit: Lovelace, pub stake_pool_deposit: Lovelace, pub monetary_expansion_rate: RationalNumber, pub treasury_expansion_rate: RationalNumber, pub min_pool_cost: u64, pub lovelace_per_utxo_byte: Lovelace, pub prices: ExUnitPrices, pub min_fee_ref_script_lovelace_per_byte: RationalNumber, pub max_ref_script_size_per_tx: u32, pub max_ref_script_size_per_block: u32, pub ref_script_cost_stride: u32, pub ref_script_cost_multiplier: RationalNumber, pub stake_pool_max_retirement_epoch: u64, pub optimal_stake_pools_count: u16, pub pledge_influence: RationalNumber, pub collateral_percentage: u16, pub cost_models: CostModels, pub pool_voting_thresholds: PoolVotingThresholds, pub drep_voting_thresholds: DRepVotingThresholds, pub min_committee_size: u16, pub max_committee_term_length: u64, pub gov_action_lifetime: u64, pub gov_action_deposit: Lovelace, pub drep_deposit: Lovelace, pub drep_expiry: u64,
}
Expand description

Fields§

§protocol_version: ProtocolVersion§max_block_body_size: u64§max_transaction_size: u64§max_block_header_size: u16§max_tx_ex_units: ExUnits§max_block_ex_units: ExUnits§max_value_size: u64§max_collateral_inputs: u16§min_fee_a: Lovelace§min_fee_b: u64§stake_credential_deposit: Lovelace§stake_pool_deposit: Lovelace§monetary_expansion_rate: RationalNumber§treasury_expansion_rate: RationalNumber§min_pool_cost: u64§lovelace_per_utxo_byte: Lovelace§prices: ExUnitPrices§min_fee_ref_script_lovelace_per_byte: RationalNumber§max_ref_script_size_per_tx: u32§max_ref_script_size_per_block: u32§ref_script_cost_stride: u32§ref_script_cost_multiplier: RationalNumber§stake_pool_max_retirement_epoch: u64§optimal_stake_pools_count: u16§pledge_influence: RationalNumber§collateral_percentage: u16§cost_models: CostModels§pool_voting_thresholds: PoolVotingThresholds§drep_voting_thresholds: DRepVotingThresholds§min_committee_size: u16§max_committee_term_length: u64§gov_action_lifetime: u64§gov_action_deposit: Lovelace§drep_deposit: Lovelace§drep_expiry: u64

Implementations§

Trait Implementations§

Source§

impl Clone for ProtocolParameters

Source§

fn clone(&self) -> ProtocolParameters

Returns a duplicate 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 Debug for ProtocolParameters

Source§

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

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

impl<'b, C> Decode<'b, C> for ProtocolParameters

Source§

fn decode(d: &mut Decoder<'b>, ctx: &mut C) -> Result<Self, Error>

Decode a value using the given Decoder. Read more
Source§

fn nil() -> Option<Self>

If possible, return a nil value of Self. Read more
Source§

impl<C> Encode<C> for ProtocolParameters

Source§

fn encode<W: Write>( &self, e: &mut Encoder<W>, ctx: &mut C, ) -> Result<(), Error<W::Error>>

Encode a value of this type using the given Encoder. Read more
Source§

fn is_nil(&self) -> bool

Is this value of Self a nil value? Read more
Source§

impl PartialEq for ProtocolParameters

Source§

fn eq(&self, other: &ProtocolParameters) -> 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 TryFrom<NetworkName> for &ProtocolParameters

Source§

fn try_from(value: NetworkName) -> Result<Self, String>

TODO: define protocol parameters for all the networks

Source§

type Error = String

The type returned in the event of a conversion error.
Source§

impl Eq for ProtocolParameters

Source§

impl StructuralPartialEq for ProtocolParameters

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<'a, T> Fragment<'a> for T
where T: Encode<()> + Decode<'a, ()>,

Source§

fn encode_fragment(&self) -> Result<Vec<u8>, Box<dyn Error>>

Source§

fn decode_fragment(bytes: &'a [u8]) -> Result<T, Box<dyn Error>>

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Fragment for T
where T: for<'b> Decode<'b, ()> + Encode<()>,