pub struct LinearFee(/* private fields */);Expand description
Careful: although the linear fee is the same for Byron & Shelley The value of the parameters and how fees are computed is not the same
Implementations§
Source§impl LinearFee
impl LinearFee
Sourcepub fn new(
coefficient: Coin,
constant: Coin,
ref_script_cost_per_byte: Coin,
) -> Self
pub fn new( coefficient: Coin, constant: Coin, ref_script_cost_per_byte: Coin, ) -> Self
-
coefficient- minfee_a from protocol params
-
constant- minfee_b from protocol params
-
ref_script_cost_per_bytes- min_fee_ref_script_cost_per_byte from protocol params. New in Conway
Sourcepub fn coefficient(&self) -> Coin
pub fn coefficient(&self) -> Coin
minfee_a
pub fn ref_script_cost_per_byte(&self) -> Coin
Trait Implementations§
Source§impl FromWasmAbi for LinearFee
impl FromWasmAbi for LinearFee
Source§impl IntoWasmAbi for LinearFee
impl IntoWasmAbi for LinearFee
Source§impl LongRefFromWasmAbi for LinearFee
impl LongRefFromWasmAbi for LinearFee
Source§impl OptionFromWasmAbi for LinearFee
impl OptionFromWasmAbi for LinearFee
Source§impl OptionIntoWasmAbi for LinearFee
impl OptionIntoWasmAbi for LinearFee
Source§impl RefFromWasmAbi for LinearFee
impl RefFromWasmAbi for LinearFee
Source§impl RefMutFromWasmAbi for LinearFee
impl RefMutFromWasmAbi for LinearFee
Source§impl TryFromJsValue for LinearFee
impl TryFromJsValue for LinearFee
Source§impl VectorFromWasmAbi for LinearFee
impl VectorFromWasmAbi for LinearFee
Source§impl VectorIntoWasmAbi for LinearFee
impl VectorIntoWasmAbi for LinearFee
impl SupportsConstructor for LinearFee
impl SupportsInstanceProperty for LinearFee
impl SupportsStaticProperty for LinearFee
Auto Trait Implementations§
impl Freeze for LinearFee
impl RefUnwindSafe for LinearFee
impl Send for LinearFee
impl Sync for LinearFee
impl Unpin for LinearFee
impl UnwindSafe for LinearFee
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<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 moreSource§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.