referrerpolicy=no-referrer-when-downgrade
frame_support::traits

Trait EstimateCallFee

Source
pub trait EstimateCallFee<Call, Balance> {
    // Required method
    fn estimate_call_fee(call: &Call, post_info: PostDispatchInfo) -> Balance;
}
Expand description

Something that can estimate the fee of a (frame-based) call.

Typically, the same pallet that will charge transaction fees will implement this.

Required Methods§

Source

fn estimate_call_fee(call: &Call, post_info: PostDispatchInfo) -> Balance

Estimate the fee of this call.

The dispatch info and the length is deduced from the call. The post info can optionally be provided.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<Call, Balance: From<u32>, const T: u32> EstimateCallFee<Call, Balance> for ConstU32<T>

Source§

impl<Call, Balance: From<u32>, const T: u64> EstimateCallFee<Call, Balance> for ConstU64<T>

impl<T: Config, AnyCall: GetDispatchInfo + Encode> EstimateCallFee<AnyCall, <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance> for Pallet<T>
where T::RuntimeCall: Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo>,