estimate transaction fee (#1015)

This commit is contained in:
Svyatoslav Nikolsky
2021-06-28 12:13:53 +03:00
committed by Bastian Köcher
parent 165730a2c2
commit db0216dabb
20 changed files with 294 additions and 72 deletions
@@ -18,11 +18,13 @@
use crate::chain::Chain;
use pallet_transaction_payment_rpc_runtime_api::FeeDetails;
use sc_rpc_api::{state::ReadProof, system::Health};
use sp_core::{
storage::{StorageData, StorageKey},
Bytes,
};
use sp_rpc::number::NumberOrHex;
use sp_version::RuntimeVersion;
jsonrpsee_proc_macros::rpc_client_api! {
@@ -49,5 +51,7 @@ jsonrpsee_proc_macros::rpc_client_api! {
fn state_prove_storage(keys: Vec<StorageKey>, hash: Option<C::Hash>) -> ReadProof<C::Hash>;
#[rpc(method = "state_getRuntimeVersion", positional_params)]
fn state_runtime_version() -> RuntimeVersion;
#[rpc(method = "payment_queryFeeDetails", positional_params)]
fn payment_query_fee_details(extrinsic: Bytes, at_block: Option<C::Hash>) -> FeeDetails<NumberOrHex>;
}
}