Struct pallet_transaction_payment::ChargeTransactionPayment [−][src]
pub struct ChargeTransactionPayment<T: Config>(_);
Expand description
Require the transactor pay for themselves and maybe include a tip to gain additional priority in the queue.
Implementations
impl<T: Config> ChargeTransactionPayment<T> where
T::Call: Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo>,
<<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance: Send + Sync + FixedPointOperand,
impl<T: Config> ChargeTransactionPayment<T> where
T::Call: Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo>,
<<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance: Send + Sync + FixedPointOperand,
pub fn from(
fee: <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance
) -> Self
pub fn from(
fee: <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance
) -> Self
utility constructor. Used only in client/factory code.
Returns the tip as being choosen by the transaction sender.
Trait Implementations
impl<T: Config> Decode for ChargeTransactionPayment<T> where
<<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance: HasCompact,
impl<T: Config> Decode for ChargeTransactionPayment<T> where
<<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance: HasCompact,
Attempt to deserialise the value from input.
Attempt to skip the encoded value from input. Read more
fn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
Returns the fixed encoded size of the type. Read more
impl<T: Config> Encode for ChargeTransactionPayment<T> where
<<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance: HasCompact,
impl<T: Config> Encode for ChargeTransactionPayment<T> where
<<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance: HasCompact,
Convert self to a slice and append it to the destination.
Convert self to a slice and then invoke the given closure with it.
fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
impl<T: PartialEq + Config> PartialEq<ChargeTransactionPayment<T>> for ChargeTransactionPayment<T>
impl<T: PartialEq + Config> PartialEq<ChargeTransactionPayment<T>> for ChargeTransactionPayment<T>
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
impl<T: Config> SignedExtension for ChargeTransactionPayment<T> where
<<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance: Send + Sync + From<u64> + FixedPointOperand,
T::Call: Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo>,
impl<T: Config> SignedExtension for ChargeTransactionPayment<T> where
<<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance: Send + Sync + From<u64> + FixedPointOperand,
T::Call: Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo>,
Unique identifier of this signed extension. Read more
type AdditionalSigned = ()
type AdditionalSigned = ()
Any additional data that will go into the signed payload. This may be created dynamically
from the transaction using the additional_signed
function. Read more
type Pre = (<<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance, Self::AccountId, <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::LiquidityInfo)
type Pre = (<<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance, Self::AccountId, <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::LiquidityInfo)
The type that encodes information that can be passed from pre_dispatch to post-dispatch.
Construct any additional data that should be in the signed payload of the transaction. Can also perform any pre-signature-verification checks and return an error if needed. Read more
fn validate(
&self,
who: &Self::AccountId,
call: &Self::Call,
info: &DispatchInfoOf<Self::Call>,
len: usize
) -> TransactionValidity
fn validate(
&self,
who: &Self::AccountId,
call: &Self::Call,
info: &DispatchInfoOf<Self::Call>,
len: usize
) -> TransactionValidity
Validate a signed transaction for the transaction queue. Read more
fn pre_dispatch(
self,
who: &Self::AccountId,
call: &Self::Call,
info: &DispatchInfoOf<Self::Call>,
len: usize
) -> Result<Self::Pre, TransactionValidityError>
fn pre_dispatch(
self,
who: &Self::AccountId,
call: &Self::Call,
info: &DispatchInfoOf<Self::Call>,
len: usize
) -> Result<Self::Pre, TransactionValidityError>
Do any pre-flight stuff for a signed transaction. Read more
fn post_dispatch(
pre: Self::Pre,
info: &DispatchInfoOf<Self::Call>,
post_info: &PostDispatchInfoOf<Self::Call>,
len: usize,
_result: &DispatchResult
) -> Result<(), TransactionValidityError>
fn post_dispatch(
pre: Self::Pre,
info: &DispatchInfoOf<Self::Call>,
post_info: &PostDispatchInfoOf<Self::Call>,
len: usize,
_result: &DispatchResult
) -> Result<(), TransactionValidityError>
Do any post-flight stuff for an extrinsic. Read more
fn validate_unsigned(
_call: &Self::Call,
_info: &<Self::Call as Dispatchable>::Info,
_len: usize
) -> Result<ValidTransaction, TransactionValidityError>
fn validate_unsigned(
_call: &Self::Call,
_info: &<Self::Call as Dispatchable>::Info,
_len: usize
) -> Result<ValidTransaction, TransactionValidityError>
Validate an unsigned transaction for the transaction queue. Read more
fn pre_dispatch_unsigned(
call: &Self::Call,
info: &<Self::Call as Dispatchable>::Info,
len: usize
) -> Result<Self::Pre, TransactionValidityError>
fn pre_dispatch_unsigned(
call: &Self::Call,
info: &<Self::Call as Dispatchable>::Info,
len: usize
) -> Result<Self::Pre, TransactionValidityError>
Do any pre-flight stuff for a unsigned transaction. Read more
impl<T: Config> EncodeLike<ChargeTransactionPayment<T>> for ChargeTransactionPayment<T> where
<<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance: HasCompact,
Auto Trait Implementations
impl<T> RefUnwindSafe for ChargeTransactionPayment<T> where
<<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance: RefUnwindSafe,
impl<T> Send for ChargeTransactionPayment<T> where
<<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance: Send,
impl<T> Sync for ChargeTransactionPayment<T> where
<<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance: Sync,
impl<T> Unpin for ChargeTransactionPayment<T> where
<<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance: Unpin,
impl<T> UnwindSafe for ChargeTransactionPayment<T> where
<<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert 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
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
The counterpart to unchecked_from
.
Consume self to return an equivalent value of T
.
pub fn vzip(self) -> V
impl<'_, '_, T> EncodeLike<&'_ &'_ T> for T where
T: Encode,
impl<'_, T> EncodeLike<&'_ T> for T where
T: Encode,
impl<'_, T> EncodeLike<&'_ mut T> for T where
T: Encode,
impl<T> EncodeLike<Arc<T>> for T where
T: Encode,
impl<T> EncodeLike<Rc<T>> for T where
T: Encode,
impl<T> MaybeDebug for T where
T: Debug,
impl<T> MaybeDebug for T where
T: Debug,