mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 14:37:57 +00:00
Transaction payment runtime api: query call info and fee details (#11819)
* Transaction payment RPC calls: query call info * transaction payment pallet - runtime api - add query_call info and fee_details * remove unused deps * separate call runtime api * undo fmt for unchanged code * system config call bounded to GetDispatchInfo, drop Call generic for query call info/fee * impl GetDispatchInfo for Extrinsics within runtime test-utils * introduced runtime api methods accept encoded Call instead of Call type * replace Bytes by Vec, docs for for new api, drop len argument, drop GetDispatchInfo bound from system_Config::Call * clean up toml and extra impl for dropped bound * panic if Call can not be decoded * revert to d43ba2f * fmt and docs * rustfmt
This commit is contained in:
@@ -31,4 +31,16 @@ sp_api::decl_runtime_apis! {
|
||||
fn query_info(uxt: Block::Extrinsic, len: u32) -> RuntimeDispatchInfo<Balance>;
|
||||
fn query_fee_details(uxt: Block::Extrinsic, len: u32) -> FeeDetails<Balance>;
|
||||
}
|
||||
|
||||
pub trait TransactionPaymentCallApi<Balance, Call>
|
||||
where
|
||||
Balance: Codec + MaybeDisplay,
|
||||
Call: Codec,
|
||||
{
|
||||
/// Query information of a dispatch class, weight, and fee of a given encoded `Call`.
|
||||
fn query_call_info(call: Call, len: u32) -> RuntimeDispatchInfo<Balance>;
|
||||
|
||||
/// Query fee details of a given encoded `Call`.
|
||||
fn query_call_fee_details(call: Call, len: u32) -> FeeDetails<Balance>;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user