sp_block_producer_fees/
lib.rs

1//! Primitives for block producer fees feature
2#![cfg_attr(not(feature = "std"), no_std)]
3#![deny(missing_docs)]
4
5use parity_scale_codec::Decode;
6
7/// Margin Fee precision is 0.01 of a percent, so 1/10000 is used as a unit.
8pub type PerTenThousands = u16;
9
10sp_api::decl_runtime_apis! {
11	/// Runtime API for block producer fees. Required for convenient access to the data by RPC.
12	pub trait BlockProducerFeesApi<AccountId: Decode>
13	{
14		/// Retrieves the latests fees of all accounts that have set them.
15		fn get_all_fees() -> sp_std::vec::Vec<(AccountId, PerTenThousands)>;
16	}
17}