This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Transaction payment runtime api: query call info and fee details #11819
Merged
paritytech-processbot
merged 15 commits into
master
from
transaction-payment-rpc-calls-query-call-info
Aug 10, 2022
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
ed95f05
Transaction payment RPC calls: query call info
muharem 535b925
transaction payment pallet - runtime api - add query_call info and fe…
muharem 8e707c3
remove unused deps
muharem 083fa77
separate call runtime api
muharem a597aea
undo fmt for unchanged code
muharem 7c6fb38
system config call bounded to GetDispatchInfo, drop Call generic for …
muharem 20fb5d0
impl GetDispatchInfo for Extrinsics within runtime test-utils
muharem 6d0ca79
Merge remote-tracking branch 'origin/master' into transaction-payment…
muharem a7efefe
introduced runtime api methods accept encoded Call instead of Call type
muharem 7e9a7e2
replace Bytes by Vec, docs for for new api, drop len argument, drop G…
muharem 40a9928
clean up toml and extra impl for dropped bound
muharem a4bd61a
panic if Call can not be decoded
muharem 91dfcf2
revert to 6d0ca79
muharem 273cf09
fmt and docs
muharem f8efc1c
rustfmt
muharem File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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`. | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. removed panic, since the implementation itself is not supposed to panic, only upstream state_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>; | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.