pallet_frequency_tx_payment_runtime_api/
lib.rs

1#![cfg_attr(not(feature = "std"), no_std)]
2#![allow(clippy::too_many_arguments)]
3#![allow(clippy::unnecessary_mut_passed)]
4#![allow(rustdoc::bare_urls)]
5// Strong Documentation Lints
6#![deny(
7	rustdoc::broken_intra_doc_links,
8	rustdoc::missing_crate_level_docs,
9	rustdoc::invalid_codeblock_attributes,
10	missing_docs
11)]
12//! Runtime API definition for [Capacity](../pallet_capacity/index.html)
13//!
14//! This api must be implemented by the node runtime.
15//! Runtime APIs Provide:
16//! - An interface between the runtime and Custom RPCs.
17//! - Runtime interfaces for end users beyond just State Queries
18
19use frame_support::sp_runtime;
20use parity_scale_codec::Codec;
21use sp_runtime::traits::MaybeDisplay;
22
23pub use pallet_transaction_payment::{FeeDetails, InclusionFee};
24
25// Here we declare the runtime API. It is implemented in the `impl` block in
26// runtime files (the `runtime` folder)
27sp_api::decl_runtime_apis! {
28	/// Runtime Version for Frequency Payment
29	#[api_version(1)]
30	pub trait CapacityTransactionPaymentRuntimeApi<Balance> where
31		Balance: Codec + MaybeDisplay,
32	{
33		/// Query the capacity fee details for a given extrinsic.
34		fn compute_capacity_fee(uxt: Block::Extrinsic, len: u32) ->FeeDetails<Balance>;
35	}
36}