This repository has been 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.6k
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 5 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 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 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 | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -1955,6 +1955,22 @@ impl_runtime_apis! { | |||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi< | ||||||||||||||||||||||||||||||||||||||||||||||
Block, | ||||||||||||||||||||||||||||||||||||||||||||||
Balance, | ||||||||||||||||||||||||||||||||||||||||||||||
Call, | ||||||||||||||||||||||||||||||||||||||||||||||
> for Runtime { | ||||||||||||||||||||||||||||||||||||||||||||||
fn query_call_info( | ||||||||||||||||||||||||||||||||||||||||||||||
call: Call, | ||||||||||||||||||||||||||||||||||||||||||||||
len: u32, | ||||||||||||||||||||||||||||||||||||||||||||||
) -> RuntimeDispatchInfo<Balance> { | ||||||||||||||||||||||||||||||||||||||||||||||
TransactionPayment::query_call_info(call, len) | ||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||
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.
Suggested change
I think this is what basti wants from you. 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. Did it similar, but as suggested Basti, placed it within |
||||||||||||||||||||||||||||||||||||||||||||||
fn query_call_fee_details(call: Call, len: u32) -> FeeDetails<Balance> { | ||||||||||||||||||||||||||||||||||||||||||||||
TransactionPayment::query_call_fee_details(call, len) | ||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
impl pallet_mmr::primitives::MmrApi< | ||||||||||||||||||||||||||||||||||||||||||||||
Block, | ||||||||||||||||||||||||||||||||||||||||||||||
mmr::Hash, | ||||||||||||||||||||||||||||||||||||||||||||||
|
This file contains 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 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formatting is correct? 🫣
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could not make rustfmt format this macro body, probably not supported rust-lang/rustfmt#3704
but this time just formatted it outside of macro body with the same indentation.