referrerpolicy=no-referrer-when-downgrade
snowbridge_pallet_system

Type Alias PricingParametersOf

Source
pub type PricingParametersOf<T> = PricingParameters<BalanceOf<T>>;

Aliased Type§

struct PricingParametersOf<T> {
    pub exchange_rate: FixedU128,
    pub rewards: Rewards<<<T as Config>::Token as Inspect<<T as Config>::AccountId>>::Balance>,
    pub fee_per_gas: U256,
    pub multiplier: FixedU128,
}

Fields§

§exchange_rate: FixedU128

ETH/DOT exchange rate

§rewards: Rewards<<<T as Config>::Token as Inspect<<T as Config>::AccountId>>::Balance>

Relayer rewards

§fee_per_gas: U256

Ether (wei) fee per gas unit

§multiplier: FixedU128

Fee multiplier

Implementations

§

impl<Balance> PricingParameters<Balance>
where Balance: BaseArithmetic + Unsigned + Copy,

pub fn validate(&self) -> Result<(), InvalidPricingParameters>

Trait Implementations

§

impl<Balance> Clone for PricingParameters<Balance>
where Balance: Clone,

§

fn clone(&self) -> PricingParameters<Balance>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<Balance> Debug for PricingParameters<Balance>
where Balance: Debug,

§

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

Formats the value using the given formatter. Read more
§

impl<Balance> Decode for PricingParameters<Balance>
where Rewards<Balance>: Decode,

§

fn decode<__CodecInputEdqy>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<PricingParameters<Balance>, Error>
where __CodecInputEdqy: Input,

Attempt to deserialise the value from input.
§

fn decode_into<I>( input: &mut I, dst: &mut MaybeUninit<Self>, ) -> Result<DecodeFinished, Error>
where I: Input,

Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
§

fn skip<I>(input: &mut I) -> Result<(), Error>
where I: Input,

Attempt to skip the encoded value from input. Read more
§

fn encoded_fixed_size() -> Option<usize>

Returns the fixed encoded size of the type. Read more
§

impl<Balance> Encode for PricingParameters<Balance>
where Rewards<Balance>: Encode,

§

fn size_hint(&self) -> usize

If possible give a hint of expected size of the encoding. Read more
§

fn encode_to<__CodecOutputEdqy>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
where __CodecOutputEdqy: Output + ?Sized,

Convert self to a slice and append it to the destination.
§

fn encode(&self) -> Vec<u8>

Convert self to an owned vector.
§

fn using_encoded<R, F>(&self, f: F) -> R
where F: FnOnce(&[u8]) -> R,

Convert self to a slice and then invoke the given closure with it.
§

fn encoded_size(&self) -> usize

Calculates the encoded size. Read more
§

impl<Balance> MaxEncodedLen for PricingParameters<Balance>
where Rewards<Balance>: MaxEncodedLen,

§

fn max_encoded_len() -> usize

Upper bound, in bytes, of the maximum encoded size of this item.
§

impl<Balance> PartialEq for PricingParameters<Balance>
where Balance: PartialEq,

§

fn eq(&self, other: &PricingParameters<Balance>) -> 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.
§

impl<Balance> TypeInfo for PricingParameters<Balance>
where Rewards<Balance>: TypeInfo + 'static, Balance: TypeInfo + 'static,

§

type Identity = PricingParameters<Balance>

The type identifying for which type info is provided. Read more
§

fn type_info() -> Type

Returns the static type identifier for Self.
§

impl<Balance> DecodeWithMemTracking for PricingParameters<Balance>
where Rewards<Balance>: DecodeWithMemTracking,

§

impl<Balance> EncodeLike for PricingParameters<Balance>
where Rewards<Balance>: Encode,

§

impl<Balance> StructuralPartialEq for PricingParameters<Balance>